Update FTPClient

Fork of FTPClient by Ricky Kwon

FTPClient.h

Committer:
Ricky_Kwon
Date:
2015-07-28
Revision:
0:61da21bfd120
Child:
1:2630b5456598

File content as of revision 0:61da21bfd120:

#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