Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QDSActionRequest Class Reference
[QtBaseModule]

The QDSActionRequest class encapsulates a received action request. More...

    #include <QDSActionRequest>

Inherits QObject.

Public Functions

Additional Inherited Members


Detailed Description

The QDSActionRequest class encapsulates a received action request.

A Qt Extended Data Sharing (QDS) service provider can use the QDSActionRequest class to capture the context of received requests, and as an interface to respond to the request.

Applications seeking to utilise QDS services should use the QDSAction class to request a service; the QDSAction class will then create a QDSActionRequest instance and send it to the QDS service for processing.

See also QDSAction, QDSServiceInfo, and Qt Extended Data Sharing (QDS).


Member Function Documentation

QDSActionRequest::QDSActionRequest ( QObject * parent = 0 )

Constructs an empty request and attaches it to parent.

QDSActionRequest::QDSActionRequest ( const QDSActionRequest & other )

Constructs a deep copy of other.

QDSActionRequest::QDSActionRequest ( const QDSServiceInfo & serviceInfo, const QString & channel, QObject * parent = 0 )

Constructs an action request for a service with no request data. The service responding to the request is provided in serviceInfo and the channel for responding to the client is provided in channel. The request is attached to parent.

QDSActionRequest::QDSActionRequest ( const QDSServiceInfo & serviceInfo, const QDSData & requestData, const QString & channel, const QByteArray & auxiliary = QByteArray(), QObject * parent = 0 )

Constructs an action request for a service with requestData. The service responding to the request is provided in serviceInfo and the channel for responding to the client is provided in channel. auxiliary data can also be attached to the request. The request is attached to parent.

QDSActionRequest::~QDSActionRequest ()

Destructor

const QByteArray & QDSActionRequest::auxiliaryData () const

Returns the auxiliary data accompanying the request.

QString QDSActionRequest::errorMessage () const

Returns any error message generated during the request. If no error has been reported a null string will be returned.

bool QDSActionRequest::isComplete () const

Returns true if the request has been completely processed and a response has been sent to the client; otherwise returns false.

bool QDSActionRequest::isValid () const

Returns the validity of the request.

const QDSData & QDSActionRequest::requestData () const

Returns the request data.

bool QDSActionRequest::respond ()

Sends a response back to the client to indicate that the request has been processed correctly. This method is to be used for services which don't have response data.

Returns false if a response has already been sent or the service requires response data; otherwise returns true.

bool QDSActionRequest::respond ( const QDSData & responseData )

This is an overloaded member function, provided for convenience.

Sends responseData back to the client to indicate that the request has been processed correctly. This method is to be used for services which have response data.

Returns false if a response has already been sent or the service doesn't require response data; otherwise returns true.

bool QDSActionRequest::respond ( const QString & message )

This is an overloaded member function, provided for convenience.

Sends the error message message back to the client to indicate that an error has occured.

Returns false if a response has already been sent; otherwise returns true.

const QDSData & QDSActionRequest::responseData () const

Returns the response data.

const QDSServiceInfo & QDSActionRequest::serviceInfo () const

Returns the description of the service requested.

const QDSActionRequest & QDSActionRequest::operator= ( const QDSActionRequest & other )

Makes a deep copy of other and assigns it to this QDSActionRequest object. Returns a reference to this QDSActionRequest object.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3