~thomas-voss/location-service/fix-service-path

« back to all changes in this revision

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

Expose service::State to the bus. (LP: #1536774)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
            const dbus::Object::Ptr& object)
35
35
        : bus(connection),
36
36
          object(object),
 
37
          state(object->get_property<culs::Interface::Properties::State>()),
37
38
          does_satellite_based_positioning(object->get_property<culs::Interface::Properties::DoesSatelliteBasedPositioning>()),
38
39
          does_report_cell_and_wifi_ids(object->get_property<culs::Interface::Properties::DoesReportCellAndWifiIds>()),
39
40
          is_online(object->get_property<culs::Interface::Properties::IsOnline>()),
43
44
 
44
45
    dbus::Bus::Ptr bus;
45
46
    dbus::Object::Ptr object;
 
47
    std::shared_ptr<dbus::Property<culs::Interface::Properties::State>> state;
46
48
    std::shared_ptr<dbus::Property<culs::Interface::Properties::DoesSatelliteBasedPositioning>> does_satellite_based_positioning;
47
49
    std::shared_ptr<dbus::Property<culs::Interface::Properties::DoesReportCellAndWifiIds>> does_report_cell_and_wifi_ids;
48
50
    std::shared_ptr<dbus::Property<culs::Interface::Properties::IsOnline>> is_online;
74
76
    return culss::Interface::Ptr(new culss::Stub{d->bus, op.value()});
75
77
}
76
78
 
 
79
const core::Property<culs::State>& culs::Stub::state() const
 
80
{
 
81
    return *d->state;
 
82
}
 
83
 
77
84
core::Property<bool>& culs::Stub::does_satellite_based_positioning()
78
85
{
79
86
    return *d->does_satellite_based_positioning;