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_INTERACTIONHANDLER_HXX
29 #define UUI_INTERACTIONHANDLER_HXX
30 
31 #include "com/sun/star/lang/XInitialization.hpp"
32 #include "com/sun/star/lang/XServiceInfo.hpp"
33 #include "com/sun/star/task/XInteractionHandler2.hpp"
34 #include "cppuhelper/implbase3.hxx"
35 
36 class UUIInteractionHelper;
37 
38 class UUIInteractionHandler:
39     public cppu::WeakImplHelper3< com::sun::star::lang::XServiceInfo,
40                                   com::sun::star::lang::XInitialization,
41                                   com::sun::star::task::XInteractionHandler2 >
42 {
43 public:
44     static char const m_aImplementationName[];
45 
46     static com::sun::star::uno::Sequence< rtl::OUString >
47     getSupportedServiceNames_static();
48 
49     static com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
50     SAL_CALL
51     createInstance(
52         com::sun::star::uno::Reference<
53                 com::sun::star::lang::XMultiServiceFactory > const &
54             rServiceFactory)
55         SAL_THROW((com::sun::star::uno::Exception));
56 
57 private:
58     com::sun::star::uno::Reference<
59         com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory;
60     UUIInteractionHelper * m_pImpl;
61 
62     UUIInteractionHandler(UUIInteractionHandler &); // not implemented
63     void operator =(UUIInteractionHandler); // not implemented
64 
65     UUIInteractionHandler(com::sun::star::uno::Reference<
66 			      com::sun::star::lang::XMultiServiceFactory >
67 		          const & rServiceFactory)
68         SAL_THROW(());
69 
70     virtual ~UUIInteractionHandler() SAL_THROW(());
71 
72     virtual rtl::OUString SAL_CALL getImplementationName()
73         throw (com::sun::star::uno::RuntimeException);
74 
75     virtual sal_Bool SAL_CALL supportsService(rtl::OUString const &
76 					      rServiceName)
77         throw (com::sun::star::uno::RuntimeException);
78 
79     virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
80     getSupportedServiceNames()
81         throw (com::sun::star::uno::RuntimeException);
82 
83     virtual void SAL_CALL
84     initialize(
85         com::sun::star::uno::Sequence< com::sun::star::uno::Any > const &
86             rArguments)
87         throw (com::sun::star::uno::Exception);
88 
89     virtual void SAL_CALL
90     handle(com::sun::star::uno::Reference<
91 	       com::sun::star::task::XInteractionRequest > const &
92 	   rRequest)
93         throw (com::sun::star::uno::RuntimeException);
94 
95     virtual ::sal_Bool SAL_CALL
96         handleInteractionRequest(
97             const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& _Request
98         )   throw ( ::com::sun::star::uno::RuntimeException );
99 };
100 
101 #endif // UUI_INTERACTIONHANDLER_HXX
102