build fix
[LibreOffice.git] / connectivity / source / drivers / mork / MDriver.hxx
blobe17b5ed7950d166484e381a9ea270ebe72bfd4c8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MORK_MDRIVER_HXX
11 #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MORK_MDRIVER_HXX
13 #include <com/sun/star/lang/XServiceInfo.hpp>
14 #include <com/sun/star/sdbc/DriverPropertyInfo.hpp>
16 #include <com/sun/star/sdbc/XDriver.hpp>
17 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
18 #include <cppuhelper/implbase.hxx>
20 #define MORK_DRIVER_IMPL_NAME "com.sun.star.comp.sdbc.MorkDriver"
22 namespace com { namespace sun { namespace star {
23 namespace uno {
24 class XComponentContext;
25 class XInterface;
27 } } }
29 namespace connectivity { namespace mork {
30 class ProfileAccess;
32 class MorkDriver:
33 public cppu::WeakImplHelper< css::lang::XServiceInfo, css::sdbc::XDriver >
35 public:
36 explicit MorkDriver(const css::uno::Reference< css::uno::XComponentContext >& context);
38 const css::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& getFactory(){return m_xFactory;}
39 const OUString& getProfilePath() {return m_sProfilePath;}
40 private:
42 MorkDriver(const MorkDriver&) = delete;
43 MorkDriver& operator=(const MorkDriver&) = delete;
45 virtual ~MorkDriver() override {}
47 virtual OUString SAL_CALL getImplementationName()
48 throw (css::uno::RuntimeException, std::exception) override;
50 virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
51 throw (css::uno::RuntimeException, std::exception) override;
53 virtual css::uno::Sequence< OUString > SAL_CALL
54 getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override;
56 virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL connect(
57 OUString const & url,
58 css::uno::Sequence< css::beans::PropertyValue > const & info)
59 throw (css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
61 virtual sal_Bool SAL_CALL acceptsURL(
62 OUString const & url)
63 throw (css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
65 virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL
66 getPropertyInfo(
67 OUString const & url,
68 css::uno::Sequence< css::beans::PropertyValue > const & info)
69 throw (css::sdbc::SQLException, css::uno::RuntimeException, std::exception) override;
71 virtual sal_Int32 SAL_CALL getMajorVersion()
72 throw (css::uno::RuntimeException, std::exception) override;
74 virtual sal_Int32 SAL_CALL getMinorVersion()
75 throw (css::uno::RuntimeException, std::exception) override;
77 css::uno::Reference< css::uno::XComponentContext > context_;
78 css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory;
79 OUString m_sProfilePath;
82 } }
84 #endif
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */