LibreOffice Module ucbhelper (master) 1
|
This is an abstract base class for implementations of the service com.sun.star.ucb.DynamicResultSet, which is the result of the command "open" executed at a UCB folder content. More...
#include <resultsethelper.hxx>
Public Member Functions | |
ResultSetImplHelper (css::uno::Reference< css::uno::XComponentContext > xContext, css::ucb::OpenCommandArgument2 aCommand) | |
Constructor. More... | |
virtual | ~ResultSetImplHelper () override |
Destructor. More... | |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &ServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual void SAL_CALL | dispose () override |
virtual void SAL_CALL | addEventListener (const css::uno::Reference< css::lang::XEventListener > &Listener) override |
virtual void SAL_CALL | removeEventListener (const css::uno::Reference< css::lang::XEventListener > &Listener) override |
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL | getStaticResultSet () override |
virtual void SAL_CALL | setListener (const css::uno::Reference< css::ucb::XDynamicResultSetListener > &Listener) override |
virtual void SAL_CALL | connectToCache (const css::uno::Reference< css::ucb::XDynamicResultSet > &xCache) override |
virtual sal_Int16 SAL_CALL | getCapabilities () override |
The implementation of this method always returns 0. More... | |
Protected Attributes | |
std::mutex | m_aMutex |
css::ucb::OpenCommandArgument2 | m_aCommand |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
css::uno::Reference< css::sdbc::XResultSet > | m_xResultSet1 |
css::uno::Reference< css::sdbc::XResultSet > | m_xResultSet2 |
css::uno::Reference< css::ucb::XDynamicResultSetListener > | m_xListener |
Private Member Functions | |
UCBHELPER_DLLPRIVATE void | init (bool bStatic) |
virtual UCBHELPER_DLLPRIVATE void | initStatic ()=0 |
Your implementation of this method has to fill the protected member m_xResultSet1. More... | |
virtual UCBHELPER_DLLPRIVATE void | initDynamic ()=0 |
Your implementation of this method has to fill the protected members m_xResultSet1 and m_xResultSet2 of this base class. More... | |
Private Attributes | |
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > | m_aDisposeEventListeners |
bool | m_bStatic |
bool | m_bInitDone |
This is an abstract base class for implementations of the service com.sun.star.ucb.DynamicResultSet, which is the result of the command "open" executed at a UCB folder content.
Features of the base class implementation:
Definition at line 53 of file resultsethelper.hxx.
ucbhelper::ResultSetImplHelper::ResultSetImplHelper | ( | css::uno::Reference< css::uno::XComponentContext > | xContext, |
css::ucb::OpenCommandArgument2 | aCommand | ||
) |
Constructor.
rxContext | is a Service Manager. |
rCommand | is the parameter for the open command that produces this resultset. |
Definition at line 47 of file resultsethelper.cxx.
References aCommand, and m_xContext.
|
overridevirtual |
Destructor.
Definition at line 59 of file resultsethelper.cxx.
|
overridevirtual |
Definition at line 99 of file resultsethelper.cxx.
References comphelper::OInterfaceContainerHelper4< class ListenerT >::addInterface(), m_aDisposeEventListeners, and m_aMutex.
|
overridevirtual |
Definition at line 185 of file resultsethelper.cxx.
References m_aCommand, m_bStatic, m_xContext, m_xListener, and xTarget.
|
overridevirtual |
Definition at line 85 of file resultsethelper.cxx.
References comphelper::OInterfaceContainerHelper4< class ListenerT >::disposeAndClear(), comphelper::OInterfaceContainerHelper4< class ListenerT >::getLength(), m_aDisposeEventListeners, and m_aMutex.
|
overridevirtual |
The implementation of this method always returns 0.
Override this method, if necessary.
Definition at line 177 of file resultsethelper.cxx.
|
overridevirtual |
Definition at line 66 of file resultsethelper.cxx.
|
overridevirtual |
Definition at line 123 of file resultsethelper.cxx.
References init(), m_aMutex, m_xListener, and m_xResultSet1.
|
overridevirtual |
Definition at line 76 of file resultsethelper.cxx.
References ucbhelper::DYNAMICRESULTSET_SERVICE_NAME.
|
private |
Definition at line 222 of file resultsethelper.cxx.
References initDynamic(), initStatic(), m_bInitDone, m_bStatic, m_xResultSet1, and m_xResultSet2.
Referenced by getStaticResultSet(), and setListener().
|
privatepure virtual |
Your implementation of this method has to fill the protected members m_xResultSet1 and m_xResultSet2 of this base class.
Each of these resultsets must implement a complete static resultset ( service com.sun.star.ucb.ContentResultSet ). This method will be called at most once in the life of your implementation object. After this method was called, the type of this resultset will be "dynamic". There is no way to change the type afterwards. If this method gets called the client wants to use your resultset exclusively dynamically. This means, it is interested in getting notifications on changes of data of the resultset contents. ( These changes are to propagate by your implementation throw the member m_xListener of this base class ). If your implementation cannot detect changes of relevant data, you may fill m_xResultSet1 and m_xResultSet2 with the same static resultset implementation object. This normally will be the same instance you put into m_xResultSet1 when initStatic() is called.
References dispose(), getImplementationName(), getSupportedServiceNames(), and supportsService().
Referenced by init().
|
privatepure virtual |
Your implementation of this method has to fill the protected member m_xResultSet1.
This resultset must implement a complete static resultset ( service com.sun.star.ucb.ContentResultSet ). This method will be called at most once in the life of your implementation object. After this method was called, the type of this resultset will be "static". There is no way to change the type afterwards. If this method gets called the client wants to use your resultset exclusively statically. You may deploy this factum to optimize your implementation (i.e. "switch off" all changes detection code in your implementation). Note that you may use the class ucb::ResultSet to implement the static resultset, that is required here.
Referenced by init().
|
overridevirtual |
Definition at line 109 of file resultsethelper.cxx.
References m_aDisposeEventListeners, m_aMutex, and comphelper::OInterfaceContainerHelper4< class ListenerT >::removeInterface().
|
overridevirtual |
Definition at line 136 of file resultsethelper.cxx.
References init(), m_aMutex, m_bStatic, m_xListener, m_xResultSet1, and m_xResultSet2.
|
overridevirtual |
Definition at line 71 of file resultsethelper.cxx.
References ServiceName, and cppu::supportsService().
|
protected |
Definition at line 64 of file resultsethelper.hxx.
Referenced by connectToCache().
|
private |
Definition at line 58 of file resultsethelper.hxx.
Referenced by addEventListener(), dispose(), and removeEventListener().
|
protected |
Definition at line 63 of file resultsethelper.hxx.
Referenced by addEventListener(), dispose(), getStaticResultSet(), removeEventListener(), and setListener().
|
private |
Definition at line 60 of file resultsethelper.hxx.
Referenced by init().
|
private |
Definition at line 59 of file resultsethelper.hxx.
Referenced by connectToCache(), init(), and setListener().
|
protected |
Definition at line 65 of file resultsethelper.hxx.
Referenced by connectToCache().
|
protected |
Definition at line 71 of file resultsethelper.hxx.
Referenced by connectToCache(), getStaticResultSet(), and setListener().
|
protected |
Definition at line 67 of file resultsethelper.hxx.
Referenced by getStaticResultSet(), init(), and setListener().
|
protected |
Definition at line 69 of file resultsethelper.hxx.
Referenced by init(), and setListener().