10 * ----------------------------------------------------------------------------
11 * "THE BEER-WARE LICENSE" (Revision 42):
12 * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
13 * can do whatever you want with this stuff. If we meet some day, and you think
14 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
15 * ----------------------------------------------------------------------------
22 * Turned inside out. Now returns xfers as new file ids, not as a special
25 * $FreeBSD: src/lib/libftpio/ftpio.h,v 1.15.2.1 2000/07/15 07:24:03 kris Exp $
26 * $DragonFly: src/lib/libftpio/ftpio.h,v 1.3 2004/08/16 13:51:21 joerg Exp $
29 /* Internal housekeeping data structure for FTP sessions */
31 enum { init
, isopen
, quit
} con_state
;
42 /* Structure we use to match FTP error codes with readable strings */
49 extern struct ftperr ftpErrList
[];
50 extern int const ftpErrListLength
;
52 /* Exported routines - deal only with FILE* type */
53 extern FILE *ftpLogin(const char *host
, const char *user
,
54 const char *passwd
, int port
, int verbose
,
56 extern int ftpChdir(FILE *fp
, char *dir
);
57 extern int ftpErrno(FILE *fp
);
58 extern off_t
ftpGetSize(FILE *fp
, const char *file
);
59 extern FILE *ftpGet(FILE *fp
, const char *file
, off_t
*seekto
);
60 extern FILE *ftpPut(FILE *fp
, const char *file
);
61 extern int ftpAscii(FILE *fp
);
62 extern int ftpBinary(FILE *fp
);
63 extern int ftpPassive(FILE *fp
, int status
);
64 extern void ftpVerbose(FILE *fp
, int status
);
65 extern FILE *ftpGetURL(const char *url
, const char *user
,
66 const char *passwd
, int *retcode
);
67 extern FILE *ftpPutURL(const char *url
, const char *user
,
68 const char *passwd
, int *retcode
);
69 extern time_t ftpGetModtime(FILE *fp
, const char *file
);
70 extern const char *ftpErrString(int error
);
71 extern FILE *ftpLoginAf(const char *host
, int af
, const char *user
,
72 const char *passwd
, int port
, int verbose
,
74 extern FILE *ftpGetURLAf(const char *url
, int af
, const char *user
,
75 const char *passwd
, int *retcode
);
76 extern FILE *ftpPutURLAf(const char *url
, int af
, const char *user
,
77 const char *passwd
, int *retcode
);
80 #endif /* _FTP_H_INCLUDE */