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 DBAUI_DBTREEMODEL_HXX
25 #define DBAUI_DBTREEMODEL_HXX
26 
27 #ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
28 #include <com/sun/star/container/XNameAccess.hpp>
29 #endif
30 #ifndef _SVLBOX_HXX
31 #include <svtools/svlbox.hxx>
32 #endif
33 #ifndef _SVLBOXITM_HXX
34 #include <svtools/svlbitm.hxx>
35 #endif
36 #ifndef _SBA_UNODATBR_HXX_
37 #include "unodatbr.hxx"
38 #endif
39 #ifndef _DBAUI_COMMON_TYPES_HXX_
40 #include "commontypes.hxx"
41 #endif
42 
43 // syntax of the tree           userdata
44 // datasource                   holds the connection
45 //   queries                    holds the nameaccess for the queries
46 //	   query                    holds the query
47 //	 tables                     holds the nameaccess for the tables
48 //	   table                    holds the table
49 
50 #define CONTAINER_QUERIES		sal_uLong( 0 )
51 #define CONTAINER_TABLES		sal_uLong( 1 )
52 
53 namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
54 
55 namespace dbaui
56 {
57 	struct DBTreeListUserData
58 	{
59         /// if the entry denotes a table or query, this is the respective UNO object
60 		::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
61 					                    xObjectProperties;
62         /// if the entry denotes a object container, this is the UNO interface for this container
63 		::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
64 					                    xContainer;
65         /// if the entry denotes a data source, this is the connection for this data source (if already connection)
66         SharedConnection                xConnection;
67 		SbaTableQueryBrowser::EntryType	eType;
68         String                          sAccessor;
69 
70 		DBTreeListUserData();
71 		~DBTreeListUserData();
72 	};
73 }
74 
75 #endif // DBAUI_DBTREEMODEL_HXX
76