CContactSubView Class Reference

class CContactSubView : public CContactViewBase

Provides a view of a range of contact items from a potentially larger underlying view (another CContactViewBase-derived object).

All contact items between a lower and upper boundary in the underlying view are included in the sub view. For example, the sub view might contain all items whose name begins with a character between 'd' and 'f'.

The sub view observes its underlying view so that as the underlying view changes, the sub view is kept up to date.

Inherits from

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 CContactSubView *NewL(MContactViewObserver &, const CContactDatabase &, CContactViewBase &, const TDesC &)
IMPORT_C CContactSubView *NewL(MContactViewObserver &, const CContactDatabase &, CContactViewBase &, const TDesC &, const TDesC &)
IMPORT_C CContactSubView *NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, const TDesC &)
IMPORT_C CContactSubView *NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, const TDesC &, const TDesC &)
const RContactViewSortOrder &SortOrderL()
Private Member Functions
CContactSubView(const CContactDatabase &, CContactViewBase &)
CContactSubView(const CContactDatabase &, const CContactSubView &)
~CContactSubView()
voidCommonConstructL(MContactViewObserver &)
voidConstructL(MContactViewObserver &, const TDesC &)
voidConstructL(MContactViewObserver &, const CContactSubView &)
voidConstructL(MContactViewObserver &, const CContactSubView &, const TDesC &)
voidConstructL(MContactViewObserver &, const TDesC &, const TDesC &)
CContactViewRangeBase::TCriteria DecodeBoundary(TDes &)
voidHandleContactViewEvent(const CContactViewBase &, const TContactViewEvent &)
TInt MapToSubViewIndex(TInt)
TInt MapToUnderlyingViewIndex(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()
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
TUint iClassVersion
CContactViewRangeBase *iRange
CContactViewBase &iView
Inherited Attributes
CContactViewBase::iDb
CContactViewBase::iExtension
CContactViewBase::iState

Constructor & Destructor Documentation

CContactSubView(const CContactDatabase &, CContactViewBase &)

CContactSubView(const CContactDatabase &aDb,
CContactViewBase &aView
)[private]

Parameters

const CContactDatabase & aDb
CContactViewBase & aView

CContactSubView(const CContactDatabase &, const CContactSubView &)

CContactSubView(const CContactDatabase &aDb,
const CContactSubView &aView
)[private]

Parameters

const CContactDatabase & aDb
const CContactSubView & aView

~CContactSubView()

~CContactSubView()[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 for an item in the sub view.

NULL is returned if the sub view's upper and lower boundaries have not been set (in debug builds, a panic occurs).

Parameters

TInt aIndexThe index into the sub 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 sub view.

In release builds, zero is returned if the sub view's upper and lower boundaries have not been set, (in debug builds, a panic occurs).

leave
KErrNotFound aIndex is outside the bounds of the sub view's array.

Parameters

TInt aIndexIndex into the sub view of a contact item ID.

CContactViewBase_Reserved_1(TFunction, TAny *)

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

This is a reserved virtual exported function that is used for BC proofing against present and future additions of new exported virtual functions.

Parameters

TFunction aFunction
TAny * aParams

CommonConstructL(MContactViewObserver &)

voidCommonConstructL(MContactViewObserver &aObserver)[private]

Parameters

MContactViewObserver & aObserver

ConstructL(MContactViewObserver &, const TDesC &)

voidConstructL(MContactViewObserver &aObserver,
const TDesC &aBoundary
)[private]

Parameters

MContactViewObserver & aObserver
const TDesC & aBoundary

ConstructL(MContactViewObserver &, const CContactSubView &)

voidConstructL(MContactViewObserver &aObserver,
const CContactSubView &aView
)[private]

Parameters

MContactViewObserver & aObserver
const CContactSubView & aView

ConstructL(MContactViewObserver &, const CContactSubView &, const TDesC &)

voidConstructL(MContactViewObserver &aObserver,
const CContactSubView &aView,
const TDesC &aBoundary
)[private]

Parameters

MContactViewObserver & aObserver
const CContactSubView & aView
const TDesC & aBoundary

ConstructL(MContactViewObserver &, const TDesC &, const TDesC &)

voidConstructL(MContactViewObserver &aObserver,
const TDesC &aLowBoundary,
const TDesC &aHighBoundary
)[private]

Parameters

MContactViewObserver & aObserver
const TDesC & aLowBoundary
const TDesC & aHighBoundary

ContactAtL(TInt)

const CViewContact &ContactAtL(TIntaIndex)const [virtual]

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

A NULL contact item is returned if the sub view's upper and lower boundaries have not been set (in debug builds, a panic occurs).

leave
KErrNotFound aIndex is outside the bounds of the sub view's array.

Parameters

TInt aIndexIndex into the sub view of the required item.

ContactViewPreferences()

TContactViewPreferences ContactViewPreferences()[virtual]

Gets the underlying view's view preferences.

CountL()

TInt CountL()const [virtual]

Gets the number of contact item IDs in the sub view.

Zero is returned if the sub view's upper and lower boundaries have not been set.

DecodeBoundary(TDes &)

CContactViewRangeBase::TCriteria DecodeBoundary(TDes &aBoundary)const [private]

Parameters

TDes & aBoundary

FindL(TContactItemId)

TInt FindL(TContactItemIdaId)const [virtual]

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

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

MapToSubViewIndex(TInt)

TInt MapToSubViewIndex(TIntaUnderlyingViewIndex)const [private]

Parameters

TInt aUnderlyingViewIndex

MapToUnderlyingViewIndex(TInt)

TInt MapToUnderlyingViewIndex(TIntaSubViewIndex)const [private]

Parameters

TInt aSubViewIndex

NewL(MContactViewObserver &, const CContactDatabase &, CContactViewBase &, const TDesC &)

IMPORT_C CContactSubView *NewL(MContactViewObserver &aObserver,
const CContactDatabase &aDb,
CContactViewBase &aView,
const TDesC &aBoundary
)[static]

Allocates and constructs a new CContactSubView version 1 object, specifying the sub view's criteria.

When adding/deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to KErrNone.

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 containing the contact items.
CContactViewBase & aViewThe underlying view.
const TDesC & aBoundaryA string containing the sub view criteria. Possible values are: <, >, <=, or >=, followed by a character.

NewL(MContactViewObserver &, const CContactDatabase &, CContactViewBase &, const TDesC &, const TDesC &)

IMPORT_C CContactSubView *NewL(MContactViewObserver &aObserver,
const CContactDatabase &aDb,
CContactViewBase &aView,
const TDesC &aLowBoundary,
const TDesC &aHighBoundary
)[static]

Allocates and constructs a new CContactSubView version 1 object, specifying the sub view's upper and lower boundary criteria.

When adding/deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to KErrNone.

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 containing the contact items.
CContactViewBase & aViewThe underlying view.
const TDesC & aLowBoundaryA string containing the sub view's lower boundary criteria. Possible values are: > or >=, followed by a character.
const TDesC & aHighBoundaryA string containing the sub view's upper boundary criteria. Possible values are: < or <=, followed by a character.

NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, const TDesC &)

IMPORT_C CContactSubView *NewL(CContactViewBase &aView,
const CContactDatabase &aDb,
MContactViewObserver &aObserver,
const TDesC &aBoundary
)[static]

Allocates and constructs a new CContactSubView version 2 object, specifying the sub view's criteria.

When adding/deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to index into the observed view of the added/deleted item

Parameters

CContactViewBase & aViewThe underlying view.
const CContactDatabase & aDbThe database containing the contact items.
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 TDesC & aBoundaryA string containing the sub view criteria. Possible values are: <, >, <=, or >=, followed by a character.

NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, const TDesC &, const TDesC &)

IMPORT_C CContactSubView *NewL(CContactViewBase &aView,
const CContactDatabase &aDb,
MContactViewObserver &aObserver,
const TDesC &aLowBoundary,
const TDesC &aHighBoundary
)[static]

Allocates and constructs a new CContactSubView version 2 object, specifying the sub view's upper and lower boundary criteria.

When adding/deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to index into the observed view of the added/deleted item

Parameters

CContactViewBase & aViewThe underlying view.
const CContactDatabase & aDbThe database containing the contact items.
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 TDesC & aLowBoundaryA string containing the sub view's lower boundary criteria. Possible values are: > or >=, followed by a character.
const TDesC & aHighBoundaryA string containing the sub view's upper boundary criteria. Possible values are: < or <=, followed by a character.

SortOrderL()

const RContactViewSortOrder &SortOrderL()const [virtual]

Gets the underlying view's sort order.

Member Data Documentation

TUint iClassVersion

TUint iClassVersion[private]

CContactViewRangeBase * iRange

CContactViewRangeBase *iRange[private]

CContactViewBase & iView

CContactViewBase &iView[private]