Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gupnp_device_info_get_service(3) [php man page]

GUPNP_DEVICE_INFO_GET_SERVICE(3)					 1					  GUPNP_DEVICE_INFO_GET_SERVICE(3)

gupnp_device_info_get_service - Get the service with type

SYNOPSIS
resource gupnp_device_info_get_service (resource $root_device, string $type) DESCRIPTION
Get the service with type or false if no such device was found. PARAMETERS
o $root_device - A root device identifier, returned by gupnp_root_device_new(3). o $type - The type of the service to be retrieved. RETURN VALUES
A service identifier. EXAMPLES
Example #1 Create new UPnP context and get device info service <?php /* Create the UPnP context */ $context = gupnp_context_new(); if (!$context) { die("Error creating the GUPnP context "); } /* Create root device */ $location = "/BinaryLight1.xml"; $dev = gupnp_root_device_new($context, $location); /* Set root device is available */ gupnp_root_device_set_available($dev, true); /* Get the switch service from the root device */ $service_type = "urn:schemas-upnp-org:service:SwitchPower:1"; $service = gupnp_device_info_get_service($dev, $service_type); if (!$service) { die("Cannot get SwitchPower1 service "); } ?> PHP Documentation Group GUPNP_DEVICE_INFO_GET_SERVICE(3)

Check Out this Related Man Page

GUPNP_CONTROL_POINT_BROWSE_START(3)					 1				       GUPNP_CONTROL_POINT_BROWSE_START(3)

gupnp_control_point_browse_start - Start browsing

SYNOPSIS
bool gupnp_control_point_browse_start (resource $cpoint) DESCRIPTION
Start the search and calls user-defined callback. PARAMETERS
o $cpoint - A control point identifier, returned by gupnp_control_point_new(3). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Create new UPnP context and start browsing <?php function device_proxy_available_cb($proxy, $arg) { $info = gupnp_device_info_get($proxy); $type = $info['device_type']; $location = $info['location']; printf("Device available: "); printf("type: %s ", $type); printf("location: %s ", $location); } /* Create the UPnP context */ $context = gupnp_context_new(); if (!$context) { die("Error creating the GUPnP context "); } /* We're interested in everything */ $cp = gupnp_control_point_new($context, "ssdp:all"); gupnp_control_point_callback_set($cp, GUPNP_SIGNAL_DEVICE_PROXY_AVAILABLE, 'device_proxy_available_cb'); /* Start for browsing */ gupnp_control_point_browse_start($cp); ?> SEE ALSO
gupnp_control_point_new(3), gupnp_control_point_browse_stop(3). PHP Documentation Group GUPNP_CONTROL_POINT_BROWSE_START(3)
Man Page

We Also Found This Discussion For You

1. AIX

HACMP: set preferred adapter for service ip

Hi, lets say we have two boot interfaces en0 en1 and two resource groups, with two service ips, sip1 and sip2, one persistent ip pers1 both persistend and service ips are applied as ip-alias when I start the cluster, and bring the resource groups up, it looks like en0: sip1 and sip2 ... (4 Replies)
Discussion started by: funksen
4 Replies