CVasVPbkHandler Class Reference

class CVasVPbkHandler : public CBase

Phonebook handler that uses Virtual phonebook to access phonebook data

Since
3.2

Inherits from

Public Member Functions
~CVasVPbkHandler ()
void AttributeOperationComplete (MVPbkContactOperationBase &)
void AttributeOperationFailed (MVPbkContactOperationBase &, TInt )
IMPORT_C void ChangeVoiceTagFieldL ( TBool )
IMPORT_C void CloseContactL ( TBool )
IMPORT_C void CompressL ()
void ContactAddedToView (MVPbkContactViewBase &, TInt , const MVPbkContactLink &)
IMPORT_C CContactIdArray * ContactIdArrayLC ()
void ContactOperationCompleted (TContactOpResult)
void ContactOperationFailed (TContactOp, TInt , TBool )
void ContactRemovedFromView (MVPbkContactViewBase &, TInt , const MVPbkContactLink &)
void ContactViewError (MVPbkContactViewBase &, TInt , TBool )
void ContactViewReady (MVPbkContactViewBase &)
void ContactViewUnavailable (MVPbkContactViewBase &)
IMPORT_C void CreateContactObserverL ( MVasContactObserver *)
IMPORT_C TInt FieldIdL ()
IMPORT_C TFieldType FieldTypeL ()
IMPORT_C void FindContactFieldL ( MNssTag *)
IMPORT_C void FindContactL ( MNssTag *)
IMPORT_C void FindContactL ( TInt32 , TBool )
IMPORT_C void FindDefaultContactFieldL ( TInt )
IMPORT_C void FindFieldL ( MNssTag *)
IMPORT_C void FindFieldL ( TInt )
void HandleStoreEventL ( MVPbkContactStore &, TVPbkContactStoreEvent )
IMPORT_C void InitializeL ()
IMPORT_C TBool IsFieldEmptyL ()
IMPORT_C TPtrC LabelL ()
IMPORT_C CVasVPbkHandler * NewL ()
void OpenComplete ()
void OperationComplete (MVPbkContactOperationBase &)
void StepComplete (MVPbkContactOperationBase &, TInt )
TBool StepFailed (MVPbkContactOperationBase &, TInt , TInt )
void StoreReady ( MVPbkContactStore &)
void StoreUnavailable ( MVPbkContactStore &, TInt )
IMPORT_C TPtrC TextL ()
void VPbkSingleContactOperationComplete (MVPbkContactOperationBase &, MVPbkStoreContact *)
void VPbkSingleContactOperationFailed (MVPbkContactOperationBase &, TInt )
Private Member Functions
CVasVPbkHandler ()
TBool AcceptDefaultField (MVPbkStoreContactField &, TInt )
void ConstructL ()
TVasContactEvent ConvertEvent (const TVPbkContactStoreEvent &)
TInt ConvertFieldId (MVPbkStoreContactField &)
TInt FieldPriority (MVPbkStoreContactField &)
TVPbkDefaultType SelectDefaultType ( TInt )
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
MVPbkStoreContact * iContact
CVPbkContactManager * iContactManager
CVPbkContactIdConverter * iConverter
TInt iError
MVPbkStoreContactField * iField
TBool iMMSSupported
MVasContactObserver * iObserver
MVPbkContactOperationBase * iOperation
CActiveSchedulerWait iWait

Constructor & Destructor Documentation

CVasVPbkHandler()

CVasVPbkHandler ( ) [private]

C++ default constructor.

~CVasVPbkHandler()

IMPORT_C ~CVasVPbkHandler ( ) [virtual]

Destructor.

Since
3.2

Member Functions Documentation

AcceptDefaultField(MVPbkStoreContactField &, TInt)

TBool AcceptDefaultField ( MVPbkStoreContactField & aField,
TInt aCommandType
) [private]

Checks if given field should be used

Parameters

MVPbkStoreContactField & aField Field that is checked
TInt aCommandType Command type that is used as a select parameter Must be one of TVasExtensionCommand types

AttributeOperationComplete(MVPbkContactOperationBase &)

void AttributeOperationComplete ( MVPbkContactOperationBase & aOperation )

Parameters

MVPbkContactOperationBase & aOperation

AttributeOperationFailed(MVPbkContactOperationBase &, TInt)

void AttributeOperationFailed ( MVPbkContactOperationBase & aOperation,
TInt aError
)

Parameters

MVPbkContactOperationBase & aOperation
TInt aError

ChangeVoiceTagFieldL(TBool)

IMPORT_C void ChangeVoiceTagFieldL ( TBool aSet )

Changes current field's voice tag field status

Since
3.2

Parameters

TBool aSet If ETrue field is set else field is removed

CloseContactL(TBool)

IMPORT_C void CloseContactL ( TBool aSaveChanges )

Closes contact with or without saving changes

Since
3.2

Parameters

TBool aSaveChanges ETrue to save changes else EFalse

CompressL()

IMPORT_C void CompressL ( )

Compresses database

Since
3.2

ConstructL()

void ConstructL ( ) [private]

By default constructor is private.

ContactAddedToView(MVPbkContactViewBase &, TInt, const MVPbkContactLink &)

void ContactAddedToView ( MVPbkContactViewBase & aView,
TInt aIndex,
const MVPbkContactLink & aContactLink
)

Parameters

MVPbkContactViewBase & aView
TInt aIndex
const MVPbkContactLink & aContactLink

ContactIdArrayLC()

IMPORT_C CContactIdArray * ContactIdArrayLC ( )

Returns all contact ids from database

Since
3.2

ContactOperationCompleted(TContactOpResult)

void ContactOperationCompleted ( TContactOpResult aResult )

Parameters

TContactOpResult aResult

ContactOperationFailed(TContactOp, TInt, TBool)

void ContactOperationFailed ( TContactOp aOpCode,
TInt aErrorCode,
TBool aErrorNotified
)

Parameters

TContactOp aOpCode
TInt aErrorCode
TBool aErrorNotified

ContactRemovedFromView(MVPbkContactViewBase &, TInt, const MVPbkContactLink &)

void ContactRemovedFromView ( MVPbkContactViewBase & aView,
TInt aIndex,
const MVPbkContactLink & aContactLink
)

Parameters

MVPbkContactViewBase & aView
TInt aIndex
const MVPbkContactLink & aContactLink

ContactViewError(MVPbkContactViewBase &, TInt, TBool)

void ContactViewError ( MVPbkContactViewBase & aView,
TInt aError,
TBool aErrorNotified
)

Parameters

MVPbkContactViewBase & aView
TInt aError
TBool aErrorNotified

ContactViewReady(MVPbkContactViewBase &)

void ContactViewReady ( MVPbkContactViewBase & aView )

Parameters

MVPbkContactViewBase & aView

ContactViewUnavailable(MVPbkContactViewBase &)

void ContactViewUnavailable ( MVPbkContactViewBase & aView )

Parameters

MVPbkContactViewBase & aView

ConvertEvent(const TVPbkContactStoreEvent &)

TVasContactEvent ConvertEvent ( const TVPbkContactStoreEvent & aEvent ) [private]

Converts contact event type

Parameters

const TVPbkContactStoreEvent & aEvent Event to be converted

ConvertFieldId(MVPbkStoreContactField &)

TInt ConvertFieldId ( MVPbkStoreContactField & aField ) [private]

Converts field id to old phonebook id

Parameters

MVPbkStoreContactField & aField Field to be converted

CreateContactObserverL(MVasContactObserver *)

IMPORT_C void CreateContactObserverL ( MVasContactObserver * aObserver )

Creates the contact change notifier and sets observer as a listener

Since
3.2

Parameters

MVasContactObserver * aObserver Contact change listener

FieldIdL()

IMPORT_C TInt FieldIdL ( )

Returns the field id

Since
3.2

FieldPriority(MVPbkStoreContactField &)

TInt FieldPriority ( MVPbkStoreContactField & aField ) [private]

Gets the priority of the given field

Parameters

MVPbkStoreContactField & aField Field which priority is returned

FieldTypeL()

IMPORT_C TFieldType FieldTypeL ( )

Returns the field type

Since
3.2

FindContactFieldL(MNssTag *)

IMPORT_C void FindContactFieldL ( MNssTag * aTag )

Finds a field from contact

Since
3.2

Parameters

MNssTag * aTag Tag that is used as a search parameter

FindContactL(MNssTag *)

IMPORT_C void FindContactL ( MNssTag * aTag )

Finds a contact from phonebook

Since
3.2

Parameters

MNssTag * aTag Tag that is used as a search parameter

FindContactL(TInt32, TBool)

IMPORT_C void FindContactL ( TInt32 aContactId,
TBool aReadOnly
)

Finds a contact from phonebook

Since
3.2

Parameters

TInt32 aContactId Id of the contact that should be found
TBool aReadOnly ETrue if contact will not be edited else EFalse

FindDefaultContactFieldL(TInt)

IMPORT_C void FindDefaultContactFieldL ( TInt aCommandType )

Searches for a default field of a given type

Parameters

TInt aCommandType Command type that is used as a select parameter Must be one of TVasExtensionCommand types

FindFieldL(MNssTag *)

IMPORT_C void FindFieldL ( MNssTag * aTag )

Finds a field from contact

Since
3.2

Parameters

MNssTag * aTag Tag that is used as a search parameter

FindFieldL(TInt)

IMPORT_C void FindFieldL ( TInt aFieldId )

Finds a field from contact

Since
3.2

Parameters

TInt aFieldId Field id that is used as a search parameter

HandleStoreEventL(MVPbkContactStore &, TVPbkContactStoreEvent)

void HandleStoreEventL ( MVPbkContactStore & aContactStore,
TVPbkContactStoreEvent aStoreEvent
)

Parameters

MVPbkContactStore & aContactStore
TVPbkContactStoreEvent aStoreEvent

InitializeL()

IMPORT_C void InitializeL ( )

Opens phonebook connection and contact stores

Since
3.2

IsFieldEmptyL()

IMPORT_C TBool IsFieldEmptyL ( )

Returns information if current field is empty

Since
3.2

LabelL()

IMPORT_C TPtrC LabelL ( )

Returns the field label

Since
3.2

NewL()

IMPORT_C CVasVPbkHandler * NewL ( ) [static]

Two-phased constructor.

Since
3.2

OperationComplete(MVPbkContactOperationBase &)

void OperationComplete ( MVPbkContactOperationBase & aOperation )

Parameters

MVPbkContactOperationBase & aOperation

SelectDefaultType(TInt)

TVPbkDefaultType SelectDefaultType ( TInt aCommandType ) [private]

Selects default field type for the given tag

Parameters

TInt aCommandType Command type that is used as a select parameter Must be one of TVasExtensionCommand types

StepComplete(MVPbkContactOperationBase &, TInt)

void StepComplete ( MVPbkContactOperationBase & aOperation,
TInt aStepSize
)

Parameters

MVPbkContactOperationBase & aOperation
TInt aStepSize

StepFailed(MVPbkContactOperationBase &, TInt, TInt)

TBool StepFailed ( MVPbkContactOperationBase & aOperation,
TInt aStepSize,
TInt aError
)

Parameters

MVPbkContactOperationBase & aOperation
TInt aStepSize
TInt aError

StoreReady(MVPbkContactStore &)

void StoreReady ( MVPbkContactStore & aContactStore )

Parameters

MVPbkContactStore & aContactStore

StoreUnavailable(MVPbkContactStore &, TInt)

void StoreUnavailable ( MVPbkContactStore & aContactStore,
TInt aReason
)

Parameters

MVPbkContactStore & aContactStore
TInt aReason

TextL()

IMPORT_C TPtrC TextL ( )

Returns the field text

Since
3.2

VPbkSingleContactOperationComplete(MVPbkContactOperationBase &, MVPbkStoreContact *)

void VPbkSingleContactOperationComplete ( MVPbkContactOperationBase & aOperation,
MVPbkStoreContact * aContact
)

Parameters

MVPbkContactOperationBase & aOperation
MVPbkStoreContact * aContact

VPbkSingleContactOperationFailed(MVPbkContactOperationBase &, TInt)

void VPbkSingleContactOperationFailed ( MVPbkContactOperationBase & aOperation,
TInt aError
)

Parameters

MVPbkContactOperationBase & aOperation
TInt aError

Member Data Documentation

MVPbkStoreContact * iContact

MVPbkStoreContact * iContact [private]

CVPbkContactManager * iContactManager

CVPbkContactManager * iContactManager [private]

CVPbkContactIdConverter * iConverter

CVPbkContactIdConverter * iConverter [private]

TInt iError

TInt iError [private]

MVPbkStoreContactField * iField

MVPbkStoreContactField * iField [private]

TBool iMMSSupported

TBool iMMSSupported [private]

MVasContactObserver * iObserver

MVasContactObserver * iObserver [private]

MVPbkContactOperationBase * iOperation

MVPbkContactOperationBase * iOperation [private]

CActiveSchedulerWait iWait

CActiveSchedulerWait iWait [private]