xref: /trunk/main/dbaccess/source/ext/adabas/ANewDb.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
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 
29 #ifndef ADABASUI_NEWDB_HXX
30 #define ADABASUI_NEWDB_HXX
31 
32 #ifndef _SVT_GENERICUNODIALOG_HXX_
33 #include <svtools/genericunodialog.hxx>
34 #endif
35 #ifndef _EXTENSIONS_COMPONENT_MODULE_HXX_
36 #include "Acomponentmodule.hxx"
37 #endif
38 #ifndef _COM_SUN_STAR_SDBCX_XCREATECATALOG_HPP_
39 #include <com/sun/star/sdbcx/XCreateCatalog.hpp>
40 #endif
41 
42 
43 
44 //.........................................................................
45 namespace adabasui
46 {
47 //.........................................................................
48     class OAdabasNewDbDlg;
49     typedef ::svt::OGenericUnoDialog OAdabasCreateDialogBase;
50     class OAdabasCreateDialog
51             :public OAdabasCreateDialogBase
52             ,public ::comphelper::OPropertyArrayUsageHelper< OAdabasCreateDialog >
53             ,public OModuleResourceClient
54     {
55     protected:
56         OAdabasNewDbDlg* m_pDialog; // just to avoid a cast
57         // <properties>
58         ::rtl::OUString m_sDatabaseName;
59         ::rtl::OUString m_sControlUser;
60         ::rtl::OUString m_sControlPassword;
61         ::rtl::OUString m_sUser;
62         ::rtl::OUString m_sUserPassword;
63         sal_Int32       m_nCacheSize;
64 
65         ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XCreateCatalog> m_xCreateCatalog;
66         // </properties>
67     protected:
68         OAdabasCreateDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
69 
70     public:
71         // XTypeProvider
72         virtual com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId(  ) throw(com::sun::star::uno::RuntimeException);
73 
74         // XServiceInfo
75         virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException);
76         virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(com::sun::star::uno::RuntimeException);
77 
78         // XServiceInfo - static methods
79         static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( com::sun::star::uno::RuntimeException );
80         static ::rtl::OUString getImplementationName_Static(void) throw( com::sun::star::uno::RuntimeException );
81         static com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
82                 SAL_CALL Create(const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&);
83 
84         // XPropertySet
85         virtual com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>  SAL_CALL getPropertySetInfo() throw(com::sun::star::uno::RuntimeException);
86         virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
87 
88         // OPropertyArrayUsageHelper
89         virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
90 
91     protected:
92     // OGenericUnoDialog overridables
93         virtual Dialog* createDialog(Window* _pParent);
94         virtual void executedDialog(sal_Int16 _nExecutionResult);
95     };
96 //.........................................................................
97 }   // namespace adabasui
98 //.........................................................................
99 
100 #endif // ADABASUI_NEWDB_HXX
101