Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygennanoftp.h
Go to the documentation of this file.
00001 /* 00002 * Summary: minimal FTP implementation 00003 * Description: minimal FTP implementation allowing to fetch resources 00004 * like external subset. 00005 * 00006 * Copy: See Copyright for the status of this software. 00007 * 00008 * Author: Daniel Veillard 00009 */ 00010 00011 #ifndef __NANO_FTP_H__ 00012 #define __NANO_FTP_H__ 00013 00014 #include <libxml/xmlversion.h> 00015 00016 #ifdef LIBXML_FTP_ENABLED 00017 00018 /* Needed for portability to Windows 64 bits */ 00019 #if defined(__MINGW32__) || defined(_WIN32_WCE) 00020 #include <winsock2.h> 00021 #else 00022 00027 #define SOCKET int 00028 00034 #define INVALID_SOCKET (-1) 00035 #endif 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00059 typedef void (*ftpListCallback) (void *userData, 00060 const char *filename, const char *attrib, 00061 const char *owner, const char *group, 00062 unsigned long size, int links, int year, 00063 const char *month, int day, int hour, 00064 int minute); 00073 typedef void (*ftpDataCallback) (void *userData, 00074 const char *data, 00075 int len); 00076 00077 /* 00078 * Init 00079 */ 00080 XMLPUBFUN void XMLCALL 00081 xmlNanoFTPInit (void); 00082 XMLPUBFUN void XMLCALL 00083 xmlNanoFTPCleanup (void); 00084 00085 /* 00086 * Creating/freeing contexts. 00087 */ 00088 XMLPUBFUN void * XMLCALL 00089 xmlNanoFTPNewCtxt (const char *URL); 00090 XMLPUBFUN void XMLCALL 00091 xmlNanoFTPFreeCtxt (void * ctx); 00092 XMLPUBFUN void * XMLCALL 00093 xmlNanoFTPConnectTo (const char *server, 00094 int port); 00095 /* 00096 * Opening/closing session connections. 00097 */ 00098 XMLPUBFUN void * XMLCALL 00099 xmlNanoFTPOpen (const char *URL); 00100 XMLPUBFUN int XMLCALL 00101 xmlNanoFTPConnect (void *ctx); 00102 XMLPUBFUN int XMLCALL 00103 xmlNanoFTPClose (void *ctx); 00104 XMLPUBFUN int XMLCALL 00105 xmlNanoFTPQuit (void *ctx); 00106 XMLPUBFUN void XMLCALL 00107 xmlNanoFTPScanProxy (const char *URL); 00108 XMLPUBFUN void XMLCALL 00109 xmlNanoFTPProxy (const char *host, 00110 int port, 00111 const char *user, 00112 const char *passwd, 00113 int type); 00114 XMLPUBFUN int XMLCALL 00115 xmlNanoFTPUpdateURL (void *ctx, 00116 const char *URL); 00117 00118 /* 00119 * Rather internal commands. 00120 */ 00121 XMLPUBFUN int XMLCALL 00122 xmlNanoFTPGetResponse (void *ctx); 00123 XMLPUBFUN int XMLCALL 00124 xmlNanoFTPCheckResponse (void *ctx); 00125 00126 /* 00127 * CD/DIR/GET handlers. 00128 */ 00129 XMLPUBFUN int XMLCALL 00130 xmlNanoFTPCwd (void *ctx, 00131 const char *directory); 00132 XMLPUBFUN int XMLCALL 00133 xmlNanoFTPDele (void *ctx, 00134 const char *file); 00135 00136 XMLPUBFUN SOCKET XMLCALL 00137 xmlNanoFTPGetConnection (void *ctx); 00138 XMLPUBFUN int XMLCALL 00139 xmlNanoFTPCloseConnection(void *ctx); 00140 XMLPUBFUN int XMLCALL 00141 xmlNanoFTPList (void *ctx, 00142 ftpListCallback callback, 00143 void *userData, 00144 const char *filename); 00145 XMLPUBFUN SOCKET XMLCALL 00146 xmlNanoFTPGetSocket (void *ctx, 00147 const char *filename); 00148 XMLPUBFUN int XMLCALL 00149 xmlNanoFTPGet (void *ctx, 00150 ftpDataCallback callback, 00151 void *userData, 00152 const char *filename); 00153 XMLPUBFUN int XMLCALL 00154 xmlNanoFTPRead (void *ctx, 00155 void *dest, 00156 int len); 00157 00158 #ifdef __cplusplus 00159 } 00160 #endif 00161 #endif /* LIBXML_FTP_ENABLED */ 00162 #endif /* __NANO_FTP_H__ */ Generated on Sat May 26 2012 04:32:02 for ReactOS by
1.7.6.1
|