![]() |
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 | State { InactiveState, ActiveState, CanceledState, FinishedState } |
QContactAbstractRequest () | |
virtual | ~QContactAbstractRequest () |
QContactManager::Error | error () const |
bool | isActive () const |
bool | isCanceled () const |
bool | isFinished () const |
bool | isInactive () const |
QContactManager * | manager () const |
void | setManager ( QContactManager * manager ) |
State | state () const |
RequestType | type () const |
bool | cancel () |
bool | start () |
bool | waitForFinished ( int msecs = 0 ) |
void | resultsAvailable () |
void | stateChanged ( QContactAbstractRequest::State newState ) |
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::InactiveState | 0 | Operation not yet started |
QContactAbstractRequest::ActiveState | 1 | Operation started, not yet finished |
QContactAbstractRequest::CanceledState | 2 | Operation is finished due to cancellation |
QContactAbstractRequest::FinishedState | 3 | 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 true if the request is in the QContactAbstractRequest::ActiveState state; otherwise, returns false
See also state().
Returns true if the request is in the QContactAbstractRequest::CanceledState; otherwise, returns false
See also state().
Returns true if the request is in the QContactAbstractRequest::FinishedState; otherwise, returns false
See also state().
Returns true if the request is in the QContactAbstractRequest::InactiveState state; otherwise, returns false
See also state().
Returns a pointer to the manager of which this request instance requests operations
See also setManager().
This signal is emitted when new results are available. Results can include the operation error which may be accessed via error(), or derived-class-specific results which are accessible through the derived class API.
See also error().
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 state of the request.
This signal is emitted when the state of the request is changed. The new state of the request will be contained in newState.
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. Some backends are unable to support this operation safely, and will return false immediately.
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Mobility Project 1.0.0 |