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_SyncLocationRequestInfo.h
20 * @brief This is the header file for the %_SyncLocationRequestInfo class.
22 * This header file contains the declarations of the %_SyncLocationRequestInfo class member variables.
25 #ifndef _FLOC_INTERNAL_SYNC_LOCATION_REQUEST_INFO_H_
26 #define _FLOC_INTERNAL_SYNC_LOCATION_REQUEST_INFO_H_
29 #include <unique_ptr.h>
30 #include <FBaseObject.h>
31 #include <FBaseRtTimer.h>
32 #include <FBaseRtITimerEventListener.h>
33 #include <FLocTypes.h>
34 #include <FSysSystemTime.h>
36 namespace Tizen { namespace Locations
38 class _LocationMonitor;
39 class _LocationManager;
41 class _SyncLocationRequestInfo
42 : public Tizen::Base::Object
45 _SyncLocationRequestInfo(_LocationMonitor* pLocMonitor, RequestId reqId)
46 : Tizen::Base::Object()
47 , __pLocMonitor(pLocMonitor)
51 Tizen::System::SystemTime::GetCurrentTime(__requestTime);
54 ~_SyncLocationRequestInfo(void) {}
56 _LocationMonitor* GetLocationMonitor(void) const {return __pLocMonitor;}
58 RequestId GetRequestId(void) const {return __reqId;}
60 int GetTickCount(void) const {return __tickCount;}
62 void IncrementTickCount(void) { __tickCount++;}
64 bool IsInTime(const Tizen::Base::DateTime& timestamp)
66 return (timestamp > __requestTime) ? true : false;
69 bool IsAccuracySatisfying(LocationAccuracy accuracy)
71 if (accuracy == LOC_ACCURACY_INVALID)
77 return (accuracy <= __pLocMonitor->GetAccuracy()) ? true : false;
82 _SyncLocationRequestInfo(void);
84 _SyncLocationRequestInfo& operator =(const _SyncLocationRequestInfo& rhs);
87 Tizen::Base::DateTime __requestTime;
88 _LocationMonitor* __pLocMonitor;
91 }; //_SyncLocationRequestInfo
93 #endif // _FLOC_INTERNAL_SYNC_LOCATION_REQUEST_INFO_H_