diff options
Diffstat (limited to 'doc/html/gnome-xml-nanohttp.html')
-rw-r--r-- | doc/html/gnome-xml-nanohttp.html | 945 |
1 files changed, 945 insertions, 0 deletions
diff --git a/doc/html/gnome-xml-nanohttp.html b/doc/html/gnome-xml-nanohttp.html new file mode 100644 index 00000000..14244a92 --- /dev/null +++ b/doc/html/gnome-xml-nanohttp.html @@ -0,0 +1,945 @@ +<HTML +><HEAD +><TITLE +>nanohttp</TITLE +><META +NAME="GENERATOR" +CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK +REL="HOME" +TITLE="Gnome XML Library Reference Manual" +HREF="book1.html"><LINK +REL="UP" +TITLE="Gnome XML Library" +HREF="libxml.html"><LINK +REL="PREVIOUS" +TITLE="xmlmemory" +HREF="gnome-xml-xmlmemory.html"></HEAD +><BODY +BGCOLOR="#FFFFFF" +TEXT="#000000" +><DIV +CLASS="NAVHEADER" +><TABLE +WIDTH="100%" +BORDER="0" +BGCOLOR="#000000" +CELLPADDING="1" +CELLSPACING="0" +><TR +><TH +COLSPAN="4" +ALIGN="center" +><FONT +COLOR="#FFFFFF" +SIZE="5" +>Gnome XML Library Reference Manual</FONT +></TH +></TR +><TR +><TD +WIDTH="25%" +BGCOLOR="#C00000" +ALIGN="left" +><A +HREF="gnome-xml-xmlmemory.html" +><FONT +COLOR="#FFFFFF" +SIZE="3" +><B +><<< Previous Page</B +></FONT +></A +></TD +><TD +WIDTH="25%" +BGCOLOR="#0000C0" +ALIGN="center" +><FONT +COLOR="#FFFFFF" +SIZE="3" +><B +><A +HREF="book1.html" +><FONT +COLOR="#FFFFFF" +SIZE="3" +><B +>Home</B +></FONT +></A +></B +></FONT +></TD +><TD +WIDTH="25%" +BGCOLOR="#00C000" +ALIGN="center" +><FONT +COLOR="#FFFFFF" +SIZE="3" +><B +><A +HREF="libxml.html" +><FONT +COLOR="#FFFFFF" +SIZE="3" +><B +>Up</B +></FONT +></A +></B +></FONT +></TD +><TD +WIDTH="25%" +BGCOLOR="#C00000" +ALIGN="right" +> </TD +></TR +></TABLE +></DIV +><H1 +>nanohttp</H1 +><DIV +CLASS="REFNAMEDIV" +><A +NAME="AEN9064" +></A +><H2 +>Name</H2 +>nanohttp — </DIV +><DIV +CLASS="REFSYNOPSISDIV" +><A +NAME="AEN9067" +></A +><H2 +>Synopsis</H2 +><TABLE +BORDER="0" +BGCOLOR="#D6E8FF" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="SYNOPSIS" +> + +int <A +HREF="gnome-xml-nanohttp.html#XMLNANOHTTPFETCH" +>xmlNanoHTTPFetch</A +> (const char *URL, + const char *filename); +void* <A +HREF="gnome-xml-nanohttp.html#XMLNANOHTTPMETHOD" +>xmlNanoHTTPMethod</A +> (const char *URL, + const char *method, + const char *input, + char **contentType, + const char *headers); +void* <A +HREF="gnome-xml-nanohttp.html#XMLNANOHTTPOPEN" +>xmlNanoHTTPOpen</A +> (const char *URL, + char **contentType); +int <A +HREF="gnome-xml-nanohttp.html#XMLNANOHTTPRETURNCODE" +>xmlNanoHTTPReturnCode</A +> (void *ctx); +int <A +HREF="gnome-xml-nanohttp.html#XMLNANOHTTPREAD" +>xmlNanoHTTPRead</A +> (void *ctx, + void *dest, + int len); +int <A +HREF="gnome-xml-nanohttp.html#XMLNANOHTTPSAVE" +>xmlNanoHTTPSave</A +> (void *ctxt, + const char *filename); +void <A +HREF="gnome-xml-nanohttp.html#XMLNANOHTTPCLOSE" +>xmlNanoHTTPClose</A +> (void *ctx);</PRE +></TD +></TR +></TABLE +></DIV +><DIV +CLASS="REFSECT1" +><A +NAME="AEN9077" +></A +><H2 +>Description</H2 +><P +></P +></DIV +><DIV +CLASS="REFSECT1" +><A +NAME="AEN9080" +></A +><H2 +>Details</H2 +><DIV +CLASS="REFSECT2" +><A +NAME="AEN9082" +></A +><H3 +><A +NAME="XMLNANOHTTPFETCH" +></A +>xmlNanoHTTPFetch ()</H3 +><TABLE +BORDER="0" +BGCOLOR="#D6E8FF" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>int xmlNanoHTTPFetch (const char *URL, + const char *filename);</PRE +></TD +></TR +></TABLE +><P +>This function try to fetch the indicated resource via HTTP GET +and save it's content in the file.</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFD0D0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>URL</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> The URL to load</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>filename</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the filename where the content should be saved</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><I +CLASS="EMPHASIS" +>Returns</I +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +>-1 in case of failure, 0 incase of success. The contentType, +if provided must be freed by the caller</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN9105" +></A +><H3 +><A +NAME="XMLNANOHTTPMETHOD" +></A +>xmlNanoHTTPMethod ()</H3 +><TABLE +BORDER="0" +BGCOLOR="#D6E8FF" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void* xmlNanoHTTPMethod (const char *URL, + const char *method, + const char *input, + char **contentType, + const char *headers);</PRE +></TD +></TR +></TABLE +><P +>This function try to open a connection to the indicated resource +via HTTP using the given <TT +CLASS="PARAMETER" +><I +>method</I +></TT +>, adding the given extra headers +and the input buffer for the request content.</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFD0D0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>URL</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> The URL to load</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>method</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the HTTP method to use</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>input</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the input string if any</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>contentType</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the Content-Type information IN and OUT</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>headers</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the extra headers</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN9137" +></A +><H3 +><A +NAME="XMLNANOHTTPOPEN" +></A +>xmlNanoHTTPOpen ()</H3 +><TABLE +BORDER="0" +BGCOLOR="#D6E8FF" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void* xmlNanoHTTPOpen (const char *URL, + char **contentType);</PRE +></TD +></TR +></TABLE +><P +>This function try to open a connection to the indicated resource +via HTTP GET.</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFD0D0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>URL</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> The URL to load</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>contentType</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> if available the Content-Type information will be +returned at that location</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN9156" +></A +><H3 +><A +NAME="XMLNANOHTTPRETURNCODE" +></A +>xmlNanoHTTPReturnCode ()</H3 +><TABLE +BORDER="0" +BGCOLOR="#D6E8FF" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>int xmlNanoHTTPReturnCode (void *ctx);</PRE +></TD +></TR +></TABLE +><P +></P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFD0D0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctx</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the HTTP context</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><I +CLASS="EMPHASIS" +>Returns</I +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +>the HTTP return code for the request.</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN9175" +></A +><H3 +><A +NAME="XMLNANOHTTPREAD" +></A +>xmlNanoHTTPRead ()</H3 +><TABLE +BORDER="0" +BGCOLOR="#D6E8FF" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>int xmlNanoHTTPRead (void *ctx, + void *dest, + int len);</PRE +></TD +></TR +></TABLE +><P +>This function tries to read <TT +CLASS="PARAMETER" +><I +>len</I +></TT +> bytes from the existing HTTP connection +and saves them in <TT +CLASS="PARAMETER" +><I +>dest</I +></TT +>. This is a blocking call.</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFD0D0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctx</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the HTTP context</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>dest</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> a buffer</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>len</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the buffer length</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><I +CLASS="EMPHASIS" +>Returns</I +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +>the number of byte read. 0 is an indication of an end of connection. +-1 indicates a parameter error.</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN9204" +></A +><H3 +><A +NAME="XMLNANOHTTPSAVE" +></A +>xmlNanoHTTPSave ()</H3 +><TABLE +BORDER="0" +BGCOLOR="#D6E8FF" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>int xmlNanoHTTPSave (void *ctxt, + const char *filename);</PRE +></TD +></TR +></TABLE +><P +>This function saves the output of the HTTP transaction to a file +It closes and free the context at the end</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFD0D0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctxt</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>filename</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the filename where the content should be saved</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><I +CLASS="EMPHASIS" +>Returns</I +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +>-1 in case of failure, 0 incase of success.</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN9227" +></A +><H3 +><A +NAME="XMLNANOHTTPCLOSE" +></A +>xmlNanoHTTPClose ()</H3 +><TABLE +BORDER="0" +BGCOLOR="#D6E8FF" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void xmlNanoHTTPClose (void *ctx);</PRE +></TD +></TR +></TABLE +><P +>This function closes an HTTP context, it ends up the connection and +free all data related to it.</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFD0D0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctx</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the HTTP context</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +></DIV +><DIV +CLASS="NAVFOOTER" +><BR +CLEAR="all"><BR><TABLE +WIDTH="100%" +BORDER="0" +BGCOLOR="#000000" +CELLPADDING="1" +CELLSPACING="0" +><TR +><TD +WIDTH="25%" +BGCOLOR="#C00000" +ALIGN="left" +><A +HREF="gnome-xml-xmlmemory.html" +><FONT +COLOR="#FFFFFF" +SIZE="3" +><B +><<< Previous Page</B +></FONT +></A +></TD +><TD +WIDTH="25%" +BGCOLOR="#0000C0" +ALIGN="center" +><FONT +COLOR="#FFFFFF" +SIZE="3" +><B +><A +HREF="book1.html" +><FONT +COLOR="#FFFFFF" +SIZE="3" +><B +>Home</B +></FONT +></A +></B +></FONT +></TD +><TD +WIDTH="25%" +BGCOLOR="#00C000" +ALIGN="center" +><FONT +COLOR="#FFFFFF" +SIZE="3" +><B +><A +HREF="libxml.html" +><FONT +COLOR="#FFFFFF" +SIZE="3" +><B +>Up</B +></FONT +></A +></B +></FONT +></TD +><TD +WIDTH="25%" +BGCOLOR="#C00000" +ALIGN="right" +> </TD +></TR +><TR +><TD +COLSPAN="2" +ALIGN="left" +><FONT +COLOR="#FFFFFF" +SIZE="3" +><B +>xmlmemory</B +></FONT +></TD +><TD +COLSPAN="2" +ALIGN="right" +> </TD +></TR +></TABLE +></DIV +></BODY +></HTML +>
\ No newline at end of file |