1315 { |
1315 { |
1316 TInt err = aTable.FindPropertyL( KDefaultVoIPService, aName, aProperty ); |
1316 TInt err = aTable.FindPropertyL( KDefaultVoIPService, aName, aProperty ); |
1317 |
1317 |
1318 if ( KErrNone == err ) |
1318 if ( KErrNone == err ) |
1319 { |
1319 { |
1320 aEntry.AddPropertyL( aProperty ); |
1320 err = aEntry.AddPropertyL( aProperty ); |
|
1321 if ( KErrNone != err ) |
|
1322 { |
|
1323 RCSELOGSTRING2( |
|
1324 "CRCSEProfileRegistry::FindAndAddDefaultPropertyL - add property err: %d", |
|
1325 err ); |
|
1326 } |
1321 } |
1327 } |
1322 } |
1328 } |
1323 |
1329 |
1324 // ----------------------------------------------------------------------------- |
1330 // ----------------------------------------------------------------------------- |
1325 // CRCSEProfileRegistry::CreateDefaultServiceSettingsL |
1331 // CRCSEProfileRegistry::CreateDefaultServiceSettingsL |
1341 else if ( aNewEntry.iIds[0].iProfileType != |
1347 else if ( aNewEntry.iIds[0].iProfileType != |
1342 CRCSEProfileEntry::EProtocolSIP ) |
1348 CRCSEProfileEntry::EProtocolSIP ) |
1343 { |
1349 { |
1344 return; |
1350 return; |
1345 } |
1351 } |
|
1352 |
|
1353 TInt err( KErrNone ); |
1346 |
1354 |
1347 // Service table API |
1355 // Service table API |
1348 CSPSettings* table = CSPSettings::NewLC(); |
1356 CSPSettings* table = CSPSettings::NewLC(); |
1349 |
1357 |
1350 // New service entry for this provider name |
1358 // New service entry for this provider name |
1356 // Service Setup plug-in UID ( if VoIP plugin UID set ) |
1364 // Service Setup plug-in UID ( if VoIP plugin UID set ) |
1357 if ( KRCSEDefaultVoIPPluginUID != aNewEntry.iVoIPPluginUID ) |
1365 if ( KRCSEDefaultVoIPPluginUID != aNewEntry.iVoIPPluginUID ) |
1358 { |
1366 { |
1359 property->SetName( EPropertyServiceSetupPluginId ); |
1367 property->SetName( EPropertyServiceSetupPluginId ); |
1360 property->SetValue( aNewEntry.iVoIPPluginUID ); |
1368 property->SetValue( aNewEntry.iVoIPPluginUID ); |
1361 entry->AddPropertyL( *property ); |
1369 err = entry->AddPropertyL( *property ); |
|
1370 if ( KErrAlreadyExists == err ) |
|
1371 { |
|
1372 User::LeaveIfError( |
|
1373 entry->UpdateProperty( EPropertyServiceSetupPluginId, |
|
1374 aNewEntry.iVoIPPluginUID ) ); |
|
1375 } |
|
1376 else |
|
1377 { |
|
1378 User::LeaveIfError( err ); |
|
1379 } |
1362 } |
1380 } |
1363 |
1381 |
1364 // This property is needed by clients to check if VoIP service is used |
1382 // This property is needed by clients to check if VoIP service is used |
1365 property->SetName( ESubPropertyVoIPSettingsId ); |
1383 property->SetName( ESubPropertyVoIPSettingsId ); |
1366 property->SetValue( KVoIPSettingsID ); |
1384 property->SetValue( KVoIPSettingsID ); |
1367 entry->AddPropertyL( *property ); |
1385 err = entry->AddPropertyL( *property ); |
|
1386 if ( KErrAlreadyExists == err ) |
|
1387 { |
|
1388 User::LeaveIfError( entry->UpdateProperty( ESubPropertyVoIPSettingsId, |
|
1389 KVoIPSettingsID ) ); |
|
1390 } |
|
1391 else |
|
1392 { |
|
1393 User::LeaveIfError( err ); |
|
1394 } |
1368 |
1395 |
1369 // Service Attribute Mask |
1396 // Service Attribute Mask |
1370 FindAndAddDefaultPropertyL( |
1397 FindAndAddDefaultPropertyL( |
1371 *table, *entry, *property, EPropertyServiceAttributeMask ); |
1398 *table, *entry, *property, EPropertyServiceAttributeMask ); |
1372 |
1399 |