provider_selection_policy.h
Go to the documentation of this file.
/*
* Copyright © 2012-2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Authored by: Thomas Voß <thomas.voss@canonical.com>
*/
#ifndef LOCATION_SERVICE_COM_LOMIRI_PROVIDER_SELECTION_POLICY_H_
#define LOCATION_SERVICE_COM_LOMIRI_PROVIDER_SELECTION_POLICY_H_
#include <com/lomiri/location/provider_enumerator.h>
#include <com/lomiri/location/provider_selection.h>
#include <memory>
namespace com
{
namespace lomiri
{
namespace location
{
struct Criteria;
class Engine;
class ProviderSelectionPolicy
{
public:
typedef std::shared_ptr<ProviderSelectionPolicy> Ptr;
static const Provider::Ptr& null_provider();
ProviderSelectionPolicy(const ProviderSelectionPolicy&) = delete;
ProviderSelectionPolicy& operator=(const ProviderSelectionPolicy&) = delete;
virtual ~ProviderSelectionPolicy() = default;
virtual ProviderSelection determine_provider_selection_for_criteria(
const Criteria& criteria,
const ProviderEnumerator& enumerator) = 0;
protected:
ProviderSelectionPolicy() = default;
};
}
}
}
#endif // LOCATION_SERVICE_COM_LOMIRI_PROVIDER_SELECTION_POLICY_H_
com::lomiri::location::ProviderEnumerator
Definition provider_enumerator.h:32
com::lomiri::location::ProviderSelectionPolicy::null_provider
static const Provider::Ptr & null_provider()
com::lomiri::location::ProviderSelectionPolicy::~ProviderSelectionPolicy
virtual ~ProviderSelectionPolicy()=default
com::lomiri::location::ProviderSelectionPolicy::Ptr
std::shared_ptr< ProviderSelectionPolicy > Ptr
Definition provider_selection_policy.h:38
com::lomiri::location::ProviderSelectionPolicy::determine_provider_selection_for_criteria
virtual ProviderSelection determine_provider_selection_for_criteria(const Criteria &criteria, const ProviderEnumerator &enumerator)=0
com::lomiri::location::ProviderSelectionPolicy::operator=
ProviderSelectionPolicy & operator=(const ProviderSelectionPolicy &)=delete
com::lomiri::location::ProviderSelectionPolicy::ProviderSelectionPolicy
ProviderSelectionPolicy(const ProviderSelectionPolicy &)=delete
com::lomiri::location::ProviderSelectionPolicy::ProviderSelectionPolicy
ProviderSelectionPolicy()=default
com::lomiri::location::Provider::Ptr
std::shared_ptr< Provider > Ptr
Definition provider.h:48
com::lomiri::location
Definition accuracy.h:28
com::lomiri
Definition accuracy.h:26
com
Definition accuracy.h:24
provider_enumerator.h
provider_selection.h
com::lomiri::location::Criteria
Summarizes criteria of a client session with respect to functionality and accuracy for position,...
Definition criteria.h:35
com::lomiri::location::ProviderSelection
Definition provider_selection.h:32