contacts_plat/predictivesearch_client_api/inc/RPsSession.h
branchRCL_3
changeset 39 a6539d1e8e43
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
equal deleted inserted replaced
35:4ae315f230bc 39:a6539d1e8e43
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  This is the client side interface declaration for the 
    14 * Description:  This is the client side interface declaration for the
    15 *                predictive contact search server.
    15 *                predictive contact search server.
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 #ifndef R_PS_SESSION_H
    19 #ifndef R_PS_SESSION_H
    42 
    42 
    43 		/**
    43 		/**
    44 		* RPcsSession.
    44 		* RPcsSession.
    45 		* Constructor
    45 		* Constructor
    46 		*/
    46 		*/
    47 		RPsSession();	
    47 		RPsSession();
    48 
    48 
    49 		/**
    49 		/**
    50 		* Connect.
    50 		* Connect.
    51 		* Connects to the predictive search server
    51 		* Connects to the predictive search server
    52 		*/
    52 		*/
    57 		* Returns the version number of predictive search server
    57 		* Returns the version number of predictive search server
    58 		*
    58 		*
    59 		* @return Version information
    59 		* @return Version information
    60 		*/
    60 		*/
    61 		TVersion Version() const;
    61 		TVersion Version() const;
    62 	
    62 
    63 	    /**
    63 	    /**
    64         * SetSearchSettingsL.
    64         * SetSearchSettingsL.
    65         * Send the search settings (databases/ display fields) to the server.
    65         * Send the search settings (databases/ display fields) to the server.
    66         * @param aSettings      The search settings.       
    66         * @param aSettings      The search settings.
    67         */
    67         */
    68 	    void SetSearchSettingsL(const TDes8& aSettings);
    68 	    void SetSearchSettingsL(const TDes8& aSettings);
    69 	
    69 
    70         /**
    70         /**
    71         * SearchL.
    71         * SearchL.
    72         * Initiates a predictive search request to the server.
    72         * Initiates a predictive search request to the server.
    73         * @param aSearchQuery   The search query.
    73         * @param aSearchQuery   The search query.
    74         * @param aResultsBuffer Pointer to the initial results buffer.
    74         * @param aResultsBuffer Pointer to the initial results buffer.
    75 	    * @param aStatus        Holds the completion status of request.
    75 	    * @param aStatus        Holds the completion status of request.
    76         */
    76         */
    77 	    void SearchL(const TDes8& aSearchQuery,
    77 	    void SearchL(const TDes8& aSearchQuery,
    78 	                 TPtr8 aResultsBuffer,
    78 	                 TPtr8 aResultsBuffer,
    79 					 TRequestStatus& aStatus);
    79 					 TRequestStatus& aStatus);
    80 	
    80 
    81 	    /**
    81 	    /**
    82 	    * CancelSearchL.
    82 	    * CancelSearchL.
    83 	    * Cancels a pending search request.
    83 	    * Cancels a pending search request.
    84 	    * @param aStatus        Holds the completion status of request.
    84 	    * @param aStatus        Holds the completion status of request.
    85 	    */ 				 
    85 	    */
    86 	    void CancelSearch();		
    86 	    void CancelSearch();
    87 	    
    87 
    88 	    /**
    88 	    /**
    89         * SearchL.
    89         * SearchL.
    90         * Initiates a predictive search request to the server.
    90         * Initiates a predictive search request to the server.
    91         * @param aSearchQuery   The search query.
    91         * @param aSearchQuery   The search query.
    92         * @param aSearchData    The search data.
    92         * @param aSearchData    The search data.
    93         * @param aResultsBuffer Pointer to the initial results buffer.	 
    93         * @param aResultsBuffer Pointer to the initial results buffer.
    94         */
    94         */
    95 	    void SearchL(const TDes8& aSearchQuery,
    95 	    void SearchL(const TDes8& aSearchQuery,
    96 	                 const TDes8& aSearchData,
    96 	                 const TDes8& aSearchData,
    97 	                 TPtr8 aResultsBuffer);
    97 	                 TPtr8 aResultsBuffer);
    98 
    98 
    99 	    /**
    99         /**
   100         * SearchMatchStringL.
   100         * SearchMatchStringL.
   101         * Initiates a predictive search request to the server with result as string.
   101         * Initiates a predictive search request to the server with result as string.
   102         * @param aSearchQuery   The search query.
   102         * @param aSearchQuery   The search query.
   103         * @param aSearchData    The search data.
   103         * @param aSearchData    The search data.
   104         * @param aResultsBuffer Pointer to the initial results buffer.	 
   104         * @param aResultsBuffer Pointer to the initial results buffer.
   105         */	    
   105         */
   106 	    void SearchMatchStringL(const TDes8& aSearchQuery,
   106        void SearchMatchStringL(const TDes8& aSearchQuery,
   107 	                             const TDes8& aSearchData,
   107                                const TDes8& aSearchData,
   108 	                             TDes& aResultsBuffer);
   108                                TDes& aResultsBuffer);
   109 	    
   109 
   110 	    /**
   110 	    /**
   111 	    * SendNewBufferL.
   111 	    * SendNewBufferL.
   112 	    * Send a new buffer to server if a overflow occurs.
   112 	    * Send a new buffer to server if a overflow occurs.
   113 	    *
   113 	    *
   114 	    * @param aResultsBuffer Pointer to the new results buffer.
   114 	    * @param aResultsBuffer Pointer to the new results buffer.
   115 	    * @param aStatus        Holds the completion status of request.
   115 	    * @param aStatus        Holds the completion status of request.
   116 	    */
   116 	    */
   117 	    void SendNewBufferL(TPtr8 aResultsBuffer,
   117 	    void SendNewBufferL(TPtr8 aResultsBuffer,
   118 	                        TRequestStatus& aStatus);
   118 	                        TRequestStatus& aStatus);
   119 	                           
   119 
   120         /**
   120         /**
   121         * IsLanguageSupportedL
   121         * IsLanguageSupportedL
   122         * Sends a request to PS server to decide if the language
   122         * Sends a request to PS server to decide if the language
   123         * variant is supported or not
   123         * variant is supported or not
   124         *
   124         *
   125         * @param aLanguage     The language id info.
   125         * @param aLanguage      The language id info.
   126         * @param aResultsBuffer Pointer to the initial results buffer.	 
   126         * @param aResultsBuffer Pointer to the initial results buffer.
   127         */                              
   127         */
   128         void IsLanguageSupportedL(const TDes8& aLanguage,
   128         void IsLanguageSupportedL(const TDes8& aLanguage,
   129                                       TPtr8 aResultsBuffer);	                        	 
   129                                   TPtr8 aResultsBuffer);
   130         /**
   130         /**
   131         * GetDataOrderL
   131         * GetDataOrderL
   132         * Sends a request to PS server to get the data fields supported
   132         * Sends a request to PS server to get the data fields supported
   133         * for a data store.
   133         * for a data store.
   134         *
   134         *
   135         * @param aURI           Data store identifier.
   135         * @param aURI           Data store identifier.
   136         * @param aResultsBuffer Pointer to the results buffer.	 
   136         * @param aResultsBuffer Pointer to the results buffer.
   137         */                              
   137         */
   138         void GetDataOrderL(const TDes8& aURI,
   138         void GetDataOrderL(const TDes8& aURI,
   139                            TPtr8 aResultsBuffer);
   139                            TPtr8 aResultsBuffer);
   140 
   140 
   141         /**
   141         /**
   142         * GetSortOrderL
   142         * GetSortOrderL
   143         * Sends a request to PS server to get the sort order of fields 
   143         * Sends a request to PS server to get the sort order of fields
   144         * supported for a data store.
   144         * supported for a data store.
   145         *
   145         *
   146         * @param aURI           Data store identifier.
   146         * @param aURI           Data store identifier.
   147         * @param aResultsBuffer Pointer to the results buffer.	 
   147         * @param aResultsBuffer Pointer to the results buffer.
   148         */                              
   148         */
   149         void GetSortOrderL(const TDes8& aURI,
   149         void GetSortOrderL(const TDes8& aURI,
   150                            TPtr8 aResultsBuffer);
   150                            TPtr8 aResultsBuffer);
   151 
   151 
   152         /**
   152         /**
   153         * ChangeSortOrderL
   153         * ChangeSortOrderL
   154         * Sends a request to PS server to set the sort order of fields 
   154         * Sends a request to PS server to set the sort order of fields
   155         * for a data store.
   155         * for a data store.
   156         *
   156         *
   157         * @param aInput         Data store + Sort Order values.	 
   157         * @param aInput         Data store + Sort Order values.
   158         */                              
   158         */
   159         void ChangeSortOrderL(const TDes8& aInput);
   159         void ChangeSortOrderL(const TDes8& aInput);
       
   160 
       
   161         /**
       
   162         * GetAdaptiveGridL
       
   163         * This is a support method for Adaptive Search functionality.
       
   164         * As Predictive Search Engine is well suited for keeping an maintaining data
       
   165         * structures related to contacts and updated according to contacts
       
   166         * additions/modifications/deletions, like it is done already in Predictive Search
       
   167         * Engine.
       
   168         *
       
   169         * @param aURIs         The data store URIs.
       
   170         * @param aCompanyName  The info if Company Name is required.
       
   171         * @param aAdaptiveGrid The returned Adaptive Grid.
       
   172         */
       
   173         void GetAdaptiveGridL( const TDesC8& aURIs,
       
   174                                const TBool aCompanyName,
       
   175                                TDes& aResultsBuffer );
   160 
   176 
   161 		/**
   177 		/**
   162 		* Shuts down the predictive search server
   178 		* Shuts down the predictive search server
   163 		*/				                   
   179 		*/
   164 		void ShutdownServerL();
   180 		void ShutdownServerL();
   165 	
   181 
   166 	private:
   182 	private:
   167 	
   183 
   168 	    /**
   184 	    /**
   169 	    * iSearchQueryBufferPtr. Pointer to the buffer holding search query.
   185 	    * iSearchQueryBufferPtr. Pointer to the buffer holding search query.
   170 	    */
   186 	    */
   171 		TPtrC8   iSearchQueryBufferPtr;
   187 		TPtrC8 iSearchQueryBufferPtr;
   172 		
   188 
   173 		/**
   189 		/**
   174 	    * iResultsBufferPtr. Pointer to the buffer holding search results
   190 	    * iResultsBufferPtr. Pointer to the buffer holding search results
   175 	    */
   191 	    */
   176 		TPtr8   iResultsBufferPtr;
   192 		TPtr8 iResultsBufferPtr;
   177 			                   
   193 
   178 };
   194 };
   179 
   195 
   180 #endif // R_PS_SESSION_H
   196 #endif // R_PS_SESSION_H
   181 
   197 
   182 // End of file
   198 // End of file