LibreOffice Module ucbhelper (master) 1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ucbhelper::InteractionRequest Class Reference

This class implements the interface XInteractionRequest. More...

#include <interactionrequest.hxx>

Inheritance diagram for ucbhelper::InteractionRequest:
[legend]
Collaboration diagram for ucbhelper::InteractionRequest:
[legend]

Public Member Functions

 InteractionRequest (const css::uno::Any &rRequest)
 Constructor. More...
 
void setContinuations (const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &rContinuations)
 This method sets the continuations for the request. More...
 
virtual css::uno::Any SAL_CALL getRequest () override
 
virtual css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL getContinuations () override
 
rtl::Reference< InteractionContinuation > const & getSelection () const
 After passing this request to XInteractionHandler::handle, this method returns the continuation that was chosen by the interaction handler. More...
 
void setSelection (const rtl::Reference< InteractionContinuation > &rxSelection)
 This method sets a continuation for the request. More...
 

Protected Member Functions

void setRequest (const css::uno::Any &rRequest)
 
 InteractionRequest ()
 
virtual ~InteractionRequest () override
 

Private Attributes

std::unique_ptr< InteractionRequest_Implm_pImpl
 

Detailed Description

This class implements the interface XInteractionRequest.

Instances can be passed directly to XInteractionHandler::handle(...). Each interaction request contains an exception describing the error and a number of interaction continuations describing the possible "answers" for the request. After the request was passed to XInteractionHandler::handle(...) the method getSelection() returns the continuation chosen by the interaction handler.

The typical usage of this class would be:

1) Create exception object that shall be handled by the interaction handler. 2) Create InteractionRequest, supply exception as ctor parameter 3) Create continuations needed and add them to a sequence 4) Supply the continuations to the InteractionRequest by calling setContinuations(...)

This class can also be used as base class for more specialized requests, like authentication requests.

Definition at line 65 of file interactionrequest.hxx.

Constructor & Destructor Documentation

◆ InteractionRequest() [1/2]

ucbhelper::InteractionRequest::InteractionRequest ( )
protected

◆ ~InteractionRequest()

virtual ucbhelper::InteractionRequest::~InteractionRequest ( )
overrideprotectedvirtual

◆ InteractionRequest() [2/2]

ucbhelper::InteractionRequest::InteractionRequest ( const css::uno::Any &  rRequest)

Constructor.

Parameters
rRequestis the exception describing the error.

Member Function Documentation

◆ getContinuations()

virtual css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL ucbhelper::InteractionRequest::getContinuations ( )
overridevirtual

◆ getRequest()

virtual css::uno::Any SAL_CALL ucbhelper::InteractionRequest::getRequest ( )
overridevirtual

◆ getSelection()

rtl::Reference< InteractionContinuation > const & ucbhelper::InteractionRequest::getSelection ( ) const

After passing this request to XInteractionHandler::handle, this method returns the continuation that was chosen by the interaction handler.

Returns
the continuation chosen by an interaction handler or an empty reference, if the request was not (yet) handled.

Referenced by ucbhelper::SimpleInteractionRequest::getResponse().

◆ setContinuations()

void ucbhelper::InteractionRequest::setContinuations ( const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &  rContinuations)

◆ setRequest()

void ucbhelper::InteractionRequest::setRequest ( const css::uno::Any &  rRequest)
protected

◆ setSelection()

void ucbhelper::InteractionRequest::setSelection ( const rtl::Reference< InteractionContinuation > &  rxSelection)

This method sets a continuation for the request.

It also can be used to reset the continuation set by a previous XInteractionHandler::handle call in order to use this request object more than once.

Parameters
rxSelectionis the interaction continuation to activate for the request or an empty reference in order to reset the current selection.

Referenced by ucbhelper::InteractionContinuation::recordSelection().

Member Data Documentation

◆ m_pImpl

std::unique_ptr<InteractionRequest_Impl> ucbhelper::InteractionRequest::m_pImpl
private

Definition at line 68 of file interactionrequest.hxx.


The documentation for this class was generated from the following file: