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;
|
|
142 |
|
|
143 |
private:
|
|
144 |
|
|
145 |
/**
|
|
146 |
* C++ default constructor.
|
|
147 |
*/
|
|
148 |
CScpSettingHandler( CScpProfileHandler& iProfileHandler );
|
|
149 |
|
|
150 |
/**
|
|
151 |
* 2nd phase destructor
|
|
152 |
*/
|
|
153 |
void ConstructL();
|
|
154 |
|
|
155 |
/**
|
|
156 |
* Get Service Id by SIP Profile Id.
|
|
157 |
* @param aSipId SIP Profile Id.
|
|
158 |
* @param aServiceId Service id array.
|
|
159 |
*/
|
|
160 |
void GetServiceIdsL( TUint32 aSipId,
|
|
161 |
RArray<TUint32>& aServiceId ) const;
|
|
162 |
|
|
163 |
/**
|
|
164 |
* Updates Presence settings to the given service
|
|
165 |
* @param aService Service
|
|
166 |
*/
|
|
167 |
void UpdatePresenceSettingsL( CScpService& aService ) const;
|
|
168 |
|
|
169 |
/**
|
|
170 |
* Check if presence settings are valid
|
|
171 |
* @param aEntry Entry
|
|
172 |
* @return ETrue if valid
|
|
173 |
*/
|
|
174 |
TBool ArePresenceSettingsValid( const CSPEntry& aEntry ) const;
|
|
175 |
|
|
176 |
/**
|
|
177 |
* Determines presence settings id from the given entry
|
|
178 |
* @param aEntry Entry
|
|
179 |
* @return ETrue if valid
|
|
180 |
*/
|
|
181 |
TInt GetPresenceSettingsId( const CSPEntry& aEntry ) const;
|
|
182 |
|
|
183 |
/**
|
|
184 |
* Updates VoIP settings to the given service
|
|
185 |
* @param aService Service
|
|
186 |
*/
|
|
187 |
void UpdateVoIPSettingsL( CScpService& aService ) const;
|
|
188 |
|
|
189 |
/**
|
|
190 |
* Check if VoIP settings are valid in the given entry
|
|
191 |
* @param aEntry Entry
|
|
192 |
* @return ETrue if valid
|
|
193 |
*/
|
|
194 |
TBool AreVoipSettingsValid( const CSPEntry& aEntry ) const;
|
|
195 |
|
|
196 |
/**
|
|
197 |
* Updates voice mail box settings to the given service
|
|
198 |
* @param aService Service
|
|
199 |
*/
|
|
200 |
void UpdateVmbxSettingsL( CScpService& aService ) const;
|
|
201 |
|
|
202 |
/**
|
|
203 |
* Check if voice mail box settings are valid
|
|
204 |
* @param aEntry Entry
|
|
205 |
* @return ETrue if valid
|
|
206 |
*/
|
|
207 |
TBool AreVmbxSettingsValid( const CSPEntry& aEntry ) const;
|
|
208 |
|
|
209 |
/**
|
|
210 |
* Gets sip profile id for VoIP sub service
|
|
211 |
* @param aServiceId Service id
|
|
212 |
* @param aSipId
|
|
213 |
*/
|
|
214 |
void GetVoipSipProfileIdL( TUint32 aServiceId, TUint32& aSipId ) const;
|
|
215 |
|
|
216 |
/**
|
|
217 |
* Gets sip profile id for VMBx sub service
|
|
218 |
* @param aServiceId Service id
|
|
219 |
* @param aSipId
|
|
220 |
*/
|
|
221 |
void GetVmbxSipProfileIdL( TUint32 aServiceId,
|
|
222 |
TUint32& aSipId ) const;
|
|
223 |
|
|
224 |
/**
|
|
225 |
* Gets sip profile id for Presence sub service
|
|
226 |
* @param aServiceId Service id
|
|
227 |
* @param aSipId
|
|
228 |
*/
|
|
229 |
void GetPresenceSipProfileIdL( TUint32 aServiceId,
|
|
230 |
TUint32& aSipId ) const;
|
|
231 |
|
|
232 |
/**
|
|
233 |
* Gets sip profile id for all sub services within the service.
|
|
234 |
* If subservices contain different sip profile ids, will leave with
|
|
235 |
* KErrArgument.
|
|
236 |
* @param aServiceId Service id
|
|
237 |
* @param aSipId
|
|
238 |
*/
|
|
239 |
void GetUnknownSipProfileIdL( TUint32 aServiceId,
|
|
240 |
TUint32& aSipId ) const;
|
|
241 |
|
|
242 |
/**
|
|
243 |
* Update IM settings to the given service.
|
|
244 |
*
|
|
245 |
* @since S60 v5.1
|
|
246 |
* @param aService service
|
|
247 |
*/
|
|
248 |
void UpdateImSettingsL( CScpService& aService ) const;
|
|
249 |
|
|
250 |
/**
|
|
251 |
* Check if IM settings are valid in the given entry.
|
|
252 |
*
|
|
253 |
* @since S60 v5.1
|
|
254 |
* @param aEntry Entry
|
|
255 |
* @return ETrue if valid
|
|
256 |
*/
|
|
257 |
TBool AreImSettingsValid( const CSPEntry& aEntry ) const;
|
|
258 |
|
|
259 |
private:
|
|
260 |
|
|
261 |
/**
|
|
262 |
* Profile registry. Own.
|
|
263 |
*/
|
|
264 |
CRCSEProfileRegistry* iRcseProfileRegistry;
|
|
265 |
|
|
266 |
/**
|
|
267 |
* Profile entry. Own.
|
|
268 |
*/
|
|
269 |
CRCSEProfileEntry* iRcseProfileEntry;
|
|
270 |
|
|
271 |
/**
|
|
272 |
* SPSettings. Own.
|
|
273 |
*/
|
|
274 |
CSPSettings* iSpSettings;
|
|
275 |
|
|
276 |
/**
|
|
277 |
* Profile handler
|
|
278 |
*/
|
|
279 |
CScpProfileHandler& iProfileHandler;
|
|
280 |
|
|
281 |
/**
|
|
282 |
* SPSettings VoIP utils. Own.
|
|
283 |
*/
|
|
284 |
CSPSettingsVoIPUtils* iSpsVoIPUtils;
|
|
285 |
|
|
286 |
private:
|
|
287 |
|
|
288 |
#ifdef _DEBUG
|
|
289 |
friend class T_CScpSettingHandler;
|
|
290 |
friend class T_CScpServiceManager;
|
|
291 |
friend class T_CScpSipHelper;
|
|
292 |
#endif
|
|
293 |
|
|
294 |
};
|
|
295 |
|
|
296 |
#endif // C_SCPSETTINGHANDLER_H
|
|
297 |
|
|
298 |
// End of File
|