1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef DBACCESS_DATASOURCEMETADATA_HXX
25 #define DBACCESS_DATASOURCEMETADATA_HXX
26 
27 #ifndef DBACCESS_CONNECTION_DEPENDENT_HXX
28 #include "connectiondependent.hxx"
29 #endif
30 
31 /** === begin UNO includes === **/
32 #ifndef _COM_SUN_STAR_SDB_TOOLS_XDATASOURCEMETADATA_HPP_
33 #include <com/sun/star/sdb/tools/XDataSourceMetaData.hpp>
34 #endif
35 /** === end UNO includes === **/
36 
37 #ifndef _CPPUHELPER_IMPLBASE1_HXX_
38 #include <cppuhelper/implbase1.hxx>
39 #endif
40 
41 #include <memory>
42 
43 //........................................................................
44 namespace sdbtools
45 {
46 //........................................................................
47 
48 	//====================================================================
49 	//= DataSourceMetaData
50 	//====================================================================
51     typedef ::cppu::WeakImplHelper1 <   ::com::sun::star::sdb::tools::XDataSourceMetaData
52                                     >   DataSourceMetaData_Base;
53     struct DataSourceMetaData_Impl;
54     /** default implementation for XDataSourceMetaData
55     */
56     class DataSourceMetaData    :public DataSourceMetaData_Base
57                                 ,public ConnectionDependentComponent
58 	{
59     private:
60         ::std::auto_ptr< DataSourceMetaData_Impl >   m_pImpl;
61 
62     public:
63         /** constructs the instance
64             @param _rContext
65                 the component's context
66             @param  _rxConnection
67                 the connection to work with. Will be held weak. Must not be <NULL/>.
68             @throws ::com::sun::star::lang::NullPointerException
69                 if _rxConnection is <NULL/>
70         */
71         DataSourceMetaData(
72             const ::comphelper::ComponentContext& _rContext,
73             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection
74         );
75 
76         // XDataSourceMetaData
77         virtual ::sal_Bool SAL_CALL supportsQueriesInFrom(  ) throw (::com::sun::star::uno::RuntimeException);
78 
79     protected:
80         virtual ~DataSourceMetaData();
81 
82     private:
83         DataSourceMetaData();                                  // never implemented
84         DataSourceMetaData( const DataSourceMetaData& );              // never implemented
85         DataSourceMetaData& operator=( const DataSourceMetaData& );   // never implemented
86 	};
87 
88 
89 //........................................................................
90 } // namespace sdbtools
91 //........................................................................
92 
93 #endif // DBACCESS_DATASOURCEMETADATA_HXX
94