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 throw (com::sun::star::uno::RuntimeException); 52 53 virtual void SAL_CALL acquire() 54 throw (com::sun::star::uno::RuntimeException); 55 56 virtual void SAL_CALL release() 57 throw (com::sun::star::uno::RuntimeException); 58 59 virtual rtl::OUString SAL_CALL getImplementationName() 60 throw (com::sun::star::uno::RuntimeException); 61 62 virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & 63 rServiceName) 64 throw (com::sun::star::uno::RuntimeException); 65 66 virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL 67 getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException); 68 69 virtual 70 com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL 71 getTypes() throw (com::sun::star::uno::RuntimeException); 72 73 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL 74 getImplementationId() throw (com::sun::star::uno::RuntimeException); 75 76 virtual void SAL_CALL 77 handle(com::sun::star::uno::Reference< 78 com::sun::star::task::XInteractionRequest > const & 79 rRequest) 80 throw (com::sun::star::uno::RuntimeException); 81 82 static com::sun::star::uno::Sequence< rtl::OUString > 83 getSupportedServiceNames_static(); 84 85 static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > 86 SAL_CALL 87 createInstance(com::sun::star::uno::Reference< 88 com::sun::star::lang::XMultiServiceFactory > const &); 89 }; 90 91 #endif // UUI_IAHNDL_HXX 92 93