diff options
Diffstat (limited to 'src/FLoc_LocationManager.h')
-rw-r--r-- | src/FLoc_LocationManager.h | 70 |
1 files changed, 55 insertions, 15 deletions
diff --git a/src/FLoc_LocationManager.h b/src/FLoc_LocationManager.h index 531eabb..75c5d97 100644 --- a/src/FLoc_LocationManager.h +++ b/src/FLoc_LocationManager.h @@ -57,6 +57,12 @@ public: // result StopLocationUpdates(RequestId reqId); + // This method updates the requested interval from the location provider. + // + // @since 2.0 + // + result ChangeUpdateInterval(RequestId reqId, int interval); + // This method initiates the synchronous location retrieval. The location monitor instance provided is used to intimate back the location. // // @since 2.0 @@ -158,7 +164,7 @@ private: // // @since 2.0 // - result SetLocationInformation(double latitude, double longitude, double altitude, time_t timestamp, location_method_e locMethod); + result SetLocationInformation(double latitude, double longitude, double altitude, time_t timestamp, location_method_e locMethod, Location* pLocation); // The method is called to send back the callbacks in case of async location updates. // @@ -184,6 +190,30 @@ private: // Location GetLastKnownLocation(location_method_e nativeLocMethod); + // This method returns the most recent location among available last known locations. + // + // @since 2.0 + // + Location GetRecentLocationAvailable(void); + + // This method updates the timer interval for a particular request Id. + // + // @since 2.0 + // + void UpdateLocRequestInfoList(RequestId reqId, int interval); + + // This method gets the better location among the three location providers. + // + // @since 2.0 + // + const Location* FindBestLocation(void); + + // This method gets the location from the native side depending on the location handle. + // + // @since 2.0 + // + result GetLocation(location_method_e nativeLocMethod); + // @see @ref Tizen::Base::Runtime::EventDrivenThread::OnStart() // // @since 2.0 @@ -251,12 +281,6 @@ private: // static bool GetAppAccessibility(void); - // This method returns the most recent location among available last known locations. - // - // @since 2.0 - // - Location GetRecentLocationAvailable(void); - private: const static RequestId REQ_ID_START_LOC_UPDATES = 1; const static RequestId REQ_ID_STOP_LOC_UPDATES = 2; @@ -267,6 +291,7 @@ private: const static RequestId REQ_ID_SYNC_LOC_RETRIEVAL = 7; const static RequestId REQ_ID_GET_APP_ACCESSIBILITY = 8; const static RequestId REQ_ID_GET_LAST_LOCATION = 9; + const static RequestId REQ_ID_UPDATE_INTERVAL = 10; enum _LocationMethodRequested { @@ -286,19 +311,34 @@ private: } __locationMgrState; + class __LocationManagerHandle + { + public: + __LocationManagerHandle(void) + : serviceState(LOCATIONS_SERVICE_DISABLED) + , handle(null) + , pLocation(null) + { + } + + ~__LocationManagerHandle(void) + { + } + + public: + location_service_state_e serviceState; + location_manager_h handle; + std::unique_ptr< Tizen::Locations::Location > pLocation; + }; + LocationAccuracy __minRequestedAccuracy; - location_service_state_e __nativeGPSServiceState; - location_service_state_e __nativeWPSServiceState; - location_service_state_e __nativeCPSServiceState; int __timerInterval; int __timerTicks; - location_manager_h __gpsHandler; - location_manager_h __wpsHandler; - location_manager_h __cpsHandler; - std::unique_ptr< Tizen::Locations::Location > __pCurrentLocation; + __LocationManagerHandle __gpsHandler; + __LocationManagerHandle __wpsHandler; + __LocationManagerHandle __cpsHandler; std::unique_ptr< Tizen::Base::Collection::ArrayList, Tizen::Base::Collection::AllElementsDeleter > __pLocRequestInfoList; std::unique_ptr< Tizen::Base::Collection::ArrayList, Tizen::Base::Collection::AllElementsDeleter > __pSyncLocRequestInfoList; - std::unique_ptr< Tizen::Base::Runtime::Mutex > __pLocMgrMutex; std::unique_ptr< Tizen::Base::Runtime::Timer > __pLocUpdateTimer; static _LocationManager* __pUniqueInstance; |