<?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="GLib" version="2.0"/>
  <include name="GObject" version="2.0"/>
  <package name="gupnp-1.0"/>
  <namespace name="GUPnPIgd"
             version="1.0"
             shared-library="libgupnp-igd-1.0.so.0.0"
             c:identifier-prefixes="gupnp,gupnp_igd,GUPnP,GUPnPIgd"
             c:symbol-prefixes="gupnp,gupnp_igd,g_u_pn_p,g_u_pn_pigd">
    <class name="SimpleIgd"
           c:symbol-prefix="simple_igd"
           c:type="GUPnPSimpleIgd"
           parent="GObject.Object"
           glib:type-name="GUPnPSimpleIgd"
           glib:get-type="gupnp_simple_igd_get_type"
           glib:type-struct="SimpleIgdClass">
      <doc xml:whitespace="preserve">All members are private, access them using methods and properties</doc>
      <constructor name="new" c:identifier="gupnp_simple_igd_new">
        <doc xml:whitespace="preserve">This creates a new #GUPnpSimpleIgd object using the special GMainContext</doc>
        <return-value transfer-ownership="full">
          <doc xml:whitespace="preserve">a new #GUPnPSimpleIgd</doc>
          <type name="SimpleIgd" c:type="GUPnPSimpleIgd*"/>
        </return-value>
      </constructor>
      <virtual-method name="add_port" invoker="add_port">
        <doc xml:whitespace="preserve">This adds a port to the router's forwarding table. The mapping will
be automatically refreshed by this object until it is either removed with
gupnp_simple_igd_remove_port() or the object disapears.

If there is a problem, the #GUPnPSimpleIgd::error-mapping-port signal will
be emitted. If a router is found and a port is mapped correctly,
#GUPnPSimpleIgd::mapped-external-port will be emitted. These signals may
be emitted multiple times if there are multiple routers present.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="protocol" transfer-ownership="none">
            <doc xml:whitespace="preserve">the protocol "UDP" or "TCP"</doc>
            <type name="utf8" c:type="gchar*"/>
          </parameter>
          <parameter name="external_port" transfer-ownership="none">
            <doc xml:whitespace="preserve">The port to try to open on the external device, 0 means to try a random port if the same port as the local port is already taken</doc>
            <type name="guint16" c:type="guint16"/>
          </parameter>
          <parameter name="local_ip" transfer-ownership="none">
            <doc xml:whitespace="preserve">The IP address to forward packets to (most likely the local ip address)</doc>
            <type name="utf8" c:type="gchar*"/>
          </parameter>
          <parameter name="local_port" transfer-ownership="none">
            <doc xml:whitespace="preserve">The local port to forward packets to</doc>
            <type name="guint16" c:type="guint16"/>
          </parameter>
          <parameter name="lease_duration" transfer-ownership="none">
            <doc xml:whitespace="preserve">The duration of the lease (it will be auto-renewed before it expires). This is in seconds.</doc>
            <type name="guint32" c:type="guint32"/>
          </parameter>
          <parameter name="description" transfer-ownership="none">
            <doc xml:whitespace="preserve">The description that will appear in the router's table</doc>
            <type name="utf8" c:type="gchar*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <virtual-method name="remove_port" invoker="remove_port">
        <doc xml:whitespace="preserve">This tries to remove a port entry from the routers that was previously added
with gupnp_simple_igd_add_port(). There is no indicated of success or failure
it is a best effort mechanism. If it fails, the bindings will disapears after
the lease duration set when the port where added.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="protocol" transfer-ownership="none">
            <doc xml:whitespace="preserve">the protocol "UDP" or "TCP" as given to gupnp_simple_igd_add_port()</doc>
            <type name="utf8" c:type="gchar*"/>
          </parameter>
          <parameter name="external_port" transfer-ownership="none">
            <doc xml:whitespace="preserve">The port to try to open on the external device as given to gupnp_simple_igd_add_port()</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </virtual-method>
      <method name="add_port" c:identifier="gupnp_simple_igd_add_port">
        <doc xml:whitespace="preserve">This adds a port to the router's forwarding table. The mapping will
be automatically refreshed by this object until it is either removed with
gupnp_simple_igd_remove_port() or the object disapears.

If there is a problem, the #GUPnPSimpleIgd::error-mapping-port signal will
be emitted. If a router is found and a port is mapped correctly,
#GUPnPSimpleIgd::mapped-external-port will be emitted. These signals may
be emitted multiple times if there are multiple routers present.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="protocol" transfer-ownership="none">
            <doc xml:whitespace="preserve">the protocol "UDP" or "TCP"</doc>
            <type name="utf8" c:type="gchar*"/>
          </parameter>
          <parameter name="external_port" transfer-ownership="none">
            <doc xml:whitespace="preserve">The port to try to open on the external device, 0 means to try a random port if the same port as the local port is already taken</doc>
            <type name="guint16" c:type="guint16"/>
          </parameter>
          <parameter name="local_ip" transfer-ownership="none">
            <doc xml:whitespace="preserve">The IP address to forward packets to (most likely the local ip address)</doc>
            <type name="utf8" c:type="gchar*"/>
          </parameter>
          <parameter name="local_port" transfer-ownership="none">
            <doc xml:whitespace="preserve">The local port to forward packets to</doc>
            <type name="guint16" c:type="guint16"/>
          </parameter>
          <parameter name="lease_duration" transfer-ownership="none">
            <doc xml:whitespace="preserve">The duration of the lease (it will be auto-renewed before it expires). This is in seconds.</doc>
            <type name="guint32" c:type="guint32"/>
          </parameter>
          <parameter name="description" transfer-ownership="none">
            <doc xml:whitespace="preserve">The description that will appear in the router's table</doc>
            <type name="utf8" c:type="gchar*"/>
          </parameter>
        </parameters>
      </method>
      <method name="delete_all_mappings"
              c:identifier="gupnp_simple_igd_delete_all_mappings">
        <doc xml:whitespace="preserve">Removes all mappings and prevents other from being formed
Should only be called by the dispose function of subclasses</doc>
        <return-value transfer-ownership="none">
          <doc xml:whitespace="preserve">%TRUE if the object can be disposed, %FALSE otherwise</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
      </method>
      <method name="remove_port" c:identifier="gupnp_simple_igd_remove_port">
        <doc xml:whitespace="preserve">This tries to remove a port entry from the routers that was previously added
with gupnp_simple_igd_add_port(). There is no indicated of success or failure
it is a best effort mechanism. If it fails, the bindings will disapears after
the lease duration set when the port where added.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="protocol" transfer-ownership="none">
            <doc xml:whitespace="preserve">the protocol "UDP" or "TCP" as given to gupnp_simple_igd_add_port()</doc>
            <type name="utf8" c:type="gchar*"/>
          </parameter>
          <parameter name="external_port" transfer-ownership="none">
            <doc xml:whitespace="preserve">The port to try to open on the external device as given to gupnp_simple_igd_add_port()</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
      <field name="parent">
        <type name="GObject.Object" c:type="GObject"/>
      </field>
      <field name="priv" readable="0" private="1">
        <type name="SimpleIgdPrivate" c:type="GUPnPSimpleIgdPrivate*"/>
      </field>
      <glib:signal name="error-mapping-port" when="last" detailed="1">
        <doc xml:whitespace="preserve">This means that mapping a port on a specific IGD has failed (it may still
succeed on other IGDs on the network).</doc>
        <return-value transfer-ownership="none">
          <type name="none"/>
        </return-value>
        <parameters>
          <parameter name="error" transfer-ownership="none">
            <doc xml:whitespace="preserve">a #GError</doc>
            <type name="gpointer"/>
          </parameter>
          <parameter name="proto" transfer-ownership="none">
            <doc xml:whitespace="preserve">The requested protocol</doc>
            <type name="utf8"/>
          </parameter>
          <parameter name="external_port" transfer-ownership="none">
            <doc xml:whitespace="preserve">the external port requested in gupnp_simple_igd_add_port()</doc>
            <type name="guint"/>
          </parameter>
          <parameter name="local_ip" transfer-ownership="none">
            <doc xml:whitespace="preserve">internal ip this is forwarded to</doc>
            <type name="utf8"/>
          </parameter>
          <parameter name="local_port" transfer-ownership="none">
            <doc xml:whitespace="preserve">the local port</doc>
            <type name="guint"/>
          </parameter>
          <parameter name="description" transfer-ownership="none">
            <doc xml:whitespace="preserve">the passed description</doc>
            <type name="utf8"/>
          </parameter>
        </parameters>
      </glib:signal>
      <glib:signal name="mapped-external-port" when="last">
        <doc xml:whitespace="preserve">This signal means that an IGD has been found that that adding a port
mapping has succeeded.</doc>
        <return-value transfer-ownership="none">
          <type name="none"/>
        </return-value>
        <parameters>
          <parameter name="proto" transfer-ownership="none">
            <doc xml:whitespace="preserve">the requested protocol ("UDP" or "TCP")</doc>
            <type name="utf8"/>
          </parameter>
          <parameter name="external_ip" transfer-ownership="none">
            <doc xml:whitespace="preserve">the external IP</doc>
            <type name="utf8"/>
          </parameter>
          <parameter name="replaces_external_ip" transfer-ownership="none">
            <doc xml:whitespace="preserve">if this mapping replaces another mapping, this is the old external IP</doc>
            <type name="utf8"/>
          </parameter>
          <parameter name="external_port" transfer-ownership="none">
            <doc xml:whitespace="preserve">the external port that was allocated</doc>
            <type name="guint"/>
          </parameter>
          <parameter name="local_ip" transfer-ownership="none">
            <doc xml:whitespace="preserve">IP address that the router should forward the packets to. It could be the address of another machine on the local network</doc>
            <type name="utf8"/>
          </parameter>
          <parameter name="local_port" transfer-ownership="none">
            <doc xml:whitespace="preserve">the local port</doc>
            <type name="guint"/>
          </parameter>
          <parameter name="description" transfer-ownership="none">
            <doc xml:whitespace="preserve">the user's selected description</doc>
            <type name="utf8"/>
          </parameter>
        </parameters>
      </glib:signal>
    </class>
    <record name="SimpleIgdClass"
            c:type="GUPnPSimpleIgdClass"
            glib:is-gtype-struct-for="SimpleIgd">
      <doc xml:whitespace="preserve">The Raw UDP component transmitter class</doc>
      <field name="parent_class">
        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
      </field>
      <field name="add_port">
        <callback name="add_port">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
          <parameters>
            <parameter name="self" transfer-ownership="none">
              <type name="SimpleIgd" c:type="GUPnPSimpleIgd*"/>
            </parameter>
            <parameter name="protocol" transfer-ownership="none">
              <doc xml:whitespace="preserve">the protocol "UDP" or "TCP"</doc>
              <type name="utf8" c:type="gchar*"/>
            </parameter>
            <parameter name="external_port" transfer-ownership="none">
              <doc xml:whitespace="preserve">The port to try to open on the external device, 0 means to try a random port if the same port as the local port is already taken</doc>
              <type name="guint16" c:type="guint16"/>
            </parameter>
            <parameter name="local_ip" transfer-ownership="none">
              <doc xml:whitespace="preserve">The IP address to forward packets to (most likely the local ip address)</doc>
              <type name="utf8" c:type="gchar*"/>
            </parameter>
            <parameter name="local_port" transfer-ownership="none">
              <doc xml:whitespace="preserve">The local port to forward packets to</doc>
              <type name="guint16" c:type="guint16"/>
            </parameter>
            <parameter name="lease_duration" transfer-ownership="none">
              <doc xml:whitespace="preserve">The duration of the lease (it will be auto-renewed before it expires). This is in seconds.</doc>
              <type name="guint32" c:type="guint32"/>
            </parameter>
            <parameter name="description" transfer-ownership="none">
              <doc xml:whitespace="preserve">The description that will appear in the router's table</doc>
              <type name="utf8" c:type="gchar*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="remove_port">
        <callback name="remove_port">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
          <parameters>
            <parameter name="self" transfer-ownership="none">
              <type name="SimpleIgd" c:type="GUPnPSimpleIgd*"/>
            </parameter>
            <parameter name="protocol" transfer-ownership="none">
              <doc xml:whitespace="preserve">the protocol "UDP" or "TCP" as given to gupnp_simple_igd_add_port()</doc>
              <type name="utf8" c:type="gchar*"/>
            </parameter>
            <parameter name="external_port" transfer-ownership="none">
              <doc xml:whitespace="preserve">The port to try to open on the external device as given to gupnp_simple_igd_add_port()</doc>
              <type name="guint" c:type="guint"/>
            </parameter>
          </parameters>
        </callback>
      </field>
    </record>
    <enumeration name="SimpleIgdError"
                 glib:type-name="GUPnPSimpleIgdError"
                 glib:get-type="gupnp_simple_igd_error_get_type"
                 c:type="GUPnPSimpleIgdError">
      <doc xml:whitespace="preserve">Errors coming out of the GUPnPSimpleIGD object.</doc>
      <member name="address"
              value="0"
              c:identifier="GUPNP_SIMPLE_IGD_ERROR_EXTERNAL_ADDRESS"
              glib:nick="address"/>
      <function name="quark" c:identifier="gupnp_simple_igd_error_quark">
        <return-value transfer-ownership="none">
          <type name="GLib.Quark" c:type="GQuark"/>
        </return-value>
      </function>
    </enumeration>
    <record name="SimpleIgdPrivate"
            c:type="GUPnPSimpleIgdPrivate"
            disguised="1">
    </record>
    <class name="SimpleIgdThread"
           c:symbol-prefix="simple_igd_thread"
           c:type="GUPnPSimpleIgdThread"
           parent="SimpleIgd"
           glib:type-name="GUPnPSimpleIgdThread"
           glib:get-type="gupnp_simple_igd_thread_get_type"
           glib:type-struct="SimpleIgdThreadClass">
      <doc xml:whitespace="preserve">All members are private, access them using methods and properties</doc>
      <constructor name="new" c:identifier="gupnp_simple_igd_thread_new">
        <doc xml:whitespace="preserve">Creates a new #GUPnPSimpleIgdThread</doc>
        <return-value transfer-ownership="full">
          <doc xml:whitespace="preserve">the new #GUPnPSimpleIgdThread</doc>
          <type name="SimpleIgdThread" c:type="GUPnPSimpleIgdThread*"/>
        </return-value>
      </constructor>
      <field name="parent">
        <type name="SimpleIgd" c:type="GUPnPSimpleIgd"/>
      </field>
      <field name="priv" readable="0" private="1">
        <type name="SimpleIgdThreadPrivate"
              c:type="GUPnPSimpleIgdThreadPrivate*"/>
      </field>
    </class>
    <record name="SimpleIgdThreadClass"
            c:type="GUPnPSimpleIgdThreadClass"
            glib:is-gtype-struct-for="SimpleIgdThread">
      <doc xml:whitespace="preserve">The Raw UDP component transmitter class</doc>
      <field name="parent_class">
        <type name="SimpleIgdClass" c:type="GUPnPSimpleIgdClass"/>
      </field>
    </record>
    <record name="SimpleIgdThreadPrivate"
            c:type="GUPnPSimpleIgdThreadPrivate"
            disguised="1">
    </record>
    <function name="simple_igd_error_quark"
              c:identifier="gupnp_simple_igd_error_quark"
              moved-to="SimpleIgdError.quark">
      <return-value transfer-ownership="none">
        <type name="GLib.Quark" c:type="GQuark"/>
      </return-value>
    </function>
  </namespace>
</repository>
