25#include <com/sun/star/sdbc/XDriver.hpp>
26#include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
27#include <com/sun/star/lang/XServiceInfo.hpp>
28#include <com/sun/star/uno/XComponentContext.hpp>
38 class OMetaConnection;
42 typedef ::cppu::WeakComponentImplHelper< css::sdbc::XDriver
43 , css::sdbcx::XDataDefinitionSupplier
44 , css::lang::XServiceInfo
48 typedef std::pair< css::uno::WeakReferenceHelper,TWeakConnectionPair>
TWeakPair;
50 typedef std::map< OUString, css::uno::Reference< css::sdbc::XDriver > >
TJDBCDrivers;
64 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
75 css::uno::Reference< css::sdbc::XDriver >
loadDriver( std::u16string_view url,
const css::uno::Sequence< css::beans::PropertyValue >& info );
80 ODriverDelegator(
const css::uno::Reference< css::uno::XComponentContext >& _rxContext);
86 virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL
connect(
const OUString& url,
const css::uno::Sequence< css::beans::PropertyValue >& info )
override;
88 virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL
getPropertyInfo(
const OUString& url,
const css::uno::Sequence< css::beans::PropertyValue >& info )
override;
93 virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL
getDataDefinitionByConnection(
const css::uno::Reference< css::sdbc::XConnection >& connection )
override;
94 virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL
getDataDefinitionByURL(
const OUString& url,
const css::uno::Sequence< css::beans::PropertyValue >& info )
override;
delegates all calls to the original driver and extend the existing one with the SDBCX layer.
ODriverDelegator(const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
creates a new delegator for a mysql driver
virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByConnection(const css::uno::Reference< css::sdbc::XConnection > &connection) override
TJDBCDrivers m_aJdbcDrivers
css::uno::Reference< css::sdbc::XDriver > loadDriver(std::u16string_view url, const css::uno::Sequence< css::beans::PropertyValue > &info)
load the driver we want to delegate.
virtual ~ODriverDelegator() override
dtor
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_xODBCDriver
TWeakPairVector m_aConnections
css::uno::Reference< css::sdbc::XDriver > m_xNativeDriver
virtual sal_Int32 SAL_CALL getMinorVersion() override
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
virtual sal_Int32 SAL_CALL getMajorVersion() override
virtual void SAL_CALL disposing() override
virtual sal_Bool SAL_CALL acceptsURL(const OUString &url) override
virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
std::pair< css::uno::WeakReferenceHelper, TWeakConnectionPair > TWeakPair
::cppu::WeakComponentImplHelper< css::sdbc::XDriver, css::sdbcx::XDataDefinitionSupplier, css::lang::XServiceInfo > ODriverDelegator_BASE
std::vector< TWeakPair > TWeakPairVector
std::map< OUString, css::uno::Reference< css::sdbc::XDriver > > TJDBCDrivers
std::pair< css::uno::WeakReferenceHelper, OMetaConnection * > TWeakConnectionPair