From d86098828a04b57f54501c1cba35aa5335afa91d Mon Sep 17 00:00:00 2001 From: Alexey Romanenko Date: Sat, 12 Sep 2009 06:37:35 +0000 Subject: [PATCH] added new example (binary lamp) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@288275 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/gupnp/examples.xml | 213 +++++++++++++++++++++++++++++++++-- 1 file changed, 203 insertions(+), 10 deletions(-) diff --git a/reference/gupnp/examples.xml b/reference/gupnp/examples.xml index e9044dfbee..00dab7a627 100644 --- a/reference/gupnp/examples.xml +++ b/reference/gupnp/examples.xml @@ -3,14 +3,17 @@ &reftitle.examples; - - This example shows how to obtain information about all devices and services. - It starts infinite loop (use CLI) and while any of available devices or services - is found proper callback function will be invoked. - - - Search for all UPnP devices and services. - +
+ Browsing devices and services + + This example shows how to obtain information about all devices and services. + It starts infinite loop (use CLI) and while any of available devices or services + is found proper callback function will be invoked. + + + + Search for all UPnP devices and services. + ]]> - - + + + +
+ +
+ Implementing the BinaryLight device + + This is an example of UPnP device/service, implementing the BinaryLight + device and SwitchPower services to emulate a light switch. + + + The user interface was purposely simplified in order to show basic + concepts and methods. + + + + Implementing light server + + +]]> + + + + Implementing light client + + $mode, 'cp' => $cp); +gupnp_control_point_callback_set($cp, GUPNP_SIGNAL_SERVICE_PROXY_AVAILABLE, $cb, $arg); + +/* Start for browsing */ +gupnp_control_point_browse_start($cp); + +?> +]]> + + + +
+