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