|
int | genaUnregisterDevice (UpnpDevice_Handle device_handle) |
| Unregisters a device. More...
|
|
static int | GeneratePropertySet (char **names, char **values, int count, DOMString *out) |
| Generates XML property set for notifications. More...
|
|
static void | free_notify_struct (notify_thread_struct *input) |
| Frees memory used in notify_threads if the reference count is 0, otherwise decrements the refrence count. More...
|
|
static UPNP_INLINE int | notify_send_and_recv (uri_type *destination_url, membuffer *mid_msg, char *propertySet, http_parser_t *response) |
| Sends the notify message and returns a reply. More...
|
|
static int | genaNotify (char *headers, char *propertySet, subscription *sub) |
| Function to Notify a particular subscription of a particular event. More...
|
|
static void | genaNotifyThread (void *input) |
| Thread job to Notify a control point. More...
|
|
static char * | AllocGenaHeaders (const DOMString propertySet) |
| Allocates the GENA header. More...
|
|
void | freeSubscriptionQueuedEvents (subscription *sub) |
|
static int | genaInitNotifyCommon (UpnpDevice_Handle device_handle, char *UDN, char *servId, DOMString propertySet, const Upnp_SID sid) |
|
int | genaInitNotify (UpnpDevice_Handle device_handle, char *UDN, char *servId, char **VarNames, char **VarValues, int var_count, const Upnp_SID sid) |
| Sends the intial state table dump to newly subscribed control point. More...
|
|
int | genaInitNotifyExt (UpnpDevice_Handle device_handle, char *UDN, char *servId, IXML_Document *PropSet, const Upnp_SID sid) |
| Similar to the genaInitNofity. The only difference is that it takes the xml document for the state table and sends the intial state table dump to newly subscribed control point. More...
|
|
static void | maybeDiscardEvents (LinkedList *listp) |
|
static int | genaNotifyAllCommon (UpnpDevice_Handle device_handle, char *UDN, char *servId, DOMString propertySet) |
|
int | genaNotifyAllExt (UpnpDevice_Handle device_handle, char *UDN, char *servId, IXML_Document *PropSet) |
| Sends a notification to all the subscribed control points. More...
|
|
int | genaNotifyAll (UpnpDevice_Handle device_handle, char *UDN, char *servId, char **VarNames, char **VarValues, int var_count) |
| Sends a notification to all the subscribed control points. More...
|
|
static int | respond_ok (SOCKINFO *info, int time_out, subscription *sub, http_message_t *request) |
| Returns OK message in the case of a subscription request. More...
|
|
static int | create_url_list (memptr *url_list, URL_list *out) |
| Function to parse the Callback header value in subscription requests. More...
|
|
void | gena_process_subscription_request (SOCKINFO *info, http_message_t *request) |
| Handles a subscription request from a ctrl point. The socket is not closed on return. More...
|
|
void | gena_process_subscription_renewal_request (SOCKINFO *info, http_message_t *request) |
| Handles a subscription renewal request from a ctrl point. The connection is not destroyed on return. More...
|
|
void | gena_process_unsubscribe_request (SOCKINFO *info, http_message_t *request) |
| Handles a subscription cancellation request from a ctrl point. The connection is not destroyed on return. More...
|
|
Function to parse the Callback header value in subscription requests.
Takes in a buffer containing URLS delimited by '<' and '>'. The entire buffer is copied into dynamic memory and stored in the URL_list. Pointers to the individual urls within this buffer are allocated and stored in the URL_list. Only URLs with network addresses are considered (i.e. host:port or domain name).
- Returns
- The number of URLs parsed if successful, otherwise UPNP_E_OUTOF_MEMORY.
- Parameters
-
References memptr::buf, memptr::length, parse_uri(), and URL_LIST::URLs.
static int genaNotify |
( |
char * |
headers, |
|
|
char * |
propertySet, |
|
|
subscription * |
sub |
|
) |
| |
|
static |
Function to Notify a particular subscription of a particular event.
In general the service should NOT be blocked around this call (this may cause deadlock with a client).
NOTIFY http request is sent and the reply is processed.
- Returns
- GENA_SUCCESS if the event was delivered, otherwise returns the appropriate error code.
- Parameters
-
[in] | headers | Null terminated, includes all headers (including \r\n) except SID and SEQ. |
[in] | propertySet | The evented XML. |
[in] | sub | subscription to be Notified, assumes this is valid for life of function. |
References http_MakeMessage(), membuffer_destroy(), membuffer_init(), notify_send_and_recv(), http_message_t::status_code, UPNP_E_OUTOF_MEMORY, and UPNP_E_SUCCESS.