diff -r 6b5524b4f673 -r 38bb213f60ba predictivesearch/PcsAlgorithm/Algorithm2/inc/CPcsCache.h --- a/predictivesearch/PcsAlgorithm/Algorithm2/inc/CPcsCache.h Wed Sep 15 11:56:55 2010 +0300 +++ b/predictivesearch/PcsAlgorithm/Algorithm2/inc/CPcsCache.h Wed Oct 13 14:15:33 2010 +0300 @@ -38,7 +38,7 @@ /** * Two phase construction */ - static CPcsCache* NewL(CPcsAlgorithm2* aAlgorithm, const TDesC& aURI, + static CPcsCache* NewL(CPcsAlgorithm2* aAlgorithm, TDesC& aURI, CPcsKeyMap& aKeyMap, TUint8 aUriId); /** @@ -74,7 +74,7 @@ /** * Removes all data elements from the cache */ - void RemoveAllFromCache(); + void RemoveAllFromCacheL(); /** * Sets data fields to the cache @@ -125,16 +125,6 @@ */ void ResortdataInPoolsL(); - /** - * Get data index of the first name field - */ - TInt GetFirstNameIndex() const; - - /** - * Get data index of the last name field - */ - TInt GetLastNameIndex() const; - private: /** @@ -145,36 +135,24 @@ /** * Second phase constructor */ - void ConstructL(CPcsAlgorithm2* aAlgorithm, const TDesC& aURI, + void ConstructL(CPcsAlgorithm2* aAlgorithm, TDesC& aURI, CPcsKeyMap& aKeyMap, TUint8 aUriId); /** * Utility function to add a contact to the pool */ - void AddToPoolL(TUint64& aPoolMap, CPsData& aData); - - /** - * Utility function - */ - void SetPoolMap(TUint64& aPoolMap, TInt aArrayIndex); + void AddToPoolL(TInt& aInfo, CPsData& data); /** * Utility function */ - TBool GetPoolMap(TUint64& aPoolMap, TInt aArrayIndex); + void SetPoolMap(TInt& aPoolMap, TInt aPoolId); /** - * Gets all the first characters of the words in the data field according - * to which the contact should be inserted into cache. + * Utility function */ - void GetFirstCharsForDataL( const TDesC& aData, RArray& aFirstChars ) const; - - /** - * Gets all the pool IDs matching the given characters. If there are two predictive - * keyboards available, then pool IDs are given according to both keyboards. - */ - void GetPoolIdsForCharsL( const RArray& aChars, RArray& aPoolIds ) const; - + TBool GetPoolMap(TInt& aPoolMap, TInt arrayIndex); + /** * Utility function */ @@ -187,27 +165,27 @@ * Array of key maps */ typedef RPointerArray R_PTR_ARRAY; - RPointerArray iKeyArr; + RPointerArray keyArr; /* * Hashmaps to remember the location of a contact in the pools */ - RHashMap iCacheInfo; + RHashMap cacheInfo; /* * Master pool of all contacts in this cache */ - RPointerArray iMasterPool; + RPointerArray masterPool; /* * Master pool backup of all contacts in this cache when sortorder changed */ - RPointerArray iMasterPoolBackup; + RPointerArray masterPoolBackup; /* * Not owned */ - CPcsKeyMap* iKeyMap; + CPcsKeyMap* keyMap; /** * Owned. Refer to the database URI this cache is for.