downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the Git repository for this website on git.php.net.

Source of: /manual/fa/function.gupnp-device-action-callback-set.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.gupnp.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'fa',
  ),
 
'this' =>
  array (
   
0 => 'function.gupnp-device-action-callback-set.php',
   
1 => 'gupnp_device_action_callback_set',
  ),
 
'up' =>
  array (
   
0 => 'ref.gupnp.php',
   
1 => 'Gupnp Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.gupnp-control-point-new.php',
   
1 => 'gupnp_control_point_new',
  ),
 
'next' =>
  array (
   
0 => 'function.gupnp-device-info-get-service.php',
   
1 => 'gupnp_device_info_get_service',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.gupnp-device-action-callback-set" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gupnp_device_action_callback_set</h1>
  <p class="verinfo">(PECL gupnp &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">gupnp_device_action_callback_set</span> &mdash; <span class="dc-title">Set device callback function</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.gupnp-device-action-callback-set-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><b>gupnp_device_action_callback_set</b></span>
    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$root_device</tt></span>
   , <span class="methodparam"><span class="type">int</span> <tt class="parameter">$signal</tt></span>
   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$action_name</tt></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.php#language.types.mixed" class="type mixed">mixed</a></span> <tt class="parameter">$callback</tt></span>
   [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.php#language.types.mixed" class="type mixed">mixed</a></span> <tt class="parameter">$arg</tt></span>
  ] )</div>

  <p class="para rdfs-comment">
   Set device callback function for signal and action.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.gupnp-device-action-callback-set-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><i><tt class="parameter">root_device</tt></i></span>
     <dd>

      <p class="para">
       A root device identifier, returned by <span class="function"><a href="function.gupnp-root-device-new.php" class="function">gupnp_root_device_new()</a></span>.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><i><tt class="parameter">signal</tt></i></span>
     <dd>

      <p class="para">
       The value of signal. Signal can be one of the following values:
       <dl>

        <dt>

         <span class="term"><b><tt>GUPNP_SIGNAL_ACTION_INVOKED</tt></b></span>
         <dd>

          <span class="simpara">
           Emitted whenever an action is invoked. Handler should process action
           and must call either <span class="function"><a href="function.gupnp-service-action-return.php" class="function">gupnp_service_action_return()</a></span>
           or <span class="function"><a href="function.gupnp-service-action-return-error.php" class="function">gupnp_service_action_return_error()</a></span>.
          </span>
         </dd>

        </dt>

        <dt>

         <span class="term"><b><tt>GUPNP_SIGNAL_NOTIFY_FAILED</tt></b></span>
         <dd>

          <span class="simpara">
           Emitted whenever notification of a client fails.
          </span>
         </dd>

        </dt>

       </dl>

      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><i><tt class="parameter">action_name</tt></i></span>
     <dd>

      <p class="para">
       The name of action.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><i><tt class="parameter">callback</tt></i></span>
     <dd>

      <p class="para">
       The callback function for the certain signal. Typically, callback function
       takes on three parameters. The <i><tt class="parameter">service</tt></i> parameter&#039;s
       identifier being the first, <i><tt class="parameter">action</tt></i> parameter&#039;s
       identifier (in case GUPNP_SIGNAL_ACTION_INVOKED signal) or
       <i><tt class="parameter">error</tt></i> parameter&#039;s message (in case GUPNP_SIGNAL_NOTIFY_FAILED
       signal) being the second, and the <i><tt class="parameter">arg</tt></i> is third.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><i><tt class="parameter">arg</tt></i></span>
     <dd>

      <p class="para">
       User data for <i><tt class="parameter">callback</tt></i>.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.gupnp-device-action-callback-set-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <b><tt>TRUE</tt></b> on success or <b><tt>FALSE</tt></b> on failure.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.gupnp-device-action-callback-set-errors">
  <h3 class="title">Errors/Exceptions</h3>
  <p class="para">
   Issues E_WARNING either with not valid callback function or with not valid signal.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.gupnp-device-action-callback-set-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.gupnp-root-device-new.php" class="function" rel="rdfs-seeAlso">gupnp_root_device_new()</a> - Create a new root device</span></li>
   </ul>
  </p>
 </div>


 </div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites