~thomas-voss/location-service/introduce-locationd

« back to all changes in this revision

Viewing changes to src/location/service/default_permission_manager.cpp

  • Committer: Thomas Voß
  • Date: 2016-06-27 11:05:34 UTC
  • mfrom: (258.1.3 simplify-namespaces)
  • Revision ID: thomas.voss@canonical.com-20160627110534-vgl06rzgh7if12uo
Merge lp:~thomas-voss/location-service/simplify-namespaces

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 *
16
16
 * Authored by: Thomas Voß <thomas.voss@canonical.com>
17
17
 */
18
 
#include <com/ubuntu/location/service/default_permission_manager.h>
 
18
#include <location/service/default_permission_manager.h>
19
19
 
20
20
#include <iostream>
21
21
 
22
 
namespace cul = com::ubuntu::location;
23
 
namespace culs = com::ubuntu::location::service;
24
 
 
25
 
culs::DefaultPermissionManager::DefaultPermissionManager()
 
22
location::service::DefaultPermissionManager::DefaultPermissionManager()
26
23
    : pid(getpid()),
27
24
      uid(getuid())
28
25
{
29
26
}
30
27
 
31
 
culs::DefaultPermissionManager::~DefaultPermissionManager() noexcept
 
28
location::service::DefaultPermissionManager::~DefaultPermissionManager() noexcept
32
29
{
33
30
}
34
31
 
35
 
culs::PermissionManager::Result culs::DefaultPermissionManager::check_permission_for_credentials(
36
 
    const cul::Criteria&,
37
 
    const culs::Credentials& credentials)
 
32
location::service::PermissionManager::Result location::service::DefaultPermissionManager::check_permission_for_credentials(
 
33
    const location::Criteria&,
 
34
    const location::service::Credentials& credentials)
38
35
{
39
36
    if (credentials.pid != pid || credentials.uid != uid)
40
37
        return Result::granted; // FIXME(tvoss): This should return rejected.