summaryrefslogtreecommitdiffstats
path: root/FTPClient.h
diff options
context:
space:
mode:
authorDaniel Plasa <dplasa@gmail.com>2020-05-29 14:17:09 +0200
committerDaniel Plasa <dplasa@gmail.com>2020-05-29 14:17:09 +0200
commite1d603771be3f32205cf854db7cb9d86d441852a (patch)
tree7682411b38c47e997359b908ad867308ba180578 /FTPClient.h
parentremove duplicates (diff)
downloadFTPCLientServer-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 'FTPClient.h')
-rw-r--r--FTPClient.h14
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);
};