MVPbkContactCopyPolicy Class Reference

class MVPbkContactCopyPolicy

Virtual Phonebook Contact copy policy interface.

Constructor & Destructor Documentation

~MVPbkContactCopyPolicy()

~MVPbkContactCopyPolicy ( ) [inline, virtual]

Member Functions Documentation

AddFieldToContactL(MVPbkStoreContact &, const MVPbkFieldType &, const TDateTime &, const TDesC *, const MVPbkContactAttribute *, MVPbkContactFieldCopyObserver &)

MVPbkContactOperationBase * AddFieldToContactL ( MVPbkStoreContact & aContact,
const MVPbkFieldType & aFieldType,
const TDateTime & aFieldData,
const TDesC * aFieldLabel,
const MVPbkContactAttribute * aContactAttribute,
MVPbkContactFieldCopyObserver & aCopyObserver
) [pure virtual]

Adds a new data time field to contact asynchronously.

Parameters

MVPbkStoreContact & aContact The contact to add the field to.
const MVPbkFieldType & aFieldType Type of the field to add.
const TDateTime & aFieldData Data for the added field.
const TDesC * aFieldLabel a reference to the field label or NULL
const MVPbkContactAttribute * aContactAttribute a reference to the contact attribute or NULL
MVPbkContactFieldCopyObserver & aCopyObserver Observer for the operation

AddFieldToContactL(MVPbkStoreContact &, const MVPbkFieldType &, const TDesC &, const TDesC *, const MVPbkContactAttribute *, MVPbkContactFieldCopyObserver &)

MVPbkContactOperationBase * AddFieldToContactL ( MVPbkStoreContact & aContact,
const MVPbkFieldType & aFieldType,
const TDesC & aFieldData,
const TDesC * aFieldLabel,
const MVPbkContactAttribute * aContactAttribute,
MVPbkContactFieldCopyObserver & aCopyObserver
) [pure virtual]

Adds a new text field to contact asynchronously.

Parameters

MVPbkStoreContact & aContact The contact to add the field to.
const MVPbkFieldType & aFieldType Type of the field to add.
const TDesC & aFieldData Data for the added field.
const TDesC * aFieldLabel a reference to the field label or NULL
const MVPbkContactAttribute * aContactAttribute a reference to the contact attribute or NULL
MVPbkContactFieldCopyObserver & aCopyObserver Observer for the operation

AddFieldToContactL(MVPbkStoreContact &, const MVPbkFieldType &, const TDesC8 &, const TDesC *, const MVPbkContactAttribute *, MVPbkContactFieldCopyObserver &)

MVPbkContactOperationBase * AddFieldToContactL ( MVPbkStoreContact & aContact,
const MVPbkFieldType & aFieldType,
const TDesC8 & aFieldData,
const TDesC * aFieldLabel,
const MVPbkContactAttribute * aContactAttribute,
MVPbkContactFieldCopyObserver & aCopyObserver
) [pure virtual]

Adds a new binary field to contact asynchronously.

Parameters

MVPbkStoreContact & aContact The contact to add the field to.
const MVPbkFieldType & aFieldType Type of the field to add.
const TDesC8 & aFieldData Data for the added field.
const TDesC * aFieldLabel a reference to the field label or NULL
const MVPbkContactAttribute * aContactAttribute a reference to the contact attribute or NULL
MVPbkContactFieldCopyObserver & aCopyObserver Observer for the operation

CommitContactL(MVPbkStoreContact *, MVPbkContactCopyObserver &)

MVPbkContactOperationBase * CommitContactL ( MVPbkStoreContact * aContact,
MVPbkContactCopyObserver & aCopyObserver
) [pure virtual]

Handles the committing of the contact. This is called after adding fields to contact because it's possible that the policy needs still e.g split the contact.

Parameters

MVPbkStoreContact * aContact the contact to commit, NOTE: ownership is taken. Client must keep the ownership until this function returns.
MVPbkContactCopyObserver & aCopyObserver the observer that is called when the contact has been copied

ContactCopyPolicyExtension(TUid)

TAny * ContactCopyPolicyExtension ( TUid ) [inline, virtual]

Returns an extension point for this interface or NULL.

Parameters

TUid

CopyContactL(MVPbkStoreContact &, MVPbkContactStore &, MVPbkContactCopyObserver &)

MVPbkContactOperationBase * CopyContactL ( MVPbkStoreContact & aContact,
MVPbkContactStore & aTargetStore,
MVPbkContactCopyObserver & aCopyObserver
) [pure virtual]

Copies the contact to the target store. All possible data is copied. The difference to CommitContactL is that if you already have a contact that contains data then you don't need call AddFieldToContactL operations but this can be called instead.

Parameters

MVPbkStoreContact & aContact the source contact.
MVPbkContactStore & aTargetStore the store in which the contact is copied to
MVPbkContactCopyObserver & aCopyObserver the observer that called after copying

CopyTitleFieldsL(const MVPbkStoreContact &, MVPbkStoreContact &, MVPbkContactFieldsCopyObserver &)

MVPbkContactOperationBase * CopyTitleFieldsL ( const MVPbkStoreContact & aSourceContact,
MVPbkStoreContact & aTargetContact,
MVPbkContactFieldsCopyObserver & aCopyObserver
) [pure virtual]

Copies title fields from source contact to the target contact. Policy defines the title field types. The field is not copied if the contact already contains the same type of title field.

Parameters

const MVPbkStoreContact & aSourceContact The source of the fields.
MVPbkStoreContact & aTargetContact The target of the copying.
MVPbkContactFieldsCopyObserver & aCopyObserver An observer for asynchronous operation.

MergeAndSaveContactsL(RPointerArray< MVPbkStoreContact > &, MVPbkStoreContact &, MVPbkContactCopyObserver &)

MVPbkContactOperationBase * MergeAndSaveContactsL ( RPointerArray < MVPbkStoreContact > & aSourceContacts,
MVPbkStoreContact & aTarget,
MVPbkContactCopyObserver & aCopyObserver
) [pure virtual]

Merges source contacts to target contact if possible. Handles saving the existing contact and possible new contacts. The logic is defined by the policy. Client gets the links of the contacts that were actually saved.

SupportsContactMerge()

Parameters

RPointerArray < MVPbkStoreContact > & aSourceContacts The policy removes contacts from the array and takes the ownerships of the contacts.
MVPbkStoreContact & aTarget The existing contact. Not needed to lock by the client. It's policy's job.
MVPbkContactCopyObserver & aCopyObserver An observer for asynchronous operation

SupportsContactMerge()

TBool SupportsContactMerge ( ) const [pure virtual]

Returns ETrue if contact data merge is supported. This will disable duplicate contact saving in clients because duplicates need to be merged with new contacts.