1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef DBACCESS_DATASOURCEMETADATA_HXX
29 #define DBACCESS_DATASOURCEMETADATA_HXX
30 
31 #ifndef DBACCESS_CONNECTION_DEPENDENT_HXX
32 #include "connectiondependent.hxx"
33 #endif
34 
35 /** === begin UNO includes === **/
36 #ifndef _COM_SUN_STAR_SDB_TOOLS_XDATASOURCEMETADATA_HPP_
37 #include <com/sun/star/sdb/tools/XDataSourceMetaData.hpp>
38 #endif
39 /** === end UNO includes === **/
40 
41 #ifndef _CPPUHELPER_IMPLBASE1_HXX_
42 #include <cppuhelper/implbase1.hxx>
43 #endif
44 
45 #include <memory>
46 
47 //........................................................................
48 namespace sdbtools
49 {
50 //........................................................................
51 
52 	//====================================================================
53 	//= DataSourceMetaData
54 	//====================================================================
55     typedef ::cppu::WeakImplHelper1 <   ::com::sun::star::sdb::tools::XDataSourceMetaData
56                                     >   DataSourceMetaData_Base;
57     struct DataSourceMetaData_Impl;
58     /** default implementation for XDataSourceMetaData
59     */
60     class DataSourceMetaData    :public DataSourceMetaData_Base
61                                 ,public ConnectionDependentComponent
62 	{
63     private:
64         ::std::auto_ptr< DataSourceMetaData_Impl >   m_pImpl;
65 
66     public:
67         /** constructs the instance
68             @param _rContext
69                 the component's context
70             @param  _rxConnection
71                 the connection to work with. Will be held weak. Must not be <NULL/>.
72             @throws ::com::sun::star::lang::NullPointerException
73                 if _rxConnection is <NULL/>
74         */
75         DataSourceMetaData(
76             const ::comphelper::ComponentContext& _rContext,
77             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection
78         );
79 
80         // XDataSourceMetaData
81         virtual ::sal_Bool SAL_CALL supportsQueriesInFrom(  ) throw (::com::sun::star::uno::RuntimeException);
82 
83     protected:
84         virtual ~DataSourceMetaData();
85 
86     private:
87         DataSourceMetaData();                                  // never implemented
88         DataSourceMetaData( const DataSourceMetaData& );              // never implemented
89         DataSourceMetaData& operator=( const DataSourceMetaData& );   // never implemented
90 	};
91 
92 
93 //........................................................................
94 } // namespace sdbtools
95 //........................................................................
96 
97 #endif // DBACCESS_DATASOURCEMETADATA_HXX
98