~sil2100/location-service/gps-arm64

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_SESSION_SKELETON_H_
#define LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_SESSION_SKELETON_H_

#include "com/ubuntu/location/service/session/interface.h"

#include "com/ubuntu/location/channel.h"
#include "com/ubuntu/location/heading.h"
#include "com/ubuntu/location/position.h"
#include "com/ubuntu/location/provider.h"
#include "com/ubuntu/location/update.h"
#include "com/ubuntu/location/velocity.h"

#include <org/freedesktop/dbus/message.h>
#include <org/freedesktop/dbus/skeleton.h>

#include <functional>

namespace com
{
namespace ubuntu
{
namespace location
{
namespace service
{
namespace session
{
class Skeleton : public org::freedesktop::dbus::Skeleton<Interface>              
{
  public:
    Skeleton(
        const org::freedesktop::dbus::Bus::Ptr& bus, 
        const org::freedesktop::dbus::types::ObjectPath& session_path);
    
    virtual ~Skeleton() noexcept;
    
    virtual const org::freedesktop::dbus::types::ObjectPath& path() const;

  private:
    void handle_start_position_updates(DBusMessage* msg);
    void handle_stop_position_updates(DBusMessage* msg);

    void handle_start_velocity_updates(DBusMessage* msg);
    void handle_stop_velocity_updates(DBusMessage* msg);

    void handle_start_heading_updates(DBusMessage* msg);
    void handle_stop_heading_updates(DBusMessage* msg);

    org::freedesktop::dbus::types::ObjectPath session_path;
    org::freedesktop::dbus::Object::Ptr object;
};
}
}
}
}
}

#endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_SESSION_SKELETON_H_