cnotify.h File Reference

#include <cybergarage/typedef.h>
#include <cybergarage/soap/csoap.h>
#include <cybergarage/util/cstring.h>
#include <cybergarage/upnp/cstatevariable.h>
#include <cybergarage/upnp/event/cproperty.h>
#include <cybergarage/upnp/event/csubscriber.h>

Defines

#define CG_UPNP_NOTIFY_XMLNS   "e"
#define CG_UPNP_NOTIFY_PROPERTY   "property"
#define CG_UPNP_NOTIFY_PROPERTYSET   "propertyset"
#define cg_upnp_event_notify_request_sethttprequest(notifyReq, httpReq)   cg_soap_request_sethttprequest(notifyReq, httpReq)
#define cg_upnp_event_notify_request_post(notifyReq, host, port)   cg_soap_request_post(notifyReq, host, port)
#define cg_upnp_event_notify_request_getpropertysetnode(notifyReq)   cg_soap_request_getrootnoode(notifyReq)
#define cg_upnp_event_notify_request_setpropertylist(notifyReq, value)   cg_soap_request_setuserdata(notifyReq, value)
#define cg_upnp_event_notify_request_setnt(soapReq, value)   cg_http_packet_setheadervalue((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_NT, value)
#define cg_upnp_event_notify_request_getnt(soapReq)   cg_http_packet_getheadervalue((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_NT)
#define cg_upnp_event_notify_request_setnts(soapReq, value)   cg_http_packet_setheadervalue((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_NTS, value)
#define cg_upnp_event_notify_request_getnts(soapReq)   cg_http_packet_getheadervalue((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_NTS)
#define cg_upnp_event_notify_request_getsid(soapReq)   cg_upnp_event_subscription_getsid(cg_http_packet_getheadervalue((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_SID))
#define cg_upnp_event_notify_request_setseq(soapReq, value)   cg_http_packet_setheaderlong((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_SEQ, value)
#define cg_upnp_event_notify_request_getseq(soapReq)   cg_http_packet_getheaderlong((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_SEQ)
#define cg_upnp_event_notify_response_issuccessful(notifyRes)   cg_soap_response_issuccessful(notifyRes)

Typedefs

typedef CgSoapRequest CgUpnpNotifyRequest
typedef CgSoapResponse CgUpnpNotifyResponse

Functions

CgUpnpNotifyRequestcg_upnp_event_notify_request_new ()
void cg_upnp_event_notify_request_delete (CgUpnpNotifyRequest *notifyReq)
void cg_upnp_event_notify_request_clear (CgUpnpNotifyRequest *notifyReq)
CgUpnpPropertyListcg_upnp_event_notify_request_getpropertylist (CgUpnpNotifyRequest *nofityReq)
void cg_upnp_event_notify_request_setsid (CgUpnpNotifyRequest *soapReq, char *sid)
BOOL cg_upnp_event_notify_request_setpropertysetnode (CgUpnpNotifyRequest *notifyReq, CgUpnpSubscriber *sub, CgUpnpStateVariable *statVar)

Define Documentation

#define cg_upnp_event_notify_request_getnt ( soapReq   )     cg_http_packet_getheadervalue((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_NT)

Get NT from notification request

Parameters:
soapReq Notification request

#define cg_upnp_event_notify_request_getnts ( soapReq   )     cg_http_packet_getheadervalue((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_NTS)

Get NTS from notification request

Parameters:
soapReq Notification request

#define cg_upnp_event_notify_request_getpropertysetnode ( notifyReq   )     cg_soap_request_getrootnoode(notifyReq)

Get root node associated with current Notification request

Parameters:
notifyReq Notification request
Returns:
XML node

#define cg_upnp_event_notify_request_getseq ( soapReq   )     cg_http_packet_getheaderlong((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_SEQ)

Get sequence number from notification request

Parameters:
soapReq Notification request

#define cg_upnp_event_notify_request_getsid ( soapReq   )     cg_upnp_event_subscription_getsid(cg_http_packet_getheadervalue((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_SID))

Get SID from notification request

Parameters:
soapReq Notification request

#define cg_upnp_event_notify_request_post ( notifyReq,
host,
port   )     cg_soap_request_post(notifyReq, host, port)

Sends event Notification request to control point

Parameters:
notifyReq Notification request
host Host address
port Host port
Returns:
Notify response

#define cg_upnp_event_notify_request_sethttprequest ( notifyReq,
httpReq   )     cg_soap_request_sethttprequest(notifyReq, httpReq)

Set HTTP request for event Notification request

Parameters:
notifyReq Notification request
httpReq HTTP request

#define cg_upnp_event_notify_request_setnt ( soapReq,
value   )     cg_http_packet_setheadervalue((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_NT, value)

Set NT (Notificatio type) for Notification request

Parameters:
soapReq Notification request
value Notification type

#define cg_upnp_event_notify_request_setnts ( soapReq,
value   )     cg_http_packet_setheadervalue((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_NTS, value)

Set NTS (Notification sub type) for current Notification request

Parameters:
soapReq Notification request
value NTS

#define cg_upnp_event_notify_request_setpropertylist ( notifyReq,
value   )     cg_soap_request_setuserdata(notifyReq, value)

Set property list for Notification request

Parameters:
notifyReq Notification request
value Property list value

#define cg_upnp_event_notify_request_setseq ( soapReq,
value   )     cg_http_packet_setheaderlong((CgHttpPacket*)(soapReq->httpReq), CG_HTTP_SEQ, value)

Set sequence number for notification request

Parameters:
soapReq Notification request
value Sequence number

#define cg_upnp_event_notify_response_issuccessful ( notifyRes   )     cg_soap_response_issuccessful(notifyRes)

Check if notification response was successfull

Parameters:
notifyRes Notification response

#define CG_UPNP_NOTIFY_PROPERTY   "property"

Define for notify property

#define CG_UPNP_NOTIFY_PROPERTYSET   "propertyset"

Define for notify property set

#define CG_UPNP_NOTIFY_XMLNS   "e"

Define for XML namespace


Typedef Documentation

typedef CgSoapRequest CgUpnpNotifyRequest

Data type for UPnP Notification request

typedef CgSoapResponse CgUpnpNotifyResponse

Data type for UPnP notify response


Function Documentation

void cg_upnp_event_notify_request_clear ( CgUpnpNotifyRequest notifyReq  ) 

Clear Notification request

Parameters:
notifyReq Notification request

void cg_upnp_event_notify_request_delete ( CgUpnpNotifyRequest notifyReq  ) 

Delete Notification request

Parameters:
notifyReq Notification request

CgUpnpPropertyList* cg_upnp_event_notify_request_getpropertylist ( CgUpnpNotifyRequest nofityReq  ) 

Get property list from Notification request

Parameters:
nofityReq Notification request

CgUpnpNotifyRequest* cg_upnp_event_notify_request_new (  ) 

Create new Notification request

BOOL cg_upnp_event_notify_request_setpropertysetnode ( CgUpnpNotifyRequest notifyReq,
CgUpnpSubscriber sub,
CgUpnpStateVariable statVar 
)

Todo:
Check what this does exactly...

void cg_upnp_event_notify_request_setsid ( CgUpnpNotifyRequest soapReq,
char *  sid 
)

Set SID (Subscription ID) for notification request

Parameters:
soapReq Notification request
sid SID


Generated on Tue Aug 8 14:56:29 2006 for CyberLinkC by  doxygen 1.4.7