diff -r 6b5524b4f673 -r 38bb213f60ba predictivesearch/PcsAlgorithm/Algorithm2/inc/CPcsAlgorithm2MultiSearchHelper.h --- a/predictivesearch/PcsAlgorithm/Algorithm2/inc/CPcsAlgorithm2MultiSearchHelper.h Wed Sep 15 11:56:55 2010 +0300 +++ b/predictivesearch/PcsAlgorithm/Algorithm2/inc/CPcsAlgorithm2MultiSearchHelper.h Wed Oct 13 14:15:33 2010 +0300 @@ -64,11 +64,33 @@ * Filter subset results for multi query mode. */ void FilterResultsMultiL(CPcsAlgorithm2FilterHelper* aAlgorithmFilterHelper, - RPointerArray& aSearchSet, - RPointerArray& aSearchQuery, - TUint8 aFilteredDataMatch, - TBool aIsGroupSearch, - const RArray& aContactsInGroup); + RPointerArray& searchSet, + RPointerArray& searchQuery, TUint8 aFilteredDataMatch, + TBool isGroupSearch, RArray& aContactsInGroup, + TInt keyboardMode); + + /** + * Convert the search query to a string. + * If the mode is ITU-T, character is converted to numeric. + * If the mode is Qwerty, character is retained as is. + */ + void ExtractQueryL(CPsQuery& aPsQuery, TDes& aOutput); + + /** + * Convert the input search query to a string. + * Mode is referred in the CPsQuery. + * If the mode is ITU-T, character is converted to numeric. + * If the mode is Qwerty, character is retained as is. + */ + void ExtractQueryL(TDesC& aInput, CPsQuery& aPsQuery, TDes& aOutput); + /** + * Converts the input data to the key board mode specified by the query. + * Mode is referred in the CPsQuery. + * If the mode is ITU-T, data is converted to numeric. + * If the mode is Qwerty, data is retained as is. + */ + void ConvertdDataToKeyBoardModeL(CPsQuery* aQuery, TPtrC aInputData, + TBuf& aOutputData); public: @@ -76,36 +98,29 @@ * Search Function for multi query * Initials search feature */ - void SearchMultiL(const CPsSettings& aSettings, - RPointerArray& aQuery, - TBool aIsGroupSearch, - const RArray& aContactsInGroup, - RPointerArray& aSearchResults, - RPointerArray& aSearchSeqs); + void SearchMultiL(const CPsSettings& aSettings, RPointerArray& aQuery, + TBool isGroupSearch, RArray& aContactsInGroup, + RPointerArray& searchResults, + RPointerArray& searchSeqs, TInt keyboardMode); /** * Funtion to Search matching sequences for multi query */ void SearchMatchSeqMultiL(RPointerArray& aPsQuery, - const TDesC& aData, - RPointerArray& aMatchSet, + TDesC& aData, RPointerArray& aMatchSet, RArray& aMatchLocation); - - - /** - * Funtion to Search match string for multi query - * - * @param aSearchQuery Search query - * @param aData Source date for matching - * @param aMatchedData Matching result - */ - void LookupMatchL( CPsQuery& aSearchQuery, - const TDesC& aData, - TDes& aMatchedData ); private: /** + * Constructs a bit pattern using the required/supported data fields + * For example, 6, 4 and 27 are supported fields <-- 00000111 + * 6 and 4 are required fields <-- 00000011 + * Bit pattern returned is 00000011. + */ + TUint8 FilterDataFieldsL(RArray& aRequiredDataFields, + RArray& aSupportedDataFields); + /** * Set the bits corresponding to word matches * * @param aIndex Index of data element @@ -140,6 +155,12 @@ */ RPointerArray MultiQueryL(CPsQuery& aQuery); + /** + * Convert the search query (multiple) to a list + */ + void ConvertQueryToListL(RPointerArray& aSearchQuery, + RPointerArray& aQueryList); + private: /** @@ -162,7 +183,7 @@ /** * Pointer to key map instance. Not owned. */ - CPcsKeyMap* iKeyMap; + CPcsKeyMap* keyMap; /** * Array of result sets from different data stores. @@ -174,11 +195,6 @@ * Array of word macthes. */ TUint8 iWordMatches[MAX_DATA_FIELDS]; - - /** - * Counter of the matched contacts - */ - TInt iMaxCount; }; #endif // C_PCS_ALGORITHM_2_MULTI_SEARCH_HELPER