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