Annotation of XML/nanoftp.h, revision 1.4

1.1       daniel      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@w3.org
                      7:  */
                      8:  
                      9: #ifndef __NANO_FTP_H__
                     10: #define __NANO_FTP_H__
                     11: #ifdef __cplusplus
                     12: extern "C" {
                     13: #endif
                     14: 
1.3       daniel     15: /**
                     16:  * ftpListCallback: 
1.4     ! daniel     17:  * @userData:  user provided data for the callback
        !            18:  * @filename:  the file name (including "->" when links are shown)
        !            19:  * @attrib:  the attribute string
        !            20:  * @owner:  the owner string
        !            21:  * @group:  the group string
        !            22:  * @size:  the file size
        !            23:  * @links:  the link count
        !            24:  * @year:  the year
        !            25:  * @month:  the month
        !            26:  * @day:  the day
        !            27:  * @hour:  the hour
        !            28:  * @minute:  the minute
        !            29:  *
1.3       daniel     30:  * A callback for the xmlNanoFTPList command
1.4     ! daniel     31:  * Note that only one of year and day:minute are specified
1.3       daniel     32:  */
1.1       daniel     33: typedef void (*ftpListCallback) (void *userData,
                     34:                                 const char *filename, const char* attrib,
                     35:                                 const char *owner, const char *group,
                     36:                                 unsigned long size, int links, int year,
1.4     ! daniel     37:                                 const char *month, int day, int hour,
        !            38:                                 int minute);
1.3       daniel     39: /**
                     40:  * ftpDataCallback: 
                     41:  * A callback for the xmlNanoFTPGet command
                     42:  */
1.1       daniel     43: typedef void (*ftpDataCallback) (void *userData, const char *data, int len);
                     44: 
1.3       daniel     45: /*
                     46:  * Init
                     47:  */
                     48: void   xmlNanoFTPInit          (void);
1.4     ! daniel     49: void   xmlNanoFTPCleanup       (void);
1.1       daniel     50: 
1.3       daniel     51: /*
                     52:  * Creating/freeing contexts
                     53:  */
                     54: void * xmlNanoFTPNewCtxt       (const char *URL);
                     55: void   xmlNanoFTPFreeCtxt      (void * ctx);
                     56: void *         xmlNanoFTPConnectTo     (const char *server,
                     57:                                 int port);
                     58: /*
                     59:  * Opening/closing session connections
                     60:  */
                     61: void *         xmlNanoFTPOpen          (const char *URL);
                     62: int    xmlNanoFTPConnect       (void *ctx);
1.1       daniel     63: int    xmlNanoFTPClose         (void *ctx);
1.3       daniel     64: int    xmlNanoFTPQuit          (void *ctx);
1.4     ! daniel     65: void   xmlNanoFTPScanProxy     (const char *URL);
1.3       daniel     66: 
                     67: 
                     68: /*
                     69:  * Rathern internal commands
                     70:  */
                     71: int    xmlNanoFTPGetResponse   (void *ctx);
                     72: int    xmlNanoFTPCheckResponse (void *ctx);
                     73: 
                     74: /*
                     75:  * CD/DIR/GET handlers
                     76:  */
                     77: int    xmlNanoFTPCwd           (void *ctx,
                     78:                                 char *directory);
                     79: 
                     80: int    xmlNanoFTPGetConnection (void *ctx);
                     81: int    xmlNanoFTPCloseConnection(void *ctx);
                     82: int    xmlNanoFTPList          (void *ctx,
                     83:                                 ftpListCallback callback,
                     84:                                 void *userData,
                     85:                                 char *filename);
                     86: int    xmlNanoFTPGetSocket     (void *ctx,
                     87:                                 const char *filename);
                     88: int    xmlNanoFTPGet           (void *ctx,
                     89:                                 ftpDataCallback callback,
                     90:                                 void *userData,
1.1       daniel     91:                                 const char *filename);
                     92: int    xmlNanoFTPRead          (void *ctx,
                     93:                                 void *dest,
                     94:                                 int len);
1.3       daniel     95: 
1.1       daniel     96: #ifdef __cplusplus
                     97: }
                     98: #endif
                     99: #endif /* __NANO_FTP_H__ */

Webmaster