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 EXTENSIONS_ABP_UNODIALOG_HXX
25 #define EXTENSIONS_ABP_UNODIALOG_HXX
26 
27 #include <svtools/genericunodialog.hxx>
28 #include <comphelper/proparrhlp.hxx>
29 #include "componentmodule.hxx"
30 #include <com/sun/star/task/XJob.hpp>
31 #include <cppuhelper/implbase1.hxx>
32 
33 //.........................................................................
34 namespace abp
35 {
36 //.........................................................................
37 
38 	//=====================================================================
39 	//= OABSPilotUno
40 	//=====================================================================
41 	class OABSPilotUno;
42 	typedef ::svt::OGenericUnoDialog								OABSPilotUno_DBase;
43 	typedef ::cppu::ImplHelper1< ::com::sun::star::task::XJob >		OABSPilotUno_JBase;
44 	typedef ::comphelper::OPropertyArrayUsageHelper< OABSPilotUno >	OABSPilotUno_PBase;
45 	/// the UNO wrapper for the address book source pilot
46 	class OABSPilotUno
47 			:public OABSPilotUno_DBase
48 			,public OABSPilotUno_JBase
49 			,public OABSPilotUno_PBase
50 			,public OModuleResourceClient
51 	{
52         ::rtl::OUString m_sDataSourceName;
53 		OABSPilotUno(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
54 
55 	public:
56 		// XInterface (disambiguation)
57 		virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
58 		virtual void SAL_CALL acquire(  ) throw ();
59 		virtual void SAL_CALL release(  ) throw ();
60 
61 		// XTypeProvider
62 		virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw (::com::sun::star::uno::RuntimeException);
63 		virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
64 
65 		// XServiceInfo
66 		virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
67 		virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
68 
69 		// XServiceInfo - static methods
70 		static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
71 		static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException );
72 		static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
73 				SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&);
74 
75 		// XPropertySet
76 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo>  SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
77 		virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
78 
79 		// OPropertyArrayUsageHelper
80 		virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
81 
82 		// XJob
83         virtual ::com::sun::star::uno::Any SAL_CALL execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& lArgs ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
84 
85         using OABSPilotUno_DBase::execute;
86 	protected:
87 	// OGenericUnoDialog overridables
88 		virtual Dialog*	createDialog(Window* _pParent);
89         virtual void executedDialog(sal_Int16 _nExecutionResult);
90 	};
91 
92 //.........................................................................
93 }	// namespace abp
94 //.........................................................................
95 
96 #endif // EXTENSIONS_ABP_UNODIALOG_HXX
97 
98