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_IELEMENT_H__
23 #define __LOCATION_IELEMENT_H__
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>
35 * @file location-ielement.h
36 * @brief This file contains the internal definitions and structures related to location interface.
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))
55 typedef struct _LocationIElement LocationIElement;
56 typedef struct _LocationIElementInterface LocationIElementInterface;
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);
64 struct _LocationIElementInterface
66 GTypeInterface parent_iface;
68 TYPE_START_FUNC start;
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;
78 GType location_ielement_get_type (void);
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);