mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 06:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@290904 c90b9560-bf6c-de11-be94-00142212c4b1
142 lines
4.2 KiB
XML
142 lines
4.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="function.gupnp-device-action-callback-set" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>gupnp_device_action_callback_set</refname>
|
|
<refpurpose>Set device callback function</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>gupnp_device_action_callback_set</methodname>
|
|
<methodparam><type>resource</type><parameter>root_device</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>signal</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>action_name</parameter></methodparam>
|
|
<methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
|
|
<methodparam choice="opt"><type>mixed</type><parameter>arg</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Set device callback function for signal and action.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>root_device</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
A root device identifier, returned by <function>gupnp_root_device_new</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>signal</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The value of signal. Signal can be one of the following values:
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><constant>GUPNP_SIGNAL_ACTION_INVOKED</constant></term>
|
|
<listitem>
|
|
<simpara>
|
|
Emitted whenever an action is invoked. Handler should process action
|
|
and must call either <function>gupnp_service_action_return</function>
|
|
or <function>gupnp_service_action_return_error</function>.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><constant>GUPNP_SIGNAL_NOTIFY_FAILED</constant></term>
|
|
<listitem>
|
|
<simpara>
|
|
Emitted whenever notification of a client fails.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>action_name</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The name of action.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>callback</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The callback function for the certain signal. Typically, callback function
|
|
takes on three parameters. The <parameter>service</parameter> parameter's
|
|
identifier being the first, <parameter>action</parameter> parameter's
|
|
identifier (in case GUPNP_SIGNAL_ACTION_INVOKED signal) or
|
|
<parameter>error</parameter> parameter's message (in case GUPNP_SIGNAL_NOTIFY_FAILED
|
|
signal) being the second, and the <parameter>arg</parameter> is third.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>arg</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
User data for <parameter>callback</parameter>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Issues E_WARNING either with not valid callback function or with not valid signal.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>gupnp_root_device_new</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|