Go to the documentation of this file.
13 #ifdef TEMPLATE_GENERATE_SOURCE
14 #undef TEMPLATE_GENERATE_SOURCE
18 #define TEMPLATE_GENERATE_SOURCE
27 #include "TheStruct.h"
29 #define CLASS UnitFirstObject
31 #define EXPAND_CLASS_MEMBERS(CLASS) \
32 EXPAND_CLASS_MEMBER_INT(CLASS, TheInteger, int) \
33 EXPAND_CLASS_MEMBER_INT(CLASS, TheUnsignedLong, unsigned long) \
34 EXPAND_CLASS_MEMBER_INT(CLASS, TheCharPointer, char *) \
35 EXPAND_CLASS_MEMBER_BUFFER(CLASS, TheBuffer, struct TheStruct) \
36 EXPAND_CLASS_MEMBER_LIST(CLASS, TheList) \
37 EXPAND_CLASS_MEMBER_OBJECT(CLASS, TheSecondObject, UnitSecondObject) \
38 EXPAND_CLASS_MEMBER_STRING(CLASS, TheString) \
39 EXPAND_CLASS_MEMBER_DOMSTRING(CLASS, TheDomString)
EXPORT_SPEC void ixmlNodeList_free(IXML_NodeList *nList)
Frees a NodeList object.
Definition: nodeList.c:143
static void format_uuid_v1(uuid_upnp *uid, uint16_t clockseq, uuid_time_t timestamp, uuid_node_t node)
Make a UUID from the timestamp, clockseq, and node ID.
Definition: uuid.c:101
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.
static void get_current_time(uuid_time_t *timestamp)
Get time as 60 bit 100ns ticks since whenever.
Definition: uuid.c:171
uint16_t time_mid
Definition: uuid.h:30
EXPORT_SPEC const char * ixmlNode_getNodeValue(IXML_Node *nodeptr)
Returns the value of the Node as a string.
Definition: node.c:253
char * buf
Definition: membuffer.h:58
static void format_uuid_v3(uuid_upnp *uid, unsigned char hash[16])
Make a UUID from a (pseudo)random 128 bit number.
Definition: uuid.c:256
uuid_node_t node
Definition: uuid.c:122
Data structure representing the DOM Document.
Definition: ixml.h:198
EXPORT_SPEC int ixmlNode_appendChild(IXML_Node *nodeptr, IXML_Node *newChild)
Appends a child Node to the list of children of a Node.
Definition: node.c:606
void uuid_create_from_name(uuid_upnp *uid, uuid_upnp nsid, void *name, int namelen)
Create a UUID using a "name" from a "name space".
Definition: uuid.c:224
EXPORT_SPEC IXML_Element * ixmlDocument_createElement(IXML_Document *doc, const char *tagName)
Creates a new Element node with the given tag name.
static int read_state(uint16_t *clockseq, uuid_time_t *timestamp, uuid_node_t *node)
Read UUID generator state from non-volatile store.
Definition: uuid.c:133
#define UPNP_E_SUCCESS
The operation completed successfully.
Definition: upnp.h:97
void membuffer_init(membuffer *m)
Wrapper to membuffer_initialize().
Definition: membuffer.c:152
#define UPNP_INLINE
Declares an inline function.
Definition: UpnpGlobal.h:99
Definition: membuffer.h:56
Object used in unit testing of object templates.
#define UPNP_E_INVALID_URL
An URL passed into the function is invalid.
Definition: upnp.h:152
uint8_t node[6]
Definition: uuid.h:38
int membuffer_assign(membuffer *m, const void *buf, size_t buf_len)
Allocate memory to membuffer *m and copy the contents of the in parameter const void *buf.
Definition: membuffer.c:170
char * membuffer_detach(membuffer *m)
Definition: membuffer.c:273
uint16_t time_hi_and_version
Definition: uuid.h:32
static void write_state(uint16_t clockseq, uuid_time_t timestamp, uuid_node_t node)
Save UUID generator state back to non-volatile storage.
Definition: uuid.c:148
EXPORT_SPEC IXML_Node * ixmlDocument_createTextNode(IXML_Document *doc, const char *data)
Creates a new Text node with the given data.
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
EXPORT_SPEC void ixmlElement_free(IXML_Element *element)
Frees the given Element and any subtree of the Element.
Definition: element.c:706
#define TRUE
Definition: upnputil.h:63
void get_system_time(uuid_time_t *uuid_time)
System dependent call to get the current system time.
Definition: sysdep.c:115
uint8_t clock_seq_low
Definition: uuid.h:36
EXPORT_SPEC int ixmlNode_setNodeValue(IXML_Node *nodeptr, const char *newNodeValue)
Assigns a new value to a Node.
Definition: node.c:263
Represents a URI used in parse_uri and elsewhere.
Definition: uri.h:136
#define UPNP_E_INVALID_DESC
The description document passed to UpnpRegisterRootDevice, UpnpRegisterRootDevice2 UpnpRegisterRootDe...
Definition: upnp.h:143
void get_system_time(uuid_time_t *uuid_time)
System dependent call to get the current system time.
Definition: sysdep.c:115
#define UUIDS_PER_TICK
Definition: sysdep.h:46
size_t length
Definition: membuffer.h:60
int web_server_set_alias(const char *alias_name, const char *alias_content, size_t alias_content_length, time_t last_modified)
Replaces current alias with the given alias. To remove the current alias, set alias_name to NULL.
Definition: webserver.c:421
#define UPNP_E_URL_TOO_BIG
The URL passed into a function is too long.
Definition: upnp.h:203
void UpnpPrintf(Upnp_LogLevel DLevel, Dbg_Module Module, const char *DbgFileName, int DbgLineNo, const char *FmtStr,...)
Prints the debug statement either on the standard output or log file along with the information from ...
Definition: upnpdebug.c:127
int membuffer_append_str(membuffer *m, const char *c_str)
Invokes function to appends data from a constant string to the buffer.
Definition: membuffer.c:207
Object used in unit testing of object templates.
Data structure representing a list of nodes.
Definition: ixml.h:246
#define DOMString
The type of DOM strings.
Definition: ixml.h:59
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...
int membuffer_append(membuffer *m, const void *buf, size_t buf_len)
Invokes function to appends data from a constant buffer to the buffer.
Definition: membuffer.c:200
uint16_t cs
Definition: uuid.c:124
uint32_t time_low
Definition: uuid.h:28
int uuid_create(uuid_upnp *uid)
Generator of a UUID.
Definition: uuid.c:53
uuid_time_t ts
Definition: uuid.c:120
EXPORT_SPEC char * ixmlPrintDocument(IXML_Document *doc)
Renders a Node and all sub-elements into an XML document representation.
Definition: ixml.c:347
static uint16_t true_random(void)
generate a crypto-quality random number. This sample doesn't do that.
Definition: uuid.c:205
int parse_uri(const char *in, size_t max, uri_type *out)
Parses a uri as defined in http://www.ietf.org/rfc/rfc2396.txt (RFC explaining URIs).
Definition: uri.c:707
Templates for include files of objects.
void upnp_uuid_unpack(uuid_upnp *u, char *out)
Out will be xxxx-xx-xx-xx-xxxxxx format.
Definition: uuid.c:85
#define UPNP_E_INTERNAL_ERROR
Generic error code for internal conditions not covered by other error codes.
Definition: upnp.h:376
int uuid_compare(uuid_upnp *u1, uuid_upnp *u2)
Compare two UUID's "lexically" and return.
Definition: uuid.c:283
Data structure representing an Element node.
Definition: ixml.h:216
Provides a platform independent way to include TCP/IP types and functions.
void membuffer_destroy(membuffer *m)
Free's memory allocated for membuffer* m.
Definition: membuffer.c:160
uint8_t clock_seq_hi_and_reserved
Definition: uuid.h:34
void get_ieee_node_identifier(uuid_node_t *node)
System dependent call to get IEEE node ID.
Definition: sysdep.c:38
void get_ieee_node_identifier(uuid_node_t *node)
System dependent call to get IEEE node ID.
Definition: sysdep.c:38
#define UPNP_E_OUTOF_MEMORY
Not enough resources are currently available to complete the operation.
Definition: upnp.h:126