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: license.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 #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 ...
39 //_________________________________________________________________________________________________________________
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>
51 #include <properties.h>
53 #include <uielement/menubarmanager.hxx>
55 //_________________________________________________________________________________________________________________
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 //_________________________________________________________________________________________________________________
66 //_________________________________________________________________________________________________________________
67 #include <cppuhelper/propshlp.hxx>
68 #include <cppuhelper/interfacecontainer.hxx>
69 #include <cppuhelper/weak.hxx>
73 class License
: public css::lang::XTypeProvider
,
74 public css::lang::XServiceInfo
,
75 public css::task::XJob
,
76 public css::util::XCloseable
,
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
83 css::uno::Reference
< css::lang::XMultiServiceFactory
> m_xFactory
;
84 sal_Bool m_bTerminate
;
86 License( const com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
>& rSMGR
);
89 /** declaration of XInterface, XTypeProvider, XServiceInfo */
90 FWK_DECLARE_XINTERFACE
91 FWK_DECLARE_XTYPEPROVIDER
94 DECL_STATIC_LINK( License
, Terminate
, void* );
98 any execute([in] sequence< ::com::sun::star::beans::NamedValue > Arguments )
100 ::com::sun::star::lang::IllegalArgumentException,
101 ::com::sun::star::uno::Exception );
103 virtual css::uno::Any SAL_CALL
execute(const css::uno::Sequence
<css::beans::NamedValue
>& args
)
104 throw( css::lang::IllegalArgumentException
, css::uno::Exception
);
108 void close( [in] boolean DeliverOwnership ) raises(CloseVetoException );
110 virtual void SAL_CALL
close(sal_Bool bDeliverOwnership
) throw (css::util::CloseVetoException
);
114 [oneway] void addCloseListener([in] XCloseListenerListener );
115 [oneway] void removeCloseListener([in] XCloseListenerListener );
117 virtual void SAL_CALL
addCloseListener(const css::uno::Reference
< css::util::XCloseListener
>& aListener
) throw (css::uno::RuntimeException
);
118 virtual void SAL_CALL
removeCloseListener(const css::uno::Reference
< css::util::XCloseListener
>& aListener
) throw (css::uno::RuntimeException
);
122 } // namespace framework
124 #endif // __FRAMEWORK_SERVICES_LAYOUTMANAGER_HXX_