53
|
1 |
/*
|
|
2 |
* Copyright (c) 2006 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: MPX common container definition for hg lib.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CMPXCOMMONCONTAINERHGIMP_H
|
|
21 |
#define CMPXCOMMONCONTAINERHGIMP_H
|
|
22 |
|
|
23 |
|
|
24 |
// INCLUDES
|
|
25 |
#include <e32hashtab.h>
|
|
26 |
#include <ganes/HgScrollBufferObserverIface.h>
|
|
27 |
#include <ganes/HgSelectionObserverIface.h>
|
|
28 |
#include <ganes/HgItem.h>
|
|
29 |
#include <thumbnailmanager.h>
|
|
30 |
#include <thumbnailmanagerobserver.h>
|
|
31 |
|
|
32 |
#include <mpxattribute.h>
|
|
33 |
#include "mpxcommoncontainer.h"
|
|
34 |
|
|
35 |
|
|
36 |
// FORWARD DECLARATIONS
|
|
37 |
class MEikCommandObserver;
|
|
38 |
class CEikMenuPane;
|
|
39 |
class MEikListBoxObserver;
|
|
40 |
class CAknIconArray;
|
|
41 |
class CMPXCommonListBoxArrayBase;
|
|
42 |
class CMPXMediaArray;
|
|
43 |
class CAknSearchField;
|
|
44 |
class MCoeControlObserver;
|
|
45 |
class CMPXCommonContainerMediaHelper;
|
|
46 |
class CMPXCommonContainerTextureManager2;
|
|
47 |
class CMPXCommonUiHelper;
|
|
48 |
class CHgScroller;
|
|
49 |
class CHgScrollerWithTitle;
|
|
50 |
class CAknsBasicBackgroundControlContext;
|
|
51 |
|
|
52 |
//Albumart request queue
|
|
53 |
struct TAlbumArtRequest
|
|
54 |
{
|
|
55 |
TInt iIndex;
|
|
56 |
HBufC* iAlbumArtUri;
|
|
57 |
TSglQueLink iLink;
|
|
58 |
};
|
|
59 |
|
|
60 |
|
|
61 |
// CLASS DECLARATION
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Container class for Hg common container.
|
|
65 |
* The view class should implement the following virtual function
|
|
66 |
* from MEikCommandObserver
|
|
67 |
*
|
|
68 |
* virtual void ProcessCommandL(TInt aCommandId);
|
|
69 |
*
|
|
70 |
* common container uses this to pass commands back to the view class
|
|
71 |
* the commands supported are defined in mpxcommoncontainer.hrh
|
|
72 |
*
|
|
73 |
* view container class owns this class to access List widget commands, receive
|
|
74 |
* CoeControl events and GetHelpContext(). The view container class should
|
|
75 |
* implement the following virtual functions from MViewContainer
|
|
76 |
*
|
|
77 |
* virtual void HandleKeyEvent();
|
|
78 |
* virtual void HandleHelpContent();
|
|
79 |
*
|
|
80 |
* common container uses this to pass CoeControl events back to the view
|
|
81 |
* container class.
|
|
82 |
*
|
|
83 |
* view class should handle the following commands in ProcessCommandL
|
|
84 |
* from MEikCommandObserver:
|
|
85 |
*
|
|
86 |
* EMPXCmdCommonDelete // delete key pressed
|
|
87 |
* EMPXCmdCommonResourceChange // resource change
|
|
88 |
* EMPXCmdCommonEnterKey // enter key pressed
|
|
89 |
*
|
|
90 |
* @lib mpxcommoncontainer.lib
|
|
91 |
* @since S60 v3.1
|
|
92 |
*/
|
|
93 |
NONSHARABLE_CLASS( CMPXCommonContainerHgImp )
|
|
94 |
: public CCoeControl
|
|
95 |
, public MCoeControlObserver
|
|
96 |
, public MMPXCommonContainer
|
|
97 |
, public MHgScrollBufferObserver
|
|
98 |
, public MHgSelectionObserver
|
|
99 |
, public MThumbnailManagerObserver
|
|
100 |
{
|
|
101 |
public:
|
|
102 |
|
|
103 |
/**
|
|
104 |
* default C++ constructor.
|
|
105 |
*/
|
|
106 |
CMPXCommonContainerHgImp();
|
|
107 |
|
|
108 |
/**
|
|
109 |
* Destructor.
|
|
110 |
*/
|
|
111 |
virtual ~CMPXCommonContainerHgImp();
|
|
112 |
|
|
113 |
|
|
114 |
// from base class MMPXCommonContainer
|
|
115 |
|
|
116 |
/**
|
|
117 |
* Return Coe Control
|
|
118 |
*
|
|
119 |
* @since 3.2
|
|
120 |
*/
|
|
121 |
CCoeControl* CoeControl();
|
|
122 |
|
|
123 |
/**
|
|
124 |
* Set View Container
|
|
125 |
*
|
|
126 |
* @since 3.2
|
|
127 |
*/
|
|
128 |
void SetViewContainer( MMPXViewContainer* aViewContainer );
|
|
129 |
|
|
130 |
/**
|
|
131 |
* Set command observer for container
|
|
132 |
*
|
|
133 |
* @since 3.2
|
|
134 |
*/
|
|
135 |
void SetCommandObserver( MEikCommandObserver* aCommandObserver );
|
|
136 |
|
|
137 |
/**
|
|
138 |
* Set list box observer for container
|
|
139 |
*
|
|
140 |
* @since 3.2
|
|
141 |
*/
|
|
142 |
void SetListBoxObserver( MEikListBoxObserver* aObserver );
|
|
143 |
|
|
144 |
/**
|
|
145 |
* Set layout for all elements and set sizes for icons.
|
|
146 |
*
|
|
147 |
* @since 3.1
|
|
148 |
*/
|
|
149 |
void UpdateLayout();
|
|
150 |
|
|
151 |
/**
|
|
152 |
* Returns list box array, ownership not transfered
|
|
153 |
*
|
|
154 |
* @since 3.1
|
|
155 |
* @return A pointer to the list box array
|
|
156 |
*/
|
|
157 |
CMPXCommonListBoxArrayBase* ListBoxArray() const;
|
|
158 |
|
|
159 |
/**
|
|
160 |
* Sets up the listbox array, ownership not transferred
|
|
161 |
*/
|
|
162 |
void SetListBoxArrayL( CMPXCommonListBoxArrayBase* aListBoxArray );
|
|
163 |
|
|
164 |
/**
|
|
165 |
* Return number of listbox items shown in the current listbox.
|
|
166 |
*
|
|
167 |
* @since 3.1
|
|
168 |
* @return The number of items shown in the list box
|
|
169 |
*/
|
|
170 |
TInt CurrentListItemCount() const;
|
|
171 |
|
|
172 |
/**
|
|
173 |
* Return total number of listbox items in the listbox.
|
|
174 |
*
|
|
175 |
* @since 3.1
|
|
176 |
* @return Total items in the list box
|
|
177 |
*/
|
|
178 |
TInt TotalListItemCount() const;
|
|
179 |
|
|
180 |
/**
|
|
181 |
* Gets top listbox item index (relative to the original listbox).
|
|
182 |
* @return Top listbox item index
|
|
183 |
*
|
|
184 |
* @since 3.1
|
|
185 |
*/
|
|
186 |
TInt TopLbxItemIndex() const;
|
|
187 |
|
|
188 |
/**
|
|
189 |
* Gets bottom listbox item index (relative to the original listbox).
|
|
190 |
* @return Bottom listbox item index
|
|
191 |
*
|
|
192 |
* @since 3.1
|
|
193 |
*/
|
|
194 |
TInt BottomLbxItemIndex() const;
|
|
195 |
|
|
196 |
/**
|
|
197 |
* Gets current listbox item index (relative to the original listbox).
|
|
198 |
* @return Current listbox item index
|
|
199 |
*
|
|
200 |
* @since 3.1
|
|
201 |
*/
|
|
202 |
TInt CurrentLbxItemIndex() const;
|
|
203 |
|
|
204 |
/**
|
|
205 |
* Get current selected listbox items indices (relative to the original
|
|
206 |
* listbox). Ownership not transferred.
|
|
207 |
*
|
|
208 |
* @since 3.1
|
|
209 |
* @return Current listbox item indices
|
|
210 |
*/
|
|
211 |
const CArrayFix<TInt>* CurrentSelectionIndicesL() const;
|
|
212 |
|
|
213 |
/**
|
|
214 |
* Sewt current selected listbox items indices
|
|
215 |
*
|
|
216 |
* @since 3.1
|
|
217 |
* @param aIndices Array of selection indices, ownership not transfered
|
|
218 |
*/
|
|
219 |
void SetCurrentSelectionIndicesL( CArrayFix<TInt>* aIndices ) const;
|
|
220 |
|
|
221 |
/**
|
|
222 |
* Set top listbox item index.
|
|
223 |
*
|
|
224 |
* @since 3.1
|
|
225 |
* @param aIndex Actual listbox index.
|
|
226 |
*/
|
|
227 |
void SetLbxTopItemIndex( TInt aIndex );
|
|
228 |
|
|
229 |
/**
|
|
230 |
* Set current listbox item index.
|
|
231 |
*
|
|
232 |
* @since 3.1
|
|
233 |
* @param aIndex Actual listbox index.
|
|
234 |
*/
|
|
235 |
void SetLbxCurrentItemIndex( TInt aIndex );
|
|
236 |
|
|
237 |
/**
|
|
238 |
* Set current listbox item index and highlight it.
|
|
239 |
*
|
|
240 |
* @since 3.1
|
|
241 |
* @param aIndex Actual listbox index.
|
|
242 |
*/
|
|
243 |
void SetLbxCurrentItemIndexAndDraw( TInt aIndex );
|
|
244 |
|
|
245 |
/**
|
|
246 |
* Clear listbox selection.
|
|
247 |
*
|
|
248 |
* @since 3.1
|
|
249 |
*/
|
|
250 |
void ClearLbxSelection();
|
|
251 |
|
|
252 |
/**
|
|
253 |
* Sets list box backround text. This text is visible if the list box
|
|
254 |
* has no items.
|
|
255 |
*
|
|
256 |
* @param aText The text for the empty list box background.
|
|
257 |
* @since 3.2
|
|
258 |
*/
|
|
259 |
void SetLbxEmptyTextL( const TDesC& aText );
|
|
260 |
|
|
261 |
/**
|
|
262 |
* Draws list box item index
|
|
263 |
*
|
|
264 |
* @since 3.2
|
|
265 |
*/
|
|
266 |
void DrawLbxItemL( TInt aIndex );
|
|
267 |
|
|
268 |
/**
|
|
269 |
* Set Find box's focus.
|
|
270 |
*
|
|
271 |
* @since 3.1
|
|
272 |
* @param aFocus ETrue if set focus on FindBox. Otherwise, EFalse.
|
|
273 |
*/
|
|
274 |
void SetFindBoxFocus( TBool aFocus );
|
|
275 |
|
|
276 |
/**
|
|
277 |
* Handle listbox item addition.
|
|
278 |
*
|
|
279 |
* @since 3.1
|
|
280 |
*/
|
|
281 |
void HandleLbxItemAdditionL();
|
|
282 |
|
|
283 |
/**
|
|
284 |
* Handle listbox item addition, preserving the current display index.
|
|
285 |
*
|
|
286 |
* @since 3.1
|
|
287 |
*/
|
|
288 |
void HandleLbxItemAdditionPreserveIndexL();
|
|
289 |
|
|
290 |
/**
|
|
291 |
* Handle listbox item removal.
|
|
292 |
*
|
|
293 |
* @since 3.1
|
|
294 |
*/
|
|
295 |
void HandleLbxItemRemovalL();
|
|
296 |
|
|
297 |
/**
|
|
298 |
* Show/hide find box
|
|
299 |
*
|
|
300 |
* @since 3.1
|
|
301 |
* @param aIsVisible ETrue to set findbox visible. Otherwise, EFalse
|
|
302 |
*/
|
|
303 |
void SetFindBoxVisibilityL( TBool aIsVisible );
|
|
304 |
|
|
305 |
/**
|
|
306 |
* Determine find box visibility
|
|
307 |
*
|
|
308 |
* @since 3.1
|
|
309 |
* @return ETrue if find box is currently visible, EFalse otherwise
|
|
310 |
*/
|
|
311 |
TBool FindBoxVisibility();
|
|
312 |
|
|
313 |
/**
|
|
314 |
* Restore the PopupCBA of find box
|
|
315 |
*/
|
|
316 |
void RestoreFindBoxPopupCBA();
|
|
317 |
|
|
318 |
/**
|
|
319 |
* Calculate the top index of the visible items
|
|
320 |
*
|
|
321 |
* @since 3.1
|
|
322 |
* @param aBottomIndex the bottom index of the visible items
|
|
323 |
* @return top index
|
|
324 |
*/
|
|
325 |
TInt CalculateTopIndex( TInt aBottomIndex );
|
|
326 |
|
|
327 |
/**
|
|
328 |
* Creates the container
|
|
329 |
*
|
|
330 |
* @since 3.1
|
|
331 |
* @param aRect the rectangle that defines the control's extent.
|
|
332 |
*/
|
|
333 |
void ConstructContainerL( TMPXCommonContainerCollectionType /*aCollectionTyp*/ );
|
|
334 |
|
|
335 |
/**
|
|
336 |
* Enable/disable find box
|
|
337 |
*
|
|
338 |
* @since 3.1
|
|
339 |
* @aEnable ETrue to enable find box, EFalse to disable
|
|
340 |
*/
|
|
341 |
void EnableFindBox( TBool aEnable );
|
|
342 |
|
|
343 |
/**
|
|
344 |
* Enable/disable marking
|
|
345 |
*
|
|
346 |
* @since 3.1
|
|
347 |
* @aEnable ETrue to enable marking, EFalse to disable
|
|
348 |
*/
|
|
349 |
void EnableMarking( TBool aEnable );
|
|
350 |
|
|
351 |
/**
|
|
352 |
* Custom handling of commands for markable lists.
|
|
353 |
*/
|
|
354 |
void HandleMarkableListProcessCommandL( TInt aCommand );
|
|
355 |
|
|
356 |
/**
|
|
357 |
* Custom handling of menu pane for markable lists
|
|
358 |
*/
|
|
359 |
void HandleMarkableListDynInitMenuPaneL(
|
|
360 |
TInt aResourceId,
|
|
361 |
CEikMenuPane* aMenuPane );
|
|
362 |
|
|
363 |
/**
|
|
364 |
* Handle listbox array events
|
|
365 |
*
|
|
366 |
* @param aEvent list box event
|
|
367 |
*/
|
|
368 |
void HandleListBoxArrayEventL(
|
|
369 |
MMPXCommonListBoxArrayObserver::TMPXCommonListBoxArrayEvents aEvent );
|
|
370 |
|
|
371 |
/**
|
|
372 |
* Handles key events.
|
|
373 |
*
|
|
374 |
* @param aKeyEvent The key event.
|
|
375 |
* @param aType The type of key event.
|
|
376 |
*/
|
|
377 |
TKeyResponse HandleKeyEventL(
|
|
378 |
const TKeyEvent& aKeyEvent,
|
|
379 |
TEventCode aType );
|
|
380 |
|
|
381 |
/**
|
|
382 |
* Activate the container
|
|
383 |
*/
|
|
384 |
void ActivateContainerL();
|
|
385 |
|
|
386 |
// from base class CCoeControl
|
|
387 |
|
|
388 |
/**
|
|
389 |
* From CCoeControl.
|
|
390 |
* Handles key events.
|
|
391 |
*
|
|
392 |
* @param aKeyEvent The key event.
|
|
393 |
* @param aType The type of key event.
|
|
394 |
*/
|
|
395 |
TKeyResponse OfferKeyEventL(
|
|
396 |
const TKeyEvent& aKeyEvent,
|
|
397 |
TEventCode aType );
|
|
398 |
|
|
399 |
/**
|
|
400 |
* From CCoeControl.
|
|
401 |
* Gets the control's help context.
|
|
402 |
*
|
|
403 |
* @param aContext The control's help context.
|
|
404 |
*/
|
|
405 |
void GetHelpContext( TCoeHelpContext& aContext ) const;
|
|
406 |
|
|
407 |
/**
|
|
408 |
* From CoeControl.
|
|
409 |
* Handles a change to the control's resources.
|
|
410 |
*
|
|
411 |
* @param aType A message UID value.
|
|
412 |
*/
|
|
413 |
void HandleResourceChange( TInt aType );
|
|
414 |
|
|
415 |
/**
|
|
416 |
* From CoeControl.
|
|
417 |
* Draw this application's view to the screen
|
|
418 |
*
|
|
419 |
* @param aRect the rectangle of this view that needs updating
|
|
420 |
*/
|
|
421 |
void Draw( const TRect& aRect ) const;
|
|
422 |
|
|
423 |
/**
|
|
424 |
* From CoeControl.
|
|
425 |
* Get the control input capabilities
|
|
426 |
*/
|
|
427 |
TCoeInputCapabilities InputCapabilities() const;
|
|
428 |
|
|
429 |
// from base class MCoeControlObserver
|
|
430 |
|
|
431 |
/**
|
|
432 |
* From MCoeControlObserver, Acts upon changes in the hosted control's state.
|
|
433 |
* This class's implementation is trivial and should be able to be safely
|
|
434 |
* re-implemented in directly client-derived classes. For non-base setting
|
|
435 |
* page classes, a call to the base class should be made.
|
|
436 |
* @param aControl Control that caused the event. (not used in default implementation)
|
|
437 |
* @param aEventType Type of the event.
|
|
438 |
*/
|
|
439 |
void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
|
|
440 |
|
|
441 |
|
|
442 |
// from base class MHgScrollBufferObserver
|
|
443 |
|
|
444 |
/**
|
|
445 |
* from MHgScrollBufferObserver
|
|
446 |
* Buffer position changed.
|
|
447 |
* The items between the aBufferStart and aBufferEnd should be loaded as soon as possible.
|
|
448 |
*
|
|
449 |
* @param aBufferStart The index of the first item in buffer.
|
|
450 |
* @param aBufferEnd The index of the last item in buffer.
|
|
451 |
* @param aDirection report direction of scrolling
|
|
452 |
*/
|
|
453 |
void Request(TInt aBufferStart, TInt aBufferEnd, THgScrollDirection aDirection);
|
|
454 |
|
|
455 |
// from base class MHgBufferOwner
|
|
456 |
|
|
457 |
/**
|
|
458 |
* from MHgBufferOwner
|
|
459 |
*
|
|
460 |
*
|
|
461 |
*/
|
|
462 |
void Release(TInt aReleaseStart, TInt aReleaseEnd);
|
|
463 |
|
|
464 |
|
|
465 |
// from base class MHgSelectionObserver
|
|
466 |
|
|
467 |
/**
|
|
468 |
* Handle selection.
|
|
469 |
*
|
|
470 |
* @param aIndex Selected item index.
|
|
471 |
*/
|
|
472 |
void HandleSelectL( TInt aIndex );
|
|
473 |
|
|
474 |
/**
|
|
475 |
* Handle opening.
|
|
476 |
*
|
|
477 |
* @param aIndex Opened item index.
|
|
478 |
*/
|
|
479 |
void HandleOpenL( TInt aIndex );
|
|
480 |
|
|
481 |
/**
|
|
482 |
* Hides container list view
|
|
483 |
*/
|
|
484 |
void HideListView();
|
|
485 |
|
|
486 |
public: // from base class MThumbnailManagerObserver
|
|
487 |
|
|
488 |
/**
|
|
489 |
* From MThumbnailManagerObserver
|
|
490 |
* Preview thumbnail generation or loading is complete.
|
|
491 |
*
|
|
492 |
* @param aThumbnail An object representing the resulting thumbnail.
|
|
493 |
* @param aId Request ID for the operation
|
|
494 |
*/
|
|
495 |
void ThumbnailPreviewReady( MThumbnailData& aThumbnail, TThumbnailRequestId aId );
|
|
496 |
|
|
497 |
/**
|
|
498 |
* From MThumbnailManagerObserver
|
|
499 |
* Final thumbnail bitmap generation or loading is complete.
|
|
500 |
*
|
|
501 |
* @param aError Error code.
|
|
502 |
* @param aThumbnail An object representing the resulting thumbnail.
|
|
503 |
* @param aId Request ID for the operation.
|
|
504 |
*/
|
|
505 |
void ThumbnailReady( TInt aError, MThumbnailData& aThumbnail, TThumbnailRequestId aId );
|
|
506 |
|
|
507 |
TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
|
|
508 |
|
|
509 |
|
|
510 |
private:
|
|
511 |
|
|
512 |
/**
|
|
513 |
* Create list box
|
|
514 |
*/
|
|
515 |
void CreateListBoxL( TInt count );
|
|
516 |
|
|
517 |
/**
|
|
518 |
* Create list box with Title
|
|
519 |
*/
|
|
520 |
void CreateListBoxWithTitleL( TInt count );
|
|
521 |
|
|
522 |
|
|
523 |
/**
|
|
524 |
* Creates icon array, populates iIconArray to be used by listbox
|
|
525 |
*/
|
|
526 |
void CreateIconArrayL();
|
|
527 |
|
|
528 |
/**
|
|
529 |
* Sets default icon for HgList
|
|
530 |
*/
|
|
531 |
void SetDefaultIconL();
|
|
532 |
|
|
533 |
/**
|
|
534 |
* Sets default icon for list item
|
|
535 |
*/
|
|
536 |
void SetDefaultIconL(TInt aIndex);
|
|
537 |
|
|
538 |
/*
|
|
539 |
* Adds detail to the list item at the specified index
|
|
540 |
*/
|
|
541 |
void AddDetailToDisplayedItemL( CHgItem* aVisualItem, CMPXMedia* aMedia, TInt aIndex);
|
|
542 |
void AddThumbnailToDisplayedItemL( CHgItem* aVisualItem, CMPXMedia* aMedia, TInt aIndex);
|
|
543 |
void SetTitleL( CHgItem* aVisualItem, CMPXMedia* aMedia );
|
|
544 |
void SetDetailCountL( CHgItem* aVisualItem, CMPXMedia* aMedia );
|
|
545 |
void SetDetailArtistL( CHgItem* aVisualItem, CMPXMedia* aMedia );
|
|
546 |
void SetDetailAlbumL( CHgItem* aVisualItem, CMPXMedia* aMedia );
|
|
547 |
void SetDetailDurationL( CHgItem* aVisualItem, CMPXMedia* aMedia );
|
|
548 |
void UpdateTimeIndicatorsL( TDes& aBuf, TInt aDuration );
|
|
549 |
void SetDetailIndicatorL( CHgItem* aVisualItem, TInt aIndex );
|
|
550 |
void SetDetailIconL( CHgItem* aVisualItem, TInt aIndex );
|
|
551 |
void SetDetailThumbnailL( CMPXMedia* aMedia, TInt aIndex = 0 );
|
|
552 |
|
|
553 |
/**
|
|
554 |
* Set the collection context
|
|
555 |
*/
|
|
556 |
void SetCollectionContextL();
|
|
557 |
|
|
558 |
void ProvideDataL( TInt aStart, TInt aEnd );
|
|
559 |
|
|
560 |
void SetScrollbarTypeL();
|
|
561 |
|
|
562 |
void CancelTNRequest();
|
|
563 |
|
|
564 |
/**
|
|
565 |
* Save the selected album item
|
|
566 |
*
|
|
567 |
*/
|
|
568 |
void SaveSelectedAlbumItemL();
|
|
569 |
|
|
570 |
/**
|
|
571 |
* Write the album name, artist name and album art in media data to file
|
|
572 |
*
|
|
573 |
* @param aMedia the selected media data in Album view
|
|
574 |
*/
|
|
575 |
void WriteToStreamFileL( const CMPXMedia* aMedia );
|
|
576 |
|
|
577 |
/**
|
|
578 |
* Read the album name, artist name and album art from file
|
|
579 |
*
|
|
580 |
* @param aMedia the media data will be returned
|
|
581 |
*/
|
|
582 |
void ReadFromStreamFileL( CMPXMedia* aMedia );
|
|
583 |
|
|
584 |
/**
|
|
585 |
* Refresh list as needed
|
|
586 |
*/
|
|
587 |
void Refresh(TInt aIndex);
|
|
588 |
|
|
589 |
/**
|
|
590 |
* Refresh list as needed
|
|
591 |
*/
|
|
592 |
void RefreshNoThumbnailL(TInt aIndex);
|
|
593 |
|
|
594 |
/**
|
|
595 |
* Clean AlbumArt request Queue
|
|
596 |
*/
|
|
597 |
void CleanAlbumArtReqQueue();
|
|
598 |
|
|
599 |
/**
|
|
600 |
* Handle requests in visible area
|
|
601 |
* @param aBufferStart the starting buffer index
|
|
602 |
* @param aBufferEnd the ending buffer index
|
|
603 |
*/
|
|
604 |
void ProvideDataIntersectL(TInt aBufferStart, TInt aBufferEnd);
|
|
605 |
|
|
606 |
/**
|
|
607 |
* Refresh list as needed
|
|
608 |
* @param aBufferStart the starting buffer index
|
|
609 |
* @param aBufferEnd the ending buffer index
|
|
610 |
*/
|
|
611 |
void ProvideDataDifferenceL(TInt aBufferStart, TInt aBufferEnd);
|
|
612 |
void ProvideDataWithoutThumbnailsL(const CMPXMediaArray& aMediaArray, TInt aStartIndex = 0);
|
|
613 |
|
|
614 |
private: // data
|
|
615 |
|
|
616 |
/**
|
|
617 |
* Context of collection view. It's the exact location within collection navigation
|
|
618 |
* based on category type + category.
|
|
619 |
*/
|
|
620 |
enum TContext
|
|
621 |
{
|
|
622 |
EContextUnknown,
|
|
623 |
EContextGroupCollection,
|
|
624 |
EContextGroupArtist,
|
|
625 |
EContextGroupAlbum,
|
|
626 |
EContextGroupPlaylist,
|
|
627 |
EContextGroupSong,
|
|
628 |
EContextGroupPodcast,
|
|
629 |
EContextGroupGenre,
|
|
630 |
EContextGroupComposer,
|
|
631 |
EContextItemArtist,
|
|
632 |
EContextItemAlbum,
|
|
633 |
EContextItemPlaylist,
|
|
634 |
EContextItemSong,
|
|
635 |
EContextItemPodcast,
|
|
636 |
EContextItemGenre,
|
|
637 |
EContextItemComposer
|
|
638 |
};
|
|
639 |
|
|
640 |
enum TDefaultIcon
|
|
641 |
{
|
|
642 |
EMPXDefaultIconNotSet = -1,
|
|
643 |
EMPXDefaultIconArtist,
|
|
644 |
EMPXDefaultIconAlbum,
|
|
645 |
EMPXDefaultIconPlaylist,
|
|
646 |
EMPXDefaultIconSongs,
|
|
647 |
EMPXDefaultIconPodcasts,
|
|
648 |
EMPXDefaultIconGenre,
|
|
649 |
EMPXDefaultIconComposer,
|
|
650 |
EMPXDefaultTitleIconPodcasts,
|
|
651 |
EMPXDefaultIconEmpty
|
|
652 |
};
|
|
653 |
|
|
654 |
MMPXViewContainer* iViewContainer; // Not owned
|
|
655 |
MEikCommandObserver* iView; // Not owned
|
|
656 |
MEikListBoxObserver* iListBoxObserver; // Not owned
|
|
657 |
CMPXCommonListBoxArrayBase* iListBoxArray; // Owned
|
|
658 |
CArrayFixFlat<TInt>* iListSelections; // Owned
|
|
659 |
CAknIconArray* iIconArray; // Owned
|
|
660 |
|
|
661 |
CMPXCommonContainerTextureManager2* iTextureManager;// Owned
|
|
662 |
CMPXCommonUiHelper* iCommonUiHelper; // Owned
|
|
663 |
|
|
664 |
CHgScroller* iListWidget; // Owned
|
|
665 |
CHgScroller* iPrevListWidget; // Owned
|
|
666 |
CHgScrollerWithTitle* iScrollerWithTitle;
|
|
667 |
CThumbnailManager* iThumbnailManager; // Owned
|
|
668 |
|
|
669 |
TContext iContext;
|
|
670 |
TContext iPrevContext;
|
|
671 |
TInt iResourceOffset; // Must be freed
|
|
672 |
TBool iIsMarkingEnabled;
|
|
673 |
TInt iTopIndex;
|
|
674 |
TInt iBottomIndex;
|
|
675 |
TSize iImageSize;
|
|
676 |
CAknsBasicBackgroundControlContext* iBgContext; // Owned
|
|
677 |
|
|
678 |
typedef RHashMap<TInt, TInt> RThumbnailReqHashMap;
|
|
679 |
RThumbnailReqHashMap iThumbnailReqHashMap;
|
|
680 |
|
|
681 |
HBufC* iEpisodeTitle;
|
|
682 |
HBufC* iAlbumTitle;
|
|
683 |
HBufC* iSongTitle;
|
|
684 |
|
|
685 |
TBool iPodcastContext;
|
|
686 |
TBool iTitleSet;
|
|
687 |
TDefaultIcon iCurrentDefaultIcon;
|
|
688 |
TFileName iSelectedAlbumItemFileName;
|
|
689 |
CMPXMedia* iSelectedMediaInAlbumView;
|
|
690 |
// Queue for Albumart asynchronous requests
|
|
691 |
TSglQue<TAlbumArtRequest> iRequestQueue;
|
|
692 |
TAlbumArtRequest* iAlbumArtRequest;
|
|
693 |
TInt iRequestCount;
|
|
694 |
TInt iQueueCounter;
|
|
695 |
|
|
696 |
THgScrollDirection iDirection;
|
|
697 |
RArray<TBool> iThumbnailReqMap;
|
|
698 |
TInt iLastValidMediaItemIndex;
|
|
699 |
TInt iRequestStart;
|
|
700 |
TInt iRequestEnd;
|
|
701 |
|
|
702 |
};
|
|
703 |
|
|
704 |
#endif // CMPXCOMMONCONTAINERHGIMP_H
|
|
705 |
|
|
706 |
// End of File
|