|
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>& searchResults, |
|
47 RPointerArray<CPsPattern>& searchSeqs) = 0; |
|
48 |
|
49 |
|
50 /** |
|
51 * HandlePsErrorL. |
|
52 * Handle errors from the server. |
|
53 * |
|
54 * @param aErrorCode Search errors returned from the server. |
|
55 */ |
|
56 virtual void HandlePsError(TInt aErrorCode) = 0; |
|
57 /** |
|
58 * CachingStatus |
|
59 * Gets called when caching is completed. |
|
60 * Observers need to implement this function accordingly |
|
61 * to take action after cache completion |
|
62 * @param aStatus - caching status, 20 - Caching completes succesfully, 30 - Caching completed with errors |
|
63 * @param aError - Any error that occurred while caching. KErrNone if no error else the error code |
|
64 */ |
|
65 virtual void CachingStatus(TCachingStatus& aStatus, TInt& aError) = 0; |
|
66 }; |
|
67 |
|
68 #endif // __M_PS_RESULTS_OBSERVER__ |
|
69 |
|
70 // End of File |