ReactOS  0.4.13-dev-650-g34bf247
nanoftp.h
Go to the documentation of this file.
1 /*
2  * Summary: minimal FTP implementation
3  * Description: minimal FTP implementation allowing to fetch resources
4  * like external subset.
5  *
6  * Copy: See Copyright for the status of this software.
7  *
8  * Author: Daniel Veillard
9  */
10 
11 #ifndef __NANO_FTP_H__
12 #define __NANO_FTP_H__
13 
14 #include <libxml/xmlversion.h>
15 
16 #ifdef LIBXML_FTP_ENABLED
17 
18 /* Needed for portability to Windows 64 bits */
19 #if defined(_WIN32) && !defined(__CYGWIN__)
20 #include <winsock2.h>
21 #else
22 
27 #define SOCKET int
28 
34 #undef INVALID_SOCKET
35 #define INVALID_SOCKET (-1)
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
60 typedef void (*ftpListCallback) (void *userData,
61  const char *filename, const char *attrib,
62  const char *owner, const char *group,
63  unsigned long size, int links, int year,
64  const char *month, int day, int hour,
65  int minute);
74 typedef void (*ftpDataCallback) (void *userData,
75  const char *data,
76  int len);
77 
78 /*
79  * Init
80  */
81 XMLPUBFUN void XMLCALL
82  xmlNanoFTPInit (void);
83 XMLPUBFUN void XMLCALL
84  xmlNanoFTPCleanup (void);
85 
86 /*
87  * Creating/freeing contexts.
88  */
89 XMLPUBFUN void * XMLCALL
90  xmlNanoFTPNewCtxt (const char *URL);
91 XMLPUBFUN void XMLCALL
92  xmlNanoFTPFreeCtxt (void * ctx);
93 XMLPUBFUN void * XMLCALL
94  xmlNanoFTPConnectTo (const char *server,
95  int port);
96 /*
97  * Opening/closing session connections.
98  */
99 XMLPUBFUN void * XMLCALL
100  xmlNanoFTPOpen (const char *URL);
101 XMLPUBFUN int XMLCALL
102  xmlNanoFTPConnect (void *ctx);
103 XMLPUBFUN int XMLCALL
104  xmlNanoFTPClose (void *ctx);
105 XMLPUBFUN int XMLCALL
106  xmlNanoFTPQuit (void *ctx);
107 XMLPUBFUN void XMLCALL
108  xmlNanoFTPScanProxy (const char *URL);
109 XMLPUBFUN void XMLCALL
110  xmlNanoFTPProxy (const char *host,
111  int port,
112  const char *user,
113  const char *passwd,
114  int type);
115 XMLPUBFUN int XMLCALL
116  xmlNanoFTPUpdateURL (void *ctx,
117  const char *URL);
118 
119 /*
120  * Rather internal commands.
121  */
122 XMLPUBFUN int XMLCALL
123  xmlNanoFTPGetResponse (void *ctx);
124 XMLPUBFUN int XMLCALL
125  xmlNanoFTPCheckResponse (void *ctx);
126 
127 /*
128  * CD/DIR/GET handlers.
129  */
130 XMLPUBFUN int XMLCALL
131  xmlNanoFTPCwd (void *ctx,
132  const char *directory);
133 XMLPUBFUN int XMLCALL
134  xmlNanoFTPDele (void *ctx,
135  const char *file);
136 
138  xmlNanoFTPGetConnection (void *ctx);
139 XMLPUBFUN int XMLCALL
140  xmlNanoFTPCloseConnection(void *ctx);
141 XMLPUBFUN int XMLCALL
142  xmlNanoFTPList (void *ctx,
143  ftpListCallback callback,
144  void *userData,
145  const char *filename);
147  xmlNanoFTPGetSocket (void *ctx,
148  const char *filename);
149 XMLPUBFUN int XMLCALL
150  xmlNanoFTPGet (void *ctx,
151  ftpDataCallback callback,
152  void *userData,
153  const char *filename);
154 XMLPUBFUN int XMLCALL
155  xmlNanoFTPRead (void *ctx,
156  void *dest,
157  int len);
158 
159 #ifdef __cplusplus
160 }
161 #endif
162 #endif /* LIBXML_FTP_ENABLED */
163 #endif /* __NANO_FTP_H__ */
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
static rfbScreenInfoPtr server
Definition: vnc.c:74
static DOUBLE day(DOUBLE time)
Definition: date.c:115
char * host
Definition: whois.c:55
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define XMLPUBFUN
Definition: xmlexports.h:30
const char * filename
Definition: ioapi.h:135
GLboolean GLuint group
Definition: glext.h:11120
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
GLsizeiptr size
Definition: glext.h:5919
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum GLsizei len
Definition: glext.h:6722
#define XMLCALL
static char * dest
Definition: rtl.c:135
UINT_PTR SOCKET
Definition: winsock.h:47
int month[12]
Definition: systime.c:13
USHORT port
Definition: uri.c:227
void user(int argc, const char *argv[])
Definition: cmds.c:1350
Definition: fci.c:126