LibreOffice Module filter (master) 1
|
implements a listener, which will update the global filter cache, if the underlying configuration wa changed by other processes. More...
#include <cacheupdatelistener.hxx>
Public Member Functions | |
CacheUpdateListener (FilterCache &rFilterCache, css::uno::Reference< css::uno::XInterface > xConfigAccess, FilterCache::EItemType eConfigType) | |
initialize new instance of this class. More... | |
virtual | ~CacheUpdateListener () override |
standard dtor. More... | |
void | startListening () |
starts listening. More... | |
void | stopListening () |
stop listening. More... | |
virtual void SAL_CALL | changesOccurred (const css::util::ChangesEvent &aEvent) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &aEvent) override |
Private Attributes | |
std::mutex | m_aMutex |
FilterCache & | m_rCache |
reference to the singleton(!) filter cache implementation, which should be updated by this thread. More... | |
css::uno::Reference< css::uno::XInterface > | m_xConfig |
holds the configuration access, where we listen alive. More... | |
FilterCache::EItemType | m_eConfigType |
every instance of this update listener listen on a special sub set of the filter configuration. More... | |
implements a listener, which will update the global filter cache, if the underlying configuration wa changed by other processes.
Definition at line 34 of file cacheupdatelistener.hxx.
filter::config::CacheUpdateListener::CacheUpdateListener | ( | FilterCache & | rFilterCache, |
css::uno::Reference< css::uno::XInterface > | xConfigAccess, | ||
FilterCache::EItemType | eConfigType | ||
) |
initialize new instance of this class.
@descr Listening won't be started here. It can be done by calling startListening() on this instance.
xConfigAccess | the configuration access, where this instance should listen for changes. |
eConfigType | specify the type of configuration. |
Definition at line 34 of file cacheupdatelistener.cxx.
|
overridevirtual |
standard dtor.
Definition at line 43 of file cacheupdatelistener.cxx.
|
overridevirtual |
Definition at line 79 of file cacheupdatelistener.cxx.
References aEvent, eType, gentoken::i, m_aMutex, m_eConfigType, m_rCache, m_xConfig, and filter::config::FilterCache::refreshItem().
|
overridevirtual |
Definition at line 171 of file cacheupdatelistener.cxx.
void filter::config::CacheUpdateListener::startListening | ( | ) |
starts listening.
Definition at line 47 of file cacheupdatelistener.cxx.
void filter::config::CacheUpdateListener::stopListening | ( | ) |
stop listening.
Definition at line 63 of file cacheupdatelistener.cxx.
|
private |
Definition at line 41 of file cacheupdatelistener.hxx.
Referenced by changesOccurred(), disposing(), startListening(), and stopListening().
|
private |
every instance of this update listener listen on a special sub set of the filter configuration.
So it should know, which type of configuration entry it must put into the filter cache, if the configuration notifies changes ...
Definition at line 54 of file cacheupdatelistener.hxx.
Referenced by changesOccurred().
|
private |
reference to the singleton(!) filter cache implementation, which should be updated by this thread.
Definition at line 45 of file cacheupdatelistener.hxx.
Referenced by changesOccurred().
|
private |
holds the configuration access, where we listen alive.
Definition at line 48 of file cacheupdatelistener.hxx.
Referenced by changesOccurred(), disposing(), startListening(), and stopListening().