1995-05-24 18:49:20 +01:00
|
|
|
#ifndef _FTP_H_INCLUDE
|
|
|
|
#define _FTP_H_INCLUDE
|
|
|
|
|
1995-05-23 03:41:18 +01:00
|
|
|
typedef struct {
|
1995-05-24 10:00:58 +01:00
|
|
|
enum {init, isopen, xfer} state;
|
1995-05-23 03:41:18 +01:00
|
|
|
int fd_ctrl;
|
1995-05-24 10:00:58 +01:00
|
|
|
int fd_xfer;
|
1995-05-23 03:41:18 +01: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 10:00:58 +01:00
|
|
|
#ifndef STANDALONE_FTP
|
1995-05-23 03:41:18 +01:00
|
|
|
#define FtpDebug(ftp, bool) { (ftp)->fd_debug = (bool); }
|
1995-05-24 10:00:58 +01:00
|
|
|
#endif
|
1995-05-23 03:41:18 +01:00
|
|
|
int FtpChdir(FTP_t, char *);
|
|
|
|
int FtpGet(FTP_t, char *);
|
|
|
|
int FtpEOF(FTP_t);
|
|
|
|
void FtpClose(FTP_t);
|
|
|
|
|
1995-05-24 18:49:20 +01:00
|
|
|
#endif
|
|
|
|
/* _FTP_H_INCLUDE */
|