|
1 /* |
|
2 * Copyright (c) 2008-2009 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: Icon manager for visuals |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 /** |
|
22 * @internal reviewed 31/07/2007 by Rowland Cook |
|
23 */ |
|
24 /** |
|
25 * @internal reviewed 04/07/2007 by M Byrne |
|
26 */ |
|
27 |
|
28 #ifndef C_GLXVIDEOICONMANAGER_H |
|
29 #define C_GLXVIDEOICONMANAGER_H |
|
30 |
|
31 #include <e32base.h> |
|
32 |
|
33 #include "glxiconmanager.h" |
|
34 |
|
35 class CAlfVisual; |
|
36 class CAlfTexture; |
|
37 |
|
38 /** |
|
39 * CGlxVideoIconManager |
|
40 * |
|
41 * Icon manager for visuals |
|
42 * Handles adding video overlay if required. |
|
43 * |
|
44 * @author Dave Holland |
|
45 */ |
|
46 NONSHARABLE_CLASS ( CGlxVideoIconManager ) : public CGlxIconManager |
|
47 { |
|
48 public: |
|
49 /** |
|
50 * Static constructor |
|
51 * @param aMediaList reference to media list |
|
52 * @param aVisualList reference to associated visual list |
|
53 * @return pointer to CGlxVideoIconManager instance |
|
54 */ |
|
55 IMPORT_C static CGlxVideoIconManager* NewL(MGlxMediaList& aMediaList, |
|
56 MGlxVisualList& aVisualList); |
|
57 |
|
58 /** |
|
59 * Destructor |
|
60 */ |
|
61 ~CGlxVideoIconManager(); |
|
62 |
|
63 private: // From MGlxMediaListObserver |
|
64 /// See @ref MGlxMediaListObserver::HandleAttributesAvailableL |
|
65 void HandleAttributesAvailableL(TInt aItemIndex, |
|
66 const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList); |
|
67 |
|
68 private: // from MGlxVisualListObserver |
|
69 void HandleFocusChangedL( TInt aFocusIndex, TReal32 aItemsPerSecond, |
|
70 MGlxVisualList* aList, NGlxListDefs::TFocusChangeType aType ); |
|
71 |
|
72 /** @see MGlxVisualListObserver::HandleVisualAddedL */ |
|
73 void HandleVisualAddedL( CAlfVisual* aVisual, TInt aIndex, MGlxVisualList* aList ); |
|
74 |
|
75 |
|
76 private: |
|
77 /** |
|
78 * Constructor |
|
79 * @param aMediaList reference to media list |
|
80 * @param aVisualList reference to associated visual list |
|
81 */ |
|
82 CGlxVideoIconManager(MGlxMediaList& aMediaList, |
|
83 MGlxVisualList& aVisualList); |
|
84 |
|
85 /** |
|
86 * 2nd phase constructor |
|
87 */ |
|
88 void ConstructL(); |
|
89 |
|
90 /** |
|
91 * Check if thumbnail attribute is present for specifed vis. |
|
92 * If not add icon if present or add default icon |
|
93 * @param aIndex index of item in media list |
|
94 */ |
|
95 void AddIconIfVideoL( TInt aIndex ); |
|
96 |
|
97 |
|
98 private: |
|
99 // Texture for large video overlay not owned |
|
100 CAlfTexture* iLargeVideoIcon; |
|
101 |
|
102 // Texture for small video overlay not owned |
|
103 CAlfTexture* iSmallVideoIcon; |
|
104 |
|
105 // focus index |
|
106 TInt iFocusIndex; |
|
107 }; |
|
108 |
|
109 #endif // C_GLXVIDEOICONMANAGER_H |