Class FTP::Response#
Defined in File FTP.h
Nested Relationships#
This class is a nested type of Class FTP.
Inheritance Relationships#
Derived Types#
public TRAP::Network::FTP::DirectoryResponse
(Class FTP::DirectoryResponse)public TRAP::Network::FTP::ListingResponse
(Class FTP::ListingResponse)
Class Documentation#
-
class Response
Subclassed by TRAP::Network::FTP::DirectoryResponse, TRAP::Network::FTP::ListingResponse
Public Types
-
enum class Status
Status codes possibly returned by a FTP response.
Values:
-
enumerator RestartMarkerReply
-
enumerator ServiceReadySoon
-
enumerator DataConnectionAlreadyOpened
-
enumerator OpeningDataConnection
-
enumerator OK
-
enumerator PointlessCommand
-
enumerator SystemStatus
-
enumerator DirectoryStatus
-
enumerator FileStatus
-
enumerator HelpMessage
-
enumerator SystemType
-
enumerator ServiceReady
-
enumerator ClosingConnection
-
enumerator DataConnectionOpened
-
enumerator ClosingDataConnection
-
enumerator EnteringPassiveMode
-
enumerator LoggedIn
-
enumerator FileActionOK
-
enumerator DirectoryOK
-
enumerator NeedPassword
-
enumerator NeedAccountToLogIn
-
enumerator NeedInformation
-
enumerator TransferAborted
-
enumerator FileActionAborted
-
enumerator LocalError
-
enumerator InsufficientStorageSpace
-
enumerator CommandUnknown
-
enumerator ParametersUnknown
-
enumerator CommandNotImplemented
-
enumerator BadCommandSequence
-
enumerator ParameterNotImplemented
-
enumerator NotLoggedIn
-
enumerator NeedAccountToStore
-
enumerator PageTypeUnknown
-
enumerator NotEnoughMemory
-
enumerator FilenameNotAllowed
-
enumerator InvalidResponse
-
enumerator ConnectionFailed
-
enumerator ConnectionClosed
-
enumerator InvalidFile
-
enumerator RestartMarkerReply
Public Functions
-
explicit constexpr Response(Status code = Status::InvalidResponse, std::string message = "") noexcept
This constructor is used by the FTP client to build the response.
-
constexpr Response(const Response&) = default
Copy constructor.
-
constexpr Response(Response&&) noexcept = default
Move constructor.
-
constexpr ~Response() = default
Destructor.
-
constexpr bool IsOK() const noexcept
Check if the status code means a success.
This function is defined for convenience, it is equivalent to testing if the status code is < 400.
- Returns:
True if the status is a success, false if it is a failure.
-
constexpr Status GetStatus() const noexcept
Get the status code of the response.
- Returns:
Status code.
-
constexpr std::string GetMessage() const noexcept
Get the full message contained in the response.
- Returns:
The response message.
-
enum class Status