• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1      * Summary: minimal FTP implementation
2      * Description: minimal FTP implementation allowing to fetch resources
3      *              like external subset.
4      *
5      * Copy: See Copyright for the status of this software.
6      *
7      * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
8
9      /if not defined(NANO_FTP_H__)
10      /define NANO_FTP_H__
11
12      /include /libxmlrpg/xmlversion"
13
14      /if defined(LIBXML_FTP_ENABLED)
15
16     d INVALID_SOCKET  c                   -1
17
18      * ftpListCallback:
19      * @userData:  user provided data for the callback
20      * @filename:  the file name (including "->" when links are shown)
21      * @attrib:  the attribute string
22      * @owner:  the owner string
23      * @group:  the group string
24      * @size:  the file size
25      * @links:  the link count
26      * @year:  the year
27      * @month:  the month
28      * @day:  the day
29      * @hour:  the hour
30      * @minute:  the minute
31      *
32      * A callback for the xmlNanoFTPList command.
33      * Note that only one of year and day:minute are specified.
34
35     d ftpListCallback...
36     d                 s               *   based(######typedef######)
37     d                                     procptr
38
39      * ftpDataCallback:
40      * @userData: the user provided context
41      * @data: the data received
42      * @len: its size in bytes
43      *
44      * A callback for the xmlNanoFTPGet command.
45
46     d ftpDataCallback...
47     d                 s               *   based(######typedef######)
48     d                                     procptr
49
50      * Init
51
52     d xmlNanoFTPInit  pr                  extproc('xmlNanoFTPInit')
53
54     d xmlNanoFTPCleanup...
55     d                 pr                  extproc('xmlNanoFTPCleanup')
56
57      * Creating/freeing contexts.
58
59     d xmlNanoFTPNewCtxt...
60     d                 pr              *   extproc('xmlNanoFTPNewCtxt')         void *
61     d  URL                            *   value options(*string)               const char *
62
63     d xmlNanoFTPFreeCtxt...
64     d                 pr                  extproc('xmlNanoFTPFreeCtxt')
65     d  ctx                            *   value                                void *
66
67     d xmlNanoFTPConnectTo...
68     d                 pr              *   extproc('xmlNanoFTPConnectTo')       void *
69     d  server                         *   value options(*string)               const char *
70     d  port                         10i 0 value
71
72      * Opening/closing session connections.
73
74     d xmlNanoFTPOpen  pr              *   extproc('xmlNanoFTPOpen')            void *
75     d  URL                            *   value options(*string)               const char *
76
77     d xmlNanoFTPConnect...
78     d                 pr            10i 0 extproc('xmlNanoFTPConnect')
79     d  ctx                            *   value                                void *
80
81     d xmlNanoFTPClose...
82     d                 pr            10i 0 extproc('xmlNanoFTPClose')
83     d  ctx                            *   value                                void *
84
85     d xmlNanoFTPQuit  pr            10i 0 extproc('xmlNanoFTPQuit')
86     d  ctx                            *   value                                void *
87
88     d xmlNanoFTPScanProxy...
89     d                 pr                  extproc('xmlNanoFTPScanProxy')
90     d  URL                            *   value options(*string)               const char *
91
92     d xmlNanoFTPProxy...
93     d                 pr                  extproc('xmlNanoFTPProxy')
94     d  host                           *   value options(*string)               const char *
95     d  port                         10i 0 value
96     d  user                           *   value options(*string)               const char *
97     d  passwd                         *   value options(*string)               const char *
98     d  type                         10i 0 value
99
100     d xmlNanoFTPUpdateURL...
101     d                 pr            10i 0 extproc('xmlNanoFTPUpdateURL')
102     d  ctx                            *   value                                void *
103     d  URL                            *   value options(*string)               const char *
104
105      * Rather internal commands.
106
107     d xmlNanoFTPGetResponse...
108     d                 pr            10i 0 extproc('xmlNanoFTPGetResponse')
109     d  ctx                            *   value                                void *
110
111     d xmlNanoFTPCheckResponse...
112     d                 pr            10i 0 extproc('xmlNanoFTPCheckResponse')
113     d  ctx                            *   value                                void *
114
115      * CD/DIR/GET handlers.
116
117     d xmlNanoFTPCwd   pr            10i 0 extproc('xmlNanoFTPCwd')
118     d  ctx                            *   value                                void *
119     d  directory                      *   value options(*string)               const char *
120
121     d xmlNanoFTPDele  pr            10i 0 extproc('xmlNanoFTPDele')
122     d  ctx                            *   value                                void *
123     d  file                           *   value options(*string)               const char *
124
125     d xmlNanoFTPGetConnection...
126     d                 pr            10i 0 extproc('xmlNanoFTPGetConnection')   Socket descriptor
127     d  ctx                            *   value                                void *
128
129     d xmlNanoFTPCloseConnection...
130     d                 pr            10i 0 extproc('xmlNanoFTPCloseConnection')
131     d  ctx                            *   value                                void *
132
133     d xmlNanoFTPList  pr            10i 0 extproc('xmlNanoFTPList')
134     d  ctx                            *   value                                void *
135     d  callback                           value like(ftpListCallback)
136     d  userData                       *   value                                void *
137     d  filename                       *   value options(*string)               const char *
138
139     d xmlNanoFTPGetSocket...
140     d                 pr            10i 0 extproc('xmlNanoFTPGetSocket')       Socket descriptor
141     d  ctx                            *   value                                void *
142     d  filename                       *   value options(*string)               const char *
143
144     d xmlNanoFTPGet   pr            10i 0 extproc('xmlNanoFTPGet')
145     d  ctx                            *   value                                void *
146     d  callback                           value like(ftpDataCallback)
147     d  userData                       *   value                                void *
148     d  filename                       *   value options(*string)               const char *
149
150     d xmlNanoFTPRead  pr            10i 0 extproc('xmlNanoFTPRead')
151     d  ctx                            *   value                                void *
152     d  dest                           *   value                                void *
153     d  len                          10i 0 value
154
155      /endif                                                                    LIBXML_FTP_ENABLED
156      /endif                                                                    NANO_FTP_H__
157