summaryrefslogtreecommitdiff
path: root/src/FLoc_LocationImpl.h
blob: bebc30ca2bb35a5469399ec16a5c00d4a2ef214d (plain)
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
//
// 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	FLoc_LocationImpl.h
 * @brief	This is the header file for the _LocationImpl class.
 *
 * This header file contains the declarations of the _LocationImpl class.
 */

#ifndef _FLOC_INTERNAL_LOCATION_IMPL_H_
#define _FLOC_INTERNAL_LOCATION_IMPL_H_

#include <unique_ptr.h>
#include <FBaseObject.h>
#include <FBaseDateTime.h>
#include <FLocCoordinates.h>
#include <FLocLocation.h>
#include "FLoc_Types.h"

namespace Tizen { namespace Locations
{

class _LocationImpl
{

public:
	/**
	 * This is the default constructor for this class.
	 */
	_LocationImpl(void);

	/**
	 * This is the copy constructor for the _LocationImpl class.
	 */
	_LocationImpl(const _LocationImpl& rhs);

	/**
	 * This is the destructor for this class.
	 */
	virtual ~_LocationImpl(void);

	/**
	 * @see @ref Tizen::Locations::Location::Equals()
	 */
	virtual bool Equals(const _LocationImpl& rhs) const;

	/**
	 * @see @ref Tizen::Locations::Location::GetHashCode()
	 */
	virtual int GetHashCode(void) const;

	/**
	 * @see @ref Tizen::Locations::Location::GetHorizontalAccuracy()
	 */
	double GetHorizontalAccuracy(void) const {return __horizontalAccuracy;}

	/**
	 * @see @ref Tizen::Locations::Location::GetVerticalAccuracy()
	 */
	double GetVerticalAccuracy(void) const {return __verticalAccuracy;}

	/**
	 * @see @ref Tizen::Locations::Location::GetCourse()
	 */
	double GetCourse(void) const { return __course;}

	/**
	 * @see @ref Tizen::Locations::Location::GetCoordinate()
	 */
	Coordinates GetCoordinates(void) const { return __coordinate;}

	/**
	 * @see @ref Tizen::Locations::Location::GetSpeed()
	 */
	double GetSpeed(void) const { return __speed;}

	/**
	 * @see @ref Tizen::Locations::Location::GetTimestamp()
	 */
	Tizen::Base::DateTime GetTimestamp(void) const;

	/**
	 * @see @ref Tizen::Locations::Location::GetExtraInfo()
	 */
	Tizen::Base::String GetExtraInfo(const Tizen::Base::String& key) const;

	/**
	 * @see @ref Tizen::Locations::Location::IsValid()
	 */
	bool IsValid(void) const {return __isLocationValid;}

	/**
	 * Sets the horizonal Accuracy value of the %_LocationImpl instance
	 */
	void SetHorizontalAccuracy(double horizontalAcc) {__horizontalAccuracy = horizontalAcc;}

	/**
	 * Sets the vertical Accuracy value of the %_LocationImpl instance
	 */
	void SetVerticalAccuracy(double verticalAcc) {__verticalAccuracy = verticalAcc;}

	/**
	 * Sets the course value of the %_LocationImpl instance
	 */
	void SetCourse(double course) { __course = course;}

	/**
	 * Sets the Coordinate value of the %_LocationImpl instance
	 */
	result SetCoordinates(const Coordinates& coordinate);

	/**
	 * Sets the speed value of the %_LocationImpl instance
	 */
	void SetSpeed(double speed) { __speed = speed;}

	/**
	 * Sets the Time stamp value of the %_LocationImpl instance
	 */
	void SetTimestamp(long long timestamp) {__timestamp = timestamp;}

	/**
	 * Sets the Satellite Information of the %_LocationImpl instance
	 */
	void SetExtraInfo(const Tizen::Base::String& key, const Tizen::Base::String& value);

	/**
	 *	Sets the validity of the location.
	 */
	void SetValidity(bool validity){__isLocationValid = validity;}

	//
	// Gets the timestamp in ms.
	//
	long long GetTimestampInMs(void){return __timestamp;}

	/**
	 *	Gets the Impl instance of the given %Location object
	 */
	static _LocationImpl* GetInstance(Location& obj);

	/**
	 *	Gets the Impl instance of the given %Location object
	 */
	static const _LocationImpl* GetInstance(const Location& obj);

	//
	//@Internal: Gets the new instance of %Location.
	//
	static Location* GetLocationInstanceN(void);

	//
	//@Internal: Gets the new instance of %Location.
	//
	static Location GetLocationInstance(void);

	/**
	 * Assigns the value of the specified _LocationImpl object to the current instance.
	 */
	_LocationImpl& operator =(const _LocationImpl& rhs);

	/**
	 * Compares the calling instance with the specified instance.
	 */
	bool operator ==(const _LocationImpl& rhs) const;

private:
	Coordinates __coordinate;
	double __speed;
	double __course;
	double __horizontalAccuracy;
	double __verticalAccuracy;
	long long __timestamp;
	Tizen::Base::String __locationMethod;
	Tizen::Base::String __satelliteInformation;
	bool __isLocationValid;
};  // _LocationImpl
} } // Tizen::Location
#endif  // _FLOC_INTERNAL_LOCATION_IMPL_H_