FTPClient

Fork of FTPClient by Ricky Kwon

Revision:
0:61da21bfd120
Child:
1:2630b5456598
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FTPClient.h	Tue Jul 28 00:04:52 2015 +0000
@@ -0,0 +1,51 @@
+#ifndef FTP_CLIENT_H
+#define FTP_CLIENT_H
+#include "mbed.h"
+#include "SDFileSystem.h"
+#define MAX_SS              256
+class FTPClient{
+public:
+    FTPClient(PinName mosi, PinName miso, PinName sclk, PinName ssel, const char* root);
+    ~FTPClient() {};
+    
+    bool open(char* ip, int port, char* id, char* pass);
+    bool getfile(char* myfilename, char* filename);
+    bool putfile(char* myfilename, char* filename);
+    bool dir();
+    bool ls();
+    bool fdelete(char* filename);
+    bool mkdir(char* dirname);
+    bool cd(char* dirname);
+    int pportc(char * arg);
+    
+    TCPSocketConnection* FTPClientControlSock;
+    TCPSocketConnection* FTPClientDataSock;
+    
+    bool blogin;
+    bool bopenflag;
+    bool brfileflag;
+    bool bsfileflag;
+    bool bdirflag;
+    bool blsflag;
+    bool bfdeleteflag;
+    bool bmkdirflag;
+    bool bcdflag;
+    
+    char ftpServer_data_ip_addr[4];
+    char ftpServer_data_ip_addr_str[20];
+    int remote_port;
+    
+    char rbuf[256];
+    char sbuf[256];
+
+    int remain_datasize;
+    int i;
+    int remain_filesize;
+    int send_byte;
+    int size;
+    
+private:
+    FILE *fp;
+    SDFileSystem _SDFileSystem;
+};
+#endif
\ No newline at end of file