<?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="Soup" version="2.4"/>
  <package name="libuhttpmock"/>
  <c:include name="uhttpmock/uhm.h"/>
  <namespace name="Uhm"
             version="0.0"
             shared-library="libuhttpmock-0.0.so.0.1"
             c:identifier-prefixes="Uhm"
             c:symbol-prefixes="uhm">
    <function-macro name="CHECK_VERSION"
                    c:identifier="UHM_CHECK_VERSION"
                    version="0.1.0"
                    introspectable="0">
      <doc xml:space="preserve"
           filename="uhm-version.h"
           line="64">Evaluates to %TRUE if the version of the libuhttpmock header files
is the same as or newer than the passed-in version.</doc>
      <source-position filename="uhm-version.h" line="75"/>
      <parameters>
        <parameter name="major">
          <doc xml:space="preserve"
               filename="uhm-version.h"
               line="66">major version (e.g. 1 for version 1.2.3)</doc>
        </parameter>
        <parameter name="minor">
          <doc xml:space="preserve"
               filename="uhm-version.h"
               line="67">minor version (e.g. 2 for version 1.2.3)</doc>
        </parameter>
        <parameter name="micro">
          <doc xml:space="preserve"
               filename="uhm-version.h"
               line="68">micro version (e.g. 3 for version 1.2.3)</doc>
        </parameter>
      </parameters>
    </function-macro>
    <function-macro name="IS_RESOLVER"
                    c:identifier="UHM_IS_RESOLVER"
                    introspectable="0">
      <source-position filename="uhm-resolver.h" line="32"/>
      <parameters>
        <parameter name="o">
        </parameter>
      </parameters>
    </function-macro>
    <function-macro name="IS_RESOLVER_CLASS"
                    c:identifier="UHM_IS_RESOLVER_CLASS"
                    introspectable="0">
      <source-position filename="uhm-resolver.h" line="33"/>
      <parameters>
        <parameter name="k">
        </parameter>
      </parameters>
    </function-macro>
    <function-macro name="IS_SERVER"
                    c:identifier="UHM_IS_SERVER"
                    introspectable="0">
      <source-position filename="uhm-server.h" line="49"/>
      <parameters>
        <parameter name="o">
        </parameter>
      </parameters>
    </function-macro>
    <function-macro name="IS_SERVER_CLASS"
                    c:identifier="UHM_IS_SERVER_CLASS"
                    introspectable="0">
      <source-position filename="uhm-server.h" line="50"/>
      <parameters>
        <parameter name="k">
        </parameter>
      </parameters>
    </function-macro>
    <constant name="MAJOR_VERSION"
              value="0"
              c:type="UHM_MAJOR_VERSION"
              version="0.1.0">
      <doc xml:space="preserve"
           filename="uhm-version.h"
           line="34">Evaluates to the major version of the libuhttpmock headers at compile time.
(e.g. in libuhttpmock version 1.2.3 this is 1).</doc>
      <source-position filename="uhm-version.h" line="42"/>
      <type name="gint" c:type="gint"/>
    </constant>
    <constant name="MICRO_VERSION"
              value="3"
              c:type="UHM_MICRO_VERSION"
              version="0.1.0">
      <doc xml:space="preserve"
           filename="uhm-version.h"
           line="54">Evaluates to the micro version of the libuhttpmock headers at compile time.
(e.g. in libuhttpmock version 1.2.3 this is 3).</doc>
      <source-position filename="uhm-version.h" line="62"/>
      <type name="gint" c:type="gint"/>
    </constant>
    <constant name="MINOR_VERSION"
              value="5"
              c:type="UHM_MINOR_VERSION"
              version="0.1.0">
      <doc xml:space="preserve"
           filename="uhm-version.h"
           line="44">Evaluates to the minor version of the libuhttpmock headers at compile time.
(e.g. in libuhttpmock version 1.2.3 this is 2).</doc>
      <source-position filename="uhm-version.h" line="52"/>
      <type name="gint" c:type="gint"/>
    </constant>
    <function-macro name="RESOLVER"
                    c:identifier="UHM_RESOLVER"
                    introspectable="0">
      <source-position filename="uhm-resolver.h" line="30"/>
      <parameters>
        <parameter name="o">
        </parameter>
      </parameters>
    </function-macro>
    <function-macro name="RESOLVER_CLASS"
                    c:identifier="UHM_RESOLVER_CLASS"
                    introspectable="0">
      <source-position filename="uhm-resolver.h" line="31"/>
      <parameters>
        <parameter name="k">
        </parameter>
      </parameters>
    </function-macro>
    <function-macro name="RESOLVER_GET_CLASS"
                    c:identifier="UHM_RESOLVER_GET_CLASS"
                    introspectable="0">
      <source-position filename="uhm-resolver.h" line="34"/>
      <parameters>
        <parameter name="o">
        </parameter>
      </parameters>
    </function-macro>
    <class name="Resolver"
           c:symbol-prefix="resolver"
           c:type="UhmResolver"
           version="0.1.0"
           parent="Gio.Resolver"
           glib:type-name="UhmResolver"
           glib:get-type="uhm_resolver_get_type"
           glib:type-struct="ResolverClass">
      <doc xml:space="preserve"
           filename="uhm-resolver.h"
           line="38">All the fields in the #UhmResolver structure are private and should never be accessed directly.</doc>
      <source-position filename="uhm-resolver.h" line="61"/>
      <constructor name="new" c:identifier="uhm_resolver_new">
        <doc xml:space="preserve"
             filename="uhm-resolver.c"
             line="269">Creates a new #UhmResolver with default property values.</doc>
        <source-position filename="uhm-resolver.h" line="65"/>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve"
               filename="uhm-resolver.c"
               line="274">a new #UhmResolver; unref with g_object_unref()</doc>
          <type name="Resolver" c:type="UhmResolver*"/>
        </return-value>
      </constructor>
      <method name="add_A" c:identifier="uhm_resolver_add_A" version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-resolver.c"
             line="314">Adds a resolution mapping from the host name @hostname to the IP address @addr.</doc>
        <source-position filename="uhm-resolver.h" line="69"/>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve"
               filename="uhm-resolver.c"
               line="322">%TRUE on success; %FALSE otherwise</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-resolver.c"
                 line="316">a #UhmResolver</doc>
            <type name="Resolver" c:type="UhmResolver*"/>
          </instance-parameter>
          <parameter name="hostname" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-resolver.c"
                 line="317">the hostname to match</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="addr" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-resolver.c"
                 line="318">the IP address to resolve to</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
        </parameters>
      </method>
      <method name="add_SRV"
              c:identifier="uhm_resolver_add_SRV"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-resolver.c"
             line="343">Adds a resolution mapping the given @service (on @protocol and @domain) to the IP address @addr and given @port.</doc>
        <source-position filename="uhm-resolver.h" line="70"/>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve"
               filename="uhm-resolver.c"
               line="354">%TRUE on success; %FALSE otherwise</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-resolver.c"
                 line="345">a #UhmResolver</doc>
            <type name="Resolver" c:type="UhmResolver*"/>
          </instance-parameter>
          <parameter name="service" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-resolver.c"
                 line="346">the service name to match</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="protocol" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-resolver.c"
                 line="347">the protocol name to match</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="domain" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-resolver.c"
                 line="348">the domain name to match</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="addr" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-resolver.c"
                 line="349">the IP address to resolve to</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="port" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-resolver.c"
                 line="350">the port to resolve to</doc>
            <type name="guint16" c:type="guint16"/>
          </parameter>
        </parameters>
      </method>
      <method name="reset" c:identifier="uhm_resolver_reset">
        <doc xml:space="preserve"
             filename="uhm-resolver.c"
             line="282">Resets the state of the #UhmResolver, deleting all records added with uhm_resolver_add_A() and uhm_resolver_add_SRV().</doc>
        <source-position filename="uhm-resolver.h" line="67"/>
        <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"
                 filename="uhm-resolver.c"
                 line="284">a #UhmResolver</doc>
            <type name="Resolver" c:type="UhmResolver*"/>
          </instance-parameter>
        </parameters>
      </method>
      <field name="parent" readable="0" private="1">
        <type name="Gio.Resolver" c:type="GResolver"/>
      </field>
      <field name="priv" readable="0" private="1">
        <type name="ResolverPrivate" c:type="UhmResolverPrivate*"/>
      </field>
    </class>
    <record name="ResolverClass"
            c:type="UhmResolverClass"
            glib:is-gtype-struct-for="Resolver"
            version="0.1.0">
      <doc xml:space="preserve"
           filename="uhm-resolver.h"
           line="51">All the fields in the #UhmResolverClass structure are private and should never be accessed directly.</doc>
      <source-position filename="uhm-resolver.h" line="61"/>
      <field name="parent" readable="0" private="1">
        <type name="Gio.ResolverClass" c:type="GResolverClass"/>
      </field>
    </record>
    <record name="ResolverPrivate" c:type="UhmResolverPrivate" disguised="1">
      <source-position filename="uhm-resolver.h" line="36"/>
    </record>
    <function-macro name="SERVER" c:identifier="UHM_SERVER" introspectable="0">
      <source-position filename="uhm-server.h" line="47"/>
      <parameters>
        <parameter name="o">
        </parameter>
      </parameters>
    </function-macro>
    <function-macro name="SERVER_CLASS"
                    c:identifier="UHM_SERVER_CLASS"
                    introspectable="0">
      <source-position filename="uhm-server.h" line="48"/>
      <parameters>
        <parameter name="k">
        </parameter>
      </parameters>
    </function-macro>
    <function-macro name="SERVER_GET_CLASS"
                    c:identifier="UHM_SERVER_GET_CLASS"
                    introspectable="0">
      <source-position filename="uhm-server.h" line="51"/>
      <parameters>
        <parameter name="o">
        </parameter>
      </parameters>
    </function-macro>
    <class name="Server"
           c:symbol-prefix="server"
           c:type="UhmServer"
           version="0.1.0"
           parent="GObject.Object"
           glib:type-name="UhmServer"
           glib:get-type="uhm_server_get_type"
           glib:type-struct="ServerClass">
      <doc xml:space="preserve"
           filename="uhm-server.h"
           line="55">All the fields in the #UhmServer structure are private and should never be accessed directly.</doc>
      <source-position filename="uhm-server.h" line="88"/>
      <constructor name="new" c:identifier="uhm_server_new" version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="685">Creates a new #UhmServer with default properties.</doc>
        <source-position filename="uhm-server.h" line="92"/>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve"
               filename="uhm-server.c"
               line="690">a new #UhmServer; unref with g_object_unref()</doc>
          <type name="Server" c:type="UhmServer*"/>
        </return-value>
      </constructor>
      <function name="error_quark" c:identifier="uhm_server_error_quark">
        <return-value transfer-ownership="none">
          <type name="GLib.Quark" c:type="GQuark"/>
        </return-value>
      </function>
      <function name="received_message_chunk_from_soup"
                c:identifier="uhm_server_received_message_chunk_from_soup"
                version="0.3.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1972">Convenience version of uhm_server_received_message_chunk() which can be passed directly to soup_logger_set_printer()
to forward all libsoup traffic logging to a #UhmServer. The #UhmServer must be passed to soup_logger_set_printer() as
its user data.

&lt;informalexample&gt;&lt;programlisting&gt;
UhmServer *mock_server;
SoupSession *session;
SoupLogger *logger;

mock_server = uhm_server_new ();
session = soup_session_new ();

logger = soup_logger_new (SOUP_LOGGER_LOG_BODY, -1);
soup_logger_set_printer (logger, uhm_server_received_message_chunk_from_soup, g_object_ref (mock_server), g_object_unref);
soup_session_add_feature (session, SOUP_SESSION_FEATURE (logger));
g_object_unref (logger);

/&lt;!-- --&gt;* Do something with mock_server here. *&lt;!-- --&gt;/
&lt;/programlisting&gt;&lt;/informalexample&gt;</doc>
        <source-position filename="uhm-server.h" line="117"/>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="logger" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1974">a #SoupLogger</doc>
            <type name="Soup.Logger" c:type="SoupLogger*"/>
          </parameter>
          <parameter name="level" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1975">the detail level of this log message</doc>
            <type name="Soup.LoggerLogLevel" c:type="SoupLoggerLogLevel"/>
          </parameter>
          <parameter name="direction" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1976">the transmission direction of the message</doc>
            <type name="gchar" c:type="char"/>
          </parameter>
          <parameter name="data" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1977">message data</doc>
            <type name="utf8" c:type="const char*"/>
          </parameter>
          <parameter name="user_data"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1978">user data passed to the #SoupLogger, or %NULL</doc>
            <type name="gpointer" c:type="gpointer"/>
          </parameter>
        </parameters>
      </function>
      <virtual-method name="compare_messages">
        <source-position filename="uhm-server.h" line="87"/>
        <return-value transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="expected_message" transfer-ownership="none">
            <type name="Soup.Message" c:type="SoupMessage*"/>
          </parameter>
          <parameter name="actual_message" transfer-ownership="none">
            <type name="Soup.Message" c:type="SoupMessage*"/>
          </parameter>
          <parameter name="actual_client" transfer-ownership="none">
            <type name="Soup.ClientContext" c:type="SoupClientContext*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <virtual-method name="handle_message">
        <source-position filename="uhm-server.h" line="86"/>
        <return-value transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="message" transfer-ownership="none">
            <type name="Soup.Message" c:type="SoupMessage*"/>
          </parameter>
          <parameter name="client" transfer-ownership="none">
            <type name="Soup.ClientContext" c:type="SoupClientContext*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <method name="compare_messages_remove_filter"
              c:identifier="uhm_server_compare_messages_remove_filter"
              version="0.5.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="2338">Remove a #UhmServer:compare-messages filter function installed previously by
calling something like uhm_server_filter_ignore_parameter_values().

It is an error to call this function with an invalid @filter_id.</doc>
        <source-position filename="uhm-server.h" line="133"/>
        <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"
                 filename="uhm-server.c"
                 line="2340">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="filter_id" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="2341">filter ID returned by the filter addition function</doc>
            <type name="gulong" c:type="gulong"/>
          </parameter>
        </parameters>
      </method>
      <method name="end_trace"
              c:identifier="uhm_server_end_trace"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1671">Convenience function to finish logging to or reading from a trace file previously passed to uhm_server_start_trace() or
uhm_server_start_trace_full().

If #UhmServer:enable-online is %FALSE, this will shut down the mock server (as if uhm_server_stop() had been called).</doc>
        <source-position filename="uhm-server.h" line="107"/>
        <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"
                 filename="uhm-server.c"
                 line="1673">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="filter_ignore_parameter_values"
              c:identifier="uhm_server_filter_ignore_parameter_values"
              version="0.5.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="2300">Install a #UhmServer:compare-messages filter function which will override the
default comparison function to one which ignores differences in the values of
the given query @parameter_names. The named parameters must still be present
in the query, however.

The filter will remain in place for the lifetime of the #UhmServer, until
@uhm_server_compare_messages_remove_filter() is called with the returned
filter ID.

Note that currently only one of the installed comparison functions will be
used. This may change in future.</doc>
        <source-position filename="uhm-server.h" line="131"/>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve"
               filename="uhm-server.c"
               line="2318">opaque filter ID used with
   uhm_server_compare_messages_remove_filter() to remove the filter later</doc>
          <type name="gulong" c:type="gulong"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="2302">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="parameter_names" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="2303">%NULL-terminated array of
   parameter names to ignore</doc>
            <array c:type="const gchar* const*">
              <type name="utf8" c:type="gchar*"/>
            </array>
          </parameter>
        </parameters>
      </method>
      <method name="get_address"
              c:identifier="uhm_server_get_address"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="2010">Gets the value of the #UhmServer:address property.</doc>
        <source-position filename="uhm-server.h" line="119"/>
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve"
               filename="uhm-server.c"
               line="2016">the physical address of the listening socket the server is currently bound to; or %NULL if the server is not running</doc>
          <type name="utf8" c:type="const gchar*"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="2012">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_enable_logging"
              c:identifier="uhm_server_get_enable_logging"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1736">Gets the value of the #UhmServer:enable-logging property.</doc>
        <source-position filename="uhm-server.h" line="112"/>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve"
               filename="uhm-server.c"
               line="1742">%TRUE if client network traffic is being logged to a trace file; %FALSE otherwise</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1738">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_enable_online"
              c:identifier="uhm_server_get_enable_online"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1700">Gets the value of the #UhmServer:enable-online property.</doc>
        <source-position filename="uhm-server.h" line="109"/>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve"
               filename="uhm-server.c"
               line="1706">%TRUE if the server does not intercept and handle network connections from client code; %FALSE otherwise</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1702">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_port"
              c:identifier="uhm_server_get_port"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="2043">Gets the value of the #UhmServer:port property.</doc>
        <source-position filename="uhm-server.h" line="120"/>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve"
               filename="uhm-server.c"
               line="2049">the port of the listening socket the server is currently bound to; or &lt;code class="literal"&gt;0&lt;/code&gt; if the server is not running</doc>
          <type name="guint" c:type="guint"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="2045">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_resolver"
              c:identifier="uhm_server_get_resolver"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="2061">Gets the value of the #UhmServer:resolver property.</doc>
        <source-position filename="uhm-server.h" line="122"/>
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve"
               filename="uhm-server.c"
               line="2067">the mock resolver in use by the mock server, or %NULL if no resolver is active</doc>
          <type name="Resolver" c:type="UhmResolver*"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="2063">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_tls_certificate"
              c:identifier="uhm_server_get_tls_certificate"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="2079">Gets the value of the #UhmServer:tls-certificate property.</doc>
        <source-position filename="uhm-server.h" line="124"/>
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve"
               filename="uhm-server.c"
               line="2085">the server's current TLS certificate; or %NULL if it's serving HTTP only</doc>
          <type name="Gio.TlsCertificate" c:type="GTlsCertificate*"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="2081">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_trace_directory"
              c:identifier="uhm_server_get_trace_directory"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1502">Gets the value of the #UhmServer:trace-directory property.</doc>
        <source-position filename="uhm-server.h" line="102"/>
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve"
               filename="uhm-server.c"
               line="1508">the directory to load/store trace files from, or %NULL</doc>
          <type name="Gio.File" c:type="GFile*"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1504">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="load_trace"
              c:identifier="uhm_server_load_trace"
              version="0.1.0"
              throws="1">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1137">Synchronously loads the given @trace_file of network messages, ready to simulate a network conversation by matching
requests against the file and returning the associated responses. Call uhm_server_run() to start the mock
server afterwards.

Loading the trace file may be cancelled from another thread using @cancellable.

On error, @error will be set and the state of the #UhmServer will not change. A #GIOError will be set if there is
a problem reading the trace file.</doc>
        <source-position filename="uhm-server.h" line="94"/>
        <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"
                 filename="uhm-server.c"
                 line="1139">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="trace_file" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1140">trace file to load</doc>
            <type name="Gio.File" c:type="GFile*"/>
          </parameter>
          <parameter name="cancellable"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1141">a #GCancellable, or %NULL</doc>
            <type name="Gio.Cancellable" c:type="GCancellable*"/>
          </parameter>
        </parameters>
      </method>
      <method name="load_trace_async"
              c:identifier="uhm_server_load_trace_async"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1232">Asynchronous version of uhm_server_load_trace(). In @callback, call uhm_server_load_trace_finish() to complete the operation.</doc>
        <source-position filename="uhm-server.h" line="95"/>
        <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"
                 filename="uhm-server.c"
                 line="1234">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="trace_file" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1235">trace file to load</doc>
            <type name="Gio.File" c:type="GFile*"/>
          </parameter>
          <parameter name="cancellable"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1236">a #GCancellable, or %NULL</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"
                 filename="uhm-server.c"
                 line="1237">function to call once the async operation is complete</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"
                 filename="uhm-server.c"
                 line="1238">user data to pass to @callback, or %NULL</doc>
            <type name="gpointer" c:type="gpointer"/>
          </parameter>
        </parameters>
      </method>
      <method name="load_trace_finish"
              c:identifier="uhm_server_load_trace_finish"
              version="0.1.0"
              throws="1">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1268">Finishes an asynchronous operation started by uhm_server_load_trace_async().

On error, @error will be set and the state of the #UhmServer will not change.
See uhm_server_load_trace() for details on the error domains used.</doc>
        <source-position filename="uhm-server.h" line="96"/>
        <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"
                 filename="uhm-server.c"
                 line="1270">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="result" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1271">asynchronous operation result passed to the callback</doc>
            <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
          </parameter>
        </parameters>
      </method>
      <method name="received_message_chunk"
              c:identifier="uhm_server_received_message_chunk"
              version="0.1.0"
              throws="1">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1772">Indicates to the mock server that a single new line of a message was received from the real server. The message line may be
appended to the current trace file if logging is enabled (#UhmServer:enable-logging is %TRUE), adding a newline character
at the end. If logging is disabled but online mode is enabled (#UhmServer:enable-online is %TRUE), the message line will
be compared to the next expected line in the existing trace file. Otherwise, this function is a no-op.

On failure, @error will be set and the #UhmServer state will remain unchanged apart from the parse state machine, which will remain
in the state reached after parsing @message_chunk. A %G_IO_ERROR will be returned if writing to the trace file failed. If in
comparison mode and the received message chunk corresponds to an unexpected message in the trace file, a %UHM_SERVER_ERROR will
be returned.

&lt;note&gt;&lt;para&gt;In common cases where message log data only needs to be passed to a #UhmServer and not (for example) logged to an
application-specific file or the command line as  well, it is simpler to use uhm_server_received_message_chunk_from_soup(), passing
it directly to soup_logger_set_printer(). See the documentation for uhm_server_received_message_chunk_from_soup() for details.&lt;/para&gt;&lt;/note&gt;</doc>
        <source-position filename="uhm-server.h" line="115"/>
        <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"
                 filename="uhm-server.c"
                 line="1774">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="message_chunk" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1775">single line of a message which was received</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="message_chunk_length" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1776">length of @message_chunk in bytes</doc>
            <type name="gint64" c:type="goffset"/>
          </parameter>
        </parameters>
      </method>
      <method name="received_message_chunk_with_direction"
              c:identifier="uhm_server_received_message_chunk_with_direction"
              version="0.3.0"
              throws="1">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1917">Convenience version of uhm_server_received_message_chunk() which takes the
message @direction and @data separately, as provided by libsoup in a
#SoupLoggerPrinter callback.

&lt;informalexample&gt;&lt;programlisting&gt;
UhmServer *mock_server;
SoupSession *session;
SoupLogger *logger;

static void
soup_log_printer (SoupLogger *logger, SoupLoggerLogLevel level, char direction, const char *data, gpointer user_data)
{
	/&lt;!-- --&gt;* Pass the data to libuhttpmock. *&lt;!-- --&gt;/
UhmServer *mock_server = UHM_SERVER (user_data);
	uhm_server_received_message_chunk_with_direction (mock_server, direction, data, strlen (data), NULL);
}

mock_server = uhm_server_new ();
session = soup_session_new ();

logger = soup_logger_new (SOUP_LOGGER_LOG_BODY, -1);
soup_logger_set_printer (logger, (SoupLoggerPrinter) soup_log_printer, g_object_ref (mock_server), g_object_unref);
soup_session_add_feature (session, SOUP_SESSION_FEATURE (logger));
g_object_unref (logger);

/&lt;!-- --&gt;* Do something with mock_server here. *&lt;!-- --&gt;/
&lt;/programlisting&gt;&lt;/informalexample&gt;</doc>
        <source-position filename="uhm-server.h" line="116"/>
        <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"
                 filename="uhm-server.c"
                 line="1919">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="direction" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1920">single character indicating the direction of message transmission</doc>
            <type name="gchar" c:type="char"/>
          </parameter>
          <parameter name="data" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1921">single line of a message which was received</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="data_length" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1922">length of @data in bytes</doc>
            <type name="gint64" c:type="goffset"/>
          </parameter>
        </parameters>
      </method>
      <method name="run" c:identifier="uhm_server_run" version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1331">Runs the mock server, binding to a loopback TCP/IP interface and preparing a HTTPS server which is ready to accept requests.
The TCP/IP address and port number are chosen randomly out of the loopback addresses, and are exposed as #UhmServer:address and #UhmServer:port
once this function has returned. A #UhmResolver (exposed as #UhmServer:resolver) is set as the default #GResolver while the server is running.

The server is started in a worker thread, so this function returns immediately and the server continues to run in the background. Use uhm_server_stop()
to shut it down.

This function always succeeds.</doc>
        <source-position filename="uhm-server.h" line="99"/>
        <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"
                 filename="uhm-server.c"
                 line="1333">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="set_default_tls_certificate"
              c:identifier="uhm_server_set_default_tls_certificate"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="2125">Sets the value of the #UhmServer:tls-certificate property to the default TLS certificate built in to libuhttpmock.
This default certificate is not signed by any certificate authority, and contains minimal metadata details. It may
be used by clients which have no special certificate requirements; clients which have special requirements should
construct a custom #GTlsCertificate and pass it to uhm_server_set_tls_certificate().</doc>
        <source-position filename="uhm-server.h" line="127"/>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve"
               filename="uhm-server.c"
               line="2134">the default certificate set as #UhmServer:tls-certificate</doc>
          <type name="Gio.TlsCertificate" c:type="GTlsCertificate*"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="2127">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="set_enable_logging"
              c:identifier="uhm_server_set_enable_logging"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1754">Sets the value of the #UhmServer:enable-logging property.</doc>
        <source-position filename="uhm-server.h" line="113"/>
        <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"
                 filename="uhm-server.c"
                 line="1756">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="enable_logging" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1757">%TRUE to log client network traffic to a trace file; %FALSE otherwise</doc>
            <type name="gboolean" c:type="gboolean"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_enable_online"
              c:identifier="uhm_server_set_enable_online"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1718">Sets the value of the #UhmServer:enable-online property.</doc>
        <source-position filename="uhm-server.h" line="110"/>
        <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"
                 filename="uhm-server.c"
                 line="1720">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="enable_online" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1721">%TRUE to not intercept and handle network connections from client code; %FALSE otherwise</doc>
            <type name="gboolean" c:type="gboolean"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_expected_domain_names"
              c:identifier="uhm_server_set_expected_domain_names"
              version="0.3.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="2182">Set the domain names which are expected to have requests made of them by the client code interacting with this #UhmServer.
This is a convenience method which calls uhm_resolver_add_A() on the server’s #UhmResolver for each of the domain names
listed in @domain_names. It associates them with the server’s current IP address, and automatically updates the mappings
if the IP address or resolver change.

Note that this will reset all records on the server’s #UhmResolver, replacing all of them with the provided @domain_names.

It is safe to add further domain names to the #UhmResolver in a callback for the #GObject::notify signal for #UhmServer:resolver;
that signal is emitted after the resolver is cleared and these @domain_names are added.</doc>
        <source-position filename="uhm-server.h" line="129"/>
        <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"
                 filename="uhm-server.c"
                 line="2184">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="domain_names"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="2185">%NULL-terminated array of domain names to expect, or %NULL to not expect any</doc>
            <array c:type="const gchar* const*">
              <type name="utf8"/>
            </array>
          </parameter>
        </parameters>
      </method>
      <method name="set_tls_certificate"
              c:identifier="uhm_server_set_tls_certificate"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="2097">Sets the value of the #UhmServer:tls-certificate property.</doc>
        <source-position filename="uhm-server.h" line="125"/>
        <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"
                 filename="uhm-server.c"
                 line="2099">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="tls_certificate"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="2100">TLS certificate for the server to use; or %NULL to serve HTTP only</doc>
            <type name="Gio.TlsCertificate" c:type="GTlsCertificate*"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_trace_directory"
              c:identifier="uhm_server_set_trace_directory"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1520">Sets the value of the #UhmServer:trace-directory property.</doc>
        <source-position filename="uhm-server.h" line="103"/>
        <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"
                 filename="uhm-server.c"
                 line="1522">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="trace_directory"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1523">a directory to load/store trace files from, or %NULL to unset it</doc>
            <type name="Gio.File" c:type="GFile*"/>
          </parameter>
        </parameters>
      </method>
      <method name="start_trace"
              c:identifier="uhm_server_start_trace"
              version="0.1.0"
              throws="1">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1544">Starts a mock server which follows the trace file of filename @trace_name in the #UhmServer:trace-directory directory.
See uhm_server_start_trace_full() for further documentation.

This function has undefined behaviour if #UhmServer:trace-directory is %NULL.

On failure, @error will be set and the #UhmServer state will remain unchanged. See uhm_server_start_trace_full() for
details of the error domains used.</doc>
        <source-position filename="uhm-server.h" line="105"/>
        <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"
                 filename="uhm-server.c"
                 line="1546">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="trace_name" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1547">name of the trace</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
        </parameters>
      </method>
      <method name="start_trace_full"
              c:identifier="uhm_server_start_trace_full"
              version="0.1.0"
              throws="1">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1576">Convenience function to start logging to or reading from the given @trace_file, depending on the values of #UhmServer:enable-logging and
#UhmServer:enable-online.

If #UhmServer:enable-logging is %TRUE, a log handler will be set up to redirect all client network activity into the given @trace_file.
If @trace_file already exists, it will be overwritten.

If #UhmServer:enable-online is %FALSE, the given @trace_file is loaded using uhm_server_load_trace() and then a mock server is
started using uhm_server_run().

On failure, @error will be set and the #UhmServer state will remain unchanged. A #GIOError will be set if logging is enabled
(#UhmServer:enable-logging) and there is a problem writing to the trace file; or if a trace needs to be loaded and there is a problem
reading from the trace file.</doc>
        <source-position filename="uhm-server.h" line="106"/>
        <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"
                 filename="uhm-server.c"
                 line="1578">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
          <parameter name="trace_file" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="1579">a trace file to load</doc>
            <type name="Gio.File" c:type="GFile*"/>
          </parameter>
        </parameters>
      </method>
      <method name="stop" c:identifier="uhm_server_stop" version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1445">Stops a mock server started by calling uhm_server_run(). This shuts down the server's worker thread and unbinds it from its TCP/IP socket.

This unloads any trace file loaded by calling uhm_server_load_trace() (or its asynchronous counterpart). It also resets the set of domain
names loaded into the #UhmServer:resolver.

This function always succeeds.</doc>
        <source-position filename="uhm-server.h" line="100"/>
        <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"
                 filename="uhm-server.c"
                 line="1447">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="unload_trace"
              c:identifier="uhm_server_unload_trace"
              version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="1114">Unloads the current trace file of network messages, as loaded by uhm_server_load_trace() or uhm_server_load_trace_async().</doc>
        <source-position filename="uhm-server.h" line="97"/>
        <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"
                 filename="uhm-server.c"
                 line="1116">a #UhmServer</doc>
            <type name="Server" c:type="UhmServer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <property name="address" version="0.1.0" transfer-ownership="none">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="215">Address of the local mock server if it's running, or %NULL otherwise. This will be non-%NULL between calls to uhm_server_run() and
uhm_server_stop(). The address is a physical IP address, e.g. &lt;code class="literal"&gt;127.0.0.1&lt;/code&gt;.

This should not normally need to be passed into client code under test, unless the code references IP addresses specifically. The mock server
runs a DNS resolver which automatically redirects client requests for known domain names to this address (#UhmServer:resolver).</doc>
        <type name="utf8" c:type="gchar*"/>
      </property>
      <property name="enable-logging"
                version="0.1.0"
                writable="1"
                transfer-ownership="none">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="200">%TRUE if network traffic should be logged to a trace file (specified by calling uhm_server_start_trace()). This operates independently
of whether traffic is online or being handled locally by the mock server.
Use this in conjunction with #UhmServer:enable-online to either log online traffic, or replay logged traffic locally.</doc>
        <type name="gboolean" c:type="gboolean"/>
      </property>
      <property name="enable-online"
                version="0.1.0"
                writable="1"
                transfer-ownership="none">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="186">%TRUE if network traffic should reach the Internet as normal; %FALSE to redirect it to the local mock server.
Use this in conjunction with #UhmServer:enable-logging to either log online traffic, or replay logged traffic locally.</doc>
        <type name="gboolean" c:type="gboolean"/>
      </property>
      <property name="port" version="0.1.0" transfer-ownership="none">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="232">Port of the local mock server if it's running, or &lt;code class="literal"&gt;0&lt;/code&gt; otherwise. This will be non-&lt;code class="literal"&gt;0&lt;/code&gt; between
calls to uhm_server_run() and uhm_server_stop().

It is intended that this port be passed into the client code under test, to substitute for the default HTTPS port (443) which it would otherwise
use.</doc>
        <type name="guint" c:type="guint"/>
      </property>
      <property name="resolver" version="0.1.0" transfer-ownership="none">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="249">Mock resolver used to redirect HTTP requests from specified domain names to the local mock server instance. This will always be set while the
server is running (between calls to uhm_server_run() and uhm_server_stop()), and is %NULL otherwise.

Use the resolver specified in this property to add domain names which are expected to be requested by the current trace. Domain names not added
to the resolver will be rejected by the mock server. The set of domain names in the resolver will be reset when uhm_server_stop() is
called.</doc>
        <type name="Resolver"/>
      </property>
      <property name="tls-certificate"
                version="0.1.0"
                writable="1"
                transfer-ownership="none">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="267">TLS certificate for the mock server to use when serving HTTPS pages. If this is non-%NULL, the server will always use HTTPS. If it is %NULL,
the server will always use HTTP. The TLS certificate may be changed after constructing the #UhmServer, but changes to the property will not
take effect until the next call to uhm_server_run().

A certificate and private key may be generated by executing:
&lt;code&gt;openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -nodes&lt;/code&gt;. These files may then be used to construct a
#GTlsCertificate by calling g_tls_certificate_new_from_files().

Alternatively, a default #GTlsCertificate which wraps a dummy certificate (not signed by any certificate authority) may be set by
calling uhm_server_set_default_tls_certificate(). This may be used as the #UhmServer:tls-certificate if the code under test has no specific
requirements of the certificate used by the mock server it's tested against.</doc>
        <type name="Gio.TlsCertificate"/>
      </property>
      <property name="trace-directory"
                version="0.1.0"
                writable="1"
                transfer-ownership="none">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="172">Directory relative to which all trace files specified in calls to uhm_server_start_trace() will be resolved.
This is not used for any other methods, but must be non-%NULL if uhm_server_start_trace() is called.</doc>
        <type name="Gio.File"/>
      </property>
      <field name="parent" readable="0" private="1">
        <type name="GObject.Object" c:type="GObject"/>
      </field>
      <field name="priv" readable="0" private="1">
        <type name="ServerPrivate" c:type="UhmServerPrivate*"/>
      </field>
      <glib:signal name="compare-messages" when="last" version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="311">Emitted whenever the mock server must compare two #SoupMessage&lt;!-- --&gt;s for equality; e.g. when in the testing or comparison modes.
Test code may connect to this signal and implement a handler which checks custom properties of the messages. The default handler compares
the URI and method of the messages, but no headers and not the message bodies.

Signal handlers should return %TRUE if the messages match; and %FALSE otherwise. The first signal handler executed when
this signal is emitted wins.</doc>
        <return-value transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <parameter name="expected_message" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="314">a message containing the expected HTTP(S) message provided by #UhmServer::handle-message</doc>
            <type name="Soup.Message"/>
          </parameter>
          <parameter name="actual_message" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="315">a message containing the incoming HTTP(S) request</doc>
            <type name="Soup.Message"/>
          </parameter>
          <parameter name="actual_client" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="316">additional data about the HTTP client making the request</doc>
            <type name="Soup.ClientContext"/>
          </parameter>
        </parameters>
      </glib:signal>
      <glib:signal name="handle-message" when="last" version="0.1.0">
        <doc xml:space="preserve"
             filename="uhm-server.c"
             line="290">Emitted whenever the mock server is running and receives a request from a client. Test code may connect to this signal and implement a handler
which builds and returns a suitable response for a given message. The default handler reads a request–response pair from the current trace file,
matches the requests and then returns the given response. If the requests don't match, an error is raised.

Signal handlers should return %TRUE if they have handled the request and set an appropriate response; and %FALSE otherwise.</doc>
        <return-value transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <parameter name="message" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="293">a message containing the incoming HTTP(S) request, and which the outgoing HTTP(S) response should be set on</doc>
            <type name="Soup.Message"/>
          </parameter>
          <parameter name="client" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="uhm-server.c"
                 line="294">additional data about the HTTP client making the request</doc>
            <type name="Soup.ClientContext"/>
          </parameter>
        </parameters>
      </glib:signal>
    </class>
    <record name="ServerClass"
            c:type="UhmServerClass"
            glib:is-gtype-struct-for="Server"
            version="0.1.0">
      <doc xml:space="preserve"
           filename="uhm-server.h"
           line="68">Most of the fields in the #UhmServerClass structure are private and should never be accessed directly.</doc>
      <source-position filename="uhm-server.h" line="88"/>
      <field name="parent" readable="0" private="1">
        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
      </field>
      <field name="handle_message">
        <callback name="handle_message">
          <source-position filename="uhm-server.h" line="86"/>
          <return-value transfer-ownership="none">
            <type name="gboolean" c:type="gboolean"/>
          </return-value>
          <parameters>
            <parameter name="self" transfer-ownership="none">
              <type name="Server" c:type="UhmServer*"/>
            </parameter>
            <parameter name="message" transfer-ownership="none">
              <type name="Soup.Message" c:type="SoupMessage*"/>
            </parameter>
            <parameter name="client" transfer-ownership="none">
              <type name="Soup.ClientContext" c:type="SoupClientContext*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="compare_messages">
        <callback name="compare_messages">
          <source-position filename="uhm-server.h" line="87"/>
          <return-value transfer-ownership="none">
            <type name="gboolean" c:type="gboolean"/>
          </return-value>
          <parameters>
            <parameter name="self" transfer-ownership="none">
              <type name="Server" c:type="UhmServer*"/>
            </parameter>
            <parameter name="expected_message" transfer-ownership="none">
              <type name="Soup.Message" c:type="SoupMessage*"/>
            </parameter>
            <parameter name="actual_message" transfer-ownership="none">
              <type name="Soup.Message" c:type="SoupMessage*"/>
            </parameter>
            <parameter name="actual_client" transfer-ownership="none">
              <type name="Soup.ClientContext" c:type="SoupClientContext*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
    </record>
    <enumeration name="ServerError" c:type="UhmServerError">
      <doc xml:space="preserve"
           filename="uhm-server.h"
           line="32">Error codes for #UhmServer operations.</doc>
      <source-position filename="uhm-server.h" line="40"/>
      <member name="server_error_message_mismatch"
              value="1"
              c:identifier="UHM_SERVER_ERROR_MESSAGE_MISMATCH">
        <doc xml:space="preserve"
             filename="uhm-server.h"
             line="34">In comparison mode, a message received from the client did not match the next message in the current trace file.</doc>
      </member>
    </enumeration>
    <record name="ServerPrivate" c:type="UhmServerPrivate" disguised="1">
      <source-position filename="uhm-server.h" line="53"/>
    </record>
    <docsection name="uhm-resolver">
      <doc xml:space="preserve"
           filename="uhm-resolver.c"
           line="29">A mock DNS resolver which resolves according to specified host-name–IP-address pairs, and raises an error for all non-specified host name requests.
This allows network connections for expected services to be redirected to a different server, such as a local mock server on a loopback interface.</doc>
    </docsection>
    <docsection name="uhm-server">
      <doc xml:space="preserve"
           filename="uhm-server.c"
           line="20">This is a mock HTTPS server which can be used to run unit tests of network client code on a loopback interface rather than on the real Internet.
At its core, it's a simple HTTPS server which runs on a loopback address on an arbitrary port. The code under test must be modified to send its
requests to this port, although #UhmResolver may be used to transparently redirect all IP addresses to the mock server.
A convenience layer on the mock server provides loading of and recording to trace files, which are sequences of request–response HTTPS message pairs
where each request is expected by the server (in order). On receiving an expected request, the mock server will return the relevant response and move
to expecting the next request in the trace file.

The mock server currently only operates on a single network interface, on HTTPS (if #UhmServer:tls-certificate is set) or HTTP otherwise.
This may change in future. Your own TLS certificate can be provided to authenticate the server using #UhmServer:tls-certificate, or a dummy
TLS certificate can be used by calling uhm_server_set_default_tls_certificate(). This certificate is not signed by a CA, so the
#SoupSession:ssl-strict property must be set to %FALSE in client code
during (and only during!) testing.

The server can operate in three modes: logging, testing, and comparing. These are set by #UhmServer:enable-logging and #UhmServer:enable-online.
 • Logging mode (#UhmServer:enable-logging: %TRUE, #UhmServer:enable-online: %TRUE): Requests are sent to the real server online, and the
   request–response pairs recorded to a log file.
 • Testing mode (#UhmServer:enable-logging: %FALSE, #UhmServer:enable-online: %FALSE): Requests are sent to the mock server, which responds
   from the trace file.
 • Comparing mode (#UhmServer:enable-logging: %FALSE, #UhmServer:enable-online: %TRUE): Requests are sent to the real server online, and
   the request–response pairs are compared against those in an existing log file to see if the log file is up-to-date.</doc>
    </docsection>
    <docsection name="uhm-version">
      <doc xml:space="preserve"
           filename="uhm-version.h"
           line="24">uhttpmock provides compile-time version information.</doc>
    </docsection>
  </namespace>
</repository>
