1*b16fc349SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*b16fc349SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*b16fc349SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*b16fc349SAndrew Rist * distributed with this work for additional information 6*b16fc349SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*b16fc349SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*b16fc349SAndrew Rist * "License"); you may not use this file except in compliance 9*b16fc349SAndrew Rist * with the License. You may obtain a copy of the License at 10*b16fc349SAndrew Rist * 11*b16fc349SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*b16fc349SAndrew Rist * 13*b16fc349SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*b16fc349SAndrew Rist * software distributed under the License is distributed on an 15*b16fc349SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b16fc349SAndrew Rist * KIND, either express or implied. See the License for the 17*b16fc349SAndrew Rist * specific language governing permissions and limitations 18*b16fc349SAndrew Rist * under the License. 19*b16fc349SAndrew Rist * 20*b16fc349SAndrew Rist *************************************************************/ 21*b16fc349SAndrew Rist 22*b16fc349SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef UUI_INTERACTIONHANDLER_HXX 25cdf0e10cSrcweir #define UUI_INTERACTIONHANDLER_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "com/sun/star/lang/XInitialization.hpp" 28cdf0e10cSrcweir #include "com/sun/star/lang/XServiceInfo.hpp" 29cdf0e10cSrcweir #include "com/sun/star/task/XInteractionHandler2.hpp" 30cdf0e10cSrcweir #include "cppuhelper/implbase3.hxx" 31cdf0e10cSrcweir 32cdf0e10cSrcweir class UUIInteractionHelper; 33cdf0e10cSrcweir 34cdf0e10cSrcweir class UUIInteractionHandler: 35cdf0e10cSrcweir public cppu::WeakImplHelper3< com::sun::star::lang::XServiceInfo, 36cdf0e10cSrcweir com::sun::star::lang::XInitialization, 37cdf0e10cSrcweir com::sun::star::task::XInteractionHandler2 > 38cdf0e10cSrcweir { 39cdf0e10cSrcweir public: 40cdf0e10cSrcweir static char const m_aImplementationName[]; 41cdf0e10cSrcweir 42cdf0e10cSrcweir static com::sun::star::uno::Sequence< rtl::OUString > 43cdf0e10cSrcweir getSupportedServiceNames_static(); 44cdf0e10cSrcweir 45cdf0e10cSrcweir static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > 46cdf0e10cSrcweir SAL_CALL 47cdf0e10cSrcweir createInstance( 48cdf0e10cSrcweir com::sun::star::uno::Reference< 49cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory > const & 50cdf0e10cSrcweir rServiceFactory) 51cdf0e10cSrcweir SAL_THROW((com::sun::star::uno::Exception)); 52cdf0e10cSrcweir 53cdf0e10cSrcweir private: 54cdf0e10cSrcweir com::sun::star::uno::Reference< 55cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory; 56cdf0e10cSrcweir UUIInteractionHelper * m_pImpl; 57cdf0e10cSrcweir 58cdf0e10cSrcweir UUIInteractionHandler(UUIInteractionHandler &); // not implemented 59cdf0e10cSrcweir void operator =(UUIInteractionHandler); // not implemented 60cdf0e10cSrcweir 61cdf0e10cSrcweir UUIInteractionHandler(com::sun::star::uno::Reference< 62cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory > 63cdf0e10cSrcweir const & rServiceFactory) 64cdf0e10cSrcweir SAL_THROW(()); 65cdf0e10cSrcweir 66cdf0e10cSrcweir virtual ~UUIInteractionHandler() SAL_THROW(()); 67cdf0e10cSrcweir 68cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getImplementationName() 69cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 70cdf0e10cSrcweir 71cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & 72cdf0e10cSrcweir rServiceName) 73cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 74cdf0e10cSrcweir 75cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL 76cdf0e10cSrcweir getSupportedServiceNames() 77cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 78cdf0e10cSrcweir 79cdf0e10cSrcweir virtual void SAL_CALL 80cdf0e10cSrcweir initialize( 81cdf0e10cSrcweir com::sun::star::uno::Sequence< com::sun::star::uno::Any > const & 82cdf0e10cSrcweir rArguments) 83cdf0e10cSrcweir throw (com::sun::star::uno::Exception); 84cdf0e10cSrcweir 85cdf0e10cSrcweir virtual void SAL_CALL 86cdf0e10cSrcweir handle(com::sun::star::uno::Reference< 87cdf0e10cSrcweir com::sun::star::task::XInteractionRequest > const & 88cdf0e10cSrcweir rRequest) 89cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 90cdf0e10cSrcweir 91cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL 92cdf0e10cSrcweir handleInteractionRequest( 93cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& _Request 94cdf0e10cSrcweir ) throw ( ::com::sun::star::uno::RuntimeException ); 95cdf0e10cSrcweir }; 96cdf0e10cSrcweir 97cdf0e10cSrcweir #endif // UUI_INTERACTIONHANDLER_HXX 98