Annotation of win32/gnome/gnome-xml/include/libxml/nanoftp.h, revision 1.1
1.1 ! paf 1: /*
! 2: * nanohttp.c: minimalist FTP implementation to fetch external subsets.
! 3: *
! 4: * See Copyright for the status of this software.
! 5: *
! 6: * daniel@veillard.com
! 7: */
! 8:
! 9: #ifndef __NANO_FTP_H__
! 10: #define __NANO_FTP_H__
! 11:
! 12: #include <libxml/xmlversion.h>
! 13:
! 14: #ifdef LIBXML_FTP_ENABLED
! 15:
! 16: #ifdef __cplusplus
! 17: extern "C" {
! 18: #endif
! 19:
! 20: /**
! 21: * ftpListCallback:
! 22: * @userData: user provided data for the callback
! 23: * @filename: the file name (including "->" when links are shown)
! 24: * @attrib: the attribute string
! 25: * @owner: the owner string
! 26: * @group: the group string
! 27: * @size: the file size
! 28: * @links: the link count
! 29: * @year: the year
! 30: * @month: the month
! 31: * @day: the day
! 32: * @hour: the hour
! 33: * @minute: the minute
! 34: *
! 35: * A callback for the xmlNanoFTPList command.
! 36: * Note that only one of year and day:minute are specified.
! 37: */
! 38: typedef void (*ftpListCallback) (void *userData,
! 39: const char *filename, const char *attrib,
! 40: const char *owner, const char *group,
! 41: unsigned long size, int links, int year,
! 42: const char *month, int day, int hour,
! 43: int minute);
! 44: /**
! 45: * ftpDataCallback:
! 46: * @userData: the user provided context
! 47: * @data: the data received
! 48: * @len: its size in bytes
! 49: *
! 50: * A callback for the xmlNanoFTPGet command.
! 51: */
! 52: typedef void (*ftpDataCallback) (void *userData,
! 53: const char *data,
! 54: int len);
! 55:
! 56: /*
! 57: * Init
! 58: */
! 59: void xmlNanoFTPInit (void);
! 60: void xmlNanoFTPCleanup (void);
! 61:
! 62: /*
! 63: * Creating/freeing contexts.
! 64: */
! 65: void * xmlNanoFTPNewCtxt (const char *URL);
! 66: void xmlNanoFTPFreeCtxt (void * ctx);
! 67: void * xmlNanoFTPConnectTo (const char *server,
! 68: int port);
! 69: /*
! 70: * Opening/closing session connections.
! 71: */
! 72: void * xmlNanoFTPOpen (const char *URL);
! 73: int xmlNanoFTPConnect (void *ctx);
! 74: int xmlNanoFTPClose (void *ctx);
! 75: int xmlNanoFTPQuit (void *ctx);
! 76: void xmlNanoFTPScanProxy (const char *URL);
! 77: void xmlNanoFTPProxy (const char *host,
! 78: int port,
! 79: const char *user,
! 80: const char *passwd,
! 81: int type);
! 82: int xmlNanoFTPUpdateURL (void *ctx,
! 83: const char *URL);
! 84:
! 85: /*
! 86: * Rather internal commands.
! 87: */
! 88: int xmlNanoFTPGetResponse (void *ctx);
! 89: int xmlNanoFTPCheckResponse (void *ctx);
! 90:
! 91: /*
! 92: * CD/DIR/GET handlers.
! 93: */
! 94: int xmlNanoFTPCwd (void *ctx,
! 95: char *directory);
! 96: int xmlNanoFTPDele (void *ctx,
! 97: char *file);
! 98:
! 99: int xmlNanoFTPGetConnection (void *ctx);
! 100: int xmlNanoFTPCloseConnection(void *ctx);
! 101: int xmlNanoFTPList (void *ctx,
! 102: ftpListCallback callback,
! 103: void *userData,
! 104: char *filename);
! 105: int xmlNanoFTPGetSocket (void *ctx,
! 106: const char *filename);
! 107: int xmlNanoFTPGet (void *ctx,
! 108: ftpDataCallback callback,
! 109: void *userData,
! 110: const char *filename);
! 111: int xmlNanoFTPRead (void *ctx,
! 112: void *dest,
! 113: int len);
! 114:
! 115: #ifdef __cplusplus
! 116: }
! 117: #endif /* LIBXML_FTP_ENABLED */
! 118: #endif
! 119: #endif /* __NANO_FTP_H__ */
E-mail: