1995-05-24 17:49:20 +00:00
|
|
|
#ifndef _FTP_H_INCLUDE
|
|
|
|
#define _FTP_H_INCLUDE
|
|
|
|
|
1995-05-23 02:41:18 +00:00
|
|
|
typedef struct {
|
1995-05-24 09:00:58 +00:00
|
|
|
enum {init, isopen, xfer} state;
|
1995-05-23 02:41:18 +00:00
|
|
|
int fd_ctrl;
|
1995-05-24 09:00:58 +00:00
|
|
|
int fd_xfer;
|
1995-05-23 02:41:18 +00:00
|
|
|
int fd_debug;
|
|
|
|
int binary;
|
|
|
|
int passive;
|
|
|
|
int addrtype;
|
|
|
|
char *host;
|
|
|
|
char *file;
|
|
|
|
} *FTP_t;
|
|
|
|
|
|
|
|
FTP_t FtpInit();
|
|
|
|
int FtpOpen(FTP_t, char *host, char *user, char *passwd);
|
|
|
|
#define FtpBinary(ftp,bool) { (ftp)->binary = (bool); }
|
|
|
|
#define FtpPassive(ftp,bool) { (ftp)->passive = (bool); }
|
1995-05-24 09:00:58 +00:00
|
|
|
#ifndef STANDALONE_FTP
|
1995-05-23 02:41:18 +00:00
|
|
|
#define FtpDebug(ftp, bool) { (ftp)->fd_debug = (bool); }
|
1995-05-24 09:00:58 +00:00
|
|
|
#endif
|
1995-05-23 02:41:18 +00:00
|
|
|
int FtpChdir(FTP_t, char *);
|
|
|
|
int FtpGet(FTP_t, char *);
|
|
|
|
int FtpEOF(FTP_t);
|
|
|
|
void FtpClose(FTP_t);
|
|
|
|
|
1995-05-24 17:49:20 +00:00
|
|
|
#endif
|
|
|
|
/* _FTP_H_INCLUDE */
|