#include "dnxTransport.h"
Go to the source code of this file.
Data Structures | |
struct | DnxXmlBuf |
Enumerations | |
enum | DnxXmlType { DNX_XML_UNKNOWN = 0, DNX_XML_SHORT, DNX_XML_USHORT, DNX_XML_INT, DNX_XML_UINT, DNX_XML_LONG, DNX_XML_ULONG, DNX_XML_STR_UNESCAPED, DNX_XML_XID, DNX_XML_STR } |
Functions | |
int | dnxXmlOpen (DnxXmlBuf *xbuf, char *tag) |
Open and write header information to a dnx xml buffer. | |
int | dnxXmlAdd (DnxXmlBuf *xbuf, char *xTag, DnxXmlType xType, void *xData) |
Add an XML data element to a dnx xml buffer. | |
int | dnxXmlGet (DnxXmlBuf *xbuf, char *xTag, DnxXmlType xType, void *xData) |
Return the C data typed value associated with a specified tag. | |
int | dnxXmlCmpStr (DnxXmlBuf *xbuf, char *xTag, char *cmpstr) |
Compare a string with an XML node text value. | |
int | dnxXmlClose (DnxXmlBuf *xbuf) |
Validate and close a dnx xml buffer. |
Definition in file dnxXml.h.
enum DnxXmlType |
int dnxXmlAdd | ( | DnxXmlBuf * | xbuf, | |
char * | xTag, | |||
DnxXmlType | xType, | |||
void * | xData | |||
) |
Add an XML data element to a dnx xml buffer.
[out] | xbuf | - the dnx xml buffer to be appended to. |
[in] | xTag | - the xml tag to use for this new data element. |
[in] | xType | - the C data type of the xml element data. |
[in] | xData | - an opaque pointer to a C data variable to be expressed in xml in xbuf . |
Definition at line 409 of file dnxXml.c.
References DnxXmlBuf::buf, DNX_ERR_CAPACITY, DNX_MAX_MSG, DNX_OK, DNX_XML_MIN_HEADER, dnxXmlToString(), and DnxXmlBuf::size.
Referenced by dnxSendJob(), dnxSendMgmtReply(), dnxSendMgmtRequest(), dnxSendNodeRequest(), and dnxSendResult().
int dnxXmlClose | ( | DnxXmlBuf * | xbuf | ) |
Validate and close a dnx xml buffer.
[in,out] | xbuf | - the buffer to be validated and closed. |
Definition at line 616 of file dnxXml.c.
References DnxXmlBuf::buf, DNX_ERR_CAPACITY, DNX_MAX_MSG, DNX_OK, and DnxXmlBuf::size.
Referenced by dnxSendJob(), dnxSendMgmtReply(), dnxSendMgmtRequest(), dnxSendNodeRequest(), and dnxSendResult().
int dnxXmlCmpStr | ( | DnxXmlBuf * | xbuf, | |
char * | xTag, | |||
char * | cmpstr | |||
) |
Compare a string with an XML node text value.
[in,out] | xbuf | - the buffer to be validated and closed. |
[in] | xTag | - the tag for which to search in xbuf . |
[in] | cmpstr | - the comparison string to match. |
Definition at line 596 of file dnxXml.c.
References DNX_ERR_SYNTAX, DNX_MAX_MSG, DNX_OK, DNX_XML_STR, and dnxXmlGetTagValue().
Referenced by dnxWaitForJob(), dnxWaitForMgmtReply(), dnxWaitForMgmtRequest(), dnxWaitForNodeRequest(), and dnxWaitForResult().
int dnxXmlGet | ( | DnxXmlBuf * | xbuf, | |
char * | xTag, | |||
DnxXmlType | xType, | |||
void * | xData | |||
) |
Return the C data typed value associated with a specified tag.
[in] | xbuf | - the dnx xml buffer from which to extract a value. |
[in] | xTag | - the tag for which to search in xbuf . |
[in] | xType | - the C data type of the specified tag. |
[out] | xData | - the address of storage for the returned C data value. Note that xData must be large enough to hold an element of the specified C data type. In the case of a string, xData actually accepts a char pointer, not character data of a specified length. Note also that the caller is responsible for freeing the memory returned if xType is DNX_XML_STR. |
Definition at line 447 of file dnxXml.c.
References DNX_ERR_INVALID, DNX_ERR_MEMORY, DNX_ERR_SYNTAX, DNX_MAX_MSG, DNX_OK, DNX_XML_INT, DNX_XML_LONG, DNX_XML_SHORT, DNX_XML_STR, DNX_XML_STR_UNESCAPED, DNX_XML_UINT, DNX_XML_ULONG, DNX_XML_USHORT, DNX_XML_XID, dnxXmlGetTagValue(), dnxXmlUnescapeStr(), and xstrdup.
Referenced by dnxWaitForJob(), dnxWaitForMgmtReply(), dnxWaitForMgmtRequest(), dnxWaitForNodeRequest(), and dnxWaitForResult().
int dnxXmlOpen | ( | DnxXmlBuf * | xbuf, | |
char * | tag | |||
) |
Open and write header information to a dnx xml buffer.
[out] | xbuf | - the dnx xml buffer to be opened. |
[in] | tag | - the major xml request tag to write to xbuf . |
Definition at line 387 of file dnxXml.c.
References DnxXmlBuf::buf, DNX_OK, and DnxXmlBuf::size.
Referenced by dnxSendJob(), dnxSendMgmtReply(), dnxSendMgmtRequest(), dnxSendNodeRequest(), and dnxSendResult().