![]() |
Home · All Classes · All Functions · | ![]() |
The QContactAbstractRequest class provides a mechanism for asynchronous requests to be made of a manager if it supports them. More...
#include <QContactAbstractRequest>
Inherits QObject.
Inherited by QContactDetailDefinitionFetchRequest, QContactDetailDefinitionRemoveRequest, QContactDetailDefinitionSaveRequest, QContactFetchRequest, QContactLocalIdFetchRequest, QContactRelationshipFetchRequest, QContactRelationshipRemoveRequest, QContactRelationshipSaveRequest, QContactRemoveRequest, and QContactSaveRequest.
enum | RequestType { InvalidRequest, ContactFetchRequest, ContactLocalIdFetchRequest, ContactRemoveRequest, ..., RelationshipSaveRequest } |
enum | Status { Inactive, Active, Cancelling, Cancelled, Finished } |
QContactAbstractRequest () | |
virtual | ~QContactAbstractRequest () |
QContactManager::Error | error () const |
QList<QContactManager::Error> | errors () const |
bool | isActive () const |
bool | isFinished () const |
QContactManager * | manager () const |
void | setManager ( QContactManager * manager ) |
Status | status () const |
RequestType | type () const |
bool | cancel () |
bool | start () |
bool | waitForFinished ( int msecs = 0 ) |
bool | waitForProgress ( int msecs = 0 ) |
QContactAbstractRequest ( QContactAbstractRequestPrivate * otherd ) |
The QContactAbstractRequest class provides a mechanism for asynchronous requests to be made of a manager if it supports them.
It allows a client to asynchronously request some functionality of a particular QContactManager.
Enumerates the various possible types of asynchronous requests
Constant | Value | Description |
---|---|---|
QContactAbstractRequest::InvalidRequest | 0 | An invalid request |
QContactAbstractRequest::ContactFetchRequest | 1 | A request to fetch a list of contacts |
QContactAbstractRequest::ContactLocalIdFetchRequest | 2 | A request to fetch a list of local contact ids |
QContactAbstractRequest::ContactRemoveRequest | 3 | A request to remove a list of contacts |
QContactAbstractRequest::ContactSaveRequest | 4 | A request to save a list of contacts |
QContactAbstractRequest::DetailDefinitionFetchRequest | 5 | A request to fetch a collection of detail definitions |
QContactAbstractRequest::DetailDefinitionRemoveRequest | 6 | A request to remove a list of detail definitions |
QContactAbstractRequest::DetailDefinitionSaveRequest | 7 | A request to save a list of detail definitions |
QContactAbstractRequest::RelationshipFetchRequest | 8 | A request to fetch relationships between contacts |
QContactAbstractRequest::RelationshipRemoveRequest | 9 | A request to remove any relationships which match the request criteria |
QContactAbstractRequest::RelationshipSaveRequest | 10 | A request to save a list of relationships |
Enumerates the various states that a request may be in at any given time
Constant | Value | Description |
---|---|---|
QContactAbstractRequest::Inactive | 0 | Operation not yet started |
QContactAbstractRequest::Active | 1 | Operation started, not yet finished |
QContactAbstractRequest::Cancelling | 2 | Operation started then cancelled, not yet finished |
QContactAbstractRequest::Cancelled | 3 | Operation is finished due to cancellation |
QContactAbstractRequest::Finished | 4 | Operation successfully completed |
Constructs a new, invalid asynchronous request
Constructs a new request from the given request data otherd
Cleans up the memory used by this request
Attempts to cancel the request. Returns false if the request is not in the QContactAbstractRequest::Active state, or if the request is unable to be cancelled by the manager engine; otherwise returns true.
Returns the overall error of the most recent asynchronous operation
Returns the list of errors which occurred during the most recent asynchronous operation. Each individual error in the list corresponds to a result in the result list.
Returns true if the request is pending, processing or cancelling; otherwise, returns false.
See also status().
Returns true if the request is finished or cancelled; otherwise, returns false.
See also status().
Returns a pointer to the manager of which this request instance requests operations
See also setManager().
Sets the manager of which this request instance requests operations to manager
See also manager().
Attempts to start the request. Returns false if the request is not in the QContactAbstractRequest::Inactive, QContactAbstractRequest::Finished or QContactAbstractRequest::Cancelled states, or if the request was unable to be performed by the manager engine; otherwise returns true.
Returns the current status of the request.
See also isFinished() and isActive().
Returns the type of this asynchronous request
Blocks until the request has been completed by the manager engine, or until msecs milliseconds has elapsed. If msecs is zero, this function will block indefinitely. Returns true if the request was cancelled or completed successfully within the given period, otherwise false.
Blocks until the manager engine signals that more partial results are available for the request, or until msecs milliseconds has elapsed. If msecs is zero, this function will block indefinitely. Returns true if the request was cancelled or more partial results were made available within the given period, otherwise false.
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Mobility Project 1.0.0 (Technical Preview) |