4 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
7 * Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
22 #ifndef XML_WRAPPER_H_
23 #define XML_WRAPPER_H_
29 typedef void* XmlWriterHandler;
30 typedef void* XmlReaderHandler;
32 /** used for SAX parse route response */
39 } decarta_route_inst_str_s;
46 } decarta_route_map_str_s;
57 char *country_subdivision;
58 char *country_2_subdivision;
60 char *municipality_subdivision;
72 char *error_message_str;
73 char *error_severity_str;
78 int route_geometry_state;
79 char *route_geometry_str;
81 int route_totaltime_state;
82 char *route_totaltime_str;
84 int route_totaldist_state;
85 char *route_totaldist_str;
88 char *route_bbox_pos1_str;
89 char *route_bbox_pos2_str;
91 int route_start_state;
92 GList *route_start_addr_list;
94 GList *route_end_addr_list;
96 int route_map_overview_state;
97 char *route_ov_tile_url_str;
98 char *route_ov_pos1_str;
99 char *route_ov_pos2_str;
101 int route_instruction_state;
102 GList *route_inst_str_list;
105 GList *route_map_str_list;
108 XmlWriterHandler xml_writer_open(char* encoding);
109 gboolean xml_writer_close (XmlWriterHandler handle, char **content, unsigned int *size);
110 gboolean xml_writer_all_start (XmlWriterHandler handle, const char* element, const char* content, ...);
111 gboolean xml_writer_element_start (XmlWriterHandler handle, const char* element);
112 gboolean xml_writer_attribute_write (XmlWriterHandler handle, const gchar *name, const gchar *value);
113 gboolean xml_writer_end (XmlWriterHandler handle);
115 XmlReaderHandler xml_reader_open (const char* data, ...);
116 void xml_reader_close (XmlReaderHandler handle);
117 gboolean xml_reader_is_valid (XmlReaderHandler handle, const char *xpath_format, ...);
118 gboolean xml_reader_get_string (XmlReaderHandler handle, char **string, const char *xpath_format, ...);
119 int _xml_sax_read(const char* data, void *user_data);