Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::TimezoneService Class Reference

Resolves timezone information by location. More...

Inheritance diagram for gem::TimezoneService:
Collaboration diagram for gem::TimezoneService:

Public Member Functions

 TimezoneService (const TimezoneService &)=delete
 TimezoneService (TimezoneService &&)=default
 Default move constructor noexcept is deduced.
TimezoneService & operator= (const TimezoneService &timezone)=delete
TimezoneService & operator= (TimezoneService &&timezone)=default
 Default move assignment noexcept is deduced.
int getTimezoneInfo (TimezoneResult &timezoneResult, const Coordinates &coords, Time time, ProgressListener listener, bool accurateResult=false) const noexcept
 Async returns the timezone info with coordinates and a timestamp.
int getTimezoneInfo (TimezoneResult &timezoneResult, const String &timezoneId, Time time, ProgressListener listener, bool accurateResult=false) const noexcept
 Async returns the timezone info with coordinates and a timestamp.

Detailed Description

Resolves timezone information by location.

Implements share-read / write Api object over ITimezone.

This behaves like a singleton, i.e. all instances are sharing behind the same API interface.

Maps geographic coordinates to timezone data, supporting time-aware navigation and scheduling features.

Member Function Documentation

◆ getTimezoneInfo() [1/2]

int gem::TimezoneService::getTimezoneInfo ( TimezoneResult & timezoneResult,
const Coordinates & coords,
Time time,
ProgressListener listener,
bool accurateResult = false ) const
inlinenoexcept

Async returns the timezone info with coordinates and a timestamp.

Parameters
[out]timezoneResultThe result Timezone object
[in]coordsThe location from where to get the timezone result
[in]timeThe time for which offsets are calculated (UTC)
[in]listenerOperation progress listener. Returns:
[in]accurateResult- if left 'false' the result will be computed using the available offline resource. If 'true' an HTTP request will be performed for computing the result.
Note
If 'accurateResult' param is false the 'listener' parameter is Optional. The function will also return directly.
Returns
Error code if the operation couldn't start. If operation started successfully, the progress and completion notifications will come via the listener

◆ getTimezoneInfo() [2/2]

int gem::TimezoneService::getTimezoneInfo ( TimezoneResult & timezoneResult,
const String & timezoneId,
Time time,
ProgressListener listener,
bool accurateResult = false ) const
inlinenoexcept

Async returns the timezone info with coordinates and a timestamp.

Parameters
[out]timezoneResultThe result Timezone object
[in]timezoneIdThe geographic location on earth of type: "Continent/City"
[in]timeThe time for which offsets are calculated (UTC)
[in]listenerOperation progress listener. Returns:
[in]accurateResult- if left 'false' the result will be computed using the available offline resource. If 'true' an HTTP request will be performed for computing the result.
Note
If 'accurateResult' param is false the 'listener' parameter is Optional. The function will also return directly.
Returns
Error code if the operation couldn't start. If operation started successfully, the progress and completion notifications will come via the listener

◆ operator=()

TimezoneService & gem::TimezoneService::operator= ( TimezoneService && timezone)
default

Default move assignment noexcept is deduced.

Parameters
timezoneThe TimezoneService object to move
Returns
The reference to this object