contacts_plat/predictivesearch_client_api/inc/MPsResultsObserver.h
branchRCL_3
changeset 35 4ae315f230bc
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
equal deleted inserted replaced
32:2828b4d142c0 35:4ae315f230bc
    32 *  Mixin class.
    32 *  Mixin class.
    33 *  Observer which handles updates from the predictive search server.
    33 *  Observer which handles updates from the predictive search server.
    34 */
    34 */
    35 class MPsResultsObserver
    35 class MPsResultsObserver
    36 {
    36 {
    37 	public:
    37     public:
    38 
    38 
    39 		/**
    39         /**
    40 		* HandlePsResultsUpdateL.
    40         * HandlePsResultsUpdateL.
    41 		* Handle updates from the server.
    41         * Handle updates from the server.
    42 		* 
    42         * 
    43 		* @param searchResults Search results returned from the server.
    43         * @param searchResults Search results returned from the server.
    44 		* @param searchSeqs    List of matching character sequences.
    44         * @param searchSeqs    List of matching character sequences.
    45 		*/
    45         */
    46 		virtual void HandlePsResultsUpdate(RPointerArray<CPsClientData>& searchResults,
    46         virtual void HandlePsResultsUpdate(RPointerArray<CPsClientData>& aSearchResults,
    47 		                                    RPointerArray<CPsPattern>& searchSeqs) = 0;
    47                                            RPointerArray<CPsPattern>& aSearchSeqs) = 0;
    48 		                                    
       
    49 
    48 
    50 		/**
       
    51 		* HandlePsErrorL.
       
    52 		* Handle errors from the server.
       
    53 		* 
       
    54 		* @param aErrorCode Search errors returned from the server.	    
       
    55 		*/	                                        
       
    56 		virtual void HandlePsError(TInt aErrorCode) = 0;
       
    57         /**
    49         /**
    58         * CachingStatus
    50         * HandlePsErrorL.
    59         * Gets called when caching is completed.
    51         * Handle errors from the server.
       
    52         * 
       
    53         * @param aErrorCode Search errors returned from the server.
       
    54         */
       
    55         virtual void HandlePsError(TInt aErrorCode) = 0;
       
    56 
       
    57         /**
       
    58         * CachingStatus.
       
    59         * Gets called when caching is completed, or cache has been modified after
       
    60         * the initial caching. For update events, it's not guaranteed that function
       
    61         * gets called separately for each modification in case there are several same kind of
       
    62         * modifications happening in rapid sequence.
    60         * Observers need to implement this function accordingly
    63         * Observers need to implement this function accordingly
    61         * to take action after cache completion
    64         * to take action after cache completion or update.
    62         * @param aStatus - caching status, 20 - Caching completes succesfully, 30 - Caching completed with errors
    65         * @param aStatus - caching status
    63         * @param aError - Any error that occurred while caching. KErrNone if no error else the error code
    66         * @param aError - Any error that occurred while caching. 
       
    67         *                 KErrNone if no error, else the error code
    64         */
    68         */
    65         virtual void CachingStatus(TCachingStatus& aStatus, TInt& aError) = 0;   
    69         virtual void CachingStatus(TCachingStatus& aStatus, TInt& aError) = 0;
    66 };
    70 };
    67 
    71 
    68 #endif // __M_PS_RESULTS_OBSERVER__
    72 #endif // __M_PS_RESULTS_OBSERVER__
    69 
    73 
    70 // End of File
    74 // End of File