20
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: The observer interface which handles the predictive search
|
|
15 |
* results from the server.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef __M_PS_RESULTS_OBSERVER__
|
|
21 |
#define __M_PS_RESULTS_OBSERVER__
|
|
22 |
|
|
23 |
#include <CPcsDefs.h>
|
|
24 |
#include <CPsPattern.h>
|
|
25 |
|
|
26 |
// FORWARD DECLARATION
|
|
27 |
class CPsClientData;
|
|
28 |
|
|
29 |
// CLASS DECLARATION
|
|
30 |
/**
|
|
31 |
* MPsResultsObserver
|
|
32 |
* Mixin class.
|
|
33 |
* Observer which handles updates from the predictive search server.
|
|
34 |
*/
|
|
35 |
class MPsResultsObserver
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
|
|
39 |
/**
|
|
40 |
* HandlePsResultsUpdateL.
|
|
41 |
* Handle updates from the server.
|
|
42 |
*
|
|
43 |
* @param searchResults Search results returned from the server.
|
|
44 |
* @param searchSeqs List of matching character sequences.
|
|
45 |
*/
|
|
46 |
virtual void HandlePsResultsUpdate(RPointerArray<CPsClientData>& aSearchResults,
|
|
47 |
RPointerArray<CPsPattern>& aSearchSeqs) = 0;
|
|
48 |
|
|
49 |
/**
|
|
50 |
* HandlePsErrorL.
|
|
51 |
* Handle errors from the server.
|
|
52 |
*
|
|
53 |
* @param aErrorCode Search errors returned from the server.
|
|
54 |
*/
|
|
55 |
virtual void HandlePsError(TInt aErrorCode) = 0;
|
|
56 |
|
|
57 |
/**
|
|
58 |
* CachingStatus.
|
|
59 |
* Gets called when caching is completed, or cache has been modified after
|
|
60 |
* the initial caching. For update events, it's not guaranteed that function
|
|
61 |
* gets called separately for each modification in case there are several same kind of
|
|
62 |
* modifications happening in rapid sequence.
|
|
63 |
* Observers need to implement this function accordingly
|
|
64 |
* to take action after cache completion or update.
|
|
65 |
* @param aStatus - caching status
|
|
66 |
* @param aError - Any error that occurred while caching.
|
|
67 |
* KErrNone if no error, else the error code
|
|
68 |
*/
|
|
69 |
virtual void CachingStatus(TCachingStatus& aStatus, TInt& aError) = 0;
|
|
70 |
};
|
|
71 |
|
|
72 |
#endif // __M_PS_RESULTS_OBSERVER__
|
|
73 |
|
|
74 |
// End of File
|