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  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QContactManagerEngineV2 Class Reference

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

 #include <QContactManagerEngineV2>

Inherits QContactManagerEngine.

Inherited by QContactInvalidEngine.

Public Functions

QContactManagerEngineV2 ()
virtual QList<QContact> contacts ( const QList<QContactLocalId> & localIds, const QContactFetchHint & fetchHint, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error ) const
virtual bool saveContacts ( QList<QContact> * contacts, const QStringList & definitionMask, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error )

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 )

Static Public Members

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

Additional Inherited Members

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<QContactLocalId> & localIds, const QContactFetchHint & fetchHint, QMap<int, QContactManager::Error> * errorMap, QContactManager::Error * error ) const [virtual]

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

If there is an invalid id in localIds, 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 definition hint is supplied and that when saving it back, a definition mask should be used which corresponds to the detail definition 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 QStringList & definitionMask, 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 definitionMask, which specifies which details of the contacts should be updated. Details with definition names not included in the definitionMask 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.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();
Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Developer Network au hasard

Logo

Les composants

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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 qtmobility-1.1
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