diff options
author | Jörg Barfurth <jb@openoffice.org> | 2000-12-04 08:25:10 +0000 |
---|---|---|
committer | Jörg Barfurth <jb@openoffice.org> | 2000-12-04 08:25:10 +0000 |
commit | 8e7db6e157df5b46d69a8fa902e96bd026898d25 (patch) | |
tree | af6d4aeee9fbef8f2932c00506276874ba6cd4f8 /configmgr | |
parent | 6c0bb48a40688b3c25a511567c97d004ddbd5276 (diff) |
#80460# Cleanup event dispatch classes, support context options in external interface, split off actual broadcasting (per-options)
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/api/confeventhelpers.cxx | 8 | ||||
-rw-r--r-- | configmgr/source/api/confeventhelpers.hxx | 18 | ||||
-rw-r--r-- | configmgr/source/api/confevents.cxx | 315 | ||||
-rw-r--r-- | configmgr/source/inc/confevents.hxx | 122 |
4 files changed, 74 insertions, 389 deletions
diff --git a/configmgr/source/api/confeventhelpers.cxx b/configmgr/source/api/confeventhelpers.cxx index ef2ea4ee13a3..8c81d7c864b6 100644 --- a/configmgr/source/api/confeventhelpers.cxx +++ b/configmgr/source/api/confeventhelpers.cxx @@ -2,9 +2,9 @@ * * $RCSfile: confeventhelpers.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:13:40 $ + * last change: $Author: jb $ $Date: 2000-12-04 09:25:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -431,7 +431,7 @@ void ConfigChangesBroadcasterImpl::disposing(IConfigBroadcaster* pSource) }; */ ///////////////////////////////////////////////////////////////////////// -void ConfigMessageBroadcasterImpl::add(IMessageHandler* pListener) +/*void ConfigMessageBroadcasterImpl::add(IMessageHandler* pListener) { osl::MutexGuard aGuard(m_aListeners.mutex); @@ -475,7 +475,7 @@ void ConfigMessageBroadcasterImpl::disposing(IConfigBroadcaster* pSource) m_aListeners.disposing(pSource); } - +*/ ///////////////////////////////////////////////////////////////////////// } // namespace } // namespace diff --git a/configmgr/source/api/confeventhelpers.hxx b/configmgr/source/api/confeventhelpers.hxx index 1b3b45898377..6d535bf9a65d 100644 --- a/configmgr/source/api/confeventhelpers.hxx +++ b/configmgr/source/api/confeventhelpers.hxx @@ -2,9 +2,9 @@ * * $RCSfile: confeventhelpers.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:13:40 $ + * last change: $Author: jb $ $Date: 2000-12-04 09:25:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -226,20 +226,6 @@ namespace configmgr }; ///////////////////////////////////////////////////////////////////////// - class ConfigMessageBroadcasterImpl - { - public: - void add(IMessageHandler* pListener); - void remove(IMessageHandler* pListener); - - void dispatch(OUString const& _rNotifyReason, sal_Int32 _nNotificationId, IConfigBroadcaster* pSource); - void disposing(IConfigBroadcaster* pSource); - private: - typedef BroadcastImplHelper<IMessageHandler*> Listeners; - Listeners m_aListeners; - }; - - ///////////////////////////////////////////////////////////////////////// } // namespace } // namespace diff --git a/configmgr/source/api/confevents.cxx b/configmgr/source/api/confevents.cxx index 19dd9d8e4a7c..89b1df85598b 100644 --- a/configmgr/source/api/confevents.cxx +++ b/configmgr/source/api/confevents.cxx @@ -2,9 +2,9 @@ * * $RCSfile: confevents.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:13:40 $ + * last change: $Author: jb $ $Date: 2000-12-04 09:25:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,339 +70,128 @@ #endif namespace configmgr { - // class is still abstract, ITreeListener methods are still unimplemented - TreeListenerImpl::TreeListenerImpl(ITreeNotifier* aSource) - : mySource(aSource) - { - if (mySource) mySource->setListener(this); - } - TreeListenerImpl::~TreeListenerImpl() - { - if (mySource) mySource->setListener(0); - } - - void TreeListenerImpl::disposing(ITreeNotifier* pSource) - { - OSL_ASSERT(pSource && pSource == mySource); - if (pSource == mySource) - mySource = 0; - } - - ITreeNotifier* TreeListenerImpl::rebind(ITreeNotifier* aSource) - { - ITreeNotifier* aOldSource = mySource; - if (aSource != aOldSource) - { - if (mySource) mySource->setListener(0); - mySource = aSource; - if (mySource) mySource->setListener(this); - } - return aOldSource; - } - ///////////////////////////////////////////////////////////////////////// using internal::ConfigChangesBroadcasterImpl; - using internal::ConfigMessageBroadcasterImpl; ///////////////////////////////////////////////////////////////////////// - class ConfigChangeBroadcaster::Impl + class ConfigChangeBroadcastHelper // broadcasts changes for a given set of options { + ConfigChangesBroadcasterImpl m_changes; public: - Impl() : m_changes(), m_messages() {} + ConfigChangeBroadcastHelper(); + ~ConfigChangeBroadcastHelper(); - ConfigChangesBroadcasterImpl m_changes; - ConfigMessageBroadcasterImpl m_messages; - }; + void broadcast(TreeChangeList const& anUpdate, sal_Bool bError, IConfigBroadcaster* pSource); - ///////////////////////////////////////////////////////////////////////// - ConfigChangeBroadcaster::ConfigChangeBroadcaster(ITreeNotifier* aSource) - : TreeListenerImpl(aSource) - , pImpl(new Impl()) - { - } + public: + // IConfigBroadcaster implementation helper + void addListener(OUString const& aName, INodeListener* ); + void removeListener(INodeListener*); - ConfigChangeBroadcaster::~ConfigChangeBroadcaster() - { - dispose(); - } + void removeNode(OUString const& aPath, bool bRemovedFromModel, IConfigBroadcaster* pSource); + + void dispose(IConfigBroadcaster* pSource); + }; ///////////////////////////////////////////////////////////////////////// - void ConfigChangeBroadcaster::dispose() + ConfigChangeBroadcaster::ConfigChangeBroadcaster() { - unbind(); - - if (!pImpl) return; - pImpl->m_changes.disposing(this); - pImpl->m_messages.disposing(this); - delete pImpl, pImpl = 0; } - ///////////////////////////////////////////////////////////////////////// - // IConfigBroadcaster implementation - void ConfigChangeBroadcaster::addListener(OUString const& aName, INodeListener* pHandler) - { pImpl->m_changes.add(aName, pHandler); } - - void ConfigChangeBroadcaster::removeListener(INodeListener* pHandler) - { pImpl->m_changes.remove(pHandler); } - - void ConfigChangeBroadcaster::removeNode(OUString const& aPath, bool bRemovedFromModel) - { pImpl->m_changes.removed(aPath,bRemovedFromModel,this); } - - void ConfigChangeBroadcaster::addHandler(IMessageHandler* pHandler) - { pImpl->m_messages.add(pHandler); } - - void ConfigChangeBroadcaster::removeHandler(IMessageHandler* pHandler) - { pImpl->m_messages.remove(pHandler); } - - ///////////////////////////////////////////////////////////////////////// - void ConfigChangeBroadcaster::broadcast(TreeChangeList const& anUpdate, sal_Bool bError) + ConfigChangeBroadcaster::~ConfigChangeBroadcaster() { - pImpl->m_changes.dispatch(anUpdate, bError, this); } ///////////////////////////////////////////////////////////////////////// - // ITreeListener implementation - void ConfigChangeBroadcaster::changes(TreeChangeList const& rList_, sal_Bool bError_) + ConfigChangeBroadcastHelper::ConfigChangeBroadcastHelper() + : m_changes() { - broadcast(rList_, bError_);; } - void ConfigChangeBroadcaster::changes(sal_Int32 _nNotificationId,const OUString& _rNotifyReason) + ConfigChangeBroadcastHelper::~ConfigChangeBroadcastHelper() { - pImpl->m_messages.dispatch(_rNotifyReason, _nNotificationId, this); } ///////////////////////////////////////////////////////////////////////// - class ConfigChangeMultiplexer::Impl + void ConfigChangeBroadcastHelper::dispose(IConfigBroadcaster* pSource) { - public: - - Impl(OUString const& sBasePath_) : sBasePath(sBasePath_), m_changes(), m_messages() {} - - OUString const sBasePath; - ConfigChangesBroadcasterImpl m_changes; - ConfigMessageBroadcasterImpl m_messages; - }; - - ///////////////////////////////////////////////////////////////////////// - ConfigChangeMultiplexer::ConfigChangeMultiplexer(IConfigBroadcaster* pSource) - : m_pSource(pSource) - , pImpl(0) - { - if (m_pSource) m_pSource->addHandler(this); - } - - ConfigChangeMultiplexer::ConfigChangeMultiplexer(OUString const& aBasePath, IConfigBroadcaster* pSource) - : m_pSource(pSource) - , pImpl(0) - { - bind(aBasePath,pSource); + m_changes.disposing(pSource); } - ConfigChangeMultiplexer::~ConfigChangeMultiplexer() - { - dispose(); - } ///////////////////////////////////////////////////////////////////////// - void ConfigChangeMultiplexer::bind(OUString const& sNewPath, IConfigBroadcaster* pSource) + // IConfigBroadcaster implementation + void ConfigChangeBroadcaster::addListener(OUString const& aName, const vos::ORef < OOptions >& _xOptions, INodeListener* pHandler) { - if (pImpl) + if (ConfigChangeBroadcastHelper* pHelper = getBroadcastHelper(_xOptions,true)) { - OSL_ASSERT(sNewPath == pImpl->sBasePath); - rebind(pSource); + pHelper->addListener(aName, pHandler); } else - { - pImpl = new Impl(sNewPath); - if (pSource) - m_pSource = pSource; - m_pSource->addListener(pImpl->sBasePath, this); - m_pSource->addHandler(this); - } + OSL_ASSERT(false); } - ///////////////////////////////////////////////////////////////////////// - void ConfigChangeMultiplexer::rebind(IConfigBroadcaster* pSource) - { - if (pSource != m_pSource) - { - unbind(); - m_pSource = pSource; - if (m_pSource) - { - if (pImpl) m_pSource->addListener(pImpl->sBasePath, this); - m_pSource->addHandler(this); - } - } - } - ///////////////////////////////////////////////////////////////////////// - void ConfigChangeMultiplexer::unbind() + void ConfigChangeBroadcaster::removeListener(const vos::ORef < OOptions >& _xOptions, INodeListener* pHandler) { - if (m_pSource) + if (ConfigChangeBroadcastHelper* pHelper = getBroadcastHelper(_xOptions,false)) { - if (pImpl) m_pSource->removeListener(this); - m_pSource->removeHandler(this); + pHelper->removeListener( pHandler); } - m_pSource = 0; } - ///////////////////////////////////////////////////////////////////////// - bool ConfigChangeMultiplexer::normalizePath(OUString& aName) + void ConfigChangeBroadcaster::removeNode(OUString const& aPath, const vos::ORef < OOptions >& _xOptions, bool bRemovedFromModel) { - if (!pImpl) return false; - - ConfigurationName aMyPath(pImpl->sBasePath); - ConfigurationName aPath(aName); - if (aPath.isRelative()) - { - aName = aMyPath.composeWith(aPath).fullName(); - return true; - } - else + if (ConfigChangeBroadcastHelper* pHelper = getBroadcastHelper(_xOptions,false)) { - bool ok = (aMyPath == aPath) || aPath.isNestedIn(aMyPath); - - return ok; + pHelper->removeNode(aPath, bRemovedFromModel, this); } } ///////////////////////////////////////////////////////////////////////// - void ConfigChangeMultiplexer::broadcast(Change const& anUpdate, OUString const& aRelativePath, sal_Bool bError) + void ConfigChangeBroadcaster::fireChanges(TreeChangeList const& rList_, sal_Bool bError_) { - OSL_ENSURE(pImpl!=0, "Trying to broadcast on disconnected Notification Multiplexer"); - - OUString aContext( aRelativePath ); - if (!normalizePath(aContext)) - OSL_TRACE("Invalid path. Multiplexer may not walk subtrees correctly\n\r"); - - if (pImpl) + if (ConfigChangeBroadcastHelper* pHelper = getBroadcastHelper(rList_.m_xOptions,false)) { - pImpl->m_changes.dispatch(anUpdate, aContext, bError, this); + pHelper->broadcast(rList_, bError_, this); } } - void ConfigChangeMultiplexer::broadcast(Change const& anUpdate) - { - // do we need to append the local name ?? - if (pImpl) - pImpl->m_changes.dispatch(anUpdate, pImpl->sBasePath, false, this); - } - ///////////////////////////////////////////////////////////////////////// - void ConfigChangeMultiplexer::dispose() - { - unbind(); - - if (!pImpl) return; - pImpl->m_changes.disposing(this); - pImpl->m_messages.disposing(this); - delete pImpl, pImpl = 0; - } - - // IConfigListener implementation ///////////////////////////////////////////////////////////////////////// - void ConfigChangeMultiplexer::disposing(IConfigBroadcaster* pSource) + ConfigChangeBroadcastHelper* ConfigChangeBroadcaster::newBroadcastHelper() { - OSL_ASSERT(pSource == m_pSource); - if (pSource == m_pSource) - unbind(); + return new ConfigChangeBroadcastHelper(); } - - // INodeListener implementation ///////////////////////////////////////////////////////////////////////// - void ConfigChangeMultiplexer::nodeChanged(Change const& aChange, OUString const& aPath, IConfigBroadcaster* pSource) - { - OSL_ASSERT(pImpl != 0); - OSL_VERIFY(pSource == m_pSource); - broadcast(aChange, aPath); - } - void ConfigChangeMultiplexer::nodeDeleted(OUString const& aPath, IConfigBroadcaster* pSource) + void ConfigChangeBroadcaster::disposeBroadcastHelper(ConfigChangeBroadcastHelper* pHelper) { - OSL_ASSERT(pImpl != 0); - - if (pImpl) + if (pHelper) { - OUString aContext( aPath ); - - // must be this base path or a child of it - OSL_ASSERT(!ConfigurationName(aPath).isRelative() || aPath.getLength() == 0); - OSL_ASSERT(aPath.getLength() == 0 || - pImpl->sBasePath == aPath || - ConfigurationName(pImpl->sBasePath).isNestedIn(aPath)); - pImpl->m_changes.removed(aContext,true,this); + pHelper->dispose(this); + delete pHelper; } } - - // IMessageHandler implementation - ///////////////////////////////////////////////////////////////////////// - void ConfigChangeMultiplexer::message(const OUString& rNotifyReason, sal_Int32 nNotificationId, IConfigBroadcaster* pSource) - { - OSL_VERIFY(pSource == m_pSource); - if (pImpl) - pImpl->m_messages.dispatch(rNotifyReason, nNotificationId, this); - } - - ///////////////////////////////////////////////////////////////////////// - // IConfigBroadcaster implementation - - void ConfigChangeMultiplexer::addListener(OUString const& aName, INodeListener* pHandler) - { pImpl->m_changes.add(aName, pHandler); } - - void ConfigChangeMultiplexer::removeListener(INodeListener* pHandler) - { pImpl->m_changes.remove(pHandler); } - - void ConfigChangeMultiplexer::removeNode(OUString const& aPath, bool bRemovedFromModel) - { pImpl->m_changes.removed(aPath,bRemovedFromModel,this); } - - void ConfigChangeMultiplexer::addHandler(IMessageHandler* pHandler) - { pImpl->m_messages.add(pHandler); } - - void ConfigChangeMultiplexer::removeHandler(IMessageHandler* pHandler) - { pImpl->m_messages.remove(pHandler); } - ///////////////////////////////////////////////////////////////////////// - // ScreenedChangeMultiplexer - ScreenedChangeMultiplexer:: ScreenedChangeMultiplexer(IConfigBroadcaster* aSource) - : ConfigChangeMultiplexer() - , m_pScreeningChanges(0) - { - } - - ScreenedChangeMultiplexer:: ScreenedChangeMultiplexer(TreeChangeList& aScreeningTree, IConfigBroadcaster* aSource) - : ConfigChangeMultiplexer(aScreeningTree.pathToRoot, aSource) - , m_pScreeningChanges(&aScreeningTree.root) + // IConfigBroadcaster implementation help + void ConfigChangeBroadcastHelper::addListener(OUString const& aName, INodeListener* pHandler) { + m_changes.add(aName, pHandler); } - ScreenedChangeMultiplexer:: ScreenedChangeMultiplexer(ScreeningChange* aScreening, OUString const& aBasePath, IConfigBroadcaster* aSource) - : ConfigChangeMultiplexer(aBasePath, aSource) - , m_pScreeningChanges(aScreening) + void ConfigChangeBroadcastHelper::removeListener(INodeListener* pHandler) { + m_changes.remove(pHandler); } - void ScreenedChangeMultiplexer:: bind(TreeChangeList& aScreeningTree, IConfigBroadcaster* aSource) + void ConfigChangeBroadcastHelper::removeNode(OUString const& aPath, bool bRemovedFromModel, IConfigBroadcaster* pSource) { - bind(&aScreeningTree.root, aScreeningTree.pathToRoot, aSource); + m_changes.removed(aPath, bRemovedFromModel,pSource); } - void ScreenedChangeMultiplexer:: bind(ScreeningChange* aScreening, OUString const& aBasePath, IConfigBroadcaster* aSource) - { - unbind(); - m_pScreeningChanges = aScreening; - ConfigChangeMultiplexer::bind(aBasePath, aSource); - } - - void ScreenedChangeMultiplexer:: nodeChanged(Change const& aChange, OUString const& aPath, IConfigBroadcaster* pSource) + ///////////////////////////////////////////////////////////////////////// + void ConfigChangeBroadcastHelper::broadcast(TreeChangeList const& anUpdate, sal_Bool bError, IConfigBroadcaster* pSource) { - // To do: filter with local changes herehere - if (&aChange != m_pScreeningChanges) - ConfigChangeMultiplexer::nodeChanged(aChange,aPath,pSource); + m_changes.dispatch(anUpdate, bError, pSource); } - void ScreenedChangeMultiplexer:: nodeDeleted(OUString const& aPath, IConfigBroadcaster* pSource) - { - // To do: filter here - ConfigChangeMultiplexer::nodeDeleted(aPath,pSource); - } } // namespace diff --git a/configmgr/source/inc/confevents.hxx b/configmgr/source/inc/confevents.hxx index 44deb33fd0b3..7a5902070e0f 100644 --- a/configmgr/source/inc/confevents.hxx +++ b/configmgr/source/inc/confevents.hxx @@ -2,9 +2,9 @@ * * $RCSfile: confevents.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:13:40 $ + * last change: $Author: jb $ $Date: 2000-12-04 09:25:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,29 +63,13 @@ #define CONFIGMGR_API_EVENTS_HXX_ #include "cmtreemodel.hxx" + namespace rtl { class OUString; } namespace configmgr { using ::rtl::OUString; - // class is still abstract, ITreeListener methods are still unimplemented - class TreeListenerImpl : private ITreeListener - { - ITreeNotifier* mySource; - public: - explicit TreeListenerImpl(ITreeNotifier* aSource = 0); - virtual ~TreeListenerImpl(); - - ITreeNotifier* rebind(ITreeNotifier* aSource); - ITreeNotifier* unbind() { return rebind(0); } - protected: - virtual void disposing(ITreeNotifier* pSource); - private: - TreeListenerImpl(TreeListenerImpl&); - void operator=(TreeListenerImpl&); - }; - struct IConfigBroadcaster; struct IConfigListener { @@ -96,10 +80,6 @@ namespace configmgr virtual void nodeChanged(Change const& aChange, OUString const& aPath, IConfigBroadcaster* pSource) = 0; virtual void nodeDeleted(OUString const& aPath, IConfigBroadcaster* pSource) = 0; }; - struct IMessageHandler: IConfigListener - { - virtual void message(const OUString& rNotifyReason, sal_Int32 nNotificationId, IConfigBroadcaster* pSource) = 0; - }; struct IConfigBroadcaster { @@ -107,102 +87,32 @@ namespace configmgr IConfigBroadcaster() {} ~IConfigBroadcaster() {} public: - virtual void addListener(OUString const& aName, INodeListener* pListener) = 0; - virtual void removeListener(INodeListener* pListener) = 0; + virtual void addListener(OUString const& aName, const vos::ORef < OOptions >& _xOptions, INodeListener* pListener) = 0; + virtual void removeListener(const vos::ORef < OOptions >& _xOptions, INodeListener* pListener) = 0; - virtual void removeNode(OUString const& aPath, bool bRemovedFromModel = false) = 0; - - virtual void addHandler(IMessageHandler* pHandler) = 0; - virtual void removeHandler(IMessageHandler* pHandler) = 0; + virtual void removeNode(OUString const& aPath, const vos::ORef < OOptions >& _xOptions, bool bRemovedFromModel = false) = 0; }; - class ConfigChangeBroadcaster : public TreeListenerImpl, public IConfigBroadcaster + class ConfigChangeBroadcastHelper; // broadcasts changes for a given set of options + class ConfigChangeBroadcaster : public IConfigBroadcaster { - class Impl; - Impl* pImpl; public: - ConfigChangeBroadcaster(ITreeNotifier* aSource = 0); + ConfigChangeBroadcaster(); virtual ~ConfigChangeBroadcaster(); - void rebind(ITreeNotifier* aSource); - - void broadcast(TreeChangeList const& anUpdate, sal_Bool bError = false); - - public: - // IConfigBroadcaster implementation - void addListener(OUString const& aName, INodeListener* ); - void removeListener(INodeListener*); - - void removeNode(OUString const& aPath, bool bRemovedFromModel = false); + virtual void addListener(OUString const& aName, const vos::ORef < OOptions >& _xOptions, INodeListener* pListener); + virtual void removeListener(const vos::ORef < OOptions >& _xOptions, INodeListener* pListener); - void addHandler(IMessageHandler* ); - void removeHandler(IMessageHandler* ); + virtual void removeNode(OUString const& aPath, const vos::ORef < OOptions >& _xOptions, bool bRemovedFromModel = false); - void dispose(); protected: - // ITreeListener implementation - virtual void changes(TreeChangeList const& , sal_Bool _bError); - virtual void changes(sal_Int32 _nNotificationId,const ::rtl::OUString& _rNotifyReason); - }; - - class ConfigChangeMultiplexer : public IConfigBroadcaster, private INodeListener, private IMessageHandler - { - class Impl; - Impl* pImpl; - IConfigBroadcaster* m_pSource; - public: - ConfigChangeMultiplexer(IConfigBroadcaster* aSource = 0); - ConfigChangeMultiplexer(OUString const& aBasePath, IConfigBroadcaster* aSource); - virtual ~ConfigChangeMultiplexer(); - - void bind(OUString const& aBasePath, IConfigBroadcaster* aSource = 0); - void rebind(IConfigBroadcaster* aSource); - void unbind(); - - void broadcast(Change const& anUpdate, OUString const& aRelativePath, sal_Bool bError = false); - void broadcast(Change const& anUpdate); - - public: - // IConfigBroadcaster implementation - void addListener(OUString const& aName, INodeListener* ); - void removeListener(INodeListener*); - - void removeNode(OUString const& aPath, bool bRemovedFromModel = false); - - void addHandler(IMessageHandler* ); - void removeHandler(IMessageHandler* ); - - void dispose(); + virtual void fireChanges(TreeChangeList const& _aChanges, sal_Bool _bError); protected: - bool normalizePath(OUString& aPath); - - // IConfigListener implementation - virtual void disposing(IConfigBroadcaster* pSource); - - // INodeListener implementation - virtual void nodeChanged(Change const& aChange, OUString const& aPath, IConfigBroadcaster* pSource); - virtual void nodeDeleted(OUString const& aPath, IConfigBroadcaster* pSource); - - // IMessageHandler implementation - virtual void message(const OUString& rNotifyReason, sal_Int32 nNotificationId, IConfigBroadcaster* pSource); + virtual ConfigChangeBroadcastHelper* getBroadcastHelper(const vos::ORef < OOptions >& _xOptions, bool bCreate) = 0; + ConfigChangeBroadcastHelper* newBroadcastHelper(); // needed to implement the preceding + void disposeBroadcastHelper(ConfigChangeBroadcastHelper* pHelper); // needed to discard the preceding }; - class ScreenedChangeMultiplexer : public ConfigChangeMultiplexer - { - typedef SubtreeChange ScreeningChange; - ScreeningChange* m_pScreeningChanges; - public: - ScreenedChangeMultiplexer(IConfigBroadcaster* aSource = 0); - ScreenedChangeMultiplexer(TreeChangeList& aScreeningTree, IConfigBroadcaster* aSource); - ScreenedChangeMultiplexer(ScreeningChange* aScreening, OUString const& aBasePath, IConfigBroadcaster* aSource); - - void bind(TreeChangeList& aScreeningTree, IConfigBroadcaster* aSource = 0); - void bind(ScreeningChange* aScreening, OUString const& aBasePath, IConfigBroadcaster* aSource = 0); - - protected: - virtual void nodeChanged(Change const& aChange, OUString const& aPath, IConfigBroadcaster* pSource); - virtual void nodeDeleted(OUString const& aPath, IConfigBroadcaster* pSource); - }; } // namespace #endif // CONFIGMGR_API_EVENTS_HXX_ |