CContactConcatenatedView Class Reference

class CContactConcatenatedView : public CContactViewBase

Concatenates multiple contact views into a single contiguous view.

The component views are ordered according to their order in the array passed into the NewL().

Inherits from

Nested Classes and Structures

Public Member Functions
HBufC *AllFieldsLC(TInt, const TDesC &)
TContactItemId AtL(TInt)
TAny *CContactViewBase_Reserved_1(TFunction, TAny *)
const CViewContact &ContactAtL(TInt)
TContactViewPreferences ContactViewPreferences()
TInt CountL()
TInt FindL(TContactItemId)
IMPORT_C CContactConcatenatedView *NewL(MContactViewObserver &, const CContactDatabase &, RPointerArray< CContactViewBase > &)
const RContactViewSortOrder &SortOrderL()
Private Member Functions
CContactConcatenatedView(const CContactDatabase &)
~CContactConcatenatedView()
voidCloseComponentViews()
TBool ComponentViewsEqual(const TComponentView &, const TComponentView &)
TBool ComponentViewsReady()
voidConstructL(MContactViewObserver &, RPointerArray< CContactViewBase > &)
voidCopyComponentViewsL(RPointerArray< CContactViewBase > &)
TInt FindComponentView(const CContactViewBase &)
voidHandleContactViewEvent(const CContactViewBase &, const TContactViewEvent &)
TInt OffsetL(const CContactViewBase &)
voidOpenComponentViewsL()
voidSetComponentViewReady(const CContactViewBase &)
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
Private Attributes
RArray< TComponentView >iComponentView
Inherited Attributes
CContactViewBase::iDb
CContactViewBase::iExtension
CContactViewBase::iState

Constructor & Destructor Documentation

CContactConcatenatedView(const CContactDatabase &)

CContactConcatenatedView(const CContactDatabase &aDb)[private]

Parameters

const CContactDatabase & aDb

~CContactConcatenatedView()

~CContactConcatenatedView()[private]

Member Functions Documentation

AllFieldsLC(TInt, const TDesC &)

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

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

The fields are separated by aSeparator.

leave
KErrNotReady The view is not ready for use.
panic
CNTMODEL 29 In debug builds, this indicates that the index is invalid. It must be less that the total number of items in the concatenated view. In release builds, a NULL pointer is returned instead.

Parameters

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

AtL(TInt)

TContactItemId AtL(TIntaIndex)const [virtual]

Gets the contact item ID at the specified index into the concatenated view.

leave
KErrNotReady The view is not ready for use.
leave
KErrNotFound The index is out of bounds. It must be less than the total number of items in all component views.

Parameters

TInt aIndexIndex into the concatenated view.

CContactViewBase_Reserved_1(TFunction, TAny *)

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

Parameters

TFunction aFunction
TAny * aParams

CloseComponentViews()

voidCloseComponentViews()[private]

ComponentViewsEqual(const TComponentView &, const TComponentView &)

TBool ComponentViewsEqual(const TComponentView &aFirst,
const TComponentView &aSecond
)[private, static]

Parameters

const TComponentView & aFirst
const TComponentView & aSecond

ComponentViewsReady()

TBool ComponentViewsReady()[private]

ConstructL(MContactViewObserver &, RPointerArray< CContactViewBase > &)

voidConstructL(MContactViewObserver &aObserver,
RPointerArray< CContactViewBase > &aComponentViews
)[private]

Parameters

MContactViewObserver & aObserver
RPointerArray< CContactViewBase > & aComponentViews

ContactAtL(TInt)

const CViewContact &ContactAtL(TIntaIndex)const [virtual]

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

leave
KErrNotReady The view is not ready for use.
leave
KErrNotFound The index is invalid. It must be less that the total number of items in the concatenated view.

Parameters

TInt aIndexIndex into the view.

ContactViewPreferences()

TContactViewPreferences ContactViewPreferences()[virtual]

Gets the view preferences for the first component view.

CopyComponentViewsL(RPointerArray< CContactViewBase > &)

voidCopyComponentViewsL(RPointerArray< CContactViewBase > &aComponentViews)[private]

Parameters

RPointerArray< CContactViewBase > & aComponentViews

CountL()

TInt CountL()const [virtual]

Gets the number of contact items in the concatenated view.

This is the total number of items in all component views.
leave
KErrNotReady The view is not ready for use.

FindComponentView(const CContactViewBase &)

TInt FindComponentView(const CContactViewBase &aView)[private]

Parameters

const CContactViewBase & aView

FindL(TContactItemId)

TInt FindL(TContactItemIdaId)const [virtual]

Finds the index into the concatenated view of the specified contact item.

leave
KErrNotReady The view is not ready for use.

Parameters

TContactItemId aIdThe contact item ID to search for.

HandleContactViewEvent(const CContactViewBase &, const TContactViewEvent &)

voidHandleContactViewEvent(const CContactViewBase &aView,
const TContactViewEvent &aEvent
)[private, virtual]

Parameters

const CContactViewBase & aView
const TContactViewEvent & aEvent

NewL(MContactViewObserver &, const CContactDatabase &, RPointerArray< CContactViewBase > &)

IMPORT_C CContactConcatenatedView *NewL(MContactViewObserver &aObserver,
const CContactDatabase &aDb,
RPointerArray< CContactViewBase > &aComponentViews
)[static]

Allocates and constructs a new CContactConcatenatedView object,

Parameters

MContactViewObserver & aObserverAn observer that receives notifications when this view is ready for use and when changes take place in it. The observer receives a TContactViewEvent::EReady event when the view is ready. An attempt to use the view before this notification causes a panic.
const CContactDatabase & aDbThe database that contains the contact items.
RPointerArray< CContactViewBase > & aComponentViewsAn array of pointers to the component views to append to this view. The concatenated view creates its own copy of this array and sets itself to be the observer of each of the component views, unless an error occurs, in which case the function leaves.

OffsetL(const CContactViewBase &)

TInt OffsetL(const CContactViewBase &aView)[private]

Parameters

const CContactViewBase & aView

OpenComponentViewsL()

voidOpenComponentViewsL()[private]

SetComponentViewReady(const CContactViewBase &)

voidSetComponentViewReady(const CContactViewBase &aView)[private]

Parameters

const CContactViewBase & aView

SortOrderL()

const RContactViewSortOrder &SortOrderL()const [virtual]

Gets the sort order for the first component view.

Member Data Documentation

RArray< TComponentView > iComponentView

RArray< TComponentView >iComponentView[private]