1*0a1e2f0eSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*0a1e2f0eSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*0a1e2f0eSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*0a1e2f0eSAndrew Rist * distributed with this work for additional information 6*0a1e2f0eSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*0a1e2f0eSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*0a1e2f0eSAndrew Rist * "License"); you may not use this file except in compliance 9*0a1e2f0eSAndrew Rist * with the License. You may obtain a copy of the License at 10*0a1e2f0eSAndrew Rist * 11*0a1e2f0eSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*0a1e2f0eSAndrew Rist * 13*0a1e2f0eSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*0a1e2f0eSAndrew Rist * software distributed under the License is distributed on an 15*0a1e2f0eSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*0a1e2f0eSAndrew Rist * KIND, either express or implied. See the License for the 17*0a1e2f0eSAndrew Rist * specific language governing permissions and limitations 18*0a1e2f0eSAndrew Rist * under the License. 19*0a1e2f0eSAndrew Rist * 20*0a1e2f0eSAndrew Rist *************************************************************/ 21*0a1e2f0eSAndrew Rist 22*0a1e2f0eSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir /* makefile.mk changed 20030409, LO */ 25cdf0e10cSrcweir 26cdf0e10cSrcweir #ifndef _SOCOMP_EVALUATION_HXX_ 27cdf0e10cSrcweir #define _SOCOMP_EVALUATION_HXX_ 28cdf0e10cSrcweir 29cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 30cdf0e10cSrcweir #include <com/sun/star/uno/Exception.hpp> 31cdf0e10cSrcweir #include <com/sun/star/uno/Reference.h> 32cdf0e10cSrcweir #include <com/sun/star/lang/XComponent.hpp> 33cdf0e10cSrcweir #include <com/sun/star/lang/XEventListener.hpp> 34cdf0e10cSrcweir #include <com/sun/star/beans/XExactName.hpp> 35cdf0e10cSrcweir #include <com/sun/star/beans/XMaterialHolder.hpp> 36cdf0e10cSrcweir #include <cppuhelper/implbase4.hxx> 37cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.h> 38cdf0e10cSrcweir 39cdf0e10cSrcweir #include <com/sun/star/lang/XSingleServiceFactory.hpp> 40cdf0e10cSrcweir #include <osl/mutex.hxx> 41cdf0e10cSrcweir 42cdf0e10cSrcweir using namespace ::com::sun::star::uno; 43cdf0e10cSrcweir using namespace ::com::sun::star::lang; 44cdf0e10cSrcweir using namespace ::com::sun::star::beans; 45cdf0e10cSrcweir 46cdf0e10cSrcweir namespace desktop { 47cdf0e10cSrcweir 48cdf0e10cSrcweir class SOEvaluation : public ::cppu::WeakImplHelper4< XExactName, XMaterialHolder, XComponent, XServiceInfo > 49cdf0e10cSrcweir { 50cdf0e10cSrcweir ::osl::Mutex m_aMutex; 51cdf0e10cSrcweir ::cppu::OInterfaceContainerHelper m_aListeners; 52cdf0e10cSrcweir Reference< XMultiServiceFactory > m_xServiceManager; 53cdf0e10cSrcweir 54cdf0e10cSrcweir public: 55cdf0e10cSrcweir SOEvaluation( const Reference < XMultiServiceFactory >& xFactory ); 56cdf0e10cSrcweir virtual ~SOEvaluation(); 57cdf0e10cSrcweir 58cdf0e10cSrcweir static Reference< XSingleServiceFactory > GetSOEvaluationFactory( Reference< XMultiServiceFactory > & xSMgr ); 59cdf0e10cSrcweir static ::rtl::OUString GetImplementationName(); 60cdf0e10cSrcweir static Sequence< rtl::OUString > GetSupportedServiceNames(); 61cdf0e10cSrcweir 62cdf0e10cSrcweir // XComponent 63cdf0e10cSrcweir virtual void SAL_CALL dispose() throw ( RuntimeException ); 64cdf0e10cSrcweir virtual void SAL_CALL addEventListener( const Reference< XEventListener > & aListener) throw ( RuntimeException ); 65cdf0e10cSrcweir virtual void SAL_CALL removeEventListener(const Reference< XEventListener > & aListener) throw ( RuntimeException ); 66cdf0e10cSrcweir 67cdf0e10cSrcweir // XExactName 68cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getExactName( const rtl::OUString& rApproximateName ) throw ( RuntimeException ); 69cdf0e10cSrcweir 70cdf0e10cSrcweir // XMaterialHolder 71cdf0e10cSrcweir virtual Any SAL_CALL getMaterial() throw ( RuntimeException ); 72cdf0e10cSrcweir 73cdf0e10cSrcweir // XServiceInfo 74cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() throw ( RuntimeException ); 75cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName ) throw ( RuntimeException ); 76cdf0e10cSrcweir virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw ( RuntimeException ); 77cdf0e10cSrcweir 78cdf0e10cSrcweir static const char* interfaces[]; 79cdf0e10cSrcweir static const char* implementationName; 80cdf0e10cSrcweir static const char* serviceName; 81cdf0e10cSrcweir static Reference<XInterface> SAL_CALL CreateInstance( 82cdf0e10cSrcweir const Reference< XMultiServiceFactory >&); 83cdf0e10cSrcweir 84cdf0e10cSrcweir 85cdf0e10cSrcweir 86cdf0e10cSrcweir }; 87cdf0e10cSrcweir } 88cdf0e10cSrcweir #endif // _SOCOMP_EVALUATION_HXX_ 89