Release Tizen2.0 beta
[platform/core/location/lbs-location.git] / location / map-service / location-map-ielement.h
1 /*
2  * libslp-location
3  *
4  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
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>
8  *
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
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
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.
20  */
21
22 #ifndef __LOCATION_MAP_IELEMENT_H__
23 #define __LOCATION_MAP_IELEMENT_H__
24
25 #include <glib-object.h>
26 #include <location-map-types.h>
27 #include <location.h>
28
29 /**
30  * @file location-map-ielement.h
31  * @brief This file contains the internal definitions and structures related to location interface.
32  */
33
34 G_BEGIN_DECLS
35
36 #define LOCATION_MAP_TYPE_IELEMENT                  (location_map_ielement_get_type ())
37 #define LOCATION_MAP_IELEMENT(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), LOCATION_MAP_TYPE_IELEMENT, LocationMapIElement))
38 #define LOCATION_MAP_IS_IELEMENT(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LOCATION_MAP_TYPE_IELEMENT))
39 #define LOCATION_MAP_IELEMENT_GET_INTERFACE(obj)    (G_TYPE_INSTANCE_GET_INTERFACE ((obj), LOCATION_MAP_TYPE_IELEMENT, LocationMapIElementInterface))
40
41 typedef struct _LocationMapIElement          LocationMapIElement;
42 typedef struct _LocationMapIElementInterface LocationMapIElementInterface;
43
44 typedef int (*TYPE_GET_GEOCODE)(LocationMapIElement *self, const LocationAddress *address, const LocationMapPref *svc_pref, GList **position_list, GList **accuracy_list);
45 typedef int (*TYPE_GET_GEOCODE_FREEFORM)(LocationMapIElement *self, const gchar *address, const LocationMapPref *svc_pref, GList **position_list, GList **accuracy_list);
46 typedef int (*TYPE_GET_REVERSEGEOCODE)(LocationMapIElement *self, const LocationPosition *position, const LocationMapPref *svc_pref, LocationAddress **address, LocationAccuracy **accuracy);
47 typedef int (*TYPE_GET_GEOCODE_ASYNC)(LocationMapIElement *self, const LocationAddress *address, const LocationMapPref *svc_pref, LocationPositionCB callback, gpointer userdata);
48 typedef int (*TYPE_GET_GEOCODE_FREEFORM_ASYNC)(LocationMapIElement *self, const gchar *address,  const LocationMapPref *svc_pref, LocationPositionCB callback, gpointer userdata);
49 typedef int (*TYPE_GET_REVERSEGEOCODE_ASYNC)(LocationMapIElement *self, const LocationPosition *position, const LocationMapPref *svc_pref, LocationAddressCB callback, gpointer userdata);
50 typedef int (*TYPE_SEARCH_POI) (LocationMapIElement *self, const LocationPOIFilter * filter, const LocationPosition *position, const LocationMapPref *svc_pref, const LocationPOIPreference * pref, LocationPOICB cb, const gpointer user_data, guint *req_id);
51 typedef int (*TYPE_SEARCH_POI_BY_AREA) (LocationMapIElement *self, const LocationPOIFilter *filter, const LocationBoundary * boundary, const LocationMapPref *svc_pref, const LocationPOIPreference * pref, LocationPOICB cb, const gpointer user_data, guint *req_id);
52 typedef int (*TYPE_SEARCH_POI_BY_ADDR) (LocationMapIElement *self, const LocationPOIFilter *filter, const LocationAddress * address, const LocationMapPref *svc_pref, const LocationPOIPreference * pref, LocationPOICB cb, const gpointer user_data, guint *req_id);
53 typedef int (*TYPE_SEARCH_POI_BY_FREEFORM) (LocationMapIElement *self, const LocationPOIFilter *filter, const gchar *freeform, const LocationMapPref *svc_pref, const LocationPOIPreference * pref, LocationPOICB cb, const gpointer user_data, guint *req_id);
54 typedef int (*TYPE_CANCEL_POI_REQUEST) (LocationMapIElement *self, guint req_id);
55 typedef int (*TYPE_REQUEST_ROUTE) (LocationMapIElement *self, const LocationPosition *origin, const LocationPosition *destination, GList *waypoint, const LocationMapPref *svc_pref, const LocationRoutePreference *pref, LocationRouteCB cb, const gpointer user_data, guint *req_id);
56 typedef int (*TYPE_CANCEL_ROUTE_REQUEST) (LocationMapIElement *self, guint req_id);
57 typedef gboolean (*TYPE_IS_SUPPORTED_PROVIDER_CAPABILITY) (LocationMapIElement *self, LocationMapServiceType type);
58 typedef int (*TYPE_GET_PROVIDER_CAPABILITY_KEY)(LocationMapIElement *self, LocationMapServiceType type, GList **key);
59
60 struct _LocationMapIElementInterface
61 {
62         GTypeInterface parent_iface;
63
64         TYPE_GET_GEOCODE get_geocode;
65         TYPE_GET_GEOCODE_FREEFORM get_geocode_freeform;
66         TYPE_GET_REVERSEGEOCODE get_reversegeocode;
67         TYPE_GET_GEOCODE_ASYNC get_geocode_async;
68         TYPE_GET_GEOCODE_FREEFORM_ASYNC get_geocode_freeform_async;
69         TYPE_GET_REVERSEGEOCODE_ASYNC get_reversegeocode_async;
70         TYPE_SEARCH_POI search_poi;
71         TYPE_SEARCH_POI_BY_AREA search_poi_by_area;
72         TYPE_SEARCH_POI_BY_ADDR search_poi_by_address;
73         TYPE_SEARCH_POI_BY_FREEFORM search_poi_by_freeform;
74         TYPE_CANCEL_POI_REQUEST cancel_poi_request;
75         TYPE_REQUEST_ROUTE request_route;
76         TYPE_CANCEL_ROUTE_REQUEST cancel_route_request;
77         TYPE_IS_SUPPORTED_PROVIDER_CAPABILITY is_supported_provider_capability;
78         TYPE_GET_PROVIDER_CAPABILITY_KEY get_provider_capability_key;
79 };
80
81 GType location_map_ielement_get_type (void);
82
83 int location_map_ielement_get_geocode (LocationMapIElement *self, const LocationAddress *address, const LocationMapPref *svc_pref, GList **position_list, GList **accuracy_list);
84 int location_map_ielement_get_geocode_freeform (LocationMapIElement *self, const gchar *address, const LocationMapPref *svc_pref, GList **position_list, GList **accuracy_list);
85 int location_map_ielement_get_reversegeocode (LocationMapIElement *self, const LocationPosition *position, const LocationMapPref *svc_pref, LocationAddress **address, LocationAccuracy **accuracy);
86 int location_map_ielement_get_geocode_async (LocationMapIElement *self, const LocationAddress *address, const LocationMapPref *svc_pref, LocationPositionCB callback, gpointer userdata);
87 int location_map_ielement_get_geocode_freeform_async (LocationMapIElement *self, const gchar *address, const LocationMapPref *svc_pref, LocationPositionCB callback, gpointer userdata);
88 int location_map_ielement_get_reversegeocode_async (LocationMapIElement *self, const LocationPosition *position, const LocationMapPref *svc_pref, LocationAddressCB callback, gpointer userdata);
89 int location_map_ielement_search_poi (LocationMapIElement *self, const LocationPOIFilter * filter, const LocationPosition *position, const LocationMapPref *svc_pref, const LocationPOIPreference * pref, LocationPOICB cb, const gpointer user_data, guint * req_id);
90 int location_map_ielement_search_poi_by_area (LocationMapIElement *self, const LocationPOIFilter * filter, const LocationBoundary * boundary, const LocationMapPref *svc_pref, const LocationPOIPreference * pref, LocationPOICB cb, const gpointer user_data, guint * req_id);
91 int location_map_ielement_search_poi_by_address (LocationMapIElement *self, const LocationPOIFilter * filter, const LocationAddress * address, const LocationMapPref *svc_pref, const LocationPOIPreference * pref, LocationPOICB cb, const gpointer user_data, guint * req_id);
92 int location_map_ielement_search_poi_by_freeform (LocationMapIElement *self, const LocationPOIFilter * filter, const gchar * freeform, const LocationMapPref *svc_pref, const LocationPOIPreference * pref, LocationPOICB cb, const gpointer user_data, guint * req_id);
93 int location_map_ielement_cancel_poi_request (LocationMapIElement *self, guint req_id);
94 int location_map_ielement_request_route (LocationMapIElement *self, const LocationPosition *origin, const LocationPosition *destination, GList *waypoint, const LocationMapPref *svc_pref, const LocationRoutePreference * pref, LocationRouteCB cb, const gpointer user_data, guint * req_id);
95 int location_map_ielement_cancel_route_request (LocationMapIElement *self, guint req_id);
96 gboolean location_map_ielement_is_supported_provider_capability (LocationMapIElement *self, LocationMapServiceType type);
97 int location_map_ielement_get_provider_capability_key (LocationMapIElement *self, LocationMapServiceType type, GList **key);
98
99 G_END_DECLS
100
101 #endif