class CContactViewBase : public CBase |
The abstract base class for all contact view classes.
All contact views operate asynchronously, so users of the view must observe it, by implementing the MContactViewObserver interface. Immediately after construction, views are not in a usable state (the underlying data may be being sorted, for instance). Only after the user has received a TContactViewEvent::EReady event may the view be used.
View observers are also notified when changes occur, for instance when the view's state changes (see TState), when an error occurs, or when an item is added or removed.
Public Member Functions | |
---|---|
HBufC * | AllFieldsLC(TInt, const TDesC &) |
TContactItemId | AtL(TInt) |
IMPORT_C TAny * | CContactViewBase_Reserved_1(TFunction, TAny *) |
IMPORT_C TBool | Close(const MContactViewObserver &) |
const CViewContact & | ContactAtL(TInt) |
TContactViewPreferences | ContactViewPreferences() |
IMPORT_C void | ContactsMatchingCriteriaL(const MDesCArray &, RPointerArray< CViewContact > &) |
IMPORT_C void | ContactsMatchingPrefixL(const MDesCArray &, RPointerArray< CViewContact > &) |
TInt | CountL() |
IMPORT_C TInt | Error() |
TInt | FindL(TContactItemId) |
IMPORT_C void | GetContactIdsL(const CArrayFix< TInt > &, CContactIdArray &) |
IMPORT_C TUid | GetViewFindConfigPlugin() |
IMPORT_C TUid | GetViewSortPluginImplUid() |
IMPORT_C TInt | Open(MContactViewObserver &) |
IMPORT_C void | OpenL(MContactViewObserver &) |
IMPORT_C void | SetViewFindConfigPlugin(TUid) |
const RContactViewSortOrder & | SortOrderL() |
Private Member Functions | |
---|---|
TInt | AsyncNotifyCallBack(TAny *) |
TInt | CompareFieldsWithCollationLevel(const CViewContact &, const CViewContact &, TInt, TCollationMethod *) |
TBool | ContactMatchesCriteriaL(const CViewContact &, const MDesCArray &, CContactViewBase::CContactViewBaseExtension *) |
CDesCArrayFlat * | CreateFindWordArrayLC(const MDesCArray &, TSearchType) |
void | GetContactsMatchingFilterL(TInt, RArray< TContactIdWithMapping > &) |
TInt | GetErrorValueFromExtensionClass() |
void | MatchContactsL(const MDesCArray &, RPointerArray< CViewContact > &, TSearchType) |
TInt | TextCompareFieldsL(const CViewContact &, const CViewContact &) |
Public Member Enumerations | |
---|---|
enum | TFunction { ECContactViewBaseVirtualFunction1, ECContactViewBaseVirtualFunction2, ECContactViewBaseVirtualFunction3 } |
enum | TSearchType { EFullSearch, EPrefixSearch } |
Protected Member Enumerations | |
---|---|
enum | TState { EInitializing, EReady, ENotReady } |
Protected Attributes | |
---|---|
const CContactDatabase & | iDb |
CContactViewBaseExtension * | iExtension |
TState | iState |
Private Attributes | |
---|---|
CIdle * | iAsyncNotifier |
RPointerArray< MContactViewObserver > | iObserverArray |
RArray< TObserverAndEvent > | iOutstandingNotifications |
IMPORT_C | CContactViewBase | ( | const CContactDatabase & | aDb | ) | [protected] |
const CContactDatabase & aDb |
HBufC * | AllFieldsLC | ( | TInt | aIndex, |
const TDesC & | aSeparator | |||
) | const [pure 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.
TInt | AsyncNotifyCallBack | ( | TAny * | aSelf | ) | [private, static] |
TAny * aSelf |
TContactItemId | AtL | ( | TInt | aIndex | ) | const [pure virtual] |
Returns the contact item ID at the specified index into the view.
capability
ReadUserData
The contact item ID.
TInt aIndex | Index of the contact item ID into the view. |
IMPORT_C TAny * | CContactViewBase_Reserved_1 | ( | TFunction | aFunction, |
TAny * | aParams | |||
) | [virtual] |
IMPORT_C TBool | Close | ( | const MContactViewObserver & | aObserver | ) |
const MContactViewObserver & aObserver |
IMPORT_C TInt | CompareContactIds | ( | const CViewContact & | aFirst, |
const CViewContact & | aSecond | |||
) | [protected, static] |
const CViewContact & aFirst | |
const CViewContact & aSecond |
IMPORT_C TInt | CompareContactsAndIdsL | ( | const CViewContact & | aFirst, |
const CViewContact & | aSecond | |||
) | const [protected] |
const CViewContact & aFirst | |
const CViewContact & aSecond |
IMPORT_C TInt | CompareFieldsL | ( | const CViewContact & | aFirst, |
const CViewContact & | aSecond | |||
) | [protected, static] |
const CViewContact & aFirst | |
const CViewContact & aSecond |
TInt | CompareFieldsWithCollationLevel | ( | const CViewContact & | aFirst, |
const CViewContact & | aSecond, | |||
TInt | aCollationLevel, | |||
TCollationMethod * | aCollateMethod | |||
) | [private, static] |
const CViewContact & aFirst | |
const CViewContact & aSecond | |
TInt aCollationLevel | |
TCollationMethod * aCollateMethod |
const CViewContact & | ContactAtL | ( | TInt | aIndex | ) | const [pure virtual] |
Returns the contact item at the specified index into the view.
capability
ReadUserData
The contact item.
TInt aIndex | Index of the contact item into the view. |
IMPORT_C TBool | ContactIsSortable | ( | const CViewContact & | aContact | ) | [protected, static] |
const CViewContact & aContact |
TBool | ContactMatchesCriteriaL | ( | const CViewContact & | aContact, |
const MDesCArray & | aFindWords, | |||
CContactViewBase::CContactViewBaseExtension * | aExtension | |||
) | [private, static] |
const CViewContact & aContact | |
const MDesCArray & aFindWords | |
CContactViewBase::CContactViewBaseExtension * aExtension |
TContactViewPreferences | ContactViewPreferences | ( | ) | [pure virtual] |
Gets the view preferences.
capability
ReadUserData
The view preferences.
IMPORT_C void | ContactsMatchingCriteriaL | ( | const MDesCArray & | aFindWords, |
RPointerArray< CViewContact > & | aMatchedContacts | |||
) | [virtual] |
const MDesCArray & aFindWords | |
RPointerArray< CViewContact > & aMatchedContacts |
IMPORT_C void | ContactsMatchingPrefixL | ( | const MDesCArray & | aFindWords, |
RPointerArray< CViewContact > & | aMatchedContacts | |||
) | [virtual] |
const MDesCArray & aFindWords | |
RPointerArray< CViewContact > & aMatchedContacts |
TInt | CountL | ( | ) | const [pure virtual] |
Returns the number of contact items in the view.
capability
ReadUserData
The number of contact items in the view.
CDesCArrayFlat * | CreateFindWordArrayLC | ( | const MDesCArray & | aFindWords, |
TSearchType | aSearchType | |||
) | [private, static] |
const MDesCArray & aFindWords | |
TSearchType aSearchType |
IMPORT_C HBufC * | FieldsWithSeparatorLC | ( | const RPointerArray< CViewContact > & | aContacts, |
TInt | aIndex, | |||
const TDesC & | aSeparator | |||
) | const [protected] |
const RPointerArray< CViewContact > & aContacts | |
TInt aIndex | |
const TDesC & aSeparator |
TInt | FindL | ( | TContactItemId | aId | ) | const [pure 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.
TContactItemId aId | The contact item ID to search for. |
TUid | FindSortPluginImplL | ( | const TDesC8 & | aSortPluginName, |
TBool | aWildCard = EFalse | |||
) | const [protected] |
IMPORT_C void | GetContactIdsL | ( | const CArrayFix< TInt > & | aIndexes, |
CContactIdArray & | aContactIds | |||
) | [virtual] |
const CArrayFix< TInt > & aIndexes | |
CContactIdArray & aContactIds |
void | GetContactsMatchingFilterL | ( | TInt | aFilter, |
RArray< TContactIdWithMapping > & | aMatchingContacts | |||
) | [private] |
TInt aFilter | |
RArray< TContactIdWithMapping > & aMatchingContacts |
IMPORT_C TBool | IdsEqual | ( | const TContactIdWithMapping & | aFirst, |
const TContactIdWithMapping & | aSecond | |||
) | [protected, static] |
const TContactIdWithMapping & aFirst | |
const TContactIdWithMapping & aSecond |
IMPORT_C TBool | IdsMatch | ( | const CViewContact & | aFirst, |
const CViewContact & | aSecond | |||
) | [protected, static] |
const CViewContact & aFirst | |
const CViewContact & aSecond |
IMPORT_C TBool | IndexesEqual | ( | const TContactIdWithMapping & | aFirst, |
const TContactIdWithMapping & | aSecond | |||
) | [protected, static] |
const TContactIdWithMapping & aFirst | |
const TContactIdWithMapping & aSecond |
TInt | InsertContactInView | ( | RPointerArray< CViewContact > & | aContacts, |
const CViewContact * | aNewContact, | |||
TBool | aSortByIdOnly, | |||
TInt * | aIndex | |||
) | const [protected] |
RPointerArray< CViewContact > & aContacts | |
const CViewContact * aNewContact | |
TBool aSortByIdOnly | |
TInt * aIndex |
TBool | IsContactSortable | ( | const CViewContact & | aContact, |
TContactViewPreferences & | aViewPreferences | |||
) | const [protected] |
const CViewContact & aContact | |
TContactViewPreferences & aViewPreferences |
void | LoadViewSortPluginL | ( | TUid | aSortPluginUid, |
TContactViewPreferences & | aViewPreferences | |||
) | [protected] |
TUid aSortPluginUid | |
TContactViewPreferences & aViewPreferences |
void | MatchContactsL | ( | const MDesCArray & | aFindWords, |
RPointerArray< CViewContact > & | aMatchedContacts, | |||
TSearchType | aSearchType | |||
) | [private] |
const MDesCArray & aFindWords | |
RPointerArray< CViewContact > & aMatchedContacts | |
TSearchType aSearchType |
IMPORT_C TBool | MatchesCriteriaL | ( | const CViewContact & | aContact, |
const MDesCArray & | aFindWords | |||
) | [protected, virtual] |
const CViewContact & aContact | |
const MDesCArray & aFindWords |
IMPORT_C TBool | MatchesCriteriaL | ( | const CViewContact & | aContact, |
const MDesCArray & | aFindWords, | |||
TSearchType | aSearchType | |||
) | [protected, static] |
const CViewContact & aContact | |
const MDesCArray & aFindWords | |
TSearchType aSearchType |
IMPORT_C TBool | MatchesCriteriaL | ( | const CViewContact & | aContact, |
const MDesCArray & | aFindWords, | |||
TSearchType | aSearchType, | |||
CContactViewBase::CContactViewBaseExtension * | aExtension | |||
) | [protected, static] |
const CViewContact & aContact | |
const MDesCArray & aFindWords | |
TSearchType aSearchType | |
CContactViewBase::CContactViewBaseExtension * aExtension |
IMPORT_C TInt | NotifyObserverAsync | ( | MContactViewObserver & | aObserver, |
const TContactViewEvent & | aEvent | |||
) | [protected] |
MContactViewObserver & aObserver | |
const TContactViewEvent & aEvent |
IMPORT_C void | NotifyObservers | ( | const TContactViewEvent & | aEvent | ) | [protected] |
const TContactViewEvent & aEvent |
IMPORT_C TInt | Open | ( | MContactViewObserver & | aObserver | ) |
MContactViewObserver & aObserver |
IMPORT_C void | OpenL | ( | MContactViewObserver & | aObserver | ) |
MContactViewObserver & aObserver |
const RContactViewSortOrder & | SortOrderL | ( | ) | const [pure virtual] |
Gets the view's sort order.
capability
ReadUserData
The sort order.
TInt | TextCompareFieldsL | ( | const CViewContact & | aFirst, |
const CViewContact & | aSecond | |||
) | const [private] |
const CViewContact & aFirst | |
const CViewContact & aSecond |
Identifies the functions that have been added to CContactViewBase, or that may be added in the future. This identifier is passed to the reserved virtual function CContactViewBase_Reserved_1() and enables the addition of new virtual methods without breaking binary compatibility.
ECContactViewBaseVirtualFunction1 |
Identifies the function CContactViewBase::GetContactIdsL(). |
ECContactViewBaseVirtualFunction2 |
Identifies the function CContactViewBase::GetContactsMatchingFilterL(). |
ECContactViewBaseVirtualFunction3 |
Identifies the function CContactViewBase::InsertContactInView(). |
Search type.
This controls whether a search term can occur anywhere in a contact item field, or just at the beginning of the field.
EFullSearch |
The search uses full wildcard matching so that the search string can occur anywhere in the item's fields. |
EPrefixSearch |
The search uses partial wildcard matching so that the search string can only occur at the beginning of the item's fields. |
Defines the contact view states.
EInitializing |
The view is initialising. This is the view's state immediately after construction or after a significant change (e.g CurrentDatabaseChanged or UnknownChanges), indicating that it can't be used yet. |
EReady |
The view is ready to be used. |
ENotReady |
The view is not ready to be used, for instance immediately after the sort order has changed, or after an error has occurred. |
RPointerArray< MContactViewObserver > | iObserverArray | [private] |
RArray< TObserverAndEvent > | iOutstandingNotifications | [private] |