update credits
[LibreOffice.git] / connectivity / source / inc / ado / ADriver.hxx
blobfb2b23c147a1ea3f7919cf8696abce5175066730
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 _CONNECTIVITY_ADO_ADRIVER_HXX_
21 #define _CONNECTIVITY_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 connectivity
31 namespace ado
34 ::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 );
36 typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::sdbc::XDriver,
37 ::com::sun::star::sdbcx::XDataDefinitionSupplier,
38 ::com::sun::star::lang::XServiceInfo
39 > ODriver_BASE;
40 class ODriver : public ODriver_BASE
42 ::osl::Mutex m_aMutex;
44 connectivity::OWeakRefArray m_xConnections; // vector containing a list
45 // of all the Connection objects
46 // for this Driver
47 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
50 public:
51 ODriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB);
52 ~ODriver();
54 // OComponentHelper
55 virtual void SAL_CALL disposing(void);
56 // XInterface
57 static OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
58 static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static( ) throw (::com::sun::star::uno::RuntimeException);
59 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const { return m_xORB; }
61 private:
62 void impl_checkURL_throw(const OUString& _sUrl);
64 // XServiceInfo
65 virtual OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
66 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
67 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
69 // XDriver
70 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);
71 virtual sal_Bool SAL_CALL acceptsURL( const OUString& url ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
72 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);
73 virtual sal_Int32 SAL_CALL getMajorVersion( ) throw(::com::sun::star::uno::RuntimeException);
74 virtual sal_Int32 SAL_CALL getMinorVersion( ) throw(::com::sun::star::uno::RuntimeException);
76 // XDataDefinitionSupplier
77 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);
78 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);
83 #endif //_CONNECTIVITY_ADO_ADRIVER_HXX_
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */