31 #include <SFML/Network/Export.hpp>
32 #include <SFML/Network/TcpSocket.hpp>
33 #include <SFML/System/NonCopyable.hpp>
34 #include <SFML/System/Time.hpp>
78 RestartMarkerReply = 110,
79 ServiceReadySoon = 120,
80 DataConnectionAlreadyOpened = 125,
81 OpeningDataConnection = 150,
85 PointlessCommand = 202,
87 DirectoryStatus = 212,
92 ClosingConnection = 221,
93 DataConnectionOpened = 225,
94 ClosingDataConnection = 226,
95 EnteringPassiveMode = 227,
103 NeedAccountToLogIn = 332,
104 NeedInformation = 350,
108 ServiceUnavailable = 421,
109 DataConnectionUnavailable = 425,
110 TransferAborted = 426,
111 FileActionAborted = 450,
113 InsufficientStorageSpace = 452,
117 CommandUnknown = 500,
118 ParametersUnknown = 501,
119 CommandNotImplemented = 502,
120 BadCommandSequence = 503,
121 ParameterNotImplemented = 504,
123 NeedAccountToStore = 532,
124 FileUnavailable = 550,
125 PageTypeUnknown = 551,
126 NotEnoughMemory = 552,
127 FilenameNotAllowed = 553,
130 InvalidResponse = 1000,
131 ConnectionFailed = 1001,
132 ConnectionClosed = 1002,
146 explicit Response(Status code = InvalidResponse,
const std::string& message =
"");
165 Status getStatus()
const;
173 const std::string& getMessage()
const;
181 std::string m_message;
206 const std::string& getDirectory()
const;
213 std::string m_directory;
240 const std::vector<std::string>& getListing()
const;
247 std::vector<std::string> m_listing;
316 Response login(
const std::string& name,
const std::string& password);
357 ListingResponse getDirectoryListing(
const std::string& directory =
"");
371 Response changeDirectory(
const std::string& directory);
396 Response createDirectory(
const std::string& name);
413 Response deleteDirectory(
const std::string& name);
429 Response renameFile(
const std::string& file,
const std::string& newName);
446 Response deleteFile(
const std::string& name);
465 Response download(
const std::string& remoteFile,
const std::string& localPath,
TransferMode mode = Binary);
484 Response upload(
const std::string& localFile,
const std::string& remotePath,
TransferMode mode = Binary);
497 Response sendCommand(
const std::string& command,
const std::string& parameter =
"");
517 friend class DataChannel;
528 #endif // SFML_FTP_HPP