xref: /trunk/main/dbaccess/source/ui/inc/IItemSetHelper.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
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_ITEMSETHELPER_HXX
29 #define DBAUI_ITEMSETHELPER_HXX
30 
31 #ifndef _SAL_TYPES_H_
32 #include <sal/types.h>
33 #endif
34 #ifndef _COMPHELPER_UNO3_HXX_
35 #include <comphelper/uno3.hxx>
36 #endif
37 #ifndef _DBAUI_DSNTYPES_HXX_
38 #include "dsntypes.hxx"
39 #endif
40 
41 FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
42 FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
43 FORWARD_DECLARE_INTERFACE(sdbc,XDriver)
44 FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory)
45 
46 class SfxItemSet;
47 namespace dbaui
48 {
49     class SAL_NO_VTABLE IItemSetHelper
50     {
51     public:
52         virtual const SfxItemSet* getOutputSet() const = 0;
53         virtual SfxItemSet* getWriteOutputSet() = 0;
54     };
55 
56     class SAL_NO_VTABLE IDatabaseSettingsDialog
57     {
58     public:
59         virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const = 0;
60         virtual ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >,sal_Bool> createConnection() = 0;
61         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver() = 0;
62         virtual ::rtl::OUString getDatasourceType(const SfxItemSet& _rSet) const = 0;
63         virtual void clearPassword() = 0;
64         virtual sal_Bool saveDatasource() = 0;
65         virtual void setTitle(const ::rtl::OUString& _sTitle) = 0;
66 
67         /** enables or disables the user's possibility to confirm the settings
68 
69             In a wizard, disabling this will usually disable the "Finish" button.
70             In a normal tab dialog, this will usually disable the "OK" button.
71         */
72         virtual void enableConfirmSettings( bool _bEnable ) = 0;
73     };
74 }
75 #endif // DBAUI_ITEMSETHELPER_HXX
76 
77