|
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 "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: Definition for MediaServant item browser base class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_MSITEMBROWSER_H |
|
21 #define C_MSITEMBROWSER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <aknlists.h> |
|
25 #include "cmcommon.h" // service types |
|
26 #include "cmcommontypes.h" |
|
27 #include "msbasecontainer.h" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CAknIconArray; |
|
31 class CMSAppUi; |
|
32 class CCmBaseListItem; |
|
33 |
|
34 /** |
|
35 * CMSItemBrowser class |
|
36 * @since S60 5.1 |
|
37 */ |
|
38 class CMSItemBrowser : public CMSBaseContainer, |
|
39 public MEikListBoxObserver |
|
40 { |
|
41 // Icon enumerations |
|
42 enum TMSListBoxIcons |
|
43 { |
|
44 EMarkIcon = 0, |
|
45 EIconImage, |
|
46 EIconAudio, |
|
47 EIconVideo, |
|
48 EIconCount |
|
49 }; |
|
50 |
|
51 public: |
|
52 |
|
53 /** |
|
54 * Symbian default constructor. |
|
55 */ |
|
56 void ConstructL( TRect aRect ); |
|
57 |
|
58 /** |
|
59 * Destructor |
|
60 */ |
|
61 virtual ~CMSItemBrowser(); |
|
62 |
|
63 /** |
|
64 * Sets current file status |
|
65 * @since S60 5.1 |
|
66 * @param aIndex, item index |
|
67 * @param TCmListItemStatus, file status |
|
68 */ |
|
69 void SetFileStatus( TInt aIndex, TCmListItemStatus aStatus ); |
|
70 |
|
71 /** |
|
72 * Gets current file status |
|
73 * @since S60 5.1 |
|
74 * @param aIndex, item index |
|
75 * @return TCmListItemStatus, file status |
|
76 */ |
|
77 TCmListItemStatus FileStatus( TInt aIndex ); |
|
78 |
|
79 /** |
|
80 * Return pointer to listbox |
|
81 * @since S60 5.1 |
|
82 * @return CEikListbox, listbox |
|
83 */ |
|
84 CEikListBox* ListBox(); |
|
85 |
|
86 protected: |
|
87 |
|
88 /** |
|
89 * Updates listbox data |
|
90 * @since S60 5.1 |
|
91 */ |
|
92 void UpdateListBoxDataL(); |
|
93 |
|
94 /** |
|
95 * Gets browse data from server |
|
96 * @since S60 5.1 |
|
97 */ |
|
98 virtual void GetBrowseDataL() = 0; |
|
99 |
|
100 // From base class CCoeControl |
|
101 |
|
102 /** |
|
103 * From CCoeControl |
|
104 * See base class definition |
|
105 */ |
|
106 CCoeControl* ComponentControl(TInt aIndex) const; |
|
107 |
|
108 /** |
|
109 * From CCoeControl |
|
110 * See base class definition |
|
111 */ |
|
112 TInt CountComponentControls() const; |
|
113 |
|
114 /** |
|
115 * From CCoeControl |
|
116 * See base class definition |
|
117 */ |
|
118 void SizeChanged(); |
|
119 |
|
120 /** |
|
121 * From CCoeControl |
|
122 * See base class definition |
|
123 */ |
|
124 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
125 TEventCode aType ); |
|
126 |
|
127 // From base class MEikListBoxObserver |
|
128 |
|
129 /** |
|
130 * From MEikListBoxObserver |
|
131 * See base class definition |
|
132 */ |
|
133 void HandleListBoxEventL( |
|
134 CEikListBox* aListBox, |
|
135 TListBoxEvent aEventType ); |
|
136 |
|
137 protected: |
|
138 |
|
139 /** |
|
140 * Listbox control |
|
141 */ |
|
142 CEikFormattedCellListBox* iListBox; // owned |
|
143 /** |
|
144 * pointer to AppUi object |
|
145 */ |
|
146 CMSAppUi* iAppUi; // not owned |
|
147 /** |
|
148 * Item array |
|
149 */ |
|
150 RPointerArray<CCmBaseListItem>* iItemArray; |
|
151 /** |
|
152 * Internal array for listbox item texts |
|
153 */ |
|
154 CDesCArrayFlat* iInternalItemArray; |
|
155 /** |
|
156 * Next item index for thumbnail loading |
|
157 */ |
|
158 TInt iNextItemIndex; |
|
159 /** |
|
160 * Icon count for thumbnails |
|
161 */ |
|
162 TInt iIconCount; |
|
163 /** |
|
164 * Mediatype of selected rule |
|
165 */ |
|
166 TCmMediaType iMediaType; |
|
167 }; |
|
168 |
|
169 #endif // C_MSITEMBROWSER_H |