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_KM /* for kilometers */
58 PENALTY_NONE = 0, //TODO: Mapzen does not have currently
59 PENALTY_LIMITED_ACCESS, //TODO: Mapzen does not have currently
60 PENALTY_TOLL_ROADS, //set to > 0 to avoid
61 PENALTY_USE_FERRY, //This is range of values between 0 and 1. Values near 0 attempt to avoid ferries and
62 //values near 1 will favor ferries.
63 PENALTY_USE_UNPAVED, //TODO: Mapzen does not have currently
64 PENALTY_SEASONAL_CLOSURE, //TODO: Mapzen does not have currently
65 PENALTY_COUNTRY_CROSSING // set to > 0 to avoid
66 } route_feature_avoids;
69 DRIVING_STYLE_NORMAL = 0,
70 DRIVING_STYLE_CAUTIOUS,
71 DRIVING_STYLE_AGGRESSIVE
72 } route_driving_style;
75 TANGRAM_VIEW_NORMAL = 0,
77 TANGRAM_VIEW_SATELLITE,
79 TANGRAM_VIEW_NOT_SUPPORTED
89 coords_s bottom_right;
108 mapzen_boundary_s *boundary;
110 } mapzen_geocode_req_s;
115 coords_s coordinates;
116 } mapzen_revgeocode_req_s;
120 gchar *search_string;
123 mapzen_boundary_s *boundary;
124 } mapzen_search_req_s;
129 } mapzen_get_details_req_s;
137 route_feature_avoids avoids; /* List of type strings. (Limited Access, Toll Road, Ferry, Unpaved, Seasonal Closure, Country Crossing) */
138 route_driving_style driving_style; /* (1 - cautious, 2 - normal, 3 - aggressive) */
139 GList *way_points; /* List of type coords_s */
140 } mapzen_route_req_s;
144 coords_s center_coords;
145 } mapzen_tiledata_req_s;
149 gchar *neighbourhood;
157 } mapzen_address_resp_s;
162 mapzen_address_resp_s *address;
163 coords_s coordinates;
165 } mapzen_place_resp_s;
172 } mapzen_route_maneuver_signs;
175 coords_s start_point;
182 } mapzen_route_maneuver;
186 coords_s destination;
187 rectangle_s bounding_box;
190 GList *maneuvers; /* List of type mapzen_route_maneuver */
192 } mapzen_route_segment;
196 coords_s destination;
197 rectangle_s bounding_box;
199 route_unit distance_unit;
202 GList *segments; /* List of type mapzen_route_segment */
205 } mapzen_route_resp_s;
207 #endif /* _MAPZEN_TYPES_H_ */