1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MORK_MDRIVER_HXX
11 #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MORK_MDRIVER_HXX
13 #include "sal/config.h"
17 #include "boost/noncopyable.hpp"
18 #include "com/sun/star/beans/PropertyValue.hpp"
19 #include "com/sun/star/lang/XServiceInfo.hpp"
20 #include "com/sun/star/sdbc/DriverPropertyInfo.hpp"
21 #include "com/sun/star/sdbc/SQLException.hpp"
22 #include "com/sun/star/sdbc/XConnection.hpp"
23 #include "com/sun/star/sdbc/XDriver.hpp"
24 #include "com/sun/star/uno/Reference.hxx"
25 #include "com/sun/star/uno/RuntimeException.hpp"
26 #include "com/sun/star/uno/Sequence.hxx"
27 #include "com/sun/star/uno/XComponentContext.hpp"
28 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
29 #include "cppuhelper/implbase2.hxx"
30 #include "cppuhelper/weak.hxx"
31 #include "rtl/ustring.hxx"
32 #include "sal/types.h"
34 #define MORK_DRIVER_IMPL_NAME "com.sun.star.comp.sdbc.MorkDriver"
36 namespace com
{ namespace sun
{ namespace star
{
38 class XComponentContext
;
43 namespace connectivity
{ namespace mork
{
46 css::uno::Reference
< css::uno::XInterface
> SAL_CALL
47 create(css::uno::Reference
< css::uno::XComponentContext
> const &);
50 public cppu::WeakImplHelper2
< css::lang::XServiceInfo
, css::sdbc::XDriver
>,
51 private boost::noncopyable
54 MorkDriver(css::uno::Reference
< css::uno::XComponentContext
> const context
);
55 static OUString
getImplementationName_Static()
56 throw(css::uno::RuntimeException
);
57 static css::uno::Sequence
< OUString
> getSupportedServiceNames_Static()
58 throw (css::uno::RuntimeException
);
60 css::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
> getFactory(){return m_xFactory
;}
63 virtual ~MorkDriver() {}
65 virtual OUString SAL_CALL
getImplementationName()
66 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
68 virtual sal_Bool SAL_CALL
supportsService(OUString
const & ServiceName
)
69 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
71 virtual css::uno::Sequence
< OUString
> SAL_CALL
72 getSupportedServiceNames() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
74 virtual css::uno::Reference
< css::sdbc::XConnection
> SAL_CALL
connect(
76 css::uno::Sequence
< css::beans::PropertyValue
> const & info
)
77 throw (css::sdbc::SQLException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
79 virtual sal_Bool SAL_CALL
acceptsURL(
81 throw (css::sdbc::SQLException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
83 virtual css::uno::Sequence
< css::sdbc::DriverPropertyInfo
> SAL_CALL
86 css::uno::Sequence
< css::beans::PropertyValue
> const & info
)
87 throw (css::sdbc::SQLException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
89 virtual sal_Int32 SAL_CALL
getMajorVersion()
90 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
92 virtual sal_Int32 SAL_CALL
getMinorVersion()
93 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
95 css::uno::Reference
< css::uno::XComponentContext
> context_
;
96 css::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
> m_xFactory
;
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */