Hash :
d7cec926
Author :
Date :
2003-06-13T12:30:10
reverted back patch for #113521, due to #115104 and while fixing #115101 . * doc/Makefile.am doc/html/*: reverted back patch for #113521, due to #115104 and while fixing #115101 . HTML URLs must not be version dependant. Daniel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>nanoftp</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css">
.synopsis, .classsynopsis {
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting {
background: #eeeeff;
border: solid 1px #aaaaff;
padding: 0.5em;
}
.variablelist {
padding: 4px;
margin-left: 3em;
}
.navigation {
background: #ffeeee;
border: solid 1px #ffaaaa;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.navigation a {
color: #770000;
}
.navigation a:visited {
color: #550000;
}
.navigation .title {
font-size: 200%;
}
</style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="libxml-lib.html" title="Libxml Library Reference"><link rel="previous" href="libxml-nanohttp.html" title="nanohttp"><link rel="next" href="libxml-xmlIO.html" title="xmlIO"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-nanohttp.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="libxml-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-xmlIO.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-nanoftp"></a><div class="titlepage"></div><div class="refnamediv"><h2>nanoftp</h2><p>nanoftp — </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
void (<a href="libxml-nanoftp.html#ftpListCallback">*ftpListCallback</a>) (void *userData,
const char *filename,
const char *attrib,
const char *owner,
const char *group,
unsigned <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="long-size">long size</GTKDOCLINK>,
int links,
int year,
const char *month,
int day,
int hour,
int minute);
void (<a href="libxml-nanoftp.html#ftpDataCallback">*ftpDataCallback</a>) (void *userData,
const char *data,
int len);
void <a href="libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a> (void);
void <a href="libxml-nanoftp.html#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a> (void);
void* <a href="libxml-nanoftp.html#xmlNanoFTPNewCtxt">xmlNanoFTPNewCtxt</a> (const char *URL);
void <a href="libxml-nanoftp.html#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a> (void *ctx);
void* <a href="libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a> (const char *server,
int port);
void* <a href="libxml-nanoftp.html#xmlNanoFTPOpen">xmlNanoFTPOpen</a> (const char *URL);
int <a href="libxml-nanoftp.html#xmlNanoFTPConnect">xmlNanoFTPConnect</a> (void *ctx);
int <a href="libxml-nanoftp.html#xmlNanoFTPClose">xmlNanoFTPClose</a> (void *ctx);
int <a href="libxml-nanoftp.html#xmlNanoFTPQuit">xmlNanoFTPQuit</a> (void *ctx);
void <a href="libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a> (const char *URL);
void <a href="libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a> (const char *host,
int port,
const char *user,
const char *passwd,
int type);
int <a href="libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a> (void *ctx,
const char *URL);
int <a href="libxml-nanoftp.html#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a> (void *ctx);
int <a href="libxml-nanoftp.html#xmlNanoFTPCheckResponse">xmlNanoFTPCheckResponse</a> (void *ctx);
int <a href="libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a> (void *ctx,
char *directory);
int <a href="libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a> (void *ctx,
char *file);
int <a href="libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a> (void *ctx);
int <a href="libxml-nanoftp.html#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a> (void *ctx);
int <a href="libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a> (void *ctx,
<a href="libxml-nanoftp.html#ftpListCallback">ftpListCallback</a> callback,
void *userData,
char *filename);
int <a href="libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a> (void *ctx,
const char *filename);
int <a href="libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a> (void *ctx,
<a href="libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a> callback,
void *userData,
const char *filename);
int <a href="libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a> (void *ctx,
void *dest,
int len);
</pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
</p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="ftpListCallback"></a>ftpListCallback ()</h3><pre class="programlisting">void (*ftpListCallback) (void *userData,
const char *filename,
const char *attrib,
const char *owner,
const char *group,
unsigned <GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="long-size">long size</GTKDOCLINK>,
int links,
int year,
const char *month,
int day,
int hour,
int minute);</pre><p>
A callback for the xmlNanoFTPList command.
Note that only one of year and day:minute are specified.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>userData</tt></i> :</span></td><td> user provided data for the callback
</td></tr><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the file name (including "->" when links are shown)
</td></tr><tr><td><span class="term"><i><tt>attrib</tt></i> :</span></td><td> the attribute string
</td></tr><tr><td><span class="term"><i><tt>owner</tt></i> :</span></td><td> the owner string
</td></tr><tr><td><span class="term"><i><tt>group</tt></i> :</span></td><td> the group string
</td></tr><tr><td><span class="term"><i><tt>Param6</tt></i> :</span></td><td>
</td></tr><tr><td><span class="term"><i><tt>links</tt></i> :</span></td><td> the link count
</td></tr><tr><td><span class="term"><i><tt>year</tt></i> :</span></td><td> the year
</td></tr><tr><td><span class="term"><i><tt>month</tt></i> :</span></td><td> the month
</td></tr><tr><td><span class="term"><i><tt>day</tt></i> :</span></td><td> the day
</td></tr><tr><td><span class="term"><i><tt>hour</tt></i> :</span></td><td> the hour
</td></tr><tr><td><span class="term"><i><tt>minute</tt></i> :</span></td><td> the minute
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="ftpDataCallback"></a>ftpDataCallback ()</h3><pre class="programlisting">void (*ftpDataCallback) (void *userData,
const char *data,
int len);</pre><p>
A callback for the xmlNanoFTPGet command.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>userData</tt></i> :</span></td><td> the user provided context
</td></tr><tr><td><span class="term"><i><tt>data</tt></i> :</span></td><td> the data received
</td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> its size in bytes
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPInit"></a>xmlNanoFTPInit ()</h3><pre class="programlisting">void xmlNanoFTPInit (void);</pre><p>
Initialize the FTP protocol layer.
Currently it just checks for proxy informations,
and get the hostname</p><p>
</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPCleanup"></a>xmlNanoFTPCleanup ()</h3><pre class="programlisting">void xmlNanoFTPCleanup (void);</pre><p>
Cleanup the FTP protocol layer. This cleanup proxy informations.</p><p>
</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPNewCtxt"></a>xmlNanoFTPNewCtxt ()</h3><pre class="programlisting">void* xmlNanoFTPNewCtxt (const char *URL);</pre><p>
Allocate and initialize a new FTP context.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>URL</tt></i> :</span></td><td> The URL used to initialize the context
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPFreeCtxt"></a>xmlNanoFTPFreeCtxt ()</h3><pre class="programlisting">void xmlNanoFTPFreeCtxt (void *ctx);</pre><p>
Frees the context after closing the connection.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPConnectTo"></a>xmlNanoFTPConnectTo ()</h3><pre class="programlisting">void* xmlNanoFTPConnectTo (const char *server,
int port);</pre><p>
Tries to open a control connection to the given server/port</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>server</tt></i> :</span></td><td> an FTP server name
</td></tr><tr><td><span class="term"><i><tt>port</tt></i> :</span></td><td> the port (use 21 if 0)
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPOpen"></a>xmlNanoFTPOpen ()</h3><pre class="programlisting">void* xmlNanoFTPOpen (const char *URL);</pre><p>
Start to fetch the given ftp:// resource</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>URL</tt></i> :</span></td><td> the URL to the resource
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPConnect"></a>xmlNanoFTPConnect ()</h3><pre class="programlisting">int xmlNanoFTPConnect (void *ctx);</pre><p>
Tries to open a control connection</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 in case of error, 0 otherwise
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPClose"></a>xmlNanoFTPClose ()</h3><pre class="programlisting">int xmlNanoFTPClose (void *ctx);</pre><p>
Close the connection and both control and transport</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 incase of error, 0 otherwise
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPQuit"></a>xmlNanoFTPQuit ()</h3><pre class="programlisting">int xmlNanoFTPQuit (void *ctx);</pre><p>
Send a QUIT command to the server</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 in case of error, 0 otherwise
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPScanProxy"></a>xmlNanoFTPScanProxy ()</h3><pre class="programlisting">void xmlNanoFTPScanProxy (const char *URL);</pre><p>
(Re)Initialize the FTP Proxy context by parsing the URL and finding
the protocol host port it indicates.
Should be like ftp://myproxy/ or ftp://myproxy:3128/
A NULL URL cleans up proxy informations.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>URL</tt></i> :</span></td><td> The proxy URL used to initialize the proxy context
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPProxy"></a>xmlNanoFTPProxy ()</h3><pre class="programlisting">void xmlNanoFTPProxy (const char *host,
int port,
const char *user,
const char *passwd,
int type);</pre><p>
Setup the FTP proxy informations.
This can also be done by using ftp_proxy ftp_proxy_user and
ftp_proxy_password environment variables.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>host</tt></i> :</span></td><td> the proxy host name
</td></tr><tr><td><span class="term"><i><tt>port</tt></i> :</span></td><td> the proxy port
</td></tr><tr><td><span class="term"><i><tt>user</tt></i> :</span></td><td> the proxy user name
</td></tr><tr><td><span class="term"><i><tt>passwd</tt></i> :</span></td><td> the proxy password
</td></tr><tr><td><span class="term"><i><tt>type</tt></i> :</span></td><td> the type of proxy 1 for using SITE, 2 for USER a<i><tt>b</tt></i>
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPUpdateURL"></a>xmlNanoFTPUpdateURL ()</h3><pre class="programlisting">int xmlNanoFTPUpdateURL (void *ctx,
const char *URL);</pre><p>
Update an FTP context by parsing the URL and finding
new path it indicates. If there is an error in the
protocol, hostname, port or other information, the
error is raised. It indicates a new connection has to
be established.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><i><tt>URL</tt></i> :</span></td><td> The URL used to update the context
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 if Ok, -1 in case of error (other host).
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPGetResponse"></a>xmlNanoFTPGetResponse ()</h3><pre class="programlisting">int xmlNanoFTPGetResponse (void *ctx);</pre><p>
Get the response from the FTP server after a command.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the code number
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPCheckResponse"></a>xmlNanoFTPCheckResponse ()</h3><pre class="programlisting">int xmlNanoFTPCheckResponse (void *ctx);</pre><p>
Check if there is a response from the FTP server after a command.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the code number, or 0
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPCwd"></a>xmlNanoFTPCwd ()</h3><pre class="programlisting">int xmlNanoFTPCwd (void *ctx,
char *directory);</pre><p>
Tries to change the remote directory</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><i><tt>directory</tt></i> :</span></td><td> a directory on the server
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 incase of error, 1 if CWD worked, 0 if it failed
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPDele"></a>xmlNanoFTPDele ()</h3><pre class="programlisting">int xmlNanoFTPDele (void *ctx,
char *file);</pre><p>
Tries to delete an item (file or directory) from server</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><i><tt>file</tt></i> :</span></td><td> a file or directory on the server
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 incase of error, 1 if DELE worked, 0 if it failed
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPGetConnection"></a>xmlNanoFTPGetConnection ()</h3><pre class="programlisting">int xmlNanoFTPGetConnection (void *ctx);</pre><p>
Try to open a data connection to the server. Currently only
passive mode is supported.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 incase of error, 0 otherwise
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPCloseConnection"></a>xmlNanoFTPCloseConnection ()</h3><pre class="programlisting">int xmlNanoFTPCloseConnection (void *ctx);</pre><p>
Close the data connection from the server</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 incase of error, 0 otherwise
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPList"></a>xmlNanoFTPList ()</h3><pre class="programlisting">int xmlNanoFTPList (void *ctx,
<a href="libxml-nanoftp.html#ftpListCallback">ftpListCallback</a> callback,
void *userData,
char *filename);</pre><p>
Do a listing on the server. All files info are passed back
in the callbacks.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><i><tt>callback</tt></i> :</span></td><td> the user callback
</td></tr><tr><td><span class="term"><i><tt>userData</tt></i> :</span></td><td> the user callback data
</td></tr><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> optional files to list
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 incase of error, 0 otherwise
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPGetSocket"></a>xmlNanoFTPGetSocket ()</h3><pre class="programlisting">int xmlNanoFTPGetSocket (void *ctx,
const char *filename);</pre><p>
Initiate fetch of the given file from the server.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the file to retrieve (or NULL if path is in context).
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the socket for the data connection, or <0 in case of error
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPGet"></a>xmlNanoFTPGet ()</h3><pre class="programlisting">int xmlNanoFTPGet (void *ctx,
<a href="libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a> callback,
void *userData,
const char *filename);</pre><p>
Fetch the given file from the server. All data are passed back
in the callbacks. The last callback has a size of 0 block.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> an FTP context
</td></tr><tr><td><span class="term"><i><tt>callback</tt></i> :</span></td><td> the user callback
</td></tr><tr><td><span class="term"><i><tt>userData</tt></i> :</span></td><td> the user callback data
</td></tr><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td> the file to retrieve
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 incase of error, 0 otherwise
</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNanoFTPRead"></a>xmlNanoFTPRead ()</h3><pre class="programlisting">int xmlNanoFTPRead (void *ctx,
void *dest,
int len);</pre><p>
This function tries to read <i><tt>len</tt></i> bytes from the existing FTP connection
and saves them in <i><tt>dest</tt></i>. This is a blocking call.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> the FTP context
</td></tr><tr><td><span class="term"><i><tt>dest</tt></i> :</span></td><td> a buffer
</td></tr><tr><td><span class="term"><i><tt>len</tt></i> :</span></td><td> the buffer length
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of byte read. 0 is an indication of an end of connection.
-1 indicates a parameter error.
</td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-nanohttp.html"><b><< nanohttp</b></a></td><td align="right"><a accesskey="n" href="libxml-xmlIO.html"><b>xmlIO >></b></a></td></tr></table></body></html>