contacts_plat/predictivesearch_client_api/inc/RPsSession.h
branchRCL_3
changeset 39 a6539d1e8e43
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
--- a/contacts_plat/predictivesearch_client_api/inc/RPsSession.h	Tue May 25 12:26:45 2010 +0300
+++ b/contacts_plat/predictivesearch_client_api/inc/RPsSession.h	Wed Jun 09 09:26:27 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  This is the client side interface declaration for the 
+* Description:  This is the client side interface declaration for the
 *                predictive contact search server.
 *
 */
@@ -44,7 +44,7 @@
 		* RPcsSession.
 		* Constructor
 		*/
-		RPsSession();	
+		RPsSession();
 
 		/**
 		* Connect.
@@ -59,14 +59,14 @@
 		* @return Version information
 		*/
 		TVersion Version() const;
-	
+
 	    /**
         * SetSearchSettingsL.
         * Send the search settings (databases/ display fields) to the server.
-        * @param aSettings      The search settings.       
+        * @param aSettings      The search settings.
         */
 	    void SetSearchSettingsL(const TDes8& aSettings);
-	
+
         /**
         * SearchL.
         * Initiates a predictive search request to the server.
@@ -77,36 +77,36 @@
 	    void SearchL(const TDes8& aSearchQuery,
 	                 TPtr8 aResultsBuffer,
 					 TRequestStatus& aStatus);
-	
+
 	    /**
 	    * CancelSearchL.
 	    * Cancels a pending search request.
 	    * @param aStatus        Holds the completion status of request.
-	    */ 				 
-	    void CancelSearch();		
-	    
+	    */
+	    void CancelSearch();
+
 	    /**
         * SearchL.
         * Initiates a predictive search request to the server.
         * @param aSearchQuery   The search query.
         * @param aSearchData    The search data.
-        * @param aResultsBuffer Pointer to the initial results buffer.	 
+        * @param aResultsBuffer Pointer to the initial results buffer.
         */
 	    void SearchL(const TDes8& aSearchQuery,
 	                 const TDes8& aSearchData,
 	                 TPtr8 aResultsBuffer);
 
-	    /**
+        /**
         * SearchMatchStringL.
         * Initiates a predictive search request to the server with result as string.
         * @param aSearchQuery   The search query.
         * @param aSearchData    The search data.
-        * @param aResultsBuffer Pointer to the initial results buffer.	 
-        */	    
-	    void SearchMatchStringL(const TDes8& aSearchQuery,
-	                             const TDes8& aSearchData,
-	                             TDes& aResultsBuffer);
-	    
+        * @param aResultsBuffer Pointer to the initial results buffer.
+        */
+       void SearchMatchStringL(const TDes8& aSearchQuery,
+                               const TDes8& aSearchData,
+                               TDes& aResultsBuffer);
+
 	    /**
 	    * SendNewBufferL.
 	    * Send a new buffer to server if a overflow occurs.
@@ -116,65 +116,81 @@
 	    */
 	    void SendNewBufferL(TPtr8 aResultsBuffer,
 	                        TRequestStatus& aStatus);
-	                           
+
         /**
         * IsLanguageSupportedL
         * Sends a request to PS server to decide if the language
         * variant is supported or not
         *
-        * @param aLanguage     The language id info.
-        * @param aResultsBuffer Pointer to the initial results buffer.	 
-        */                              
+        * @param aLanguage      The language id info.
+        * @param aResultsBuffer Pointer to the initial results buffer.
+        */
         void IsLanguageSupportedL(const TDes8& aLanguage,
-                                      TPtr8 aResultsBuffer);	                        	 
+                                  TPtr8 aResultsBuffer);
         /**
         * GetDataOrderL
         * Sends a request to PS server to get the data fields supported
         * for a data store.
         *
         * @param aURI           Data store identifier.
-        * @param aResultsBuffer Pointer to the results buffer.	 
-        */                              
+        * @param aResultsBuffer Pointer to the results buffer.
+        */
         void GetDataOrderL(const TDes8& aURI,
                            TPtr8 aResultsBuffer);
 
         /**
         * GetSortOrderL
-        * Sends a request to PS server to get the sort order of fields 
+        * Sends a request to PS server to get the sort order of fields
         * supported for a data store.
         *
         * @param aURI           Data store identifier.
-        * @param aResultsBuffer Pointer to the results buffer.	 
-        */                              
+        * @param aResultsBuffer Pointer to the results buffer.
+        */
         void GetSortOrderL(const TDes8& aURI,
                            TPtr8 aResultsBuffer);
 
         /**
         * ChangeSortOrderL
-        * Sends a request to PS server to set the sort order of fields 
+        * Sends a request to PS server to set the sort order of fields
         * for a data store.
         *
-        * @param aInput         Data store + Sort Order values.	 
-        */                              
+        * @param aInput         Data store + Sort Order values.
+        */
         void ChangeSortOrderL(const TDes8& aInput);
 
+        /**
+        * GetAdaptiveGridL
+        * This is a support method for Adaptive Search functionality.
+        * As Predictive Search Engine is well suited for keeping an maintaining data
+        * structures related to contacts and updated according to contacts
+        * additions/modifications/deletions, like it is done already in Predictive Search
+        * Engine.
+        *
+        * @param aURIs         The data store URIs.
+        * @param aCompanyName  The info if Company Name is required.
+        * @param aAdaptiveGrid The returned Adaptive Grid.
+        */
+        void GetAdaptiveGridL( const TDesC8& aURIs,
+                               const TBool aCompanyName,
+                               TDes& aResultsBuffer );
+
 		/**
 		* Shuts down the predictive search server
-		*/				                   
+		*/
 		void ShutdownServerL();
-	
+
 	private:
-	
+
 	    /**
 	    * iSearchQueryBufferPtr. Pointer to the buffer holding search query.
 	    */
-		TPtrC8   iSearchQueryBufferPtr;
-		
+		TPtrC8 iSearchQueryBufferPtr;
+
 		/**
 	    * iResultsBufferPtr. Pointer to the buffer holding search results
 	    */
-		TPtr8   iResultsBufferPtr;
-			                   
+		TPtr8 iResultsBufferPtr;
+
 };
 
 #endif // R_PS_SESSION_H