merge the formfield patch from ooo-build
[ooovba.git] / framework / inc / services / license.hxx
blobef498b10faabd2a53867f8aa0300af00b97ac430
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: license.hxx,v $
10 * $Revision: 1.5 $
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 #ifndef __FRAMEWORK_SERVICES_LICENSE_HXX_
32 #define __FRAMEWORK_SERVICES_LICENSE_HXX_
34 /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble
35 with solaris headers ...
37 #include <vector>
39 //_________________________________________________________________________________________________________________
40 // my own includes
41 //_________________________________________________________________________________________________________________
42 #include <threadhelp/threadhelpbase.hxx>
43 #include <threadhelp/resetableguard.hxx>
44 #include <threadhelp/writeguard.hxx>
45 #include <threadhelp/readguard.hxx>
46 #include <macros/generic.hxx>
47 #include <macros/xinterface.hxx>
48 #include <macros/xtypeprovider.hxx>
49 #include <macros/xserviceinfo.hxx>
50 #include <stdtypes.h>
51 #include <properties.h>
52 #include <stdtypes.h>
53 #include <uielement/menubarmanager.hxx>
55 //_________________________________________________________________________________________________________________
56 // interface includes
57 //_________________________________________________________________________________________________________________
58 #include <com/sun/star/lang/XServiceInfo.hpp>
59 #include <com/sun/star/lang/XTypeProvider.hpp>
60 #include <com/sun/star/task/XJob.hpp>
61 #include <com/sun/star/util/XCloseable.hpp>
62 #include <com/sun/star/util/CloseVetoException.hpp>
64 //_________________________________________________________________________________________________________________
65 // other includes
66 //_________________________________________________________________________________________________________________
67 #include <cppuhelper/propshlp.hxx>
68 #include <cppuhelper/interfacecontainer.hxx>
69 #include <cppuhelper/weak.hxx>
71 namespace framework
73 class License : public css::lang::XTypeProvider ,
74 public css::lang::XServiceInfo ,
75 public css::task::XJob ,
76 public css::util::XCloseable ,
77 // base classes
78 // Order is neccessary for right initialization!
79 private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
80 public ::cppu::OWeakObject // => XWeak, XInterface
82 private:
83 css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory;
84 sal_Bool m_bTerminate;
85 public:
86 License( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMGR );
87 virtual ~License();
89 /** declaration of XInterface, XTypeProvider, XServiceInfo */
90 FWK_DECLARE_XINTERFACE
91 FWK_DECLARE_XTYPEPROVIDER
92 DECLARE_XSERVICEINFO
94 #if 0
95 DECL_STATIC_LINK( License, Terminate, void* );
96 #endif
99 XJob...
100 any execute([in] sequence< ::com::sun::star::beans::NamedValue > Arguments )
101 raises(
102 ::com::sun::star::lang::IllegalArgumentException,
103 ::com::sun::star::uno::Exception );
105 virtual css::uno::Any SAL_CALL execute(const css::uno::Sequence<css::beans::NamedValue>& args)
106 throw( css::lang::IllegalArgumentException, css::uno::Exception);
109 XCLoseable
110 void close( [in] boolean DeliverOwnership ) raises(CloseVetoException );
112 virtual void SAL_CALL close(sal_Bool bDeliverOwnership) throw (css::util::CloseVetoException);
115 XCloseVroadcaster
116 [oneway] void addCloseListener([in] XCloseListenerListener );
117 [oneway] void removeCloseListener([in] XCloseListenerListener );
119 virtual void SAL_CALL addCloseListener(const css::uno::Reference< css::util::XCloseListener >& aListener) throw (css::uno::RuntimeException);
120 virtual void SAL_CALL removeCloseListener(const css::uno::Reference< css::util::XCloseListener >& aListener) throw (css::uno::RuntimeException);
124 } // namespace framework
126 #endif // __FRAMEWORK_SERVICES_LAYOUTMANAGER_HXX_