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 /* makefile.mk changed 20030409, LO */
25 
26 #ifndef _SOCOMP_EVALUATION_HXX_
27 #define _SOCOMP_EVALUATION_HXX_
28 
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 #include <com/sun/star/uno/Exception.hpp>
31 #include <com/sun/star/uno/Reference.h>
32 #include <com/sun/star/lang/XComponent.hpp>
33 #include <com/sun/star/lang/XEventListener.hpp>
34 #include <com/sun/star/beans/XExactName.hpp>
35 #include <com/sun/star/beans/XMaterialHolder.hpp>
36 #include <cppuhelper/implbase4.hxx>
37 #include <cppuhelper/interfacecontainer.h>
38 
39 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
40 #include <osl/mutex.hxx>
41 
42 using namespace ::com::sun::star::uno;
43 using namespace ::com::sun::star::lang;
44 using namespace ::com::sun::star::beans;
45 
46 namespace desktop {
47 
48 class SOEvaluation : public ::cppu::WeakImplHelper4< XExactName, XMaterialHolder, XComponent, XServiceInfo >
49 {
50     ::osl::Mutex						m_aMutex;
51     ::cppu::OInterfaceContainerHelper	m_aListeners;
52     Reference< XMultiServiceFactory >	m_xServiceManager;
53 
54 public:
55                             SOEvaluation( const Reference < XMultiServiceFactory >& xFactory );
56     virtual                 ~SOEvaluation();
57 
58     static Reference< XSingleServiceFactory >	GetSOEvaluationFactory( Reference< XMultiServiceFactory > & xSMgr );
59     static ::rtl::OUString						GetImplementationName();
60     static Sequence< rtl::OUString >			GetSupportedServiceNames();
61 
62 	// XComponent
63     virtual void SAL_CALL				dispose() throw ( RuntimeException );
64     virtual void SAL_CALL				addEventListener( const Reference< XEventListener > & aListener) throw ( RuntimeException );
65     virtual void SAL_CALL				removeEventListener(const Reference< XEventListener > & aListener) throw ( RuntimeException );
66 
67 	// XExactName
68 	virtual rtl::OUString SAL_CALL		getExactName( const rtl::OUString& rApproximateName ) throw ( RuntimeException );
69 
70 	// XMaterialHolder
71 	virtual Any SAL_CALL				getMaterial() throw ( RuntimeException );
72 
73 	// XServiceInfo
74 	virtual ::rtl::OUString SAL_CALL	getImplementationName() throw ( RuntimeException );
75 	virtual sal_Bool SAL_CALL			supportsService( const ::rtl::OUString& rServiceName ) throw ( RuntimeException );
76 	virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw ( RuntimeException );
77 
78     static const char* interfaces[];
79     static const char* implementationName;
80     static const char* serviceName;
81     static Reference<XInterface> SAL_CALL CreateInstance(
82         const Reference< XMultiServiceFactory >&);
83 
84 
85 
86 };
87 }
88 #endif // _SOCOMP_EVALUATION_HXX_
89