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 __LOCATION_TYPE_H__
23 #define __LOCATION_TYPE_H__
26 #include <glib-object.h>
30 #ifndef LOCATION_DEPRECATED_API
31 #define LOCATION_DEPRECATED_API __attribute__ ((deprecated))
35 * @file location-types.h
36 * @brief This file contains the Location related structure, enumeration, and asynchronous function definitions.
37 * @addtogroup LocationFW
39 * @defgroup LocationTypes Location Types
40 * @brief This sub module provides structure, enumeration, and asynchronous function definitions.
41 * @addtogroup LocationTypes
46 * @brief This represents the returned error code of used functions.
49 LOCATION_ERROR_NONE = 0, ///< Success.
50 LOCATION_ERROR_NOT_ALLOWED, ///< Location servie is not allowed.
51 LOCATION_ERROR_NOT_AVAILABLE, ///< Location service is not available.
52 LOCATION_ERROR_NETWORK_FAILED, ///< Network is not available.
53 LOCATION_ERROR_NETWORK_NOT_CONNECTED, ///< Network is not connected.
54 LOCATION_ERROR_CONFIGURATION, ///< Configuration setting is not correct.
55 LOCATION_ERROR_PARAMETER, ///< Input parameter is not correct.
56 LOCATION_ERROR_NOT_FOUND, ///< Output is not found.
57 LOCATION_ERROR_NOT_SUPPORTED, ///< Not supported.
58 LOCATION_ERROR_UNKNOWN, ///< Unknown error.
62 * @brief This represents location method to be used.
66 LOCATION_METHOD_NONE = -1, ///< Undefined method.
67 LOCATION_METHOD_HYBRID = 0, ///< This method selects best method.
68 LOCATION_METHOD_GPS, ///< This method uses Global Positioning System.
69 LOCATION_METHOD_WPS, ///< This method uses Wifi Positioning System.
70 LOCATION_METHOD_CPS, ///< This method uses cell ID of base station.
71 LOCATION_METHOD_IPS, ///< This method uses IP address.
72 LOCATION_METHOD_SPS ///< This method uses sensor.
76 * @brief This represents the update type given by signal callback.
79 UPDATE_TYPE_NONE = -1, ///< Undefined update type.
80 POSITION_UPDATED = 0, ///< This type is used when position information is updated.
81 VELOCITY_UPDATED, ///< This type is used when velocity information is updated.
82 SATELLITE_UPDATED, ///< This type is used when satellite information is updated.
83 ADDRESS_UPDATED, ///< This type is used when address information is updated. This is not implemented yet.
84 GEOCODE_UPDATED, ///< This type is used when geocode information is updated. This is not implemented yet.
85 REVERSEGEOCODE_UPDATED ///< This type is used when reverse geocode information is updated. This is not implemented yet.
89 MAP_SERVICE_PREF_LANGUAGE,
90 MAP_SERVICE_PREF_DISTANCE_UNIT,
92 MAP_SERVICE_PREF_PROPERTY,
94 MAP_SERVICE_GEOCODE_TYPE,
95 MAP_SERVICE_REVERSE_GEOCODE_TYPE,
98 MAP_SERVICE_POI_SEARCH_BY_ADDRESS,
99 MAP_SERVICE_POI_SEARCH_BY_FREEFORM_ADDRESS,
100 MAP_SERVICE_POI_SEARCH_BY_CIRCLE_BOUNDARY,
101 MAP_SERVICE_POI_SEARCH_BY_RECT_BOUNDARY,
102 MAP_SERVICE_POI_SEARCH_BY_POLYGON_BOUNDARY,
103 MAP_SERVICE_POI_PREF_SORT_BY,
104 MAP_SERVICE_POI_PREF_PROPERTY,
105 MAP_SERVICE_POI_FILTER,
106 MAP_SERVICE_POI_FILTER_CATEGORY,
108 MAP_SERVICE_ROUTE_REQUEST_FREEFORM_ADDR_TO_AVOID,
109 MAP_SERVICE_ROUTE_REQUEST_STRUCTED_ADDR_TO_AVOID,
110 MAP_SERVICE_ROUTE_REQUEST_CIRCLE_AREA_TO_AVOID,
111 MAP_SERVICE_ROUTE_REQUEST_RECT_AREA_TO_AVOID,
112 MAP_SERVICE_ROUTE_REQUEST_POLYGON_AREA_TO_AVOID,
113 MAP_SERVICE_ROUTE_REQUEST_FEATURE_TO_AVOID,
114 MAP_SERVICE_ROUTE_PREF_TYPE,
115 MAP_SERVICE_ROUTE_PREF_TRANSPORT_MODE,
116 MAP_SERVICE_ROUTE_PREF_GEOMETRY_BOUNDING_BOX,
117 MAP_SERVICE_ROUTE_PREF_GEOMETRY_RETRIEVAL,
118 MAP_SERVICE_ROUTE_PREF_INSTRUCTION_GEOMETRY,
119 MAP_SERVICE_ROUTE_PREF_INSTRUCTION_BOUNDING_BOX,
120 MAP_SERVICE_ROUTE_PREF_INSTRUCTION_RETRIEVAL,
121 MAP_SERVICE_ROUTE_PREF_REALTIME_TRAFFIC,
122 MAP_SERVICE_ROUTE_PREF_PROPERTY,
123 MAP_SERVICE_ROUTE_DISTANCE_UNIT,
124 MAP_SERVICE_ROUTE_PROPERTY,
125 MAP_SERVICE_ROUTE_SEGMENT_PROPERTY,
126 MAP_SERVICE_ROUTE_STEP_PROPERTY,
129 } LocationMapServiceType;
132 * @brief Location object redefined by GObject.
134 typedef GObject LocationObject;
137 * @brief This represents position information such as latitude-longitude-altitude values and timestamp.
139 typedef struct _LocationPosition LocationPosition;
142 * @brief This represents last known position information such as latitude-longitude values and accuracy. \n
143 * This would be deprecated soon.
145 typedef struct _LocationLastPosition LocationLastPosition;
148 * @brief This represents position information such as number of satellites in used or in view.
150 typedef struct _LocationSatellite LocationSatellite;
153 * @brief This represents velocity information such as as speed, direction, climb.
155 typedef struct _LocationVelocity LocationVelocity;
158 * @brief This represents location accuracy information such as accuracy level, horizontal and vertical accuracy.
160 typedef struct _LocationAccuracy LocationAccuracy;
163 * @brief This represents boundary information such as rectangular or circle area.
165 typedef struct _LocationBoundary LocationBoundary;
168 * @brief This represents address information such as building number, street name, etc.
170 typedef struct _LocationAddress LocationAddress;
173 * @brief This represents a structure of Location preference.
175 typedef struct _LocationPreference LocationPreference;
178 * @brief This represents a structure of Location POI filter.
180 typedef struct _LocationPOIFilter LocationPOIFilter;
183 * @brief This represents a structure of Location POI preference.
185 typedef struct _LocationPOIPreference LocationPOIPreference;
188 * @brief This represents a structure of Landmark information.
190 typedef struct _LocationLandmark LocationLandmark;
193 * @brief This represents a structure of Landmark Url.
195 typedef struct _LocationLandmarkUrl LocationLandmarkUrl;
198 * @brief This represents a structure of Location route preference.
200 typedef struct _LocationRoutePreference LocationRoutePreference;
203 * @brief This represents a structure of Location route.
205 typedef struct _LocationRoute LocationRoute;
208 * @brief This represents a structure of Location route segment.
210 typedef struct _LocationRouteSegment LocationRouteSegment;
213 * @brief This represents a structure of Location route step.
215 typedef struct _LocationRouteStep LocationRouteStep;
218 * @brief This represents callback function which will be called to give position information.
220 typedef void (*LocationPositionCB)(LocationError error, GList *position_list, GList *accuracy_list, gpointer userdata);
223 * @brief This represents callback function which will be called to give address information.
225 typedef void (*LocationAddressCB)(LocationError error, LocationAddress *address, LocationAccuracy *acc, gpointer userdata);
228 * @brief This represents callback function which will be called to give POI information.
230 typedef void (*LocationPOICB)(LocationError error, guint req_id, GList *landmark_list, gchar *error_code, gchar *error_msg, gpointer userdata);
233 * @brief This represents callback function which will be called to give Route information.
235 typedef void (*LocationRouteCB)(LocationError error, guint req_id, GList *route_list, gchar *error_code, gchar *error_msg, gpointer userdata);
243 #endif /* __LOCATION_TYPE_H__ */