LCOV - code coverage report
Current view: top level - include/ucbhelper - simpleinteractionrequest.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 1 0.0 %
Date: 2014-11-03 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_UCBHELPER_SIMPLEINTERACTIONREQUEST_HXX
      21             : #define INCLUDED_UCBHELPER_SIMPLEINTERACTIONREQUEST_HXX
      22             : 
      23             : #include <ucbhelper/interactionrequest.hxx>
      24             : #include <ucbhelper/ucbhelperdllapi.h>
      25             : 
      26             : namespace ucbhelper {
      27             : 
      28             : /** These are the constants that can be passed to the constructor of class
      29             :   * SimpleInteractionRequest and that are returned by method
      30             :   * SimpleInteractionRequest::getResponse().
      31             :   */
      32             : 
      33             : /** The request was not (yet) handled by the interaction handler. */
      34             : static const sal_Int32 CONTINUATION_UNKNOWN    = 0;
      35             : 
      36             : /** The interaction handler selected XInteractionAbort. */
      37             : static const sal_Int32 CONTINUATION_ABORT      = 1;
      38             : 
      39             : /** The interaction handler selected XInteractionRetry. */
      40             : static const sal_Int32 CONTINUATION_RETRY      = 2;
      41             : 
      42             : /** The interaction handler selected XInteractionApprove. */
      43             : static const sal_Int32 CONTINUATION_APPROVE    = 4;
      44             : 
      45             : /** The interaction handler selected XInteractionDisapprove. */
      46             : static const sal_Int32 CONTINUATION_DISAPPROVE = 8;
      47             : 
      48             : /**
      49             :   * This class implements a simple interaction request. The user must not deal
      50             :   * with XInteractionContinuations directly, but can use constants that are
      51             :   * mapped internally to the according objects. This class encapsulates the
      52             :   * standard Interaction Continuations "Abort", "Retry", "Approve" and
      53             :   * "Disaprrove". Instances can be passed directly to
      54             :   * XInteractionHandler::handle(...).
      55             :   *
      56             :   * @see InteractionRequest
      57             :   * @see InteractionAbort
      58             :   * @see InteractionRetry
      59             :   * @see InteractionApprove
      60             :   * @see InteractionDisapprove
      61             :   */
      62           0 : class UCBHELPER_DLLPUBLIC SimpleInteractionRequest : public ucbhelper::InteractionRequest
      63             : {
      64             : public:
      65             :     /**
      66             :       * Constructor.
      67             :       *
      68             :       * @param rRequest is the exception describing the error.
      69             :       * @param nContinuations contains the possible "answers" for the request.
      70             :       *        This can be any of the CONTINUATION_* constants combinations
      71             :       *        listed above.
      72             :       */
      73             :     SimpleInteractionRequest( const com::sun::star::uno::Any & rRequest,
      74             :                               const sal_Int32 nContinuations );
      75             : 
      76             :     /**
      77             :       * After passing this request to XInteractionHandler::handle, this method
      78             :       * returns the continuation that was chosen by the interaction handler.
      79             :       *
      80             :       * @return the continuation chosen by an interaction handler or
      81             :       *         CONTINUATION_UNKNOWN, if the request was not (yet) handled.
      82             :       */
      83             :     sal_Int32 getResponse() const;
      84             : };
      85             : 
      86             : } // namespace ucbhelper
      87             : 
      88             : #endif /* ! INCLUDED_UCBHELPER_SIMPLEINTERACTIONREQUEST_HXX */
      89             : 
      90             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10