bump product version to 5.0.4.1
[LibreOffice.git] / connectivity / source / inc / ado / ADriver.hxx
blob3195666e58d2a4ad5d42a380c14ef16972b61a2b
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_INC_ADO_ADRIVER_HXX
21 #define INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_ADRIVER_HXX
23 #include <com/sun/star/sdbc/XDriver.hpp>
24 #include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <cppuhelper/compbase3.hxx>
27 #include <connectivity/CommonTools.hxx>
29 namespace com { namespace sun { namespace star { namespace lang {
30 class XMultiServiceFactory;
31 }}}}
33 namespace connectivity
35 namespace ado
38 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ODriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception );
40 typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::sdbc::XDriver,
41 ::com::sun::star::sdbcx::XDataDefinitionSupplier,
42 ::com::sun::star::lang::XServiceInfo
43 > ODriver_BASE;
44 class ODriver : public ODriver_BASE
46 ::osl::Mutex m_aMutex;
48 connectivity::OWeakRefArray m_xConnections; // vector containing a list
49 // of all the Connection objects
50 // for this Driver
51 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
54 public:
55 ODriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB);
56 ~ODriver();
58 // OComponentHelper
59 virtual void SAL_CALL disposing();
60 // XInterface
61 static OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
62 static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static( ) throw (::com::sun::star::uno::RuntimeException);
63 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const { return m_xORB; }
65 private:
66 void impl_checkURL_throw(const OUString& _sUrl);
68 // XServiceInfo
69 virtual OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
70 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
71 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
73 // XDriver
74 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);
75 virtual sal_Bool SAL_CALL acceptsURL( const OUString& url ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
76 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);
77 virtual sal_Int32 SAL_CALL getMajorVersion( ) throw(::com::sun::star::uno::RuntimeException);
78 virtual sal_Int32 SAL_CALL getMinorVersion( ) throw(::com::sun::star::uno::RuntimeException);
80 // XDataDefinitionSupplier
81 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& connection ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
82 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByURL( 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);
87 #endif // INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_ADRIVER_HXX
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */