Go to the documentation of this file.
57 const char *TvServiceType[] = {
58 "urn:schemas-upnp-org:service:tvcontrol:1",
59 "urn:schemas-upnp-org:service:tvpicture:1"
62 extern const char *TvServiceType[];
133 Upnp_EventType EventType,
147 const char *location,
149 const char *serviceType,
169 __attribute__((format (__printf__, 1, 2)))
183 const char *varValue,
223 __attribute__((format (__printf__, 1, 2)))
241 const char *varValue,
253 __attribute__((format (__printf__, 1, 2)))
262 #define snprintf _snprintf
263 #define strcasecmp stricmp
EXPORT_SPEC void ixmlNodeList_free(IXML_NodeList *nList)
Frees a NodeList object.
Definition: nodeList.c:143
@ UPNP_EVENT_SUBSCRIPTION_REQUEST
Definition: Callback.h:83
@ UPNP_DISCOVERY_SEARCH_RESULT
Definition: Callback.h:63
IXML_NodeList * SampleUtil_GetFirstServiceList(IXML_Document *doc)
Given a DOM node representing a UPnP Device Description Document, this routine parses the document an...
Definition: sample_util.c:114
@ UPNP_CONTROL_ACTION_REQUEST
Definition: Callback.h:25
EXPORT_SPEC char * ixmlPrintNode(IXML_Node *doc)
Renders a Node and all sub-elements into an XML text representation.
Definition: ixml.c:365
EXPORT_SPEC IXML_Node * ixmlNode_getFirstChild(IXML_Node *nodeptr)
Retrieves the first child Node of a Node.
Definition: node.c:307
EXPORT_SPEC void ixmlFreeDOMString(char *buf)
Frees a DOMString.
int SampleUtil_PrintEvent(Upnp_EventType EventType, const void *Event)
Prints callback event structure details.
Definition: sample_util.c:317
char * SampleUtil_GetFirstDocumentItem(IXML_Document *doc, const char *item)
Given a document node, this routine searches for the first element named by the input string item,...
Definition: sample_util.c:192
@ UPNP_CONTROL_GET_VAR_REQUEST
Definition: Callback.h:36
char * SampleUtil_GetFirstElementItem(IXML_Element *element, const char *item)
Given a DOM element, this routine searches for the first element named by the input string item,...
Definition: sample_util.c:230
@ UPNP_EVENT_RENEWAL_COMPLETE
Definition: Callback.h:93
EXPORT_SPEC const char * ixmlNode_getNodeValue(IXML_Node *nodeptr)
Returns the value of the Node as a string.
Definition: node.c:253
void(* print_string)(const char *string,...)
Prototype for displaying strings. All printing done by the device, control point, and sample util,...
Definition: sample_util.h:162
@ UPNP_EVENT_UNSUBSCRIBE_COMPLETE
Definition: Callback.h:103
Data structure representing the DOM Document.
Definition: ixml.h:198
@ UPNP_EVENT_SUBSCRIPTION_EXPIRED
Definition: Callback.h:115
IXML_Document * UpnpActionComplete_get_ActionRequest(const UpnpActionComplete *p)
int SampleUtil_Initialize(print_string print_function)
Initializes the sample util. Must be called before any sample util functions. May be called multiple ...
Definition: sample_util.c:62
void(* state_update)(const char *varName, const char *varValue, const char *UDN, eventType type)
Prototype for passing back state changes.
Definition: sample_util.h:179
state_update gStateUpdateFun
Definition: sample_util.c:57
print_string gPrintFun
Definition: sample_util.c:56
@ UPNP_DISCOVERY_SEARCH_TIMEOUT
Definition: Callback.h:68
char * SampleUtil_GetElementValue(IXML_Element *element)
Given a DOM node such as <Channel>11</Channel>, this routine extracts the value (e....
Definition: sample_util.c:103
#define UPNP_E_SUCCESS
The operation completed successfully.
Definition: upnp.h:97
@ UPNP_EVENT_RECEIVED
Definition: Callback.h:88
@ UPNP_CONTROL_GET_VAR_COMPLETE
Definition: Callback.h:41
struct s_UpnpActionComplete UpnpActionComplete
Definition: TemplateInclude.h:136
@ UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE
Definition: Callback.h:57
int SampleUtil_RegisterUpdateFunction(state_update update_function)
Definition: sample_util.c:82
EXPORT_SPEC IXML_Node * ixmlNodeList_item(IXML_NodeList *nList, unsigned long index)
Retrieves a Node from a NodeList specified by a numerical index.
Definition: nodeList.c:54
Data structure common to all types of nodes.
Definition: ixml.h:173
const char * UpnpString_get_String(const UpnpString *p)
Returns the pointer to char.
Definition: UpnpString.c:159
int UpnpActionComplete_get_ErrCode(const UpnpActionComplete *p)
void SampleUtil_StateUpdate(const char *varName, const char *varValue, const char *UDN, eventType type)
Definition: sample_util.c:655
int SampleUtil_Print(const char *fmt,...)
Function emulating printf that ultimately calls the registered print function with the formatted stri...
Definition: sample_util.c:634
void linux_print(const char *format,...)
Prints a string to standard out.
Definition: sample_util.c:666
ithread_mutex_t display_mutex
Definition: sample_util.c:60
void SampleUtil_PrintEventType(Upnp_EventType S)
Prints a callback event type as a string.
Definition: sample_util.c:263
EXPORT_SPEC unsigned short ixmlNode_getNodeType(IXML_Node *nodeptr)
Retrieves the type of a Node. Note that not all possible return values are actually implemented.
Definition: node.c:287
int SampleUtil_FindAndParseService(IXML_Document *DescDoc, const char *location, const char *serviceType, char **serviceId, char **eventURL, char **controlURL)
This routine finds the first occurance of a service in a DOM representation of a description document...
Definition: sample_util.c:550
const UpnpString * UpnpActionComplete_get_CtrlUrl(const UpnpActionComplete *p)
Data structure representing a list of nodes.
Definition: ixml.h:246
EXPORT_SPEC IXML_NodeList * ixmlDocument_getElementsByTagName(IXML_Document *doc, const char *tagName)
Returns a NodeList of all Elements that match the given tag name in the order in which they were enco...
EXPORT_SPEC unsigned long ixmlNodeList_length(IXML_NodeList *nList)
Returns the number of Nodes in a NodeList.
Definition: nodeList.c:128
@ UPNP_EVENT_SUBSCRIBE_COMPLETE
Definition: Callback.h:98
@ UPNP_CONTROL_ACTION_COMPLETE
Definition: Callback.h:30
@ UPNP_DISCOVERY_ADVERTISEMENT_ALIVE
Definition: Callback.h:51
Data structure representing an Element node.
Definition: ixml.h:216
@ UPNP_EVENT_AUTORENEWAL_FAILED
Definition: Callback.h:109
IXML_Document * UpnpActionComplete_get_ActionResult(const UpnpActionComplete *p)
EXPORT_SPEC IXML_NodeList * ixmlElement_getElementsByTagName(IXML_Element *element, const char *tagName)
Returns a NodeList of all descendant Elements with a given tag name, in the order in which they are e...
int SampleUtil_Finish()
Releases Resources held by sample util.
Definition: sample_util.c:92