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