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