| class CPSRequestHandler : public CActive |
CPSRequestHandler An instance of the request handler object for the Predicitve Search application
| Public Member Functions | |
|---|---|
| ~CPSRequestHandler () | |
| IMPORT_C void | AddObserverL (MPsResultsObserver *) |
| IMPORT_C void | CancelSearch () |
| IMPORT_C void | ChangeSortOrderL (const TDesC &, RArray < TInt > &) |
| IMPORT_C MVPbkContactLink * | ConvertToVpbkLinkLC (const CPsClientData &, CVPbkContactManager &) |
| IMPORT_C void | GetAdaptiveGridCharactersL (const MDesCArray &, const TDesC &, const TBool , TDes &) |
| IMPORT_C void | GetAllContentsL () |
| IMPORT_C TInt | GetCachingStatusL ( TCachingStatus &) |
| IMPORT_C void | GetDataOrderL (const TDesC &, RArray < TInt > &) |
| IMPORT_C void | GetSortOrderL (const TDesC &, RArray < TInt > &) |
| IMPORT_C TBool | IsLanguageSupportedL (const TLanguage ) |
| IMPORT_C void | LookupL (const CPsQuery &, const TDesC &, CDesCArray &, RArray < TPsMatchLocation > &) |
| IMPORT_C void | LookupMatchL (const CPsQuery &, const TDesC &, TDes &) |
| IMPORT_C CPSRequestHandler * | NewL () |
| IMPORT_C CPSRequestHandler * | NewLC () |
| void | NotifyCachingStatus ( TCachingStatus , TInt ) |
| IMPORT_C TInt | RemoveObserver (MPsResultsObserver *) |
| IMPORT_C void | SearchL (const CPsQuery &) |
| IMPORT_C void | SearchL (const CPsQuery &, RPointerArray < CPsClientData > &, CVPbkContactManager *) |
| IMPORT_C void | SetSearchSettingsL (const CPsSettings &) |
| IMPORT_C void | ShutdownServerL () |
| IMPORT_C TVersion | Version () |
| Protected Member Functions | |
|---|---|
| void | DoCancel () |
| void | RunL () |
| Private Member Functions | |
|---|---|
| CPSRequestHandler () | |
| TInt | AddMarkedContactsL ( RPointerArray < CPsClientData > &) |
| void | ConstructL () |
| void | HandleBufferOverFlowL () |
| void | HandleErrorL ( TInt ) |
| void | HandleSearchResultsL () |
| void | RunSearchFromBufferL () |
| Inherited Enumerations | |
|---|---|
| CActive:TPriority | |
| Inherited Attributes | |
|---|---|
| CActive::iStatus | |
| CPSRequestHandler | ( | ) | [private] |
CPSRequestHandler . Performs the first phase of two phase construction.
| ~CPSRequestHandler | ( | ) | [virtual] |
~CPSRequestHandler. Destructor. Destroys the object and release all memory objects.
| TInt | AddMarkedContactsL | ( | RPointerArray < CPsClientData > & | searchResults | ) | [private] |
AddMarkedContacts Filters the bookmark results and adds them to final search result set
| RPointerArray < CPsClientData > & searchResults |
| IMPORT_C void | AddObserverL | ( | MPsResultsObserver * | aObserver | ) |
AddObserver.
| MPsResultsObserver * aObserver | The object to be used to handle updates from the server. |
| IMPORT_C void | ChangeSortOrderL | ( | const TDesC & | aDataStore, |
| RArray < TInt > & | aSortOrder | |||
| ) | ||||
ChangeSortOrderL. This function sets the sort order of data fields (mapped to VPbk identifiers) on a datastore. This is a synchronous request.
| void | ConstructL | ( | ) | [private] |
ConstructL. Performs the second phase construction of a CPSRequestHandler object.
| IMPORT_C MVPbkContactLink * | ConvertToVpbkLinkLC | ( | const CPsClientData & | aSearchResult, |
| CVPbkContactManager & | aContactManager | |||
| ) | ||||
ConvertToVpbkLinkLC. Extract the VPBK contact link associated with the search result. This is a synchronous request.
| const CPsClientData & aSearchResult | PS result for which contact link is required. |
| CVPbkContactManager & aContactManager | An instance of contact manager used for link extraction. |
| void | DoCancel | ( | ) | [protected, virtual] |
From CActive , DoCancel. Cancels any outstanding operation.
| IMPORT_C void | GetAdaptiveGridCharactersL | ( | const MDesCArray & | aDataStores, |
| const TDesC & | aSearchText, | |||
| const TBool | aCompanyName, | |||
| TDes & | aAdaptiveGrid | |||
| ) | ||||
GetAdaptiveGridCharactersL. 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.
| IMPORT_C void | GetAllContentsL | ( | ) |
GetAllContentsL. Sends a request to the predictive search server to get all cached contents. This is a asynchronous request.
| IMPORT_C TInt | GetCachingStatusL | ( | TCachingStatus & | aStatus | ) |
GetCachingStatusL Gets the status of the caching synchronously
| TCachingStatus & aStatus |
| IMPORT_C void | GetDataOrderL | ( | const TDesC & | aDataStore, |
| RArray < TInt > & | aDataOrder | |||
| ) | ||||
GetDataOrderL. This function returns the list of supported data fields (mapped to VPbk identifiers) supported by a datastore. This is a synchronous request.
| IMPORT_C void | GetSortOrderL | ( | const TDesC & | aDataStore, |
| RArray < TInt > & | aSortOrder | |||
| ) | ||||
GetSortOrderL. This function returns the sort order of data fields (mapped to VPbk identifiers) set on a datastore. This is a synchronous request.
| void | HandleBufferOverFlowL | ( | ) | [private] |
HandleBufferOverFlowL. Handles internal buffer overflow event.
| void | HandleErrorL | ( | TInt | aErrorCode | ) | [private] |
HandleErrorL. Handles error events.
| TInt aErrorCode |
| void | HandleSearchResultsL | ( | ) | [private] |
ParseResultsL. Parses the results buffer and converts them to data elements.
| IMPORT_C TBool | IsLanguageSupportedL | ( | const TLanguage | aLanguage | ) |
IsLanguageSupportedL. Checks if the language variant is supported by the predictive search engine. This is a synchronous request.
| const TLanguage aLanguage | The language which has to be checked |
| IMPORT_C void | LookupL | ( | const CPsQuery & | aSearchQuery, |
| const TDesC & | aSearchData, | |||
| CDesCArray & | aMatchSet, | |||
| RArray < TPsMatchLocation > & | aMatchLocation | |||
| ) | ||||
LookupL. Sends a request to the predictive search server. Does a predictive search in aSearchData for aSearchQuery and return the matches. This is a synchronous request.
| const CPsQuery & aSearchQuery | The input search query.(Length of aSearchQuery <= KPsQueryMaxLen) |
| const TDesC & aSearchData | The input data to be searched. |
| CDesCArray & aMatchSet | The list of matches. |
| RArray < TPsMatchLocation > & aMatchLocation | The list matched index and length of match |
| 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.
| IMPORT_C CPSRequestHandler * | NewL | ( | ) | [static] |
NewL. Two-phased constructor. Creates a CPSRequestHandler object using two phase construction, and return a pointer to the created object.
| IMPORT_C CPSRequestHandler * | NewLC | ( | ) | [static] |
NewLC. Two-phased constructor. Creates a CPSRequestHandler object using two phase construction, and return a pointer to the created object.
| void | NotifyCachingStatus | ( | TCachingStatus | aStatus, |
| TInt | aError | |||
| ) | ||||
Notify observers about the cahcing status
| TCachingStatus aStatus | |
| TInt aError |
| IMPORT_C TInt | RemoveObserver | ( | MPsResultsObserver * | aObserver | ) |
RemoveObserverL.
| MPsResultsObserver * aObserver | The object used to handle updates from the server. |
| void | RunL | ( | ) | [protected, virtual] |
From CActive , RunL. Callback function. Invoked to handle responses from the server.
| void | RunSearchFromBufferL | ( | ) | [private] |
RunSearchFromBufferL Runs search if search query buffer ( iPendingSearchQueryBuffer ) is not empty
| IMPORT_C void | SearchL | ( | const CPsQuery & | aSearchQuery | ) |
SearchL. Sends a request to the predictive search server. This is a asynchronous request.
| const CPsQuery & aSearchQuery | The input search query.(Length of aSearchQuery <= KPsQueryMaxLen) |
| IMPORT_C void | SearchL | ( | const CPsQuery & | aSearchQuery, |
| RPointerArray < CPsClientData > & | aMarkedContacts, | |||
| CVPbkContactManager * | aContactManager | |||
| ) | ||||
SearchL. Sends a request to the predictive search server. This is a asynchronous request. It considers bookmarked contacts while sending the results back to the client
| const CPsQuery & aSearchQuery | The input search query.(Length of aSearchQuery <= KPsQueryMaxLen) |
| RPointerArray < CPsClientData > & aMarkedContacts | Array of marked contacts |
| CVPbkContactManager * aContactManager | Contact manager instance |
| IMPORT_C void | SetSearchSettingsL | ( | const CPsSettings & | aSettings | ) |
SetSearchSettingsL. Set the databases and fields to be included in search. Databases ids are mapped to virtual phone book URLs. Fields to be searched are mapped to virutal phonebook identifiers.
| const CPsSettings & aSettings | Holds the search settings. |
| IMPORT_C void | ShutdownServerL | ( | ) |
ShutdownServerL Shuts down the predictive search engine.
CAUTION: Shutdown of predictive search server shouldn't be done for each session. It should be done only when the search engine needs to be completely shutdown.
| IMPORT_C TVersion | Version | ( | ) | const |
Version. Returns the predictive search server version.
| CVPbkContactManager * | iBookMarkContactManager | [private] |
Not Owned iBookMarkContactManager, contact manager reference received from the client To be used only for handling marked contacts.
| CPsUpdateHandler * | iContactAddedHandler | [private] |
iContactAddedHandler, handler for reacting to contact being added to cache
| CPsUpdateHandler * | iContactModifiedHandler | [private] |
iContactModifiedHandler, handler for reacting to contact being modified in cache
| CPsUpdateHandler * | iContactRemovedHandler | [private] |
iContactRemovedHandler, handler for reacting to contact being removed from cache
| CVPbkContactIdConverter * | iConverter | [private] |
iConverter, instance of contact id converter
| RPointerArray < CPsClientData > | iMarkedContacts | [private] |
iMarkedContacts, stores the bookmarked contacts if any, sent by the client
| RPointerArray < MPsResultsObserver > | iObservers | [private] |
iObservers, observers which handles updates from the server.
| HBufC8 * | iPendingSearchQueryBuffer | [private] |
iPendingSearchQueryBuffer, the buffer that holds the pending search query.
| CPsPropertyHandler * | iPropertyHandler | [private] |
iPropertyHandler, the handler to property which is asynchronously monitored
| HBufC8 * | iSearchDataBuffer | [private] |
iSearchDataBuffer, the buffer that holds the search data.
| HBufC8 * | iSearchQueryBuffer | [private] |
iSearchQueryBuffer, the buffer that holds the search query.
| TBool | iSearchRequestCancelled | [private] |
ETrue, if search request was cancelled
| HBufC8 * | iSearchResultsBuffer | [private] |
iSearchResultsBuffer, the buffer that holds the search results.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.