diff options
author | Daniel Plasa <dplasa@gmail.com> | 2020-05-29 14:17:09 +0200 |
---|---|---|
committer | Daniel Plasa <dplasa@gmail.com> | 2020-05-29 14:17:09 +0200 |
commit | e1d603771be3f32205cf854db7cb9d86d441852a (patch) | |
tree | 7682411b38c47e997359b908ad867308ba180578 /FTPClient.h | |
parent | remove duplicates (diff) | |
download | FTPCLientServer-e1d603771be3f32205cf854db7cb9d86d441852a.tar FTPCLientServer-e1d603771be3f32205cf854db7cb9d86d441852a.tar.gz FTPCLientServer-e1d603771be3f32205cf854db7cb9d86d441852a.tar.bz2 FTPCLientServer-e1d603771be3f32205cf854db7cb9d86d441852a.tar.lz FTPCLientServer-e1d603771be3f32205cf854db7cb9d86d441852a.tar.xz FTPCLientServer-e1d603771be3f32205cf854db7cb9d86d441852a.tar.zst FTPCLientServer-e1d603771be3f32205cf854db7cb9d86d441852a.zip |
Diffstat (limited to '')
-rw-r--r-- | FTPClient.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/FTPClient.h b/FTPClient.h index d252add..1d3d6b4 100644 --- a/FTPClient.h +++ b/FTPClient.h @@ -43,10 +43,18 @@ public: ERROR, } TransferResult; + static constexpr int16_t errorLocalFile = -1; + static constexpr int16_t errorAlreadyInProgress = -2; + static constexpr int16_t errorConnectionFailed = -3; + static constexpr int16_t errorServerResponse = -4; + static constexpr int16_t errorDataConnectionFailed = -5; + static constexpr int16_t errorUninitialized = -6; + static constexpr int16_t errorTimeout = -7; + typedef struct { TransferResult result; - uint16_t code; + int16_t code; String desc; } Status; @@ -75,7 +83,7 @@ public: void handleFTP(); protected: - typedef enum + typedef enum { cConnect = 0, cGreet, @@ -98,7 +106,7 @@ protected: String _remoteFileName; TransferType _direction; - int8_t controlConnect(); // connects to ServerInfo, returns -1: no connection possible, +1: connection established + int8_t controlConnect(); // connects to ServerInfo, returns -1: no connection possible, +1: connection established bool waitFor(const uint16_t respCode, const __FlashStringHelper *errorString = nullptr, uint16_t timeOut = 10000); }; |