xref: /AOO41X/main/uui/source/mphndl.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 #ifndef UUI_IAHNDL_HXX
29 #define UUI_IAHNDL_HXX
30 
31 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
32 #include <com/sun/star/lang/XServiceInfo.hpp>
33 #include <com/sun/star/lang/XTypeProvider.hpp>
34 #include <com/sun/star/task/XInteractionHandler.hpp>
35 #include <com/sun/star/task/XPasswordContainer.hpp>
36 #include <cppuhelper/weak.hxx>
37 
38 //============================================================================
39 class UUIInteractionHandler:
40 	public cppu::OWeakObject,
41 	public com::sun::star::lang::XServiceInfo,
42 	public com::sun::star::lang::XTypeProvider,
43 	public com::sun::star::task::XInteractionHandler
44 {
45 	::com::sun::star::uno::Reference< ::com::sun::star::task::XPasswordContainer > mPContainer;
46 
47 public:
48 	static sal_Char const m_aImplementationName[];
49 
50 	UUIInteractionHandler( com::sun::star::uno::Reference<
51 				      com::sun::star::lang::XMultiServiceFactory > const & );
52 
53     virtual com::sun::star::uno::Any SAL_CALL
54 	queryInterface(com::sun::star::uno::Type const & rType)
55 		throw (com::sun::star::uno::RuntimeException);
56 
57     virtual void SAL_CALL acquire()
58 		throw (com::sun::star::uno::RuntimeException);
59 
60     virtual void SAL_CALL release()
61 		throw (com::sun::star::uno::RuntimeException);
62 
63     virtual rtl::OUString SAL_CALL getImplementationName()
64 		throw (com::sun::star::uno::RuntimeException);
65 
66     virtual sal_Bool SAL_CALL supportsService(rtl::OUString const &
67 											      rServiceName)
68 		throw (com::sun::star::uno::RuntimeException);
69 
70     virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
71 	getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException);
72 
73     virtual
74 	com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
75 	getTypes() throw (com::sun::star::uno::RuntimeException);
76 
77     virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
78 	getImplementationId() throw (com::sun::star::uno::RuntimeException);
79 
80     virtual void SAL_CALL
81 	handle(com::sun::star::uno::Reference<
82 		           com::sun::star::task::XInteractionRequest > const &
83 		       rRequest)
84 		throw (com::sun::star::uno::RuntimeException);
85 
86 	static com::sun::star::uno::Sequence< rtl::OUString >
87 	getSupportedServiceNames_static();
88 
89 	static com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
90 	SAL_CALL
91 	createInstance(com::sun::star::uno::Reference<
92 				       com::sun::star::lang::XMultiServiceFactory > const &);
93 };
94 
95 #endif // UUI_IAHNDL_HXX
96 
97