2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FLoc_LocationImpl.h
20 * @brief This is the header file for the _LocationImpl class.
22 * This header file contains the declarations of the _LocationImpl class.
25 #ifndef _FLOC_INTERNAL_LOCATION_IMPL_H_
26 #define _FLOC_INTERNAL_LOCATION_IMPL_H_
28 #include <unique_ptr.h>
29 #include <FBaseObject.h>
30 #include <FBaseDateTime.h>
31 #include <FLocCoordinates.h>
32 #include <FLocLocation.h>
33 #include "FLoc_Types.h"
35 namespace Tizen { namespace Locations
43 * This is the default constructor for this class.
48 * This is the copy constructor for the _LocationImpl class.
50 _LocationImpl(const _LocationImpl& rhs);
53 * This is the destructor for this class.
55 virtual ~_LocationImpl(void);
58 * @see @ref Tizen::Locations::Location::Equals()
60 virtual bool Equals(const _LocationImpl& rhs) const;
63 * @see @ref Tizen::Locations::Location::GetHashCode()
65 virtual int GetHashCode(void) const;
68 * @see @ref Tizen::Locations::Location::GetHorizontalAccuracy()
70 double GetHorizontalAccuracy(void) const {return __horizontalAccuracy;}
73 * @see @ref Tizen::Locations::Location::GetVerticalAccuracy()
75 double GetVerticalAccuracy(void) const {return __verticalAccuracy;}
78 * @see @ref Tizen::Locations::Location::GetCourse()
80 double GetCourse(void) const { return __course;}
83 * @see @ref Tizen::Locations::Location::GetCoordinate()
85 Coordinates GetCoordinates(void) const { return __coordinate;}
88 * @see @ref Tizen::Locations::Location::GetSpeed()
90 double GetSpeed(void) const { return __speed;}
93 * @see @ref Tizen::Locations::Location::GetTimestamp()
95 Tizen::Base::DateTime GetTimestamp(void) const;
98 * @see @ref Tizen::Locations::Location::GetExtraInfo()
100 Tizen::Base::String GetExtraInfo(const Tizen::Base::String& key) const;
103 * @see @ref Tizen::Locations::Location::IsValid()
105 bool IsValid(void) const {return __isLocationValid;}
108 * Sets the horizonal Accuracy value of the %_LocationImpl instance
110 void SetHorizontalAccuracy(double horizontalAcc) {__horizontalAccuracy = horizontalAcc;}
113 * Sets the vertical Accuracy value of the %_LocationImpl instance
115 void SetVerticalAccuracy(double verticalAcc) {__verticalAccuracy = verticalAcc;}
118 * Sets the course value of the %_LocationImpl instance
120 void SetCourse(double course) { __course = course;}
123 * Sets the Coordinate value of the %_LocationImpl instance
125 result SetCoordinates(const Coordinates& coordinate);
128 * Sets the speed value of the %_LocationImpl instance
130 void SetSpeed(double speed) { __speed = speed;}
133 * Sets the Time stamp value of the %_LocationImpl instance
135 void SetTimestamp(long long timestamp) {__timestamp = timestamp;}
138 * Sets the Satellite Information of the %_LocationImpl instance
140 void SetExtraInfo(const Tizen::Base::String& key, const Tizen::Base::String& value);
143 * Sets the validity of the location.
145 void SetValidity(bool validity){__isLocationValid = validity;}
148 // Gets the timestamp in ms.
150 long long GetTimestampInMs(void){return __timestamp;}
153 // Turns on the denied flag.
155 void TurnOnDeniedFlag(void) {__isDenied = true;}
158 // Returns the denied flag.
160 bool IsDenied(void) {return __isDenied;}
163 * Gets the Impl instance of the given %Location object
165 static _LocationImpl* GetInstance(Location& obj);
168 * Gets the Impl instance of the given %Location object
170 static const _LocationImpl* GetInstance(const Location& obj);
173 //@Internal: Gets the new instance of %Location.
175 static Location* GetLocationInstanceN(void);
178 //@Internal: Gets the new instance of %Location.
180 static Location GetLocationInstance(void);
183 * Assigns the value of the specified _LocationImpl object to the current instance.
185 _LocationImpl& operator =(const _LocationImpl& rhs);
188 * Compares the calling instance with the specified instance.
190 bool operator ==(const _LocationImpl& rhs) const;
193 Coordinates __coordinate;
196 double __horizontalAccuracy;
197 double __verticalAccuracy;
198 long long __timestamp;
199 Tizen::Base::String __locationMethod;
200 Tizen::Base::String __satelliteInformation;
201 bool __isLocationValid;
204 } } // Tizen::Location
205 #endif // _FLOC_INTERNAL_LOCATION_IMPL_H_