HomePort
Macros | Functions | Variables
rest_xml.c File Reference
Include dependency graph for rest_xml.c:

Go to the source code of this file.

Macros

#define REST_XML_BEGIN(CONTEXT)
 
#define REST_XML_END()
 
#define REST_XML_RETURN_XML_ERROR(CONTEXT)   HPD_LOG_RETURN(context, HPD_E_UNKNOWN, "Xml error")
 

Functions

hpd_error_t hpd_rest_xml_get_configuration (hpd_t *hpd, hpd_rest_t *rest, const hpd_module_t *context, char **out)
 
hpd_error_t hpd_rest_xml_get_value (char *value, const hpd_module_t *context, char **out)
 
hpd_error_t hpd_rest_xml_parse_value (const char *in, const hpd_module_t *context, char **out)
 
static hpd_error_t rest_xml_add (mxml_node_t *parent, const char *key, const char *val, const hpd_module_t *context)
 
static hpd_error_t rest_xml_add_adapter (mxml_node_t *parent, hpd_adapter_id_t *adapter, hpd_rest_t *rest, const hpd_module_t *context)
 
static hpd_error_t rest_xml_add_attr (mxml_node_t *parent, hpd_pair_t *pair, const hpd_module_t *context)
 
static hpd_error_t rest_xml_add_configuration (mxml_node_t *parent, hpd_t *hpd, hpd_rest_t *rest, const hpd_module_t *context)
 
static hpd_error_t rest_xml_add_device (mxml_node_t *parent, hpd_device_id_t *device, hpd_rest_t *rest, const hpd_module_t *context)
 
static hpd_error_t rest_xml_add_parameter (mxml_node_t *parent, hpd_parameter_id_t *parameter, const hpd_module_t *context)
 
static hpd_error_t rest_xml_add_service (mxml_node_t *parent, hpd_service_id_t *service, hpd_rest_t *rest, const hpd_module_t *context)
 
static hpd_error_t rest_xml_add_value (mxml_node_t *parent, char *value, const hpd_module_t *context)
 
static void rest_xml_on_mxml_error (const char *msg)
 

Variables

static const hpd_module_trest_xml_global_context = NULL
 
static const char *const REST_XML_VERSION = "1.0"
 

Macro Definition Documentation

#define REST_XML_BEGIN (   CONTEXT)
Value:
do { \
if (rest_xml_global_context) HPD_LOG_WARN((CONTEXT), "Global context is already set (trying anyways)..."); \
rest_xml_global_context = (CONTEXT); \
mxmlSetErrorCallback(rest_xml_on_mxml_error); \
} while (0) \
static const hpd_module_t * rest_xml_global_context
Definition: rest_xml.c:37
static void rest_xml_on_mxml_error(const char *msg)
Definition: rest_xml.c:39
#define HPD_LOG_WARN(CONTEXT, FMT,...)

Definition at line 44 of file rest_xml.c.

#define REST_XML_END ( )
Value:
do { \
} while (0)
static const hpd_module_t * rest_xml_global_context
Definition: rest_xml.c:37

Definition at line 50 of file rest_xml.c.

#define REST_XML_RETURN_XML_ERROR (   CONTEXT)    HPD_LOG_RETURN(context, HPD_E_UNKNOWN, "Xml error")

Definition at line 54 of file rest_xml.c.

Function Documentation

hpd_error_t hpd_rest_xml_get_configuration ( hpd_t hpd,
hpd_rest_t rest,
const hpd_module_t context,
char **  out 
)

Definition at line 240 of file rest_xml.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t hpd_rest_xml_get_value ( char *  value,
const hpd_module_t context,
char **  out 
)

Definition at line 286 of file rest_xml.c.

Here is the call graph for this function:

Here is the caller graph for this function:

hpd_error_t hpd_rest_xml_parse_value ( const char *  in,
const hpd_module_t context,
char **  out 
)

Definition at line 316 of file rest_xml.c.

Here is the caller graph for this function:

static hpd_error_t rest_xml_add ( mxml_node_t *  parent,
const char *  key,
const char *  val,
const hpd_module_t context 
)
static

Definition at line 56 of file rest_xml.c.

Here is the caller graph for this function:

static hpd_error_t rest_xml_add_adapter ( mxml_node_t *  parent,
hpd_adapter_id_t adapter,
hpd_rest_t rest,
const hpd_module_t context 
)
static

Definition at line 181 of file rest_xml.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static hpd_error_t rest_xml_add_attr ( mxml_node_t *  parent,
hpd_pair_t pair,
const hpd_module_t context 
)
static

Definition at line 63 of file rest_xml.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static hpd_error_t rest_xml_add_configuration ( mxml_node_t *  parent,
hpd_t hpd,
hpd_rest_t rest,
const hpd_module_t context 
)
static

Definition at line 211 of file rest_xml.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static hpd_error_t rest_xml_add_device ( mxml_node_t *  parent,
hpd_device_id_t device,
hpd_rest_t rest,
const hpd_module_t context 
)
static

Definition at line 152 of file rest_xml.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static hpd_error_t rest_xml_add_parameter ( mxml_node_t *  parent,
hpd_parameter_id_t parameter,
const hpd_module_t context 
)
static

Definition at line 74 of file rest_xml.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static hpd_error_t rest_xml_add_service ( mxml_node_t *  parent,
hpd_service_id_t service,
hpd_rest_t rest,
const hpd_module_t context 
)
static

Definition at line 96 of file rest_xml.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static hpd_error_t rest_xml_add_value ( mxml_node_t *  parent,
char *  value,
const hpd_module_t context 
)
static

Definition at line 270 of file rest_xml.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void rest_xml_on_mxml_error ( const char *  msg)
static

Definition at line 39 of file rest_xml.c.

Variable Documentation

const hpd_module_t* rest_xml_global_context = NULL
static

Definition at line 37 of file rest_xml.c.

const char* const REST_XML_VERSION = "1.0"
static

Definition at line 34 of file rest_xml.c.