VirtualBox

source: vbox/trunk/src/libs/libxml2-2.13.2/include/libxml/nanoftp.h@ 108403

最後變更 在這個檔案從108403是 105420,由 vboxsync 提交於 8 月 前

libxml2-2.12.6: Applied and adjusted our libxml2 changes to 2.12.6. bugref:10730

  • 屬性 svn:eol-style 設為 native
檔案大小: 3.9 KB
 
1/*
2 * Summary: minimal FTP implementation
3 * Description: minimal FTP implementation allowing to fetch resources
4 * like external subset. This module is DEPRECATED, do not
5 * use any of its functions.
6 *
7 * Copy: See Copyright for the status of this software.
8 *
9 * Author: Daniel Veillard
10 */
11
12#ifndef __NANO_FTP_H__
13#define __NANO_FTP_H__
14
15#include <libxml/xmlversion.h>
16
17#if defined(LIBXML_FTP_ENABLED)
18
19/* Needed for portability to Windows 64 bits */
20#if defined(_WIN32)
21#include <winsock2.h>
22#else
23/**
24 * SOCKET:
25 *
26 * macro used to provide portability of code to windows sockets
27 */
28#define SOCKET int
29/**
30 * INVALID_SOCKET:
31 *
32 * macro used to provide portability of code to windows sockets
33 * the value to be used when the socket is not valid
34 */
35#undef INVALID_SOCKET
36#define INVALID_SOCKET (-1)
37#endif
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/**
44 * ftpListCallback:
45 * @userData: user provided data for the callback
46 * @filename: the file name (including "->" when links are shown)
47 * @attrib: the attribute string
48 * @owner: the owner string
49 * @group: the group string
50 * @size: the file size
51 * @links: the link count
52 * @year: the year
53 * @month: the month
54 * @day: the day
55 * @hour: the hour
56 * @minute: the minute
57 *
58 * A callback for the xmlNanoFTPList command.
59 * Note that only one of year and day:minute are specified.
60 */
61typedef void (*ftpListCallback) (void *userData,
62 const char *filename, const char *attrib,
63 const char *owner, const char *group,
64 unsigned long size, int links, int year,
65 const char *month, int day, int hour,
66 int minute);
67/**
68 * ftpDataCallback:
69 * @userData: the user provided context
70 * @data: the data received
71 * @len: its size in bytes
72 *
73 * A callback for the xmlNanoFTPGet command.
74 */
75typedef void (*ftpDataCallback) (void *userData,
76 const char *data,
77 int len);
78
79/*
80 * Init
81 */
82XML_DEPRECATED
83XMLPUBFUN void
84 xmlNanoFTPInit (void);
85XML_DEPRECATED
86XMLPUBFUN void
87 xmlNanoFTPCleanup (void);
88
89/*
90 * Creating/freeing contexts.
91 */
92XML_DEPRECATED
93XMLPUBFUN void *
94 xmlNanoFTPNewCtxt (const char *URL);
95XML_DEPRECATED
96XMLPUBFUN void
97 xmlNanoFTPFreeCtxt (void * ctx);
98XML_DEPRECATED
99XMLPUBFUN void *
100 xmlNanoFTPConnectTo (const char *server,
101 int port);
102/*
103 * Opening/closing session connections.
104 */
105XML_DEPRECATED
106XMLPUBFUN void *
107 xmlNanoFTPOpen (const char *URL);
108XML_DEPRECATED
109XMLPUBFUN int
110 xmlNanoFTPConnect (void *ctx);
111XML_DEPRECATED
112XMLPUBFUN int
113 xmlNanoFTPClose (void *ctx);
114XML_DEPRECATED
115XMLPUBFUN int
116 xmlNanoFTPQuit (void *ctx);
117XML_DEPRECATED
118XMLPUBFUN void
119 xmlNanoFTPScanProxy (const char *URL);
120XML_DEPRECATED
121XMLPUBFUN void
122 xmlNanoFTPProxy (const char *host,
123 int port,
124 const char *user,
125 const char *passwd,
126 int type);
127XML_DEPRECATED
128XMLPUBFUN int
129 xmlNanoFTPUpdateURL (void *ctx,
130 const char *URL);
131
132/*
133 * Rather internal commands.
134 */
135XML_DEPRECATED
136XMLPUBFUN int
137 xmlNanoFTPGetResponse (void *ctx);
138XML_DEPRECATED
139XMLPUBFUN int
140 xmlNanoFTPCheckResponse (void *ctx);
141
142/*
143 * CD/DIR/GET handlers.
144 */
145XML_DEPRECATED
146XMLPUBFUN int
147 xmlNanoFTPCwd (void *ctx,
148 const char *directory);
149XML_DEPRECATED
150XMLPUBFUN int
151 xmlNanoFTPDele (void *ctx,
152 const char *file);
153
154XML_DEPRECATED
155XMLPUBFUN SOCKET
156 xmlNanoFTPGetConnection (void *ctx);
157XML_DEPRECATED
158XMLPUBFUN int
159 xmlNanoFTPCloseConnection(void *ctx);
160XML_DEPRECATED
161XMLPUBFUN int
162 xmlNanoFTPList (void *ctx,
163 ftpListCallback callback,
164 void *userData,
165 const char *filename);
166XML_DEPRECATED
167XMLPUBFUN SOCKET
168 xmlNanoFTPGetSocket (void *ctx,
169 const char *filename);
170XML_DEPRECATED
171XMLPUBFUN int
172 xmlNanoFTPGet (void *ctx,
173 ftpDataCallback callback,
174 void *userData,
175 const char *filename);
176XML_DEPRECATED
177XMLPUBFUN int
178 xmlNanoFTPRead (void *ctx,
179 void *dest,
180 int len);
181
182#ifdef __cplusplus
183}
184#endif
185#endif /* defined(LIBXML_FTP_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
186#endif /* __NANO_FTP_H__ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette