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

« back to all changes in this revision

Viewing changes to include/location_service/com/ubuntu/location/provider_factory.h

  • Committer: Robert Bruce Park
  • Date: 2014-10-27 21:58:16 UTC
  • Revision ID: robert.park@canonical.com-20141027215816-in7gob4jmux6f80c
Releasing 2.1+14.10.20141023-0ubuntu1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
    static ProviderFactory& instance();
45
45
 
 
46
    // Makes the given factory functor known for the given name.
46
47
    void add_factory_for_name(const std::string& name, const Factory& factory);
47
48
 
 
49
    // Tries to lookup the factory for the given name, and create a provider instance
 
50
    // by calling the factory and passing it the given config. Please note that the name
 
51
    // can be decorated with @ for distinguishing providers of the same type but different configs.
 
52
    // Eg.:
 
53
    // --provider=remote::Provider@espoo --remote::Provider@espoo::name="com.ubuntu.espoo.service.Provider" --remote::Provider@espoo::path="/com/ubuntu/espoo/service/Provider"
 
54
    // --provider=remote::Provider@gps --remote::Provider@gps::name="com.ubuntu.android.gps.Provider" --remote::Provider@gps::path="/com/ubuntu/android/gps/Provider"
48
55
    Provider::Ptr create_provider_for_name_with_config(const std::string& name, const Configuration& config);
49
56
 
50
57
    void enumerate(const std::function<void(const std::string&, const Factory&)>& enumerator);