|
1 /* |
|
2 * Copyright (c) 2002-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: Call Settings plugin model. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GSCALLPLUGINMODEL_H |
|
20 #define GSCALLPLUGINMODEL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "GSCallPlugin.hrh" |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <centralrepository.h> |
|
27 #include <backgroundimage.h> |
|
28 |
|
29 |
|
30 // CONSTANTS |
|
31 // Panic codes for used in this compilation unit |
|
32 enum KGSCallPluginModelPanicCodes |
|
33 { |
|
34 EGSCallPluinModelPanicNullPtr = 1 |
|
35 }; |
|
36 |
|
37 const TInt KGSVTStillImageValue = 0; |
|
38 |
|
39 // FORWARD DECLARATIONS |
|
40 class CPsetCustomerServiceProfile; |
|
41 class CGSBackgroundImage; |
|
42 |
|
43 class CSPSettings; |
|
44 |
|
45 // CLASS DEFINITION |
|
46 /** |
|
47 * CGSCallPluginModel is the model class of GS app. |
|
48 * It provides functions to get and set setting values. |
|
49 */ |
|
50 class CGSCallPluginModel : public CBase |
|
51 { |
|
52 public: // Constructor and destructor |
|
53 /** |
|
54 * Two-phased constructor |
|
55 */ |
|
56 static CGSCallPluginModel* NewL(); |
|
57 |
|
58 /** |
|
59 * Destructor |
|
60 */ |
|
61 ~CGSCallPluginModel(); |
|
62 |
|
63 public: //new |
|
64 |
|
65 |
|
66 /* |
|
67 * Returns one of the call related values from shared data. |
|
68 * @param aKeyName name of the shared data key to fetch |
|
69 * @param aId value of shared data key |
|
70 * @return ETrue: no errors |
|
71 * EFalse: an error has occurred |
|
72 */ |
|
73 TBool GetCallSettingValue( const TCallSettId aCallId, TInt& aId ); |
|
74 |
|
75 /* |
|
76 * Sets one of the call related values from shared data. |
|
77 * @param aKeyName name of the shared data key to set |
|
78 * @param aId value of shared data key |
|
79 * @return ETrue: no errors |
|
80 * EFalse: an error has occurred |
|
81 */ |
|
82 TInt SetCallSettingValue( const TCallSettId aCallId, TInt aId ); |
|
83 |
|
84 /** |
|
85 * Gets CSP status |
|
86 * |
|
87 * @return ETrue: CSP is set |
|
88 * EFalse: CSP is not set |
|
89 */ |
|
90 TBool GetCSPStatus(); |
|
91 |
|
92 /** |
|
93 * Sets CSP Active |
|
94 * @param aValue TBool |
|
95 * @return ETrue: CSP is set |
|
96 * EFalse: CSP is not set |
|
97 */ |
|
98 void SetCSPActiveL( TBool aValue ); |
|
99 |
|
100 /** |
|
101 * Returns if CSP setting is supported |
|
102 * @param aSettingNumber TInt |
|
103 * @return ETrue: CSP is supported |
|
104 * EFalse: CSP is not supported |
|
105 */ |
|
106 TBool IsSettingSupported( TInt aSettingNumber ); |
|
107 |
|
108 /** |
|
109 * Gets soft reject text from shared data. |
|
110 * @param aText User defined text for soft reject. |
|
111 */ |
|
112 TBool GetSoftRejectText( TDes& aText ); |
|
113 |
|
114 /** |
|
115 * Sets user defined text to shared data for soft reject. |
|
116 * @param aText User defined text for soft reject. |
|
117 */ |
|
118 TBool SetSoftRejectText( TDes& aText ); |
|
119 |
|
120 //Still Image functions |
|
121 /** |
|
122 * Get the current value for Still Image |
|
123 * from Shared Data |
|
124 */ |
|
125 TInt VTStillImageL(); |
|
126 |
|
127 /** |
|
128 * Set the current value for Still Image |
|
129 * to Shared Data |
|
130 */ |
|
131 void SetVTStillImageL( const TInt aValue ); |
|
132 |
|
133 /** |
|
134 * Get the Japanese prefix change mode value from shared data |
|
135 * @return mode |
|
136 */ |
|
137 TInt PrefixChangeModeL(); |
|
138 |
|
139 /** |
|
140 * Set the Japanese prefix change mode value to shared data |
|
141 * @param aMode integer value (0/1) |
|
142 */ |
|
143 void SetPrefixChangeModeL( TInt aMode ); |
|
144 |
|
145 /** |
|
146 * Get the Japanese prefix data from shared data |
|
147 * @param aText the edited value from data query |
|
148 */ |
|
149 void PrefixChangeDataL( TDes& aText ); |
|
150 |
|
151 /** |
|
152 * Set the Japanese prefix data to shared data |
|
153 * @param aText the edited value from data query |
|
154 */ |
|
155 void SetPrefixChangeDataL( const TDesC& aText ); |
|
156 |
|
157 /** |
|
158 * Check if Restricted Send Caller Id is supported. |
|
159 * This is handled using GS local variation |
|
160 * @return ETrue if supported. |
|
161 */ |
|
162 TBool RestrictedSendCallerIdSupportedL(); |
|
163 |
|
164 /** |
|
165 * Check if Secure Send Caller Id is supported. |
|
166 * This is handled using GS local variation |
|
167 * @return ETrue if supported. |
|
168 */ |
|
169 TBool SecureSendCallerIdSupportedL(); |
|
170 |
|
171 /** |
|
172 * Returns one of the VoIP call related values from Cent. Repository |
|
173 * @param aVoipSettingId name of the Cent. Repository key to fetch |
|
174 * @param aVoipId value of Cent. Repository key |
|
175 * @return KErrNone if successful |
|
176 */ |
|
177 TInt GetVoIPCallSettingValue( |
|
178 const TGSVoIPSetting aVoipSettingId, |
|
179 TInt& aVoipId ); |
|
180 |
|
181 /** |
|
182 * Sets one of the VoIP call related values from Cent. Repository |
|
183 * @param aVoipSettingId name of the Cent. Repository key to set |
|
184 * @param aVoipId value of Cent. Repository key |
|
185 * @return KErrNone if successful |
|
186 */ |
|
187 TInt SetVoIPCallSettingValue( |
|
188 const TGSVoIPSetting aVoipSettingId, |
|
189 TInt aVoipId ); |
|
190 |
|
191 /** |
|
192 * Gets SCCP status from Central Repository |
|
193 * @param aStatus value of Cent. Repository key |
|
194 * @return KErrNone if successful |
|
195 */ |
|
196 TInt GetSCCPStatus( TInt& aStatus ); |
|
197 |
|
198 /** |
|
199 * Switches value between CenRep (0 = off, 1 = on) |
|
200 * and setting page (1 = off, 0 = on). |
|
201 * @param aValue value to switch |
|
202 * @return switched value |
|
203 */ |
|
204 void SwitchValue( TInt& aValue ); |
|
205 |
|
206 /** |
|
207 * Get Call Duration value from CenRep |
|
208 */ |
|
209 TInt CallDurationL(); |
|
210 |
|
211 /** |
|
212 * Set Call Duration value to CenRep key. |
|
213 * @param aValue value to set |
|
214 */ |
|
215 void SetCallDurationL( TInt aValue ); |
|
216 |
|
217 /** |
|
218 * Get Long Press Call Key value |
|
219 */ |
|
220 TInt LongPressCallKeyL(); |
|
221 |
|
222 /** |
|
223 * Set Long Press Call Key value to CenRep key. |
|
224 * @param aValue value to set |
|
225 */ |
|
226 void SetLongPressCallKeyL( const TInt aValue ); |
|
227 |
|
228 /** |
|
229 * Maps the Long Press Call Key setting value |
|
230 * @Param value to be mapped |
|
231 **/ |
|
232 void MapLongPressKeyCallKeyValue( TInt &aValue ); |
|
233 |
|
234 |
|
235 /** |
|
236 * Check if VoIP features are supported |
|
237 * This is done using Central Repository |
|
238 * @return ETrue if VoIP is supported |
|
239 */ |
|
240 TBool VoIPSupported(); |
|
241 |
|
242 /** |
|
243 * Get own image vt call status |
|
244 */ |
|
245 TInt OwnImageVtCallStatusL(); |
|
246 |
|
247 /** |
|
248 * Set Own Image video call value to CenRep key. |
|
249 * @param aValue value to set |
|
250 */ |
|
251 void SetOwnImageVtCallStatusL( const TInt aValue ); |
|
252 |
|
253 /** |
|
254 * Check if slide settings items should be shown |
|
255 * @return ETrue if slide settings items should be shown |
|
256 */ |
|
257 TBool SlideSettingsShownL() const; |
|
258 |
|
259 private: // Private constructors |
|
260 /** |
|
261 * Default C++ contructor |
|
262 */ |
|
263 CGSCallPluginModel(); |
|
264 |
|
265 /** |
|
266 * Symbian OS default constructor |
|
267 * @return void |
|
268 */ |
|
269 void ConstructL(); |
|
270 |
|
271 |
|
272 private: // new |
|
273 void InitializeCentralRepositoryL(); |
|
274 void UninitializeCentralRepository(); |
|
275 |
|
276 public: // data members |
|
277 CGSBackgroundImage* iBackgroundApi; |
|
278 |
|
279 private: |
|
280 CPsetCustomerServiceProfile* iCSP; //check if CSP is active |
|
281 |
|
282 //Central repository objects |
|
283 CRepository* iTelephonyRepository; |
|
284 CRepository* iCommonCallephonyRepository; |
|
285 CRepository* iGSVariationRepository; |
|
286 CRepository* iRichCallRepository; |
|
287 CRepository* iLogsRepository; |
|
288 CRepository* iCommonTelephonyRepository; |
|
289 |
|
290 TInt iLocalVariationValues; //local variated constants |
|
291 CSPSettings* iSpSettings; |
|
292 |
|
293 }; |
|
294 |
|
295 #endif // GSCALLPLUGINMODEL_H |
|
296 |
|
297 // End of File |