<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libedataserver-e-url">
<refmeta>
<refentrytitle role="top_of_page" id="libedataserver-e-url.top_of_page">EUrl</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBEDATASERVER Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>EUrl</refname>
<refpurpose>A URI data structure and associated functions.</refpurpose>
</refnamediv>

<refsynopsisdiv id="libedataserver-e-url.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
<link linkend="char">char</link> *              <link linkend="e-url-shroud">e_url_shroud</link>                        (const <link linkend="char">char</link> *url);
<link linkend="gboolean">gboolean</link>            <link linkend="e-url-equal">e_url_equal</link>                         (const <link linkend="char">char</link> *url1,
                                                         const <link linkend="char">char</link> *url2);
                    <link linkend="EUri">EUri</link>;
<link linkend="EUri">EUri</link> *              <link linkend="e-uri-new">e_uri_new</link>                           (const <link linkend="char">char</link> *uri_string);
<link linkend="void">void</link>                <link linkend="e-uri-free">e_uri_free</link>                          (<link linkend="EUri">EUri</link> *uri);
const <link linkend="char">char</link> *        <link linkend="e-uri-get-param">e_uri_get_param</link>                     (<link linkend="EUri">EUri</link> *uri,
                                                         const <link linkend="char">char</link> *name);
<link linkend="EUri">EUri</link> *              <link linkend="e-uri-copy">e_uri_copy</link>                          (<link linkend="EUri">EUri</link> *uri);
<link linkend="char">char</link> *              <link linkend="e-uri-to-string">e_uri_to_string</link>                     (<link linkend="EUri">EUri</link> *uri,
                                                         <link linkend="gboolean">gboolean</link> show_password);
</synopsis>
</refsynopsisdiv>









<refsect1 id="libedataserver-e-url.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>
</refsect1>

<refsect1 id="libedataserver-e-url.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="e-url-shroud" role="function">
<title>e_url_shroud ()</title>
<indexterm zone="e-url-shroud"><primary sortas="e_url_shroud">e_url_shroud</primary></indexterm><programlisting><link linkend="char">char</link> *              e_url_shroud                        (const <link linkend="char">char</link> *url);</programlisting>
<para>
Removes the moniker (i.e. mailto:) from a url.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>url</parameter>&#160;:</term>
<listitem><simpara> The url to shroud.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The newly-allocated shrouded url.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-url-equal" role="function">
<title>e_url_equal ()</title>
<indexterm zone="e-url-equal"><primary sortas="e_url_equal">e_url_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            e_url_equal                         (const <link linkend="char">char</link> *url1,
                                                         const <link linkend="char">char</link> *url2);</programlisting>
<para>
Checks two urls for equality, after first removing any monikers on
the urls.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>url1</parameter>&#160;:</term>
<listitem><simpara> The first url to compare.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>url2</parameter>&#160;:</term>
<listitem><simpara> The second url to compare.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the urls are equal, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> if they are not.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="EUri" role="struct">
<title>EUri</title>
<indexterm zone="EUri"><primary sortas="EUri">EUri</primary></indexterm><programlisting>typedef struct {
	char  *protocol;
	char  *user;
	char  *authmech;
	char  *passwd;
	char  *host;
	int    port;
	char  *path;
	GData *params;
	char  *query;
	char  *fragment;
} EUri;
</programlisting>
<para>
A structure representing a URI.</para>
<para>
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="char">char</link>&#160;*<structfield>protocol</structfield>;</term>
<listitem><simpara> The protocol to use.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="char">char</link>&#160;*<structfield>user</structfield>;</term>
<listitem><simpara> A user name.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="char">char</link>&#160;*<structfield>authmech</structfield>;</term>
<listitem><simpara> The authentication mechanism.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="char">char</link>&#160;*<structfield>passwd</structfield>;</term>
<listitem><simpara> The connection password.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="char">char</link>&#160;*<structfield>host</structfield>;</term>
<listitem><simpara> The host name.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="int">int</link>&#160;<structfield>port</structfield>;</term>
<listitem><simpara> The port number.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="char">char</link>&#160;*<structfield>path</structfield>;</term>
<listitem><simpara> The file path on the host.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="GData">GData</link>&#160;*<structfield>params</structfield>;</term>
<listitem><simpara> Additional parameters.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="char">char</link>&#160;*<structfield>query</structfield>;</term>
<listitem><simpara>
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="char">char</link>&#160;*<structfield>fragment</structfield>;</term>
<listitem><simpara>
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="e-uri-new" role="function">
<title>e_uri_new ()</title>
<indexterm zone="e-uri-new"><primary sortas="e_uri_new">e_uri_new</primary></indexterm><programlisting><link linkend="EUri">EUri</link> *              e_uri_new                           (const <link linkend="char">char</link> *uri_string);</programlisting>
<para>
Creates an <link linkend="EUri"><type>EUri</type></link> representation of the uri given in <parameter>uri_string</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>uri_string</parameter>&#160;:</term>
<listitem><simpara> The uri to represent as an <link linkend="EUri"><type>EUri</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The newly-allocated <link linkend="EUri"><type>EUri</type></link> structure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-uri-free" role="function">
<title>e_uri_free ()</title>
<indexterm zone="e-uri-free"><primary sortas="e_uri_free">e_uri_free</primary></indexterm><programlisting><link linkend="void">void</link>                e_uri_free                          (<link linkend="EUri">EUri</link> *uri);</programlisting>
<para>
Frees the memory of an <link linkend="EUri"><type>EUri</type></link> structure.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&#160;:</term>
<listitem><simpara> A pointer to the <link linkend="EUri"><type>EUri</type></link> to free.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-uri-get-param" role="function">
<title>e_uri_get_param ()</title>
<indexterm zone="e-uri-get-param"><primary sortas="e_uri_get_param">e_uri_get_param</primary></indexterm><programlisting>const <link linkend="char">char</link> *        e_uri_get_param                     (<link linkend="EUri">EUri</link> *uri,
                                                         const <link linkend="char">char</link> *name);</programlisting>
<para>
Retrieves the value of the parameter associated with <parameter>name</parameter> in <parameter>uri</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&#160;:</term>
<listitem><simpara> The <link linkend="EUri"><type>EUri</type></link> to get the parameter from.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> The name of the parameter to get.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The value of the parameter.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-uri-copy" role="function">
<title>e_uri_copy ()</title>
<indexterm zone="e-uri-copy"><primary sortas="e_uri_copy">e_uri_copy</primary></indexterm><programlisting><link linkend="EUri">EUri</link> *              e_uri_copy                          (<link linkend="EUri">EUri</link> *uri);</programlisting>
<para>
Makes a copy of <parameter>uri</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&#160;:</term>
<listitem><simpara> The <link linkend="EUri"><type>EUri</type></link> to copy.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The newly-allocated copy of <parameter>uri</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="e-uri-to-string" role="function">
<title>e_uri_to_string ()</title>
<indexterm zone="e-uri-to-string"><primary sortas="e_uri_to_string">e_uri_to_string</primary></indexterm><programlisting><link linkend="char">char</link> *              e_uri_to_string                     (<link linkend="EUri">EUri</link> *uri,
                                                         <link linkend="gboolean">gboolean</link> show_password);</programlisting>
<para>
Creates a string representation of <parameter>uri</parameter>. The password will only be
included in the string if <parameter>show_password</parameter> is set to <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&#160;:</term>
<listitem><simpara> The <link linkend="EUri"><type>EUri</type></link> to convert to a string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>show_password</parameter>&#160;:</term>
<listitem><simpara> Whether or not to show the password in the string.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The string representation of <parameter>uri</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
