1*7c568831SAndroid Build Coastguard Worker<html> 2*7c568831SAndroid Build Coastguard Worker<head> 3*7c568831SAndroid Build Coastguard Worker<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4*7c568831SAndroid Build Coastguard Worker<title>nanoftp: minimal FTP implementation</title> 5*7c568831SAndroid Build Coastguard Worker<meta name="generator" content="Libxml2 devhelp stylesheet"> 6*7c568831SAndroid Build Coastguard Worker<link rel="start" href="index.html" title="libxml2 Reference Manual"> 7*7c568831SAndroid Build Coastguard Worker<link rel="up" href="general.html" title="API"> 8*7c568831SAndroid Build Coastguard Worker<link rel="stylesheet" href="style.css" type="text/css"> 9*7c568831SAndroid Build Coastguard Worker<link rel="chapter" href="general.html" title="API"> 10*7c568831SAndroid Build Coastguard Worker</head> 11*7c568831SAndroid Build Coastguard Worker<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 12*7c568831SAndroid Build Coastguard Worker<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> 13*7c568831SAndroid Build Coastguard Worker<td><a accesskey="p" href="libxml2-list.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> 14*7c568831SAndroid Build Coastguard Worker<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> 15*7c568831SAndroid Build Coastguard Worker<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> 16*7c568831SAndroid Build Coastguard Worker<td><a accesskey="n" href="libxml2-nanohttp.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> 17*7c568831SAndroid Build Coastguard Worker<th width="100%" align="center">libxml2 Reference Manual</th> 18*7c568831SAndroid Build Coastguard Worker</tr></table> 19*7c568831SAndroid Build Coastguard Worker<h2><span class="refentrytitle">nanoftp</span></h2> 20*7c568831SAndroid Build Coastguard Worker<p>nanoftp - minimal FTP implementation</p> 21*7c568831SAndroid Build Coastguard Worker<p>minimal FTP implementation allowing to fetch resources like external subset. This module is DEPRECATED, do not use any of its functions. </p> 22*7c568831SAndroid Build Coastguard Worker<p> WARNING: this module is deprecated !</p> 23*7c568831SAndroid Build Coastguard Worker<p>Author(s): Daniel Veillard </p> 24*7c568831SAndroid Build Coastguard Worker<div class="refsynopsisdiv"> 25*7c568831SAndroid Build Coastguard Worker<h2>Synopsis</h2> 26*7c568831SAndroid Build Coastguard Worker<pre class="synopsis">#define <a href="#INVALID_SOCKET">INVALID_SOCKET</a>; 27*7c568831SAndroid Build Coastguard Worker#define <a href="#SOCKET">SOCKET</a>; 28*7c568831SAndroid Build Coastguard Workertypedef void <a href="#ftpDataCallback">ftpDataCallback</a> (void * userData, <br> const char * data, <br> int len); 29*7c568831SAndroid Build Coastguard Workertypedef void <a href="#ftpListCallback">ftpListCallback</a> (void * userData, <br> const char * filename, <br> const char * attrib, <br> const char * owner, <br> const char * group, <br> unsigned long size, <br> int links, <br> int year, <br> const char * month, <br> int day, <br> int hour, <br> int minute); 30*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPCheckResponse">xmlNanoFTPCheckResponse</a> (void * ctx); 31*7c568831SAndroid Build Coastguard Workervoid <a href="#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a> (void); 32*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPClose">xmlNanoFTPClose</a> (void * ctx); 33*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a> (void * ctx); 34*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPConnect">xmlNanoFTPConnect</a> (void * ctx); 35*7c568831SAndroid Build Coastguard Workervoid * <a href="#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a> (const char * server, <br> int port); 36*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPCwd">xmlNanoFTPCwd</a> (void * ctx, <br> const char * directory); 37*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPDele">xmlNanoFTPDele</a> (void * ctx, <br> const char * file); 38*7c568831SAndroid Build Coastguard Workervoid <a href="#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a> (void * ctx); 39*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPGet">xmlNanoFTPGet</a> (void * ctx, <br> <a href="libxml2-nanoftp.html#ftpDataCallback">ftpDataCallback</a> callback, <br> void * userData, <br> const char * filename); 40*7c568831SAndroid Build Coastguard Worker<a href="libxml2-nanoftp.html#SOCKET">SOCKET</a> <a href="#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a> (void * ctx); 41*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a> (void * ctx); 42*7c568831SAndroid Build Coastguard Worker<a href="libxml2-nanoftp.html#SOCKET">SOCKET</a> <a href="#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a> (void * ctx, <br> const char * filename); 43*7c568831SAndroid Build Coastguard Workervoid <a href="#xmlNanoFTPInit">xmlNanoFTPInit</a> (void); 44*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPList">xmlNanoFTPList</a> (void * ctx, <br> <a href="libxml2-nanoftp.html#ftpListCallback">ftpListCallback</a> callback, <br> void * userData, <br> const char * filename); 45*7c568831SAndroid Build Coastguard Workervoid * <a href="#xmlNanoFTPNewCtxt">xmlNanoFTPNewCtxt</a> (const char * URL); 46*7c568831SAndroid Build Coastguard Workervoid * <a href="#xmlNanoFTPOpen">xmlNanoFTPOpen</a> (const char * URL); 47*7c568831SAndroid Build Coastguard Workervoid <a href="#xmlNanoFTPProxy">xmlNanoFTPProxy</a> (const char * host, <br> int port, <br> const char * user, <br> const char * passwd, <br> int type); 48*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPQuit">xmlNanoFTPQuit</a> (void * ctx); 49*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPRead">xmlNanoFTPRead</a> (void * ctx, <br> void * dest, <br> int len); 50*7c568831SAndroid Build Coastguard Workervoid <a href="#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a> (const char * URL); 51*7c568831SAndroid Build Coastguard Workerint <a href="#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a> (void * ctx, <br> const char * URL); 52*7c568831SAndroid Build Coastguard Worker</pre> 53*7c568831SAndroid Build Coastguard Worker</div> 54*7c568831SAndroid Build Coastguard Worker<div class="refsect1" lang="en"><h2>Description</h2></div> 55*7c568831SAndroid Build Coastguard Worker<div class="refsect1" lang="en"> 56*7c568831SAndroid Build Coastguard Worker<h2>Details</h2> 57*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 58*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 59*7c568831SAndroid Build Coastguard Worker<h3> 60*7c568831SAndroid Build Coastguard Worker<a name="INVALID_SOCKET">Macro </a>INVALID_SOCKET</h3> 61*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">#define <a href="#INVALID_SOCKET">INVALID_SOCKET</a>; 62*7c568831SAndroid Build Coastguard Worker</pre> 63*7c568831SAndroid Build Coastguard Worker<p>macro used to provide portability of code to windows sockets the value to be used when the socket is not valid</p> 64*7c568831SAndroid Build Coastguard Worker</div> 65*7c568831SAndroid Build Coastguard Worker<hr> 66*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 67*7c568831SAndroid Build Coastguard Worker<h3> 68*7c568831SAndroid Build Coastguard Worker<a name="SOCKET">Macro </a>SOCKET</h3> 69*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">#define <a href="#SOCKET">SOCKET</a>; 70*7c568831SAndroid Build Coastguard Worker</pre> 71*7c568831SAndroid Build Coastguard Worker<p>macro used to provide portability of code to windows sockets</p> 72*7c568831SAndroid Build Coastguard Worker</div> 73*7c568831SAndroid Build Coastguard Worker<hr> 74*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 75*7c568831SAndroid Build Coastguard Worker<h3> 76*7c568831SAndroid Build Coastguard Worker<a name="ftpDataCallback"></a>Function type ftpDataCallback</h3> 77*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void ftpDataCallback (void * userData, <br> const char * data, <br> int len)<br> 78*7c568831SAndroid Build Coastguard Worker</pre> 79*7c568831SAndroid Build Coastguard Worker<p>A callback for the <a href="libxml2-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a> command.</p> 80*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 81*7c568831SAndroid Build Coastguard Worker<col align="left"> 82*7c568831SAndroid Build Coastguard Worker<tbody> 83*7c568831SAndroid Build Coastguard Worker<tr> 84*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>userData</tt></i>:</span></td> 85*7c568831SAndroid Build Coastguard Worker<td>the user provided context</td> 86*7c568831SAndroid Build Coastguard Worker</tr> 87*7c568831SAndroid Build Coastguard Worker<tr> 88*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>data</tt></i>:</span></td> 89*7c568831SAndroid Build Coastguard Worker<td>the data received</td> 90*7c568831SAndroid Build Coastguard Worker</tr> 91*7c568831SAndroid Build Coastguard Worker<tr> 92*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>len</tt></i>:</span></td> 93*7c568831SAndroid Build Coastguard Worker<td>its size in bytes</td> 94*7c568831SAndroid Build Coastguard Worker</tr> 95*7c568831SAndroid Build Coastguard Worker</tbody> 96*7c568831SAndroid Build Coastguard Worker</table></div> 97*7c568831SAndroid Build Coastguard Worker</div> 98*7c568831SAndroid Build Coastguard Worker<hr> 99*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 100*7c568831SAndroid Build Coastguard Worker<h3> 101*7c568831SAndroid Build Coastguard Worker<a name="ftpListCallback"></a>Function type ftpListCallback</h3> 102*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void ftpListCallback (void * userData, <br> const char * filename, <br> const char * attrib, <br> const char * owner, <br> const char * group, <br> unsigned long size, <br> int links, <br> int year, <br> const char * month, <br> int day, <br> int hour, <br> int minute)<br> 103*7c568831SAndroid Build Coastguard Worker</pre> 104*7c568831SAndroid Build Coastguard Worker<p>A callback for the <a href="libxml2-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a> command. Note that only one of year and day:minute are specified.</p> 105*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 106*7c568831SAndroid Build Coastguard Worker<col align="left"> 107*7c568831SAndroid Build Coastguard Worker<tbody> 108*7c568831SAndroid Build Coastguard Worker<tr> 109*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>userData</tt></i>:</span></td> 110*7c568831SAndroid Build Coastguard Worker<td>user provided data for the callback</td> 111*7c568831SAndroid Build Coastguard Worker</tr> 112*7c568831SAndroid Build Coastguard Worker<tr> 113*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>filename</tt></i>:</span></td> 114*7c568831SAndroid Build Coastguard Worker<td>the file name (including "->" when links are shown)</td> 115*7c568831SAndroid Build Coastguard Worker</tr> 116*7c568831SAndroid Build Coastguard Worker<tr> 117*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>attrib</tt></i>:</span></td> 118*7c568831SAndroid Build Coastguard Worker<td>the <a href="libxml2-SAX.html#attribute">attribute</a> string</td> 119*7c568831SAndroid Build Coastguard Worker</tr> 120*7c568831SAndroid Build Coastguard Worker<tr> 121*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>owner</tt></i>:</span></td> 122*7c568831SAndroid Build Coastguard Worker<td>the owner string</td> 123*7c568831SAndroid Build Coastguard Worker</tr> 124*7c568831SAndroid Build Coastguard Worker<tr> 125*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>group</tt></i>:</span></td> 126*7c568831SAndroid Build Coastguard Worker<td>the group string</td> 127*7c568831SAndroid Build Coastguard Worker</tr> 128*7c568831SAndroid Build Coastguard Worker<tr> 129*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>size</tt></i>:</span></td> 130*7c568831SAndroid Build Coastguard Worker<td>the file size</td> 131*7c568831SAndroid Build Coastguard Worker</tr> 132*7c568831SAndroid Build Coastguard Worker<tr> 133*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>links</tt></i>:</span></td> 134*7c568831SAndroid Build Coastguard Worker<td>the link count</td> 135*7c568831SAndroid Build Coastguard Worker</tr> 136*7c568831SAndroid Build Coastguard Worker<tr> 137*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>year</tt></i>:</span></td> 138*7c568831SAndroid Build Coastguard Worker<td>the year</td> 139*7c568831SAndroid Build Coastguard Worker</tr> 140*7c568831SAndroid Build Coastguard Worker<tr> 141*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>month</tt></i>:</span></td> 142*7c568831SAndroid Build Coastguard Worker<td>the month</td> 143*7c568831SAndroid Build Coastguard Worker</tr> 144*7c568831SAndroid Build Coastguard Worker<tr> 145*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>day</tt></i>:</span></td> 146*7c568831SAndroid Build Coastguard Worker<td>the day</td> 147*7c568831SAndroid Build Coastguard Worker</tr> 148*7c568831SAndroid Build Coastguard Worker<tr> 149*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>hour</tt></i>:</span></td> 150*7c568831SAndroid Build Coastguard Worker<td>the hour</td> 151*7c568831SAndroid Build Coastguard Worker</tr> 152*7c568831SAndroid Build Coastguard Worker<tr> 153*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>minute</tt></i>:</span></td> 154*7c568831SAndroid Build Coastguard Worker<td>the minute</td> 155*7c568831SAndroid Build Coastguard Worker</tr> 156*7c568831SAndroid Build Coastguard Worker</tbody> 157*7c568831SAndroid Build Coastguard Worker</table></div> 158*7c568831SAndroid Build Coastguard Worker</div> 159*7c568831SAndroid Build Coastguard Worker<hr> 160*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 161*7c568831SAndroid Build Coastguard Worker<h3> 162*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPCheckResponse"></a>xmlNanoFTPCheckResponse ()</h3> 163*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPCheckResponse (void * ctx)<br> 164*7c568831SAndroid Build Coastguard Worker</pre> 165*7c568831SAndroid Build Coastguard Worker<p>Check if there is a response from the FTP server after a command.</p> 166*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 167*7c568831SAndroid Build Coastguard Worker<col align="left"> 168*7c568831SAndroid Build Coastguard Worker<tbody> 169*7c568831SAndroid Build Coastguard Worker<tr> 170*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 171*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 172*7c568831SAndroid Build Coastguard Worker</tr> 173*7c568831SAndroid Build Coastguard Worker<tr> 174*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 175*7c568831SAndroid Build Coastguard Worker<td>the code number, or 0</td> 176*7c568831SAndroid Build Coastguard Worker</tr> 177*7c568831SAndroid Build Coastguard Worker</tbody> 178*7c568831SAndroid Build Coastguard Worker</table></div> 179*7c568831SAndroid Build Coastguard Worker</div> 180*7c568831SAndroid Build Coastguard Worker<hr> 181*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 182*7c568831SAndroid Build Coastguard Worker<h3> 183*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPCleanup"></a>xmlNanoFTPCleanup ()</h3> 184*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlNanoFTPCleanup (void)<br> 185*7c568831SAndroid Build Coastguard Worker</pre> 186*7c568831SAndroid Build Coastguard Worker<p>Cleanup the FTP protocol layer. This cleanup proxy information.</p> 187*7c568831SAndroid Build Coastguard Worker</div> 188*7c568831SAndroid Build Coastguard Worker<hr> 189*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 190*7c568831SAndroid Build Coastguard Worker<h3> 191*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPClose"></a>xmlNanoFTPClose ()</h3> 192*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPClose (void * ctx)<br> 193*7c568831SAndroid Build Coastguard Worker</pre> 194*7c568831SAndroid Build Coastguard Worker<p>Close the connection and both control and transport</p> 195*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 196*7c568831SAndroid Build Coastguard Worker<col align="left"> 197*7c568831SAndroid Build Coastguard Worker<tbody> 198*7c568831SAndroid Build Coastguard Worker<tr> 199*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 200*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 201*7c568831SAndroid Build Coastguard Worker</tr> 202*7c568831SAndroid Build Coastguard Worker<tr> 203*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 204*7c568831SAndroid Build Coastguard Worker<td>-1 in case of error, 0 otherwise</td> 205*7c568831SAndroid Build Coastguard Worker</tr> 206*7c568831SAndroid Build Coastguard Worker</tbody> 207*7c568831SAndroid Build Coastguard Worker</table></div> 208*7c568831SAndroid Build Coastguard Worker</div> 209*7c568831SAndroid Build Coastguard Worker<hr> 210*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 211*7c568831SAndroid Build Coastguard Worker<h3> 212*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPCloseConnection"></a>xmlNanoFTPCloseConnection ()</h3> 213*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPCloseConnection (void * ctx)<br> 214*7c568831SAndroid Build Coastguard Worker</pre> 215*7c568831SAndroid Build Coastguard Worker<p>Close the data connection from the server</p> 216*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 217*7c568831SAndroid Build Coastguard Worker<col align="left"> 218*7c568831SAndroid Build Coastguard Worker<tbody> 219*7c568831SAndroid Build Coastguard Worker<tr> 220*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 221*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 222*7c568831SAndroid Build Coastguard Worker</tr> 223*7c568831SAndroid Build Coastguard Worker<tr> 224*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 225*7c568831SAndroid Build Coastguard Worker<td>-1 in case of error, 0 otherwise</td> 226*7c568831SAndroid Build Coastguard Worker</tr> 227*7c568831SAndroid Build Coastguard Worker</tbody> 228*7c568831SAndroid Build Coastguard Worker</table></div> 229*7c568831SAndroid Build Coastguard Worker</div> 230*7c568831SAndroid Build Coastguard Worker<hr> 231*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 232*7c568831SAndroid Build Coastguard Worker<h3> 233*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPConnect"></a>xmlNanoFTPConnect ()</h3> 234*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPConnect (void * ctx)<br> 235*7c568831SAndroid Build Coastguard Worker</pre> 236*7c568831SAndroid Build Coastguard Worker<p>Tries to open a control connection</p> 237*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 238*7c568831SAndroid Build Coastguard Worker<col align="left"> 239*7c568831SAndroid Build Coastguard Worker<tbody> 240*7c568831SAndroid Build Coastguard Worker<tr> 241*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 242*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 243*7c568831SAndroid Build Coastguard Worker</tr> 244*7c568831SAndroid Build Coastguard Worker<tr> 245*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 246*7c568831SAndroid Build Coastguard Worker<td>-1 in case of error, 0 otherwise</td> 247*7c568831SAndroid Build Coastguard Worker</tr> 248*7c568831SAndroid Build Coastguard Worker</tbody> 249*7c568831SAndroid Build Coastguard Worker</table></div> 250*7c568831SAndroid Build Coastguard Worker</div> 251*7c568831SAndroid Build Coastguard Worker<hr> 252*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 253*7c568831SAndroid Build Coastguard Worker<h3> 254*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPConnectTo"></a>xmlNanoFTPConnectTo ()</h3> 255*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void * xmlNanoFTPConnectTo (const char * server, <br> int port)<br> 256*7c568831SAndroid Build Coastguard Worker</pre> 257*7c568831SAndroid Build Coastguard Worker<p>Tries to open a control connection to the given server/port</p> 258*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 259*7c568831SAndroid Build Coastguard Worker<col align="left"> 260*7c568831SAndroid Build Coastguard Worker<tbody> 261*7c568831SAndroid Build Coastguard Worker<tr> 262*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>server</tt></i>:</span></td> 263*7c568831SAndroid Build Coastguard Worker<td>an FTP server name</td> 264*7c568831SAndroid Build Coastguard Worker</tr> 265*7c568831SAndroid Build Coastguard Worker<tr> 266*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>port</tt></i>:</span></td> 267*7c568831SAndroid Build Coastguard Worker<td>the port (use 21 if 0)</td> 268*7c568831SAndroid Build Coastguard Worker</tr> 269*7c568831SAndroid Build Coastguard Worker<tr> 270*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 271*7c568831SAndroid Build Coastguard Worker<td>an fTP context or NULL if it failed</td> 272*7c568831SAndroid Build Coastguard Worker</tr> 273*7c568831SAndroid Build Coastguard Worker</tbody> 274*7c568831SAndroid Build Coastguard Worker</table></div> 275*7c568831SAndroid Build Coastguard Worker</div> 276*7c568831SAndroid Build Coastguard Worker<hr> 277*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 278*7c568831SAndroid Build Coastguard Worker<h3> 279*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPCwd"></a>xmlNanoFTPCwd ()</h3> 280*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPCwd (void * ctx, <br> const char * directory)<br> 281*7c568831SAndroid Build Coastguard Worker</pre> 282*7c568831SAndroid Build Coastguard Worker<p>Tries to change the remote directory</p> 283*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 284*7c568831SAndroid Build Coastguard Worker<col align="left"> 285*7c568831SAndroid Build Coastguard Worker<tbody> 286*7c568831SAndroid Build Coastguard Worker<tr> 287*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 288*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 289*7c568831SAndroid Build Coastguard Worker</tr> 290*7c568831SAndroid Build Coastguard Worker<tr> 291*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>directory</tt></i>:</span></td> 292*7c568831SAndroid Build Coastguard Worker<td>a directory on the server</td> 293*7c568831SAndroid Build Coastguard Worker</tr> 294*7c568831SAndroid Build Coastguard Worker<tr> 295*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 296*7c568831SAndroid Build Coastguard Worker<td>-1 in case of error, 1 if CWD worked, 0 if it failed</td> 297*7c568831SAndroid Build Coastguard Worker</tr> 298*7c568831SAndroid Build Coastguard Worker</tbody> 299*7c568831SAndroid Build Coastguard Worker</table></div> 300*7c568831SAndroid Build Coastguard Worker</div> 301*7c568831SAndroid Build Coastguard Worker<hr> 302*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 303*7c568831SAndroid Build Coastguard Worker<h3> 304*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPDele"></a>xmlNanoFTPDele ()</h3> 305*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPDele (void * ctx, <br> const char * file)<br> 306*7c568831SAndroid Build Coastguard Worker</pre> 307*7c568831SAndroid Build Coastguard Worker<p>Tries to delete an item (file or directory) from server</p> 308*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 309*7c568831SAndroid Build Coastguard Worker<col align="left"> 310*7c568831SAndroid Build Coastguard Worker<tbody> 311*7c568831SAndroid Build Coastguard Worker<tr> 312*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 313*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 314*7c568831SAndroid Build Coastguard Worker</tr> 315*7c568831SAndroid Build Coastguard Worker<tr> 316*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>file</tt></i>:</span></td> 317*7c568831SAndroid Build Coastguard Worker<td>a file or directory on the server</td> 318*7c568831SAndroid Build Coastguard Worker</tr> 319*7c568831SAndroid Build Coastguard Worker<tr> 320*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 321*7c568831SAndroid Build Coastguard Worker<td>-1 in case of error, 1 if DELE worked, 0 if it failed</td> 322*7c568831SAndroid Build Coastguard Worker</tr> 323*7c568831SAndroid Build Coastguard Worker</tbody> 324*7c568831SAndroid Build Coastguard Worker</table></div> 325*7c568831SAndroid Build Coastguard Worker</div> 326*7c568831SAndroid Build Coastguard Worker<hr> 327*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 328*7c568831SAndroid Build Coastguard Worker<h3> 329*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPFreeCtxt"></a>xmlNanoFTPFreeCtxt ()</h3> 330*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlNanoFTPFreeCtxt (void * ctx)<br> 331*7c568831SAndroid Build Coastguard Worker</pre> 332*7c568831SAndroid Build Coastguard Worker<p>Frees the context after closing the connection.</p> 333*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 334*7c568831SAndroid Build Coastguard Worker<col align="left"> 335*7c568831SAndroid Build Coastguard Worker<tbody><tr> 336*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 337*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 338*7c568831SAndroid Build Coastguard Worker</tr></tbody> 339*7c568831SAndroid Build Coastguard Worker</table></div> 340*7c568831SAndroid Build Coastguard Worker</div> 341*7c568831SAndroid Build Coastguard Worker<hr> 342*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 343*7c568831SAndroid Build Coastguard Worker<h3> 344*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPGet"></a>xmlNanoFTPGet ()</h3> 345*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPGet (void * ctx, <br> <a href="libxml2-nanoftp.html#ftpDataCallback">ftpDataCallback</a> callback, <br> void * userData, <br> const char * filename)<br> 346*7c568831SAndroid Build Coastguard Worker</pre> 347*7c568831SAndroid Build Coastguard Worker<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> 348*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 349*7c568831SAndroid Build Coastguard Worker<col align="left"> 350*7c568831SAndroid Build Coastguard Worker<tbody> 351*7c568831SAndroid Build Coastguard Worker<tr> 352*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 353*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 354*7c568831SAndroid Build Coastguard Worker</tr> 355*7c568831SAndroid Build Coastguard Worker<tr> 356*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>callback</tt></i>:</span></td> 357*7c568831SAndroid Build Coastguard Worker<td>the user callback</td> 358*7c568831SAndroid Build Coastguard Worker</tr> 359*7c568831SAndroid Build Coastguard Worker<tr> 360*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>userData</tt></i>:</span></td> 361*7c568831SAndroid Build Coastguard Worker<td>the user callback data</td> 362*7c568831SAndroid Build Coastguard Worker</tr> 363*7c568831SAndroid Build Coastguard Worker<tr> 364*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>filename</tt></i>:</span></td> 365*7c568831SAndroid Build Coastguard Worker<td>the file to retrieve</td> 366*7c568831SAndroid Build Coastguard Worker</tr> 367*7c568831SAndroid Build Coastguard Worker<tr> 368*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 369*7c568831SAndroid Build Coastguard Worker<td>-1 in case of error, 0 otherwise</td> 370*7c568831SAndroid Build Coastguard Worker</tr> 371*7c568831SAndroid Build Coastguard Worker</tbody> 372*7c568831SAndroid Build Coastguard Worker</table></div> 373*7c568831SAndroid Build Coastguard Worker</div> 374*7c568831SAndroid Build Coastguard Worker<hr> 375*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 376*7c568831SAndroid Build Coastguard Worker<h3> 377*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPGetConnection"></a>xmlNanoFTPGetConnection ()</h3> 378*7c568831SAndroid Build Coastguard Worker<pre class="programlisting"><a href="libxml2-nanoftp.html#SOCKET">SOCKET</a> xmlNanoFTPGetConnection (void * ctx)<br> 379*7c568831SAndroid Build Coastguard Worker</pre> 380*7c568831SAndroid Build Coastguard Worker<p>Try to open a data connection to the server. Currently only passive mode is supported.</p> 381*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 382*7c568831SAndroid Build Coastguard Worker<col align="left"> 383*7c568831SAndroid Build Coastguard Worker<tbody> 384*7c568831SAndroid Build Coastguard Worker<tr> 385*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 386*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 387*7c568831SAndroid Build Coastguard Worker</tr> 388*7c568831SAndroid Build Coastguard Worker<tr> 389*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 390*7c568831SAndroid Build Coastguard Worker<td>-1 in case of error, 0 otherwise</td> 391*7c568831SAndroid Build Coastguard Worker</tr> 392*7c568831SAndroid Build Coastguard Worker</tbody> 393*7c568831SAndroid Build Coastguard Worker</table></div> 394*7c568831SAndroid Build Coastguard Worker</div> 395*7c568831SAndroid Build Coastguard Worker<hr> 396*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 397*7c568831SAndroid Build Coastguard Worker<h3> 398*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPGetResponse"></a>xmlNanoFTPGetResponse ()</h3> 399*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPGetResponse (void * ctx)<br> 400*7c568831SAndroid Build Coastguard Worker</pre> 401*7c568831SAndroid Build Coastguard Worker<p>Get the response from the FTP server after a command.</p> 402*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 403*7c568831SAndroid Build Coastguard Worker<col align="left"> 404*7c568831SAndroid Build Coastguard Worker<tbody> 405*7c568831SAndroid Build Coastguard Worker<tr> 406*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 407*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 408*7c568831SAndroid Build Coastguard Worker</tr> 409*7c568831SAndroid Build Coastguard Worker<tr> 410*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 411*7c568831SAndroid Build Coastguard Worker<td>the code number</td> 412*7c568831SAndroid Build Coastguard Worker</tr> 413*7c568831SAndroid Build Coastguard Worker</tbody> 414*7c568831SAndroid Build Coastguard Worker</table></div> 415*7c568831SAndroid Build Coastguard Worker</div> 416*7c568831SAndroid Build Coastguard Worker<hr> 417*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 418*7c568831SAndroid Build Coastguard Worker<h3> 419*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPGetSocket"></a>xmlNanoFTPGetSocket ()</h3> 420*7c568831SAndroid Build Coastguard Worker<pre class="programlisting"><a href="libxml2-nanoftp.html#SOCKET">SOCKET</a> xmlNanoFTPGetSocket (void * ctx, <br> const char * filename)<br> 421*7c568831SAndroid Build Coastguard Worker</pre> 422*7c568831SAndroid Build Coastguard Worker<p>Initiate fetch of the given file from the server.</p> 423*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 424*7c568831SAndroid Build Coastguard Worker<col align="left"> 425*7c568831SAndroid Build Coastguard Worker<tbody> 426*7c568831SAndroid Build Coastguard Worker<tr> 427*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 428*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 429*7c568831SAndroid Build Coastguard Worker</tr> 430*7c568831SAndroid Build Coastguard Worker<tr> 431*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>filename</tt></i>:</span></td> 432*7c568831SAndroid Build Coastguard Worker<td>the file to retrieve (or NULL if path is in context).</td> 433*7c568831SAndroid Build Coastguard Worker</tr> 434*7c568831SAndroid Build Coastguard Worker<tr> 435*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 436*7c568831SAndroid Build Coastguard Worker<td>the socket for the data connection, or <0 in case of error</td> 437*7c568831SAndroid Build Coastguard Worker</tr> 438*7c568831SAndroid Build Coastguard Worker</tbody> 439*7c568831SAndroid Build Coastguard Worker</table></div> 440*7c568831SAndroid Build Coastguard Worker</div> 441*7c568831SAndroid Build Coastguard Worker<hr> 442*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 443*7c568831SAndroid Build Coastguard Worker<h3> 444*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPInit"></a>xmlNanoFTPInit ()</h3> 445*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlNanoFTPInit (void)<br> 446*7c568831SAndroid Build Coastguard Worker</pre> 447*7c568831SAndroid Build Coastguard Worker<p>Initialize the FTP protocol layer. Currently it just checks for proxy information, and get the hostname</p> 448*7c568831SAndroid Build Coastguard Worker</div> 449*7c568831SAndroid Build Coastguard Worker<hr> 450*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 451*7c568831SAndroid Build Coastguard Worker<h3> 452*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPList"></a>xmlNanoFTPList ()</h3> 453*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPList (void * ctx, <br> <a href="libxml2-nanoftp.html#ftpListCallback">ftpListCallback</a> callback, <br> void * userData, <br> const char * filename)<br> 454*7c568831SAndroid Build Coastguard Worker</pre> 455*7c568831SAndroid Build Coastguard Worker<p>Do a listing on the server. All files info are passed back in the callbacks.</p> 456*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 457*7c568831SAndroid Build Coastguard Worker<col align="left"> 458*7c568831SAndroid Build Coastguard Worker<tbody> 459*7c568831SAndroid Build Coastguard Worker<tr> 460*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 461*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 462*7c568831SAndroid Build Coastguard Worker</tr> 463*7c568831SAndroid Build Coastguard Worker<tr> 464*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>callback</tt></i>:</span></td> 465*7c568831SAndroid Build Coastguard Worker<td>the user callback</td> 466*7c568831SAndroid Build Coastguard Worker</tr> 467*7c568831SAndroid Build Coastguard Worker<tr> 468*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>userData</tt></i>:</span></td> 469*7c568831SAndroid Build Coastguard Worker<td>the user callback data</td> 470*7c568831SAndroid Build Coastguard Worker</tr> 471*7c568831SAndroid Build Coastguard Worker<tr> 472*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>filename</tt></i>:</span></td> 473*7c568831SAndroid Build Coastguard Worker<td>optional files to list</td> 474*7c568831SAndroid Build Coastguard Worker</tr> 475*7c568831SAndroid Build Coastguard Worker<tr> 476*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 477*7c568831SAndroid Build Coastguard Worker<td>-1 in case of error, 0 otherwise</td> 478*7c568831SAndroid Build Coastguard Worker</tr> 479*7c568831SAndroid Build Coastguard Worker</tbody> 480*7c568831SAndroid Build Coastguard Worker</table></div> 481*7c568831SAndroid Build Coastguard Worker</div> 482*7c568831SAndroid Build Coastguard Worker<hr> 483*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 484*7c568831SAndroid Build Coastguard Worker<h3> 485*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPNewCtxt"></a>xmlNanoFTPNewCtxt ()</h3> 486*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void * xmlNanoFTPNewCtxt (const char * URL)<br> 487*7c568831SAndroid Build Coastguard Worker</pre> 488*7c568831SAndroid Build Coastguard Worker<p>Allocate and initialize a new FTP context.</p> 489*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 490*7c568831SAndroid Build Coastguard Worker<col align="left"> 491*7c568831SAndroid Build Coastguard Worker<tbody> 492*7c568831SAndroid Build Coastguard Worker<tr> 493*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>URL</tt></i>:</span></td> 494*7c568831SAndroid Build Coastguard Worker<td>The URL used to initialize the context</td> 495*7c568831SAndroid Build Coastguard Worker</tr> 496*7c568831SAndroid Build Coastguard Worker<tr> 497*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 498*7c568831SAndroid Build Coastguard Worker<td>an FTP context or NULL in case of error.</td> 499*7c568831SAndroid Build Coastguard Worker</tr> 500*7c568831SAndroid Build Coastguard Worker</tbody> 501*7c568831SAndroid Build Coastguard Worker</table></div> 502*7c568831SAndroid Build Coastguard Worker</div> 503*7c568831SAndroid Build Coastguard Worker<hr> 504*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 505*7c568831SAndroid Build Coastguard Worker<h3> 506*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPOpen"></a>xmlNanoFTPOpen ()</h3> 507*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void * xmlNanoFTPOpen (const char * URL)<br> 508*7c568831SAndroid Build Coastguard Worker</pre> 509*7c568831SAndroid Build Coastguard Worker<p>Start to fetch the given ftp:// resource</p> 510*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 511*7c568831SAndroid Build Coastguard Worker<col align="left"> 512*7c568831SAndroid Build Coastguard Worker<tbody> 513*7c568831SAndroid Build Coastguard Worker<tr> 514*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>URL</tt></i>:</span></td> 515*7c568831SAndroid Build Coastguard Worker<td>the URL to the resource</td> 516*7c568831SAndroid Build Coastguard Worker</tr> 517*7c568831SAndroid Build Coastguard Worker<tr> 518*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 519*7c568831SAndroid Build Coastguard Worker<td>an FTP context, or NULL</td> 520*7c568831SAndroid Build Coastguard Worker</tr> 521*7c568831SAndroid Build Coastguard Worker</tbody> 522*7c568831SAndroid Build Coastguard Worker</table></div> 523*7c568831SAndroid Build Coastguard Worker</div> 524*7c568831SAndroid Build Coastguard Worker<hr> 525*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 526*7c568831SAndroid Build Coastguard Worker<h3> 527*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPProxy"></a>xmlNanoFTPProxy ()</h3> 528*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlNanoFTPProxy (const char * host, <br> int port, <br> const char * user, <br> const char * passwd, <br> int type)<br> 529*7c568831SAndroid Build Coastguard Worker</pre> 530*7c568831SAndroid Build Coastguard Worker<p>Setup the FTP proxy information. This can also be done by using ftp_proxy ftp_proxy_user and ftp_proxy_password environment variables.</p> 531*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 532*7c568831SAndroid Build Coastguard Worker<col align="left"> 533*7c568831SAndroid Build Coastguard Worker<tbody> 534*7c568831SAndroid Build Coastguard Worker<tr> 535*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>host</tt></i>:</span></td> 536*7c568831SAndroid Build Coastguard Worker<td>the proxy host name</td> 537*7c568831SAndroid Build Coastguard Worker</tr> 538*7c568831SAndroid Build Coastguard Worker<tr> 539*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>port</tt></i>:</span></td> 540*7c568831SAndroid Build Coastguard Worker<td>the proxy port</td> 541*7c568831SAndroid Build Coastguard Worker</tr> 542*7c568831SAndroid Build Coastguard Worker<tr> 543*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>user</tt></i>:</span></td> 544*7c568831SAndroid Build Coastguard Worker<td>the proxy user name</td> 545*7c568831SAndroid Build Coastguard Worker</tr> 546*7c568831SAndroid Build Coastguard Worker<tr> 547*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>passwd</tt></i>:</span></td> 548*7c568831SAndroid Build Coastguard Worker<td>the proxy password</td> 549*7c568831SAndroid Build Coastguard Worker</tr> 550*7c568831SAndroid Build Coastguard Worker<tr> 551*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>type</tt></i>:</span></td> 552*7c568831SAndroid Build Coastguard Worker<td>the type of proxy 1 for using SITE, 2 for USER a@b</td> 553*7c568831SAndroid Build Coastguard Worker</tr> 554*7c568831SAndroid Build Coastguard Worker</tbody> 555*7c568831SAndroid Build Coastguard Worker</table></div> 556*7c568831SAndroid Build Coastguard Worker</div> 557*7c568831SAndroid Build Coastguard Worker<hr> 558*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 559*7c568831SAndroid Build Coastguard Worker<h3> 560*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPQuit"></a>xmlNanoFTPQuit ()</h3> 561*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPQuit (void * ctx)<br> 562*7c568831SAndroid Build Coastguard Worker</pre> 563*7c568831SAndroid Build Coastguard Worker<p>Send a QUIT command to the server</p> 564*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 565*7c568831SAndroid Build Coastguard Worker<col align="left"> 566*7c568831SAndroid Build Coastguard Worker<tbody> 567*7c568831SAndroid Build Coastguard Worker<tr> 568*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 569*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 570*7c568831SAndroid Build Coastguard Worker</tr> 571*7c568831SAndroid Build Coastguard Worker<tr> 572*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 573*7c568831SAndroid Build Coastguard Worker<td>-1 in case of error, 0 otherwise</td> 574*7c568831SAndroid Build Coastguard Worker</tr> 575*7c568831SAndroid Build Coastguard Worker</tbody> 576*7c568831SAndroid Build Coastguard Worker</table></div> 577*7c568831SAndroid Build Coastguard Worker</div> 578*7c568831SAndroid Build Coastguard Worker<hr> 579*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 580*7c568831SAndroid Build Coastguard Worker<h3> 581*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPRead"></a>xmlNanoFTPRead ()</h3> 582*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPRead (void * ctx, <br> void * dest, <br> int len)<br> 583*7c568831SAndroid Build Coastguard Worker</pre> 584*7c568831SAndroid Build Coastguard Worker<p>This function tries to read @len bytes from the existing FTP connection and saves them in @dest. This is a blocking call.</p> 585*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 586*7c568831SAndroid Build Coastguard Worker<col align="left"> 587*7c568831SAndroid Build Coastguard Worker<tbody> 588*7c568831SAndroid Build Coastguard Worker<tr> 589*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 590*7c568831SAndroid Build Coastguard Worker<td>the FTP context</td> 591*7c568831SAndroid Build Coastguard Worker</tr> 592*7c568831SAndroid Build Coastguard Worker<tr> 593*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>dest</tt></i>:</span></td> 594*7c568831SAndroid Build Coastguard Worker<td>a buffer</td> 595*7c568831SAndroid Build Coastguard Worker</tr> 596*7c568831SAndroid Build Coastguard Worker<tr> 597*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>len</tt></i>:</span></td> 598*7c568831SAndroid Build Coastguard Worker<td>the buffer length</td> 599*7c568831SAndroid Build Coastguard Worker</tr> 600*7c568831SAndroid Build Coastguard Worker<tr> 601*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 602*7c568831SAndroid Build Coastguard Worker<td>the number of byte read. 0 is an indication of an end of connection. -1 indicates a parameter error.</td> 603*7c568831SAndroid Build Coastguard Worker</tr> 604*7c568831SAndroid Build Coastguard Worker</tbody> 605*7c568831SAndroid Build Coastguard Worker</table></div> 606*7c568831SAndroid Build Coastguard Worker</div> 607*7c568831SAndroid Build Coastguard Worker<hr> 608*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 609*7c568831SAndroid Build Coastguard Worker<h3> 610*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPScanProxy"></a>xmlNanoFTPScanProxy ()</h3> 611*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">void xmlNanoFTPScanProxy (const char * URL)<br> 612*7c568831SAndroid Build Coastguard Worker</pre> 613*7c568831SAndroid Build Coastguard Worker<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 information.</p> 614*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 615*7c568831SAndroid Build Coastguard Worker<col align="left"> 616*7c568831SAndroid Build Coastguard Worker<tbody><tr> 617*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>URL</tt></i>:</span></td> 618*7c568831SAndroid Build Coastguard Worker<td>The proxy URL used to initialize the proxy context</td> 619*7c568831SAndroid Build Coastguard Worker</tr></tbody> 620*7c568831SAndroid Build Coastguard Worker</table></div> 621*7c568831SAndroid Build Coastguard Worker</div> 622*7c568831SAndroid Build Coastguard Worker<hr> 623*7c568831SAndroid Build Coastguard Worker<div class="refsect2" lang="en"> 624*7c568831SAndroid Build Coastguard Worker<h3> 625*7c568831SAndroid Build Coastguard Worker<a name="xmlNanoFTPUpdateURL"></a>xmlNanoFTPUpdateURL ()</h3> 626*7c568831SAndroid Build Coastguard Worker<pre class="programlisting">int xmlNanoFTPUpdateURL (void * ctx, <br> const char * URL)<br> 627*7c568831SAndroid Build Coastguard Worker</pre> 628*7c568831SAndroid Build Coastguard Worker<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> 629*7c568831SAndroid Build Coastguard Worker<div class="variablelist"><table border="0"> 630*7c568831SAndroid Build Coastguard Worker<col align="left"> 631*7c568831SAndroid Build Coastguard Worker<tbody> 632*7c568831SAndroid Build Coastguard Worker<tr> 633*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>ctx</tt></i>:</span></td> 634*7c568831SAndroid Build Coastguard Worker<td>an FTP context</td> 635*7c568831SAndroid Build Coastguard Worker</tr> 636*7c568831SAndroid Build Coastguard Worker<tr> 637*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>URL</tt></i>:</span></td> 638*7c568831SAndroid Build Coastguard Worker<td>The URL used to update the context</td> 639*7c568831SAndroid Build Coastguard Worker</tr> 640*7c568831SAndroid Build Coastguard Worker<tr> 641*7c568831SAndroid Build Coastguard Worker<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 642*7c568831SAndroid Build Coastguard Worker<td>0 if Ok, -1 in case of error (other host).</td> 643*7c568831SAndroid Build Coastguard Worker</tr> 644*7c568831SAndroid Build Coastguard Worker</tbody> 645*7c568831SAndroid Build Coastguard Worker</table></div> 646*7c568831SAndroid Build Coastguard Worker</div> 647*7c568831SAndroid Build Coastguard Worker<hr> 648*7c568831SAndroid Build Coastguard Worker</div> 649*7c568831SAndroid Build Coastguard Worker</div> 650*7c568831SAndroid Build Coastguard Worker</body> 651*7c568831SAndroid Build Coastguard Worker</html> 652