1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 /* makefile.mk changed 20030409, LO */
29 
30 #ifndef _SOCOMP_EVALUATION_HXX_
31 #define _SOCOMP_EVALUATION_HXX_
32 
33 #include <com/sun/star/lang/XServiceInfo.hpp>
34 #include <com/sun/star/uno/Exception.hpp>
35 #include <com/sun/star/uno/Reference.h>
36 #include <com/sun/star/lang/XComponent.hpp>
37 #include <com/sun/star/lang/XEventListener.hpp>
38 #include <com/sun/star/beans/XExactName.hpp>
39 #include <com/sun/star/beans/XMaterialHolder.hpp>
40 #include <cppuhelper/implbase4.hxx>
41 #include <cppuhelper/interfacecontainer.h>
42 
43 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
44 #include <osl/mutex.hxx>
45 
46 using namespace ::com::sun::star::uno;
47 using namespace ::com::sun::star::lang;
48 using namespace ::com::sun::star::beans;
49 
50 namespace desktop {
51 
52 class SOEvaluation : public ::cppu::WeakImplHelper4< XExactName, XMaterialHolder, XComponent, XServiceInfo >
53 {
54     ::osl::Mutex						m_aMutex;
55     ::cppu::OInterfaceContainerHelper	m_aListeners;
56     Reference< XMultiServiceFactory >	m_xServiceManager;
57 
58 public:
59                             SOEvaluation( const Reference < XMultiServiceFactory >& xFactory );
60     virtual                 ~SOEvaluation();
61 
62     static Reference< XSingleServiceFactory >	GetSOEvaluationFactory( Reference< XMultiServiceFactory > & xSMgr );
63     static ::rtl::OUString						GetImplementationName();
64     static Sequence< rtl::OUString >			GetSupportedServiceNames();
65 
66 	// XComponent
67     virtual void SAL_CALL				dispose() throw ( RuntimeException );
68     virtual void SAL_CALL				addEventListener( const Reference< XEventListener > & aListener) throw ( RuntimeException );
69     virtual void SAL_CALL				removeEventListener(const Reference< XEventListener > & aListener) throw ( RuntimeException );
70 
71 	// XExactName
72 	virtual rtl::OUString SAL_CALL		getExactName( const rtl::OUString& rApproximateName ) throw ( RuntimeException );
73 
74 	// XMaterialHolder
75 	virtual Any SAL_CALL				getMaterial() throw ( RuntimeException );
76 
77 	// XServiceInfo
78 	virtual ::rtl::OUString SAL_CALL	getImplementationName() throw ( RuntimeException );
79 	virtual sal_Bool SAL_CALL			supportsService( const ::rtl::OUString& rServiceName ) throw ( RuntimeException );
80 	virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw ( RuntimeException );
81 
82     static const char* interfaces[];
83     static const char* implementationName;
84     static const char* serviceName;
85     static Reference<XInterface> SAL_CALL CreateInstance(
86         const Reference< XMultiServiceFactory >&);
87 
88 
89 
90 };
91 }
92 #endif // _SOCOMP_EVALUATION_HXX_
93