libUPnP  1.8.4
FirstObject.h
Go to the documentation of this file.
1 
2 #ifndef FIRSTOBJECT_H
3 #define FIRSTOBJECT_H
4 
11 /******************************************************************************/
12 
13 #ifdef TEMPLATE_GENERATE_SOURCE
14 #undef TEMPLATE_GENERATE_SOURCE
15 
16  #include "SecondObject.h"
17 
18 #define TEMPLATE_GENERATE_SOURCE
19 #else /* TEMPLATE_GENERATE_SOURCE */
20 
21  #include "SecondObject.h"
22 
23 #endif /* TEMPLATE_GENERATE_SOURCE */
24 
25 /******************************************************************************/
26 
27 #include "TheStruct.h"
28 
29 #define CLASS UnitFirstObject
30 
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)
40 
41 #include "TemplateInclude.h"
42 
43 #endif /* FIRSTOBJECT_H */
44 
sysdep.h
ixmlNodeList_free
EXPORT_SPEC void ixmlNodeList_free(IXML_NodeList *nList)
Frees a NodeList object.
Definition: nodeList.c:143
uri.h
format_uuid_v1
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
ixmlNode_getFirstChild
EXPORT_SPEC IXML_Node * ixmlNode_getFirstChild(IXML_Node *nodeptr)
Retrieves the first child Node of a Node.
Definition: node.c:307
ixmlFreeDOMString
EXPORT_SPEC void ixmlFreeDOMString(char *buf)
Frees a DOMString.
upnpdebug.h
get_current_time
static void get_current_time(uuid_time_t *timestamp)
Get time as 60 bit 100ns ticks since whenever.
Definition: uuid.c:171
_uuid_upnp::time_mid
uint16_t time_mid
Definition: uuid.h:30
ixmlNode_getNodeValue
EXPORT_SPEC const char * ixmlNode_getNodeValue(IXML_Node *nodeptr)
Returns the value of the Node as a string.
Definition: node.c:253
membuffer::buf
char * buf
Definition: membuffer.h:58
format_uuid_v3
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_state::node
uuid_node_t node
Definition: uuid.c:122
_IXML_Document
Data structure representing the DOM Document.
Definition: ixml.h:198
ixmlNode_appendChild
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
uuid_create_from_name
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
ixmlDocument_createElement
EXPORT_SPEC IXML_Element * ixmlDocument_createElement(IXML_Document *doc, const char *tagName)
Creates a new Element node with the given tag name.
read_state
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
uuid_state
Definition: uuid.c:118
UPNP_E_SUCCESS
#define UPNP_E_SUCCESS
The operation completed successfully.
Definition: upnp.h:97
membuffer_init
void membuffer_init(membuffer *m)
Wrapper to membuffer_initialize().
Definition: membuffer.c:152
UPNP_INLINE
#define UPNP_INLINE
Declares an inline function.
Definition: UpnpGlobal.h:99
membuffer
Definition: membuffer.h:56
SecondObject.h
Object used in unit testing of object templates.
UPNP_E_INVALID_URL
#define UPNP_E_INVALID_URL
An URL passed into the function is invalid.
Definition: upnp.h:152
upnp.h
_uuid_upnp::node
uint8_t node[6]
Definition: uuid.h:38
membuffer_assign
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
uuid_node_t
Definition: sysdep.h:56
membuffer_detach
char * membuffer_detach(membuffer *m)
Definition: membuffer.c:273
_uuid_upnp::time_hi_and_version
uint16_t time_hi_and_version
Definition: uuid.h:32
write_state
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
ixmlDocument_createTextNode
EXPORT_SPEC IXML_Node * ixmlDocument_createTextNode(IXML_Document *doc, const char *data)
Creates a new Text node with the given data.
ixmlNodeList_item
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
_IXML_Node
Data structure common to all types of nodes.
Definition: ixml.h:173
membuffer.h
ixmlElement_free
EXPORT_SPEC void ixmlElement_free(IXML_Element *element)
Frees the given Element and any subtree of the Element.
Definition: element.c:706
TRUE
#define TRUE
Definition: upnputil.h:63
get_system_time
void get_system_time(uuid_time_t *uuid_time)
System dependent call to get the current system time.
Definition: sysdep.c:115
_uuid_upnp::clock_seq_low
uint8_t clock_seq_low
Definition: uuid.h:36
ixmlNode_setNodeValue
EXPORT_SPEC int ixmlNode_setNodeValue(IXML_Node *nodeptr, const char *newNodeValue)
Assigns a new value to a Node.
Definition: node.c:263
URI
Represents a URI used in parse_uri and elsewhere.
Definition: uri.h:136
UPNP_E_INVALID_DESC
#define UPNP_E_INVALID_DESC
The description document passed to UpnpRegisterRootDevice, UpnpRegisterRootDevice2 UpnpRegisterRootDe...
Definition: upnp.h:143
get_system_time
void get_system_time(uuid_time_t *uuid_time)
System dependent call to get the current system time.
Definition: sysdep.c:115
UUIDS_PER_TICK
#define UUIDS_PER_TICK
Definition: sysdep.h:46
membuffer::length
size_t length
Definition: membuffer.h:60
web_server_set_alias
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
UPNP_E_URL_TOO_BIG
#define UPNP_E_URL_TOO_BIG
The URL passed into a function is too long.
Definition: upnp.h:203
UpnpPrintf
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
membuffer_append_str
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
FirstObject.h
Object used in unit testing of object templates.
_IXML_NodeList
Data structure representing a list of nodes.
Definition: ixml.h:246
DOMString
#define DOMString
The type of DOM strings.
Definition: ixml.h:59
ixmlDocument_getElementsByTagName
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...
membuffer_append
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
uuid_state::cs
uint16_t cs
Definition: uuid.c:124
_uuid_upnp::time_low
uint32_t time_low
Definition: uuid.h:28
uuid_create
int uuid_create(uuid_upnp *uid)
Generator of a UUID.
Definition: uuid.c:53
uuid_state::ts
uuid_time_t ts
Definition: uuid.c:120
ixmlPrintDocument
EXPORT_SPEC char * ixmlPrintDocument(IXML_Document *doc)
Renders a Node and all sub-elements into an XML document representation.
Definition: ixml.c:347
true_random
static uint16_t true_random(void)
generate a crypto-quality random number. This sample doesn't do that.
Definition: uuid.c:205
parse_uri
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
_uuid_upnp
Definition: uuid.h:26
TemplateInclude.h
Templates for include files of objects.
upnp_uuid_unpack
void upnp_uuid_unpack(uuid_upnp *u, char *out)
Out will be xxxx-xx-xx-xx-xxxxxx format.
Definition: uuid.c:85
UPNP_E_INTERNAL_ERROR
#define UPNP_E_INTERNAL_ERROR
Generic error code for internal conditions not covered by other error codes.
Definition: upnp.h:376
uuid_compare
int uuid_compare(uuid_upnp *u1, uuid_upnp *u2)
Compare two UUID's "lexically" and return.
Definition: uuid.c:283
_IXML_Element
Data structure representing an Element node.
Definition: ixml.h:216
MD5Context
Definition: md5.h:24
UpnpInet.h
Provides a platform independent way to include TCP/IP types and functions.
membuffer_destroy
void membuffer_destroy(membuffer *m)
Free's memory allocated for membuffer* m.
Definition: membuffer.c:160
upnputil.h
_uuid_upnp::clock_seq_hi_and_reserved
uint8_t clock_seq_hi_and_reserved
Definition: uuid.h:34
get_ieee_node_identifier
void get_ieee_node_identifier(uuid_node_t *node)
System dependent call to get IEEE node ID.
Definition: sysdep.c:38
get_ieee_node_identifier
void get_ieee_node_identifier(uuid_node_t *node)
System dependent call to get IEEE node ID.
Definition: sysdep.c:38
UPNP_E_OUTOF_MEMORY
#define UPNP_E_OUTOF_MEMORY
Not enough resources are currently available to complete the operation.
Definition: upnp.h:126