CPSRequestHandler Class Reference
class CPSRequestHandler : public CActive |
CPSRequestHandler An instance of the request handler object for the Predicitve Search application
PsServerClientAPI.lib
- Since
- S60 v3.2
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() |
Constructor & Destructor Documentation
CPSRequestHandler()
CPSRequestHandler | ( | ) | [private] |
~CPSRequestHandler()
~CPSRequestHandler | ( | ) | [virtual] |
~CPSRequestHandler. Destructor. Destroys the object and release all memory objects.
Member Functions Documentation
AddMarkedContactsL(RPointerArray< CPsClientData > &)
AddMarkedContacts Filters the bookmark results and adds them to final search result set
AddObserverL(MPsResultsObserver *)
IMPORT_C void | AddObserverL | ( | MPsResultsObserver * | aObserver | ) | |
Parameters
MPsResultsObserver * aObserver | The object to be used to handle updates from the server. |
CancelSearch()
IMPORT_C void | CancelSearch | ( | ) | |
CancelSearch. Cancels ongoing search.
ChangeSortOrderL(const TDesC &, RArray< TInt > &)
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.
Parameters
const TDesC & aDataStore | The data store URI. |
RArray< TInt > & aSortOrder | This array has the field identifiers to be set for this store. |
ConstructL()
void | ConstructL | ( | ) | [private] |
ConvertToVpbkLinkLC(const CPsClientData &, CVPbkContactManager &)
ConvertToVpbkLinkLC. Extract the VPBK contact link associated with the search result. This is a synchronous request.
Parameters
const CPsClientData & aSearchResult | PS result for which contact link is required. |
CVPbkContactManager & aContactManager | An instance of contact manager used for link extraction. |
DoCancel()
void | DoCancel | ( | ) | [protected, virtual] |
From CActive, DoCancel. Cancels any outstanding operation.
GetAdaptiveGridCharactersL(const MDesCArray &, const TDesC &, const TBool, TDes &)
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.
Parameters
const MDesCArray & aDataStores | The data store URIs. |
const TDesC & aSearchText | The text in the find box. |
const TBool aCompanyName | The info if Company Name is required. |
TDes & aAdaptiveGrid | The returned Adaptive Grid. |
GetAllContentsL()
IMPORT_C void | GetAllContentsL | ( | ) | |
GetAllContentsL. Sends a request to the predictive search server to get all cached contents. This is a asynchronous request.
GetCachingStatusL(TCachingStatus &)
GetCachingStatusL Gets the status of the caching synchronously
GetDataOrderL(const TDesC &, RArray< TInt > &)
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.
Parameters
const TDesC & aDataStore | The data store URI. |
RArray< TInt > & aDataOrder | This array has the field identifiers returned from the server. |
GetSortOrderL(const TDesC &, RArray< TInt > &)
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.
Parameters
const TDesC & aDataStore | The data store URI. |
RArray< TInt > & aSortOrder | This array has the field identifiers returned from the server. |
HandleBufferOverFlowL()
void | HandleBufferOverFlowL | ( | ) | [private] |
HandleBufferOverFlowL. Handles internal buffer overflow event.
HandleErrorL(TInt)
void | HandleErrorL | ( | TInt | aErrorCode | ) | [private] |
HandleErrorL. Handles error events.
HandleSearchResultsL()
void | HandleSearchResultsL | ( | ) | [private] |
ParseResultsL. Parses the results buffer and converts them to data elements.
IsLanguageSupportedL(const TLanguage)
IsLanguageSupportedL. Checks if the language variant is supported by the predictive search engine. This is a synchronous request.
Parameters
const TLanguage aLanguage | The language which has to be checked |
LookupL(const CPsQuery &, const TDesC &, CDesCArray &, RArray< TPsMatchLocation > &)
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.
Parameters
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 |
LookupMatchL(const CPsQuery &, const TDesC &, TDes &)
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.
Parameters
const CPsQuery & aSearchQuery | The input search query.(Length of aSearchQuery <= KPsQueryMaxLen) |
const TDesC & aSearchData | The input data to be searched. |
TDes & aMatch | The matched result |
NewL()
NewL. Two-phased constructor. Creates a CPSRequestHandler object using two phase construction, and return a pointer to the created object.
NewLC()
NewLC. Two-phased constructor. Creates a CPSRequestHandler object using two phase construction, and return a pointer to the created object.
NotifyCachingStatus(TCachingStatus, TInt)
Notify observers about the cahcing status
RemoveObserver(MPsResultsObserver *)
IMPORT_C TInt | RemoveObserver | ( | MPsResultsObserver * | aObserver | ) | |
Parameters
MPsResultsObserver * aObserver | The object used to handle updates from the server. |
RunL()
void | RunL | ( | ) | [protected, virtual] |
From CActive, RunL. Callback function. Invoked to handle responses from the server.
RunSearchFromBufferL()
void | RunSearchFromBufferL | ( | ) | [private] |
RunSearchFromBufferL Runs search if search query buffer ( iPendingSearchQueryBuffer ) is not empty
SearchL(const CPsQuery &)
IMPORT_C void | SearchL | ( | const CPsQuery & | aSearchQuery | ) | |
SearchL. Sends a request to the predictive search server. This is a asynchronous request.
Parameters
const CPsQuery & aSearchQuery | The input search query.(Length of aSearchQuery <= KPsQueryMaxLen) |
SearchL(const CPsQuery &, RPointerArray< CPsClientData > &, CVPbkContactManager *)
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
SetSearchSettingsL(const CPsSettings &)
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.
Parameters
const CPsSettings & aSettings | Holds the search settings. |
ShutdownServerL()
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.
Version()
Version. Returns the predictive search server version.
Member Data Documentation
CVPbkContactManager * iBookMarkContactManager
Not Owned iBookMarkContactManager, contact manager reference received from the client To be used only for handling marked contacts.
CPsUpdateHandler * iContactAddedHandler
iContactAddedHandler, handler for reacting to contact being added to cache
CPsUpdateHandler * iContactModifiedHandler
iContactModifiedHandler, handler for reacting to contact being modified in cache
CPsUpdateHandler * iContactRemovedHandler
iContactRemovedHandler, handler for reacting to contact being removed from cache
CVPbkContactIdConverter * iConverter
iConverter, instance of contact id converter
RPointerArray< CPsClientData > iMarkedContacts
iMarkedContacts, stores the bookmarked contacts if any, sent by the client
RPointerArray< MPsResultsObserver > iObservers
iObservers, observers which handles updates from the server.
HBufC8 * iPendingSearchQueryBuffer
HBufC8 * | iPendingSearchQueryBuffer | [private] |
iPendingSearchQueryBuffer, the buffer that holds the pending search query.
CPsPropertyHandler * iPropertyHandler
iPropertyHandler, the handler to property which is asynchronously monitored
HBufC8 * iSearchDataBuffer
HBufC8 * | iSearchDataBuffer | [private] |
iSearchDataBuffer, the buffer that holds the search data.
HBufC8 * iSearchQueryBuffer
HBufC8 * | iSearchQueryBuffer | [private] |
iSearchQueryBuffer, the buffer that holds the search query.
TBool
iSearchRequestCancelled
TBool
| iSearchRequestCancelled | [private] |
ETrue, if search request was cancelled
HBufC8 * iSearchResultsBuffer
HBufC8 * | iSearchResultsBuffer | [private] |
iSearchResultsBuffer, the buffer that holds the search results.
RPsSession
iSession
iSession, the predictive search server session.
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.