ubuntu-location-service: com::ubuntu::location::Provider::Controller Class Reference

ubuntu-location-service .. An aggregating location service providing positioning and geocoding capabilities to applications.

Public Types | Public Member Functions | Protected Member Functions | List of all members
com::ubuntu::location::Provider::Controller Class Reference

Facade for controlling the state of position/heading/velocity updates. More...

`#include <provider.h>`

Collaboration diagram for com::ubuntu::location::Provider::Controller:

## Public Types
typedef std::shared_ptr< Controller > | Ptr

## Public Member Functions
virtual | ~Controller ()=default
| Controller (const Controller &)=delete
Controller & | operator= (const Controller &)=delete
void | disable ()
| disable switches the provider to a disabled state, such that subsequent calls to start* methods fail. More...
void | enable ()
| enable switches the provider to an enabled state, such that subsequent calls to start* methods succeed. More...
virtual void | start_position_updates ()
| Request to start position updates if not already running. More...
virtual void | stop_position_updates ()
| Request to stop position updates. Only stops the provider when the last observer calls this function. More...
bool | are_position_updates_running () const
| Checks if position updates are currently running. More...
virtual void | start_heading_updates ()
| Request to start heading updates if not already running. More...
virtual void | stop_heading_updates ()
| Request to stop heading updates. Only stops the provider when the last observer calls this function. More...
bool | are_heading_updates_running () const
| Checks if position updates are currently running. More...
virtual void | start_velocity_updates ()
| Request to start velocity updates if not already running. More...
virtual void | stop_velocity_updates ()
| Request to stop velocity updates. Only stops the provider when the last observer calls this function. More...
bool | are_velocity_updates_running () const
| Checks if velocity updates are currently running. More...

## Protected Member Functions
| Controller (Provider &instance)

## Detailed Description

Facade for controlling the state of position/heading/velocity updates.

Multiple observers can request state changes for updates. This class ensures that the specific updates are started and stopped if at least one observer requests them and stopped when the last observer issues a stop request.

Definition at line 80 of file provider.h.

## Member Typedef Documentation

## ◆ Ptr

typedef std::shared_ptr<Controller> com::ubuntu::location::Provider::Controller::Ptr

Definition at line 83 of file provider.h.

## Constructor & Destructor Documentation

## ◆ ~Controller()

virtual com::ubuntu::location::Provider::Controller::~Controller | ( |  | ) |
| virtualdefault

## ◆ Controller() [1/2]

com::ubuntu::location::Provider::Controller::Controller | ( | const Controller & |  | ) |
| delete

## ◆ Controller() [2/2]

com::ubuntu::location::Provider::Controller::Controller | ( | Provider & | instance | ) |
| explicitprotected

## Member Function Documentation

## ◆ are_heading_updates_running()

bool com::ubuntu::location::Provider::Controller::are_heading_updates_running | ( |  | ) | const

Checks if position updates are currently running.

Returns
  true iff position updates are currently running.

## ◆ are_position_updates_running()

bool com::ubuntu::location::Provider::Controller::are_position_updates_running | ( |  | ) | const

Checks if position updates are currently running.

Returns
  true iff position updates are currently running.

## ◆ are_velocity_updates_running()

bool com::ubuntu::location::Provider::Controller::are_velocity_updates_running | ( |  | ) | const

Checks if velocity updates are currently running.

Returns
  true iff velocity updates are currently running.

## ◆ disable()

void com::ubuntu::location::Provider::Controller::disable | ( |  | ) |

disable switches the provider to a disabled state, such that subsequent calls to start* methods fail.

## ◆ enable()

void com::ubuntu::location::Provider::Controller::enable | ( |  | ) |

enable switches the provider to an enabled state, such that subsequent calls to start* methods succeed.

## ◆ operator=()

Controller& com::ubuntu::location::Provider::Controller::operator= | ( | const Controller & |  | ) |
| delete

## ◆ start_heading_updates()

virtual void com::ubuntu::location::Provider::Controller::start_heading_updates | ( |  | ) |
| virtual

Request to start heading updates if not already running.

## ◆ start_position_updates()

virtual void com::ubuntu::location::Provider::Controller::start_position_updates | ( |  | ) |
| virtual

Request to start position updates if not already running.

## ◆ start_velocity_updates()

virtual void com::ubuntu::location::Provider::Controller::start_velocity_updates | ( |  | ) |
| virtual

Request to start velocity updates if not already running.

## ◆ stop_heading_updates()

virtual void com::ubuntu::location::Provider::Controller::stop_heading_updates | ( |  | ) |
| virtual

Request to stop heading updates. Only stops the provider when the last observer calls this function.

## ◆ stop_position_updates()

virtual void com::ubuntu::location::Provider::Controller::stop_position_updates | ( |  | ) |
| virtual

Request to stop position updates. Only stops the provider when the last observer calls this function.

## ◆ stop_velocity_updates()

virtual void com::ubuntu::location::Provider::Controller::stop_velocity_updates | ( |  | ) |
| virtual

Request to stop velocity updates. Only stops the provider when the last observer calls this function.

The documentation for this class was generated from the following file:

- /build/location-service-git/src/location-service/include/location_service/com/ubuntu/location/provider.h