bump product version to 5.0.4.1
[LibreOffice.git] / connectivity / source / cpool / ZDriverWrapper.hxx
blob7cf98f6bd953aa33ed6d2d5966560bc9e1e63d0f
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZDRIVERWRAPPER_HXX
21 #define INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZDRIVERWRAPPER_HXX
23 #include <com/sun/star/sdbc/XDriver.hpp>
24 #include <cppuhelper/implbase1.hxx>
25 #include <osl/mutex.hxx>
26 #include <com/sun/star/uno/XAggregation.hpp>
29 namespace connectivity
33 class OConnectionPool;
35 typedef ::cppu::WeakImplHelper1 < ::com::sun::star::sdbc::XDriver
36 > ODriverWrapper_BASE;
38 class ODriverWrapper : public ODriverWrapper_BASE
40 protected:
41 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >
42 m_xDriverAggregate;
43 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver >
44 m_xDriver;
45 OConnectionPool* m_pConnectionPool;
47 public:
48 /** creates a new wrapper for a driver
49 @param _rxAggregateDriver
50 the driver to aggregate. The object will be reset to <NULL/> when returning from the ctor.
52 ODriverWrapper(
53 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >& _rxAggregateDriver,
54 OConnectionPool* _pPool
59 // XInterface
60 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
62 protected:
63 /// dtor
64 virtual ~ODriverWrapper();
65 // XDriver
66 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL connect( const OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
67 virtual sal_Bool SAL_CALL acceptsURL( const OUString& url ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
68 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo( const OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
69 virtual sal_Int32 SAL_CALL getMajorVersion( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
70 virtual sal_Int32 SAL_CALL getMinorVersion( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
74 } // namespace connectivity
77 #endif // INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZDRIVERWRAPPER_HXX
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */