LibreOffice Module framework (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
framework::HandlerCFGAccess Class Referencefinal

implements configuration access for handler configuration @descr We use the ConfigItem mechanism to read/write values from/to configuration. More...

#include <protocolhandlercache.hxx>

Inheritance diagram for framework::HandlerCFGAccess:
[legend]
Collaboration diagram for framework::HandlerCFGAccess:
[legend]

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
 
ConfigItemoperator= (ConfigItem const &)=delete
 
ConfigItemoperator= (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 ()
 
ConfigurationBroadcasteroperator= (ConfigurationBroadcaster const &other)
 
virtual void BlockBroadcasts (bool bBlock)
 

Private Member Functions

virtual void ImplCommit () override
 

Private Attributes

HandlerCachem_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_BoolGetReadOnlyStates (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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ HandlerCFGAccess()

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.

Parameters
sPackagespecifies 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.

Member Function Documentation

◆ ImplCommit()

void framework::HandlerCFGAccess::ImplCommit ( )
overrideprivatevirtual

Implements utl::ConfigItem.

Definition at line 251 of file protocolhandlercache.cxx.

◆ Notify()

void framework::HandlerCFGAccess::Notify ( const css::uno::Sequence< OUString > &  lPropertyNames)
overridevirtual

Implements utl::ConfigItem.

Definition at line 241 of file protocolhandlercache.cxx.

References m_pCache, read(), and framework::HandlerCache::takeOver().

◆ read()

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.

Parameters
rHandlerHashlist of protocol handler infos
rPatternHashreverse 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().

◆ setCache()

void framework::HandlerCFGAccess::setCache ( HandlerCache pCache)
inline

Member Data Documentation

◆ m_pCache

HandlerCache* framework::HandlerCFGAccess::m_pCache
private

Definition at line 131 of file protocolhandlercache.hxx.

Referenced by Notify(), and setCache().


The documentation for this class was generated from the following files: