26
27
namespace culs = com::ubuntu::location::service;
27
28
namespace culss = com::ubuntu::location::service::session;
29
namespace dbus = org::freedesktop::dbus;
30
namespace dbus = core::dbus;
31
32
struct culss::Skeleton::Private
33
void handle_start_position_updates(DBusMessage* msg);
34
void handle_stop_position_updates(DBusMessage* msg);
36
void handle_start_velocity_updates(DBusMessage* msg);
37
void handle_stop_velocity_updates(DBusMessage* msg);
39
void handle_start_heading_updates(DBusMessage* msg);
40
void handle_stop_heading_updates(DBusMessage* msg);
34
void handle_start_position_updates(const core::dbus::Message::Ptr& msg);
35
void handle_stop_position_updates(const core::dbus::Message::Ptr& msg);
37
void handle_start_velocity_updates(const core::dbus::Message::Ptr& msg);
38
void handle_stop_velocity_updates(const core::dbus::Message::Ptr& msg);
40
void handle_start_heading_updates(const core::dbus::Message::Ptr& msg);
41
void handle_stop_heading_updates(const core::dbus::Message::Ptr& msg);
43
44
dbus::Bus::Ptr bus;
98
99
return d->session_path;
101
void culss::Skeleton::Private::handle_start_position_updates(DBusMessage* msg)
102
void culss::Skeleton::Private::handle_start_position_updates(const core::dbus::Message::Ptr& msg)
105
106
parent->start_position_updates();
106
107
auto reply = dbus::Message::make_method_return(msg);
107
bus->send(reply->get());
108
109
} catch(const std::runtime_error& e)
110
auto error = org::freedesktop::dbus::Message::make_error(msg, Interface::Errors::ErrorStartingUpdate::name(), e.what());
111
bus->send(error->get());
111
auto error = core::dbus::Message::make_error(
113
Interface::Errors::ErrorStartingUpdate::name(),
115
void culss::Skeleton::Private::handle_stop_position_updates(DBusMessage* msg)
120
void culss::Skeleton::Private::handle_stop_position_updates(const core::dbus::Message::Ptr& msg)
117
122
parent->stop_position_updates();
118
auto reply = org::freedesktop::dbus::Message::make_method_return(msg);
119
bus->send(reply->get());
123
auto reply = core::dbus::Message::make_method_return(msg);
122
void culss::Skeleton::Private::handle_start_velocity_updates(DBusMessage* msg)
127
void culss::Skeleton::Private::handle_start_velocity_updates(const core::dbus::Message::Ptr& msg)
126
131
parent->start_velocity_updates();
127
auto reply = org::freedesktop::dbus::Message::make_method_return(msg);
128
bus->send(reply->get());
132
auto reply = core::dbus::Message::make_method_return(msg);
129
134
} catch(const std::runtime_error& e)
131
auto error = org::freedesktop::dbus::Message::make_error(msg, Interface::Errors::ErrorStartingUpdate::name(), e.what());
132
bus->send(error->get());
136
auto error = core::dbus::Message::make_error(msg, Interface::Errors::ErrorStartingUpdate::name(), e.what());
136
void culss::Skeleton::Private::handle_stop_velocity_updates(DBusMessage* msg)
141
void culss::Skeleton::Private::handle_stop_velocity_updates(const core::dbus::Message::Ptr& msg)
138
143
parent->stop_velocity_updates();
139
auto reply = org::freedesktop::dbus::Message::make_method_return(msg);
140
bus->send(reply->get());
144
auto reply = core::dbus::Message::make_method_return(msg);
143
void culss::Skeleton::Private::handle_start_heading_updates(DBusMessage* msg)
148
void culss::Skeleton::Private::handle_start_heading_updates(const core::dbus::Message::Ptr& msg)
147
152
parent->start_heading_updates();
148
auto reply = org::freedesktop::dbus::Message::make_method_return(msg);
149
bus->send(reply->get());
153
auto reply = core::dbus::Message::make_method_return(msg);
150
155
} catch(const std::runtime_error& e)
152
auto error = org::freedesktop::dbus::Message::make_error(msg, Interface::Errors::ErrorStartingUpdate::name(), e.what());
153
bus->send(error->get());
157
auto error = core::dbus::Message::make_error(msg, Interface::Errors::ErrorStartingUpdate::name(), e.what());
157
void culss::Skeleton::Private::handle_stop_heading_updates(DBusMessage* msg)
162
void culss::Skeleton::Private::handle_stop_heading_updates(const core::dbus::Message::Ptr& msg)
159
164
parent->stop_heading_updates();
160
auto reply = org::freedesktop::dbus::Message::make_method_return(msg);
161
bus->send(reply->get());
165
auto reply = core::dbus::Message::make_method_return(msg);