--- 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<CPcsPoolElement>& aSearchSet,
- RPointerArray<CPsQuery>& aSearchQuery,
- TUint8 aFilteredDataMatch,
- TBool aIsGroupSearch,
- const RArray<TInt>& aContactsInGroup);
+ RPointerArray<CPcsPoolElement>& searchSet,
+ RPointerArray<CPsQuery>& searchQuery, TUint8 aFilteredDataMatch,
+ TBool isGroupSearch, RArray<TInt>& 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<KPsQueryMaxLen>& aOutputData);
public:
@@ -76,36 +98,29 @@
* Search Function for multi query
* Initials search feature
*/
- void SearchMultiL(const CPsSettings& aSettings,
- RPointerArray<CPsQuery>& aQuery,
- TBool aIsGroupSearch,
- const RArray<TInt>& aContactsInGroup,
- RPointerArray<CPsData>& aSearchResults,
- RPointerArray<CPsPattern>& aSearchSeqs);
+ void SearchMultiL(const CPsSettings& aSettings, RPointerArray<CPsQuery>& aQuery,
+ TBool isGroupSearch, RArray<TInt>& aContactsInGroup,
+ RPointerArray<CPsData>& searchResults,
+ RPointerArray<CPsPattern>& searchSeqs, TInt keyboardMode);
/**
* Funtion to Search matching sequences for multi query
*/
void SearchMatchSeqMultiL(RPointerArray<CPsQuery>& aPsQuery,
- const TDesC& aData,
- RPointerArray<TDesC>& aMatchSet,
+ TDesC& aData, RPointerArray<TDesC>& aMatchSet,
RArray<TPsMatchLocation>& 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<TInt>& aRequiredDataFields,
+ RArray<TInt>& aSupportedDataFields);
+ /**
* Set the bits corresponding to word matches
*
* @param aIndex Index of data element
@@ -140,6 +155,12 @@
*/
RPointerArray<CPsQuery> MultiQueryL(CPsQuery& aQuery);
+ /**
+ * Convert the search query (multiple) to a list
+ */
+ void ConvertQueryToListL(RPointerArray<CPsQuery>& aSearchQuery,
+ RPointerArray<HBufC>& 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