21#include <com/sun/star/sdbc/XDriver.hpp>
22#include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
23#include <com/sun/star/sdbcx/XCreateCatalog.hpp>
24#include <com/sun/star/embed/XTransactionListener.hpp>
25#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <com/sun/star/uno/XComponentContext.hpp>
34 typedef ::cppu::WeakComponentImplHelper< css::sdbc::XDriver
35 , css::sdbcx::XDataDefinitionSupplier
36 , css::lang::XServiceInfo
37 , css::sdbcx::XCreateCatalog
38 , css::embed::XTransactionListener
41 typedef std::pair< css::uno::WeakReferenceHelper,css::uno::WeakReferenceHelper>
TWeakRefPair;
44 typedef std::pair< css::uno::WeakReferenceHelper,TWeakConnectionPair>
TWeakPair;
57 css::uno::Reference< css::sdbc::XDriver >
m_xDriver;
58 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
66 css::uno::Reference< css::sdbc::XDriver >
const &
loadDriver( );
77 ODriverDelegator(
const css::uno::Reference< css::uno::XComponentContext >& _rxContext);
83 virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL
connect(
const OUString& url,
const css::uno::Sequence< css::beans::PropertyValue >& info )
override;
85 virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL
getPropertyInfo(
const OUString& url,
const css::uno::Sequence< css::beans::PropertyValue >& info )
override;
90 virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL
getDataDefinitionByConnection(
const css::uno::Reference< css::sdbc::XConnection >& connection )
override;
91 virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL
getDataDefinitionByURL(
const OUString& url,
const css::uno::Sequence< css::beans::PropertyValue >& info )
override;
94 virtual void SAL_CALL
createCatalog(
const css::uno::Sequence< css::beans::PropertyValue >& info )
override;
97 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source )
override;
100 virtual void SAL_CALL
preCommit(
const css::lang::EventObject& aEvent )
override;
101 virtual void SAL_CALL
commited(
const css::lang::EventObject& aEvent )
override;
102 virtual void SAL_CALL
preRevert(
const css::lang::EventObject& aEvent )
override;
103 virtual void SAL_CALL
reverted(
const css::lang::EventObject& aEvent )
override;
111 virtual void SAL_CALL
disposing()
override;
116 const css::uno::Reference< css::sdbc::XConnection >& _rxConnection
delegates all calls to the original driver and extend the existing one with the SDBCX layer.
virtual void SAL_CALL preRevert(const css::lang::EventObject &aEvent) override
virtual void SAL_CALL reverted(const css::lang::EventObject &aEvent) override
bool m_bInShutDownConnections
virtual void SAL_CALL disposing() override
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL connect(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
css::uno::Reference< css::sdbc::XDriver > m_xDriver
virtual void SAL_CALL createCatalog(const css::uno::Sequence< css::beans::PropertyValue > &info) override
virtual void SAL_CALL commited(const css::lang::EventObject &aEvent) override
virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
virtual sal_Int32 SAL_CALL getMajorVersion() override
virtual sal_Int32 SAL_CALL getMinorVersion() override
css::uno::Reference< css::sdbc::XDriver > const & loadDriver()
load the driver we want to delegate.
virtual void SAL_CALL preCommit(const css::lang::EventObject &aEvent) override
ODriverDelegator(const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
creates a new delegator for a HSQLDB driver
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByURL(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
void onConnectedNewDatabase(const css::uno::Reference< css::sdbc::XConnection > &_rxConnection)
called when we connected to a newly created embedded database
virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByConnection(const css::uno::Reference< css::sdbc::XConnection > &connection) override
void shutdownConnection(const TWeakPairVector::iterator &_aIter)
shut down the connection and revoke the storage from the map
virtual ~ODriverDelegator() override
dtor
virtual sal_Bool SAL_CALL acceptsURL(const OUString &url) override
void shutdownConnections()
TWeakPairVector m_aConnections
std::pair< css::uno::WeakReferenceHelper, css::uno::WeakReferenceHelper > TWeakRefPair
std::pair< css::uno::WeakReferenceHelper, TWeakConnectionPair > TWeakPair
std::pair< OUString,TWeakRefPair > TWeakConnectionPair
::cppu::WeakComponentImplHelper< css::sdbc::XDriver, css::sdbcx::XDataDefinitionSupplier, css::lang::XServiceInfo, css::sdbcx::XCreateCatalog, css::embed::XTransactionListener > ODriverDelegator_BASE
std::vector< TWeakPair > TWeakPairVector