<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations.  -->
<repository version="1.2"
            xmlns="http://www.gtk.org/introspection/core/1.0"
            xmlns:c="http://www.gtk.org/introspection/c/1.0"
            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
  <include name="GObject" version="2.0"/>
  <include name="Gio" version="2.0"/>
  <include name="Soup" version="2.4"/>
  <c:include name="net/grl-net.h"/>
  <namespace name="GrlNet"
             version="0.3"
             shared-library="libgrlnet-0.3.so.0.0,libgrilo-0.3.so.0.1"
             c:identifier-prefixes="GrlNet"
             c:symbol-prefixes="grl_net">
    <class name="Wc"
           c:symbol-prefix="wc"
           c:type="GrlNetWc"
           parent="GObject.Object"
           glib:type-name="GrlNetWc"
           glib:get-type="grl_net_wc_get_type"
           glib:type-struct="WcClass">
      <constructor name="new" c:identifier="grl_net_wc_new">
        <doc xml:space="preserve">Creates a new #GrlNetWc.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a new allocated instance of #GrlNetWc. Do g_object_unref() after
use it.</doc>
          <type name="Wc" c:type="GrlNetWc*"/>
        </return-value>
      </constructor>
      <function name="error_quark" c:identifier="grl_net_wc_error_quark">
        <return-value transfer-ownership="none">
          <type name="GLib.Quark" c:type="GQuark"/>
        </return-value>
      </function>
      <method name="flush_delayed_requests"
              c:identifier="grl_net_wc_flush_delayed_requests">
        <doc xml:space="preserve">This method will flush all the pending request in the queue.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve">a #GrlNetWc instance</doc>
            <type name="Wc" c:type="GrlNetWc*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="request_async" c:identifier="grl_net_wc_request_async">
        <doc xml:space="preserve">Request the fetching of a web resource given the @uri. This request is
asynchronous, thus the result will be returned within the @callback.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve">a #GrlNetWc instance</doc>
            <type name="Wc" c:type="GrlNetWc*"/>
          </instance-parameter>
          <parameter name="uri" transfer-ownership="none">
            <doc xml:space="preserve">The URI of the resource to request</doc>
            <type name="utf8" c:type="const char*"/>
          </parameter>
          <parameter name="cancellable"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">a #GCancellable instance or %NULL to ignore</doc>
            <type name="Gio.Cancellable" c:type="GCancellable*"/>
          </parameter>
          <parameter name="callback"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1"
                     scope="async"
                     closure="3">
            <doc xml:space="preserve">The callback when the result is ready</doc>
            <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
          </parameter>
          <parameter name="user_data"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">User data set for the @callback</doc>
            <type name="gpointer" c:type="gpointer"/>
          </parameter>
        </parameters>
      </method>
      <method name="request_finish"
              c:identifier="grl_net_wc_request_finish"
              throws="1">
        <doc xml:space="preserve">Finishes an asynchronous load of the file's contents.
The contents are placed in contents, and length is set to the size of the
contents string.

The content address will be invalidated at the next request. So if you
want to keep it, please copy it into another address.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the request was successfull. If %FALSE an error occurred.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve">a #GrlNetWc instance</doc>
            <type name="Wc" c:type="GrlNetWc*"/>
          </instance-parameter>
          <parameter name="result" transfer-ownership="none">
            <doc xml:space="preserve">The result of the request</doc>
            <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
          </parameter>
          <parameter name="content"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="none"
                     optional="1"
                     allow-none="1">
            <doc xml:space="preserve">The contents of the resource</doc>
            <type name="utf8" c:type="gchar**"/>
          </parameter>
          <parameter name="length"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full"
                     optional="1"
                     allow-none="1">
            <doc xml:space="preserve">The length of the contents or %NULL if it is not
needed</doc>
            <type name="gsize" c:type="gsize*"/>
          </parameter>
        </parameters>
      </method>
      <method name="request_with_headers_async"
              c:identifier="grl_net_wc_request_with_headers_async"
              shadowed-by="request_with_headers_hash_async"
              version="0.2.2"
              introspectable="0">
        <doc xml:space="preserve">Request the fetching of a web resource given the @uri. This request is
asynchronous, thus the result will be returned within the @callback.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve">a #GrlNetWc instance</doc>
            <type name="Wc" c:type="GrlNetWc*"/>
          </instance-parameter>
          <parameter name="uri" transfer-ownership="none">
            <doc xml:space="preserve">The URI of the resource to request</doc>
            <type name="utf8" c:type="const char*"/>
          </parameter>
          <parameter name="cancellable"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">a #GCancellable instance or %NULL to ignore</doc>
            <type name="Gio.Cancellable" c:type="GCancellable*"/>
          </parameter>
          <parameter name="callback"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1"
                     scope="async"
                     closure="3">
            <doc xml:space="preserve">The callback when the result is ready</doc>
            <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
          </parameter>
          <parameter name="user_data"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">User data set for the @callback</doc>
            <type name="gpointer" c:type="gpointer"/>
          </parameter>
          <parameter name="..." transfer-ownership="none">
            <doc xml:space="preserve">List of tuples of header name and header value, terminated by
%NULL.</doc>
            <varargs/>
          </parameter>
        </parameters>
      </method>
      <method name="request_with_headers_hash_async"
              c:identifier="grl_net_wc_request_with_headers_hash_async"
              shadows="request_with_headers_async"
              version="0.2.2">
        <doc xml:space="preserve">Request the fetching of a web resource given the @uri. This request is
asynchronous, thus the result will be returned within the @callback.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve">a #GrlNetWc instance</doc>
            <type name="Wc" c:type="GrlNetWc*"/>
          </instance-parameter>
          <parameter name="uri" transfer-ownership="none">
            <doc xml:space="preserve">The URI of the resource to request</doc>
            <type name="utf8" c:type="const char*"/>
          </parameter>
          <parameter name="headers"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">a set of additional HTTP
headers for this request or %NULL to ignore</doc>
            <type name="GLib.HashTable" c:type="GHashTable*">
              <type name="utf8"/>
              <type name="utf8"/>
            </type>
          </parameter>
          <parameter name="cancellable"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">a #GCancellable instance or %NULL to ignore</doc>
            <type name="Gio.Cancellable" c:type="GCancellable*"/>
          </parameter>
          <parameter name="callback"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1"
                     scope="async"
                     closure="4">
            <doc xml:space="preserve">The callback when the result is ready</doc>
            <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
          </parameter>
          <parameter name="user_data"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">User data set for the @callback</doc>
            <type name="gpointer" c:type="gpointer"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_cache"
              c:identifier="grl_net_wc_set_cache"
              version="0.1.12">
        <doc xml:space="preserve">Sets if cache must be used. Note that this will only work if caching is
supporting.  If sets %TRUE, a new cache will be created. If sets to %FALSE,
current cache is clean and removed.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve">a #GrlNetWc instance</doc>
            <type name="Wc" c:type="GrlNetWc*"/>
          </instance-parameter>
          <parameter name="use_cache" transfer-ownership="none">
            <doc xml:space="preserve">if cache must be used or not</doc>
            <type name="gboolean" c:type="gboolean"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_cache_size"
              c:identifier="grl_net_wc_set_cache_size"
              version="0.1.12">
        <doc xml:space="preserve">Sets the new maximum size of cache, in Megabytes. Default value is 10. Using
0 means no cache will be done.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve">a #GrlNetWc instance</doc>
            <type name="Wc" c:type="GrlNetWc*"/>
          </instance-parameter>
          <parameter name="cache_size" transfer-ownership="none">
            <doc xml:space="preserve">size of cache (in Mb)</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_log_level" c:identifier="grl_net_wc_set_log_level">
        <doc xml:space="preserve">Setting the log level the logger feature is added into
the libsoup session.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve">a #GrlNetWc instance</doc>
            <type name="Wc" c:type="GrlNetWc*"/>
          </instance-parameter>
          <parameter name="log_level" transfer-ownership="none">
            <doc xml:space="preserve">the libsoup log level to set [0,3]</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_throttling" c:identifier="grl_net_wc_set_throttling">
        <doc xml:space="preserve">Setting this property, the #GrlNetWc will queue all the requests and
will dispatch them with a pause between them of this value.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve">a #GrlNetWc instance</doc>
            <type name="Wc" c:type="GrlNetWc*"/>
          </instance-parameter>
          <parameter name="throttling" transfer-ownership="none">
            <doc xml:space="preserve">the number of seconds to wait between requests</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
      <property name="cache"
                writable="1"
                construct="1"
                transfer-ownership="none">
        <type name="gboolean" c:type="gboolean"/>
      </property>
      <property name="cache-size"
                writable="1"
                construct="1"
                transfer-ownership="none">
        <type name="guint" c:type="guint"/>
      </property>
      <property name="loglevel" writable="1" transfer-ownership="none">
        <type name="guint" c:type="guint"/>
      </property>
      <property name="throttling" writable="1" transfer-ownership="none">
        <type name="guint" c:type="guint"/>
      </property>
      <property name="user-agent"
                writable="1"
                construct="1"
                transfer-ownership="none">
        <type name="utf8" c:type="gchar*"/>
      </property>
      <field name="parent">
        <doc xml:space="preserve">the parent object struct</doc>
        <type name="GObject.Object" c:type="GObject"/>
      </field>
      <field name="priv" readable="0" private="1">
        <type name="WcPrivate" c:type="GrlNetWcPrivate*"/>
      </field>
    </class>
    <record name="WcClass"
            c:type="GrlNetWcClass"
            glib:is-gtype-struct-for="Wc">
      <doc xml:space="preserve">Grilo web client helper class.

It's a simple and thin web client to be used by the sources to download
content from Internet.</doc>
      <field name="parent_class">
        <doc xml:space="preserve">the parent class structure</doc>
        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
      </field>
    </record>
    <enumeration name="WcError" c:type="GrlNetWcError">
      <doc xml:space="preserve">These constants identify all the available errors managed by
the web client.</doc>
      <member name="unavailable"
              value="1"
              c:identifier="GRL_NET_WC_ERROR_UNAVAILABLE">
        <doc xml:space="preserve">Deprecated. For generic errors, you
should check for G_IO_ERROR_FAILED from G_IO_ERROR domain.</doc>
      </member>
      <member name="protocol_error"
              value="2"
              c:identifier="GRL_NET_WC_ERROR_PROTOCOL_ERROR">
        <doc xml:space="preserve">Invalid URI or header</doc>
      </member>
      <member name="authentication_required"
              value="3"
              c:identifier="GRL_NET_WC_ERROR_AUTHENTICATION_REQUIRED">
        <doc xml:space="preserve">Required authentication</doc>
      </member>
      <member name="not_found"
              value="4"
              c:identifier="GRL_NET_WC_ERROR_NOT_FOUND">
        <doc xml:space="preserve">Request resource not found</doc>
      </member>
      <member name="conflict"
              value="5"
              c:identifier="GRL_NET_WC_ERROR_CONFLICT">
        <doc xml:space="preserve">The entry has been modified since is was
downloaded</doc>
      </member>
      <member name="forbidden"
              value="6"
              c:identifier="GRL_NET_WC_ERROR_FORBIDDEN">
        <doc xml:space="preserve">TBD</doc>
      </member>
      <member name="network_error"
              value="7"
              c:identifier="GRL_NET_WC_ERROR_NETWORK_ERROR">
        <doc xml:space="preserve">Cannot connect to the server</doc>
      </member>
      <member name="proxy_error"
              value="8"
              c:identifier="GRL_NET_WC_ERROR_PROXY_ERROR">
        <doc xml:space="preserve">Deprecated. You should check for
G_IO_ERROR_PROXY_FAILED from G_IO_ERROR domain.</doc>
      </member>
      <member name="cancelled"
              value="9"
              c:identifier="GRL_NET_WC_ERROR_CANCELLED">
        <doc xml:space="preserve">Deprecated. You should check for
G_IO_ERROR_CANCELLED from G_IO_ERROR domain.</doc>
      </member>
    </enumeration>
    <record name="WcPrivate" c:type="GrlNetWcPrivate" disguised="1">
    </record>
  </namespace>
</repository>
