tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / connectivity / source / cpool / ZDriverWrapper.hxx
blobb08cfc3ad9b4f0084067da5fa6b34284bce321bc
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 #pragma once
22 #include <com/sun/star/sdbc/XDriver.hpp>
23 #include <cppuhelper/implbase.hxx>
24 #include <rtl/ref.hxx>
25 #include <com/sun/star/uno/XAggregation.hpp>
28 namespace connectivity
32 class OConnectionPool;
34 typedef ::cppu::WeakImplHelper< css::sdbc::XDriver > ODriverWrapper_BASE;
36 class ODriverWrapper final : public ODriverWrapper_BASE
38 css::uno::Reference< css::uno::XAggregation >
39 m_xDriverAggregate;
40 css::uno::Reference< css::sdbc::XDriver >
41 m_xDriver;
42 rtl::Reference<OConnectionPool>
43 m_pConnectionPool;
45 public:
46 /** creates a new wrapper for a driver
47 @param _rxAggregateDriver
48 the driver to aggregate. The object will be reset to <NULL/> when returning from the ctor.
50 ODriverWrapper(
51 css::uno::Reference< css::uno::XAggregation >& _rxAggregateDriver,
52 OConnectionPool* _pPool
56 // XInterface
57 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
59 private:
60 /// dtor
61 virtual ~ODriverWrapper() override;
62 // XDriver
63 virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL connect( const OUString& url, const css::uno::Sequence< css::beans::PropertyValue >& info ) override;
64 virtual sal_Bool SAL_CALL acceptsURL( const OUString& url ) override;
65 virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo( const OUString& url, const css::uno::Sequence< css::beans::PropertyValue >& info ) override;
66 virtual sal_Int32 SAL_CALL getMajorVersion( ) override;
67 virtual sal_Int32 SAL_CALL getMinorVersion( ) override;
71 } // namespace connectivity
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */