2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef _MAPZEN_TYPES_H_
18 #define _MAPZEN_TYPES_H_
23 MAPZEN_ERROR_NONE = 0, /**< Successful */
24 MAPZEN_ERROR_PERMISSION_DENIED, /**< Permission Denied */
25 MAPZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
26 MAPZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
27 MAPZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
28 MAPZEN_ERROR_CONNECTION_TIMED_OUT, /**< Timeout error, no answer */
29 MAPZEN_ERROR_NETWORK_UNREACHABLE, /**< Network unavailable */
30 MAPZEN_ERROR_INVALID_OPERATION, /**< Opeartion is not valid */
31 MAPZEN_ERROR_KEY_NOT_AVAILABLE, /**< Invalid key */
32 MAPZEN_ERROR_RESOURCE_BUSY, /**< Resource busy */
33 MAPZEN_ERROR_CANCELED, /**< Service canceled */
34 MAPZEN_ERROR_UNKNOWN, /**< Unknown error */
35 MAPZEN_ERROR_SERVICE_NOT_AVAILABLE, /**< Service unavailabe*/
36 MAPZEN_ERROR_NOT_FOUND, /**< Result not found */
40 MAPZEN_BOUNDARY_NONE = 0, /* Undefined geographical area type. */
41 MAPZEN_BOUNDARY_RECT, /* Rectangular geographical area type. */
42 MAPZEN_BOUNDARY_CIRCLE, /* Circle geographical area type. */
54 UNIT_M = 0, /* for miles */
55 UNIT_KM /* for kilometers */
59 PENALTY_NONE = 0, //TODO: Mapzen does not have currently
60 PENALTY_LIMITED_ACCESS, //TODO: Mapzen does not have currently
61 PENALTY_TOLL_ROADS, //set to > 0 to avoid
62 PENALTY_USE_FERRY, //This is range of values between 0 and 1. Values near 0 attempt to avoid ferries and
63 //values near 1 will favor ferries.
64 PENALTY_USE_UNPAVED, //TODO: Mapzen does not have currently
65 PENALTY_SEASONAL_CLOSURE, //TODO: Mapzen does not have currently
66 PENALTY_COUNTRY_CROSSING // set to > 0 to avoid
67 } route_feature_avoids;
70 DRIVING_STYLE_NORMAL = 0,
71 DRIVING_STYLE_CAUTIOUS,
72 DRIVING_STYLE_AGGRESSIVE
73 } route_driving_style;
76 TANGRAM_VIEW_NORMAL = 0,
78 TANGRAM_VIEW_SATELLITE,
80 TANGRAM_VIEW_NOT_SUPPORTED
90 coords_s bottom_right;
109 mapzen_boundary_s *boundary;
111 } mapzen_geocode_req_s;
116 coords_s coordinates;
117 } mapzen_revgeocode_req_s;
121 gchar *search_string;
124 mapzen_boundary_s *boundary;
125 } mapzen_search_req_s;
130 } mapzen_get_details_req_s;
138 route_feature_avoids avoids; /* List of type strings. (Limited Access, Toll Road, Ferry, Unpaved, Seasonal Closure, Country Crossing) */
139 route_driving_style driving_style; /* (1 - cautious, 2 - normal, 3 - aggressive) */
140 GList *way_points; /* List of type coords_s */
141 } mapzen_route_req_s;
145 coords_s center_coords;
146 } mapzen_tiledata_req_s;
150 gchar *neighbourhood;
158 } mapzen_address_resp_s;
163 mapzen_address_resp_s *address;
164 coords_s coordinates;
166 } mapzen_place_resp_s;
173 } mapzen_route_maneuver_signs;
176 coords_s start_point;
180 gchar *formatted_time;
185 gchar *direction_name;
188 } mapzen_route_maneuver;
191 rectangle_s bounding_box;
193 route_unit distance_unit;
195 gchar *formatted_time;
197 GList *maneuvers; /* List of type mapzen_route_maneuver */
199 } mapzen_route_resp_s;
201 #endif /* _MAPZEN_TYPES_H_ */