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 & aContactThe contact to add the field to.
const MVPbkFieldType & aFieldTypeType of the field to add.
const TDateTime & aFieldDataData for the added field.
const TDesC * aFieldLabela reference to the field label or NULL
const MVPbkContactAttribute * aContactAttributea reference to the contact attribute or NULL
MVPbkContactFieldCopyObserver & aCopyObserverObserver 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 & aContactThe contact to add the field to.
const MVPbkFieldType & aFieldTypeType of the field to add.
const TDesC & aFieldDataData for the added field.
const TDesC * aFieldLabela reference to the field label or NULL
const MVPbkContactAttribute * aContactAttributea reference to the contact attribute or NULL
MVPbkContactFieldCopyObserver & aCopyObserverObserver 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 & aContactThe contact to add the field to.
const MVPbkFieldType & aFieldTypeType of the field to add.
const TDesC8 & aFieldDataData for the added field.
const TDesC * aFieldLabela reference to the field label or NULL
const MVPbkContactAttribute * aContactAttributea reference to the contact attribute or NULL
MVPbkContactFieldCopyObserver & aCopyObserverObserver 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 * aContactthe contact to commit, NOTE: ownership is taken. Client must keep the ownership until this function returns.
MVPbkContactCopyObserver & aCopyObserverthe 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 & aContactthe source contact.
MVPbkContactStore & aTargetStorethe store in which the contact is copied to
MVPbkContactCopyObserver & aCopyObserverthe 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 & aSourceContactThe source of the fields.
MVPbkStoreContact & aTargetContactThe target of the copying.
MVPbkContactFieldsCopyObserver & aCopyObserverAn 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 > & aSourceContactsThe policy removes contacts from the array and takes the ownerships of the contacts.
MVPbkStoreContact & aTargetThe existing contact. Not needed to lock by the client. It's policy's job.
MVPbkContactCopyObserver & aCopyObserverAn 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.