Qt Mobility Reference Documentation

QLandmarkAbstractRequest Class Reference

The QLandmarkAbstractRequest class provides the interface from which all asynchronous request classes inherit. More...

 #include <QLandmarkAbstractRequest>

Inherited by QLandmarkCategoryFetchRequest, QLandmarkCategoryIdFetchRequest, QLandmarkCategoryRemoveRequest, QLandmarkCategorySaveRequest, QLandmarkExportRequest, QLandmarkFetchRequest, QLandmarkIdFetchRequest, QLandmarkImportRequest, QLandmarkRemoveRequest, and QLandmarkSaveRequest.


Public Types

enum RequestType { InvalidRequest, LandmarkIdFetchRequest, CategoryIdFetchRequest, LandmarkFetchRequest, ..., ExportRequest }
enum State { InactiveState, ActiveState, FinishedState }

Public Functions

QLandmarkAbstractRequest ( QLandmarkManager * manager, QObject * parent = 0 )
virtual ~QLandmarkAbstractRequest ()
QLandmarkManager::Error error () const
QString errorString () const
bool isActive () const
bool isFinished () const
bool isInactive () const
QLandmarkManager * manager () const
void setManager ( QLandmarkManager * manager )
State state ()
RequestType type () const

Public Slots

bool cancel ()
bool start ()
bool waitForFinished ( int msecs = 0 )

Signals

void resultsAvailable ()
void stateChanged ( QLandmarkAbstractRequest::State newState )

Detailed Description

The QLandmarkAbstractRequest class provides the interface from which all asynchronous request classes inherit.

It allows a client to asynchronously request some functionality from a QLandmarkManager.


Member Type Documentation

enum QLandmarkAbstractRequest::RequestType

Defines the possible types of asynchronous requests.

ConstantValueDescription
QLandmarkAbstractRequest::InvalidRequest0An invalid request
QLandmarkAbstractRequest::LandmarkIdFetchRequest1A request to fetch a list of landmark identifiers.
QLandmarkAbstractRequest::CategoryIdFetchRequest2A request to fetch a list of catgory identifiers.
QLandmarkAbstractRequest::LandmarkFetchRequest3A request to fetch a list of landmarks
QLandmarkAbstractRequest::CategoryFetchRequest4A request to fetch a list of categories
QLandmarkAbstractRequest::LandmarkSaveRequest5A request to save a list of landmarks.
QLandmarkAbstractRequest::LandmarkRemoveRequest6A request to remove a list of landmarks.
QLandmarkAbstractRequest::CategorySaveRequest7A request to save a list of categories.
QLandmarkAbstractRequest::CategoryRemoveRequest8A request to remove a list of categories.
QLandmarkAbstractRequest::ImportRequest9A request import landmarks.
QLandmarkAbstractRequest::ExportRequest10A request export landmarks.

enum QLandmarkAbstractRequest::State

Defines the possible states of asynchronous requests.

ConstantValueDescription
QLandmarkAbstractRequest::InactiveState0Operation not yet started.
QLandmarkAbstractRequest::ActiveState1Operation started, not yet finished.
QLandmarkAbstractRequest::FinishedState2Operation completed. (Can be mean either successful or unsuccessful completion).

Member Function Documentation

QLandmarkAbstractRequest::QLandmarkAbstractRequest ( QLandmarkManager * manager, QObject * parent = 0 )

Constructs a new, invalid asynchronous request with the given manager and parent.

QLandmarkAbstractRequest::~QLandmarkAbstractRequest () [virtual]

Destroys the asynchronous request

bool QLandmarkAbstractRequest::cancel () [slot]

Attempts to cancel the request.

Returns true if the request was canceled, otherwise false.

See also start().

QLandmarkManager::Error QLandmarkAbstractRequest::error () const

Returns the error of the most recent asynchronous operation.

See also errorString().

QString QLandmarkAbstractRequest::errorString () const

Returns a human readable string of the last error that occurred.

See also error().

bool QLandmarkAbstractRequest::isActive () const

Returns true if the request is in the QLandmarkAbstractRequest::Active state; otherwise, returns false.

See also state().

bool QLandmarkAbstractRequest::isFinished () const

Returns true if the request is in the QLandmarkAbstractRequest::Finished state; otherwise, returns false.

See also state().

bool QLandmarkAbstractRequest::isInactive () const

Returns true if the request is in the QLandmarkAbstractRequest::Inactive state; otherwise, returns false.

See also state().

QLandmarkManager * QLandmarkAbstractRequest::manager () const

Returns a pointer to the landmark manager which this request operates on.

See also setManager().

void QLandmarkAbstractRequest::resultsAvailable () [signal]

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().

void QLandmarkAbstractRequest::setManager ( QLandmarkManager * manager )

Sets the manager which this request operates on.

Note that if a NULL manager is set, the functions start(), cancel() and waitForFinished() will return false and error will be set to QLandmarkManager::InvalidManagerError.

See also manager().

bool QLandmarkAbstractRequest::start () [slot]

Attempts to start the request.

Returns true if the request was started, otherwise false.

See also cancel().

State QLandmarkAbstractRequest::state ()

Returns the state of the request

void QLandmarkAbstractRequest::stateChanged ( QLandmarkAbstractRequest::State newState ) [signal]

This signal is emitted when the state of the request is changed. The new state of the request will be contained in newState.

RequestType QLandmarkAbstractRequest::type () const

Returns the type of this asynchronous request.

bool QLandmarkAbstractRequest::waitForFinished ( int msecs = 0 ) [slot]

Blocks until the request has been completed or until msecs milliseconds has elapsed. If msecs is zero, this function will block indefinitely.

Returns true if the request was canceled or completed within the given period, otherwise returns false.


Copyright © 2009-2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.1.0