~sil2100/location-service/gps-arm64

« back to all changes in this revision

Viewing changes to src/location_service/com/ubuntu/location/service/session/interface.cpp

  • Committer: Thomas Voß
  • Date: 2013-05-28 14:20:45 UTC
  • Revision ID: thomas.voss@canonical.com-20130528142045-kq5umqdmm4o53vwk
Initial push.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "com/ubuntu/location/service/session/interface.h"
 
2
 
 
3
#include <org/freedesktop/dbus/codec.h>
 
4
#include <org/freedesktop/dbus/service.h>
 
5
#include <org/freedesktop/dbus/traits/service.h>
 
6
#include <org/freedesktop/dbus/types/object_path.h>
 
7
 
 
8
namespace cul = com::ubuntu::location;
 
9
namespace culs = com::ubuntu::location::service;
 
10
namespace culss = com::ubuntu::location::service::session;
 
11
 
 
12
namespace dbus = org::freedesktop::dbus;
 
13
 
 
14
culss::Interface::~Interface() noexcept
 
15
{
 
16
}
 
17
 
 
18
cul::ChannelConnection culss::Interface::install_position_updates_handler(std::function<void(const cul::Update<cul::Position>&)> handler)
 
19
{
 
20
    return position_updates_channel.connect(handler);
 
21
}
 
22
 
 
23
cul::ChannelConnection culss::Interface::install_velocity_updates_handler(std::function<void(const cul::Update<cul::Velocity>&)> handler)
 
24
{
 
25
    return velocity_updates_channel.connect(handler);
 
26
}
 
27
 
 
28
cul::ChannelConnection culss::Interface::install_heading_updates_handler(std::function<void(const cul::Update<cul::Heading>&)> handler)
 
29
{
 
30
    return heading_updates_channel.connect(handler);
 
31
}
 
32
 
 
33
cul::Channel<cul::Update<cul::Position>>& culss::Interface::access_position_updates_channel()
 
34
{
 
35
    return position_updates_channel;
 
36
}
 
37
 
 
38
cul::Channel<cul::Update<cul::Heading>>& culss::Interface::access_heading_updates_channel()
 
39
{
 
40
    return heading_updates_channel;
 
41
}
 
42
 
 
43
cul::Channel<cul::Update<cul::Velocity>>& culss::Interface::access_velocity_updates_channel()
 
44
{
 
45
    return velocity_updates_channel;
 
46
}