1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
//
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/**
* @file FLocLocation.h
* @brief This is the header file for the %Location class.
*
* This header file contains the declarations of the %Location class.
*/
#ifndef _FLOC_LOCATION_H_
#define _FLOC_LOCATION_H_
#include <FBaseObject.h>
namespace Tizen { namespace Base
{
class String;
class DateTime;
}}
namespace Tizen { namespace Locations
{
class Coordinates;
/**
* @class Location
* @brief This class contains and provides information about a location including its geographical coordinates, altitude, and so on.
*
* @since 2.0
*
* @final This class is not intended for extension.
*
* The %Location class contains all information about a location that the location provider fixed at a certain moment.
* It basically provides geographical coordinates and horizontal accuracy that gives the estimated error about the coordinates,
* while the altitude, vertical accuracy, speed, and course at the location are optionally provided.
* It also contains detailed and specific positioning information, such as satellites used to fix the location.
*
* An application obtains the %Location instances from LocationProvider.
*/
class _OSP_EXPORT_ Location
: public Tizen::Base::Object
{
public:
/**
* Copying of objects using this copy constructor is allowed.
*
* @since 2.0
*
* @param[in] rhs An instance of %Location to copy
*/
Location(const Location& rhs);
/**
* This destructor overrides Tizen::Base::Object::~Object().
*
* @since 2.0
*/
virtual ~Location(void);
/**
* Compares the calling instance with the specified instance for equality.
*
* @since 2.0
*
* @return @c true if all the fields in the objects are equal, @n
* else @c false
* @param[in] rhs The object to compare
*/
virtual bool Equals(const Tizen::Base::Object& rhs) const;
/**
* Gets the hash value of the calling instance.
*
* @since 2.0
*
* @return The hash value of the calling instance
*/
virtual int GetHashCode(void) const;
/**
* Gets the horizontal accuracy.
*
* @since 2.0
*
* @return The horizontal accuracy in meters, @n
* else @c NaN if it is not available
*/
double GetHorizontalAccuracy(void) const;
/**
* Gets the vertical accuracy.
*
* @since 2.0
*
* @return The vertical accuracy in meters, @n
* else @c NaN if it is not available
*/
double GetVerticalAccuracy(void) const;
/**
* Gets the course.
*
* The course is the angle of moving direction measured clockwise from true north.
*
* @since 2.0
*
* @return The course in degrees within the range [0.0, +360.0], @n
* else @c NaN if it is not available
*/
double GetCourse(void) const;
/**
* Gets the coordinates.
*
* @since 2.0
*
* @return The geographical coordinates
*/
Coordinates GetCoordinates(void) const;
/**
* Gets the ground speed.
*
* @since 2.0
*
* @return The speed in km/h, @n
* else @c NaN if it is not available
*/
double GetSpeed(void) const;
/**
* Gets the timestamp when this location is fixed.
*
* @since 2.0
*
* @return The fix time in UTC
*/
Tizen::Base::DateTime GetTimestamp(void) const;
/**
* Gets the detailed positioning information.
*
* The detailed positioning information is queried using a key, and the %GetExtraInfo() method returns the information corresponding to the key.
* <table>
<tr><th>Key</th><th>Information</th></tr>
<tr><td>location_method</td><td>Positioning technology used to fix this location. Possible values are "gps" and "network".</td></tr>
<tr><td>satellite</td>
<td>GPS satellite information in the semicolon-separated satellite sentences.
Each sentence forms "PRN, Elevation, Azimuth, SNR, Active" where PRN is a satellite ID, Elevation is in degree, Azimuth is in degree,
SNR is a signal to nose ratio in dBHZ, and Active is @c 1, if the satellite is in use for positioning, or @c 0.
For example, it can be "02, 40.0, 83.0, 35.0, 1; 15, 30.0, 65.0, 35.0, 0; 22, 80.0, 120.0, 40.0, 1;".</td>
</tr></table>
*
* @since 2.0
*
* @return The information corresponding to the key, @n
* else an empty string if the @c key is invalid or the requested information is not available for this location
* @param[in] key The key to the positioning information
*/
Tizen::Base::String GetExtraInfo(const Tizen::Base::String& key) const;
/**
* Checks the validity for this location.
*
* @since 2.0
*
* @return @c true if the location is valid, @n
* else @c false
*/
bool IsValid(void) const;
/**
* Copying of objects using this copy assignment operator is allowed.
*
* @since 2.0
*
* @return A reference to the current instance
* @param[in] rhs An instance of %Location to assign
*/
Location& operator =(const Location& rhs);
private:
//
// This default constructor is intentionally declared as private so that only the platform can create an instance.
//
// @since 2.0
//
Location(void);
private:
class _LocationImpl* __pImpl;
friend class _LocationImpl;
}; // Location
}} // Tizen::Locations
#endif // _FLOC_LOCATION_H_
|