File Information
Library: OSP
Package: PreferencesService
Header: Poco/OSP/PreferencesService.h
Description
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".
Inheritance
Direct Base Classes: Service
All Base Classes: Service, Poco::RefCountedObject
Member Summary
Member Functions: configuration, isA, preferences, type
Inherited Functions: duplicate, isA, referenceCount, release, type
Types Aliases
ConstPtr
Ptr
using Ptr = Poco::AutoPtr < PreferencesService >;
Constructors
PreferencesService
PreferencesService(
const Poco::Path & persistencyDir,
Poco::Util::AbstractConfiguration * pGlobalConfig
);
Creates the PreferencesService, usign the given global configuration.
Destructor
~PreferencesService
Destroys the PreferencesService.
Member Functions
configuration
Configuration::Ptr configuration();
Returns the global application configuration.
isA
bool isA(
const std::type_info & otherType
) const;
See also: Poco::OSP::Service::isA()
preferences
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.
type
const std::type_info & type() const;
See also: Poco::OSP::Service::type()
Variables
SERVICE_NAME
static const std::string SERVICE_NAME;