lomiri-location-service ..
An aggregating location service providing positioning and geocoding capabilities to applications.
fusion_provider.h
Go to the documentation of this file.
1/*
2 * Copyright © 2016 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: Scott Sweeny <scott.sweeny@canonical.com
17 */
18#ifndef LOCATION_SERVICE_COM_LOMIRI_LOCATION_FUSION_PROVIDER_H
19#define LOCATION_SERVICE_COM_LOMIRI_LOCATION_FUSION_PROVIDER_H
20
24
25#include <vector>
26
27namespace com
28{
29namespace lomiri
30{
31namespace location
32{
34{
35public:
36 typedef std::shared_ptr<FusionProvider> Ptr;
37
38 FusionProvider(const std::set<Provider::Ptr>& providers, const UpdateSelector::Ptr& update_selector);
39
40 bool matches_criteria(const Criteria &criteria) override;
45 void start_position_updates() override;
46 void stop_position_updates() override;
47 void start_heading_updates() override;
48 void stop_heading_updates() override;
49 void start_velocity_updates() override;
50 void stop_velocity_updates() override;
51
52private:
54 std::set<Provider::Ptr> providers;
55 std::vector<core::ScopedConnection> connections;
56};
57}
58}
59}
60
61#endif // LOCATION_SERVICE_COM_LOMIRI_LOCATION_FUSION_PROVIDER_H
void start_position_updates() override
Implementation-specific, empty by default.
void on_reference_heading_updated(const Update< Heading > &heading) override
Called by the engine whenever the reference heading changed.
void on_wifi_and_cell_reporting_state_changed(location::WifiAndCellIdReportingState state) override
Called by the engine whenever the wifi and cell ID reporting state changes.
bool matches_criteria(const Criteria &criteria) override
Checks if a provider satisfies a set of accuracy criteria.
FusionProvider(const std::set< Provider::Ptr > &providers, const UpdateSelector::Ptr &update_selector)
void start_heading_updates() override
Implementation-specific, empty by default.
void stop_velocity_updates() override
Implementation-specific, empty by default.
std::shared_ptr< FusionProvider > Ptr
void on_reference_location_updated(const Update< Position > &position) override
Called by the engine whenever the reference location changed.
void on_reference_velocity_updated(const Update< Velocity > &velocity) override
Called by the engine whenever the reference velocity changed.
void start_velocity_updates() override
Implementation-specific, empty by default.
void stop_heading_updates() override
Implementation-specific, empty by default.
void stop_position_updates() override
Implementation-specific, empty by default.
The Provider class is the abstract base of all positioning providers.
Definition provider.h:46
@ position
The provider features position updates.
@ velocity
The provider features velocity updates.
@ heading
The provider features heading updates.
std::shared_ptr< UpdateSelector > Ptr
boost::optional< T > Optional
Definition optional.h:31
Definition accuracy.h:24
Summarizes criteria of a client session with respect to functionality and accuracy for position,...
Definition criteria.h:35
Templated class that wraps a value and timestamp.
Definition update.h:37