<refentry id="liblivejournal-protocol">
<refmeta>
<refentrytitle>protocol</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBLIVEJOURNAL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>protocol</refname><refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>



struct      <link linkend="LJRequest">LJRequest</link>;
<link linkend="LJRequest">LJRequest</link>*  <link linkend="lj-request-new">lj_request_new</link>                  (<link linkend="LJUser">LJUser</link> *user,
                                             const char *mode);
<link linkend="LJRequest">LJRequest</link>*  <link linkend="lj-request-new-without-auth">lj_request_new_without_auth</link>     (<link linkend="LJUser">LJUser</link> *user,
                                             const char *mode);
void        <link linkend="lj-request-free">lj_request_free</link>                 (<link linkend="LJRequest">LJRequest</link> *request);
void        <link linkend="lj-request-add">lj_request_add</link>                  (<link linkend="LJRequest">LJRequest</link> *request,
                                             const char *key,
                                             const char *val);
void        <link linkend="lj-request-add-int">lj_request_add_int</link>              (<link linkend="LJRequest">LJRequest</link> *request,
                                             const char *key,
                                             int val);
<link linkend="GString">GString</link>*    <link linkend="lj-request-to-string">lj_request_to_string</link>            (<link linkend="LJRequest">LJRequest</link> *request);
<link linkend="LJUser">LJUser</link>*     <link linkend="lj-request-get-user">lj_request_get_user</link>             (<link linkend="LJRequest">LJRequest</link> *request);
void        <link linkend="lj-request-dump">lj_request_dump</link>                 (<link linkend="LJRequest">LJRequest</link> *request);
void        <link linkend="lj-request-use-challenge">lj_request_use_challenge</link>        (<link linkend="LJRequest">LJRequest</link> *request,
                                             <link linkend="LJChallenge">LJChallenge</link> challenge);
struct      <link linkend="LJResult">LJResult</link>;
<link linkend="LJResult">LJResult</link>*   <link linkend="lj-result-new-from-response">lj_result_new_from_response</link>     (const char *res);
void        <link linkend="lj-result-free">lj_result_free</link>                  (<link linkend="LJResult">LJResult</link> *result);
<link linkend="gboolean">gboolean</link>    <link linkend="lj-result-succeeded">lj_result_succeeded</link>             (<link linkend="LJResult">LJResult</link> *result);
char*       <link linkend="lj-result-get">lj_result_get</link>                   (<link linkend="LJResult">LJResult</link> *result,
                                             const char *key);
int         <link linkend="lj-result-get-int">lj_result_get_int</link>               (<link linkend="LJResult">LJResult</link> *result,
                                             const char *key);
char*       <link linkend="lj-result-getf">lj_result_getf</link>                  (<link linkend="LJResult">LJResult</link> *result,
                                             const char *key,
                                             ...);
int         <link linkend="lj-result-getf-int">lj_result_getf_int</link>              (<link linkend="LJResult">LJResult</link> *result,
                                             const char *key,
                                             ...);
char*       <link linkend="lj-urlencode">lj_urlencode</link>                    (unsigned char *string);
unsigned char* <link linkend="lj-urldecode">lj_urldecode</link>                 (char *string);
</synopsis>
</refsynopsisdiv>







<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="LJRequest">struct LJRequest</title>
<programlisting>struct LJRequest;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="lj-request-new">lj_request_new ()</title>
<programlisting><link linkend="LJRequest">LJRequest</link>*  lj_request_new                  (<link linkend="LJUser">LJUser</link> *user,
                                             const char *mode);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>user</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-request-new-without-auth">lj_request_new_without_auth ()</title>
<programlisting><link linkend="LJRequest">LJRequest</link>*  lj_request_new_without_auth     (<link linkend="LJUser">LJUser</link> *user,
                                             const char *mode);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>user</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-request-free">lj_request_free ()</title>
<programlisting>void        lj_request_free                 (<link linkend="LJRequest">LJRequest</link> *request);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>request</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-request-add">lj_request_add ()</title>
<programlisting>void        lj_request_add                  (<link linkend="LJRequest">LJRequest</link> *request,
                                             const char *key,
                                             const char *val);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>request</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>val</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-request-add-int">lj_request_add_int ()</title>
<programlisting>void        lj_request_add_int              (<link linkend="LJRequest">LJRequest</link> *request,
                                             const char *key,
                                             int val);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>request</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>val</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-request-to-string">lj_request_to_string ()</title>
<programlisting><link linkend="GString">GString</link>*    lj_request_to_string            (<link linkend="LJRequest">LJRequest</link> *request);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>request</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-request-get-user">lj_request_get_user ()</title>
<programlisting><link linkend="LJUser">LJUser</link>*     lj_request_get_user             (<link linkend="LJRequest">LJRequest</link> *request);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>request</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-request-dump">lj_request_dump ()</title>
<programlisting>void        lj_request_dump                 (<link linkend="LJRequest">LJRequest</link> *request);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>request</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-request-use-challenge">lj_request_use_challenge ()</title>
<programlisting>void        lj_request_use_challenge        (<link linkend="LJRequest">LJRequest</link> *request,
                                             <link linkend="LJChallenge">LJChallenge</link> challenge);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>request</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>challenge</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="LJResult">struct LJResult</title>
<programlisting>struct LJResult;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="lj-result-new-from-response">lj_result_new_from_response ()</title>
<programlisting><link linkend="LJResult">LJResult</link>*   lj_result_new_from_response     (const char *res);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>res</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-result-free">lj_result_free ()</title>
<programlisting>void        lj_result_free                  (<link linkend="LJResult">LJResult</link> *result);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-result-succeeded">lj_result_succeeded ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    lj_result_succeeded             (<link linkend="LJResult">LJResult</link> *result);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-result-get">lj_result_get ()</title>
<programlisting>char*       lj_result_get                   (<link linkend="LJResult">LJResult</link> *result,
                                             const char *key);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-result-get-int">lj_result_get_int ()</title>
<programlisting>int         lj_result_get_int               (<link linkend="LJResult">LJResult</link> *result,
                                             const char *key);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-result-getf">lj_result_getf ()</title>
<programlisting>char*       lj_result_getf                  (<link linkend="LJResult">LJResult</link> *result,
                                             const char *key,
                                             ...);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-result-getf-int">lj_result_getf_int ()</title>
<programlisting>int         lj_result_getf_int              (<link linkend="LJResult">LJResult</link> *result,
                                             const char *key,
                                             ...);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-urlencode">lj_urlencode ()</title>
<programlisting>char*       lj_urlencode                    (unsigned char *string);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="lj-urldecode">lj_urldecode ()</title>
<programlisting>unsigned char* lj_urldecode                 (char *string);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
