class CPbapContactDbViews : public CBase |
Provides API to search database and sort the results into name or pronunciation field order using contact database views
Public Member Functions | |
---|---|
~CPbapContactDbViews() | |
void | CancelSearchAndSortRequest() |
void | CloseAllViews() |
void | GetContactIdsMatchingCriteriaL(SymbianPBAP::TOrder, SymbianPBAP::TSearchAttribute, const TDesC &, CContactIdArray &, MPbapContactDbViewsCallback &) |
HBufC * | GetContactNameFromIdL(TContactItemId) |
CPbapContactDbViews * | NewL(CContactDatabase &) |
Private Member Functions | |
---|---|
CPbapContactDbViews(CContactDatabase &) | |
void | AppendField(HBufC *, TUid, const CContactItemFieldSet &, TBool) |
void | CancelAndCleanup() |
void | CopyToResultsArrayL(const CContactIdArray &) |
void | CreateNameViewL() |
void | CreatePhoneticViewL() |
void | DoSearchAndSortCallback() |
void | DoSearchAndSortL() |
void | DoSortL() |
void | DoSortSearchResultsL(CContactIdArray &) |
void | FindInPhoneFieldsL() |
void | FindInViewL(CContactViewBase &) |
CContactIdArray * | GetContactIdsInViewL(CContactViewBase &) |
void | HandleContactViewEvent(const CContactViewBase &, const TContactViewEvent &) |
void | HandleFindInViewCompleteL() |
void | HandleIdleFindCompleteL() |
void | IdleFindCallback() |
TBool | IsPhoneticViewRequired() |
void | NotifySearchAndSortComplete(TInt) |
void | ResortIdsInViewOrderL(CContactIdArray &, CContactViewBase &) |
TInt | SearchAndSortCallback(TAny *) |
Private Member Enumerations | |
---|---|
enum | TSearchAndSortOpState { EIdle, EPendingSearch, ESearching, ESorting } |
CPbapContactDbViews | ( | CContactDatabase & | aDatabase | ) | [private] |
CContactDatabase & aDatabase |
void | AppendField | ( | HBufC * | aBuf, |
TUid | aUid, | |||
const CContactItemFieldSet & | aFieldSet, | |||
TBool | aLast = EFalse | |||
) | const [private] |
HBufC * aBuf | |
TUid aUid | |
const CContactItemFieldSet & aFieldSet | |
TBool aLast = EFalse |
void | CloseAllViews | ( | ) |
Close all currently open views and abort current asynchronous search and sort request. This function should be called when the PBAP session ends (gracefully or otherwise) to save memory while there is no PBAP session open
void | CopyToResultsArrayL | ( | const CContactIdArray & | aContactIds | ) | [private] |
const CContactIdArray & aContactIds |
void | DoSortSearchResultsL | ( | CContactIdArray & | aContactIds | ) | [private] |
CContactIdArray & aContactIds |
void | FindInViewL | ( | CContactViewBase & | aView | ) | [private] |
CContactViewBase & aView |
CContactIdArray * | GetContactIdsInViewL | ( | CContactViewBase & | aView | ) | [private] |
CContactViewBase & aView |
void | GetContactIdsMatchingCriteriaL | ( | SymbianPBAP::TOrder | aOrder, |
SymbianPBAP::TSearchAttribute | aSearchAttribute, | |||
const TDesC & | aSearchValue, | |||
CContactIdArray & | aResults, | |||
MPbapContactDbViewsCallback & | aCallback | |||
) |
Finds contacts matching search parameters and returns the ids sorted in the requested order
SymbianPBAP::TOrder aOrder | |
SymbianPBAP::TSearchAttribute aSearchAttribute | |
const TDesC & aSearchValue | |
CContactIdArray & aResults | |
MPbapContactDbViewsCallback & aCallback |
HBufC * | GetContactNameFromIdL | ( | TContactItemId | aContactId | ) | const |
Get contact name string with fields separated by a semi-colon. The fields are read from the name view when it is ready, otherwise they are read from the database
TContactItemId aContactId |
void | HandleContactViewEvent | ( | const CContactViewBase & | aView, |
const TContactViewEvent & | aEvent | |||
) | [private] |
this function is part of MContactViewObserver and is called back as a result of an event occurring on a specific view, in our case iNameView or iPhoneticView
const CContactViewBase & aView | |
const TContactViewEvent & aEvent |
CPbapContactDbViews * | NewL | ( | CContactDatabase & | aDatabase | ) | [static] |
CContactDatabase & aDatabase |
void | NotifySearchAndSortComplete | ( | TInt | aError | ) | [private] |
TInt aError |
void | ResortIdsInViewOrderL | ( | CContactIdArray & | aContactIds, |
CContactViewBase & | aView | |||
) | [private] |
aView will be sorted in a specific order and this function re-orders the contact ids in aContectIds to be in the same order
CContactIdArray & aContactIds | |
CContactViewBase & aView |
TInt | SearchAndSortCallback | ( | TAny * | aAny | ) | [private, static] |
TAny * aAny |
SymbianPBAP::TSearchAttribute | iSearchAttribute | [private] |