1 /* |
|
2 * Copyright (c) 2006-2007 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: Container for MUSSettingsPlugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_CMUSSETTINGSCONTAINER_H |
|
21 #define C_CMUSSETTINGSCONTAINER_H |
|
22 |
|
23 |
|
24 #include "mussettings.h" |
|
25 #include <gsbasecontainer.h> |
|
26 #include <bldvariant.hrh> |
|
27 |
|
28 |
|
29 class CGSListBoxItemTextArray; |
|
30 class CEikTextListBox; |
|
31 class CMusSettingsModel; |
|
32 |
|
33 |
|
34 /** Buffer size for general settings menu items */ |
|
35 const TInt KGSBufSize128 = 128; |
|
36 |
|
37 |
|
38 /** |
|
39 * CMusSettingsContainer container class. |
|
40 * Container class for MUSSettingsPlugin. |
|
41 * |
|
42 * @since S60 v3.2 |
|
43 */ |
|
44 class CMusSettingsContainer : public CGSBaseContainer |
|
45 { |
|
46 public: |
|
47 |
|
48 /** |
|
49 * C++ constructor, public since no NewL factory function implemented. |
|
50 * |
|
51 * @param aModel Reference to CMuSSettingsModel class. |
|
52 */ |
|
53 CMusSettingsContainer( CMusSettingsModel& aModel ); |
|
54 |
|
55 /** |
|
56 * Symbian OS second phase constructor. Public for owner to specify size |
|
57 * of client rectangle. |
|
58 * |
|
59 * @param aRect Rectangle of container area. |
|
60 */ |
|
61 void ConstructL( const TRect& aRect ); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 ~CMusSettingsContainer(); |
|
67 |
|
68 /** |
|
69 * Updates listbox's item's value. |
|
70 * |
|
71 * @param aFeatureId An item which is updated. |
|
72 */ |
|
73 void UpdateListBoxL( TInt aFeatureId ); |
|
74 |
|
75 /** |
|
76 * Retrieves the currently selected listbox feature id. |
|
77 * @return feature id. |
|
78 */ |
|
79 TInt CurrentFeatureId() const; |
|
80 |
|
81 /** |
|
82 * Shows notification of newly selected SIP profile taken to use after |
|
83 * active call. |
|
84 */ |
|
85 void ShowNewProfileActiveAfterCallL(); |
|
86 |
|
87 protected: |
|
88 |
|
89 // from base class CGSBaseContainer. |
|
90 |
|
91 /** |
|
92 * From CGSBaseContainer. |
|
93 * Creates listbox. See baseclass for further description. |
|
94 * |
|
95 * @param aResLbxId Resource identifier for listbox to be created. |
|
96 */ |
|
97 virtual void ConstructListBoxL( TInt aResLbxId ); |
|
98 |
|
99 private: |
|
100 |
|
101 /** |
|
102 * Add an item to list of settings. |
|
103 */ |
|
104 void AddItemL( TInt aId, const TPtrC aText ); |
|
105 |
|
106 /** |
|
107 * Create settings list items. |
|
108 */ |
|
109 void CreateListBoxItemsL(); |
|
110 |
|
111 /** |
|
112 * Create VS activation settings list item. |
|
113 */ |
|
114 void MakeActivationItemL(); |
|
115 |
|
116 /** |
|
117 * Create Operator VS activation settings list item. |
|
118 */ |
|
119 void MakeOperatorActivationItemL(); |
|
120 |
|
121 /** |
|
122 * Create SIP profile settings list item. |
|
123 */ |
|
124 void MakeSIPProfileItemL(); |
|
125 |
|
126 /** |
|
127 * Create autorecord settings list item. |
|
128 */ |
|
129 void MakeAutoRecordItemL(); |
|
130 |
|
131 /** |
|
132 * Create note settings list item. |
|
133 */ |
|
134 void MakeNoteItemL(); |
|
135 |
|
136 /** |
|
137 * Create save recorded video settings list item. |
|
138 */ |
|
139 void MakeRecordedVideoSavingItemL(); |
|
140 |
|
141 /** |
|
142 * Required for help. |
|
143 */ |
|
144 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
145 |
|
146 /** |
|
147 * Hide some itesm if needed in operator variant mode |
|
148 */ |
|
149 void HideItemsL( TInt aItemIndex ); |
|
150 |
|
151 private: // data |
|
152 |
|
153 /** |
|
154 * Reference to data model. |
|
155 */ |
|
156 CMusSettingsModel& iModel; |
|
157 |
|
158 /** |
|
159 * List items in VS activation mode. |
|
160 * Own. |
|
161 */ |
|
162 CDesCArrayFlat* iActivationItems; |
|
163 |
|
164 /** |
|
165 * List items in SIP profile mode. |
|
166 * Own. |
|
167 */ |
|
168 CDesCArrayFlat* iProfileItems; |
|
169 |
|
170 /** |
|
171 * List items in autorecord mode. |
|
172 * Own. |
|
173 */ |
|
174 CDesCArrayFlat* iAutoRecordItems; |
|
175 |
|
176 /** |
|
177 * List items in note. |
|
178 * Own. |
|
179 */ |
|
180 CDesCArrayFlat* iNoteItems; |
|
181 |
|
182 /** |
|
183 * Operator variant current value. |
|
184 */ |
|
185 MusSettingsKeys::TOperatorVariant iOperatorVariant; |
|
186 |
|
187 /** |
|
188 * Listbox items. |
|
189 */ |
|
190 CGSListBoxItemTextArray* iListboxItemArray; |
|
191 |
|
192 }; |
|
193 |
|
194 #endif // C_CMUSSETTINGSCONTAINER_H |
|