Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QContactManagerEngineV2 Class

The QContactManagerEngineV2 class provides the interface for implementations of the contact manager backend functionality. More...

 #include <QContactManagerEngineV2>

Inherits: QContactManagerEngine.

Public Functions

QContactManagerEngine()
QContactManagerEngineV2()
virtual bool cancelRequest(QContactAbstractRequest * req)
virtual QContact contact(const QContactId & contactId, const QContactFetchHint & fetchHint, QContactManager::Error * error) const
virtual QList<QContactId> contactIds(const QContactFilter & filter, const QList<QContactSortOrder> & sortOrders, QContactManager::Error * error) const
virtual QList<QContact> contacts(const QContactFilter & filter, const QList<QContactSortOrder> & sortOrders, const QContactFetchHint & fetchHint, QContactManager::Error * error) const
virtual QList<QContact> contacts(const QList<QContactId> & contactIds, const QContactFetchHint & fetchHint, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error) const
virtual bool isFilterSupported(const QContactFilter & filter) const
virtual bool isRelationshipTypeSupported(const QString & relationshipType, QContactType::TypeValues contactType) const
virtual QString managerName() const = 0
virtual QMap<QString, QString> managerParameters() const
QString managerUri() const
virtual int managerVersion() const = 0
virtual QList<QContactRelationship> relationships(const QString & relationshipType, const QContact & participant, QContactRelationship::Role role, QContactManager::Error * error) const
virtual bool removeContact(const QContactId & contactId, QContactManager::Error * error)
virtual bool removeContacts(const QList<QContactId> & contactIds, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error)
virtual bool removeRelationship(const QContactRelationship & relationship, QContactManager::Error * error)
virtual bool removeRelationships(const QList<QContactRelationship> & relationships, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error)
virtual void requestDestroyed(QContactAbstractRequest * req)
virtual bool saveContact(QContact * contact, QContactManager::Error * error)
virtual bool saveContacts(QList<QContact> * contacts, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error)
virtual bool saveContacts(QList<QContact> * contacts, const QList<QContactDetail::DetailType> & typeMask, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error)
virtual bool saveRelationship(QContactRelationship * relationship, QContactManager::Error * error)
virtual bool saveRelationships(QList<QContactRelationship> * relationships, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error)
virtual QContactId selfContactId(QContactManager::Error * error) const
virtual bool setSelfContactId(const QContactId & contactId, QContactManager::Error * error)
virtual bool startRequest(QContactAbstractRequest * req)
virtual QList<QContactDetail::DetailType> supportedContactDetailTypes() const
virtual QList<QContactType::TypeValues> supportedContactTypes() const
virtual QList<QVariant::Type> supportedDataTypes() const
virtual bool validateContact(const QContact & contact, QContactManager::Error * error) const
virtual bool waitForRequestFinished(QContactAbstractRequest * req, int msecs)

Reimplemented Public Functions

virtual QList<QContact> contacts(const QContactFilter & filter, const QList<QContactSortOrder> & sortOrders, const QContactFetchHint & fetchHint, QContactManager::Error * error) const
virtual bool saveContacts(QList<QContact> * contacts, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error)
  • 31 public functions inherited from QObject

Signals

void contactsAdded(const QList<QContactId> & contactIds)
void contactsChanged(const QList<QContactId> & contactIds)
void contactsRemoved(const QList<QContactId> & contactIds)
void dataChanged()
void relationshipsAdded(const QList<QContactId> & affectedContactIds)
void relationshipsRemoved(const QList<QContactId> & affectedContactIds)
void selfContactIdChanged(const QContactId & oldId, const QContactId & newId)

Static Public Members

void addSorted(QList<QContact> * sorted, const QContact & toAdd, const QList<QContactSortOrder> & sortOrders)
QContactFilter canonicalizedFilter(const QContactFilter & filter)
int compareContact(const QContact & a, const QContact & b, const QList<QContactSortOrder> & sortOrders)
int compareVariant(const QVariant & first, const QVariant & second, Qt::CaseSensitivity sensitivity)
const QContactEngineId * engineId(const QContactId & contactId)
void setContactRelationships(QContact * contact, const QList<QContactRelationship> & relationships)
void setDetailAccessConstraints(QContactDetail * detail, QContactDetail::AccessConstraints constraints)
QList<QContactId> sortContacts(const QList<QContact> & cs, const QList<QContactSortOrder> & sortOrders)
bool testFilter(const QContactFilter & filter, const QContact & contact)
void updateContactFetchByIdRequest(QContactFetchByIdRequest * req, const QList<QContact> & result, QContactManager::Error error, const QMap<int, QContactManager::Error> & errorMap, QContactAbstractRequest::State newState)
void updateContactFetchRequest(QContactFetchRequest * req, const QList<QContact> & result, QContactManager::Error error, QContactAbstractRequest::State newState)
void updateContactIdFetchRequest(QContactIdFetchRequest * req, const QList<QContactId> & result, QContactManager::Error error, QContactAbstractRequest::State newState)
void updateContactRemoveRequest(QContactRemoveRequest * req, QContactManager::Error error, const QMap<int, QContactManager::Error> & errorMap, QContactAbstractRequest::State newState)
void updateContactSaveRequest(QContactSaveRequest * req, const QList<QContact> & result, QContactManager::Error error, const QMap<int, QContactManager::Error> & errorMap, QContactAbstractRequest::State newState)
void updateRelationshipFetchRequest(QContactRelationshipFetchRequest * req, const QList<QContactRelationship> & result, QContactManager::Error error, QContactAbstractRequest::State newState)
void updateRelationshipRemoveRequest(QContactRelationshipRemoveRequest * req, QContactManager::Error error, const QMap<int, QContactManager::Error> & errorMap, QContactAbstractRequest::State newState)
void updateRelationshipSaveRequest(QContactRelationshipSaveRequest * req, const QList<QContactRelationship> & result, QContactManager::Error error, const QMap<int, QContactManager::Error> & errorMap, QContactAbstractRequest::State newState)
void updateRequestState(QContactAbstractRequest * req, QContactAbstractRequest::State state)
  • 11 static public members inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QContactManagerEngineV2 class provides the interface for implementations of the contact manager backend functionality.

Instances of this class are usually provided by a QContactManagerEngineFactory, which is loaded from a plugin.

The default implementation of this interface provides a basic level of functionality for some functions so that specific engines can simply implement the functionality that is supported by the specific contacts engine that is being adapted.

More information on writing a contacts engine plugin is available in the Qt Contacts Manager Engines documentation.

Engines that support the QContactManagerEngine interface but not the QContactManagerEngineV2 interface will be wrapped by the QContactManager by a class that emulates the extra functionality of the QContactManagerEngineV2 interface.

See also QContactManagerEngine, QContactManager, and QContactManagerEngineFactory.

Member Function Documentation

QContactManagerEngineV2::QContactManagerEngineV2()

Constructs an empty QContactManagerEngineV2.

QList<QContact> QContactManagerEngineV2::contacts(const QContactFilter & filter, const QList<QContactSortOrder> & sortOrders, const QContactFetchHint & fetchHint, QContactManager::Error * error) const [virtual]

Reimplemented from QContactManagerEngine::contacts().

QList<QContact> QContactManagerEngineV2::contacts(const QList<QContactId> & contactIds, const QContactFetchHint & fetchHint, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error) const [virtual]

Returns the list of contacts with the ids given by contactIds. There is a one-to-one correspondence between the returned contacts and the supplied contactIds.

If there is an invalid id in contactIds, then an empty QContact will take its place in the returned list and an entry will be inserted into errorMap.

The overall operation error will be saved in error.

The fetchHint parameter describes the optimization hints that a manager may take. If the fetchHint is the default constructed hint, all existing details, relationships and action preferences in the matching contacts will be returned.

If a non-default fetch hint is supplied, and the client wishes to make changes to the contacts, they should ensure that only a detail type hint is supplied and that when saving it back, a type mask should be used which corresponds to the detail type hint. This is to ensure that no data is lost by overwriting an existing contact with a restricted version of it.

See also QContactFetchHint.

bool QContactManagerEngineV2::saveContacts(QList<QContact> * contacts, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error) [virtual]

Reimplemented from QContactManagerEngine::saveContacts().

bool QContactManagerEngineV2::saveContacts(QList<QContact> * contacts, const QList<QContactDetail::DetailType> & typeMask, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error) [virtual]

For each contact in contacts, either add it to the database or update an existing one.

This function accepts a typeMask, which specifies which details of the contacts should be updated. Details with types not included in the typeMask will not be updated or added.

The manager should populate errorMap (the map of indices of the contacts list to the error which occurred when saving the contact at that index) for every index for which the contact could not be saved, if it is able.

The supplied errorMap parameter may be null, if the client does not desire detailed error information. If supplied, it will be empty upon entry to this function.

The QContactManager::error() function will only return QContactManager::NoError if all contacts were saved successfully.

For each newly saved contact that was successful, the id of the contact in the contacts list will be updated with the new value. If a failure occurs when saving a new contact, the id will be cleared.

Any errors encountered during this operation should be stored to error.

void QContactManagerEngineV2::updateContactFetchByIdRequest(QContactFetchByIdRequest * req, const QList<QContact> & result, QContactManager::Error error, const QMap<int, QContactManager::Error> & errorMap, QContactAbstractRequest::State newState) [static]

Updates the given QContactFetchByIdRequest req with the latest results result, and operation error error, and map of input index to individual error errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web