CVPbkVCardEng Class Reference

class CVPbkVCardEng : public CBase

The vcard engine for importing/exporting vcards and compact business cards.

VPbkVCardEng.lib

Inherits from

Public Member Functions
~CVPbkVCardEng()
IMPORT_C MVPbkContactOperationBase *ExportVCardForSyncL(RWriteStream &, const MVPbkStoreContact &, MVPbkSingleContactOperationObserver &)
IMPORT_C MVPbkContactOperationBase *ExportVCardForSyncL(RWriteStream &, const MVPbkContactLink &, MVPbkSingleContactOperationObserver &)
IMPORT_C MVPbkContactOperationBase *ExportVCardL(RWriteStream &, const MVPbkStoreContact &, MVPbkSingleContactOperationObserver &)
IMPORT_C MVPbkContactOperationBase *ExportVCardL(RWriteStream &, const MVPbkContactLink &, MVPbkSingleContactOperationObserver &)
IMPORT_C MVPbkContactOperationBase *ImportCompactBusinessCardL(MVPbkContactStore &, RReadStream &, MVPbkContactCopyObserver &)
IMPORT_C MVPbkContactOperationBase *ImportCompactBusinessCardL(RPointerArray< MVPbkStoreContact > &, MVPbkContactStore &, RReadStream &, MVPbkSingleContactOperationObserver &)
IMPORT_C MVPbkContactOperationBase *ImportVCardForSyncL(MVPbkContactStore &, RReadStream &, MVPbkContactCopyObserver &)
IMPORT_C MVPbkContactOperationBase *ImportVCardL(MVPbkContactStore &, RReadStream &, MVPbkContactCopyObserver &)
IMPORT_C MVPbkContactOperationBase *ImportVCardL(RPointerArray< MVPbkStoreContact > &, MVPbkContactStore &, RReadStream &, MVPbkSingleContactOperationObserver &)
IMPORT_C MVPbkContactOperationBase *ImportVCardMergeL(const MVPbkContactLink &, MVPbkContactStore &, RReadStream &, MVPbkSingleContactOperationObserver &)
IMPORT_C CVPbkVCardEng *NewL(CVPbkContactManager &)
IMPORT_C const MVPbkFieldTypeList &SupportedFieldTypes()
IMPORT_C TBoolSupportsFieldType(const MVPbkFieldType &)
Private Member Functions
CVPbkVCardEng(CVPbkContactManager &)
voidConstructL()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CVPbkContactManager &iContactManager
CVPbkVCardData *iData

Constructor & Destructor Documentation

CVPbkVCardEng(CVPbkContactManager &)

CVPbkVCardEng(CVPbkContactManager &aContactManager)[private]

Parameters

CVPbkContactManager & aContactManager

~CVPbkVCardEng()

~CVPbkVCardEng()

Destructor.

Member Functions Documentation

ConstructL()

voidConstructL()[private]

ExportVCardForSyncL(RWriteStream &, const MVPbkStoreContact &, MVPbkSingleContactOperationObserver &)

IMPORT_C MVPbkContactOperationBase *ExportVCardForSyncL(RWriteStream &aDestStream,
const MVPbkStoreContact &aSourceItem,
MVPbkSingleContactOperationObserver &aObserver
)

Exports contact information asynchronously to a vCard record. Note: Includes the fields, X-FAVORITE and X-SELF, during export

The client gives the contact whose information is exported.

Parameters

RWriteStream & aDestStreamA stream where the vCard data is written to. The data written to the stream is not Committed by this method.
const MVPbkStoreContact & aSourceItemA contact whose information is exported.
MVPbkSingleContactOperationObserver & aObserverAn observer that is notified when the export completes. A store contact returned when operation has completed is always NULL.

ExportVCardForSyncL(RWriteStream &, const MVPbkContactLink &, MVPbkSingleContactOperationObserver &)

IMPORT_C MVPbkContactOperationBase *ExportVCardForSyncL(RWriteStream &aDestStream,
const MVPbkContactLink &aContactLink,
MVPbkSingleContactOperationObserver &aObserver
)

Exports contact information asynchronously to a vCard record. Note: Includes the fields, X-FAVORITE and X-SELF, during export

The client gives the identifier of the contact that is first loaded and then exported.

Parameters

RWriteStream & aDestStreamA stream where the vCard data is written to. The data written to the stream is not Commited by this method.
const MVPbkContactLink & aContactLinkAn identifier of the contact that is exported.
MVPbkSingleContactOperationObserver & aObserverAn observer that is notified when the export completes. A store contact returned when operation has completed is always NULL.

ExportVCardL(RWriteStream &, const MVPbkStoreContact &, MVPbkSingleContactOperationObserver &)

IMPORT_C MVPbkContactOperationBase *ExportVCardL(RWriteStream &aDestStream,
const MVPbkStoreContact &aSourceItem,
MVPbkSingleContactOperationObserver &aObserver
)

Exports contact information asynchronously to a vCard record.

The client gives the contact whose information is exported.

Parameters

RWriteStream & aDestStreamA stream where the vCard data is written to. The data written to the stream is not Committed by this method.
const MVPbkStoreContact & aSourceItemA contact whose information is exported.
MVPbkSingleContactOperationObserver & aObserverAn observer that is notified when the export completes. A store contact returned when operation has completed is always NULL.

ExportVCardL(RWriteStream &, const MVPbkContactLink &, MVPbkSingleContactOperationObserver &)

IMPORT_C MVPbkContactOperationBase *ExportVCardL(RWriteStream &aDestStream,
const MVPbkContactLink &aContactLink,
MVPbkSingleContactOperationObserver &aObserver
)

Exports contact information asynchronously to a vCard record.

The client gives the identifier of the contact that is first loaded and then exported.

Parameters

RWriteStream & aDestStreamA stream where the vCard data is written to. The data written to the stream is not Commited by this method.
const MVPbkContactLink & aContactLinkAn identifier of the contact that is exported.
MVPbkSingleContactOperationObserver & aObserverAn observer that is notified when the export completes. A store contact returned when operation has completed is always NULL.

ImportCompactBusinessCardL(MVPbkContactStore &, RReadStream &, MVPbkContactCopyObserver &)

IMPORT_C MVPbkContactOperationBase *ImportCompactBusinessCardL(MVPbkContactStore &aTargetStore,
RReadStream &aSourceStream,
MVPbkContactCopyObserver &aObserver
)

Reads Compact Business Card records from a stream and saves contacts to the store asynchronously.

A client receives links to the created contacts in a call back.

Exceptions
KErrNotFound

if the engine didn't find a copy policy for the target store.

Parameters

MVPbkContactStore & aTargetStoreThe Virtual Phonebook Store in which the information is copied to. The store must be writable.
RReadStream & aSourceStreamA stream where the card data is read from.
MVPbkContactCopyObserver & aObserverAn observer for asynchronous import. If successful there is one or more contact links in the array. Failed cases: -KErrNotSupported if the card is not compact business card -KErrCorrupted if the data is corrupted -KErrNotFound if there were no supported fields in the card.

ImportCompactBusinessCardL(RPointerArray< MVPbkStoreContact > &, MVPbkContactStore &, RReadStream &, MVPbkSingleContactOperationObserver &)

IMPORT_C MVPbkContactOperationBase *ImportCompactBusinessCardL(RPointerArray< MVPbkStoreContact > &aImportedContacts,
MVPbkContactStore &aTargetStore,
RReadStream &aSourceStream,
MVPbkSingleContactOperationObserver &aObserver
)

Reads Compact Business Card records from a stream and creates contacts asynchronously.

A client handles commiting the contact(s). Otherwise contacts are not saved to the store.

Exceptions
KErrNotFound

if the engine didn't find a copy policy for the target store.

Parameters

RPointerArray< MVPbkStoreContact > & aImportedContacts
MVPbkContactStore & aTargetStoreThe Virtual Phonebook Store in which the contacts are created from. The store must be writable.
RReadStream & aSourceStreamA stream where the card data is read from.
MVPbkSingleContactOperationObserver & aObserverAn observer for asynchronous import. aContact is always NULL in call back. If successful there is one or more contact links in the array. Failed cases: -KErrNotSupported if the card is not compact business card -KErrCorrupted if the data is corrupted -KErrNotFound if there were no supported fields in the card.

ImportVCardForSyncL(MVPbkContactStore &, RReadStream &, MVPbkContactCopyObserver &)

IMPORT_C MVPbkContactOperationBase *ImportVCardForSyncL(MVPbkContactStore &aTargetStore,
RReadStream &aSourceStream,
MVPbkContactCopyObserver &aObserver
)

Reads vCard records from a stream and saves contacts to the store asynchronously.

A client receives links to the created contacts in a call back. NOTE: This API is introduced for performance improvements in sync. When imported for Sync the duplicate policy checks are ignored.

Exceptions
KErrNotFound

if the engine didn't find a copy policy for the target store.

Parameters

MVPbkContactStore & aTargetStoreThe Virtual Phonebook store in which the information is copied to. The store must be writable.
RReadStream & aSourceStreamA stream where the vCard data is read from
MVPbkContactCopyObserver & aObserverThe observer who is notified when the import completes. Failed cases: -KErrNotFound if the card contained fields that cannot be saved to the target store i.e. the operation didn't find any fields to copy.

ImportVCardL(MVPbkContactStore &, RReadStream &, MVPbkContactCopyObserver &)

IMPORT_C MVPbkContactOperationBase *ImportVCardL(MVPbkContactStore &aTargetStore,
RReadStream &aSourceStream,
MVPbkContactCopyObserver &aObserver
)

Reads vCard records from a stream and saves contacts to the store asynchronously.

A client receives links to the created contacts in a call back.

Exceptions
KErrNotFound

if the engine didn't find a copy policy for the target store.

Parameters

MVPbkContactStore & aTargetStoreThe Virtual Phonebook store in which the information is copied to. The store must be writable.
RReadStream & aSourceStreamA stream where the vCard data is read from
MVPbkContactCopyObserver & aObserverThe observer who is notified when the import completes. Failed cases: -KErrNotFound if the card contained fields that cannot be saved to the target store i.e. the operation didn't find any fields to copy.

ImportVCardL(RPointerArray< MVPbkStoreContact > &, MVPbkContactStore &, RReadStream &, MVPbkSingleContactOperationObserver &)

IMPORT_C MVPbkContactOperationBase *ImportVCardL(RPointerArray< MVPbkStoreContact > &aImportedContacts,
MVPbkContactStore &aTargetStore,
RReadStream &aSourceStream,
MVPbkSingleContactOperationObserver &aObserver
)

Reads vCard records from a stream and creates contacts asynchronously.

A client handles commiting the contact(s). Otherwise contacts are not saved to the store.

Parameters

RPointerArray< MVPbkStoreContact > & aImportedContacts
MVPbkContactStore & aTargetStoreThe Virtual Phonebook Store in which the information is copied to. The store must be writable.
RReadStream & aSourceStreamA stream where the vCard data is read from.
MVPbkSingleContactOperationObserver & aObserverAn observer for asynchronous import. The aContact in the call back is always NULL.

ImportVCardMergeL(const MVPbkContactLink &, MVPbkContactStore &, RReadStream &, MVPbkSingleContactOperationObserver &)

IMPORT_C MVPbkContactOperationBase *ImportVCardMergeL(const MVPbkContactLink &aReplaceContact,
MVPbkContactStore &aTargetStore,
RReadStream &aSourceStream,
MVPbkSingleContactOperationObserver &aObserver
)

Reads vCard records from a stream and replaces contacts asynchronously.

A client handles commiting the contact(s). Otherwise contacts are not saved to the store.

Parameters

const MVPbkContactLink & aReplaceContactCurrent contact which needs to replaced with the contact recevied from server as VcardBuffer. Contains results after asynchronous import operation has completed.
MVPbkContactStore & aTargetStoreThe Virtual Phonebook Store in which the information is copied to. The store must be writable.
RReadStream & aSourceStreamA stream where the vCard data is read from.
MVPbkSingleContactOperationObserver & aObserverAn observer for asynchronous import. The aContact in the call back is always NULL.

NewL(CVPbkContactManager &)

IMPORT_C CVPbkVCardEng *NewL(CVPbkContactManager &aContactManager)[static]

Creates VCard engine instance.

Parameters

CVPbkContactManager & aContactManagerThe Contact manager.

SupportedFieldTypes()

IMPORT_C const MVPbkFieldTypeList &SupportedFieldTypes()

Returns field types that are supported by vCard engine.

SupportsFieldType(const MVPbkFieldType &)

IMPORT_C TBoolSupportsFieldType(const MVPbkFieldType &aFieldType)

Returns true for those field types that are supported by the vCard format and this engine.

Parameters

const MVPbkFieldType & aFieldTypeA field type that is looked for.

Member Data Documentation

CVPbkContactManager & iContactManager

CVPbkContactManager &iContactManager[private]

CVPbkVCardData * iData

CVPbkVCardData *iData[private]