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