diff -r 2828b4d142c0 -r 4ae315f230bc contacts_plat/predictivesearch_client_api/inc/CPsRequestHandler.h --- a/contacts_plat/predictivesearch_client_api/inc/CPsRequestHandler.h Tue May 11 16:00:21 2010 +0300 +++ b/contacts_plat/predictivesearch_client_api/inc/CPsRequestHandler.h Tue May 25 12:26:45 2010 +0300 @@ -27,15 +27,15 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include -#include -#include +#include +#include // USER INCLUDES #include @@ -48,6 +48,7 @@ // FORWARD DECLARATIONS class MPsResultsObserver; class CPsPropertyHandler; +class CPsUpdateHandler; // CLASS DECLARATION @@ -157,13 +158,13 @@ IMPORT_C void SearchL(const CPsQuery& aSearchQuery, RPointerArray& aMarkedContacts, CVPbkContactManager* aContactManager); - + /** * CancelSearch. * Cancels ongoing search. - */ + */ IMPORT_C void CancelSearch(); - + /** * LookupL. * Sends a request to the predictive search server. @@ -181,21 +182,21 @@ CDesCArray& aMatchSet, RArray& aMatchLocation); - /** - * LookupMatchL. - * Sends a request to the predictive search server. - * Does a predictive search in aSearchData for aSearchQuery and return - * the match string in aMatch. - * If there is no full match aMatch will be empty (Length()==0) - * This is a synchronous request. - * - * @param aSearchQuery The input search query.(Length of aSearchQuery <= KPsQueryMaxLen) - * @param aSearchData The input data to be searched. - * @param aMatch The matched result - */ - IMPORT_C void LookupMatchL(const CPsQuery& aSearchQuery, - const TDesC& aSearchData, - TDes& aMatch ); + /** + * LookupMatchL. + * Sends a request to the predictive search server. + * Does a predictive search in aSearchData for aSearchQuery and return + * the match string in aMatch. + * If there is no full match aMatch will be empty (Length()==0) + * This is a synchronous request. + * + * @param aSearchQuery The input search query.(Length of aSearchQuery <= KPsQueryMaxLen) + * @param aSearchData The input data to be searched. + * @param aMatch The matched result + */ + IMPORT_C void LookupMatchL(const CPsQuery& aSearchQuery, + const TDesC& aSearchData, + TDes& aMatch); /** * IsLanguageSupportedL. @@ -291,10 +292,9 @@ public: /** - * CPsPropertyHandler is internal class to make it access - * to CPsRequestHandler class + * Notify observers about the cahcing status */ - friend class CPsPropertyHandler; + void NotifyCachingStatus( TCachingStatus aStatus, TInt aError ); private: // Constructors and destructors @@ -323,19 +323,19 @@ * HandleBufferOverFlowL. * Handles internal buffer overflow event. */ - void HandleBufferOverFlowL(); + void HandleBufferOverFlowL(); /** * HandleErrorL. * Handles error events. */ - void HandleErrorL(TInt aErrorCode); + void HandleErrorL(TInt aErrorCode); /** * AddMarkedContacts * Filters the bookmark results and adds them to final search result set */ - TInt AddMarkedContactsL(RPointerArray& searchResults); + TInt AddMarkedContactsL(RPointerArray& searchResults); /** * RunSearchFromBufferL @@ -386,6 +386,21 @@ CPsPropertyHandler* iPropertyHandler; /** + * iContactAddedHandler, handler for reacting to contact being added to cache + */ + CPsUpdateHandler* iContactAddedHandler; + + /** + * iContactRemovedHandler, handler for reacting to contact being removed from cache + */ + CPsUpdateHandler* iContactRemovedHandler; + + /** + * iContactModifiedHandler, handler for reacting to contact being modified in cache + */ + CPsUpdateHandler* iContactModifiedHandler; + + /** * Not Owned * iBookMarkContactManager, contact manager reference received from the client * To be used only for handling marked contacts.