QVersitContactImporterPropertyHandlerV2 Class Reference
The QVersitContactImporterPropertyHandlerV2 class is an interface for clients wishing to implement custom import behaviour for vCard properties. More...
#include <QVersitContactImporterPropertyHandlerV2>
Public Functions
Static Public Members
Detailed Description
The QVersitContactImporterPropertyHandlerV2 class is an interface for clients wishing to implement custom import behaviour for vCard properties.
This interface supercedes QVersitContactImporterPropertyHandler.
See also QVersitContactImporter.
Member Function Documentation
QVersitContactImporterPropertyHandlerV2::~QVersitContactImporterPropertyHandlerV2 () [virtual]
Frees any memory in use by this handler.
QVersitContactImporterPropertyHandlerV2 * QVersitContactImporterPropertyHandlerV2::createBackupHandler () [static]
Constructs and returns a property handler that restores data from a vCard generated using the exporter backup detail handler (see QVersitContactExporterDetailHandlerV2::createBackupHandler()). The caller is responsible for deleting the object.
Clients wishing to implement their own property handler and also benefit from the functionality of the default handler can use this function to construct one, and wrap a custom QVersitContactImporterPropertyHandlerV2 around it. In the implementation of propertyProcessed and documentProcessed, the respective functions in the backup handler should be called as the last step (ensuring the arguments are correctly updated and passed through).
void QVersitContactImporterPropertyHandlerV2::documentProcessed ( const QVersitDocument & document, QContact * contact ) [pure virtual]
Perform any final processing on the contact generated by the document. This can be implemented by the handler to clear any internal state before moving onto the next document.
This function is called after all QVersitProperties have been handled by the QVersitContactImporter.
void QVersitContactImporterPropertyHandlerV2::propertyProcessed ( const QVersitDocument & document, const QVersitProperty & property, bool alreadyProcessed, const QContact & contact, QList<QContactDetail> * updatedDetails ) [pure virtual]
Process property and provide a list of updated details by adding them to updatedDetails.
This function is called on every QVersitProperty encountered during an import, after the property has been processed by the QVersitContactImporter. An implementation of this function can be made to provide support for vCard properties not supported by QVersitContactImporter.
The supplied document is the container for the property. alreadyProcessed is true if the QVersitContactImporter was successful in processing the property. contact holds the state of the contact before the property was processed by the importer. updatedDetails is initially filled with a list of details that the importer will update, and can be modified (by removing, modifying or adding details to the list)