Library: OSP
Package: PreferencesService
Header: Poco/OSP/PreferencesService.h
The PreferencesService provides an easy way for a bundle or service to retrieve and store configuration information. It also gives a bundle or service read-only access to the global application configuration.
The service name of the PreferencesService is "osp.core.preferences".
Direct Base Classes: Service
All Base Classes: Service, Poco::RefCountedObject
Member Functions: configuration, isA, preferences, type
Inherited Functions: duplicate, isA, referenceCount, release, type
typedef Poco::AutoPtr < PreferencesService > Ptr;
PreferencesService(
const Poco::Path & persistencyDir,
Poco::Util::AbstractConfiguration * pGlobalConfig
);
Creates the PreferencesService, usign the given global configuration.
Destroys the PreferencesService.
Configuration::Ptr configuration();
Returns the global application configuration.
bool isA(
const std::type_info & otherType
) const;
See also: Poco::OSP::Service::isA()
Preferences::Ptr preferences(
const std::string & bundleOrServiceID
);
Returns the preferences object for the given bundle or service. A bundle should specify its symbolic name as ID. A service should specify its service name.
const std::type_info & type() const;
See also: Poco::OSP::Service::type()
static const std::string SERVICE_NAME;