00001 /* SVN FILE INFO 00002 * $Revision: 174 $ : Last Committed Revision 00003 * $Date: 2008年06月24日 10:50:29 -0700 (2008年6月24日) $ : Last Committed Date */ 00004 /*[ 00005 * Copyright (c) 2007 Integration Engineering Laboratory 00006 University of California, Davis 00007 * 00008 * Permission to use, copy, and distribute this software and its 00009 * documentation for any purpose with or without fee is hereby granted, 00010 * provided that the above copyright notice appear in all copies and 00011 * that both that copyright notice and this permission notice appear 00012 * in supporting documentation. 00013 * 00014 * Permission to modify the software is granted, but not the right to 00015 * distribute the complete modified source code. Modifications are to 00016 * be distributed as patches to the released version. Permission to 00017 * distribute binaries produced by compiling modified sources is granted, 00018 * provided you 00019 * 1. distribute the corresponding source modifications from the 00020 * released version in the form of a patch file along with the binaries, 00021 * 2. add special version identification to distinguish your version 00022 * in addition to the base release version number, 00023 * 3. provide your name and address as the primary contact for the 00024 * support of your modified version, and 00025 * 4. retain our contact information in regard to use of the base 00026 * software. 00027 * Permission to distribute the released version of the source code along 00028 * with corresponding source modifications in the form of a patch file is 00029 * granted with same provisions 2 through 4 for binary distributions. 00030 * 00031 * This software is provided "as is" without express or implied warranty 00032 * to the extent permitted by applicable law. 00033 ]*/ 00034 00035 #ifndef _XML_PARSER_H_ 00036 #define _XML_PARSER_H_ 00037 #include <mxml.h> 00038 #include "macros.h" 00039 #include "agent.h" 00040 00041 STRUCT ( xml_parser, 00042 const mxml_node_t *root; 00043 const mxml_node_t *node; ); 00044 00045 00046 error_code_t 00047 agent_xml_parse(agent_p agent); 00048 00049 error_code_t 00050 agent_xml_parse__mobile_agent 00051 ( 00052 agent_p agent, 00053 xml_parser_p xml_parser 00054 ); 00055 00056 error_code_t 00057 agent_xml_parse__agent_data 00058 ( 00059 agent_p agent, 00060 xml_parser_p xml_parser 00061 ); 00062 00063 error_code_t 00064 agent_xml_parse__name(agent_p agent, xml_parser_p xml_parser); 00065 00066 error_code_t 00067 agent_xml_parse__owner(agent_p agent, xml_parser_p xml_parser); 00068 00069 error_code_t 00070 agent_xml_parse__home(agent_p agent, xml_parser_p xml_parser); 00071 00072 error_code_t 00073 agent_xml_parse__tasks(agent_p agent, xml_parser_p xml_parser); 00074 00075 error_code_t 00076 agent_xml_parse__task(agent_p agent, xml_parser_p xml_parser, int index); 00077 00078 error_code_t 00079 agent_xml_parse__data(agent_p agent, xml_parser_p xml_parser, int index); 00080 00081 error_code_t 00082 agent_xml_parse__row(interpreter_variable_data_t* interp_variable, xml_parser_p xml_parser, int index); 00083 00084 void agent_xml_parse__fill_row_data( 00085 void *data, 00086 ChType_t type, 00087 int *extent, 00088 const mxml_node_t* node, 00089 int *index); 00090 00091 00092 error_code_t 00093 agent_xml_parse__agent_code(agent_p agent, int index, xml_parser_p xml_parser); 00094 00095 error_code_t 00096 message_xml_parse(message_p message); 00097 00098 error_code_t 00099 message_xml_parse__message(message_p message, xml_parser_p xml_parser); 00100 #endif