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

« back to all changes in this revision

Viewing changes to include/location_service/com/ubuntu/location/service/skeleton.h

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
    ~Skeleton() noexcept;
112
112
 
113
113
    // From com::ubuntu::location::service::Interface
 
114
    const core::Property<State>& state() const;
114
115
    core::Property<bool>& does_satellite_based_positioning();
115
116
    core::Property<bool>& does_report_cell_and_wifi_ids();
116
117
    core::Property<bool>& is_online();
117
118
    core::Property<std::map<SpaceVehicle::Key, SpaceVehicle>>& visible_space_vehicles();
118
119
 
 
120
protected:
 
121
    // Enable subclasses to alter the state.
 
122
    core::Property<State>& mutable_state();
119
123
private:
120
124
    // Handles incoming message calls for create_session_for_criteria.
121
125
    // Dispatches to the actual implementation, and manages object lifetimes.
131
135
    // Removes the session with the given path from the session store.
132
136
    void remove_from_session_store_for_path(const core::dbus::types::ObjectPath& path);
133
137
 
 
138
    // Called whenever the overall state of the service changes.
 
139
    void on_state_changed(State state);
134
140
    // Called whenever the value of the respective property changes.
135
141
    void on_does_satellite_based_positioning_changed(bool value);
136
142
    // Called whenever the value of the respective property changes.
154
160
    // DBus properties as exposed on the bus for com.ubuntu.location.service.Interface
155
161
    struct
156
162
    {
 
163
        std::shared_ptr< core::dbus::Property<Interface::Properties::State> > state;
157
164
        std::shared_ptr< core::dbus::Property<Interface::Properties::DoesSatelliteBasedPositioning> > does_satellite_based_positioning;
158
165
        std::shared_ptr< core::dbus::Property<Interface::Properties::DoesReportCellAndWifiIds> > does_report_cell_and_wifi_ids;
159
166
        std::shared_ptr< core::dbus::Property<Interface::Properties::IsOnline> > is_online;
162
169
    // We sign up to property changes here, to be able to report them to the bus
163
170
    struct
164
171
    {
 
172
        core::ScopedConnection state;
165
173
        core::ScopedConnection does_satellite_based_positioning;
166
174
        core::ScopedConnection does_report_cell_and_wifi_ids;
167
175
        core::ScopedConnection is_online;