merge the formfield patch from ooo-build
[ooovba.git] / configmgr / source / inc / simpleinteractionrequest.hxx
blob852216ff8857343c2d0fcd91fd81debfdf3664ba
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: simpleinteractionrequest.hxx,v $
10 * $Revision: 1.4.18.1 $
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 CONFIGMGR_SIMPLEINTERACTIONREQUEST_HXX
32 #define CONFIGMGR_SIMPLEINTERACTIONREQUEST_HXX
34 #include "interactionrequest.hxx"
36 // this file was copied and adapted from the corresponding file in module ucbhelper
38 namespace configmgr {
39 namespace apihelper {
41 namespace uno = com::sun::star::uno;
42 /**
43 This class implements a simple interaction request. The user must not deal
44 with XInteractionContinuations directly, but can use constants that are
45 mapped internally to the according objects. This class encapsulates the
46 standard Interaction Continuations "Abort", "Retry", "Approve" and
47 "Disaprrove". Instances can be passed directly to
48 XInteractionHandler::handle(...).
50 @see InteractionRequest
51 @see InteractionAbort
52 @see InteractionRetry
53 @see InteractionApprove
54 @see InteractionDisapprove
56 class SimpleInteractionRequest : public InteractionRequest
58 public:
59 /**
60 * Constructor.
62 * @param rRequest is the exception describing the error.
63 * @param nContinuations contains the possible "answers" for the request.
64 * This can be any of the CONTINUATION_* constants combinations
65 * listed above.
67 SimpleInteractionRequest( const uno::Any & rRequest,
68 const sal_uInt32 nContinuations );
70 /**
71 * After passing this request to XInteractionHandler::handle, this method
72 * returns the continuation that was choosen by the interaction handler.
74 * @return the continuation choosen by an interaction handler or
75 * CONTINUATION_UNKNOWN, if the request was not (yet) handled.
77 sal_uInt32 getResponse() const;
80 /** These are the constants that can be passed to the constructor of class
81 * SimpleInteractionRequest and that are returned by method
82 * SimpleInteractionRequest::getResponse().
85 /** The request was not (yet) handled by the interaction handler. */
86 const sal_uInt32 CONTINUATION_UNKNOWN = 0;
88 /** The interaction handler selected XInteractionAbort. */
89 const sal_uInt32 CONTINUATION_ABORT = 1;
91 /** The interaction handler selected XInteractionRetry. */
92 const sal_uInt32 CONTINUATION_RETRY = 2;
94 /** The interaction handler selected XInteractionApprove. */
95 const sal_uInt32 CONTINUATION_APPROVE = 4;
97 /** The interaction handler selected XInteractionDisapprove. */
98 const sal_uInt32 CONTINUATION_DISAPPROVE = 8;
101 } // namespace apihelper
102 } // namespace configmgr
104 #endif /* !CONFIGMGR_SIMPLEINTERACTIONREQUEST_HXX */