xref: /aoo42x/main/stoc/source/javavm/interact.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 #if !defined INCLUDED_STOC_JAVAVM_INTERACT_HXX
29 #define INCLUDED_STOC_JAVAVM_INTERACT_HXX
30 
31 #include "com/sun/star/task/XInteractionRequest.hpp"
32 #include "com/sun/star/uno/Any.hxx"
33 #include "com/sun/star/uno/Reference.hxx"
34 #include "com/sun/star/uno/Sequence.hxx"
35 #include "cppuhelper/implbase1.hxx"
36 #include "rtl/ref.hxx"
37 
38 namespace com { namespace sun { namespace star { namespace task {
39     class XInteractionContinuation;
40 } } } }
41 
42 namespace stoc_javavm {
43 
44 class InteractionRequest:
45     public cppu::WeakImplHelper1< com::sun::star::task::XInteractionRequest >
46 {
47 public:
48     explicit InteractionRequest(com::sun::star::uno::Any const & rRequest);
49 
50     virtual com::sun::star::uno::Any SAL_CALL getRequest()
51         throw (com::sun::star::uno::RuntimeException);
52 
53     virtual com::sun::star::uno::Sequence< com::sun::star::uno::Reference<
54         com::sun::star::task::XInteractionContinuation > > SAL_CALL
55     getContinuations() throw (com::sun::star::uno::RuntimeException);
56 
57     bool retry() const;
58 
59 private:
60     class RetryContinuation;
61 
62     InteractionRequest(InteractionRequest &); // not implemented
63     void operator =(InteractionRequest); // not implemented
64 
65     virtual ~InteractionRequest();
66 
67     com::sun::star::uno::Any m_aRequest;
68     com::sun::star::uno::Sequence< com::sun::star::uno::Reference<
69         com::sun::star::task::XInteractionContinuation > > m_aContinuations;
70     rtl::Reference< RetryContinuation > m_xRetryContinuation;
71 };
72 
73 }
74 
75 #endif // INCLUDED_STOC_JAVAVM_INTERACT_HXX
76