1*2e2212a7SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2e2212a7SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2e2212a7SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2e2212a7SAndrew Rist  * distributed with this work for additional information
6*2e2212a7SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2e2212a7SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2e2212a7SAndrew Rist  * "License"); you may not use this file except in compliance
9*2e2212a7SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*2e2212a7SAndrew Rist  *
11*2e2212a7SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*2e2212a7SAndrew Rist  *
13*2e2212a7SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2e2212a7SAndrew Rist  * software distributed under the License is distributed on an
15*2e2212a7SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2e2212a7SAndrew Rist  * KIND, either express or implied.  See the License for the
17*2e2212a7SAndrew Rist  * specific language governing permissions and limitations
18*2e2212a7SAndrew Rist  * under the License.
19*2e2212a7SAndrew Rist  *
20*2e2212a7SAndrew Rist  *************************************************************/
21*2e2212a7SAndrew Rist 
22*2e2212a7SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef DBACCESS_CONNECTIONTOOLS_HXX
25cdf0e10cSrcweir #define DBACCESS_CONNECTIONTOOLS_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifndef DBACCESS_MODULE_SDBT_HXX
28cdf0e10cSrcweir #include "module_sdbt.hxx"
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #ifndef DBACCESS_CONNECTION_DEPENDENT_HXX
32cdf0e10cSrcweir #include "connectiondependent.hxx"
33cdf0e10cSrcweir #endif
34cdf0e10cSrcweir 
35cdf0e10cSrcweir /** === begin UNO includes === **/
36cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDB_TOOLS_XCONNECTIONTOOLS_HPP_
37cdf0e10cSrcweir #include <com/sun/star/sdb/tools/XConnectionTools.hpp>
38cdf0e10cSrcweir #endif
39cdf0e10cSrcweir #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
40cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
41cdf0e10cSrcweir #endif
42cdf0e10cSrcweir #ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
43cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp>
44cdf0e10cSrcweir #endif
45cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
46cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp>
47cdf0e10cSrcweir #endif
48cdf0e10cSrcweir /** === end UNO includes === **/
49cdf0e10cSrcweir 
50cdf0e10cSrcweir #ifndef _CPPUHELPER_IMPLBASE3_HXX_
51cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx>
52cdf0e10cSrcweir #endif
53cdf0e10cSrcweir 
54cdf0e10cSrcweir #ifndef COMPHELPER_COMPONENTCONTEXT_HXX
55cdf0e10cSrcweir #include <comphelper/componentcontext.hxx>
56cdf0e10cSrcweir #endif
57cdf0e10cSrcweir 
58cdf0e10cSrcweir //........................................................................
59cdf0e10cSrcweir namespace sdbtools
60cdf0e10cSrcweir {
61cdf0e10cSrcweir //........................................................................
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 	//====================================================================
64cdf0e10cSrcweir 	//= ConnectionTools
65cdf0e10cSrcweir 	//====================================================================
66cdf0e10cSrcweir     typedef ::cppu::WeakImplHelper3 <   ::com::sun::star::sdb::tools::XConnectionTools
67cdf0e10cSrcweir                                     ,   ::com::sun::star::lang::XServiceInfo
68cdf0e10cSrcweir                                     ,   ::com::sun::star::lang::XInitialization
69cdf0e10cSrcweir                                     >   ConnectionTools_Base;
70cdf0e10cSrcweir     /** implements the com::sun::star::sdb::tools::XConnectionTools functionality
71cdf0e10cSrcweir     */
72cdf0e10cSrcweir     class ConnectionTools   :public ConnectionTools_Base
73cdf0e10cSrcweir                             ,public ConnectionDependentComponent
74cdf0e10cSrcweir 	{
75cdf0e10cSrcweir     private:
76cdf0e10cSrcweir         SdbtClient                      m_aModuleClient;
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     public:
79cdf0e10cSrcweir         /** constructs a ConnectionTools instance
80cdf0e10cSrcweir 
81cdf0e10cSrcweir             @param _rxContext
82cdf0e10cSrcweir                 the context of the component
83cdf0e10cSrcweir         */
84cdf0e10cSrcweir         ConnectionTools( const ::comphelper::ComponentContext& _rContext );
85cdf0e10cSrcweir 
86cdf0e10cSrcweir         // XConnectionTools
87cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XTableName > SAL_CALL createTableName() throw (::com::sun::star::uno::RuntimeException);
88cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XObjectNames > SAL_CALL getObjectNames() throw (::com::sun::star::uno::RuntimeException);
89cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XDataSourceMetaData > SAL_CALL getDataSourceMetaData() throw (::com::sun::star::uno::RuntimeException);
90cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getFieldsByCommandDescriptor( ::sal_Int32 commandType, const ::rtl::OUString& command, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& keepFieldsAlive ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
91cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > SAL_CALL getComposer( ::sal_Int32 commandType, const ::rtl::OUString& command ) throw (::com::sun::star::uno::RuntimeException);
92cdf0e10cSrcweir 
93cdf0e10cSrcweir         // XServiceInfo
94cdf0e10cSrcweir         virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
95cdf0e10cSrcweir         virtual ::sal_Bool SAL_CALL supportsService(const ::rtl::OUString & ServiceName) throw (::com::sun::star::uno::RuntimeException);
96cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
97cdf0e10cSrcweir 
98cdf0e10cSrcweir         // XServiceInfo - static versions
99cdf0e10cSrcweir         static ::rtl::OUString SAL_CALL getImplementationName_static();
100cdf0e10cSrcweir         static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static();
101cdf0e10cSrcweir 		static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
102cdf0e10cSrcweir 						Create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
103cdf0e10cSrcweir 
104cdf0e10cSrcweir         // XInitialization
105cdf0e10cSrcweir         virtual void SAL_CALL initialize(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > & aArguments) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::uno::Exception);
106cdf0e10cSrcweir 
107cdf0e10cSrcweir     protected:
108cdf0e10cSrcweir         ~ConnectionTools();
109cdf0e10cSrcweir 
110cdf0e10cSrcweir     private:
111cdf0e10cSrcweir         ConnectionTools();                                      // never implemented
112cdf0e10cSrcweir         ConnectionTools( const ConnectionTools& );              // never implemented
113cdf0e10cSrcweir         ConnectionTools& operator=( const ConnectionTools& );   // never implemented
114cdf0e10cSrcweir 	};
115cdf0e10cSrcweir 
116cdf0e10cSrcweir //........................................................................
117cdf0e10cSrcweir } // namespace sdbtools
118cdf0e10cSrcweir //........................................................................
119cdf0e10cSrcweir 
120cdf0e10cSrcweir #endif // DBACCESS_CONNECTIONTOOLS_HXX
121cdf0e10cSrcweir 
122