CContactLocalView Class Reference

class CContactLocalView : public CContactViewBase

An instantiable base class for contact views.

The data associated with a local view is allocated within the client's memory space; CContactRemoteView should be used in preference if the view is likely to be shared between multiple clients. It is kept up to date by receiving change events from the underlying CContactDatabase object which it observes. The view preferences and sort order are specified on construction.

Inherits from

Public Member Functions
HBufC *AllFieldsLC(TInt, const TDesC &)
TContactItemId AtL(TInt)
IMPORT_C TAny *CContactViewBase_Reserved_1(TFunction, TAny *)
const CViewContact &ContactAtL(TInt)
TContactViewPreferences ContactViewPreferences()
TInt CountL()
TInt FindL(TContactItemId)
IMPORT_C CContactLocalView *NewL(MContactViewObserver &, const CContactDatabase &, const RContactViewSortOrder &, TContactViewPreferences)
IMPORT_C CContactLocalView *NewL(MContactViewObserver &, const CContactDatabase &, const RContactViewSortOrder &, TContactViewPreferences, const TDesC8 &)
IMPORT_C CContactLocalView *NewL(MContactViewObserver &, const CContactDatabase &, const RContactViewSortOrder &, TContactViewPreferences, MLplPersistenceLayerFactory *, const TDesC8 &)
voidNotifySortError(TInt)
IMPORT_C const RContactViewSortOrder &SortOrder()
const RContactViewSortOrder &SortOrderL()
Protected Member Functions
CContactLocalView(const CContactDatabase &, TContactViewPreferences)
CContactLocalView(const CContactDatabase &, TContactViewPreferences, MLplPersistenceLayerFactory *)
~CContactLocalView()
IMPORT_C voidConstructL(MContactViewObserver &, const RContactViewSortOrder &)
voidConstructL(MContactViewObserver &, const RContactViewSortOrder &, const TBool, const TDesC8 &)
IMPORT_C TIntInsertL(TContactItemId)
IMPORT_C TIntRemoveL(TContactItemId)
voidSetState(TState)
IMPORT_C voidSortL(const RContactViewSortOrder &)
Private Member Functions
IMPORT_C voidCContactLocalView_Reserved_1()
IMPORT_C voidCContactLocalView_Reserved_2()
voidHandleDatabaseEventL(TContactDbObserverEvent)
voidHandleOutstandingEventL()
voidHandleOutstandingEvents()
voidSafeResort()
voidSetSortOrderL(const RContactViewSortOrder &)
voidSortComplete(TInt)
voidSortL()
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()
CContactViewBase::CContactViewBase(const CContactDatabase &)
CContactViewBase::Close(const MContactViewObserver &)
CContactViewBase::CompareContactIds(const CViewContact &,const CViewContact &)
CContactViewBase::CompareContactsAndIdsL(const CViewContact &,const CViewContact &)const
CContactViewBase::CompareFieldsL(const CViewContact &,const CViewContact &)
CContactViewBase::ConstructL()
CContactViewBase::ContactIsSortable(const CViewContact &)
CContactViewBase::ContactsMatchingCriteriaL(const MDesCArray &,RPointerArray< CViewContact > &)
CContactViewBase::ContactsMatchingPrefixL(const MDesCArray &,RPointerArray< CViewContact > &)
CContactViewBase::Error()const
CContactViewBase::FieldsWithSeparatorLC(const RPointerArray< CViewContact > &,TInt,const TDesC &)const
CContactViewBase::FindDefaultViewSortPluginImplL()const
CContactViewBase::FindSortPluginImplL(const TDesC8 &,TBool)const
CContactViewBase::GetContactIdsL(const CArrayFix< TInt > &,CContactIdArray &)
CContactViewBase::GetViewFindConfigPlugin()
CContactViewBase::GetViewSortPluginImplUid()const
CContactViewBase::IdsEqual(const TContactIdWithMapping &,const TContactIdWithMapping &)
CContactViewBase::IdsMatch(const CViewContact &,const CViewContact &)
CContactViewBase::IndexesEqual(const TContactIdWithMapping &,const TContactIdWithMapping &)
CContactViewBase::InsertContactInView(RPointerArray< CViewContact > &,const CViewContact *,TBool,TInt *)const
CContactViewBase::IsContactSortable(const CViewContact &,TContactViewPreferences &)const
CContactViewBase::LoadViewSortPluginL(TUid,TContactViewPreferences &)
CContactViewBase::MatchesCriteriaL(const CViewContact &,const MDesCArray &)
CContactViewBase::MatchesCriteriaL(const CViewContact &,const MDesCArray &,TSearchType)
CContactViewBase::MatchesCriteriaL(const CViewContact &,const MDesCArray &,TSearchType,CContactViewBase::CContactViewBaseExtension *)
CContactViewBase::NotifyObserverAsync(MContactViewObserver &,const TContactViewEvent &)
CContactViewBase::NotifyObservers(const TContactViewEvent &)
CContactViewBase::Open(MContactViewObserver &)
CContactViewBase::OpenL(MContactViewObserver &)
CContactViewBase::SetViewFindConfigPlugin(TUid)
CContactViewBase::SortPluginImpl()const
CContactViewBase::~CContactViewBase()
Inherited Enumerations
CContactViewBase:TFunction
CContactViewBase:TSearchType
CContactViewBase:TState
Protected Attributes
RContactViewSortOrder iSortOrder
Private Attributes
CIdleContactSorter *iAsyncSorter
RPointerArray< CViewContact >iContacts
MLplPersistenceLayerFactory *iFactory
RArray< TContactDbObserverEvent >iOutstandingEvents
TInt iSpare
TBool iSpare0
CContactTextDef *iTextDef
RPointerArray< CViewContact >iUnSortedContacts
CViewContactManager *iViewCntMgr
TContactViewPreferences iViewPreferences
Inherited Attributes
CContactViewBase::iDb
CContactViewBase::iExtension
CContactViewBase::iState

Constructor & Destructor Documentation

CContactLocalView(const CContactDatabase &, TContactViewPreferences)

IMPORT_CCContactLocalView(const CContactDatabase &aDb,
TContactViewPreferencesaContactTypes
)[protected]

Parameters

const CContactDatabase & aDb
TContactViewPreferences aContactTypes

CContactLocalView(const CContactDatabase &, TContactViewPreferences, MLplPersistenceLayerFactory *)

CContactLocalView(const CContactDatabase &aDb,
TContactViewPreferencesaContactTypes,
MLplPersistenceLayerFactory *aIterFactory
)[protected]

Parameters

const CContactDatabase & aDb
TContactViewPreferences aContactTypes
MLplPersistenceLayerFactory * aIterFactory

~CContactLocalView()

IMPORT_C~CContactLocalView()[protected]

Member Functions Documentation

AllFieldsLC(TInt, const TDesC &)

HBufC *AllFieldsLC(TIntaIndex,
const TDesC &aSeparator
)const [virtual]

Returns a descriptor containing the contents of all fields for an item in the view.

The field separator is used to separate the contents of each field. It is not appended to the last field.

capability

ReadUserData

Pointer to the contact item descriptor.

Parameters

TInt aIndexThe index of the contact item into the view.
const TDesC & aSeparatorThe string to use to separate the fields.

AtL(TInt)

TContactItemId AtL(TIntaIndex)const [virtual]

Returns the contact item ID at the specified index into the view.

capability

ReadUserData

The contact item ID.

Parameters

TInt aIndexIndex of the contact item ID into the view.

CContactLocalView_Reserved_1()

IMPORT_C voidCContactLocalView_Reserved_1()[private, virtual]

CContactLocalView_Reserved_2()

IMPORT_C voidCContactLocalView_Reserved_2()[private, virtual]

CContactViewBase_Reserved_1(TFunction, TAny *)

IMPORT_C TAny *CContactViewBase_Reserved_1(TFunctionaFunction,
TAny *aParams
)[virtual]

Parameters

TFunction aFunction
TAny * aParams

ConstructL(MContactViewObserver &, const RContactViewSortOrder &)

IMPORT_C voidConstructL(MContactViewObserver &aObserver,
const RContactViewSortOrder &aSortOrder
)[protected]

Parameters

MContactViewObserver & aObserver
const RContactViewSortOrder & aSortOrder

ConstructL(MContactViewObserver &, const RContactViewSortOrder &, const TBool, const TDesC8 &)

voidConstructL(MContactViewObserver &aObserver,
const RContactViewSortOrder &aSortOrder,
const TBoolaUseNamedPlugin,
const TDesC8 &aSortPluginName
)[protected]

Parameters

MContactViewObserver & aObserver
const RContactViewSortOrder & aSortOrder
const TBool aUseNamedPlugin
const TDesC8 & aSortPluginName

ContactAtL(TInt)

const CViewContact &ContactAtL(TIntaIndex)const [virtual]

Returns the contact item at the specified index into the view.

capability

ReadUserData

The contact item.

Parameters

TInt aIndexIndex of the contact item into the view.

ContactViewPreferences()

TContactViewPreferences ContactViewPreferences()[virtual]

Gets the view preferences.

capability

ReadUserData

The view preferences.

CountL()

TInt CountL()const [virtual]

Returns the number of contact items in the view.

capability

ReadUserData

The number of contact items in the view.

FindL(TContactItemId)

TInt FindL(TContactItemIdaId)const [virtual]

Returns the index into the view of the specified contact item.

capability

ReadUserData

The index into the view of the contact item ID, or KErrNotFound if no matching ID can be found.

Parameters

TContactItemId aIdThe contact item ID to search for.

HandleDatabaseEventL(TContactDbObserverEvent)

voidHandleDatabaseEventL(TContactDbObserverEventaEvent)[private, virtual]

Parameters

TContactDbObserverEvent aEvent

HandleOutstandingEventL()

voidHandleOutstandingEventL()[private]

HandleOutstandingEvents()

voidHandleOutstandingEvents()[private]

InsertL(TContactItemId)

IMPORT_C TIntInsertL(TContactItemIdaId)[protected, virtual]

Parameters

TContactItemId aId

NewL(MContactViewObserver &, const CContactDatabase &, const RContactViewSortOrder &, TContactViewPreferences)

IMPORT_C CContactLocalView *NewL(MContactViewObserver &aObserver,
const CContactDatabase &aDb,
const RContactViewSortOrder &aSortOrder,
TContactViewPreferencesaContactTypes
)[static]

Parameters

MContactViewObserver & aObserver
const CContactDatabase & aDb
const RContactViewSortOrder & aSortOrder
TContactViewPreferences aContactTypes

NewL(MContactViewObserver &, const CContactDatabase &, const RContactViewSortOrder &, TContactViewPreferences, const TDesC8 &)

IMPORT_C CContactLocalView *NewL(MContactViewObserver &aObserver,
const CContactDatabase &aDb,
const RContactViewSortOrder &aSortOrder,
TContactViewPreferencesaContactTypes,
const TDesC8 &aSortPluginName
)[static]

Parameters

MContactViewObserver & aObserver
const CContactDatabase & aDb
const RContactViewSortOrder & aSortOrder
TContactViewPreferences aContactTypes
const TDesC8 & aSortPluginName

NewL(MContactViewObserver &, const CContactDatabase &, const RContactViewSortOrder &, TContactViewPreferences, MLplPersistenceLayerFactory *, const TDesC8 &)

IMPORT_C CContactLocalView *NewL(MContactViewObserver &aObserver,
const CContactDatabase &aDb,
const RContactViewSortOrder &aSortOrder,
TContactViewPreferencesaContactTypes,
MLplPersistenceLayerFactory *aFactory,
const TDesC8 &aSortPluginName
)[static]

Parameters

MContactViewObserver & aObserver
const CContactDatabase & aDb
const RContactViewSortOrder & aSortOrder
TContactViewPreferences aContactTypes
MLplPersistenceLayerFactory * aFactory
const TDesC8 & aSortPluginName

NotifySortError(TInt)

voidNotifySortError(TIntaError)

Parameters

TInt aError

RemoveL(TContactItemId)

IMPORT_C TIntRemoveL(TContactItemIdaId)[protected, virtual]

Parameters

TContactItemId aId

SafeResort()

voidSafeResort()[private]

SetSortOrderL(const RContactViewSortOrder &)

voidSetSortOrderL(const RContactViewSortOrder &aSortOrder)[private]

Parameters

const RContactViewSortOrder & aSortOrder

SetState(TState)

voidSetState(TStateaState)[protected]

Parameters

TState aState

SortComplete(TInt)

voidSortComplete(TIntaSortErr)[private]

Parameters

TInt aSortErr

SortL(const RContactViewSortOrder &)

IMPORT_C voidSortL(const RContactViewSortOrder &aSortOrder)[protected, virtual]

Parameters

const RContactViewSortOrder & aSortOrder

SortL()

voidSortL()[private]

SortOrder()

IMPORT_C const RContactViewSortOrder &SortOrder()const

SortOrderL()

const RContactViewSortOrder &SortOrderL()const [virtual]

Gets the view's sort order.

capability

ReadUserData

The sort order.

Member Data Documentation

CIdleContactSorter * iAsyncSorter

CIdleContactSorter *iAsyncSorter[private]

RPointerArray< CViewContact > iContacts

RPointerArray< CViewContact >iContacts[private]

MLplPersistenceLayerFactory * iFactory

MLplPersistenceLayerFactory *iFactory[private]

RArray< TContactDbObserverEvent > iOutstandingEvents

RArray< TContactDbObserverEvent >iOutstandingEvents[private]

RContactViewSortOrder iSortOrder

RContactViewSortOrder iSortOrder[protected]

The sort order. This is set during construction or when SortL() is called.

TInt iSpare

TInt iSpare[private]

TBool iSpare0

TBool iSpare0[private]

CContactTextDef * iTextDef

CContactTextDef *iTextDef[private]

RPointerArray< CViewContact > iUnSortedContacts

RPointerArray< CViewContact >iUnSortedContacts[private]

CViewContactManager * iViewCntMgr

CViewContactManager *iViewCntMgr[private]

TContactViewPreferences iViewPreferences

TContactViewPreferences iViewPreferences[private]