»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Application Engines CNTMODEL »
CContactSubView
Location:
cntview.h
Link against: cntview.lib
class CContactSubView : public CContactViewBase, public MContactViewObserver;
Description
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.
Derivation
CBase
- Base class for all classes to be instantiated on the heap
CContactSubView
- Provides a view of a range of contact items from a potentially larger underlying view (another CContactViewBase-derived
object)
Members
Defined in CContactSubView
:
AllFieldsLC()
, AtL()
, CContactViewBase_Reserved_1()
, ContactAtL()
, ContactViewPreferences()
, CountL()
, FindL()
, HandleContactViewEvent()
, NewL()
, NewL()
, NewL()
, NewL()
, SortOrderL()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from CContactViewBase
:
Close()
,
CompareFieldsL()
,
ConstructL()
,
ContactsMatchingCriteriaL()
,
ContactsMatchingPrefixL()
,
ECContactViewBaseVirtualFunction1
,
ECContactViewBaseVirtualFunction2
,
ECContactViewBaseVirtualFunction3
,
EFullSearch
,
EInitializing
,
ENotReady
,
EPrefixSearch
,
EReady
,
Error()
,
FieldsWithSeparatorLC()
,
GetContactIdsL()
,
GetViewFindConfigPlugin()
,
IdsEqual()
,
IdsMatch()
,
IndexesEqual()
,
MatchesCriteriaL()
,
NotifyObserverAsync()
,
NotifyObservers()
,
Open()
,
OpenL()
,
SetViewFindConfigPlugin()
,
TFunction
,
TSearchType
,
TState
,
TVirtualFunction1Params
,
TVirtualFunction2Params
,
iDb
,
iExtension
,
iState
Construction and destruction
static IMPORT_C CContactSubView *NewL(MContactViewObserver &aObserver, const CContactDatabase &aDb, CContactViewBase &aView,
const TDesC &aBoundary);
Description
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 &aObserver |
An 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 &aDb |
The database containing the contact items.
|
CContactViewBase &aView |
The underlying view.
|
const TDesC &aBoundary |
A string containing the sub view criteria. Possible values are: <, >, <=, or >=, followed by a character.
|
|
Return value
static IMPORT_C CContactSubView *NewL(MContactViewObserver &aObserver, const CContactDatabase &aDb, CContactViewBase &aView,
const TDesC &aLowBoundary, const TDesC &aHighBoundary);
Description
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 &aObserver |
An 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 &aDb |
The database containing the contact items.
|
CContactViewBase &aView |
The underlying view.
|
const TDesC &aLowBoundary |
A string containing the sub view's lower boundary criteria. Possible values are: > or >=, followed by a character.
|
const TDesC &aHighBoundary |
A string containing the sub view's upper boundary criteria. Possible values are: < or <=, followed by a character.
|
|
Return value
static IMPORT_C CContactSubView *NewL(CContactViewBase &aView, const CContactDatabase &aDb, MContactViewObserver &aObserver,
const TDesC &aBoundary);
Description
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 &aView |
The underlying view.
|
const CContactDatabase &aDb |
The database containing the contact items.
|
MContactViewObserver &aObserver |
An 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 &aBoundary |
A string containing the sub view criteria. Possible values are: <, >, <=, or >=, followed by a character.
|
|
Return value
static IMPORT_C CContactSubView *NewL(CContactViewBase &aView, const CContactDatabase &aDb, MContactViewObserver &aObserver,
const TDesC &aLowBoundary, const TDesC &aHighBoundary);
Description
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 &aView |
The underlying view.
|
const CContactDatabase &aDb |
The database containing the contact items.
|
MContactViewObserver &aObserver |
An 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 &aLowBoundary |
A string containing the sub view's lower boundary criteria. Possible values are: > or >=, followed by a character.
|
const TDesC &aHighBoundary |
A string containing the sub view's upper boundary criteria. Possible values are: < or <=, followed by a character.
|
|
Return value
CContactViewBase_Reserved_1()
virtual TAny *CContactViewBase_Reserved_1(TFunction aFunction, TAny *aParams);
Description
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 |
|
|
Return value
TAny * |
Any return values of the helper methods called from this function or NULL.
|
|
virtual TContactItemId AtL(TInt aIndex) const;
Description
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).
Parameters
TInt aIndex |
Index into the sub view of a contact item ID.
|
|
Return value
Leave codes
KErrNotFound |
aIndex is outside the bounds of the sub view's array.
|
|
virtual TInt CountL() const;
Description
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.
Return value
TInt
|
The number of contact item IDs in the sub view.
|
|
virtual TInt FindL(TContactItemId aId) const;
Description
Finds the index into the sub view of the specified contact item.
Parameters
Return value
TInt
|
The index of the first matching item in the sub view or KErrNotFound if the sub view's upper and lower boundaries have not
been set or if the item is not in the sub view.
|
|
virtual HBufC *AllFieldsLC(TInt aIndex, const TDesC &aSeparator) const;
Description
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 aIndex |
The index into the sub view of the contact item.
|
const TDesC &aSeparator |
The string to use to separate the fields.
|
|
Return value
HBufC * |
Pointer to the contact item descriptor.
|
|
virtual const CViewContact &ContactAtL(TInt aIndex) const;
Description
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).
Parameters
TInt aIndex |
Index into the sub view of the required item.
|
|
Return value
Leave codes
KErrNotFound |
aIndex is outside the bounds of the sub view's array.
|
|
virtual TContactViewPreferences ContactViewPreferences();
Description
Gets the underlying view's view preferences.
Return value
virtual const RContactViewSortOrder &SortOrderL() const;
Description
Gets the underlying view's sort order.
Return value
private: virtual void HandleContactViewEvent(const CContactViewBase &aView, const TContactViewEvent &aEvent);
Description
Handles an event in an observed contact view.
Parameters