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