com::lomiri::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::lomiri::location::service::PermissionManager:
Collaboration diagram for com::lomiri::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.

## 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 50 of file permission_manager.h.

## Member Typedef Documentation

## Ptr

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

Manager pointer type.

Definition at line 54 of file permission_manager.h.

## Member Enumeration Documentation

## Result

enum class com::lomiri::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 59 of file permission_manager.h.

## Constructor & Destructor Documentation

## ~PermissionManager()

virtual com::lomiri::location::service::PermissionManager::~PermissionManager | ( |  | ) |

virtual default

## PermissionManager() [1/2]

com::lomiri::location::service::PermissionManager::PermissionManager | ( | const PermissionManager & |  | ) |

delete

References PermissionManager().

Referenced by operator=(), and PermissionManager().

Here is the call graph for this function:

## PermissionManager() [2/2]

com::lomiri::location::service::PermissionManager::PermissionManager | ( |  | ) |

protected default

## Member Function Documentation

## check_permission_for_credentials()

virtual Result com::lomiri::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::lomiri::location::service::DefaultPermissionManager.

## operator=()

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

delete

References PermissionManager().

Here is the call graph for this function:

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

- permission_manager.h