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