libxml-nanoftp.html revision a41123ce959741be8e16f72177660af098819afc
1<HTML 2><HEAD 3><TITLE 4>nanoftp</TITLE 5><META 6NAME="GENERATOR" 7CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK 8REL="HOME" 9TITLE="Gnome XML Library Reference Manual" 10HREF="book1.html"><LINK 11REL="UP" 12TITLE="Libxml Library Reference" 13HREF="libxml-lib.html"><LINK 14REL="PREVIOUS" 15TITLE="nanohttp" 16HREF="libxml-nanohttp.html"><LINK 17REL="NEXT" 18TITLE="xmlIO" 19HREF="libxml-xmlio.html"></HEAD 20><BODY 21BGCOLOR="#FFFFFF" 22TEXT="#000000" 23LINK="#0000FF" 24VLINK="#840084" 25ALINK="#0000FF" 26><DIV 27CLASS="NAVHEADER" 28><TABLE 29WIDTH="100%" 30BORDER="0" 31BGCOLOR="#000000" 32CELLPADDING="1" 33CELLSPACING="0" 34><TR 35><TH 36COLSPAN="4" 37ALIGN="center" 38><FONT 39COLOR="#FFFFFF" 40SIZE="5" 41>Gnome XML Library Reference Manual</FONT 42></TH 43></TR 44><TR 45><TD 46WIDTH="25%" 47BGCOLOR="#C00000" 48ALIGN="left" 49><A 50HREF="libxml-nanohttp.html" 51><FONT 52COLOR="#FFFFFF" 53SIZE="3" 54><B 55><<< Previous Page</B 56></FONT 57></A 58></TD 59><TD 60WIDTH="25%" 61BGCOLOR="#0000C0" 62ALIGN="center" 63><FONT 64COLOR="#FFFFFF" 65SIZE="3" 66><B 67><A 68HREF="book1.html" 69><FONT 70COLOR="#FFFFFF" 71SIZE="3" 72><B 73>Home</B 74></FONT 75></A 76></B 77></FONT 78></TD 79><TD 80WIDTH="25%" 81BGCOLOR="#00C000" 82ALIGN="center" 83><FONT 84COLOR="#FFFFFF" 85SIZE="3" 86><B 87><A 88HREF="libxml-lib.html" 89><FONT 90COLOR="#FFFFFF" 91SIZE="3" 92><B 93>Up</B 94></FONT 95></A 96></B 97></FONT 98></TD 99><TD 100WIDTH="25%" 101BGCOLOR="#C00000" 102ALIGN="right" 103><A 104HREF="libxml-xmlio.html" 105><FONT 106COLOR="#FFFFFF" 107SIZE="3" 108><B 109>Next Page >>></B 110></FONT 111></A 112></TD 113></TR 114></TABLE 115></DIV 116><H1 117><A 118NAME="LIBXML-NANOFTP" 119>nanoftp</A 120></H1 121><DIV 122CLASS="REFNAMEDIV" 123><A 124NAME="AEN14950" 125></A 126><H2 127>Name</H2 128>nanoftp -- </DIV 129><DIV 130CLASS="REFSYNOPSISDIV" 131><A 132NAME="AEN14953" 133></A 134><H2 135>Synopsis</H2 136><TABLE 137BORDER="0" 138BGCOLOR="#D6E8FF" 139WIDTH="100%" 140CELLPADDING="6" 141><TR 142><TD 143><PRE 144CLASS="SYNOPSIS" 145> 146 147void (<A 148HREF="libxml-nanoftp.html#FTPLISTCALLBACK" 149>*ftpListCallback</A 150>) (void *userData, 151 const char *filename, 152 const char *attrib, 153 const char *owner, 154 const char *group, 155 unsigned <GTKDOCLINK 156HREF="LONG" 157>long</GTKDOCLINK 158> size, 159 int links, 160 int year, 161 const char *month, 162 int day, 163 int hour, 164 int minute); 165void (<A 166HREF="libxml-nanoftp.html#FTPDATACALLBACK" 167>*ftpDataCallback</A 168>) (void *userData, 169 const char *data, 170 int len); 171void <A 172HREF="libxml-nanoftp.html#XMLNANOFTPINIT" 173>xmlNanoFTPInit</A 174> (void); 175void <A 176HREF="libxml-nanoftp.html#XMLNANOFTPCLEANUP" 177>xmlNanoFTPCleanup</A 178> (void); 179void* <A 180HREF="libxml-nanoftp.html#XMLNANOFTPNEWCTXT" 181>xmlNanoFTPNewCtxt</A 182> (const char *URL); 183void <A 184HREF="libxml-nanoftp.html#XMLNANOFTPFREECTXT" 185>xmlNanoFTPFreeCtxt</A 186> (void *ctx); 187void* <A 188HREF="libxml-nanoftp.html#XMLNANOFTPCONNECTTO" 189>xmlNanoFTPConnectTo</A 190> (const char *server, 191 int port); 192void* <A 193HREF="libxml-nanoftp.html#XMLNANOFTPOPEN" 194>xmlNanoFTPOpen</A 195> (const char *URL); 196int <A 197HREF="libxml-nanoftp.html#XMLNANOFTPCONNECT" 198>xmlNanoFTPConnect</A 199> (void *ctx); 200int <A 201HREF="libxml-nanoftp.html#XMLNANOFTPCLOSE" 202>xmlNanoFTPClose</A 203> (void *ctx); 204int <A 205HREF="libxml-nanoftp.html#XMLNANOFTPQUIT" 206>xmlNanoFTPQuit</A 207> (void *ctx); 208void <A 209HREF="libxml-nanoftp.html#XMLNANOFTPSCANPROXY" 210>xmlNanoFTPScanProxy</A 211> (const char *URL); 212void <A 213HREF="libxml-nanoftp.html#XMLNANOFTPPROXY" 214>xmlNanoFTPProxy</A 215> (const char *host, 216 int port, 217 const char *user, 218 const char *passwd, 219 int type); 220int <A 221HREF="libxml-nanoftp.html#XMLNANOFTPUPDATEURL" 222>xmlNanoFTPUpdateURL</A 223> (void *ctx, 224 const char *URL); 225int <A 226HREF="libxml-nanoftp.html#XMLNANOFTPGETRESPONSE" 227>xmlNanoFTPGetResponse</A 228> (void *ctx); 229int <A 230HREF="libxml-nanoftp.html#XMLNANOFTPCHECKRESPONSE" 231>xmlNanoFTPCheckResponse</A 232> (void *ctx); 233int <A 234HREF="libxml-nanoftp.html#XMLNANOFTPCWD" 235>xmlNanoFTPCwd</A 236> (void *ctx, 237 char *directory); 238int <A 239HREF="libxml-nanoftp.html#XMLNANOFTPGETCONNECTION" 240>xmlNanoFTPGetConnection</A 241> (void *ctx); 242int <A 243HREF="libxml-nanoftp.html#XMLNANOFTPCLOSECONNECTION" 244>xmlNanoFTPCloseConnection</A 245> (void *ctx); 246int <A 247HREF="libxml-nanoftp.html#XMLNANOFTPLIST" 248>xmlNanoFTPList</A 249> (void *ctx, 250 <A 251HREF="libxml-nanoftp.html#FTPLISTCALLBACK" 252>ftpListCallback</A 253> callback, 254 void *userData, 255 char *filename); 256int <A 257HREF="libxml-nanoftp.html#XMLNANOFTPGETSOCKET" 258>xmlNanoFTPGetSocket</A 259> (void *ctx, 260 const char *filename); 261int <A 262HREF="libxml-nanoftp.html#XMLNANOFTPGET" 263>xmlNanoFTPGet</A 264> (void *ctx, 265 <A 266HREF="libxml-nanoftp.html#FTPDATACALLBACK" 267>ftpDataCallback</A 268> callback, 269 void *userData, 270 const char *filename); 271int <A 272HREF="libxml-nanoftp.html#XMLNANOFTPREAD" 273>xmlNanoFTPRead</A 274> (void *ctx, 275 void *dest, 276 int len);</PRE 277></TD 278></TR 279></TABLE 280></DIV 281><DIV 282CLASS="REFSECT1" 283><A 284NAME="AEN14982" 285></A 286><H2 287>Description</H2 288><P 289></P 290></DIV 291><DIV 292CLASS="REFSECT1" 293><A 294NAME="AEN14985" 295></A 296><H2 297>Details</H2 298><DIV 299CLASS="REFSECT2" 300><A 301NAME="AEN14987" 302></A 303><H3 304><A 305NAME="FTPLISTCALLBACK" 306></A 307>ftpListCallback ()</H3 308><TABLE 309BORDER="0" 310BGCOLOR="#D6E8FF" 311WIDTH="100%" 312CELLPADDING="6" 313><TR 314><TD 315><PRE 316CLASS="PROGRAMLISTING" 317>void (*ftpListCallback) (void *userData, 318 const char *filename, 319 const char *attrib, 320 const char *owner, 321 const char *group, 322 unsigned <GTKDOCLINK 323HREF="LONG" 324>long</GTKDOCLINK 325> size, 326 int links, 327 int year, 328 const char *month, 329 int day, 330 int hour, 331 int minute);</PRE 332></TD 333></TR 334></TABLE 335><P 336></P 337><DIV 338CLASS="INFORMALTABLE" 339><P 340></P 341><TABLE 342BORDER="0" 343WIDTH="100%" 344BGCOLOR="#FFD0D0" 345CELLSPACING="0" 346CELLPADDING="4" 347CLASS="CALSTABLE" 348><TR 349><TD 350WIDTH="20%" 351ALIGN="RIGHT" 352VALIGN="TOP" 353><TT 354CLASS="PARAMETER" 355><I 356>userData</I 357></TT 358>:</TD 359><TD 360WIDTH="80%" 361ALIGN="LEFT" 362VALIGN="TOP" 363> </TD 364></TR 365><TR 366><TD 367WIDTH="20%" 368ALIGN="RIGHT" 369VALIGN="TOP" 370><TT 371CLASS="PARAMETER" 372><I 373>filename</I 374></TT 375>:</TD 376><TD 377WIDTH="80%" 378ALIGN="LEFT" 379VALIGN="TOP" 380> </TD 381></TR 382><TR 383><TD 384WIDTH="20%" 385ALIGN="RIGHT" 386VALIGN="TOP" 387><TT 388CLASS="PARAMETER" 389><I 390>attrib</I 391></TT 392>:</TD 393><TD 394WIDTH="80%" 395ALIGN="LEFT" 396VALIGN="TOP" 397> </TD 398></TR 399><TR 400><TD 401WIDTH="20%" 402ALIGN="RIGHT" 403VALIGN="TOP" 404><TT 405CLASS="PARAMETER" 406><I 407>owner</I 408></TT 409>:</TD 410><TD 411WIDTH="80%" 412ALIGN="LEFT" 413VALIGN="TOP" 414> </TD 415></TR 416><TR 417><TD 418WIDTH="20%" 419ALIGN="RIGHT" 420VALIGN="TOP" 421><TT 422CLASS="PARAMETER" 423><I 424>group</I 425></TT 426>:</TD 427><TD 428WIDTH="80%" 429ALIGN="LEFT" 430VALIGN="TOP" 431> </TD 432></TR 433><TR 434><TD 435WIDTH="20%" 436ALIGN="RIGHT" 437VALIGN="TOP" 438><TT 439CLASS="PARAMETER" 440><I 441>size</I 442></TT 443>:</TD 444><TD 445WIDTH="80%" 446ALIGN="LEFT" 447VALIGN="TOP" 448> </TD 449></TR 450><TR 451><TD 452WIDTH="20%" 453ALIGN="RIGHT" 454VALIGN="TOP" 455><TT 456CLASS="PARAMETER" 457><I 458>links</I 459></TT 460>:</TD 461><TD 462WIDTH="80%" 463ALIGN="LEFT" 464VALIGN="TOP" 465> </TD 466></TR 467><TR 468><TD 469WIDTH="20%" 470ALIGN="RIGHT" 471VALIGN="TOP" 472><TT 473CLASS="PARAMETER" 474><I 475>year</I 476></TT 477>:</TD 478><TD 479WIDTH="80%" 480ALIGN="LEFT" 481VALIGN="TOP" 482> </TD 483></TR 484><TR 485><TD 486WIDTH="20%" 487ALIGN="RIGHT" 488VALIGN="TOP" 489><TT 490CLASS="PARAMETER" 491><I 492>month</I 493></TT 494>:</TD 495><TD 496WIDTH="80%" 497ALIGN="LEFT" 498VALIGN="TOP" 499> </TD 500></TR 501><TR 502><TD 503WIDTH="20%" 504ALIGN="RIGHT" 505VALIGN="TOP" 506><TT 507CLASS="PARAMETER" 508><I 509>day</I 510></TT 511>:</TD 512><TD 513WIDTH="80%" 514ALIGN="LEFT" 515VALIGN="TOP" 516> </TD 517></TR 518><TR 519><TD 520WIDTH="20%" 521ALIGN="RIGHT" 522VALIGN="TOP" 523><TT 524CLASS="PARAMETER" 525><I 526>hour</I 527></TT 528>:</TD 529><TD 530WIDTH="80%" 531ALIGN="LEFT" 532VALIGN="TOP" 533> </TD 534></TR 535><TR 536><TD 537WIDTH="20%" 538ALIGN="RIGHT" 539VALIGN="TOP" 540><TT 541CLASS="PARAMETER" 542><I 543>minute</I 544></TT 545>:</TD 546><TD 547WIDTH="80%" 548ALIGN="LEFT" 549VALIGN="TOP" 550> </TD 551></TR 552></TABLE 553><P 554></P 555></DIV 556></DIV 557><HR><DIV 558CLASS="REFSECT2" 559><A 560NAME="AEN15046" 561></A 562><H3 563><A 564NAME="FTPDATACALLBACK" 565></A 566>ftpDataCallback ()</H3 567><TABLE 568BORDER="0" 569BGCOLOR="#D6E8FF" 570WIDTH="100%" 571CELLPADDING="6" 572><TR 573><TD 574><PRE 575CLASS="PROGRAMLISTING" 576>void (*ftpDataCallback) (void *userData, 577 const char *data, 578 int len);</PRE 579></TD 580></TR 581></TABLE 582><P 583></P 584><DIV 585CLASS="INFORMALTABLE" 586><P 587></P 588><TABLE 589BORDER="0" 590WIDTH="100%" 591BGCOLOR="#FFD0D0" 592CELLSPACING="0" 593CELLPADDING="4" 594CLASS="CALSTABLE" 595><TR 596><TD 597WIDTH="20%" 598ALIGN="RIGHT" 599VALIGN="TOP" 600><TT 601CLASS="PARAMETER" 602><I 603>userData</I 604></TT 605>:</TD 606><TD 607WIDTH="80%" 608ALIGN="LEFT" 609VALIGN="TOP" 610> </TD 611></TR 612><TR 613><TD 614WIDTH="20%" 615ALIGN="RIGHT" 616VALIGN="TOP" 617><TT 618CLASS="PARAMETER" 619><I 620>data</I 621></TT 622>:</TD 623><TD 624WIDTH="80%" 625ALIGN="LEFT" 626VALIGN="TOP" 627> </TD 628></TR 629><TR 630><TD 631WIDTH="20%" 632ALIGN="RIGHT" 633VALIGN="TOP" 634><TT 635CLASS="PARAMETER" 636><I 637>len</I 638></TT 639>:</TD 640><TD 641WIDTH="80%" 642ALIGN="LEFT" 643VALIGN="TOP" 644> </TD 645></TR 646></TABLE 647><P 648></P 649></DIV 650></DIV 651><HR><DIV 652CLASS="REFSECT2" 653><A 654NAME="AEN15068" 655></A 656><H3 657><A 658NAME="XMLNANOFTPINIT" 659></A 660>xmlNanoFTPInit ()</H3 661><TABLE 662BORDER="0" 663BGCOLOR="#D6E8FF" 664WIDTH="100%" 665CELLPADDING="6" 666><TR 667><TD 668><PRE 669CLASS="PROGRAMLISTING" 670>void xmlNanoFTPInit (void);</PRE 671></TD 672></TR 673></TABLE 674><P 675>Initialize the FTP protocol layer. 676Currently it just checks for proxy informations, 677and get the hostname</P 678><P 679></P 680></DIV 681><HR><DIV 682CLASS="REFSECT2" 683><A 684NAME="AEN15074" 685></A 686><H3 687><A 688NAME="XMLNANOFTPCLEANUP" 689></A 690>xmlNanoFTPCleanup ()</H3 691><TABLE 692BORDER="0" 693BGCOLOR="#D6E8FF" 694WIDTH="100%" 695CELLPADDING="6" 696><TR 697><TD 698><PRE 699CLASS="PROGRAMLISTING" 700>void xmlNanoFTPCleanup (void);</PRE 701></TD 702></TR 703></TABLE 704><P 705>Cleanup the FTP protocol layer. This cleanup proxy informations.</P 706><P 707></P 708></DIV 709><HR><DIV 710CLASS="REFSECT2" 711><A 712NAME="AEN15080" 713></A 714><H3 715><A 716NAME="XMLNANOFTPNEWCTXT" 717></A 718>xmlNanoFTPNewCtxt ()</H3 719><TABLE 720BORDER="0" 721BGCOLOR="#D6E8FF" 722WIDTH="100%" 723CELLPADDING="6" 724><TR 725><TD 726><PRE 727CLASS="PROGRAMLISTING" 728>void* xmlNanoFTPNewCtxt (const char *URL);</PRE 729></TD 730></TR 731></TABLE 732><P 733>Allocate and initialize a new FTP context.</P 734><P 735></P 736><DIV 737CLASS="INFORMALTABLE" 738><P 739></P 740><TABLE 741BORDER="0" 742WIDTH="100%" 743BGCOLOR="#FFD0D0" 744CELLSPACING="0" 745CELLPADDING="4" 746CLASS="CALSTABLE" 747><TR 748><TD 749WIDTH="20%" 750ALIGN="RIGHT" 751VALIGN="TOP" 752><TT 753CLASS="PARAMETER" 754><I 755>URL</I 756></TT 757>:</TD 758><TD 759WIDTH="80%" 760ALIGN="LEFT" 761VALIGN="TOP" 762> The URL used to initialize the context</TD 763></TR 764></TABLE 765><P 766></P 767></DIV 768></DIV 769><HR><DIV 770CLASS="REFSECT2" 771><A 772NAME="AEN15095" 773></A 774><H3 775><A 776NAME="XMLNANOFTPFREECTXT" 777></A 778>xmlNanoFTPFreeCtxt ()</H3 779><TABLE 780BORDER="0" 781BGCOLOR="#D6E8FF" 782WIDTH="100%" 783CELLPADDING="6" 784><TR 785><TD 786><PRE 787CLASS="PROGRAMLISTING" 788>void xmlNanoFTPFreeCtxt (void *ctx);</PRE 789></TD 790></TR 791></TABLE 792><P 793>Frees the context after closing the connection.</P 794><P 795></P 796><DIV 797CLASS="INFORMALTABLE" 798><P 799></P 800><TABLE 801BORDER="0" 802WIDTH="100%" 803BGCOLOR="#FFD0D0" 804CELLSPACING="0" 805CELLPADDING="4" 806CLASS="CALSTABLE" 807><TR 808><TD 809WIDTH="20%" 810ALIGN="RIGHT" 811VALIGN="TOP" 812><TT 813CLASS="PARAMETER" 814><I 815>ctx</I 816></TT 817>:</TD 818><TD 819WIDTH="80%" 820ALIGN="LEFT" 821VALIGN="TOP" 822> an FTP context</TD 823></TR 824></TABLE 825><P 826></P 827></DIV 828></DIV 829><HR><DIV 830CLASS="REFSECT2" 831><A 832NAME="AEN15110" 833></A 834><H3 835><A 836NAME="XMLNANOFTPCONNECTTO" 837></A 838>xmlNanoFTPConnectTo ()</H3 839><TABLE 840BORDER="0" 841BGCOLOR="#D6E8FF" 842WIDTH="100%" 843CELLPADDING="6" 844><TR 845><TD 846><PRE 847CLASS="PROGRAMLISTING" 848>void* xmlNanoFTPConnectTo (const char *server, 849 int port);</PRE 850></TD 851></TR 852></TABLE 853><P 854>Tries to open a control connection to the given server/port</P 855><P 856></P 857><DIV 858CLASS="INFORMALTABLE" 859><P 860></P 861><TABLE 862BORDER="0" 863WIDTH="100%" 864BGCOLOR="#FFD0D0" 865CELLSPACING="0" 866CELLPADDING="4" 867CLASS="CALSTABLE" 868><TR 869><TD 870WIDTH="20%" 871ALIGN="RIGHT" 872VALIGN="TOP" 873><TT 874CLASS="PARAMETER" 875><I 876>server</I 877></TT 878>:</TD 879><TD 880WIDTH="80%" 881ALIGN="LEFT" 882VALIGN="TOP" 883> an FTP server name</TD 884></TR 885><TR 886><TD 887WIDTH="20%" 888ALIGN="RIGHT" 889VALIGN="TOP" 890><TT 891CLASS="PARAMETER" 892><I 893>port</I 894></TT 895>:</TD 896><TD 897WIDTH="80%" 898ALIGN="LEFT" 899VALIGN="TOP" 900> the port (use 21 if 0)</TD 901></TR 902></TABLE 903><P 904></P 905></DIV 906></DIV 907><HR><DIV 908CLASS="REFSECT2" 909><A 910NAME="AEN15129" 911></A 912><H3 913><A 914NAME="XMLNANOFTPOPEN" 915></A 916>xmlNanoFTPOpen ()</H3 917><TABLE 918BORDER="0" 919BGCOLOR="#D6E8FF" 920WIDTH="100%" 921CELLPADDING="6" 922><TR 923><TD 924><PRE 925CLASS="PROGRAMLISTING" 926>void* xmlNanoFTPOpen (const char *URL);</PRE 927></TD 928></TR 929></TABLE 930><P 931>Start to fetch the given ftp:// resource</P 932><P 933></P 934><DIV 935CLASS="INFORMALTABLE" 936><P 937></P 938><TABLE 939BORDER="0" 940WIDTH="100%" 941BGCOLOR="#FFD0D0" 942CELLSPACING="0" 943CELLPADDING="4" 944CLASS="CALSTABLE" 945><TR 946><TD 947WIDTH="20%" 948ALIGN="RIGHT" 949VALIGN="TOP" 950><TT 951CLASS="PARAMETER" 952><I 953>URL</I 954></TT 955>:</TD 956><TD 957WIDTH="80%" 958ALIGN="LEFT" 959VALIGN="TOP" 960> the URL to the resource</TD 961></TR 962></TABLE 963><P 964></P 965></DIV 966></DIV 967><HR><DIV 968CLASS="REFSECT2" 969><A 970NAME="AEN15144" 971></A 972><H3 973><A 974NAME="XMLNANOFTPCONNECT" 975></A 976>xmlNanoFTPConnect ()</H3 977><TABLE 978BORDER="0" 979BGCOLOR="#D6E8FF" 980WIDTH="100%" 981CELLPADDING="6" 982><TR 983><TD 984><PRE 985CLASS="PROGRAMLISTING" 986>int xmlNanoFTPConnect (void *ctx);</PRE 987></TD 988></TR 989></TABLE 990><P 991>Tries to open a control connection</P 992><P 993></P 994><DIV 995CLASS="INFORMALTABLE" 996><P 997></P 998><TABLE 999BORDER="0" 1000WIDTH="100%" 1001BGCOLOR="#FFD0D0" 1002CELLSPACING="0" 1003CELLPADDING="4" 1004CLASS="CALSTABLE" 1005><TR 1006><TD 1007WIDTH="20%" 1008ALIGN="RIGHT" 1009VALIGN="TOP" 1010><TT 1011CLASS="PARAMETER" 1012><I 1013>ctx</I 1014></TT 1015>:</TD 1016><TD 1017WIDTH="80%" 1018ALIGN="LEFT" 1019VALIGN="TOP" 1020> an FTP context</TD 1021></TR 1022><TR 1023><TD 1024WIDTH="20%" 1025ALIGN="RIGHT" 1026VALIGN="TOP" 1027><I 1028CLASS="EMPHASIS" 1029>Returns</I 1030> :</TD 1031><TD 1032WIDTH="80%" 1033ALIGN="LEFT" 1034VALIGN="TOP" 1035>-1 in case of error, 0 otherwise</TD 1036></TR 1037></TABLE 1038><P 1039></P 1040></DIV 1041></DIV 1042><HR><DIV 1043CLASS="REFSECT2" 1044><A 1045NAME="AEN15163" 1046></A 1047><H3 1048><A 1049NAME="XMLNANOFTPCLOSE" 1050></A 1051>xmlNanoFTPClose ()</H3 1052><TABLE 1053BORDER="0" 1054BGCOLOR="#D6E8FF" 1055WIDTH="100%" 1056CELLPADDING="6" 1057><TR 1058><TD 1059><PRE 1060CLASS="PROGRAMLISTING" 1061>int xmlNanoFTPClose (void *ctx);</PRE 1062></TD 1063></TR 1064></TABLE 1065><P 1066>Close the connection and both control and transport</P 1067><P 1068></P 1069><DIV 1070CLASS="INFORMALTABLE" 1071><P 1072></P 1073><TABLE 1074BORDER="0" 1075WIDTH="100%" 1076BGCOLOR="#FFD0D0" 1077CELLSPACING="0" 1078CELLPADDING="4" 1079CLASS="CALSTABLE" 1080><TR 1081><TD 1082WIDTH="20%" 1083ALIGN="RIGHT" 1084VALIGN="TOP" 1085><TT 1086CLASS="PARAMETER" 1087><I 1088>ctx</I 1089></TT 1090>:</TD 1091><TD 1092WIDTH="80%" 1093ALIGN="LEFT" 1094VALIGN="TOP" 1095> an FTP context</TD 1096></TR 1097><TR 1098><TD 1099WIDTH="20%" 1100ALIGN="RIGHT" 1101VALIGN="TOP" 1102><I 1103CLASS="EMPHASIS" 1104>Returns</I 1105> :</TD 1106><TD 1107WIDTH="80%" 1108ALIGN="LEFT" 1109VALIGN="TOP" 1110>-1 incase of error, 0 otherwise</TD 1111></TR 1112></TABLE 1113><P 1114></P 1115></DIV 1116></DIV 1117><HR><DIV 1118CLASS="REFSECT2" 1119><A 1120NAME="AEN15182" 1121></A 1122><H3 1123><A 1124NAME="XMLNANOFTPQUIT" 1125></A 1126>xmlNanoFTPQuit ()</H3 1127><TABLE 1128BORDER="0" 1129BGCOLOR="#D6E8FF" 1130WIDTH="100%" 1131CELLPADDING="6" 1132><TR 1133><TD 1134><PRE 1135CLASS="PROGRAMLISTING" 1136>int xmlNanoFTPQuit (void *ctx);</PRE 1137></TD 1138></TR 1139></TABLE 1140><P 1141>Send a QUIT command to the server</P 1142><P 1143></P 1144><DIV 1145CLASS="INFORMALTABLE" 1146><P 1147></P 1148><TABLE 1149BORDER="0" 1150WIDTH="100%" 1151BGCOLOR="#FFD0D0" 1152CELLSPACING="0" 1153CELLPADDING="4" 1154CLASS="CALSTABLE" 1155><TR 1156><TD 1157WIDTH="20%" 1158ALIGN="RIGHT" 1159VALIGN="TOP" 1160><TT 1161CLASS="PARAMETER" 1162><I 1163>ctx</I 1164></TT 1165>:</TD 1166><TD 1167WIDTH="80%" 1168ALIGN="LEFT" 1169VALIGN="TOP" 1170> an FTP context</TD 1171></TR 1172><TR 1173><TD 1174WIDTH="20%" 1175ALIGN="RIGHT" 1176VALIGN="TOP" 1177><I 1178CLASS="EMPHASIS" 1179>Returns</I 1180> :</TD 1181><TD 1182WIDTH="80%" 1183ALIGN="LEFT" 1184VALIGN="TOP" 1185>-1 in case of error, 0 otherwise</TD 1186></TR 1187></TABLE 1188><P 1189></P 1190></DIV 1191></DIV 1192><HR><DIV 1193CLASS="REFSECT2" 1194><A 1195NAME="AEN15201" 1196></A 1197><H3 1198><A 1199NAME="XMLNANOFTPSCANPROXY" 1200></A 1201>xmlNanoFTPScanProxy ()</H3 1202><TABLE 1203BORDER="0" 1204BGCOLOR="#D6E8FF" 1205WIDTH="100%" 1206CELLPADDING="6" 1207><TR 1208><TD 1209><PRE 1210CLASS="PROGRAMLISTING" 1211>void xmlNanoFTPScanProxy (const char *URL);</PRE 1212></TD 1213></TR 1214></TABLE 1215><P 1216>(Re)Initialize the FTP Proxy context by parsing the URL and finding 1217the protocol host port it indicates. 1218Should be like ftp://myproxy/ or ftp://myproxy:3128/ 1219A NULL URL cleans up proxy informations.</P 1220><P 1221></P 1222><DIV 1223CLASS="INFORMALTABLE" 1224><P 1225></P 1226><TABLE 1227BORDER="0" 1228WIDTH="100%" 1229BGCOLOR="#FFD0D0" 1230CELLSPACING="0" 1231CELLPADDING="4" 1232CLASS="CALSTABLE" 1233><TR 1234><TD 1235WIDTH="20%" 1236ALIGN="RIGHT" 1237VALIGN="TOP" 1238><TT 1239CLASS="PARAMETER" 1240><I 1241>URL</I 1242></TT 1243>:</TD 1244><TD 1245WIDTH="80%" 1246ALIGN="LEFT" 1247VALIGN="TOP" 1248> The proxy URL used to initialize the proxy context</TD 1249></TR 1250></TABLE 1251><P 1252></P 1253></DIV 1254></DIV 1255><HR><DIV 1256CLASS="REFSECT2" 1257><A 1258NAME="AEN15216" 1259></A 1260><H3 1261><A 1262NAME="XMLNANOFTPPROXY" 1263></A 1264>xmlNanoFTPProxy ()</H3 1265><TABLE 1266BORDER="0" 1267BGCOLOR="#D6E8FF" 1268WIDTH="100%" 1269CELLPADDING="6" 1270><TR 1271><TD 1272><PRE 1273CLASS="PROGRAMLISTING" 1274>void xmlNanoFTPProxy (const char *host, 1275 int port, 1276 const char *user, 1277 const char *passwd, 1278 int type);</PRE 1279></TD 1280></TR 1281></TABLE 1282><P 1283>Setup the FTP proxy informations. 1284This can also be done by using ftp_proxy ftp_proxy_user and 1285ftp_proxy_password environment variables.</P 1286><P 1287></P 1288><DIV 1289CLASS="INFORMALTABLE" 1290><P 1291></P 1292><TABLE 1293BORDER="0" 1294WIDTH="100%" 1295BGCOLOR="#FFD0D0" 1296CELLSPACING="0" 1297CELLPADDING="4" 1298CLASS="CALSTABLE" 1299><TR 1300><TD 1301WIDTH="20%" 1302ALIGN="RIGHT" 1303VALIGN="TOP" 1304><TT 1305CLASS="PARAMETER" 1306><I 1307>host</I 1308></TT 1309>:</TD 1310><TD 1311WIDTH="80%" 1312ALIGN="LEFT" 1313VALIGN="TOP" 1314> the proxy host name</TD 1315></TR 1316><TR 1317><TD 1318WIDTH="20%" 1319ALIGN="RIGHT" 1320VALIGN="TOP" 1321><TT 1322CLASS="PARAMETER" 1323><I 1324>port</I 1325></TT 1326>:</TD 1327><TD 1328WIDTH="80%" 1329ALIGN="LEFT" 1330VALIGN="TOP" 1331> the proxy port</TD 1332></TR 1333><TR 1334><TD 1335WIDTH="20%" 1336ALIGN="RIGHT" 1337VALIGN="TOP" 1338><TT 1339CLASS="PARAMETER" 1340><I 1341>user</I 1342></TT 1343>:</TD 1344><TD 1345WIDTH="80%" 1346ALIGN="LEFT" 1347VALIGN="TOP" 1348> the proxy user name</TD 1349></TR 1350><TR 1351><TD 1352WIDTH="20%" 1353ALIGN="RIGHT" 1354VALIGN="TOP" 1355><TT 1356CLASS="PARAMETER" 1357><I 1358>passwd</I 1359></TT 1360>:</TD 1361><TD 1362WIDTH="80%" 1363ALIGN="LEFT" 1364VALIGN="TOP" 1365> the proxy password</TD 1366></TR 1367><TR 1368><TD 1369WIDTH="20%" 1370ALIGN="RIGHT" 1371VALIGN="TOP" 1372><TT 1373CLASS="PARAMETER" 1374><I 1375>type</I 1376></TT 1377>:</TD 1378><TD 1379WIDTH="80%" 1380ALIGN="LEFT" 1381VALIGN="TOP" 1382> the type of proxy 1 for using SITE, 2 for USER a<TT 1383CLASS="PARAMETER" 1384><I 1385>b</I 1386></TT 1387></TD 1388></TR 1389></TABLE 1390><P 1391></P 1392></DIV 1393></DIV 1394><HR><DIV 1395CLASS="REFSECT2" 1396><A 1397NAME="AEN15248" 1398></A 1399><H3 1400><A 1401NAME="XMLNANOFTPUPDATEURL" 1402></A 1403>xmlNanoFTPUpdateURL ()</H3 1404><TABLE 1405BORDER="0" 1406BGCOLOR="#D6E8FF" 1407WIDTH="100%" 1408CELLPADDING="6" 1409><TR 1410><TD 1411><PRE 1412CLASS="PROGRAMLISTING" 1413>int xmlNanoFTPUpdateURL (void *ctx, 1414 const char *URL);</PRE 1415></TD 1416></TR 1417></TABLE 1418><P 1419>Update an FTP context by parsing the URL and finding 1420new path it indicates. If there is an error in the 1421protocol, hostname, port or other information, the 1422error is raised. It indicates a new connection has to 1423be established.</P 1424><P 1425></P 1426><DIV 1427CLASS="INFORMALTABLE" 1428><P 1429></P 1430><TABLE 1431BORDER="0" 1432WIDTH="100%" 1433BGCOLOR="#FFD0D0" 1434CELLSPACING="0" 1435CELLPADDING="4" 1436CLASS="CALSTABLE" 1437><TR 1438><TD 1439WIDTH="20%" 1440ALIGN="RIGHT" 1441VALIGN="TOP" 1442><TT 1443CLASS="PARAMETER" 1444><I 1445>ctx</I 1446></TT 1447>:</TD 1448><TD 1449WIDTH="80%" 1450ALIGN="LEFT" 1451VALIGN="TOP" 1452> an FTP context</TD 1453></TR 1454><TR 1455><TD 1456WIDTH="20%" 1457ALIGN="RIGHT" 1458VALIGN="TOP" 1459><TT 1460CLASS="PARAMETER" 1461><I 1462>URL</I 1463></TT 1464>:</TD 1465><TD 1466WIDTH="80%" 1467ALIGN="LEFT" 1468VALIGN="TOP" 1469> The URL used to update the context</TD 1470></TR 1471><TR 1472><TD 1473WIDTH="20%" 1474ALIGN="RIGHT" 1475VALIGN="TOP" 1476><I 1477CLASS="EMPHASIS" 1478>Returns</I 1479> :</TD 1480><TD 1481WIDTH="80%" 1482ALIGN="LEFT" 1483VALIGN="TOP" 1484>0 if Ok, -1 in case of error (other host).</TD 1485></TR 1486></TABLE 1487><P 1488></P 1489></DIV 1490></DIV 1491><HR><DIV 1492CLASS="REFSECT2" 1493><A 1494NAME="AEN15271" 1495></A 1496><H3 1497><A 1498NAME="XMLNANOFTPGETRESPONSE" 1499></A 1500>xmlNanoFTPGetResponse ()</H3 1501><TABLE 1502BORDER="0" 1503BGCOLOR="#D6E8FF" 1504WIDTH="100%" 1505CELLPADDING="6" 1506><TR 1507><TD 1508><PRE 1509CLASS="PROGRAMLISTING" 1510>int xmlNanoFTPGetResponse (void *ctx);</PRE 1511></TD 1512></TR 1513></TABLE 1514><P 1515>Get the response from the FTP server after a command.</P 1516><P 1517></P 1518><DIV 1519CLASS="INFORMALTABLE" 1520><P 1521></P 1522><TABLE 1523BORDER="0" 1524WIDTH="100%" 1525BGCOLOR="#FFD0D0" 1526CELLSPACING="0" 1527CELLPADDING="4" 1528CLASS="CALSTABLE" 1529><TR 1530><TD 1531WIDTH="20%" 1532ALIGN="RIGHT" 1533VALIGN="TOP" 1534><TT 1535CLASS="PARAMETER" 1536><I 1537>ctx</I 1538></TT 1539>:</TD 1540><TD 1541WIDTH="80%" 1542ALIGN="LEFT" 1543VALIGN="TOP" 1544> an FTP context</TD 1545></TR 1546><TR 1547><TD 1548WIDTH="20%" 1549ALIGN="RIGHT" 1550VALIGN="TOP" 1551><I 1552CLASS="EMPHASIS" 1553>Returns</I 1554> :</TD 1555><TD 1556WIDTH="80%" 1557ALIGN="LEFT" 1558VALIGN="TOP" 1559>the code number</TD 1560></TR 1561></TABLE 1562><P 1563></P 1564></DIV 1565></DIV 1566><HR><DIV 1567CLASS="REFSECT2" 1568><A 1569NAME="AEN15290" 1570></A 1571><H3 1572><A 1573NAME="XMLNANOFTPCHECKRESPONSE" 1574></A 1575>xmlNanoFTPCheckResponse ()</H3 1576><TABLE 1577BORDER="0" 1578BGCOLOR="#D6E8FF" 1579WIDTH="100%" 1580CELLPADDING="6" 1581><TR 1582><TD 1583><PRE 1584CLASS="PROGRAMLISTING" 1585>int xmlNanoFTPCheckResponse (void *ctx);</PRE 1586></TD 1587></TR 1588></TABLE 1589><P 1590>Check if there is a response from the FTP server after a command.</P 1591><P 1592></P 1593><DIV 1594CLASS="INFORMALTABLE" 1595><P 1596></P 1597><TABLE 1598BORDER="0" 1599WIDTH="100%" 1600BGCOLOR="#FFD0D0" 1601CELLSPACING="0" 1602CELLPADDING="4" 1603CLASS="CALSTABLE" 1604><TR 1605><TD 1606WIDTH="20%" 1607ALIGN="RIGHT" 1608VALIGN="TOP" 1609><TT 1610CLASS="PARAMETER" 1611><I 1612>ctx</I 1613></TT 1614>:</TD 1615><TD 1616WIDTH="80%" 1617ALIGN="LEFT" 1618VALIGN="TOP" 1619> an FTP context</TD 1620></TR 1621><TR 1622><TD 1623WIDTH="20%" 1624ALIGN="RIGHT" 1625VALIGN="TOP" 1626><I 1627CLASS="EMPHASIS" 1628>Returns</I 1629> :</TD 1630><TD 1631WIDTH="80%" 1632ALIGN="LEFT" 1633VALIGN="TOP" 1634>the code number, or 0</TD 1635></TR 1636></TABLE 1637><P 1638></P 1639></DIV 1640></DIV 1641><HR><DIV 1642CLASS="REFSECT2" 1643><A 1644NAME="AEN15309" 1645></A 1646><H3 1647><A 1648NAME="XMLNANOFTPCWD" 1649></A 1650>xmlNanoFTPCwd ()</H3 1651><TABLE 1652BORDER="0" 1653BGCOLOR="#D6E8FF" 1654WIDTH="100%" 1655CELLPADDING="6" 1656><TR 1657><TD 1658><PRE 1659CLASS="PROGRAMLISTING" 1660>int xmlNanoFTPCwd (void *ctx, 1661 char *directory);</PRE 1662></TD 1663></TR 1664></TABLE 1665><P 1666>Tries to change the remote directory</P 1667><P 1668></P 1669><DIV 1670CLASS="INFORMALTABLE" 1671><P 1672></P 1673><TABLE 1674BORDER="0" 1675WIDTH="100%" 1676BGCOLOR="#FFD0D0" 1677CELLSPACING="0" 1678CELLPADDING="4" 1679CLASS="CALSTABLE" 1680><TR 1681><TD 1682WIDTH="20%" 1683ALIGN="RIGHT" 1684VALIGN="TOP" 1685><TT 1686CLASS="PARAMETER" 1687><I 1688>ctx</I 1689></TT 1690>:</TD 1691><TD 1692WIDTH="80%" 1693ALIGN="LEFT" 1694VALIGN="TOP" 1695> an FTP context</TD 1696></TR 1697><TR 1698><TD 1699WIDTH="20%" 1700ALIGN="RIGHT" 1701VALIGN="TOP" 1702><TT 1703CLASS="PARAMETER" 1704><I 1705>directory</I 1706></TT 1707>:</TD 1708><TD 1709WIDTH="80%" 1710ALIGN="LEFT" 1711VALIGN="TOP" 1712> a directory on the server</TD 1713></TR 1714><TR 1715><TD 1716WIDTH="20%" 1717ALIGN="RIGHT" 1718VALIGN="TOP" 1719><I 1720CLASS="EMPHASIS" 1721>Returns</I 1722> :</TD 1723><TD 1724WIDTH="80%" 1725ALIGN="LEFT" 1726VALIGN="TOP" 1727>-1 incase of error, 1 if CWD worked, 0 if it failed</TD 1728></TR 1729></TABLE 1730><P 1731></P 1732></DIV 1733></DIV 1734><HR><DIV 1735CLASS="REFSECT2" 1736><A 1737NAME="AEN15332" 1738></A 1739><H3 1740><A 1741NAME="XMLNANOFTPGETCONNECTION" 1742></A 1743>xmlNanoFTPGetConnection ()</H3 1744><TABLE 1745BORDER="0" 1746BGCOLOR="#D6E8FF" 1747WIDTH="100%" 1748CELLPADDING="6" 1749><TR 1750><TD 1751><PRE 1752CLASS="PROGRAMLISTING" 1753>int xmlNanoFTPGetConnection (void *ctx);</PRE 1754></TD 1755></TR 1756></TABLE 1757><P 1758>Try to open a data connection to the server. Currently only 1759passive mode is supported.</P 1760><P 1761></P 1762><DIV 1763CLASS="INFORMALTABLE" 1764><P 1765></P 1766><TABLE 1767BORDER="0" 1768WIDTH="100%" 1769BGCOLOR="#FFD0D0" 1770CELLSPACING="0" 1771CELLPADDING="4" 1772CLASS="CALSTABLE" 1773><TR 1774><TD 1775WIDTH="20%" 1776ALIGN="RIGHT" 1777VALIGN="TOP" 1778><TT 1779CLASS="PARAMETER" 1780><I 1781>ctx</I 1782></TT 1783>:</TD 1784><TD 1785WIDTH="80%" 1786ALIGN="LEFT" 1787VALIGN="TOP" 1788> an FTP context</TD 1789></TR 1790><TR 1791><TD 1792WIDTH="20%" 1793ALIGN="RIGHT" 1794VALIGN="TOP" 1795><I 1796CLASS="EMPHASIS" 1797>Returns</I 1798> :</TD 1799><TD 1800WIDTH="80%" 1801ALIGN="LEFT" 1802VALIGN="TOP" 1803>-1 incase of error, 0 otherwise</TD 1804></TR 1805></TABLE 1806><P 1807></P 1808></DIV 1809></DIV 1810><HR><DIV 1811CLASS="REFSECT2" 1812><A 1813NAME="AEN15351" 1814></A 1815><H3 1816><A 1817NAME="XMLNANOFTPCLOSECONNECTION" 1818></A 1819>xmlNanoFTPCloseConnection ()</H3 1820><TABLE 1821BORDER="0" 1822BGCOLOR="#D6E8FF" 1823WIDTH="100%" 1824CELLPADDING="6" 1825><TR 1826><TD 1827><PRE 1828CLASS="PROGRAMLISTING" 1829>int xmlNanoFTPCloseConnection (void *ctx);</PRE 1830></TD 1831></TR 1832></TABLE 1833><P 1834>Close the data connection from the server</P 1835><P 1836></P 1837><DIV 1838CLASS="INFORMALTABLE" 1839><P 1840></P 1841><TABLE 1842BORDER="0" 1843WIDTH="100%" 1844BGCOLOR="#FFD0D0" 1845CELLSPACING="0" 1846CELLPADDING="4" 1847CLASS="CALSTABLE" 1848><TR 1849><TD 1850WIDTH="20%" 1851ALIGN="RIGHT" 1852VALIGN="TOP" 1853><TT 1854CLASS="PARAMETER" 1855><I 1856>ctx</I 1857></TT 1858>:</TD 1859><TD 1860WIDTH="80%" 1861ALIGN="LEFT" 1862VALIGN="TOP" 1863> an FTP context</TD 1864></TR 1865><TR 1866><TD 1867WIDTH="20%" 1868ALIGN="RIGHT" 1869VALIGN="TOP" 1870><I 1871CLASS="EMPHASIS" 1872>Returns</I 1873> :</TD 1874><TD 1875WIDTH="80%" 1876ALIGN="LEFT" 1877VALIGN="TOP" 1878>-1 incase of error, 0 otherwise</TD 1879></TR 1880></TABLE 1881><P 1882></P 1883></DIV 1884></DIV 1885><HR><DIV 1886CLASS="REFSECT2" 1887><A 1888NAME="AEN15370" 1889></A 1890><H3 1891><A 1892NAME="XMLNANOFTPLIST" 1893></A 1894>xmlNanoFTPList ()</H3 1895><TABLE 1896BORDER="0" 1897BGCOLOR="#D6E8FF" 1898WIDTH="100%" 1899CELLPADDING="6" 1900><TR 1901><TD 1902><PRE 1903CLASS="PROGRAMLISTING" 1904>int xmlNanoFTPList (void *ctx, 1905 <A 1906HREF="libxml-nanoftp.html#FTPLISTCALLBACK" 1907>ftpListCallback</A 1908> callback, 1909 void *userData, 1910 char *filename);</PRE 1911></TD 1912></TR 1913></TABLE 1914><P 1915>Do a listing on the server. All files info are passed back 1916in the callbacks.</P 1917><P 1918></P 1919><DIV 1920CLASS="INFORMALTABLE" 1921><P 1922></P 1923><TABLE 1924BORDER="0" 1925WIDTH="100%" 1926BGCOLOR="#FFD0D0" 1927CELLSPACING="0" 1928CELLPADDING="4" 1929CLASS="CALSTABLE" 1930><TR 1931><TD 1932WIDTH="20%" 1933ALIGN="RIGHT" 1934VALIGN="TOP" 1935><TT 1936CLASS="PARAMETER" 1937><I 1938>ctx</I 1939></TT 1940>:</TD 1941><TD 1942WIDTH="80%" 1943ALIGN="LEFT" 1944VALIGN="TOP" 1945> an FTP context</TD 1946></TR 1947><TR 1948><TD 1949WIDTH="20%" 1950ALIGN="RIGHT" 1951VALIGN="TOP" 1952><TT 1953CLASS="PARAMETER" 1954><I 1955>callback</I 1956></TT 1957>:</TD 1958><TD 1959WIDTH="80%" 1960ALIGN="LEFT" 1961VALIGN="TOP" 1962> the user callback</TD 1963></TR 1964><TR 1965><TD 1966WIDTH="20%" 1967ALIGN="RIGHT" 1968VALIGN="TOP" 1969><TT 1970CLASS="PARAMETER" 1971><I 1972>userData</I 1973></TT 1974>:</TD 1975><TD 1976WIDTH="80%" 1977ALIGN="LEFT" 1978VALIGN="TOP" 1979> the user callback data</TD 1980></TR 1981><TR 1982><TD 1983WIDTH="20%" 1984ALIGN="RIGHT" 1985VALIGN="TOP" 1986><TT 1987CLASS="PARAMETER" 1988><I 1989>filename</I 1990></TT 1991>:</TD 1992><TD 1993WIDTH="80%" 1994ALIGN="LEFT" 1995VALIGN="TOP" 1996> optional files to list</TD 1997></TR 1998><TR 1999><TD 2000WIDTH="20%" 2001ALIGN="RIGHT" 2002VALIGN="TOP" 2003><I 2004CLASS="EMPHASIS" 2005>Returns</I 2006> :</TD 2007><TD 2008WIDTH="80%" 2009ALIGN="LEFT" 2010VALIGN="TOP" 2011>-1 incase of error, 0 otherwise</TD 2012></TR 2013></TABLE 2014><P 2015></P 2016></DIV 2017></DIV 2018><HR><DIV 2019CLASS="REFSECT2" 2020><A 2021NAME="AEN15402" 2022></A 2023><H3 2024><A 2025NAME="XMLNANOFTPGETSOCKET" 2026></A 2027>xmlNanoFTPGetSocket ()</H3 2028><TABLE 2029BORDER="0" 2030BGCOLOR="#D6E8FF" 2031WIDTH="100%" 2032CELLPADDING="6" 2033><TR 2034><TD 2035><PRE 2036CLASS="PROGRAMLISTING" 2037>int xmlNanoFTPGetSocket (void *ctx, 2038 const char *filename);</PRE 2039></TD 2040></TR 2041></TABLE 2042><P 2043>Initiate fetch of the given file from the server.</P 2044><P 2045></P 2046><DIV 2047CLASS="INFORMALTABLE" 2048><P 2049></P 2050><TABLE 2051BORDER="0" 2052WIDTH="100%" 2053BGCOLOR="#FFD0D0" 2054CELLSPACING="0" 2055CELLPADDING="4" 2056CLASS="CALSTABLE" 2057><TR 2058><TD 2059WIDTH="20%" 2060ALIGN="RIGHT" 2061VALIGN="TOP" 2062><TT 2063CLASS="PARAMETER" 2064><I 2065>ctx</I 2066></TT 2067>:</TD 2068><TD 2069WIDTH="80%" 2070ALIGN="LEFT" 2071VALIGN="TOP" 2072> an FTP context</TD 2073></TR 2074><TR 2075><TD 2076WIDTH="20%" 2077ALIGN="RIGHT" 2078VALIGN="TOP" 2079><TT 2080CLASS="PARAMETER" 2081><I 2082>filename</I 2083></TT 2084>:</TD 2085><TD 2086WIDTH="80%" 2087ALIGN="LEFT" 2088VALIGN="TOP" 2089> the file to retrieve (or NULL if path is in context).</TD 2090></TR 2091><TR 2092><TD 2093WIDTH="20%" 2094ALIGN="RIGHT" 2095VALIGN="TOP" 2096><I 2097CLASS="EMPHASIS" 2098>Returns</I 2099> :</TD 2100><TD 2101WIDTH="80%" 2102ALIGN="LEFT" 2103VALIGN="TOP" 2104>the socket for the data connection, or 0 in case of error</TD 2105></TR 2106></TABLE 2107><P 2108></P 2109></DIV 2110></DIV 2111><HR><DIV 2112CLASS="REFSECT2" 2113><A 2114NAME="AEN15425" 2115></A 2116><H3 2117><A 2118NAME="XMLNANOFTPGET" 2119></A 2120>xmlNanoFTPGet ()</H3 2121><TABLE 2122BORDER="0" 2123BGCOLOR="#D6E8FF" 2124WIDTH="100%" 2125CELLPADDING="6" 2126><TR 2127><TD 2128><PRE 2129CLASS="PROGRAMLISTING" 2130>int xmlNanoFTPGet (void *ctx, 2131 <A 2132HREF="libxml-nanoftp.html#FTPDATACALLBACK" 2133>ftpDataCallback</A 2134> callback, 2135 void *userData, 2136 const char *filename);</PRE 2137></TD 2138></TR 2139></TABLE 2140><P 2141>Fetch the given file from the server. All data are passed back 2142in the callbacks. The last callback has a size of 0 block.</P 2143><P 2144></P 2145><DIV 2146CLASS="INFORMALTABLE" 2147><P 2148></P 2149><TABLE 2150BORDER="0" 2151WIDTH="100%" 2152BGCOLOR="#FFD0D0" 2153CELLSPACING="0" 2154CELLPADDING="4" 2155CLASS="CALSTABLE" 2156><TR 2157><TD 2158WIDTH="20%" 2159ALIGN="RIGHT" 2160VALIGN="TOP" 2161><TT 2162CLASS="PARAMETER" 2163><I 2164>ctx</I 2165></TT 2166>:</TD 2167><TD 2168WIDTH="80%" 2169ALIGN="LEFT" 2170VALIGN="TOP" 2171> an FTP context</TD 2172></TR 2173><TR 2174><TD 2175WIDTH="20%" 2176ALIGN="RIGHT" 2177VALIGN="TOP" 2178><TT 2179CLASS="PARAMETER" 2180><I 2181>callback</I 2182></TT 2183>:</TD 2184><TD 2185WIDTH="80%" 2186ALIGN="LEFT" 2187VALIGN="TOP" 2188> the user callback</TD 2189></TR 2190><TR 2191><TD 2192WIDTH="20%" 2193ALIGN="RIGHT" 2194VALIGN="TOP" 2195><TT 2196CLASS="PARAMETER" 2197><I 2198>userData</I 2199></TT 2200>:</TD 2201><TD 2202WIDTH="80%" 2203ALIGN="LEFT" 2204VALIGN="TOP" 2205> the user callback data</TD 2206></TR 2207><TR 2208><TD 2209WIDTH="20%" 2210ALIGN="RIGHT" 2211VALIGN="TOP" 2212><TT 2213CLASS="PARAMETER" 2214><I 2215>filename</I 2216></TT 2217>:</TD 2218><TD 2219WIDTH="80%" 2220ALIGN="LEFT" 2221VALIGN="TOP" 2222> the file to retrieve</TD 2223></TR 2224><TR 2225><TD 2226WIDTH="20%" 2227ALIGN="RIGHT" 2228VALIGN="TOP" 2229><I 2230CLASS="EMPHASIS" 2231>Returns</I 2232> :</TD 2233><TD 2234WIDTH="80%" 2235ALIGN="LEFT" 2236VALIGN="TOP" 2237>-1 incase of error, 0 otherwise</TD 2238></TR 2239></TABLE 2240><P 2241></P 2242></DIV 2243></DIV 2244><HR><DIV 2245CLASS="REFSECT2" 2246><A 2247NAME="AEN15457" 2248></A 2249><H3 2250><A 2251NAME="XMLNANOFTPREAD" 2252></A 2253>xmlNanoFTPRead ()</H3 2254><TABLE 2255BORDER="0" 2256BGCOLOR="#D6E8FF" 2257WIDTH="100%" 2258CELLPADDING="6" 2259><TR 2260><TD 2261><PRE 2262CLASS="PROGRAMLISTING" 2263>int xmlNanoFTPRead (void *ctx, 2264 void *dest, 2265 int len);</PRE 2266></TD 2267></TR 2268></TABLE 2269><P 2270>This function tries to read <TT 2271CLASS="PARAMETER" 2272><I 2273>len</I 2274></TT 2275> bytes from the existing FTP connection 2276and saves them in <TT 2277CLASS="PARAMETER" 2278><I 2279>dest</I 2280></TT 2281>. This is a blocking call.</P 2282><P 2283></P 2284><DIV 2285CLASS="INFORMALTABLE" 2286><P 2287></P 2288><TABLE 2289BORDER="0" 2290WIDTH="100%" 2291BGCOLOR="#FFD0D0" 2292CELLSPACING="0" 2293CELLPADDING="4" 2294CLASS="CALSTABLE" 2295><TR 2296><TD 2297WIDTH="20%" 2298ALIGN="RIGHT" 2299VALIGN="TOP" 2300><TT 2301CLASS="PARAMETER" 2302><I 2303>ctx</I 2304></TT 2305>:</TD 2306><TD 2307WIDTH="80%" 2308ALIGN="LEFT" 2309VALIGN="TOP" 2310> the FTP context</TD 2311></TR 2312><TR 2313><TD 2314WIDTH="20%" 2315ALIGN="RIGHT" 2316VALIGN="TOP" 2317><TT 2318CLASS="PARAMETER" 2319><I 2320>dest</I 2321></TT 2322>:</TD 2323><TD 2324WIDTH="80%" 2325ALIGN="LEFT" 2326VALIGN="TOP" 2327> a buffer</TD 2328></TR 2329><TR 2330><TD 2331WIDTH="20%" 2332ALIGN="RIGHT" 2333VALIGN="TOP" 2334><TT 2335CLASS="PARAMETER" 2336><I 2337>len</I 2338></TT 2339>:</TD 2340><TD 2341WIDTH="80%" 2342ALIGN="LEFT" 2343VALIGN="TOP" 2344> the buffer length</TD 2345></TR 2346><TR 2347><TD 2348WIDTH="20%" 2349ALIGN="RIGHT" 2350VALIGN="TOP" 2351><I 2352CLASS="EMPHASIS" 2353>Returns</I 2354> :</TD 2355><TD 2356WIDTH="80%" 2357ALIGN="LEFT" 2358VALIGN="TOP" 2359>the number of byte read. 0 is an indication of an end of connection. 2360-1 indicates a parameter error.</TD 2361></TR 2362></TABLE 2363><P 2364></P 2365></DIV 2366></DIV 2367></DIV 2368><DIV 2369CLASS="NAVFOOTER" 2370><BR 2371CLEAR="all"><BR><TABLE 2372WIDTH="100%" 2373BORDER="0" 2374BGCOLOR="#000000" 2375CELLPADDING="1" 2376CELLSPACING="0" 2377><TR 2378><TD 2379WIDTH="25%" 2380BGCOLOR="#C00000" 2381ALIGN="left" 2382><A 2383HREF="libxml-nanohttp.html" 2384><FONT 2385COLOR="#FFFFFF" 2386SIZE="3" 2387><B 2388><<< Previous Page</B 2389></FONT 2390></A 2391></TD 2392><TD 2393WIDTH="25%" 2394BGCOLOR="#0000C0" 2395ALIGN="center" 2396><FONT 2397COLOR="#FFFFFF" 2398SIZE="3" 2399><B 2400><A 2401HREF="book1.html" 2402><FONT 2403COLOR="#FFFFFF" 2404SIZE="3" 2405><B 2406>Home</B 2407></FONT 2408></A 2409></B 2410></FONT 2411></TD 2412><TD 2413WIDTH="25%" 2414BGCOLOR="#00C000" 2415ALIGN="center" 2416><FONT 2417COLOR="#FFFFFF" 2418SIZE="3" 2419><B 2420><A 2421HREF="libxml-lib.html" 2422><FONT 2423COLOR="#FFFFFF" 2424SIZE="3" 2425><B 2426>Up</B 2427></FONT 2428></A 2429></B 2430></FONT 2431></TD 2432><TD 2433WIDTH="25%" 2434BGCOLOR="#C00000" 2435ALIGN="right" 2436><A 2437HREF="libxml-xmlio.html" 2438><FONT 2439COLOR="#FFFFFF" 2440SIZE="3" 2441><B 2442>Next Page >>></B 2443></FONT 2444></A 2445></TD 2446></TR 2447><TR 2448><TD 2449COLSPAN="2" 2450ALIGN="left" 2451><FONT 2452COLOR="#FFFFFF" 2453SIZE="3" 2454><B 2455>nanohttp</B 2456></FONT 2457></TD 2458><TD 2459COLSPAN="2" 2460ALIGN="right" 2461><FONT 2462COLOR="#FFFFFF" 2463SIZE="3" 2464><B 2465>xmlIO</B 2466></FONT 2467></TD 2468></TR 2469></TABLE 2470></DIV 2471></BODY 2472></HTML 2473>