ubuntu-location-service: com::ubuntu::location::service::PermissionManager 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::service::PermissionManager Class Referenceabstract

The PermissionManager class is an interface to check whether an application is allowed to access the location services. More...

`#include <permission_manager.h>`

Inheritance diagram for com::ubuntu::location::service::PermissionManager:
Collaboration diagram for com::ubuntu::location::service::PermissionManager:

## Public Types
enum class | Result { granted , rejected }
| The Result enum summarizes the results of a query for permissions. More...
typedef std::shared_ptr< PermissionManager > | Ptr

## Public Member Functions
virtual | ~PermissionManager ()=default
| PermissionManager (const PermissionManager &)=delete
PermissionManager & | operator= (const PermissionManager &)=delete
virtual Result | check_permission_for_credentials (const Criteria &criteria, const Credentials &credentials)=0
| Checks whether the app with the given credentials is allowed to access the service for the given criteria. More...

## Protected Member Functions
| PermissionManager ()=default

## Detailed Description

The PermissionManager class is an interface to check whether an application is allowed to access the location services.

Definition at line 46 of file permission_manager.h.

## Member Typedef Documentation

## ◆ Ptr

typedef std::shared_ptr<PermissionManager> com::ubuntu::location::service::PermissionManager::Ptr

Manager pointer type.

Definition at line 50 of file permission_manager.h.

## Member Enumeration Documentation

## ◆ Result

enum com::ubuntu::location::service::PermissionManager::Result
| strong

The Result enum summarizes the results of a query for permissions.

Enumerator
granted | The app is allowed to access the location service.
rejected | The app is not allowed to access the location service.

Definition at line 55 of file permission_manager.h.

## Constructor & Destructor Documentation

## ◆ ~PermissionManager()

virtual com::ubuntu::location::service::PermissionManager::~PermissionManager | ( |  | ) |
| virtualdefault

## ◆ PermissionManager() [1/2]

com::ubuntu::location::service::PermissionManager::PermissionManager | ( | const PermissionManager & |  | ) |
| delete

## ◆ PermissionManager() [2/2]

com::ubuntu::location::service::PermissionManager::PermissionManager | ( |  | ) |
| protecteddefault

## Member Function Documentation

## ◆ check_permission_for_credentials()

virtual Result com::ubuntu::location::service::PermissionManager::check_permission_for_credentials | ( | const Criteria & | criteria,
|  | const Credentials & | credentials
| ) |  |
| pure virtual

Checks whether the app with the given credentials is allowed to access the service for the given criteria.

Parameters

  criteria | The requirements of the remote peer.
  credentials | The credentials identifying the remote peer.

Returns
  Result::granted if the remote peer is allowed to access the location service, Result::rejected otherwise.

Implemented in com::ubuntu::location::service::DefaultPermissionManager.

## ◆ operator=()

PermissionManager& com::ubuntu::location::service::PermissionManager::operator= | ( | const PermissionManager & |  | ) |
| delete

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

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