removed wrong contacts, added authors
[platform/core/location/lbs-location.git] / location / manager / location-batch.h
1 /*
2  * libslp-location
3  *
4  * Copyright (c) 2010-2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #ifndef __LOCATION_BATCH_H_
20 #define __LOCATION_BATCH_H_
21
22 #include <location-types.h>
23 #include <sensor.h>
24
25 G_BEGIN_DECLS
26
27 GType location_batch_get_type(void);
28 #define LOCATION_TYPE_BATCH (location_batch_get_type())
29
30 /**
31  * @file location-batch.h
32  * @brief This file contains the internal definitions and structures related to batch information.
33  */
34 /**
35  * @addtogroup LocationAPI
36  * @{
37  * @defgroup LocationAPIBatch Location Batch
38  * @breif This provides APIs related to Location Batch
39  * @addtogroup LocationAPIBatch
40  * @{
41  */
42
43 /**
44  * TBD
45  */
46 typedef struct {
47         guint timestamp;                /*/< Time stamp. */
48         guint level;                    /*/< Level. */
49         gdouble latitude;               /*/< Latitude data. */
50         gdouble longitude;              /*/< Longitude data. */
51         gdouble altitude;               /*/< Altitude data. */
52         gdouble horizontal_accuracy;    /*/< Horizontal accuracy data. */
53         gdouble vertical_accuracy;              /*/< Vertical accuracy data. */
54         gdouble speed;                  /*/< The speed over ground. (km/h) */
55         gdouble direction;              /*/< The course made in degrees relative to true north. The value is always in the range [0.0, 360.0] degree. */
56         gdouble climb;                  /*/< The vertical speed. (km/h) */
57 } LocationBatchDetail;
58
59 /**
60  * TBD
61  */
62 struct _LocationBatch {
63         guint num_of_location;  /*/< The number of location batch. */
64         time_t start_time;
65         LocationBatchDetail *batch_data;
66 };
67
68 LocationBatch *location_batch_new(int num_of_location);
69
70 gboolean location_set_batch_parse_details(LocationBatch *batch, char *location_info, int i);
71
72 gboolean location_get_batch_details(const LocationBatch *batch, guint index, gdouble *latitude, gdouble *longitude, gdouble *altitude, gdouble *speed, gdouble *direction, gdouble *h_accuracy, gdouble *v_accuracy, guint *timestamp);
73
74 gboolean location_set_batch_details(LocationBatch *batch, guint index, gdouble latitude, gdouble longitude, gdouble altitude, gdouble speed, gdouble direction, gdouble h_accuracy, gdouble v_accuracy, guint timestamp);
75
76 LocationBatch *location_batch_copy(const LocationBatch *batch);
77
78 LocationBatch *location_get_batch_file(int num_of_location);
79
80 void location_batch_free(LocationBatch *batch);
81
82 #ifdef TIZEN_DEVICE
83 gboolean location_set_sensor_batch(LocationBatch *batch, sensor_event_s *event);
84 #endif
85
86 /**
87  * @} @}
88  */
89
90 G_END_DECLS
91
92 #endif