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