lomiri-location-service ..
An aggregating location service providing positioning and geocoding capabilities to applications.
service/session/interface.h
Go to the documentation of this file.
1/*
2 * Copyright © 2012-2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Thomas Voß <thomas.voss@canonical.com>
17 */
18#ifndef LOCATION_SERVICE_COM_LOMIRI_LOCATION_SERVICE_SESSION_INTERFACE_H_
19#define LOCATION_SERVICE_COM_LOMIRI_LOCATION_SERVICE_SESSION_INTERFACE_H_
20
26
27#include <core/property.h>
28
29namespace com
30{
31namespace lomiri
32{
33namespace location
34{
35namespace service
36{
37namespace session
38{
43{
44public:
45 struct UpdatePosition;
46 struct UpdateVelocity;
47 struct UpdateHeading;
48
49 struct StartPositionUpdates;
50 struct StopPositionUpdates;
51
52 struct StartVelocityUpdates;
53 struct StopVelocityUpdates;
54
55 struct StartHeadingUpdates;
56 struct StopHeadingUpdates;
57
58 struct Errors
59 {
60 struct ErrorParsingUpdate;
61 struct ErrorStartingUpdate;
62 };
66 struct Updates
67 {
71 enum class Status
72 {
73 enabled,
75 };
76
80 core::Property<Update<Position>> position{};
84 core::Property<Status> position_status{Status::disabled};
85
89 core::Property<Update<Heading>> heading{};
93 core::Property<Status> heading_status{Status::disabled};
94
98 core::Property<Update<Velocity>> velocity{};
102 core::Property<Status> velocity_status{Status::disabled};
103 };
104
105 typedef std::shared_ptr<Interface> Ptr;
106
107 Interface(const Interface&) = delete;
108 virtual ~Interface() noexcept;
109 Interface& operator=(const Interface&) = delete;
110
115 virtual Updates& updates();
116
117protected:
119
120private:
121 struct Private;
122 std::shared_ptr<Private> d;
123};
124}
125}
126}
127}
128}
129
130#endif // LOCATION_SERVICE_COM_LOMIRI_LOCATION_SERVICE_SESSION_INTERFACE_H_
Models a session with the location service.
virtual Updates & updates()
Provides access to the updates delivered for this session.
Definition accuracy.h:24
Encapsulates updates provided for this session, and the ability to enable/disable updates.
core::Property< Status > velocity_status
Status of velocity updates, mutable.
Status
The Status enum models the possible states of updates.
@ disabled
Updates are disabled and not delivered to this session.
@ enabled
Updates are enabled and delivered to this session.
core::Property< Status > heading_status
Status of position updates, mutable.
core::Property< Update< Velocity > > velocity
Updates for velocity measurements.
core::Property< Status > position_status
Status of position updates, mutable.
core::Property< Update< Heading > > heading
Updates for the heading measurements.
core::Property< Update< Position > > position
Updates for position measurements.