FTPClient
Fork of FTPClient by
FTPClient.h@1:2630b5456598, 2015-07-28 (annotated)
- Committer:
- Ricky_Kwon
- Date:
- Tue Jul 28 23:30:59 2015 +0000
- Revision:
- 1:2630b5456598
- Parent:
- 0:61da21bfd120
- Child:
- 3:4fd8e5cd6307
add function(quit())
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ricky_Kwon | 0:61da21bfd120 | 1 | #ifndef FTP_CLIENT_H |
Ricky_Kwon | 0:61da21bfd120 | 2 | #define FTP_CLIENT_H |
Ricky_Kwon | 0:61da21bfd120 | 3 | #include "mbed.h" |
Ricky_Kwon | 0:61da21bfd120 | 4 | #include "SDFileSystem.h" |
Ricky_Kwon | 0:61da21bfd120 | 5 | #define MAX_SS 256 |
Ricky_Kwon | 0:61da21bfd120 | 6 | class FTPClient{ |
Ricky_Kwon | 0:61da21bfd120 | 7 | public: |
Ricky_Kwon | 0:61da21bfd120 | 8 | FTPClient(PinName mosi, PinName miso, PinName sclk, PinName ssel, const char* root); |
Ricky_Kwon | 0:61da21bfd120 | 9 | ~FTPClient() {}; |
Ricky_Kwon | 0:61da21bfd120 | 10 | |
Ricky_Kwon | 0:61da21bfd120 | 11 | bool open(char* ip, int port, char* id, char* pass); |
Ricky_Kwon | 0:61da21bfd120 | 12 | bool getfile(char* myfilename, char* filename); |
Ricky_Kwon | 0:61da21bfd120 | 13 | bool putfile(char* myfilename, char* filename); |
Ricky_Kwon | 0:61da21bfd120 | 14 | bool dir(); |
Ricky_Kwon | 0:61da21bfd120 | 15 | bool ls(); |
Ricky_Kwon | 0:61da21bfd120 | 16 | bool fdelete(char* filename); |
Ricky_Kwon | 0:61da21bfd120 | 17 | bool mkdir(char* dirname); |
Ricky_Kwon | 0:61da21bfd120 | 18 | bool cd(char* dirname); |
Ricky_Kwon | 1:2630b5456598 | 19 | bool quit(); |
Ricky_Kwon | 0:61da21bfd120 | 20 | int pportc(char * arg); |
Ricky_Kwon | 0:61da21bfd120 | 21 | |
Ricky_Kwon | 1:2630b5456598 | 22 | |
Ricky_Kwon | 1:2630b5456598 | 23 | |
Ricky_Kwon | 1:2630b5456598 | 24 | private: |
Ricky_Kwon | 0:61da21bfd120 | 25 | TCPSocketConnection* FTPClientControlSock; |
Ricky_Kwon | 0:61da21bfd120 | 26 | TCPSocketConnection* FTPClientDataSock; |
Ricky_Kwon | 0:61da21bfd120 | 27 | |
Ricky_Kwon | 0:61da21bfd120 | 28 | bool blogin; |
Ricky_Kwon | 0:61da21bfd120 | 29 | bool bopenflag; |
Ricky_Kwon | 0:61da21bfd120 | 30 | bool brfileflag; |
Ricky_Kwon | 0:61da21bfd120 | 31 | bool bsfileflag; |
Ricky_Kwon | 0:61da21bfd120 | 32 | bool bdirflag; |
Ricky_Kwon | 0:61da21bfd120 | 33 | bool blsflag; |
Ricky_Kwon | 0:61da21bfd120 | 34 | bool bfdeleteflag; |
Ricky_Kwon | 0:61da21bfd120 | 35 | bool bmkdirflag; |
Ricky_Kwon | 0:61da21bfd120 | 36 | bool bcdflag; |
Ricky_Kwon | 1:2630b5456598 | 37 | bool bquitflag; |
Ricky_Kwon | 0:61da21bfd120 | 38 | |
Ricky_Kwon | 0:61da21bfd120 | 39 | char ftpServer_data_ip_addr[4]; |
Ricky_Kwon | 0:61da21bfd120 | 40 | char ftpServer_data_ip_addr_str[20]; |
Ricky_Kwon | 0:61da21bfd120 | 41 | int remote_port; |
Ricky_Kwon | 0:61da21bfd120 | 42 | |
Ricky_Kwon | 0:61da21bfd120 | 43 | char rbuf[256]; |
Ricky_Kwon | 0:61da21bfd120 | 44 | char sbuf[256]; |
Ricky_Kwon | 0:61da21bfd120 | 45 | |
Ricky_Kwon | 0:61da21bfd120 | 46 | int remain_datasize; |
Ricky_Kwon | 0:61da21bfd120 | 47 | int i; |
Ricky_Kwon | 0:61da21bfd120 | 48 | int remain_filesize; |
Ricky_Kwon | 0:61da21bfd120 | 49 | int send_byte; |
Ricky_Kwon | 0:61da21bfd120 | 50 | int size; |
Ricky_Kwon | 0:61da21bfd120 | 51 | FILE *fp; |
Ricky_Kwon | 0:61da21bfd120 | 52 | SDFileSystem _SDFileSystem; |
Ricky_Kwon | 0:61da21bfd120 | 53 | }; |
Ricky_Kwon | 0:61da21bfd120 | 54 | #endif |