Subversion Repositories tpanel

Rev

Rev 117 | Rev 137 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 117 Rev 120
Line 63... Line 63...
63
 */
63
 */
64
 
64
 
65
typedef int (*FtpCallbackXfer)(off64_t xfered, void *arg);
65
typedef int (*FtpCallbackXfer)(off64_t xfered, void *arg);
66
typedef int (*FtpCallbackIdle)(void *arg);
66
typedef int (*FtpCallbackIdle)(void *arg);
67
typedef void (*FtpCallbackLog)(char *str, void* arg, bool out);
67
typedef void (*FtpCallbackLog)(char *str, void* arg, bool out);
-
 
68
typedef void (*FtpCallbackError)(char *str, void* arg, int err);
68
//SSL
69
//SSL
69
typedef bool (*FtpCallbackCert)(void *arg, X509 *cert);
70
typedef bool (*FtpCallbackCert)(void *arg, X509 *cert);
70
 
71
 
71
 
72
 
72
struct ftphandle
73
struct ftphandle
Line 80... Line 81...
80
    int cmode;
81
    int cmode;
81
    struct timeval idletime;
82
    struct timeval idletime;
82
    FtpCallbackXfer xfercb;
83
    FtpCallbackXfer xfercb;
83
    FtpCallbackIdle idlecb;
84
    FtpCallbackIdle idlecb;
84
    FtpCallbackLog logcb;
85
    FtpCallbackLog logcb;
-
 
86
    FtpCallbackError errorcb;
85
    void *cbarg;
87
    void *cbarg;
86
    off64_t xfered;
88
    off64_t xfered;
87
    off64_t cbbytes;
89
    off64_t cbbytes;
88
    off64_t xfered1;
90
    off64_t xfered1;
89
    char response[256];
91
    char response[256];
Line 158... Line 160...
158
        int Rename(const char *src, const char *dst);
160
        int Rename(const char *src, const char *dst);
159
        int Delete(const char *path);
161
        int Delete(const char *path);
160
        int Quit();
162
        int Quit();
161
        void SetCallbackIdleFunction(FtpCallbackIdle pointer);
163
        void SetCallbackIdleFunction(FtpCallbackIdle pointer);
162
        void SetCallbackLogFunction(FtpCallbackLog pointer);
164
        void SetCallbackLogFunction(FtpCallbackLog pointer);
-
 
165
        void SetCallbackErrorFunction(FtpCallbackError pointer);
163
        void SetCallbackXferFunction(FtpCallbackXfer pointer);
166
        void SetCallbackXferFunction(FtpCallbackXfer pointer);
164
        void SetCallbackArg(void *arg);
167
        void SetCallbackArg(void *arg);
165
        void SetCallbackBytes(off64_t bytes);
168
        void SetCallbackBytes(off64_t bytes);
166
        void SetCorrectPasv(bool b) { mp_ftphandle->correctpasv = b; };
169
        void SetCorrectPasv(bool b) { mp_ftphandle->correctpasv = b; };
167
        void SetCallbackIdletime(int time);
170
        void SetCallbackIdletime(int time);
Line 193... Line 196...
193
        int writeline(char *buf, int len, ftphandle *nData);
196
        int writeline(char *buf, int len, ftphandle *nData);
194
        int readresp(char c, ftphandle *nControl);
197
        int readresp(char c, ftphandle *nControl);
195
        void sprint_rest(char *buf, off64_t offset);
198
        void sprint_rest(char *buf, off64_t offset);
196
        void ClearHandle();
199
        void ClearHandle();
197
        int CorrectPasvResponse(unsigned char *v);
200
        int CorrectPasvResponse(unsigned char *v);
-
 
201
        void errorHandler(const char *stub, int err, int line);
198
    };
202
    };
199
 
203
 
200
#endif
204
#endif