1
#include "com/ubuntu/location/provider.h"
2
#include "com/ubuntu/location/provider_factory.h"
6
namespace cul = com::ubuntu::location;
10
struct FactoryInjector
12
FactoryInjector(const std::string& name, const std::function<cul::Provider::Ptr(const cul::ProviderFactory::Configuration&)>& f)
14
com::ubuntu::location::ProviderFactory::instance().add_factory_for_name(name, f);
18
#if defined(COM_UBUNTU_LOCATION_SERVICE_PROVIDERS_GEOCLUE)
19
#include "com/ubuntu/location/providers/geoclue/provider.h"
20
static FactoryInjector geoclue_injector
23
com::ubuntu::location::providers::geoclue::Provider::create_instance
25
#endif // COM_UBUNTU_LOCATION_SERVICE_PROVIDERS_GEOCLUE
27
#if defined(COM_UBUNTU_LOCATION_SERVICE_PROVIDERS_GPS)
28
#include "com/ubuntu/location/providers/gps/provider.h"
29
static FactoryInjector gps_injector
32
com::ubuntu::location::providers::gps::Provider::create_instance
34
#endif // COM_UBUNTU_LOCATION_SERVICE_PROVIDERS_GPS
36
#if defined(COM_UBUNTU_LOCATION_SERVICE_PROVIDERS_SKYHOOK)
37
#include "com/ubuntu/location/providers/skyhook/provider.h"
38
static FactoryInjector skyhook_injector
41
com::ubuntu::location::providers::skyhook::Provider::create_instance
43
#endif // COM_UBUNTU_LOCATION_SERVICE_PROVIDERS_SKYHOOK