Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gupnp_service_proxy_add_notify(3) [php man page]

GUPNP_SERVICE_PROXY_ADD_NOTIFY(3)					 1					 GUPNP_SERVICE_PROXY_ADD_NOTIFY(3)

gupnp_service_proxy_add_notify - Sets up callback for variable change notification

SYNOPSIS
bool gupnp_service_proxy_add_notify (resource $proxy, string $value, int $type, mixed $callback, [mixed $arg]) DESCRIPTION
Sets up callback to be called whenever a change notification for variable is recieved. PARAMETERS
o $proxy - A service proxy identifier. o $value - The variable to add notification for. o $type - The type of the variable. Type can be one of the following values: o GUPNP_TYPE_BOOLEAN - Type of the variable is boolean. o GUPNP_TYPE_INT - Type of the variable is integer. o GUPNP_TYPE_LONG - Type of the variable is long. o GUPNP_TYPE_DOUBLE - Type of the variable is double. o GUPNP_TYPE_FLOAT - Type of the variable is float. o GUPNP_TYPE_STRING - Type of the variable is string. o $callback - The callback to call when variable changes. Typically, callback function takes on three parameters. The $variable parameter being the first, $value parameter being the second, and the $arg is third. o $arg - User data for $callback. RETURN VALUES
Returns TRUE on success or FALSE on failure. SEE ALSO
gupnp_service_proxy_remove_notify(3). PHP Documentation Group GUPNP_SERVICE_PROXY_ADD_NOTIFY(3)

Check Out this Related Man Page

GUPNP_CONTROL_POINT_CALLBACK_SET(3)					 1				       GUPNP_CONTROL_POINT_CALLBACK_SET(3)

gupnp_control_point_callback_set - Set control point callback

SYNOPSIS
bool gupnp_control_point_callback_set (resource $cpoint, int $signal, mixed $callback, [mixed $arg]) DESCRIPTION
Set control point callback function for signal. PARAMETERS
o $cpoint - A control point identifier, returned by gupnp_control_point_new(3). o $signal - The value of signal. Signal can be one of the following values: o GUPNP_SIGNAL_DEVICE_PROXY_AVAILABLE - Emitted whenever a new device has become available. o GUPNP_SIGNAL_DEVICE_PROXY_UNAVAILABLE - Emitted whenever a device is not available any more. o GUPNP_SIGNAL_SERVICE_PROXY_AVAILABLE - Emitted whenever a new service has become available. o GUPNP_SIGNAL_SERVICE_PROXY_UNAVAILABLE - Emitted whenever a service is not available any more. o $callback - The callback function for the certain signal. Typically, callback function takes on two parameters. The $proxy parameter's iden- tifier being the first, and the $arg second. o $arg - User data for $callback. 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); ?> ERRORS
/EXCEPTIONS Issues E_WARNING with not valid callback function. SEE ALSO
gupnp_control_point_new(3), gupnp_control_point_browse_start(3). PHP Documentation Group GUPNP_CONTROL_POINT_CALLBACK_SET(3)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

calling a aliased variable

Issue: i have variable A which is an alias for variable B which is equal to "THIS IS A TEST" when every i echo variable A i only get the alias name for variable B, NOT the contents of variable B. HOSTNAME# echo $TESTIT + echo THIS IS A TEST THIS IS A TEST HOSTNAME# ls -l total... (10 Replies)
Discussion started by: Optimus_P
10 Replies

2. UNIX for Dummies Questions & Answers

Replacing $ in variable

hi I have a variable like k=$DESTDIR/$PKG/$VERSION I want to replace each $ in string k with say "XXX". so that k becomes like this "XXXDESTDIR/XXXPKG/XXXVERSION" when I use echo $k | sed -e "s/\$/XXX" it actually passes expanded of variables $DESTDIR, $PKG and $VERSION to sed. ... (10 Replies)
Discussion started by: ashish_uiit
10 Replies

3. Shell Programming and Scripting

Content of variable

I have a variable that contains filenames like this: variable="file_1.extension<blank>file_2.extension<blank>file_3.extension<blank>file_4.extension and so on" How can I make filenames to be separated by newline: (I tried Sed but it didn't worked well) file_1.extension file_2.extension... (6 Replies)
Discussion started by: MartyIX
6 Replies

4. UNIX for Advanced & Expert Users

Usage of $ as variable name

Hi I have to use a Environment variable and that variable has $ prefixed to its name like, $var=/home/source/test/ i need to use the variable as i have show above. :confused: Help requested..... Thanks in advance... (6 Replies)
Discussion started by: shreekrishnagd
6 Replies

5. Shell Programming and Scripting

How to get the values from a variable having variable name

In shell script how to do the following ....................... For example I have following 3 variables VARIABLE_DYNAMIC JOB_NP_22="ABCD" JOB_NP_88="HELLO" based on the value in VARIABLE_DYNAMIC the particular variable value should be displayed... (14 Replies)
Discussion started by: anilacharya4u
14 Replies

6. Shell Programming and Scripting

How to concatenate a string and a variable

I need a way to build variable in this manner: variable_$i Inside a for loop i need to create it. where i goes from 1 to 30.. and then i need to print them on screen with echo $variable_$i which is the best way to do this? (6 Replies)
Discussion started by: sreedivia
6 Replies

7. Shell Programming and Scripting

calculate number of strings in a variable

Hi all I have a variable called "variable" and is of the form variable ="AAA BBB CCC DDD" {basically it has values separated by spaces} What is the simplest way to check if "variable" has more that one value in its list? Thanks. (9 Replies)
Discussion started by: felixmat1
9 Replies

8. Shell Programming and Scripting

Removing a character from a variable and assigning it to another variable?

Hi folks. I have this variable called FirstIN that contains something like this: 001,002,003,004... I am trying to assign the content of this variable into ModifiedIN but with the following format : 001 002 003 004...(changing the commas for spaces) I thought about using sed but i am not... (17 Replies)
Discussion started by: Stephan
17 Replies

9. Shell Programming and Scripting

What's the max integer a variable can hold?

I would like to know the maximum integer that a variable can hold. Actually one of my variable holds value 2231599773 and hence the script fails to process it.Do we have any other data type or options available to handle this long integers? (9 Replies)
Discussion started by: michaelrozar17
9 Replies

10. Shell Programming and Scripting

Unable to store "-e" in variable ??????

p="-e" echo $p It is not returning the value "-e" stored. Instead returns null. I am wondering how could this happen. Please help me out.I tried all possibilities like p='-e' | p="\-e". Nothing seems to work. :confused::confused: (10 Replies)
Discussion started by: shanneykar
10 Replies

11. Shell Programming and Scripting

How to change last character in string with a variable value.

Hey Guys, I have text such as this. 28003,ALCORN,2 28009,BENTON,2 28013,CALHOUN,2 28017,CHICKASAW,2 47017,CARROLL,2 05021,CLAY,0 The last digit after the final "," is a variable value. This is the base file. I have to do further execution on this file later and I need to update the... (7 Replies)
Discussion started by: chagan02
7 Replies

12. Programming

Why this const variable is not changing even after applying const_cast?

Hi In the following code, why the variable 'i' still retains the value 10 instead of 11? Why it is not possible to alter this variable's value? int main() { const int i = 10; *(const_cast<int*>(&i)) = 11; cout << i << endl; // Ans: 10 } (6 Replies)
Discussion started by: royalibrahim
6 Replies

13. AIX

Powerha on P595 and Blade HX5 Type 787

Hello Everyobdy! Is it poosible to implement PowerHa on Different Server like power 595 and Blade HX5 Type 787 Thanks in Advance (8 Replies)
Discussion started by: Vit0_Corleone
8 Replies

14. Shell Programming and Scripting

Bash variable within variable

Hello, Can I ask how to expand variable that contains another in bash? I need to loop variable within another one like this: RD1=testgrp RD2=testgroup RD3=testgroupfile RD4=tstgroup ... RD40=try2013 DEST=/home/king/finaldir for i in {1..40}; do mv ${RD${i}} ${DEST} done I do not... (8 Replies)
Discussion started by: yifangt
8 Replies

15. UNIX for Beginners Questions & Answers

Replace integer string in a variable based on month?

Hi Folks - Linux Version = Linux 2.6.39-400.128.17.el5uek x86_64 I have a process that determines the start and end load periods for an Oracle data load process. The variables used are as follows follows: They are populated like such: However, the load requires the month to be the... (11 Replies)
Discussion started by: SIMMS7400
11 Replies