1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: connectiontools.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef DBACCESS_CONNECTIONTOOLS_HXX
32 #define DBACCESS_CONNECTIONTOOLS_HXX
34 #ifndef DBACCESS_MODULE_SDBT_HXX
35 #include "module_sdbt.hxx"
38 #ifndef DBACCESS_CONNECTION_DEPENDENT_HXX
39 #include "connectiondependent.hxx"
42 /** === begin UNO includes === **/
43 #ifndef _COM_SUN_STAR_SDB_TOOLS_XCONNECTIONTOOLS_HPP_
44 #include <com/sun/star/sdb/tools/XConnectionTools.hpp>
46 #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
47 #include <com/sun/star/lang/XServiceInfo.hpp>
49 #ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
50 #include <com/sun/star/lang/XInitialization.hpp>
52 #ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
53 #include <com/sun/star/uno/XComponentContext.hpp>
55 /** === end UNO includes === **/
57 #ifndef _CPPUHELPER_IMPLBASE3_HXX_
58 #include <cppuhelper/implbase3.hxx>
61 #ifndef COMPHELPER_COMPONENTCONTEXT_HXX
62 #include <comphelper/componentcontext.hxx>
65 //........................................................................
68 //........................................................................
70 //====================================================================
72 //====================================================================
73 typedef ::cppu::WeakImplHelper3
< ::com::sun::star::sdb::tools::XConnectionTools
74 , ::com::sun::star::lang::XServiceInfo
75 , ::com::sun::star::lang::XInitialization
76 > ConnectionTools_Base
;
77 /** implements the com::sun::star::sdb::tools::XConnectionTools functionality
79 class ConnectionTools
:public ConnectionTools_Base
80 ,public ConnectionDependentComponent
83 SdbtClient m_aModuleClient
;
86 /** constructs a ConnectionTools instance
89 the context of the component
91 ConnectionTools( const ::comphelper::ComponentContext
& _rContext
);
94 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdb::tools::XTableName
> SAL_CALL
createTableName() throw (::com::sun::star::uno::RuntimeException
);
95 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdb::tools::XObjectNames
> SAL_CALL
getObjectNames() throw (::com::sun::star::uno::RuntimeException
);
96 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdb::tools::XDataSourceMetaData
> SAL_CALL
getDataSourceMetaData() throw (::com::sun::star::uno::RuntimeException
);
97 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
);
98 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
);
101 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw (::com::sun::star::uno::RuntimeException
);
102 virtual ::sal_Bool SAL_CALL
supportsService(const ::rtl::OUString
& ServiceName
) throw (::com::sun::star::uno::RuntimeException
);
103 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException
);
105 // XServiceInfo - static versions
106 static ::rtl::OUString SAL_CALL
getImplementationName_static();
107 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames_static();
108 static ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
109 Create(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>&);
112 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
);
118 ConnectionTools(); // never implemented
119 ConnectionTools( const ConnectionTools
& ); // never implemented
120 ConnectionTools
& operator=( const ConnectionTools
& ); // never implemented
123 //........................................................................
124 } // namespace sdbtools
125 //........................................................................
127 #endif // DBACCESS_CONNECTIONTOOLS_HXX