xref: /aoo42x/main/framework/inc/services/license.hxx (revision cdf0e10c)
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 #ifndef __FRAMEWORK_SERVICES_LICENSE_HXX_
29 #define __FRAMEWORK_SERVICES_LICENSE_HXX_
30 
31 /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble
32                with solaris headers ...
33 */
34 #include <vector>
35 
36 //_________________________________________________________________________________________________________________
37 //	my own includes
38 //_________________________________________________________________________________________________________________
39 #include <threadhelp/threadhelpbase.hxx>
40 #include <threadhelp/resetableguard.hxx>
41 #include <threadhelp/writeguard.hxx>
42 #include <threadhelp/readguard.hxx>
43 #include <macros/generic.hxx>
44 #include <macros/xinterface.hxx>
45 #include <macros/xtypeprovider.hxx>
46 #include <macros/xserviceinfo.hxx>
47 #include <stdtypes.h>
48 #include <properties.h>
49 #include <stdtypes.h>
50 #include <uielement/menubarmanager.hxx>
51 
52 //_________________________________________________________________________________________________________________
53 //	interface includes
54 //_________________________________________________________________________________________________________________
55 #include <com/sun/star/lang/XServiceInfo.hpp>
56 #include <com/sun/star/lang/XTypeProvider.hpp>
57 #include <com/sun/star/task/XJob.hpp>
58 #include <com/sun/star/util/XCloseable.hpp>
59 #include <com/sun/star/util/CloseVetoException.hpp>
60 
61 //_________________________________________________________________________________________________________________
62 //	other includes
63 //_________________________________________________________________________________________________________________
64 #include <cppuhelper/propshlp.hxx>
65 #include <cppuhelper/interfacecontainer.hxx>
66 #include <cppuhelper/weak.hxx>
67 
68 namespace framework
69 {
70     class License : public  css::lang::XTypeProvider            ,
71                     public  css::lang::XServiceInfo             ,
72                     public  css::task::XJob                     ,
73                     public  css::util::XCloseable               ,
74                     // base classes
75                     // Order is neccessary for right initialization!
76                     private ThreadHelpBase						, // Struct for right initalization of mutex member! Must be first of baseclasses.
77                     public  ::cppu::OWeakObject                   // => XWeak, XInterface
78     {
79     private:
80         css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory;
81         sal_Bool m_bTerminate;
82     public:
83         License( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMGR );
84         virtual ~License();
85 
86         /** declaration of XInterface, XTypeProvider, XServiceInfo */
87 		FWK_DECLARE_XINTERFACE
88 		FWK_DECLARE_XTYPEPROVIDER
89 		DECLARE_XSERVICEINFO
90 
91 #if 0
92         DECL_STATIC_LINK( License, Terminate, void* );
93 #endif
94 
95         /*
96         XJob...
97         any execute([in] sequence< ::com::sun::star::beans::NamedValue > Arguments )
98             raises(
99 	            ::com::sun::star::lang::IllegalArgumentException,
100                 ::com::sun::star::uno::Exception );
101         */
102         virtual css::uno::Any SAL_CALL execute(const css::uno::Sequence<css::beans::NamedValue>& args)
103             throw( css::lang::IllegalArgumentException, css::uno::Exception);
104 
105         /*
106         XCLoseable
107         void close( [in] boolean DeliverOwnership ) raises(CloseVetoException );
108         */
109         virtual void SAL_CALL close(sal_Bool bDeliverOwnership) throw (css::util::CloseVetoException);
110 
111         /*
112         XCloseVroadcaster
113         [oneway] void addCloseListener([in] XCloseListenerListener );
114         [oneway] void removeCloseListener([in] XCloseListenerListener );
115         */
116         virtual void SAL_CALL addCloseListener(const css::uno::Reference< css::util::XCloseListener >& aListener) throw (css::uno::RuntimeException);
117         virtual void SAL_CALL removeCloseListener(const css::uno::Reference< css::util::XCloseListener >& aListener) throw (css::uno::RuntimeException);
118 
119 };
120 
121 } // namespace framework
122 
123 #endif // __FRAMEWORK_SERVICES_LAYOUTMANAGER_HXX_
124