|
1 /* |
|
2 * Copyright (c) 2008 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 the License "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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef VCXNSCONTENTSEARCHHANDLER_H |
|
22 #define VCXNSCONTENTSEARCHHANDLER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 |
|
27 #include "vcxnscontentsearchif.h" |
|
28 |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CVcxNsUiEngine; |
|
32 class MVcxNsContentSearchObserver; |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Class CVcxNsCategoryProvider handles application categorys. |
|
37 * |
|
38 * @lib vcxnsuiengine.lib |
|
39 */ |
|
40 class CVcxNsContentSearchHandler: public CBase, |
|
41 public MVcxNsContentSearchIf |
|
42 { |
|
43 |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Constructor |
|
48 * @param aUiEngine Ui engine |
|
49 */ |
|
50 static CVcxNsContentSearchHandler* NewL( CVcxNsUiEngine& aUiEngine ); |
|
51 |
|
52 virtual ~CVcxNsContentSearchHandler(); |
|
53 |
|
54 public: |
|
55 |
|
56 /** |
|
57 * Start new search. This is only for UI engines internal use. |
|
58 * When search category is opened and there's no contents, |
|
59 * we can start new search. |
|
60 */ |
|
61 void StartNewSearchL( ); |
|
62 |
|
63 public: //From MVcxNsContentSearchIf |
|
64 |
|
65 /** |
|
66 * RegisterObserver. |
|
67 * @param aObserver Observer |
|
68 */ |
|
69 void RegisterObserver( MVcxNsContentSearchObserver* aObserver ); |
|
70 |
|
71 /** |
|
72 * DeRegisterObserver. |
|
73 * @param aObserver Observer |
|
74 */ |
|
75 void DeRegisterObserver( MVcxNsContentSearchObserver* aObserver ); |
|
76 |
|
77 /** |
|
78 * Starts the search with given keyword. |
|
79 * @param aSearchString Search string |
|
80 */ |
|
81 void SearchL( const TDesC& aSearchString ); |
|
82 |
|
83 /** |
|
84 * Cancel ongoing search. |
|
85 */ |
|
86 void CancelSearchL( ); |
|
87 |
|
88 /** |
|
89 * Handle search related status messages. |
|
90 * @param aStatus Search status. |
|
91 * @param aInfo Information parameter. |
|
92 */ |
|
93 void HandleSearchMsgL( TInt aStatus, TInt aInfo ); |
|
94 |
|
95 /** |
|
96 * Handle search cancelled by user. |
|
97 */ |
|
98 void SearchCancelled(); |
|
99 |
|
100 private: |
|
101 |
|
102 /** |
|
103 * Default constructor |
|
104 * @param aUiEngine Ui engine |
|
105 */ |
|
106 CVcxNsContentSearchHandler( CVcxNsUiEngine& aUiEngine ); |
|
107 |
|
108 /** |
|
109 * Update category video count. |
|
110 */ |
|
111 void UpdateCategoryVideoCountL(); |
|
112 |
|
113 /** |
|
114 * Shows or hides the popup about thumbnail update. |
|
115 * @param aVisible Show or hide pop-up. |
|
116 */ |
|
117 void ShowInfoPopupL( TBool aVisible ); |
|
118 |
|
119 // Data |
|
120 |
|
121 /** |
|
122 * Array of search observers. Not Own. |
|
123 */ |
|
124 RPointerArray<MVcxNsContentSearchObserver> iSearchObservers; |
|
125 |
|
126 /** |
|
127 * UI engine. |
|
128 */ |
|
129 CVcxNsUiEngine& iUiEngine; |
|
130 |
|
131 /** |
|
132 * Total count of thumbnails in the search result. |
|
133 */ |
|
134 TInt iThumbnailCount; |
|
135 |
|
136 /** |
|
137 * Count of thumbnails that has already been downloaded. |
|
138 */ |
|
139 TInt iThumbnailsDownloaded; |
|
140 |
|
141 }; |
|
142 |
|
143 #endif // VCXNSCONTENTSEARCHHANDLER_H |