d821edd86e513251a0e030be833097fc80107e06
[platform/core/location/lbs-location.git] / location / manager / location-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_IELEMENT_H__
23 #define __LOCATION_IELEMENT_H__
24
25 #include <glib-object.h>
26 #include <location-types.h>
27 #include <location-position.h>
28 #include <location-velocity.h>
29 #include <location-accuracy.h>
30 #include <location-address.h>
31 #include <location-boundary.h>
32 #include <location-satellite.h>
33
34 /**
35  * @file location-ielement.h
36  * @brief This file contains the internal definitions and structures related to location interface.
37  */
38
39 G_BEGIN_DECLS
40
41 enum {
42         SERVICE_ENABLED,
43         SERVICE_DISABLED,
44         SERVICE_UPDATED,
45         ZONE_IN,
46         ZONE_OUT,
47         LAST_SIGNAL
48 };
49
50 #define LOCATION_TYPE_IELEMENT                  (location_ielement_get_type ())
51 #define LOCATION_IELEMENT(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), LOCATION_TYPE_IELEMENT, LocationIElement))
52 #define LOCATION_IS_IELEMENT(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LOCATION_TYPE_IELEMENT))
53 #define LOCATION_IELEMENT_GET_INTERFACE(obj)    (G_TYPE_INSTANCE_GET_INTERFACE ((obj), LOCATION_TYPE_IELEMENT, LocationIElementInterface))
54
55 typedef struct _LocationIElement          LocationIElement;
56 typedef struct _LocationIElementInterface LocationIElementInterface;
57
58 typedef int (*TYPE_START_FUNC)(LocationIElement *self);
59 typedef int (*TYPE_STOP_FUNC) (LocationIElement *self);
60 typedef int (*TYPE_GET_POSITION)(LocationIElement *self, LocationPosition **position, LocationAccuracy **accuracy);
61 typedef int (*TYPE_GET_VELOCITY)(LocationIElement *self, LocationVelocity **velocity, LocationAccuracy **accuracy);
62 typedef int (*TYPE_GET_SATELLITE)(LocationIElement *self, LocationSatellite **satellite);
63
64 struct _LocationIElementInterface
65 {
66         GTypeInterface parent_iface;
67
68         TYPE_START_FUNC start;
69         TYPE_STOP_FUNC stop;
70         TYPE_GET_POSITION get_position;
71         TYPE_GET_POSITION get_last_position;
72         TYPE_GET_VELOCITY get_velocity;
73         TYPE_GET_VELOCITY get_last_velocity;
74         TYPE_GET_SATELLITE get_satellite;
75         TYPE_GET_SATELLITE get_last_satellite;
76 };
77
78 GType location_ielement_get_type (void);
79
80 int location_ielement_start (LocationIElement *self);
81 int location_ielement_stop(LocationIElement *self);
82 int location_ielement_get_position (LocationIElement *self, LocationPosition **position, LocationAccuracy **accuracy);
83 int location_ielement_get_last_position (LocationIElement *self, LocationPosition **position, LocationAccuracy **accuracy);
84 int location_ielement_get_velocity (LocationIElement *self, LocationVelocity **velocity, LocationAccuracy **accuracy);
85 int location_ielement_get_last_velocity (LocationIElement *self, LocationVelocity **velocity, LocationAccuracy **accuracy);
86 int location_ielement_get_satellite (LocationIElement *self, LocationSatellite **satellite);
87 int location_ielement_get_last_satellite (LocationIElement *self, LocationSatellite **satellite);
88
89 G_END_DECLS
90
91 #endif