sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svtools / javainteractionhandler.hxx
blobeeed6eb1cabf468f9bc160c2d883334d81b686dc
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: javainteractionhandler.hxx,v $
10 * $Revision: 1.3 $
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 _SVTOOLS_JAVAINTERACTION_HXX_
32 #define _SVTOOLS_JAVAINTERACTION_HXX_
34 #ifndef INCLUDED_SVTDLLAPI_H
35 #include "bf_svtools/svtdllapi.h"
36 #endif
37 #ifndef _OSL_MUTEX_HXX_
38 #include <osl/mutex.hxx>
39 #endif
40 #ifndef _GEN_HXX
41 #include <tools/gen.hxx>
42 #endif
44 #include <com/sun/star/task/XInteractionRequest.hpp>
46 #ifndef _SVTOOLS_JAVACONTEXT_HXX_
47 #include <bf_svtools/javacontext.hxx>
48 #endif
50 #define JAVA_INTERACTION_HANDLER_NAME "java-vm.interaction-handler"
52 namespace binfilter
54 // We cannot derive from cppu::WeakImplHelper because we would export the inline
55 //generated class. This conflicts with other libraries if they use the same inline
56 //class.
58 class JavaInteractionHandler:
59 public com::sun::star::task::XInteractionHandler
61 public:
62 JavaInteractionHandler();
63 JavaInteractionHandler(bool bReportErrorOnce);
65 // XInterface
66 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
67 const ::com::sun::star::uno::Type& aType )
68 throw (::com::sun::star::uno::RuntimeException);
70 virtual void SAL_CALL acquire() throw();
72 virtual void SAL_CALL release() throw();
74 // XCurrentContext
75 virtual void SAL_CALL handle( const com::sun::star::uno::Reference<
76 com::sun::star::task::XInteractionRequest >& Request )
77 throw (com::sun::star::uno::RuntimeException);
79 private:
80 oslInterlockedCount m_aRefCount;
81 JavaInteractionHandler(JavaInteractionHandler const&); //not implemented
82 JavaInteractionHandler& operator = (JavaInteractionHandler const &); //not implemented
83 virtual ~JavaInteractionHandler();
84 bool m_bShowErrorsOnce;
85 bool m_bJavaDisabled_Handled;
86 bool m_bInvalidSettings_Handled;
87 bool m_bJavaNotFound_Handled;
88 bool m_bVMCreationFailure_Handled;
89 bool m_bRestartRequired_Handled;
90 USHORT m_nResult_JavaDisabled;
94 #endif // _DESKTOP_JAVAINTERACTION_HXX_