author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:20:32 +0300 | |
branch | RCL_3 |
changeset 33 | 2989b291cac7 |
parent 28 | d38647835c2e |
permissions | -rw-r--r-- |
28 | 1 |
/* |
2 |
* Copyright (c) 2002-2009 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: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef C_SCPSETTINGHANDLER_H |
|
20 |
#define C_SCPSETTINGHANDLER_H |
|
21 |
||
22 |
#include <e32base.h> |
|
23 |
#include <cchclientserver.h> |
|
24 |
#include <spdefinitions.h> |
|
25 |
||
26 |
class CRCSEProfileRegistry; |
|
27 |
class CRCSEProfileEntry; |
|
28 |
class CSPSettings; |
|
29 |
class CSPEntry; |
|
30 |
class CSPSettingsVoIPUtils; |
|
31 |
class CScpService; |
|
32 |
class CScpServiceHandlerBase; |
|
33 |
class CScpProfileHandler; |
|
34 |
class CScpServiceStorage; |
|
35 |
||
36 |
/** |
|
37 |
* Settings handler. |
|
38 |
* @lib sipconnectionprovider.dll |
|
39 |
*/ |
|
40 |
class CScpSettingHandler : public CBase |
|
41 |
{ |
|
42 |
public: |
|
43 |
||
44 |
/** |
|
45 |
* Two-phased constructor. |
|
46 |
*/ |
|
47 |
static CScpSettingHandler* NewL( CScpProfileHandler& iProfileHandler ); |
|
48 |
||
49 |
/** |
|
50 |
* Destructor. |
|
51 |
*/ |
|
52 |
virtual ~CScpSettingHandler(); |
|
53 |
||
54 |
/** |
|
55 |
* Get SIP Profile Id by Service Id. |
|
56 |
* @param aServiceId Service Id. |
|
57 |
* @param aSubService Sub service type. |
|
58 |
* @param aSipId SIP Profile Id. |
|
59 |
*/ |
|
60 |
void GetSipProfileIdByTypeL( TUint32 aServiceId, |
|
61 |
TCCHSubserviceType aSubServiceType, |
|
62 |
TUint32& aSipId ) const; |
|
63 |
||
64 |
/** |
|
65 |
* Get SPSetting TInt property by Service Id and property name. |
|
66 |
* @param aServiceId Service Id. |
|
67 |
* @param aPropertyName Settings property name. |
|
68 |
* @param aProperty a property value. |
|
69 |
*/ |
|
70 |
void GetSPSettingsIntPropertyL( TUint32 aServiceId, |
|
71 |
TServicePropertyName aPropertyName, |
|
72 |
TInt& aProperty ) const; |
|
73 |
/** |
|
74 |
* Get settings for service by Service Id. |
|
75 |
* @param aServiceId Service Id. |
|
76 |
* @param aSetting Service Settings. |
|
77 |
*/ |
|
78 |
void UpdateSettingsL( CScpService& aSetting, |
|
79 |
TCCHSubserviceType aSubServiceType ) const; |
|
80 |
||
81 |
/** |
|
82 |
* Updates xdm settings username |
|
83 |
* @param aService Service handle. |
|
84 |
* @param aSubServiceType sub service type |
|
85 |
* @param aUsername username to set |
|
86 |
*/ |
|
87 |
void UpdateXdmUsernameL( CScpService& aService, |
|
88 |
TCCHSubserviceType aSubServiceType, |
|
89 |
const TDesC8& aUsername ); |
|
90 |
||
91 |
/** |
|
92 |
* Updates xdm settings password |
|
93 |
* @param aService Service handle. |
|
94 |
* @param aSubServiceType sub service type |
|
95 |
* @param aPassword password to set |
|
96 |
*/ |
|
97 |
void UpdateXdmPasswordL( CScpService& aService, |
|
98 |
TCCHSubserviceType aSubServiceType, |
|
99 |
const TDesC8& aPassword ); |
|
100 |
||
101 |
/** |
|
102 |
* Get Service Id by SIP Profile Id. |
|
103 |
* @param aSipId SIP Profile Id. |
|
104 |
* @param aServiceId Service id array. |
|
105 |
*/ |
|
106 |
TInt GetServiceIds( TUint32 aSipId, |
|
107 |
RArray<TUint32>& aServiceId ) const; |
|
108 |
||
109 |
/** |
|
110 |
* Checks if service exists in service table |
|
111 |
* @param aServiceId Service id array. |
|
112 |
* @return ETrue if the service exists |
|
113 |
*/ |
|
114 |
TBool ServiceExistsL( TUint32 aServiceId ) const; |
|
115 |
||
116 |
/** |
|
117 |
* Checks is VoIP supported. |
|
118 |
* @return ETrue if Common VoIP and Dynamic VoIP are ON |
|
119 |
*/ |
|
120 |
TBool IsVoIPSupported() const; |
|
121 |
||
122 |
/** |
|
123 |
* Checks is VoIP's user agent header terminal type defined. |
|
124 |
* @param aServiceId service id |
|
125 |
* @return ETrue if terminal type is defined. |
|
126 |
*/ |
|
127 |
TBool IsUahTerminalTypeDefinedL( TUint32 aServiceId ) const; |
|
128 |
||
129 |
/** |
|
130 |
* Checks is VoIP's user agent header WLAN mac address defined. |
|
131 |
* @param v |
|
132 |
* @return ETrue if WLAN mac address is defined. |
|
133 |
*/ |
|
134 |
TBool IsUahWLANMacDefinedL( TUint32 aServiceId ) const; |
|
135 |
||
136 |
/** |
|
137 |
* VoIP's user agent header free string length getter. |
|
138 |
* @param aServiceId service id |
|
139 |
* @return TInt length of free string. |
|
140 |
*/ |
|
141 |
TInt UahStringLengthL( TUint32 aServiceId ) const; |
|
33
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
142 |
|
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
143 |
/** |
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
144 |
* Checks is service's VoIP subservice allowed to use WCDMA. |
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
145 |
* @param aServiceId service id |
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
146 |
* @return ETrue if allowed to use VoIP over 3G, otherwise EFalse. |
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
147 |
*/ |
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
148 |
TBool IsVoIPOverWcdmaAllowedL( TUint32 aServiceId ) const; |
2989b291cac7
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
28
diff
changeset
|
149 |
|
28 | 150 |
private: |
151 |
||
152 |
/** |
|
153 |
* C++ default constructor. |
|
154 |
*/ |
|
155 |
CScpSettingHandler( CScpProfileHandler& iProfileHandler ); |
|
156 |
||
157 |
/** |
|
158 |
* 2nd phase destructor |
|
159 |
*/ |
|
160 |
void ConstructL(); |
|
161 |
||
162 |
/** |
|
163 |
* Get Service Id by SIP Profile Id. |
|
164 |
* @param aSipId SIP Profile Id. |
|
165 |
* @param aServiceId Service id array. |
|
166 |
*/ |
|
167 |
void GetServiceIdsL( TUint32 aSipId, |
|
168 |
RArray<TUint32>& aServiceId ) const; |
|
169 |
||
170 |
/** |
|
171 |
* Updates Presence settings to the given service |
|
172 |
* @param aService Service |
|
173 |
*/ |
|
174 |
void UpdatePresenceSettingsL( CScpService& aService ) const; |
|
175 |
||
176 |
/** |
|
177 |
* Check if presence settings are valid |
|
178 |
* @param aEntry Entry |
|
179 |
* @return ETrue if valid |
|
180 |
*/ |
|
181 |
TBool ArePresenceSettingsValid( const CSPEntry& aEntry ) const; |
|
182 |
||
183 |
/** |
|
184 |
* Determines presence settings id from the given entry |
|
185 |
* @param aEntry Entry |
|
186 |
* @return ETrue if valid |
|
187 |
*/ |
|
188 |
TInt GetPresenceSettingsId( const CSPEntry& aEntry ) const; |
|
189 |
||
190 |
/** |
|
191 |
* Updates VoIP settings to the given service |
|
192 |
* @param aService Service |
|
193 |
*/ |
|
194 |
void UpdateVoIPSettingsL( CScpService& aService ) const; |
|
195 |
||
196 |
/** |
|
197 |
* Check if VoIP settings are valid in the given entry |
|
198 |
* @param aEntry Entry |
|
199 |
* @return ETrue if valid |
|
200 |
*/ |
|
201 |
TBool AreVoipSettingsValid( const CSPEntry& aEntry ) const; |
|
202 |
||
203 |
/** |
|
204 |
* Updates voice mail box settings to the given service |
|
205 |
* @param aService Service |
|
206 |
*/ |
|
207 |
void UpdateVmbxSettingsL( CScpService& aService ) const; |
|
208 |
||
209 |
/** |
|
210 |
* Check if voice mail box settings are valid |
|
211 |
* @param aEntry Entry |
|
212 |
* @return ETrue if valid |
|
213 |
*/ |
|
214 |
TBool AreVmbxSettingsValid( const CSPEntry& aEntry ) const; |
|
215 |
||
216 |
/** |
|
217 |
* Gets sip profile id for VoIP sub service |
|
218 |
* @param aServiceId Service id |
|
219 |
* @param aSipId |
|
220 |
*/ |
|
221 |
void GetVoipSipProfileIdL( TUint32 aServiceId, TUint32& aSipId ) const; |
|
222 |
||
223 |
/** |
|
224 |
* Gets sip profile id for VMBx sub service |
|
225 |
* @param aServiceId Service id |
|
226 |
* @param aSipId |
|
227 |
*/ |
|
228 |
void GetVmbxSipProfileIdL( TUint32 aServiceId, |
|
229 |
TUint32& aSipId ) const; |
|
230 |
||
231 |
/** |
|
232 |
* Gets sip profile id for Presence sub service |
|
233 |
* @param aServiceId Service id |
|
234 |
* @param aSipId |
|
235 |
*/ |
|
236 |
void GetPresenceSipProfileIdL( TUint32 aServiceId, |
|
237 |
TUint32& aSipId ) const; |
|
238 |
||
239 |
/** |
|
240 |
* Gets sip profile id for all sub services within the service. |
|
241 |
* If subservices contain different sip profile ids, will leave with |
|
242 |
* KErrArgument. |
|
243 |
* @param aServiceId Service id |
|
244 |
* @param aSipId |
|
245 |
*/ |
|
246 |
void GetUnknownSipProfileIdL( TUint32 aServiceId, |
|
247 |
TUint32& aSipId ) const; |
|
248 |
||
249 |
/** |
|
250 |
* Update IM settings to the given service. |
|
251 |
* |
|
252 |
* @since S60 v5.1 |
|
253 |
* @param aService service |
|
254 |
*/ |
|
255 |
void UpdateImSettingsL( CScpService& aService ) const; |
|
256 |
||
257 |
/** |
|
258 |
* Check if IM settings are valid in the given entry. |
|
259 |
* |
|
260 |
* @since S60 v5.1 |
|
261 |
* @param aEntry Entry |
|
262 |
* @return ETrue if valid |
|
263 |
*/ |
|
264 |
TBool AreImSettingsValid( const CSPEntry& aEntry ) const; |
|
265 |
||
266 |
private: |
|
267 |
||
268 |
/** |
|
269 |
* Profile registry. Own. |
|
270 |
*/ |
|
271 |
CRCSEProfileRegistry* iRcseProfileRegistry; |
|
272 |
||
273 |
/** |
|
274 |
* Profile entry. Own. |
|
275 |
*/ |
|
276 |
CRCSEProfileEntry* iRcseProfileEntry; |
|
277 |
||
278 |
/** |
|
279 |
* SPSettings. Own. |
|
280 |
*/ |
|
281 |
CSPSettings* iSpSettings; |
|
282 |
||
283 |
/** |
|
284 |
* Profile handler |
|
285 |
*/ |
|
286 |
CScpProfileHandler& iProfileHandler; |
|
287 |
||
288 |
/** |
|
289 |
* SPSettings VoIP utils. Own. |
|
290 |
*/ |
|
291 |
CSPSettingsVoIPUtils* iSpsVoIPUtils; |
|
292 |
||
293 |
private: |
|
294 |
||
295 |
#ifdef _DEBUG |
|
296 |
friend class T_CScpSettingHandler; |
|
297 |
friend class T_CScpServiceManager; |
|
298 |
friend class T_CScpSipHelper; |
|
299 |
#endif |
|
300 |
||
301 |
}; |
|
302 |
||
303 |
#endif // C_SCPSETTINGHANDLER_H |
|
304 |
||
305 |
// End of File |