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

Weather Service. More...

Inheritance diagram for gem::weather::Service:
Collaboration diagram for gem::weather::Service:

Public Member Functions

 Service (const Service &)=delete
 Service (Service &&)=default
 Default move constructor noexcept is deduced.
Service & operator= (const Service &)=delete
Service & operator= (Service &&service)=default
 Default move assignment noexcept is deduced.
int getCurrent (const CoordinatesList &coords, LocationForecastList &result, ProgressListener listener) noexcept
 Async gets current weather for a list of coordinates.
int getForecast (const TimeDistanceCoordinateList &coords, LocationForecastList &result, ProgressListener listener) noexcept
 Async gets forecast weather for a list of coordinates and timestamps.
int getDailyForecast (int days, const CoordinatesList &coords, LocationForecastList &result, ProgressListener listener) noexcept
 Async gets daily forecast weather for a list of coordinates.
int getHourlyForecast (int hours, const CoordinatesList &coords, LocationForecastList &result, ProgressListener listener) noexcept
 Async gets hourly forecast weather for a list of coordinates.
void cancel (ProgressListener listener) noexcept
 Cancel an async operation.
int getMaxCoordinatesPerRequest () const noexcept
 Get max coordinates per request limit.
int getMaxDayForDailyForecast () const noexcept
 Get max day for daily forecast limit.
int getMaxHoursForHourlyForecast () const noexcept
 Get max hours for hourly forecast limit.
TransferStatisticsRef getTransferStatistics () const noexcept
 Get HTTP data transfer statistics.

Detailed Description

Weather Service.

Provides information about current and forecast weather conditions based on geographical coordinate

Implements share-read / write Api object over IService.

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

Member Function Documentation

◆ cancel()

void gem::weather::Service::cancel ( ProgressListener listener)
inlinenoexcept

Cancel an async operation.

Parameters
[in]listenerThe listener associated with the operation

If listener is empty, all pending weather requests will be cancelled

◆ getCurrent()

int gem::weather::Service::getCurrent ( const CoordinatesList & coords,
LocationForecastList & result,
ProgressListener listener )
inlinenoexcept

Async gets current weather for a list of coordinates.

Parameters
[in]coordsThe coordinates list for which the current weather is requested
[out]resultThe list with weather conditions for every requested coordinates
[in]listenerOperation progress listener
Returns
Error code if the operation couldn't start. If operation started successfully, the progress and completion notifications will come via the listener

◆ getDailyForecast()

int gem::weather::Service::getDailyForecast ( int days,
const CoordinatesList & coords,
LocationForecastList & result,
ProgressListener listener )
inlinenoexcept

Async gets daily forecast weather for a list of coordinates.

Parameters
[in]daysThe number of days for which the forecast is requested ( value should be <= 10 )
[in]coordsThe coordinates list for which the forecast is requested
[out]resultThe list with weather conditions for every requested coordinates
[in]listenerOperation progress listener
Returns
Error code if the operation couldn't start. If operation started successfully, the progress and completion notifications will come via the listener

◆ getForecast()

int gem::weather::Service::getForecast ( const TimeDistanceCoordinateList & coords,
LocationForecastList & result,
ProgressListener listener )
inlinenoexcept

Async gets forecast weather for a list of coordinates and timestamps.

Parameters
[in]coordsThe coordinates & timestamps list for which the forecast is requested. The timestamp should be relative to current time
[out]resultThe list with weather conditions for every requested coordinates
[in]listenerOperation progress listener
Returns
Error code if the operation couldn't start. If operation started successfully, the progress and completion notifications will come via the listener

◆ getHourlyForecast()

int gem::weather::Service::getHourlyForecast ( int hours,
const CoordinatesList & coords,
LocationForecastList & result,
ProgressListener listener )
inlinenoexcept

Async gets hourly forecast weather for a list of coordinates.

Parameters
[in]hoursThe number of hours for which the forecast is requested ( value should be <= 240 )
[in]coordsThe coordinates list for which the forecast is requested
[out]resultThe list with weather conditions for every requested coordinates
[in]listenerOperation progress listener
Returns
Error code if the operation couldn't start. If operation started successfully, the progress and completion notifications will come via the listener

◆ getMaxCoordinatesPerRequest()

int gem::weather::Service::getMaxCoordinatesPerRequest ( ) const
inlinenoexcept

Get max coordinates per request limit.

Returns
The limit

◆ getMaxDayForDailyForecast()

int gem::weather::Service::getMaxDayForDailyForecast ( ) const
inlinenoexcept

Get max day for daily forecast limit.

Returns
The limit

◆ getMaxHoursForHourlyForecast()

int gem::weather::Service::getMaxHoursForHourlyForecast ( ) const
inlinenoexcept

Get max hours for hourly forecast limit.

Returns
The limit

◆ getTransferStatistics()

TransferStatisticsRef gem::weather::Service::getTransferStatistics ( ) const
inlinenoexcept

Get HTTP data transfer statistics.

Returns
The transfer statistics

◆ operator=()

Service & gem::weather::Service::operator= ( Service && service)
default

Default move assignment noexcept is deduced.

Returns
*this
Parameters
[in]serviceThe object to move