CContactFindView Class Reference

class CContactFindView : public CContactViewBase

Provides a view of an existing CContactViewBase-derived object, populated using search criteria.

The find view only contains contact items from the underlying view that match the search criteria.

The find view observes its underlying view so that it is kept up to date if the contents of the underlying view change.

The search criteria (one or more words) are held in an MDesCArray object. The fields involved in the search are those that have been used to sort the underlying view.

Inherits from

Public Member Functions
~CContactFindView()
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 CContactFindView *NewL(const CContactDatabase &, CContactViewBase &, MContactViewObserver &, MDesCArray *)
IMPORT_C CContactFindView *NewL(const CContactDatabase &, CContactViewBase &, MContactViewObserver &, MDesCArray *, TSearchType)
IMPORT_C CContactFindView *NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, MDesCArray *)
IMPORT_C CContactFindView *NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, MDesCArray *, TSearchType)
IMPORT_C voidRefineFindViewL(MDesCArray *)
const RContactViewSortOrder &SortOrderL()
Protected Member Functions
IMPORT_C voidUpdateFindViewL()
Private Member Functions
CContactFindView(const CContactDatabase &, CContactViewBase &, TSearchType)
voidConstructL(MContactViewObserver &, MDesCArray *)
voidCopyNewFindWordsL(MDesCArray *)
voidDeleteFindContacts()
voidDestroyFindWordsArray()
voidHandleAddEventL(TContactViewEvent &)
voidHandleContactViewEvent(const CContactViewBase &, const TContactViewEvent &)
voidHandleRemoveEventL(TContactViewEvent &)
TInt InsertContact(const CViewContact *)
voidTightenFindViewCriteriaL()
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
RPointerArray< CViewContact >iFindContacts
CPtrCArray *iFindWords
const TSearchTypeiSearchType
CContactViewBase &iView
Inherited Attributes
CContactViewBase::iDb
CContactViewBase::iExtension
CContactViewBase::iState

Constructor & Destructor Documentation

CContactFindView(const CContactDatabase &, CContactViewBase &, TSearchType)

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

Parameters

const CContactDatabase & aDb
CContactViewBase & aView
TSearchType aSearchType

~CContactFindView()

~CContactFindView()

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.

CContactViewBase_Reserved_1(TFunction, TAny *)

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

Parameters

TFunction aFunction
TAny * aParams

ConstructL(MContactViewObserver &, MDesCArray *)

voidConstructL(MContactViewObserver &aObserver,
MDesCArray *aFindWords
)[private]

Parameters

MContactViewObserver & aObserver
MDesCArray * aFindWords

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.

CopyNewFindWordsL(MDesCArray *)

voidCopyNewFindWordsL(MDesCArray *aFindWords)[private]

Parameters

MDesCArray * aFindWords

CountL()

TInt CountL()const [virtual]

Returns the number of contact items in the view.

capability

ReadUserData

The number of contact items in the view.

DeleteFindContacts()

voidDeleteFindContacts()[private]

DestroyFindWordsArray()

voidDestroyFindWordsArray()[private]

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.

HandleAddEventL(TContactViewEvent &)

voidHandleAddEventL(TContactViewEvent &aEvent)[private]

Parameters

TContactViewEvent & aEvent

HandleContactViewEvent(const CContactViewBase &, const TContactViewEvent &)

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

Parameters

const CContactViewBase & aView
const TContactViewEvent & aEvent

HandleRemoveEventL(TContactViewEvent &)

voidHandleRemoveEventL(TContactViewEvent &aEvent)[private]

Parameters

TContactViewEvent & aEvent

InsertContact(const CViewContact *)

TInt InsertContact(const CViewContact *aNewContact)[private]

Parameters

const CViewContact * aNewContact

NewL(const CContactDatabase &, CContactViewBase &, MContactViewObserver &, MDesCArray *)

IMPORT_C CContactFindView *NewL(const CContactDatabase &aDb,
CContactViewBase &aView,
MContactViewObserver &aObserver,
MDesCArray *aFindWords
)[static]

Parameters

const CContactDatabase & aDb
CContactViewBase & aView
MContactViewObserver & aObserver
MDesCArray * aFindWords

NewL(const CContactDatabase &, CContactViewBase &, MContactViewObserver &, MDesCArray *, TSearchType)

IMPORT_C CContactFindView *NewL(const CContactDatabase &aDb,
CContactViewBase &aView,
MContactViewObserver &aObserver,
MDesCArray *aFindWords,
TSearchTypeaSearchType
)[static]

Parameters

const CContactDatabase & aDb
CContactViewBase & aView
MContactViewObserver & aObserver
MDesCArray * aFindWords
TSearchType aSearchType

NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, MDesCArray *)

IMPORT_C CContactFindView *NewL(CContactViewBase &aView,
const CContactDatabase &aDb,
MContactViewObserver &aObserver,
MDesCArray *aFindWords
)[static]

Parameters

CContactViewBase & aView
const CContactDatabase & aDb
MContactViewObserver & aObserver
MDesCArray * aFindWords

NewL(CContactViewBase &, const CContactDatabase &, MContactViewObserver &, MDesCArray *, TSearchType)

IMPORT_C CContactFindView *NewL(CContactViewBase &aView,
const CContactDatabase &aDb,
MContactViewObserver &aObserver,
MDesCArray *aFindWords,
TSearchTypeaSearchType
)[static]

Parameters

CContactViewBase & aView
const CContactDatabase & aDb
MContactViewObserver & aObserver
MDesCArray * aFindWords
TSearchType aSearchType

RefineFindViewL(MDesCArray *)

IMPORT_C voidRefineFindViewL(MDesCArray *aFindWords)

Parameters

MDesCArray * aFindWords

SortOrderL()

const RContactViewSortOrder &SortOrderL()const [virtual]

Gets the view's sort order.

capability

ReadUserData

The sort order.

TightenFindViewCriteriaL()

voidTightenFindViewCriteriaL()[private]

UpdateFindViewL()

IMPORT_C voidUpdateFindViewL()[protected, virtual]

Member Data Documentation

TUint iClassVersion

TUint iClassVersion[private]

RPointerArray< CViewContact > iFindContacts

RPointerArray< CViewContact >iFindContacts[private]

CPtrCArray * iFindWords

CPtrCArray *iFindWords[private]

const TSearchType iSearchType

const TSearchTypeiSearchType[private]

CContactViewBase & iView

CContactViewBase &iView[private]