|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 /* |
|
18 * glximgvwrmetadatacontainer.h |
|
19 * |
|
20 * Created on: Oct 22, 2009 |
|
21 * Author: sourbasu |
|
22 */ |
|
23 |
|
24 #ifndef GLXIMGVWRMETADATACONTAINER_H_ |
|
25 #define GLXIMGVWRMETADATACONTAINER_H_ |
|
26 |
|
27 |
|
28 #include <glxmedialist.h> //media list |
|
29 #include <alf/alfenv.h> |
|
30 #include <aknsettingitemlist.h> // for CAknSettingItem |
|
31 #include "mglxmedialistobserver.h" |
|
32 #include <glxattributecontext.h> |
|
33 |
|
34 |
|
35 //FORWARD DECLARATION |
|
36 class MGlxMediaList; |
|
37 class CGlxDetailsMulModelProvider; |
|
38 class CGlxCommandHandlerAddToContainer; |
|
39 |
|
40 #include "glxmedia.h" |
|
41 |
|
42 // CLASS DECLARATION |
|
43 /** |
|
44 * CGlxImgVwrMetadataContainer |
|
45 * |
|
46 * Metadata Container implementation |
|
47 */ |
|
48 NONSHARABLE_CLASS( CGlxImgVwrMetadataContainer ) : public CAknSettingItemList, |
|
49 public MGlxMediaListObserver |
|
50 |
|
51 { |
|
52 public: // Constructors and destructor |
|
53 void ViewDynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane); |
|
54 /** |
|
55 * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object. |
|
56 * |
|
57 * @param aRect rect for control |
|
58 * @param aMediaList media list |
|
59 * @return Metadata container object |
|
60 */ |
|
61 static CGlxImgVwrMetadataContainer* NewL( const TRect& aRect,const TDesC& aUri); |
|
62 |
|
63 /** |
|
64 * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object. |
|
65 * |
|
66 * @param aRect rect for control |
|
67 * @param aMediaList media list |
|
68 * @return Metadata container object |
|
69 */ |
|
70 static CGlxImgVwrMetadataContainer* NewLC( const TRect& aRect,const TDesC& aUri); |
|
71 |
|
72 /** |
|
73 * Destructor |
|
74 */ |
|
75 ~CGlxImgVwrMetadataContainer(); |
|
76 |
|
77 public: |
|
78 |
|
79 // @ref CAknSettingItemList::CreateSettingItemL |
|
80 CAknSettingItem* CreateSettingItemL(TInt aIdentifier); |
|
81 |
|
82 // @ref CAknSettingItemList::HandleListBoxEventL |
|
83 void HandleListBoxEventL(CEikListBox* aListBox, |
|
84 TListBoxEvent aEventType); |
|
85 void HandleListboxChangesL(); |
|
86 |
|
87 //Enable disble the options based on the current selected item |
|
88 TBool IsItemModifiable(); |
|
89 //Change MSK |
|
90 void ChangeMskL(); |
|
91 //Enable marquee support |
|
92 void EnableMarqueingL(); |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 public: |
|
98 //MedialistObserver APIS |
|
99 void HandleItemAddedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList ); |
|
100 void HandleItemRemovedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList*/* aList */); |
|
101 void HandleAttributesAvailableL( TInt aItemIndex, |
|
102 const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList ); |
|
103 void HandleFocusChangedL( NGlxListDefs::TFocusChangeType aType, |
|
104 TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList ); |
|
105 void HandleItemSelectedL(TInt aIndex, TBool aSelected, MGlxMediaList* aList ); |
|
106 void HandleMessageL( const CMPXMessage& aMessage, MGlxMediaList* aList ); |
|
107 void HandleError( TInt aError ); |
|
108 void HandleCommandCompleteL( CMPXCommand* aCommandResult, TInt aError, |
|
109 MGlxMediaList* aList ); |
|
110 void HandleMediaL( TInt aListIndex, MGlxMediaList* aList ); |
|
111 void HandleItemModifiedL( const RArray<TInt>& aItemIndexes, MGlxMediaList* aList ); |
|
112 void HandleErrorL(); |
|
113 MGlxMediaList& MediaList(); |
|
114 void HandleCommandCompleteL(TAny* aSessionId, |
|
115 CMPXCommand* /*aCommandResult*/, TInt aError, MGlxMediaList* aList); |
|
116 |
|
117 private: |
|
118 |
|
119 /** |
|
120 * C++ constructor. |
|
121 * |
|
122 * @param aMediaList media list |
|
123 */ |
|
124 CGlxImgVwrMetadataContainer(const TDesC& aUri); |
|
125 |
|
126 /** |
|
127 * Symbian 2nd phase constructor |
|
128 * @param aRect rect for this control |
|
129 */ |
|
130 void ConstructL( const TRect& aRect); |
|
131 void CreateMediaListForSelectedItemL(); |
|
132 void SetAttributesL(TMPXAttribute attribute); |
|
133 void EditItemL(TInt aIndex, TBool aCalledFromMenu); |
|
134 void SetNameDescriptionL(TInt aItem); |
|
135 void SetDurationLIicenseItemVisibilityL(); |
|
136 TBool IsLicenseItem(); |
|
137 |
|
138 private: //data |
|
139 |
|
140 //Flag to check if the item is a video. |
|
141 TBool iVideo; |
|
142 //To check if marquee is enabled. |
|
143 TBool iMarquee; |
|
144 //to set visible license items based on the Item. |
|
145 TBool iSetVisible; |
|
146 RBuf iTextSetter; |
|
147 const TDesC& iUri ; |
|
148 MGlxMediaList* iItemMediaList; |
|
149 CGlxAttributeContext* iMainListAttributecontext; |
|
150 TGlxSelectionIterator iSelectionIterator; |
|
151 |
|
152 }; |
|
153 |
|
154 |
|
155 |
|
156 #endif /* GLXIMGVWRMETADATACONTAINER_H_ */ |