21 #include <spsettings.h> |
21 #include <spsettings.h> |
22 #include <spproperty.h> |
22 #include <spproperty.h> |
23 #include <spdefinitions.h> |
23 #include <spdefinitions.h> |
24 #include <sipmanagedprofile.h> |
24 #include <sipmanagedprofile.h> |
25 #include <sipmanagedprofileregistry.h> |
25 #include <sipmanagedprofileregistry.h> |
26 #include <cipappphoneutils.h> // SIP User-Agent header info. |
26 #include <cipappphoneutils.h> // SIP User-Agent header info. |
27 #include <cipapputilsaddressresolver.h> // SIP User-Agent header info. |
27 #include <cipapputilsaddressresolver.h> // SIP User-Agent header info. |
28 #include <pathinfo.h> // For getting phone rom root path. |
28 #include <pathinfo.h> // For getting phone rom root path. |
29 #include <cvimpstsettingsstore.h> // For IM tone path |
29 #include <cvimpstsettingsstore.h> // For IM tone path |
|
30 #include <settingsinternalcrkeys.h> // For default service. |
|
31 #include <centralrepository.h> // For default service. |
30 |
32 |
31 #include "voipxmlvoiphandler.h" |
33 #include "voipxmlvoiphandler.h" |
32 #include "voipxmlprocessorlogger.h" |
34 #include "voipxmlprocessorlogger.h" |
33 #include "voipxmlprocessordefaults.h" |
35 #include "voipxmlprocessordefaults.h" |
34 #include "voipxmlutils.h" |
36 #include "voipxmlutils.h" |
154 { |
156 { |
155 // Adding profile entry to registry OK. Let's load the profile |
157 // Adding profile entry to registry OK. Let's load the profile |
156 // from registry so that we'll get all the values registry has |
158 // from registry so that we'll get all the values registry has |
157 // added to the entry (AddL takes entry as const reference). |
159 // added to the entry (AddL takes entry as const reference). |
158 TRAP_IGNORE( iRegistry->FindL( profileId, *iEntry ) ); |
160 TRAP_IGNORE( iRegistry->FindL( profileId, *iEntry ) ); |
|
161 iServiceId = iEntry->iServiceProviderId; |
159 } |
162 } |
160 else |
163 else |
161 { |
164 { |
162 err = KErrCompletion; |
165 err = KErrCompletion; |
163 ok = EFalse; |
166 ok = EFalse; |
234 TRAP( err, SetSpSettingsL() ); |
237 TRAP( err, SetSpSettingsL() ); |
235 if ( KErrNone != err ) |
238 if ( KErrNone != err ) |
236 { |
239 { |
237 // ParamHandler is only intrested in KErrNone and KErrCompletion. |
240 // ParamHandler is only intrested in KErrNone and KErrCompletion. |
238 err = KErrCompletion; |
241 err = KErrCompletion; |
|
242 } |
|
243 if ( iDefault ) |
|
244 { |
|
245 TRAP_IGNORE( SetAsDefaultL() ); |
239 } |
246 } |
240 return err; |
247 return err; |
241 } |
248 } |
242 |
249 |
243 // --------------------------------------------------------------------------- |
250 // --------------------------------------------------------------------------- |
1283 iEntry->iPreferredCodecs.AppendL( codecId ); |
1299 iEntry->iPreferredCodecs.AppendL( codecId ); |
1284 |
1300 |
1285 CleanupStack::PopAndDestroy( codec ); |
1301 CleanupStack::PopAndDestroy( codec ); |
1286 } |
1302 } |
1287 |
1303 |
|
1304 // --------------------------------------------------------------------------- |
|
1305 // Sets the service as default service and preferred telephony as PS. |
|
1306 // --------------------------------------------------------------------------- |
|
1307 // |
|
1308 void CVoipXmlVoipHandler::SetAsDefaultL() |
|
1309 { |
|
1310 // Set the preferred service ID and preferred telephony as PS. |
|
1311 CRepository* repository = CRepository::NewL( KCRUidRichCallSettings ); |
|
1312 repository->Set( KRCSPSPreferredService, (TInt)iServiceId ); |
|
1313 repository->Set( KRCSEPreferredTelephony, 1 ); |
|
1314 delete repository; |
|
1315 } |
|
1316 |
1288 // End of File |
1317 // End of File |