#include <mxml.h>
#include <string.h>
#include <stdlib.h>
#include "config.h"
#include "include/interpreter_variable_data.h"
#include "include/message.h"
#include "include/xml_parser.h"
#include "include/xml_helper.h"
Go to the source code of this file.
#define _XOPEN_SOURCE 600 |
Definition at line 38 of file xml_parser.c.
error_code_t agent_return_xml_parse | ( | agent_p | agent | ) |
Definition at line 913 of file xml_parser.c.
References agent_xml_parse__home(), agent_xml_parse__name(), agent_xml_parse__owner(), agent_xml_parse__tasks(), agent_s::datastate, MC_SUCCESS, xml_get_child(), and agent_datastate_s::xml_root.
error_code_t agent_xml_parse | ( | agent_p | agent | ) |
Definition at line 52 of file xml_parser.c.
References agent_xml_parse__mobile_agent(), agent_s::datastate, MC_SUCCESS, and agent_datastate_s::xml_agent_root.
Referenced by agent_Initialize().
error_code_t agent_xml_parse__agent_code | ( | agent_p | agent, | |
int | index, | |||
xml_parser_p | xml_parser | |||
) |
Definition at line 872 of file xml_parser.c.
References agent_datastate_s::agent_code, agent_datastate_s::agent_code_ids, agent_datastate_s::agent_codes, agent_task_s::code_id, agent_s::datastate, MC_SUCCESS, mxmlElementGetAttr(), agent_datastate_s::number_of_tasks, agent_datastate_s::task_progress, agent_datastate_s::tasks, and xml_get_text().
Referenced by agent_xml_parse__tasks().
error_code_t agent_xml_parse__agent_data | ( | agent_p | agent, | |
xml_parser_p | xml_parser | |||
) |
Definition at line 93 of file xml_parser.c.
References agent_xml_parse__home(), agent_xml_parse__name(), agent_xml_parse__owner(), agent_xml_parse__sender(), agent_xml_parse__tasks(), agent_xml_parse__wg_code(), MC_ERR_PARSE, MC_SUCCESS, and xml_get_child().
Referenced by agent_xml_parse__mobile_agent().
error_code_t agent_xml_parse__data | ( | agent_p | agent, | |
xml_parser_p | xml_parser, | |||
int | index | |||
) |
Definition at line 538 of file xml_parser.c.
References agent_task_s::agent_return_data, agent_task_s::agent_variable_list, agent_xml_parse__row(), interpreter_variable_data_s::array_dim, CH_DATATYPE_SIZE, CH_DATATYPE_STR_TO_VAL, CH_STRING_DATATYPE, interpreter_variable_data_s::data, interpreter_variable_data_s::data_type, agent_s::datastate, interpreter_variable_data_New(), MC_ERR_PARSE, MC_SUCCESS, mxmlElementGetAttr(), interpreter_variable_data_s::name, mxml_node_s::parent, agent_task_s::persistent, agent_datastate_s::tasks, xml_get_child(), and xml_get_element_name().
Referenced by agent_xml_parse__task().
void agent_xml_parse__fill_row_data | ( | void * | data, | |
ChType_t | type, | |||
int * | extent, | |||
const mxml_node_t * | node, | |||
int * | index | |||
) |
Definition at line 751 of file xml_parser.c.
References agent_xml_parse__fill_row_data(), buf, CH_DATATYPE_SIZE, mxml_node_s::child, MXML_DESCEND_FIRST, MXML_ELEMENT, MXML_TEXT, mxmlFindElement(), mxml_text_s::string, strtok_r, mxml_value_u::text, mxml_node_s::type, and mxml_node_s::value.
Referenced by agent_xml_parse__fill_row_data(), and agent_xml_parse__row().
error_code_t agent_xml_parse__home | ( | agent_p | agent, | |
xml_parser_p | xml_parser | |||
) |
Definition at line 219 of file xml_parser.c.
References CHECK_NULL, agent_s::home, MC_SUCCESS, and xml_get_text().
Referenced by agent_return_xml_parse(), and agent_xml_parse__agent_data().
error_code_t agent_xml_parse__mobile_agent | ( | agent_p | agent, | |
xml_parser_p | xml_parser | |||
) |
Definition at line 65 of file xml_parser.c.
References agent_xml_parse__agent_data(), MC_ERR_PARSE, xml_get_child(), and xml_get_element_name().
Referenced by agent_xml_parse().
error_code_t agent_xml_parse__name | ( | agent_p | agent, | |
xml_parser_p | xml_parser | |||
) |
Definition at line 166 of file xml_parser.c.
References CHECK_NULL, MC_ERR_PARSE, MC_SUCCESS, agent_s::name, and xml_get_text().
Referenced by agent_return_xml_parse(), and agent_xml_parse__agent_data().
error_code_t agent_xml_parse__owner | ( | agent_p | agent, | |
xml_parser_p | xml_parser | |||
) |
Definition at line 192 of file xml_parser.c.
References CHECK_NULL, MC_SUCCESS, agent_s::owner, and xml_get_text().
Referenced by agent_return_xml_parse(), and agent_xml_parse__agent_data().
error_code_t agent_xml_parse__row | ( | interpreter_variable_data_t * | interp_variable, | |
xml_parser_p | xml_parser, | |||
int | index | |||
) |
Definition at line 684 of file xml_parser.c.
References agent_xml_parse__fill_row_data(), interpreter_variable_data_s::array_dim, interpreter_variable_data_s::array_extent, CH_DATATYPE_SIZE, interpreter_variable_data_s::data, interpreter_variable_data_s::data_type, MC_SUCCESS, and xml_get_element_name().
Referenced by agent_xml_parse__data().
error_code_t agent_xml_parse__sender | ( | agent_p | agent, | |
xml_parser_p | xml_parser | |||
) |
Definition at line 245 of file xml_parser.c.
References CHECK_NULL, MC_SUCCESS, agent_s::sender, and xml_get_text().
Referenced by agent_xml_parse__agent_data().
error_code_t agent_xml_parse__task | ( | agent_p | agent, | |
xml_parser_p | xml_parser, | |||
int | index | |||
) |
Definition at line 442 of file xml_parser.c.
References agent_xml_parse__data(), CHECK_NULL, agent_task_s::code_id, agent_s::datastate, MC_ERR_PARSE, MC_SUCCESS, MXML_DESCEND_FIRST, MXML_NO_DESCEND, mxmlElementGetAttr(), mxmlFindElement(), agent_task_s::persistent, agent_task_s::server_name, strdup, agent_datastate_s::tasks, and agent_task_s::var_name.
Referenced by agent_xml_parse__tasks().
error_code_t agent_xml_parse__tasks | ( | agent_p | agent, | |
xml_parser_p | xml_parser | |||
) |
Definition at line 304 of file xml_parser.c.
References agent_datastate_s::agent_code, agent_datastate_s::agent_code_ids, agent_datastate_s::agent_codes, agent_task_New(), agent_xml_parse__agent_code(), agent_xml_parse__task(), buf, agent_s::datastate, MC_ERR_PARSE, MXML_DESCEND, MXML_DESCEND_FIRST, MXML_NO_DESCEND, mxmlElementGetAttr(), mxmlFindElement(), agent_datastate_s::number_of_tasks, agent_datastate_s::task_progress, and agent_datastate_s::tasks.
Referenced by agent_return_xml_parse(), and agent_xml_parse__agent_data().
error_code_t agent_xml_parse__wg_code | ( | agent_p | agent, | |
xml_parser_p | xml_parser | |||
) |
Definition at line 273 of file xml_parser.c.
References MC_SUCCESS, agent_s::wg_code, and xml_get_text().
Referenced by agent_xml_parse__agent_data().
error_code_t message_xml_parse | ( | message_p | message | ) |
Definition at line 948 of file xml_parser.c.
References MC_ERR_PARSE, message_xml_parse__message(), MXML_DESCEND, MXML_NO_DESCEND, mxmlFindElement(), xml_get_child(), xml_get_element_name(), and message_s::xml_root.
Referenced by acc_connection_Thread(), message_InitializeFromConnection(), and message_InitializeFromString().
error_code_t message_xml_parse__message | ( | message_p | message, | |
xml_parser_p | xml_parser | |||
) |
Definition at line 1003 of file xml_parser.c.
References message_s::addr, buf, CHECK_NULL, ENCRYPTED_DATA, ENCRYPTION_INITIALIZE, FIPA_ACL, message_s::from_address, MC_ERR_PARSE, MC_SUCCESS, message_s::message_type, MOBILE_AGENT, mxmlElementGetAttr(), port, REQUEST_ENCRYPTION_INITIALIZE, RETURN_MSG, strtok_r, xml_get_child(), and message_s::xml_payload.
Referenced by message_xml_parse().