CContactConcatenatedView Class Reference

#include <app/cntview.h>

Link against: cntview.lib

class CContactConcatenatedView : public CContactViewBase, public MContactViewObserver, public CContactViewBase, public MContactViewObserver
Public Member Functions
virtual HBufC *AllFieldsLC(TInt, const TDesC &)
virtual TContactItemId AtL(TInt)
virtual TAny *CContactViewBase_Reserved_1(TFunction, TAny *)
virtual const CViewContact &ContactAtL(TInt)
virtual TContactViewPreferences ContactViewPreferences()
virtual TInt CountL()
virtual TInt FindL(TContactItemId)
IMPORT_C CContactConcatenatedView *NewL(MContactViewObserver &, const CContactDatabase &, RPointerArray< CContactViewBase > &)
virtual const RContactViewSortOrder &SortOrderL()
Inherited Attributes
CContactViewBase::iDb
CContactViewBase::iExtension
CContactViewBase::iState
Inherited Enumerations
CContactViewBase:TFunction
CContactViewBase:TSearchType
CContactViewBase:TState
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 MDesC16Array &,RPointerArray< CViewContact > &)
CContactViewBase::ContactsMatchingCriteriaL(const MDesCArray &,RPointerArray< CViewContact > &)
CContactViewBase::ContactsMatchingPrefixL(const MDesC16Array &,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 MDesC16Array &)
CContactViewBase::MatchesCriteriaL(const CViewContact &,const MDesC16Array &,TSearchType)
CContactViewBase::MatchesCriteriaL(const CViewContact &,const MDesC16Array &,TSearchType,CContactViewBase::CContactViewBaseExtension *)
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()

Detailed Description

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().

Member Function Documentation

AllFieldsLC ( TInt, const TDesC & )

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

Reimplemented from CContactViewBase::AllFieldsLC(TInt,const TDesC &)const

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

The fields are separated by aSeparator.

Parameters
aIndexThe index into the view of the contact item.
aSeparatorThe string to use to separate the fields.
Return Value
Pointer to the contact item descriptor.
Leave Codes
KErrNotReadyThe view is not ready for use.
Panic Codes
CNTMODEL29 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.

AtL ( TInt )

TContactItemId AtL(TIntaIndex)const [virtual]

Reimplemented from CContactViewBase::AtL(TInt)const

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

Parameters
aIndexIndex into the concatenated view.
Return Value
The contact item ID.
Leave Codes
KErrNotReadyThe view is not ready for use.
KErrNotFoundThe index is out of bounds. It must be less than the total number of items in all component views.

CContactViewBase_Reserved_1 ( TFunction, TAny * )

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

Reimplemented from CContactViewBase::CContactViewBase_Reserved_1(TFunction,TAny *)

This is a reserved virtual exported function that is used for BC proofing against addition of new exported virtual functions. This function now aids addition of new exported virtual methods without having to break BC,by simply having those virtual methods as non-virtual and helper methods, called from this one and only reserved virtual exported method.A public enumeration type that is defined in the base class CContactViewBase identifies which of the helper 'virtual' methods are being called. All derived classes of CContactViewBase that are public should mandatorily implement this method.

Returns any return values of the helper methods called from this function.

Parameters
aFunctionan enum value that identifies which helper method is called.
aParamsparameters to the helper method being called.
Return Value
Any return values of the helper methods called from this function or NULL.
Capability
ReadUserData

ContactAtL ( TInt )

const CViewContact &ContactAtL(TIntaIndex)const [virtual]

Reimplemented from CContactViewBase::ContactAtL(TInt)const

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

Parameters
aIndexIndex into the view.
Return Value
The contact item.
Leave Codes
KErrNotReadyThe view is not ready for use.
KErrNotFoundThe index is invalid. It must be less that the total number of items in the concatenated view.

ContactViewPreferences ( )

TContactViewPreferences ContactViewPreferences()[virtual]

Reimplemented from CContactViewBase::ContactViewPreferences()

Gets the view preferences for the first component view.

Return Value
The view preferences.

CountL ( )

TInt CountL()const [virtual]

Reimplemented from CContactViewBase::CountL()const

Gets the number of contact items in the concatenated view.

This is the total number of items in all component views.
Return Value
The number of items in the concatenated view.
Leave Codes
KErrNotReadyThe view is not ready for use.

FindL ( TContactItemId )

TInt FindL(TContactItemIdaId)const [virtual]

Reimplemented from CContactViewBase::FindL(TContactItemId)const

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

Parameters
aIdThe contact item ID to search for.
Return Value
The index of the first matching item in the concatenated view or KErrNotFound if no matching item can be found.
Leave Codes
KErrNotReadyThe view is not ready for use.

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
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.
aDbThe database that contains the contact items.
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.
Return Value
The newly constructed concatenated view object.

SortOrderL ( )

const RContactViewSortOrder &SortOrderL()const [virtual]

Reimplemented from CContactViewBase::SortOrderL()const

Gets the sort order for the first component view.

Return Value
The sort order.