ubuntu-location-service  ..
An aggregating location service providing positioning and geocoding capabilities to applications.
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  Result {
  Result::granted,
  Result::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
 
PermissionManageroperator= (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 45 of file permission_manager.h.

Member Typedef Documentation

Manager pointer type.

Definition at line 49 of file permission_manager.h.

Member Enumeration Documentation

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

Constructor & Destructor Documentation

virtual com::ubuntu::location::service::PermissionManager::~PermissionManager ( )
virtualdefault
com::ubuntu::location::service::PermissionManager::PermissionManager ( const PermissionManager )
delete
com::ubuntu::location::service::PermissionManager::PermissionManager ( )
protecteddefault

Member Function Documentation

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
criteriaThe requirements of the remote peer.
credentialsThe 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.

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

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