1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_CONNECTIONTOOLS_HXX
21 #define INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_CONNECTIONTOOLS_HXX
23 #include "module_sdbt.hxx"
25 #include "connectiondependent.hxx"
27 #include <com/sun/star/sdb/tools/XConnectionTools.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/lang/XInitialization.hpp>
30 #include <com/sun/star/uno/XComponentContext.hpp>
32 #include <cppuhelper/implbase3.hxx>
38 typedef ::cppu::WeakImplHelper3
< ::com::sun::star::sdb::tools::XConnectionTools
39 , ::com::sun::star::lang::XServiceInfo
40 , ::com::sun::star::lang::XInitialization
41 > ConnectionTools_Base
;
42 /** implements the com::sun::star::sdb::tools::XConnectionTools functionality
44 class ConnectionTools
:public ConnectionTools_Base
45 ,public ConnectionDependentComponent
48 SdbtClient m_aModuleClient
;
51 /** constructs a ConnectionTools instance
54 the context of the component
56 ConnectionTools( const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rContext
);
59 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdb::tools::XTableName
> SAL_CALL
createTableName() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
60 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdb::tools::XObjectNames
> SAL_CALL
getObjectNames() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
61 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdb::tools::XDataSourceMetaData
> SAL_CALL
getDataSourceMetaData() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
62 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> SAL_CALL
getFieldsByCommandDescriptor( ::sal_Int32 commandType
, const OUString
& command
, ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>& keepFieldsAlive
) throw (::com::sun::star::sdbc::SQLException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
63 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdb::XSingleSelectQueryComposer
> SAL_CALL
getComposer( ::sal_Int32 commandType
, const OUString
& command
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
66 virtual OUString SAL_CALL
getImplementationName() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
67 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
68 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
70 // XServiceInfo - static versions
71 static OUString SAL_CALL
getImplementationName_static();
72 static ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames_static();
73 static ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
74 Create(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>&);
77 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
, std::exception
) SAL_OVERRIDE
;
80 virtual ~ConnectionTools();
83 ConnectionTools( const ConnectionTools
& ) SAL_DELETED_FUNCTION
;
84 ConnectionTools
& operator=( const ConnectionTools
& ) SAL_DELETED_FUNCTION
;
87 } // namespace sdbtools
89 #endif // INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_CONNECTIONTOOLS_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */