LibreOffice Module framework (master) 1
|
implements configuration access for handler configuration @descr We use the ConfigItem mechanism to read/write values from/to configuration. More...
#include <protocolhandlercache.hxx>
Public Member Functions | |
HandlerCFGAccess (const OUString &sPackage) | |
dtor of the config access class @descr It opens the configuration package automatically by using base class mechanism. More... | |
void | read (HandlerHash &rHandlerHash, PatternHash &rPatternHash) |
use base class mechanism to fill given structures @descr User use us as a wrapper between configuration api and his internal structures. More... | |
void | setCache (HandlerCache *pCache) |
virtual void | Notify (const css::uno::Sequence< OUString > &lPropertyNames) override |
Public Member Functions inherited from utl::ConfigItem | |
virtual | ~ConfigItem () override |
ConfigItem (ConfigItem const &)=default | |
ConfigItem (ConfigItem &&)=default | |
ConfigItem & | operator= (ConfigItem const &)=delete |
ConfigItem & | operator= (ConfigItem &&)=delete |
virtual void | Notify (const css::uno::Sequence< OUString > &aPropertyNames)=0 |
const OUString & | GetSubTreeName () const |
bool | IsModified () const |
void | Commit () |
ConfigItemMode | GetMode () const |
Public Member Functions inherited from utl::ConfigurationBroadcaster | |
void | AddListener (utl::ConfigurationListener *pListener) |
void | RemoveListener (utl::ConfigurationListener const *pListener) |
void | NotifyListeners (ConfigurationHints nHint) |
ConfigurationBroadcaster () | |
ConfigurationBroadcaster (ConfigurationBroadcaster const &) | |
virtual | ~ConfigurationBroadcaster () |
ConfigurationBroadcaster & | operator= (ConfigurationBroadcaster const &other) |
virtual void | BlockBroadcasts (bool bBlock) |
Private Member Functions | |
virtual void | ImplCommit () override |
Private Attributes | |
HandlerCache * | m_pCache |
Additional Inherited Members | |
Static Public Member Functions inherited from utl::ConfigItem | |
static css::uno::Sequence< OUString > | GetNodeNames (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, ConfigNameFormat eFormat) |
static css::uno::Sequence< css::uno::Any > | GetProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, bool bAllLocales) |
static bool | PutProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues, bool bAllLocales) |
static bool | ClearNodeSet (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode) |
static bool | ReplaceSetProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues, bool bAllLocales) |
static bool | SetSetProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues) |
Protected Member Functions inherited from utl::ConfigItem | |
ConfigItem (OUString aSubTree, ConfigItemMode nMode=ConfigItemMode::NONE) | |
void | SetModified () |
void | ClearModified () |
css::uno::Sequence< css::uno::Any > | GetProperties (const css::uno::Sequence< OUString > &rNames) |
css::uno::Sequence< sal_Bool > | GetReadOnlyStates (const css::uno::Sequence< OUString > &rNames) |
bool | PutProperties (const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues) |
bool | EnableNotification (const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false) |
void | DisableNotification () |
css::uno::Sequence< OUString > | GetNodeNames (const OUString &rNode) |
css::uno::Sequence< OUString > | GetNodeNames (const OUString &rNode, ConfigNameFormat eFormat) |
bool | ClearNodeSet (const OUString &rNode) |
bool | ClearNodeElements (const OUString &rNode, css::uno::Sequence< OUString > const &rElements) |
bool | SetSetProperties (const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues) |
bool | ReplaceSetProperties (const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues) |
bool | AddNode (const OUString &rNode, const OUString &rNewNode) |
implements configuration access for handler configuration @descr We use the ConfigItem mechanism to read/write values from/to configuration.
We set a data container pointer for filling or reading ... this class use it temp. After successfully calling of read(), we can use filled container directly or merge it with an existing one. After successfully calling of write() all values of given data container are flushed to our configuration - but current implementation doesn't support writing really.
@base utl::ConfigItem base mechanism for configuration access
@devstatus ready to use @threadsafe no
Definition at line 128 of file protocolhandlercache.hxx.
framework::HandlerCFGAccess::HandlerCFGAccess | ( | const OUString & | sPackage | ) |
dtor of the config access class @descr It opens the configuration package automatically by using base class mechanism.
After that "read()" method of this class should be called to use it.
sPackage | specifies the package name of the configuration data which should be used |
Definition at line 169 of file protocolhandlercache.cxx.
References utl::ConfigItem::EnableNotification(), m_pCache, and SETNAME_HANDLER.
|
overrideprivatevirtual |
Implements utl::ConfigItem.
Definition at line 251 of file protocolhandlercache.cxx.
|
overridevirtual |
Implements utl::ConfigItem.
Definition at line 241 of file protocolhandlercache.cxx.
References m_pCache, read(), and framework::HandlerCache::takeOver().
void framework::HandlerCFGAccess::read | ( | HandlerHash & | rHandlerHash, |
PatternHash & | rPatternHash | ||
) |
use base class mechanism to fill given structures @descr User use us as a wrapper between configuration api and his internal structures.
He give us some pointer to his member and we fill it.
rHandlerHash | list of protocol handler infos |
rPatternHash | reverse map of handler pattern to her uno names |
Definition at line 188 of file protocolhandlercache.cxx.
References CFG_PATH_SEPARATOR, framework::Converter::convert_seqOUString2OUStringList(), utl::ConfigItem::GetNodeNames(), utl::ConfigItem::GetProperties(), framework::ProtocolHandler::m_lProtocols, framework::ProtocolHandler::m_sUNOName, PROPERTY_PROTOCOLS, SAL_WARN_IF, and SETNAME_HANDLER.
Referenced by framework::HandlerCache::HandlerCache(), and Notify().
|
inline |
Definition at line 140 of file protocolhandlercache.hxx.
References m_pCache.
Referenced by framework::HandlerCache::HandlerCache(), and framework::HandlerCache::~HandlerCache().
|
private |
Definition at line 131 of file protocolhandlercache.hxx.
Referenced by Notify(), and setCache().