lxml 5.4.0__cp311-cp311-macosx_10_9_universal2.whl → 6.0.0__cp311-cp311-macosx_10_9_universal2.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lxml/__init__.py +1 -1
- lxml/_elementpath.cpython-311-darwin.so +0 -0
- lxml/_elementpath.py +3 -1
- lxml/apihelpers.pxi +25 -17
- lxml/builder.cpython-311-darwin.so +0 -0
- lxml/builder.py +11 -0
- lxml/debug.pxi +0 -54
- lxml/etree.cpython-311-darwin.so +0 -0
- lxml/etree.h +24 -28
- lxml/etree.pyx +154 -33
- lxml/etree_api.h +59 -50
- lxml/extensions.pxi +3 -6
- lxml/html/__init__.py +7 -3
- lxml/html/_difflib.cpython-311-darwin.so +0 -0
- lxml/html/_difflib.py +2106 -0
- lxml/html/builder.py +40 -0
- lxml/html/defs.py +3 -3
- lxml/html/diff.cpython-311-darwin.so +0 -0
- lxml/html/diff.py +406 -312
- lxml/includes/etree_defs.h +6 -6
- lxml/includes/libxml/HTMLparser.h +33 -30
- lxml/includes/libxml/HTMLtree.h +1 -0
- lxml/includes/libxml/SAX.h +2 -186
- lxml/includes/libxml/SAX2.h +2 -3
- lxml/includes/libxml/catalog.h +1 -0
- lxml/includes/libxml/debugXML.h +0 -138
- lxml/includes/libxml/encoding.h +124 -61
- lxml/includes/libxml/entities.h +0 -19
- lxml/includes/libxml/globals.h +0 -16
- lxml/includes/libxml/nanoftp.h +3 -173
- lxml/includes/libxml/parser.h +474 -231
- lxml/includes/libxml/parserInternals.h +21 -101
- lxml/includes/libxml/relaxng.h +7 -2
- lxml/includes/libxml/threads.h +0 -6
- lxml/includes/libxml/tree.h +29 -85
- lxml/includes/libxml/valid.h +20 -12
- lxml/includes/libxml/xinclude.h +5 -0
- lxml/includes/libxml/xlink.h +4 -0
- lxml/includes/libxml/xmlIO.h +15 -34
- lxml/includes/libxml/xmlautomata.h +19 -2
- lxml/includes/libxml/xmlerror.h +18 -18
- lxml/includes/libxml/xmlexports.h +6 -56
- lxml/includes/libxml/xmlmemory.h +19 -19
- lxml/includes/libxml/xmlmodule.h +4 -0
- lxml/includes/libxml/xmlreader.h +11 -3
- lxml/includes/libxml/xmlregexp.h +7 -106
- lxml/includes/libxml/xmlsave.h +11 -2
- lxml/includes/libxml/xmlschemas.h +10 -5
- lxml/includes/libxml/xmlunicode.h +3 -354
- lxml/includes/libxml/xmlversion.h +19 -34
- lxml/includes/libxml/xpath.h +5 -15
- lxml/includes/libxml/xpathInternals.h +9 -3
- lxml/includes/libxml/xpointer.h +1 -91
- lxml/includes/lxml-version.h +1 -1
- lxml/includes/tree.pxd +10 -12
- lxml/includes/xmlparser.pxd +46 -8
- lxml/lxml.etree.h +24 -28
- lxml/lxml.etree_api.h +59 -50
- lxml/objectify.cpython-311-darwin.so +0 -0
- lxml/objectify.pyx +11 -7
- lxml/parser.pxi +106 -47
- lxml/sax.cpython-311-darwin.so +0 -0
- lxml/sax.py +11 -0
- lxml/saxparser.pxi +14 -14
- lxml/schematron.pxi +8 -3
- lxml/serializer.pxi +71 -3
- lxml/xslt.pxi +10 -3
- lxml-6.0.0.dist-info/METADATA +163 -0
- {lxml-5.4.0.dist-info → lxml-6.0.0.dist-info}/RECORD +73 -71
- {lxml-5.4.0.dist-info → lxml-6.0.0.dist-info}/WHEEL +2 -1
- {lxml-5.4.0.dist-info → lxml-6.0.0.dist-info}/licenses/LICENSE.txt +3 -1
- lxml-5.4.0.dist-info/METADATA +0 -96
- {lxml-5.4.0.dist-info → lxml-6.0.0.dist-info}/licenses/LICENSES.txt +0 -0
- {lxml-5.4.0.dist-info → lxml-6.0.0.dist-info}/top_level.txt +0 -0
lxml/includes/libxml/encoding.h
CHANGED
@@ -23,44 +23,30 @@
|
|
23
23
|
#define __XML_CHAR_ENCODING_H__
|
24
24
|
|
25
25
|
#include <libxml/xmlversion.h>
|
26
|
-
|
27
|
-
#ifdef LIBXML_ICONV_ENABLED
|
28
|
-
#include <iconv.h>
|
29
|
-
#endif
|
26
|
+
#include <libxml/xmlerror.h>
|
30
27
|
|
31
28
|
#ifdef __cplusplus
|
32
29
|
extern "C" {
|
33
30
|
#endif
|
34
31
|
|
32
|
+
/*
|
33
|
+
* Backward compatibility
|
34
|
+
*/
|
35
|
+
#define UTF8Toisolat1 xmlUTF8ToIsolat1
|
36
|
+
#define isolat1ToUTF8 xmlIsolat1ToUTF8
|
37
|
+
|
35
38
|
typedef enum {
|
36
39
|
XML_ENC_ERR_SUCCESS = 0,
|
37
|
-
|
40
|
+
XML_ENC_ERR_INTERNAL = -1,
|
38
41
|
XML_ENC_ERR_INPUT = -2,
|
39
|
-
|
40
|
-
|
41
|
-
XML_ENC_ERR_MEMORY = -5
|
42
|
+
XML_ENC_ERR_SPACE = -3,
|
43
|
+
XML_ENC_ERR_MEMORY = -4
|
42
44
|
} xmlCharEncError;
|
43
45
|
|
44
46
|
/*
|
45
47
|
* xmlCharEncoding:
|
46
48
|
*
|
47
49
|
* Predefined values for some standard encodings.
|
48
|
-
* Libxml does not do beforehand translation on UTF8 and ISOLatinX.
|
49
|
-
* It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
|
50
|
-
*
|
51
|
-
* Anything else would have to be translated to UTF8 before being
|
52
|
-
* given to the parser itself. The BOM for UTF16 and the encoding
|
53
|
-
* declaration are looked at and a converter is looked for at that
|
54
|
-
* point. If not found the parser stops here as asked by the XML REC. A
|
55
|
-
* converter can be registered by the user using xmlRegisterCharEncodingHandler
|
56
|
-
* but the current form doesn't allow stateful transcoding (a serious
|
57
|
-
* problem agreed !). If iconv has been found it will be used
|
58
|
-
* automatically and allow stateful transcoding, the simplest is then
|
59
|
-
* to be sure to enable iconv and to provide iconv libs for the encoding
|
60
|
-
* support needed.
|
61
|
-
*
|
62
|
-
* Note that the generic "UTF-16" is not a predefined value. Instead, only
|
63
|
-
* the specific UTF-16LE and UTF-16BE are present.
|
64
50
|
*/
|
65
51
|
typedef enum {
|
66
52
|
XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
|
@@ -86,9 +72,23 @@ typedef enum {
|
|
86
72
|
XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
|
87
73
|
XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
|
88
74
|
XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
|
89
|
-
XML_CHAR_ENCODING_ASCII= 22
|
75
|
+
XML_CHAR_ENCODING_ASCII= 22,/* pure ASCII */
|
76
|
+
/* Available since 2.14.0 */
|
77
|
+
XML_CHAR_ENCODING_UTF16= 23,/* UTF-16 native */
|
78
|
+
XML_CHAR_ENCODING_HTML= 24,/* HTML (output only) */
|
79
|
+
XML_CHAR_ENCODING_8859_10= 25,/* ISO-8859-10 */
|
80
|
+
XML_CHAR_ENCODING_8859_11= 26,/* ISO-8859-11 */
|
81
|
+
XML_CHAR_ENCODING_8859_13= 27,/* ISO-8859-13 */
|
82
|
+
XML_CHAR_ENCODING_8859_14= 28,/* ISO-8859-14 */
|
83
|
+
XML_CHAR_ENCODING_8859_15= 29,/* ISO-8859-15 */
|
84
|
+
XML_CHAR_ENCODING_8859_16= 30 /* ISO-8859-16 */
|
90
85
|
} xmlCharEncoding;
|
91
86
|
|
87
|
+
typedef enum {
|
88
|
+
XML_ENC_INPUT = (1 << 0),
|
89
|
+
XML_ENC_OUTPUT = (1 << 1)
|
90
|
+
} xmlCharEncFlags;
|
91
|
+
|
92
92
|
/**
|
93
93
|
* xmlCharEncodingInputFunc:
|
94
94
|
* @out: a pointer to an array of bytes to store the UTF-8 result
|
@@ -96,17 +96,15 @@ typedef enum {
|
|
96
96
|
* @in: a pointer to an array of chars in the original encoding
|
97
97
|
* @inlen: the length of @in
|
98
98
|
*
|
99
|
-
*
|
100
|
-
* it to an UTF-8 block of chars out.
|
99
|
+
* Convert characters to UTF-8.
|
101
100
|
*
|
102
|
-
*
|
103
|
-
*
|
104
|
-
*
|
105
|
-
*
|
106
|
-
* The value of @outlen after return is the number of octets consumed.
|
101
|
+
* On success, the value of @inlen after return is the number of
|
102
|
+
* bytes consumed and @outlen is the number of bytes produced.
|
103
|
+
*
|
104
|
+
* Returns the number of bytes written or an XML_ENC_ERR code.
|
107
105
|
*/
|
108
|
-
typedef int (*
|
109
|
-
|
106
|
+
typedef int (*xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
|
107
|
+
const unsigned char *in, int *inlen);
|
110
108
|
|
111
109
|
|
112
110
|
/**
|
@@ -116,41 +114,92 @@ typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
|
|
116
114
|
* @in: a pointer to an array of UTF-8 chars
|
117
115
|
* @inlen: the length of @in
|
118
116
|
*
|
119
|
-
*
|
120
|
-
* encoding.
|
121
|
-
* Note: a first call designed to produce heading info is called with
|
122
|
-
* in = NULL. If stateful this should also initialize the encoder state.
|
117
|
+
* Convert characters from UTF-8.
|
123
118
|
*
|
124
|
-
*
|
125
|
-
*
|
126
|
-
*
|
127
|
-
*
|
128
|
-
* The value of @outlen after return is the number of octets produced.
|
119
|
+
* On success, the value of @inlen after return is the number of
|
120
|
+
* bytes consumed and @outlen is the number of bytes produced.
|
121
|
+
*
|
122
|
+
* Returns the number of bytes written or an XML_ENC_ERR code.
|
129
123
|
*/
|
130
|
-
typedef int (*
|
131
|
-
|
124
|
+
typedef int (*xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
|
125
|
+
const unsigned char *in, int *inlen);
|
132
126
|
|
133
127
|
|
128
|
+
/**
|
129
|
+
* xmlCharEncConvFunc:
|
130
|
+
* @vctxt: conversion context
|
131
|
+
* @out: a pointer to an array of bytes to store the result
|
132
|
+
* @outlen: the length of @out
|
133
|
+
* @in: a pointer to an array of input bytes
|
134
|
+
* @inlen: the length of @in
|
135
|
+
* @flush: end of input
|
136
|
+
*
|
137
|
+
* Convert between character encodings.
|
138
|
+
*
|
139
|
+
* The value of @inlen after return is the number of bytes consumed
|
140
|
+
* and @outlen is the number of bytes produced.
|
141
|
+
*
|
142
|
+
* If the converter can consume partial multi-byte sequences, the
|
143
|
+
* @flush flag can be used to detect truncated sequences at EOF.
|
144
|
+
* Otherwise, the flag can be ignored.
|
145
|
+
*
|
146
|
+
* Returns an XML_ENC_ERR code.
|
147
|
+
*/
|
148
|
+
typedef xmlCharEncError
|
149
|
+
(*xmlCharEncConvFunc)(void *vctxt, unsigned char *out, int *outlen,
|
150
|
+
const unsigned char *in, int *inlen, int flush);
|
151
|
+
|
152
|
+
/**
|
153
|
+
* xmlCharEncConvCtxtDtor:
|
154
|
+
* @vctxt: conversion context
|
155
|
+
*
|
156
|
+
* Free a conversion context.
|
157
|
+
*/
|
158
|
+
typedef void
|
159
|
+
(*xmlCharEncConvCtxtDtor)(void *vctxt);
|
160
|
+
|
134
161
|
/*
|
135
162
|
* Block defining the handlers for non UTF-8 encodings.
|
136
|
-
*
|
163
|
+
*
|
164
|
+
* This structure will be made private.
|
137
165
|
*/
|
138
166
|
typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
|
139
167
|
typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
|
140
168
|
struct _xmlCharEncodingHandler {
|
141
|
-
char
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
169
|
+
char *name XML_DEPRECATED_MEMBER;
|
170
|
+
union {
|
171
|
+
xmlCharEncConvFunc func;
|
172
|
+
xmlCharEncodingInputFunc legacyFunc;
|
173
|
+
} input XML_DEPRECATED_MEMBER;
|
174
|
+
union {
|
175
|
+
xmlCharEncConvFunc func;
|
176
|
+
xmlCharEncodingOutputFunc legacyFunc;
|
177
|
+
} output XML_DEPRECATED_MEMBER;
|
178
|
+
void *inputCtxt XML_DEPRECATED_MEMBER;
|
179
|
+
void *outputCtxt XML_DEPRECATED_MEMBER;
|
180
|
+
xmlCharEncConvCtxtDtor ctxtDtor XML_DEPRECATED_MEMBER;
|
181
|
+
int flags XML_DEPRECATED_MEMBER;
|
152
182
|
};
|
153
183
|
|
184
|
+
/**
|
185
|
+
* xmlCharEncConvImpl:
|
186
|
+
* @vctxt: user data
|
187
|
+
* @name: encoding name
|
188
|
+
* @flags: bit mask of flags
|
189
|
+
* @out: pointer to resulting handler
|
190
|
+
*
|
191
|
+
* If this function returns XML_ERR_OK, it must fill the @out
|
192
|
+
* pointer with an encoding handler. The handler can be obtained
|
193
|
+
* from xmlCharEncNewCustomHandler.
|
194
|
+
*
|
195
|
+
* @flags can contain XML_ENC_INPUT, XML_ENC_OUTPUT or both.
|
196
|
+
*
|
197
|
+
* Returns an xmlParserErrors code.
|
198
|
+
*/
|
199
|
+
typedef xmlParserErrors
|
200
|
+
(*xmlCharEncConvImpl)(void *vctxt, const char *name, xmlCharEncFlags flags,
|
201
|
+
xmlCharEncodingHandler **out);
|
202
|
+
|
154
203
|
/*
|
155
204
|
* Interfaces for encoding handlers.
|
156
205
|
*/
|
@@ -162,13 +211,19 @@ XMLPUBFUN void
|
|
162
211
|
xmlCleanupCharEncodingHandlers (void);
|
163
212
|
XMLPUBFUN void
|
164
213
|
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
|
165
|
-
XMLPUBFUN
|
214
|
+
XMLPUBFUN xmlParserErrors
|
166
215
|
xmlLookupCharEncodingHandler (xmlCharEncoding enc,
|
167
216
|
xmlCharEncodingHandlerPtr *out);
|
168
|
-
XMLPUBFUN
|
217
|
+
XMLPUBFUN xmlParserErrors
|
169
218
|
xmlOpenCharEncodingHandler (const char *name,
|
170
219
|
int output,
|
171
220
|
xmlCharEncodingHandlerPtr *out);
|
221
|
+
XMLPUBFUN xmlParserErrors
|
222
|
+
xmlCreateCharEncodingHandler (const char *name,
|
223
|
+
xmlCharEncFlags flags,
|
224
|
+
xmlCharEncConvImpl impl,
|
225
|
+
void *implCtxt,
|
226
|
+
xmlCharEncodingHandlerPtr *out);
|
172
227
|
XMLPUBFUN xmlCharEncodingHandlerPtr
|
173
228
|
xmlGetCharEncodingHandler (xmlCharEncoding enc);
|
174
229
|
XMLPUBFUN xmlCharEncodingHandlerPtr
|
@@ -177,6 +232,14 @@ XMLPUBFUN xmlCharEncodingHandlerPtr
|
|
177
232
|
xmlNewCharEncodingHandler (const char *name,
|
178
233
|
xmlCharEncodingInputFunc input,
|
179
234
|
xmlCharEncodingOutputFunc output);
|
235
|
+
XMLPUBFUN xmlParserErrors
|
236
|
+
xmlCharEncNewCustomHandler (const char *name,
|
237
|
+
xmlCharEncConvFunc input,
|
238
|
+
xmlCharEncConvFunc output,
|
239
|
+
xmlCharEncConvCtxtDtor ctxtDtor,
|
240
|
+
void *inputCtxt,
|
241
|
+
void *outputCtxt,
|
242
|
+
xmlCharEncodingHandler **out);
|
180
243
|
|
181
244
|
/*
|
182
245
|
* Interfaces for encoding names and aliases.
|
@@ -227,13 +290,13 @@ XMLPUBFUN int
|
|
227
290
|
*/
|
228
291
|
#ifdef LIBXML_OUTPUT_ENABLED
|
229
292
|
XMLPUBFUN int
|
230
|
-
|
293
|
+
xmlUTF8ToIsolat1 (unsigned char *out,
|
231
294
|
int *outlen,
|
232
295
|
const unsigned char *in,
|
233
296
|
int *inlen);
|
234
297
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
235
298
|
XMLPUBFUN int
|
236
|
-
|
299
|
+
xmlIsolat1ToUTF8 (unsigned char *out,
|
237
300
|
int *outlen,
|
238
301
|
const unsigned char *in,
|
239
302
|
int *inlen);
|
lxml/includes/libxml/entities.h
CHANGED
@@ -76,12 +76,6 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
|
|
76
76
|
* External functions:
|
77
77
|
*/
|
78
78
|
|
79
|
-
#ifdef LIBXML_LEGACY_ENABLED
|
80
|
-
XML_DEPRECATED
|
81
|
-
XMLPUBFUN void
|
82
|
-
xmlInitializePredefinedEntities (void);
|
83
|
-
#endif /* LIBXML_LEGACY_ENABLED */
|
84
|
-
|
85
79
|
XMLPUBFUN xmlEntityPtr
|
86
80
|
xmlNewEntity (xmlDocPtr doc,
|
87
81
|
const xmlChar *name,
|
@@ -125,12 +119,6 @@ XMLPUBFUN xmlEntityPtr
|
|
125
119
|
XMLPUBFUN xmlEntityPtr
|
126
120
|
xmlGetParameterEntity (xmlDocPtr doc,
|
127
121
|
const xmlChar *name);
|
128
|
-
#ifdef LIBXML_LEGACY_ENABLED
|
129
|
-
XML_DEPRECATED
|
130
|
-
XMLPUBFUN const xmlChar *
|
131
|
-
xmlEncodeEntities (xmlDocPtr doc,
|
132
|
-
const xmlChar *input);
|
133
|
-
#endif /* LIBXML_LEGACY_ENABLED */
|
134
122
|
XMLPUBFUN xmlChar *
|
135
123
|
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
|
136
124
|
const xmlChar *input);
|
@@ -139,10 +127,8 @@ XMLPUBFUN xmlChar *
|
|
139
127
|
const xmlChar *input);
|
140
128
|
XMLPUBFUN xmlEntitiesTablePtr
|
141
129
|
xmlCreateEntitiesTable (void);
|
142
|
-
#ifdef LIBXML_TREE_ENABLED
|
143
130
|
XMLPUBFUN xmlEntitiesTablePtr
|
144
131
|
xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
|
145
|
-
#endif /* LIBXML_TREE_ENABLED */
|
146
132
|
XMLPUBFUN void
|
147
133
|
xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
|
148
134
|
#ifdef LIBXML_OUTPUT_ENABLED
|
@@ -153,11 +139,6 @@ XMLPUBFUN void
|
|
153
139
|
xmlDumpEntityDecl (xmlBufferPtr buf,
|
154
140
|
xmlEntityPtr ent);
|
155
141
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
156
|
-
#ifdef LIBXML_LEGACY_ENABLED
|
157
|
-
XMLPUBFUN void
|
158
|
-
xmlCleanupPredefinedEntities(void);
|
159
|
-
#endif /* LIBXML_LEGACY_ENABLED */
|
160
|
-
|
161
142
|
|
162
143
|
#ifdef __cplusplus
|
163
144
|
}
|
lxml/includes/libxml/globals.h
CHANGED
@@ -22,20 +22,4 @@
|
|
22
22
|
#include <libxml/xmlsave.h>
|
23
23
|
#include <libxml/threads.h>
|
24
24
|
|
25
|
-
#ifdef __cplusplus
|
26
|
-
extern "C" {
|
27
|
-
#endif
|
28
|
-
|
29
|
-
typedef struct _xmlGlobalState xmlGlobalState;
|
30
|
-
typedef xmlGlobalState *xmlGlobalStatePtr;
|
31
|
-
|
32
|
-
XML_DEPRECATED XMLPUBFUN void
|
33
|
-
xmlInitializeGlobalState(xmlGlobalStatePtr gs);
|
34
|
-
XML_DEPRECATED XMLPUBFUN
|
35
|
-
xmlGlobalStatePtr xmlGetGlobalState(void);
|
36
|
-
|
37
|
-
#ifdef __cplusplus
|
38
|
-
}
|
39
|
-
#endif
|
40
|
-
|
41
25
|
#endif /* __XML_GLOBALS_H */
|
lxml/includes/libxml/nanoftp.h
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* Summary:
|
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.
|
2
|
+
* Summary: Removed legacy symbols for an outdated FTP client
|
6
3
|
*
|
7
4
|
* Copy: See Copyright for the status of this software.
|
8
5
|
*
|
@@ -12,175 +9,8 @@
|
|
12
9
|
#ifndef __NANO_FTP_H__
|
13
10
|
#define __NANO_FTP_H__
|
14
11
|
|
15
|
-
#
|
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
|
40
|
-
extern "C" {
|
12
|
+
#ifdef __GNUC__
|
13
|
+
#warning "libxml/nanoftp.h is deprecated"
|
41
14
|
#endif
|
42
15
|
|
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
|
-
*/
|
61
|
-
typedef 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
|
-
*/
|
75
|
-
typedef void (*ftpDataCallback) (void *userData,
|
76
|
-
const char *data,
|
77
|
-
int len);
|
78
|
-
|
79
|
-
/*
|
80
|
-
* Init
|
81
|
-
*/
|
82
|
-
XML_DEPRECATED
|
83
|
-
XMLPUBFUN void
|
84
|
-
xmlNanoFTPInit (void);
|
85
|
-
XML_DEPRECATED
|
86
|
-
XMLPUBFUN void
|
87
|
-
xmlNanoFTPCleanup (void);
|
88
|
-
|
89
|
-
/*
|
90
|
-
* Creating/freeing contexts.
|
91
|
-
*/
|
92
|
-
XML_DEPRECATED
|
93
|
-
XMLPUBFUN void *
|
94
|
-
xmlNanoFTPNewCtxt (const char *URL);
|
95
|
-
XML_DEPRECATED
|
96
|
-
XMLPUBFUN void
|
97
|
-
xmlNanoFTPFreeCtxt (void * ctx);
|
98
|
-
XML_DEPRECATED
|
99
|
-
XMLPUBFUN void *
|
100
|
-
xmlNanoFTPConnectTo (const char *server,
|
101
|
-
int port);
|
102
|
-
/*
|
103
|
-
* Opening/closing session connections.
|
104
|
-
*/
|
105
|
-
XML_DEPRECATED
|
106
|
-
XMLPUBFUN void *
|
107
|
-
xmlNanoFTPOpen (const char *URL);
|
108
|
-
XML_DEPRECATED
|
109
|
-
XMLPUBFUN int
|
110
|
-
xmlNanoFTPConnect (void *ctx);
|
111
|
-
XML_DEPRECATED
|
112
|
-
XMLPUBFUN int
|
113
|
-
xmlNanoFTPClose (void *ctx);
|
114
|
-
XML_DEPRECATED
|
115
|
-
XMLPUBFUN int
|
116
|
-
xmlNanoFTPQuit (void *ctx);
|
117
|
-
XML_DEPRECATED
|
118
|
-
XMLPUBFUN void
|
119
|
-
xmlNanoFTPScanProxy (const char *URL);
|
120
|
-
XML_DEPRECATED
|
121
|
-
XMLPUBFUN void
|
122
|
-
xmlNanoFTPProxy (const char *host,
|
123
|
-
int port,
|
124
|
-
const char *user,
|
125
|
-
const char *passwd,
|
126
|
-
int type);
|
127
|
-
XML_DEPRECATED
|
128
|
-
XMLPUBFUN int
|
129
|
-
xmlNanoFTPUpdateURL (void *ctx,
|
130
|
-
const char *URL);
|
131
|
-
|
132
|
-
/*
|
133
|
-
* Rather internal commands.
|
134
|
-
*/
|
135
|
-
XML_DEPRECATED
|
136
|
-
XMLPUBFUN int
|
137
|
-
xmlNanoFTPGetResponse (void *ctx);
|
138
|
-
XML_DEPRECATED
|
139
|
-
XMLPUBFUN int
|
140
|
-
xmlNanoFTPCheckResponse (void *ctx);
|
141
|
-
|
142
|
-
/*
|
143
|
-
* CD/DIR/GET handlers.
|
144
|
-
*/
|
145
|
-
XML_DEPRECATED
|
146
|
-
XMLPUBFUN int
|
147
|
-
xmlNanoFTPCwd (void *ctx,
|
148
|
-
const char *directory);
|
149
|
-
XML_DEPRECATED
|
150
|
-
XMLPUBFUN int
|
151
|
-
xmlNanoFTPDele (void *ctx,
|
152
|
-
const char *file);
|
153
|
-
|
154
|
-
XML_DEPRECATED
|
155
|
-
XMLPUBFUN SOCKET
|
156
|
-
xmlNanoFTPGetConnection (void *ctx);
|
157
|
-
XML_DEPRECATED
|
158
|
-
XMLPUBFUN int
|
159
|
-
xmlNanoFTPCloseConnection(void *ctx);
|
160
|
-
XML_DEPRECATED
|
161
|
-
XMLPUBFUN int
|
162
|
-
xmlNanoFTPList (void *ctx,
|
163
|
-
ftpListCallback callback,
|
164
|
-
void *userData,
|
165
|
-
const char *filename);
|
166
|
-
XML_DEPRECATED
|
167
|
-
XMLPUBFUN SOCKET
|
168
|
-
xmlNanoFTPGetSocket (void *ctx,
|
169
|
-
const char *filename);
|
170
|
-
XML_DEPRECATED
|
171
|
-
XMLPUBFUN int
|
172
|
-
xmlNanoFTPGet (void *ctx,
|
173
|
-
ftpDataCallback callback,
|
174
|
-
void *userData,
|
175
|
-
const char *filename);
|
176
|
-
XML_DEPRECATED
|
177
|
-
XMLPUBFUN 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
16
|
#endif /* __NANO_FTP_H__ */
|