// // 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_SyncLocationRequestInfo.h * @brief This is the header file for the %_SyncLocationRequestInfo class. * * This header file contains the declarations of the %_SyncLocationRequestInfo class member variables. */ #ifndef _FLOC_INTERNAL_SYNC_LOCATION_REQUEST_INFO_H_ #define _FLOC_INTERNAL_SYNC_LOCATION_REQUEST_INFO_H_ #include #include #include #include #include #include #include namespace Tizen { namespace Locations { class _LocationMonitor; class _LocationManager; class _SyncLocationRequestInfo : public Tizen::Base::Object { public: _SyncLocationRequestInfo(_LocationMonitor* pLocMonitor, RequestId reqId) : Tizen::Base::Object() , __pLocMonitor(pLocMonitor) , __reqId(reqId) , __tickCount(0) { Tizen::System::SystemTime::GetCurrentTime(__requestTime); } ~_SyncLocationRequestInfo(void) {} _LocationMonitor* GetLocationMonitor(void) const {return __pLocMonitor;} RequestId GetRequestId(void) const {return __reqId;} int GetTickCount(void) const {return __tickCount;} void IncrementTickCount(void) { __tickCount++;} bool IsInTime(const Tizen::Base::DateTime& timestamp) { return (timestamp > __requestTime) ? true : false; } bool IsAccuracySatisfying(LocationAccuracy accuracy) { if (accuracy == LOC_ACCURACY_INVALID) { return false; } else { return (accuracy <= __pLocMonitor->GetAccuracy()) ? true : false; } } private: _SyncLocationRequestInfo(void); _SyncLocationRequestInfo& operator =(const _SyncLocationRequestInfo& rhs); private: Tizen::Base::DateTime __requestTime; _LocationMonitor* __pLocMonitor; RequestId __reqId; int __tickCount; }; //_SyncLocationRequestInfo }} //Tizen::Locations #endif // _FLOC_INTERNAL_SYNC_LOCATION_REQUEST_INFO_H_