Home · All Classes · All Functions ·

QContactFetchHint Class Reference

The QContactFetchHint class provides hints to the manager about which contact information needs to be retrieved in an asynchronous fetch request or a synchronous function call. More...

    #include <QContactFetchHint>

Public Types

Public Functions


Detailed Description

The QContactFetchHint class provides hints to the manager about which contact information needs to be retrieved in an asynchronous fetch request or a synchronous function call.

All of the hints may be ignored at the discretion of the manager, however if a manager is able to optimize retrieval of contacts due to hints, it may do so. If a manager ignores a hint, it must retrieve the full set of data that the hint refers to.

The fetch hint contains:

Important note: a client should not make changes to a contact which has been retrieved using a fetch hint other than the default fetch hint. Doing so will result in information loss when saving the contact back to the manager (as the "new" restricted contact will replace the previously saved contact in the backend).


Member Type Documentation

enum QContactFetchHint::OptimizationHint
flags QContactFetchHint::OptimizationHints

This enum defines flags which may be set to inform the backend that the client does not require certain information. The backend may safely ignore the hint, but then must return the full set of information relating to the optimization hint.

ConstantValueDescription
QContactFetchHint::AllRequired0x0Tells the backend that all information is required
QContactFetchHint::NoRelationships0x1Tells the backend that the client does not require retrieved contacts to include a cache of relationships Tells the backend that the client does not require retrieved contacts to include a cache of action preferences
QContactFetchHint::NoBinaryBlobs0x4Tells the backend that the client does not require retrieved contacts to include binary blobs such as thumbnail images

The OptimizationHints type is a typedef for QFlags<OptimizationHint>. It stores an OR combination of OptimizationHint values.


Member Function Documentation

QContactFetchHint::QContactFetchHint ()

Constructs a new contact fetch hint which requests that the backend fetch all information

QContactFetchHint::QContactFetchHint ( const QContactFetchHint & other )

Constructs a new contact fetch hint as a copy of other

QContactFetchHint::~QContactFetchHint ()

Frees any memory in use by the fetch hint

QStringList QContactFetchHint::detailDefinitionsHint () const

Returns the list of definition names that identify detail definitions of which details the manager should (at a minimum) retrieve when fetching contacts. This hint may be ignored by the backend, in which case it will return the full set of details for each contact retrieved.

See also setDetailDefinitionsHint().

OptimizationHints QContactFetchHint::optimizationHints () const

Returns the optimization hint flags specified by the client. These hints may be ignored by the backend, in which case it will return the full set of information accessible in a contact, including relationships and binary blobs.

See also setOptimizationHints().

QStringList QContactFetchHint::relationshipTypesHint () const

Returns the list of relationship types that the manager should (at a minimum) retrieve when fetching contacts. This hint may be ignored by the backend, in which case it will return the full set of relationships for each contact retrieved.

See also setRelationshipTypesHint() and QContact::relationships().

void QContactFetchHint::setDetailDefinitionsHint ( const QStringList & definitionNames )

Sets the list of definition names that identify detail definitions of which details the manager should (at a minimum) retrieve when fetching contacts to definitionNames. This hint may be ignored by the backend, in which case it will return the full set of details for each contact retrieved.

See also detailDefinitionsHint().

void QContactFetchHint::setOptimizationHints ( OptimizationHints hints )

Sets the optimization hint flags specified by the client to hints. These hints may be ignored by the backend, in which case it will return the full set of information accessible in a contact, including relationships and binary blobs.

See also optimizationHints().

void QContactFetchHint::setRelationshipTypesHint ( const QStringList & relationshipTypes )

Sets the list of relationship types that the manager should (at a minimum) retrieve when fetching contacts to relationshipTypes. This hint may be ignored by the backend, in which case it will return the full set of relationships for each contact retrieved.

See also relationshipTypesHint() and QContact::relationships().

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

Assigns this fetch hint to be equal to the other fetch hint


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