predictivesearch/PcsAlgorithm/Algorithm1/inc/CPcsAlgorithm1.h
branchRCL_3
changeset 12 4ae315f230bc
parent 7 b3431bff8c19
child 13 a6539d1e8e43
equal deleted inserted replaced
11:2828b4d142c0 12:4ae315f230bc
    71 		* Search Function for cache
    71 		* Search Function for cache
    72 		*/
    72 		*/
    73 		void PerformSearchL(const CPsSettings& aPcsSettings,
    73 		void PerformSearchL(const CPsSettings& aPcsSettings,
    74 					   	    CPsQuery& aCondition,
    74 					   	    CPsQuery& aCondition,
    75 					   	    RPointerArray<CPsClientData>& aData,
    75 					   	    RPointerArray<CPsClientData>& aData,
    76 					   	    RPointerArray<CPsPattern>& aPattern);							
    76 					   	    RPointerArray<CPsPattern>& aPattern);
    77 									
    77 		
    78 		/**
    78 		/**
    79 		* Search Function for input string
    79 		* Search Function for input string
    80 		*/
    80 		*/
    81 		void SearchInputL(CPsQuery& aSearchQuery,
    81 		void SearchInputL(CPsQuery& aSearchQuery,
    82 						  TDesC& aSearchData,
    82 						  TDesC& aSearchData,
    87         * Performs search on a input string, and return result also as a string 
    87         * Performs search on a input string, and return result also as a string 
    88         */
    88         */
    89         void  SearchMatchStringL( CPsQuery& aSearchQuery,
    89         void  SearchMatchStringL( CPsQuery& aSearchQuery,
    90                                     TDesC& aSearchData,
    90                                     TDesC& aSearchData,
    91                                     TDes& aMatch ); 
    91                                     TDes& aMatch ); 
    92 								       
    92 		
    93 		/**
    93 		/**
    94 		* Returns ETrue if this language is supported
    94 		* Returns ETrue if this language is supported
    95 		*/
    95 		*/
    96 		TBool IsLanguageSupportedL(const TUint32 aLanguage);
    96 		TBool IsLanguageSupportedL(const TUint32 aLanguage);
    97 		      
    97 		
    98 		/**
    98 		/**
    99 		* Returns supported data fields for a cache
    99 		* Returns supported data fields for a cache
   100 		*/		                     
   100 		*/
   101 		void GetDataOrderL( TDesC& aURI, RArray<TInt>& aDataOrder );
   101 		void GetDataOrderL( TDesC& aURI, RArray<TInt>& aDataOrder );
   102 
   102 
   103 		/**
   103 		/**
   104 		* Returns supported sort order for a cache
   104 		* Returns supported sort order for a cache
   105 		*/		                     
   105 		*/
   106 		void GetSortOrderL( TDesC& aURI, RArray<TInt>& aDataOrder );
   106 		void GetSortOrderL( TDesC& aURI, RArray<TInt>& aDataOrder );
   107 
   107 
   108 		/**
   108 		/**
   109 		* Sets the sort order for a cache
   109 		* Sets the sort order for a cache
   110 		*/
   110 		*/
   121 		* Add a contact to the cache
   121 		* Add a contact to the cache
   122 		*/
   122 		*/
   123 		void AddData ( TDesC& aDataStore, CPsData* aData);
   123 		void AddData ( TDesC& aDataStore, CPsData* aData);
   124 
   124 
   125 		/** 
   125 		/** 
   126 		* Remove a contact from the cache based on contact id		
   126 		* Remove a contact from the cache based on contact id
   127 		*/
   127 		*/
   128 		void RemoveData ( TDesC& aDataStore, TInt aItemId );
   128 		void RemoveData ( TDesC& aDataStore, TInt aItemId );
   129 
   129 
   130 		/**
   130 		/**
   131 		*  Removes all the contacts from a particular datastore
   131 		*  Removes all the contacts from a particular datastore
   138 		void UpdateCachingStatus(TDesC& aDataStore, TInt aStatus);
   138 		void UpdateCachingStatus(TDesC& aDataStore, TInt aStatus);
   139 		
   139 		
   140 		// --------------------------------------------------------------------
   140 		// --------------------------------------------------------------------
   141 		
   141 		
   142 	public:
   142 	public:
   143 				
   143 		
   144 		// ----------------- From base class MStoreListObserver ---------------
   144 		// ----------------- From base class MStoreListObserver ---------------
   145 
   145 
   146 		/**
   146 		/**
   147 		* This method is called whenever any new store has been added
   147 		* This method is called whenever any new store has been added
   148 		*/
   148 		*/
   189 		/**
   189 		/**
   190 		* 2nd phase construtor
   190 		* 2nd phase construtor
   191 		*/
   191 		*/
   192 		void ConstructL();
   192 		void ConstructL();
   193 			
   193 			
   194     private:		
   194     private:
   195 
   195 
       
   196         /**
       
   197         * Define a P&S property with given key under the internal category 
       
   198         * UID of PCS. Leave if definition fails for any other reason than
       
   199         * key already existing.
       
   200         */
       
   201         void DefinePropertyL( TPcsInternalKeyCacheStatus aPsKey );
       
   202     
   196         /**
   203         /**
   197         * Remove leading and trailing spaces of search query
   204         * Remove leading and trailing spaces of search query
   198         */
   205         */
   199         void RemoveSpacesL ( CPsQuery& aQuery );
   206         void RemoveSpacesL ( CPsQuery& aQuery );
   200 
   207 
   201 		/**
   208 		/**
   202 		* Replace occurance of "0" in ITU-T mode with space
   209 		* Replace occurances of "0" in predictive mode with space
       
   210 		* if those are on the same button
   203 		*/
   211 		*/
   204 		TBool ReplaceZeroWithSpaceL ( CPsQuery& aQuery );
   212 		TBool ReplaceZeroWithSpaceL ( CPsQuery& aQuery );
   205 			
   213 			
   206 		/**
   214 		/**
   207 		* Search function helper
   215 		* Search function helper
   208 		*/
   216 		*/
   209 		void DoSearchL ( const CPsSettings& aPcsSettings,
   217 		void DoSearchL ( const CPsSettings& aPcsSettings,
   210 						 CPsQuery& aCondition,
   218 						 CPsQuery& aCondition,
   211 						 RPointerArray<CPsData>& searchResults,
   219 						 RPointerArray<CPsData>& aSearchResults,
   212 	                     RPointerArray<CPsPattern>& searchSeqs );
   220 	                     RPointerArray<CPsPattern>& aSearchSeqs );
   213 		
   221 		
   214 		/**                
   222 		/**                
   215 		* Search function helper
   223 		* Search function helper
   216 		*/
   224 		*/
   217 		void DoSearchInputL ( CPsQuery& aQuery,
   225 		void DoSearchInputL ( CPsQuery& aQuery,
   284 		* Function to return data base URI for an internal identifier
   292 		* Function to return data base URI for an internal identifier
   285 		*/
   293 		*/
   286 		const TDesC& GetUriForIdL( TUint8 aUriId );
   294 		const TDesC& GetUriForIdL( TUint8 aUriId );
   287 		
   295 		
   288         /**
   296         /**
       
   297         * Inform clients about update happened on the cache
       
   298         */
       
   299         void HandleCacheUpdated( TCachingStatus aStatus );
       
   300         
       
   301         /**
   289         * launch plugins by idle
   302         * launch plugins by idle
   290         */
   303         */
   291          void DoLaunchPluginsL();
   304          void DoLaunchPluginsL();
   292         
   305         
   293         /**
   306         /**