📄 gupnp-context.xml
字号:
<varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> A <link linkend="GUPnPContext"><type>GUPnPContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The port the SOAP server is running on.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="gupnp-context-get-server" role="function"><title>gupnp_context_get_server ()</title><indexterm zone="gupnp-context-get-server"><primary>gupnp_context_get_server</primary></indexterm><programlisting><link linkend="SoupServer">SoupServer</link>* gupnp_context_get_server (<link linkend="GUPnPContext">GUPnPContext</link> *context);</programlisting><para>Get the <link linkend="SoupServer"><type>SoupServer</type></link> HTTP server that GUPnP is using.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> A <link linkend="GUPnPContext"><type>GUPnPContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The <link linkend="SoupServer"><type>SoupServer</type></link> used by GUPnP. Do not unref this when finished.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="gupnp-context-set-subscription-timeout" role="function"><title>gupnp_context_set_subscription_timeout ()</title><indexterm zone="gupnp-context-set-subscription-timeout"><primary>gupnp_context_set_subscription_timeout</primary></indexterm><programlisting><link linkend="void">void</link> gupnp_context_set_subscription_timeout (<link linkend="GUPnPContext">GUPnPContext</link> *context, <link linkend="guint">guint</link> timeout);</programlisting><para>Sets the event subscription timeout to <parameter>timeout</parameter>. Use 0 if you don'twant subscriptions to time out. Note that any client side subscriptionswill automatically be renewed.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> A <link linkend="GUPnPContext"><type>GUPnPContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>timeout</parameter> :</term><listitem><simpara> Event subscription timeout in seconds</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="gupnp-context-get-subscription-timeout" role="function"><title>gupnp_context_get_subscription_timeout ()</title><indexterm zone="gupnp-context-get-subscription-timeout"><primary>gupnp_context_get_subscription_timeout</primary></indexterm><programlisting><link linkend="guint">guint</link> gupnp_context_get_subscription_timeout (<link linkend="GUPnPContext">GUPnPContext</link> *context);</programlisting><para>Get the event subscription timeout (in seconds), or 0 meaning there is notimeout.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> A <link linkend="GUPnPContext"><type>GUPnPContext</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The event subscription timeout in seconds.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="gupnp-context-host-path" role="function"><title>gupnp_context_host_path ()</title><indexterm zone="gupnp-context-host-path"><primary>gupnp_context_host_path</primary></indexterm><programlisting><link linkend="void">void</link> gupnp_context_host_path (<link linkend="GUPnPContext">GUPnPContext</link> *context, const <link linkend="char">char</link> *local_path, const <link linkend="char">char</link> *server_path);</programlisting><para>Start hosting <parameter>local_path</parameter> at <parameter>server_path</parameter>. Files with the path<parameter>local_path.LOCALE</parameter> (if they exist) will be served up when LOCALE isspecified in the request's Accept-Language header.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> A <link linkend="GUPnPContext"><type>GUPnPContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>local_path</parameter> :</term><listitem><simpara> Path to the local file or folder to be hosted</simpara></listitem></varlistentry><varlistentry><term><parameter>server_path</parameter> :</term><listitem><simpara> Web server path where <parameter>local_path</parameter> should be hosted</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="gupnp-context-unhost-path" role="function"><title>gupnp_context_unhost_path ()</title><indexterm zone="gupnp-context-unhost-path"><primary>gupnp_context_unhost_path</primary></indexterm><programlisting><link linkend="void">void</link> gupnp_context_unhost_path (<link linkend="GUPnPContext">GUPnPContext</link> *context, const <link linkend="char">char</link> *server_path);</programlisting><para>Stop hosting the file or folder at <parameter>server_path</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>context</parameter> :</term><listitem><simpara> A <link linkend="GUPnPContext"><type>GUPnPContext</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>server_path</parameter> :</term><listitem><simpara> Web server path where the file or folder is hosted</simpara></listitem></varlistentry></variablelist></refsect2></refsect1><refsect1 id="GUPnPContext.property-details" role="property_details"><title role="property_details.title">Property Details</title><refsect2 id="GUPnPContext--host-ip"><title>The <literal>"host-ip"</literal> property</title><indexterm zone="GUPnPContext--host-ip"><primary>GUPnPContext:host-ip</primary></indexterm><programlisting> "host-ip" <link linkend="gchar">gchar</link>* : Read / Write / Construct Only</programlisting><para>The local host's IP address. Set to NULL to autodetect.</para><para></para><para>Default value: NULL</para></refsect2><refsect2 id="GUPnPContext--port"><title>The <literal>"port"</literal> property</title><indexterm zone="GUPnPContext--port"><primary>GUPnPContext:port</primary></indexterm><programlisting> "port" <link linkend="guint">guint</link> : Read / Write / Construct Only</programlisting><para>The port to run on. Set to 0 if you don't care what port to run on.</para><para></para><para>Default value: 0</para></refsect2><refsect2 id="GUPnPContext--server"><title>The <literal>"server"</literal> property</title><indexterm zone="GUPnPContext--server"><primary>GUPnPContext:server</primary></indexterm><programlisting> "server" <link linkend="SoupServer">SoupServer</link>* : Read</programlisting><para>The <link linkend="SoupServer"><type>SoupServer</type></link> HTTP server used by GUPnP.</para><para></para></refsect2><refsect2 id="GUPnPContext--subscription-timeout"><title>The <literal>"subscription-timeout"</literal> property</title><indexterm zone="GUPnPContext--subscription-timeout"><primary>GUPnPContext:subscription-timeout</primary></indexterm><programlisting> "subscription-timeout" <link linkend="guint">guint</link> : Read / Write / Construct Only</programlisting><para>The preferred subscription timeout: the number of seconds afterwhich subscriptions are renewed. Set to '0' if subscriptions are never to time out.</para><para></para><para>Allowed values: <= 604800</para><para>Default value: 1800</para></refsect2></refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -