Custom qtcontacts-tracker request for mashing details from multiple source contacts before removal. More...
#include <contactmergerequest.h>
Public Member Functions | |
QctContactMergeRequest (QObject *parent=0) | |
void | setMergeIds (const QMultiMap< QContactLocalId, QContactLocalId > ids) |
QMultiMap< QContactLocalId, QContactLocalId > | mergeIds () const |
Custom qtcontacts-tracker request for mashing details from multiple source contacts before removal.
Note: this is experimental code - might be removed soon by QContactRelationshipSaveRequest or mash request.
This requests uses a multi-hash to describe the merge instructions. Each key of the hash is a merge "destination", and the associated values are the merge "sources". If the hash is { 3 -> (4, 5); 6 -> (7, 8) } then 4 and 5 will be merged into 3, and 7 and 8 will be merged into 6. 4, 5, 7 and 8 will be removed once the merge is complete.
Note how specific the implementation is: QContactAbstractRequest doesnt support extension. Instead, QctContactMergeRequest is extending QContactRemoveRequest - as request logic is: copy content from from multiple source contacts to one target contact before removing source contacts. Following the logic, QContactRemoveRequest is specific ContactsMergeRequest where contacts' content is merged with nothing before head (nco:PersonContact) uri is removed.
QctContactMergeRequest::QctContactMergeRequest | ( | QObject * | parent = 0 |
) |
Constructs a new contacts merge request whose parent is the specified parent
QMultiMap<QContactLocalId, QContactLocalId> QctContactMergeRequest::mergeIds | ( | ) | const |
Retrieves the hash describing the merge operation
void QctContactMergeRequest::setMergeIds | ( | const QMultiMap< QContactLocalId, QContactLocalId > | ids | ) |
Sets the hash describing the merge operation