23 #if !defined(__FTPLIB_H)
26 #ifndef _FTPLIB_NO_COMPAT
27 #define _FTPLIB_NO_COMPAT
31 #if defined(__unix__) || defined(VMS)
33 #define GLOBALREF extern
35 #if defined BUILDING_LIBRARY
36 #define GLOBALDEF __declspec(dllexport)
37 #define GLOBALREF __declspec(dllexport)
39 #define GLOBALREF __declspec(dllimport)
45 #define FTPLIB_DIR_VERBOSE 2
46 #define FTPLIB_FILE_READ 3
47 #define FTPLIB_FILE_WRITE 4
50 #define FTPLIB_ASCII 'A'
51 #define FTPLIB_IMAGE 'I'
52 #define FTPLIB_TEXT FTPLIB_ASCII
53 #define FTPLIB_BINARY FTPLIB_IMAGE
56 #define FTPLIB_PASSIVE 1
59 #define FTPLIB_CONNMODE 1
60 #define FTPLIB_CALLBACK 2
61 #define FTPLIB_IDLETIME 3
62 #define FTPLIB_CALLBACKARG 4
63 #define FTPLIB_CALLBACKBYTES 5
64 #define FTPLIB_CALLBACK_WRITER 6
65 #define FTPLIB_CALLBACK_WRITERARG 7
76 #if !defined(_FTPLIB_NO_COMPAT)
79 #define ftplib_lastresp FtpLastResponse(DefaultNetbuf)
80 #define ftpInit FtpInit
81 #define ftpOpen(x) FtpConnect(x, &DefaultNetbuf)
82 #define ftpLogin(x,y) FtpLogin(x, y, DefaultNetbuf)
83 #define ftpSite(x) FtpSite(x, DefaultNetbuf)
84 #define ftpMkdir(x) FtpMkdir(x, DefaultNetbuf)
85 #define ftpChdir(x) FtpChdir(x, DefaultNetbuf)
86 #define ftpRmdir(x) FtpRmdir(x, DefaultNetbuf)
87 #define ftpNlst(x, y) FtpNlst(x, y, DefaultNetbuf)
88 #define ftpDir(x, y) FtpDir(x, y, DefaultNetbuf)
89 #define ftpGet(x, y, z) FtpGet(x, y, z, DefaultNetbuf)
90 #define ftpPut(x, y, z) FtpPut(x, y, z, DefaultNetbuf)
91 #define ftpRename(x, y) FtpRename(x, y, DefaultNetbuf)
92 #define ftpDelete(x) FtpDelete(x, DefaultNetbuf)
93 #define ftpQuit() FtpQuit(DefaultNetbuf)
102 GLOBALREF
int FtpLogin(
const char *user,
const char *pass,
netbuf *nControl);
113 GLOBALREF
int FtpPwd(
char *path,
int max,
netbuf *nControl);
114 GLOBALREF
int FtpNlst(
const char *output,
const char *path,
netbuf *nControl);
115 GLOBALREF
int FtpDir(
const char *output,
const char *path,
netbuf *nControl);
116 GLOBALREF
int FtpSize(
const char *path,
int *size,
char mode,
netbuf *nControl);
117 GLOBALREF
int FtpModDate(
const char *path,
char *dt,
int max,
netbuf *nControl);
118 GLOBALREF
int FtpGet(
const char *output,
const char *path,
char mode,
netbuf *nControl);
119 GLOBALREF
int FtpPut(
const char *input,
const char *path,
char mode,
netbuf *nControl);
120 GLOBALREF
int FtpRename(
const char *src,
const char *dst,
netbuf *nControl);
GLOBALDEF int FtpCDUp(netbuf *nControl)
GLOBALDEF int FtpRead(void *buf, int max, netbuf *nData)
int(* FtpCallbackWriter)(netbuf *nControl, const void *buffer, size_t size, void *arg)
GLOBALDEF int FtpClose(netbuf *nData)
GLOBALDEF int FtpMkdir(const char *path, netbuf *nControl)
GLOBALDEF int FtpChdir(const char *path, netbuf *nControl)
GLOBALDEF int FtpSite(const char *cmd, netbuf *nControl)
GLOBALDEF void FtpInit(void)
GLOBALDEF int FtpConnect(const char *host, netbuf **nControl)
GLOBALDEF int FtpOptions(int opt, long val, netbuf *nControl)
GLOBALDEF int FtpLogin(const char *user, const char *pass, netbuf *nControl)
GLOBALDEF void FtpQuit(netbuf *nControl)
GLOBALDEF int FtpDelete(const char *fnm, netbuf *nControl)
GLOBALDEF int FtpModDate(const char *path, char *dt, int max, netbuf *nControl)
GLOBALDEF int FtpWrite(void *buf, int len, netbuf *nData)
GLOBALDEF int FtpPwd(char *path, int max, netbuf *nControl)
GLOBALDEF int FtpGet(const char *outputfile, const char *path, char mode, netbuf *nControl)
GLOBALDEF int ftplib_debug
GLOBALDEF int FtpDir(const char *outputfile, const char *path, netbuf *nControl)
GLOBALDEF int FtpRmdir(const char *path, netbuf *nControl)
GLOBALDEF int FtpPut(const char *inputfile, const char *path, char mode, netbuf *nControl)
GLOBALDEF int FtpAccess(const char *path, int typ, int mode, netbuf *nControl, netbuf **nData)
GLOBALDEF int FtpSize(const char *path, int *size, char mode, netbuf *nControl)
GLOBALDEF int FtpSysType(char *buf, int max, netbuf *nControl)
GLOBALDEF int FtpRename(const char *src, const char *dst, netbuf *nControl)
int(* FtpCallback)(netbuf *nControl, int xfered, void *arg)
GLOBALDEF int FtpNlst(const char *outputfile, const char *path, netbuf *nControl)
GLOBALDEF char * FtpLastResponse(netbuf *nControl)