22#include <com/sun/star/sdbc/XDriver.hpp>
23#include <com/sun/star/lang/XServiceInfo.hpp>
24#include <com/sun/star/frame/XTerminateListener.hpp>
25#include <com/sun/star/uno/XComponentContext.hpp>
27#include <osl/module.h>
30#define MACAB_DRIVER_VERSION "0.1"
31#define MACAB_DRIVER_VERSION_MAJOR 0
32#define MACAB_DRIVER_VERSION_MINOR 1
36 class MacabConnection;
41 typedef std::vector< css::uno::WeakReferenceHelper >
OWeakRefArray;
103 typedef ::cppu::WeakComponentImplHelper< css::sdbc::XDriver,
104 css::lang::XServiceInfo,
112 css::uno::Reference< css::uno::XComponentContext >
117 css::uno::Reference< css::uno::XComponentContext >
const &
124 explicit MacabDriver(
const css::uno::Reference< css::uno::XComponentContext >& _rxContext);
128 virtual void SAL_CALL
disposing()
override;
136 virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL
connect(
const OUString& url,
const css::uno::Sequence< css::beans::PropertyValue >& info )
override;
138 virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL
getPropertyInfo(
const OUString& url,
const css::uno::Sequence< css::beans::PropertyValue >& info )
override;
143 virtual void SAL_CALL
queryTermination(
const css::lang::EventObject& Event )
override;
144 virtual void SAL_CALL
notifyTermination(
const css::lang::EventObject& Event )
override;
147 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source )
override;
virtual void SAL_CALL queryTermination(const css::lang::EventObject &Event) override
OWeakRefArray m_xConnections
css::uno::Reference< css::uno::XComponentContext > const & getComponentContext() const
virtual void SAL_CALL disposing() override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL connect(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
MacabDriver(const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void impl_shutdownImplementationModule()
shuts down the library which contains the real implementations
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL notifyTermination(const css::lang::EventObject &Event) override
static OUString impl_getConfigurationSettingsPath()
returns the path of our configuration settings
virtual sal_Bool SAL_CALL acceptsURL(const OUString &url) override
MacabImplModule m_aImplModule
virtual sal_Int32 SAL_CALL getMinorVersion() override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual sal_Int32 SAL_CALL getMajorVersion() override
bool impl_loadModule()
loads the implementation module and retrieves the needed symbols
bool m_bAttemptedLoadModule
Did we already attempt to load the module and to retrieve the symbols?
ConnectionFactoryFunction m_pConnectionFactoryFunc
MacabConnection * createConnection(MacabDriver *_pDriver) const
creates a new connection @precond <member>init</member> has been called before
void shutdown()
shuts down the impl module
void impl_unloadModule()
unloads the implementation module, and resets all function pointers to <NULL> @precond m_hConnectorMo...
void init()
initializes the implementation module.
oslModule m_hConnectorModule
bool isMacOSPresent()
determines whether there is a mac OS present in the environment
std::vector< css::uno::WeakReferenceHelper > OWeakRefArray
void *SAL_CALL * ConnectionFactoryFunction(void *_pDriver)
::cppu::WeakComponentImplHelper< css::sdbc::XDriver, css::lang::XServiceInfo, css::frame::XTerminateListener > MacabDriver_BASE