#include <cybergarage/typedef.h>
#include <cybergarage/util/clist.h>
#include <cybergarage/util/cstring.h>
#include <cybergarage/net/curl.h>
#include <cybergarage/upnp/cstatevariable.h>
#define cg_upnp_subscriber_getdeliveryhost | ( | sub | ) | cg_net_url_gethost(sub->deliveryURL) |
Set the subscriber's delivery host
sub | The event subscriber |
#define cg_upnp_subscriber_getdeliverypath | ( | sub | ) | cg_net_url_getpath(sub->deliveryURL) |
Set the subscriber's delivery path
sub | The event subscriber |
#define cg_upnp_subscriber_getdeliveryport | ( | sub | ) | cg_net_url_getport(sub->deliveryURL) |
Set the subscriber's delivery port
sub | The event subscriber |
#define cg_upnp_subscriber_getnotifycount | ( | sub | ) | (sub->notifyCount) |
Get the notify count
sub | The event subscriber |
#define cg_upnp_subscriber_getsid | ( | sub | ) | cg_string_getvalue(sub->sid) |
Get the subscriber's SID (Subscription IDentifier) value
sub | The current event subscriber |
#define cg_upnp_subscriber_getsubscriptiontime | ( | sub | ) | (sub->subscriptionTime) |
Get the subscription time (duration)
sub | The event subscriber |
#define cg_upnp_subscriber_gettimeout | ( | sub | ) | (sub->timeout) |
Get the subscription timeout (expiration time)
sub | The event subscriber |
#define cg_upnp_subscriber_next | ( | sub | ) | (CgUpnpSubscriber *)cg_list_next((CgList *)sub) |
Get the next subscriber in a subscriber list. Use as an iterator.
sub | The current event subscriber |
#define cg_upnp_subscriber_remove | ( | sub | ) | cg_list_remove((CgList *)sub) |
Remove the event subscriber from a subscriber list.
sub | The event subscriber to remove |
#define cg_upnp_subscriber_setdeliveryurl | ( | sub, | |||
value | ) | cg_net_url_set(sub->deliveryURL, value) |
Set the subscriber's delivery URL
sub | The event subscriber | |
value | The delivery URL |
#define cg_upnp_subscriber_setnotifycount | ( | sub, | |||
value | ) | (sub->notifyCount = value) |
Set the notify count to a certain value.
sub | The event subscriber | |
value | Notify count |
#define cg_upnp_subscriber_setsid | ( | sub, | |||
value | ) | cg_string_setvalue(sub->sid, value) |
Set the subscriber's SID (Subscription IDentifier) value
sub | The event subscriber | |
value | The SID value |
#define cg_upnp_subscriber_setsubscriptiontime | ( | sub, | |||
value | ) | (sub->subscriptionTime = value) |
Set the subscription time (duration) to a certain value.
sub | The event subscriber | |
value | Subscription time |
#define cg_upnp_subscriber_settimeout | ( | sub, | |||
value | ) | (sub->timeout = value) |
Set the subscription timeout (expiration time) to a certain value.
sub | The event subscriber | |
value | Timeout |
Add a new event subscriber to a subscriber list
subList | The subscriber list to add to | |
sub | The subscriber to add |
#define cg_upnp_subscriberlist_clear | ( | subList | ) | cg_list_clear((CgList *)subList, (CG_LIST_DESTRUCTORFUNC)cg_upnp_subscriber_delete) |
Clear the contents of a subscriber list
subList | The subscriber list to clear |
#define cg_upnp_subscriberlist_gets | ( | subList | ) | (CgUpnpSubscriber *)cg_list_next((CgList *)subList) |
Get the first item in a subscriber list (use as the first step in iteration).
subList | The subscriber list to evaluate |
#define cg_upnp_subscriberlist_size | ( | subList | ) | cg_list_size((CgList *)subList) |
Get the size (node count) of a subscriber list
subList | The subscriber list to evaluate |
typedef struct _CgUpnpSubscriber CgUpnpSubscriber |
The device-side structure for an event subscriber
typedef struct _CgUpnpSubscriber CgUpnpSubscriberList |
The device-side structure for an event subscriber
void cg_upnp_subscriber_clear | ( | CgUpnpSubscriber * | sub | ) |
Clear the contents of an event subscriber
sub | The event subscriber |
void cg_upnp_subscriber_delete | ( | CgUpnpSubscriber * | sub | ) |
Destroy an event subscriber
sub | The event subscriber |
long cg_upnp_subscriber_incrementnotifycount | ( | CgUpnpSubscriber * | sub | ) |
Increment the event notify count by one
sub | The event subscriber |
BOOL cg_upnp_subscriber_isexpired | ( | CgUpnpSubscriber * | sub | ) |
Check, whether a subscriber's event subscription has been expired
sub | The subscriber |
CgUpnpSubscriber* cg_upnp_subscriber_new | ( | ) |
Create a new event subscriber
BOOL cg_upnp_subscriber_notify | ( | CgUpnpSubscriber * | sub, | |
CgUpnpStateVariable * | statVar | |||
) |
Post a notification to an event subscriber. This is called in a device.
sub | The event subscriber | |
statVar | The evented state variable |
void cg_upnp_subscriber_renew | ( | CgUpnpSubscriber * | sub | ) |
Renew a subscription. Essentially sets subscription time (duration) to zero and resets notify count (== event key).
sub | The event subscriber |
void cg_upnp_subscriberlist_delete | ( | CgUpnpSubscriberList * | subscriberlist | ) |
Destroy an event subscriber list
subscriberlist | The list to destroy |
CgUpnpSubscriberList* cg_upnp_subscriberlist_new | ( | ) |
Create a new event subscriber list