removed wrong contacts, added authors
[platform/core/location/lbs-location.git] / location / manager / location-velocity.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_VELOCITY_H_
20 #define __LOCATION_VELOCITY_H_
21
22 #include <location-types.h>
23
24 G_BEGIN_DECLS
25
26 GType location_velocity_get_type(void);
27 #define LOCATION_TYPE_VELOCITY          (location_velocity_get_type())
28
29 /**
30  * @file location-velocity.h
31  * @brief This file contains the internal definitions and structures related to velocity information.
32  */
33 /**
34  * @addtogroup LocationAPI
35  * @{
36  * @defgroup LocationAPIVelocity Location Velocity
37  * @breif This provides APIs related to Location Velocity
38  * @addtogroup LocationAPIVelocity
39  * @{
40  */
41
42 /**
43  * @brief This represents velocity information such as as speed, direction, climb.
44  */
45 struct _LocationVelocity {
46         guint timestamp;                /*/< Time stamp. */
47         gdouble speed;                  /*/< The speed over ground. (km/h) */
48         gdouble direction;              /*/< The course made in degrees relative to true north. The value is always in the range [0.0, 360.0] degree. */
49         gdouble climb;                  /*/< The vertical speed. (km/h) */
50 };
51
52 /**
53  * @brief       Create a new #LocationVelocity with given information.
54  * @remarks None.
55  * @pre  #location_init should be called before.\n
56  * @post        None.
57  * @param [in] timestamp - Time stamp.
58  * @param [in] speed - The speed over ground. (km/h)
59  * @param [in] direction - The course made in degrees relative to true north. The value is always in the range [0.0, 360.0] degree.
60  * @param [in] climb - The vertical speed. (km/h)
61  * @return a new #LocationVelocity
62  * @retval NULL if error occured
63  */
64 LocationVelocity *location_velocity_new(guint timestamp, gdouble speed, gdouble direction,      gdouble climb);
65
66 /**
67  * @brief       Free a #LocationVelocity.
68  * @remarks None.
69  * @pre  #location_init should be called before.\n
70  * @post        None.
71  * @param [in] velocity - a #LocationVelocity.
72  * @return None.
73  */
74 void location_velocity_free(LocationVelocity *velocity);
75
76 /**
77  * @brief       Compares two velocities for equality, returning TRUE if they are equal.
78  * @remarks None.
79  * @pre  #location_init should be called before.\n
80  * @post        None.
81  * @param [in] velocity1 - a #LocationVelocity
82  * @param [in] velocity2 - a #LocationVelocity
83  * @return gboolean
84  * @retval\n
85  * TRUE - if equal\n
86  * FALSE - if not equal\n
87  */
88 gboolean location_velocity_equal(const LocationVelocity *velocity1, const LocationVelocity *velocity2);
89
90 /**
91  * @brief       Makes a copy of #LocationVelocity
92  * @remarks None.
93  * @pre  #location_init should be called before.\n
94  * @post        None.
95  * @param [in] velocity - a #LocationVelocity
96  * @return a new #LocationVelocity
97  * @retval NULL if error occured
98  */
99 LocationVelocity *location_velocity_copy(const LocationVelocity *velocity);
100
101 /**
102  * @} @}
103  */
104
105 G_END_DECLS
106
107 #endif