CContactRemoteViewBase Class Reference

#include <app/cntviewbase.h>

class CContactRemoteViewBase : public CContactViewBase

Inherits from

Protected Attributes
RContactRemoteView iView
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 voidContactsMatchingCriteriaL(const MDesCArray &, RPointerArray< CViewContact > &)
virtual voidContactsMatchingPrefixL(const MDesCArray &, RPointerArray< CViewContact > &)
virtual TInt CountL()
virtual TInt FindL(TContactItemId)
virtual voidGetContactIdsL(const CArrayFix< TInt > &, CContactIdArray &)
voidGetContactsMatchingFilterL(TInt, RArray< TContactIdWithMapping > &)
virtual const RContactViewSortOrder &SortOrderL()
Protected Member Functions
CContactRemoteViewBase(const CContactDatabase &)
~CContactRemoteViewBase()
voidConstructL(MContactViewObserver &)
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::Error()const
CContactViewBase::FieldsWithSeparatorLC(const RPointerArray< CViewContact > &,TInt,const TDesC &)const
CContactViewBase::FindDefaultViewSortPluginImplL()const
CContactViewBase::FindSortPluginImplL(const TDesC8 &,TBool)const
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()

Detailed Description

Base class for all remote contact view classes.

It implements all the pure virtual functions in CContactViewBase and additionally it handles remote view notifications. The data associated with remote views is allocated within the memory space of the contacts server. This means that multiple clients can share the same server side view object, thereby reducing the overhead associated with initial sorting of the view data and keeping it in sync with the underlying data. Remote views should therefore be used when the same view is likely to be needed by more than one client.

Member Attribute Documentation

iView

RContactRemoteView iView[protected]

A handle to the server side view.

Constructor & Destructor Documentation

CContactRemoteViewBase ( const CContactDatabase & )

CContactRemoteViewBase(const CContactDatabase &aDb)[protected]

Protected C++ constructor.

ParameterDescription
aDbThe underlying database containing the contact items.

~CContactRemoteViewBase ( )

~CContactRemoteViewBase()[protected]
Cancels the active notifier and closes the session with the contacts server.
capability
None

Member Function Documentation

AllFieldsLC ( TInt, const TDesC & )

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

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

Gets a descriptor containing the contents of all fields specified in the server side view's sort order 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
leave
KErrNotFound The index is greater than or equal to the number of items in the view.
leave
KErrNotReady The view is not ready for use.
panic
CntLock 6 The index is less than zero.
ParameterDescription
aIndexThe index of the contact item into the view.
aSeparatorThe string to use to separate the fields.

Returns: Pointer to the contact item descriptor.

AtL ( TInt )

TContactItemId AtL(TIntaIndex)const [virtual]

Reimplemented from CContactViewBase::AtL(TInt)const

Returns the ID of the contact item at a specified index into the the server side view.

capability
ReadUserData
leave
KErrNotFound The index is greater than or equal to the number of items in the view.
leave
KErrNotReady The view is not ready for use.
panic
CntLock 6 The index is less than zero.
ParameterDescription
aIndexAn index into the server side view.

Returns: The ID of the contact item at the specified index.

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 present and future additions of new exported virtual functions.

capability
ReadUserData

ConstructL ( MContactViewObserver & )

voidConstructL(MContactViewObserver &aObserver)[protected]

Protected second phase constructor.

Starts an active object which notifies this view (by calling its HandleContactViewEvent() function) when view events occur in the server side view. This remote view in turn passes the events to its observers.

capability
ReadUserData
ParameterDescription
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.

ContactAtL ( TInt )

const CViewContact &ContactAtL(TIntaIndex)const [virtual]

Returns the contact item at a specified index into the server side view.

capability
ReadUserData
leave
KErrNotFound The index is greater than or equal to the number of items in the view.
leave
KErrNotReady The view is not ready for use.
panic
CntLock 6 The index is less than zero.
ParameterDescription
aIndexAn index into the server side view.

Returns: The contact item at the specified index.

ContactViewPreferences ( )

TContactViewPreferences ContactViewPreferences()[virtual]

Gets the server side view's view preferences.

capability
ReadUserData

Returns: The view preferences.

ContactsMatchingCriteriaL ( const MDesCArray &, RPointerArray< CViewContact > & )

voidContactsMatchingCriteriaL(const MDesCArray &aFindWords,
RPointerArray< CViewContact > &aMatchedContacts
)[virtual]

Searches all contact items in the server side view for fields that contain all of the search strings specified.

The search uses wildcard matching so that the search strings can occur anywhere in the item's fields. For a match to occur, all of the search strings must be found in a contact item.

capability
ReadUserData
ParameterDescription
aFindWordsA descriptor array containing one or more search strings.
aMatchedContactsOn return, an array of matching contact items.

ContactsMatchingPrefixL ( const MDesCArray &, RPointerArray< CViewContact > & )

voidContactsMatchingPrefixL(const MDesCArray &aFindWords,
RPointerArray< CViewContact > &aMatchedContacts
)[virtual]

Searches all contact items in the server side view for fields that contain all of the search strings specified.

Unlike ContactsMatchingCriteriaL(), the search term can only occur at the beginning of a field.

capability
ReadUserData
ParameterDescription
aFindWordsA descriptor array containing one or more search strings.
aMatchedContactsOn return, an array of matching contact items.

CountL ( )

TInt CountL()const [virtual]

Gets the total number of contact items in the server side view.

capability
ReadUserData
leave
KErrNotReady The view is not ready for use.

Returns: The number of contact items in the view.

FindL ( TContactItemId )

TInt FindL(TContactItemIdaId)const [virtual]

Searches for a contact item in the server side view with the specified ID.

capability
ReadUserData
leave
KErrNotReady The view is not ready for use.
ParameterDescription
aIdThe ID of the contact item to search for.

Returns: If found, the index into the view of the matching item. Otherwise, KErrNotFound.

GetContactIdsL ( const CArrayFix< TInt > &, CContactIdArray & )

voidGetContactIdsL(const CArrayFix< TInt > &aIndexes,
CContactIdArray &aContactIds
)[virtual]

Gets an array containing the IDs of the contact items at the specified indexes into the server side view.

The IDs are appended to the array.

capability
ReadUserData
ParameterDescription
aIndexesAn array of indexes into the server side view.
aContactIdsOn return, an array to which the contact item IDs of each of the indexed items are appended.

GetContactsMatchingFilterL ( TInt, RArray< TContactIdWithMapping > & )

voidGetContactsMatchingFilterL(TIntaFilter,
RArray< TContactIdWithMapping > &aMatchingContacts
)

Requests an array of contact IDs from the server-side view which match the filter provided by the client.

capability
ReadUserData

SortOrderL ( )

const RContactViewSortOrder &SortOrderL()const [virtual]

Gets the server side view's sort order.

capability
ReadUserData

Returns: The sort order.