|
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: MUSSettingsPlugin model class. |
|
15 * Version : %version: 8.1.2.1.3 % << Don't touch! Updated by Synergy at check-out. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_MUSSETTINGSMODEL_H |
|
22 #define C_MUSSETTINGSMODEL_H |
|
23 |
|
24 #include "mussettings.h" |
|
25 |
|
26 class MMusSIPProfileHandler; |
|
27 class CMusSIPProfileModel; |
|
28 class MultimediaSharingSettings; |
|
29 |
|
30 class CAknMemorySelectionDialogMultiDrive; |
|
31 |
|
32 |
|
33 /** |
|
34 * CMusSettingsModel is the model class of GS application. |
|
35 * It provides functions to get and set setting values. |
|
36 * |
|
37 * @since S60 v3.2 |
|
38 */ |
|
39 class CMusSettingsModel : public CBase |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 * @param aHandler Reference to SIP profile manipulator class. |
|
46 * return Returns pointer to a new instance of CMusSettings class. |
|
47 */ |
|
48 static CMusSettingsModel* NewL( MMusSIPProfileHandler& aHandler ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 ~CMusSettingsModel(); |
|
54 |
|
55 /** |
|
56 * Returns operator variant mode. |
|
57 * @return 0: Standard (MusSettingsKeys::EStandard) |
|
58 * 1: Operator Specific (MusSettingsKeys::EOperatorSpecific) |
|
59 */ |
|
60 MusSettingsKeys::TOperatorVariant VSSettingsOperatorVariantL(); |
|
61 |
|
62 /** |
|
63 * Returns VS activation mode. |
|
64 * @return 0: Always (MusSettingsKeys::EAlwaysActive) |
|
65 * 1: Automatic (MusSettingsKeys::EActiveInHomeNetworks) |
|
66 * 2: Off (MusSettingsKeys::ENever) |
|
67 */ |
|
68 MusSettingsKeys::TActivation VSSettingsActivationL(); |
|
69 |
|
70 /** |
|
71 * Returns SIP profile mode. |
|
72 * @return 0: Use default SIP profile. |
|
73 * 1: Use user selected SIP profile. |
|
74 */ |
|
75 TInt VSSettingsProfileL(); |
|
76 |
|
77 /** |
|
78 * Returns video autorecord mode. |
|
79 * @return 0: on (MusSettingsKeys::EAutoRecordOn) |
|
80 * 1: off (MusSettingsKeys::EAutoRecordOff) |
|
81 */ |
|
82 MusSettingsKeys::TAutoRecord VSSettingsAutoRecordL(); |
|
83 |
|
84 /** |
|
85 * Returns recorded video saving mode. |
|
86 * @return 2: phone memory |
|
87 * 4: memory card |
|
88 */ |
|
89 TInt VSSettingsRecordedVideoSavingL(); |
|
90 |
|
91 /** |
|
92 * Returns state of note (on/off). This setting is called "Capability |
|
93 * auditory note" in standard variant and "Alerts" in operator specific |
|
94 * variant. |
|
95 * @return 0: enabled (MusSettingsKeys::EAuditoryNotificationOn) |
|
96 * 1: disabled (MusSettingsKeys::EAuditoryNotificationOff) |
|
97 */ |
|
98 MusSettingsKeys::TAuditoryNotification VSSettingsNoteL(); |
|
99 |
|
100 /** |
|
101 * Sets packet data VS activation mode. |
|
102 * @param aActivation Activation mode. |
|
103 */ |
|
104 void SetVSSettingsActivationL( |
|
105 const MusSettingsKeys::TActivation aActivation ); |
|
106 |
|
107 /** |
|
108 * Sets SIP profile mode. |
|
109 * @param aProfile Profile id. |
|
110 */ |
|
111 void SetVSSettingsProfileL( const TInt aProfile ); |
|
112 |
|
113 /** |
|
114 * Sets video autorecord mode. |
|
115 * @param aAutoRecord save mode of video. |
|
116 */ |
|
117 void SetVSSettingsAutoRecordL( |
|
118 const MusSettingsKeys::TAutoRecord aAutoRecord ); |
|
119 |
|
120 /** |
|
121 * Sets location of video saving. |
|
122 * @param aVideoLocation location of video |
|
123 */ |
|
124 void SetVSSettingsRecordedVideoSavingL( const TInt aVideoLocation ); |
|
125 |
|
126 /** |
|
127 * Sets mode of note ("Capability auditory note" in standard variant and |
|
128 * "Alerts" in operator specific variant). |
|
129 * @param aValue New state for note (enabled/disabled). |
|
130 */ |
|
131 void SetVSSettingsNoteL( |
|
132 const MusSettingsKeys::TAuditoryNotification aValue ); |
|
133 |
|
134 |
|
135 /** |
|
136 * operator specific variant |
|
137 * Sets activation item |
|
138 * @param aActive (enabled/disabled). |
|
139 */ |
|
140 void SetActivationItem( TBool aActive ); |
|
141 |
|
142 |
|
143 /** |
|
144 * operator specific variant |
|
145 * @return activation item |
|
146 */ |
|
147 TBool ActivationItem( ); |
|
148 /** |
|
149 * Returns the array containing the profile names. |
|
150 * NOTE! The ownership of the array is transferred to the caller. |
|
151 * @return Array consisting of the names of the SIP profiles. |
|
152 */ |
|
153 CDesCArray* ListOfProfileNamesL(); |
|
154 |
|
155 /** |
|
156 * Gets a SIP profile name by ID. |
|
157 * Ownership is transferred to caller. |
|
158 * @return SIP profile name. |
|
159 */ |
|
160 HBufC* ProfileNameL( TInt aId ); |
|
161 |
|
162 /** |
|
163 * Gets the index of the default SIP profile. |
|
164 * @return KErrNotFound, if one does not exist, otherwise index of the |
|
165 * default SIP profile. |
|
166 */ |
|
167 TInt DefaultProfileIndex(); |
|
168 |
|
169 /** |
|
170 * Gets the id of the default SIP profile. |
|
171 * @return KErrNotFound, if one does not exist, otherwise id of the |
|
172 * default SIP profile. |
|
173 */ |
|
174 TUint32 DefaultProfileId(); |
|
175 |
|
176 /** |
|
177 * Returns SIP profile index on locally cached array based on id. |
|
178 * @param aId Profile id |
|
179 * @return Profile index or KErrNotFound if no matching profile is found. |
|
180 */ |
|
181 TInt ProfileIndexByIdL( TUint32 aId ); |
|
182 |
|
183 /** |
|
184 * Returns profile id based on index. |
|
185 * @param aIndex Profile index |
|
186 * @return Profile id or KUnknownProfileId if no matching profile is found. |
|
187 */ |
|
188 TUint32 ProfileIdByIndex( TUint aIndex ); |
|
189 |
|
190 |
|
191 /** |
|
192 * Returns memory section dialog |
|
193 * @return Memory selction dialog reference |
|
194 */ |
|
195 CAknMemorySelectionDialogMultiDrive* MemorySelectionDialogLC(); |
|
196 |
|
197 |
|
198 public: // constants |
|
199 |
|
200 /** |
|
201 * Default SIP profile. |
|
202 */ |
|
203 static const TInt KVsSipProfileDefault; |
|
204 |
|
205 /** |
|
206 * SIP profile select. |
|
207 */ |
|
208 static const TInt KVsSipProfileSelect; |
|
209 |
|
210 /** |
|
211 * Null selection SIP profile. |
|
212 */ |
|
213 static const TInt KVsSipProfileSelectNone; |
|
214 |
|
215 private: |
|
216 |
|
217 /** |
|
218 * C++ constructor. |
|
219 * @param aHandler Reference to SIP profile manipulator. |
|
220 */ |
|
221 CMusSettingsModel( MMusSIPProfileHandler& aHandler ); |
|
222 |
|
223 /** |
|
224 * Initialize SIP profile enabler data. |
|
225 */ |
|
226 void InitializeProfileEnablerL(); |
|
227 |
|
228 void ConstructL(); |
|
229 |
|
230 private: // data |
|
231 |
|
232 /** |
|
233 * SIP profile handler. |
|
234 */ |
|
235 MMusSIPProfileHandler& iHandler; |
|
236 |
|
237 /** |
|
238 * Central repository keys of video sharing. |
|
239 * Own. |
|
240 */ |
|
241 MultimediaSharingSettings* iMSSettingsKeys; |
|
242 |
|
243 /** |
|
244 * Operator variant. If SIP profile disabled |
|
245 */ |
|
246 TBool iProfileDisabled; |
|
247 |
|
248 }; |
|
249 |
|
250 #endif // C_MUSSETTINGSMODEL_H |