4 * Copyright (c) 2010-2013 Samsung Electronics Co., Ltd. All rights reserved.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef __LOCATION_BATCH_H_
20 #define __LOCATION_BATCH_H_
22 #include <location-types.h>
27 GType location_batch_get_type(void);
28 #define LOCATION_TYPE_BATCH (location_batch_get_type())
31 * @file location-batch.h
32 * @brief This file contains the internal definitions and structures related to batch information.
35 * @addtogroup LocationAPI
37 * @defgroup LocationAPIBatch Location Batch
38 * @breif This provides APIs related to Location Batch
39 * @addtogroup LocationAPIBatch
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;
62 struct _LocationBatch {
63 guint num_of_location; /*/< The number of location batch. */
65 LocationBatchDetail *batch_data;
68 LocationBatch *location_batch_new(int num_of_location);
70 gboolean location_set_batch_parse_details(LocationBatch *batch, char *location_info, int i);
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);
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);
76 LocationBatch *location_batch_copy(const LocationBatch *batch);
78 LocationBatch *location_get_batch_file(int num_of_location);
80 void location_batch_free(LocationBatch *batch);
83 gboolean location_set_sensor_batch(LocationBatch *batch, sensor_event_s *event);