327 // |
327 // |
328 CommsDat::CCDRecordBase* CCmPluginLan::CopyServiceRecordL() |
328 CommsDat::CCDRecordBase* CCmPluginLan::CopyServiceRecordL() |
329 { |
329 { |
330 OstTraceFunctionEntry0( CCMPLUGINLAN_COPYSERVICERECORDL_ENTRY ); |
330 OstTraceFunctionEntry0( CCMPLUGINLAN_COPYSERVICERECORDL_ENTRY ); |
331 |
331 |
332 __ASSERT_DEBUG( iServiceRecord != NULL, User::Leave( KErrNotFound )); |
332 // New service record to be returned. |
333 |
333 CCDRecordBase* serviceRecord = static_cast<CCDLANServiceRecord*>( |
334 CCDRecordBase* serviceRecord = static_cast<CCDLANServiceRecord*> |
334 CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) ); |
335 ( CCDRecordBase::CreateCopyRecordL( *iServiceRecord ) ); |
335 CleanupStack::PushL( serviceRecord ); |
|
336 |
|
337 CCDLANServiceRecord* tempServiceRecordPtrToNew = |
|
338 static_cast<CCDLANServiceRecord*>( serviceRecord ); |
|
339 |
|
340 // CommsDat version of service record. |
|
341 CCDLANServiceRecord* origServiceRecord = |
|
342 static_cast<CCDLANServiceRecord*>( iServiceRecord ); |
|
343 |
|
344 if ( !origServiceRecord->iRecordTag.IsNull() ) |
|
345 { |
|
346 tempServiceRecordPtrToNew->iRecordTag.SetL( |
|
347 origServiceRecord->iRecordTag ); |
|
348 } |
|
349 if ( !origServiceRecord->iRecordName.IsNull() ) |
|
350 { |
|
351 tempServiceRecordPtrToNew->iRecordName.SetL( |
|
352 origServiceRecord->iRecordName ); |
|
353 } |
|
354 if ( !origServiceRecord->iServiceEnableLlmnr.IsNull() ) |
|
355 { |
|
356 tempServiceRecordPtrToNew->iServiceEnableLlmnr.SetL( |
|
357 origServiceRecord->iServiceEnableLlmnr ); |
|
358 } |
|
359 if ( !origServiceRecord->iIfNetworks.IsNull() ) |
|
360 { |
|
361 tempServiceRecordPtrToNew->iIfNetworks.SetL( |
|
362 origServiceRecord->iIfNetworks ); |
|
363 } |
|
364 if ( !origServiceRecord->iIpNetmask.IsNull() ) |
|
365 { |
|
366 tempServiceRecordPtrToNew->iIpNetmask.SetL( |
|
367 origServiceRecord->iIpNetmask ); |
|
368 } |
|
369 if ( !origServiceRecord->iIpGateway.IsNull() ) |
|
370 { |
|
371 tempServiceRecordPtrToNew->iIpGateway.SetL( |
|
372 origServiceRecord->iIpGateway ); |
|
373 } |
|
374 if ( !origServiceRecord->iIpAddrFromServer.IsNull() ) |
|
375 { |
|
376 tempServiceRecordPtrToNew->iIpAddrFromServer.SetL( |
|
377 origServiceRecord->iIpAddrFromServer ); |
|
378 } |
|
379 if ( !origServiceRecord->iIpAddr.IsNull() ) |
|
380 { |
|
381 tempServiceRecordPtrToNew->iIpAddr.SetL( |
|
382 origServiceRecord->iIpAddr ); |
|
383 } |
|
384 if ( !origServiceRecord->iIpDnsAddrFromServer.IsNull() ) |
|
385 { |
|
386 tempServiceRecordPtrToNew->iIpDnsAddrFromServer.SetL( |
|
387 origServiceRecord->iIpDnsAddrFromServer ); |
|
388 } |
|
389 if ( !origServiceRecord->iIpNameServer1.IsNull() ) |
|
390 { |
|
391 tempServiceRecordPtrToNew->iIpNameServer1.SetL( |
|
392 origServiceRecord->iIpNameServer1 ); |
|
393 } |
|
394 if ( !origServiceRecord->iIpNameServer2.IsNull() ) |
|
395 { |
|
396 tempServiceRecordPtrToNew->iIpNameServer2.SetL( |
|
397 origServiceRecord->iIpNameServer2 ); |
|
398 } |
|
399 if ( !origServiceRecord->iIp6DnsAddrFromServer.IsNull() ) |
|
400 { |
|
401 tempServiceRecordPtrToNew->iIp6DnsAddrFromServer.SetL( |
|
402 origServiceRecord->iIp6DnsAddrFromServer ); |
|
403 } |
|
404 if ( !origServiceRecord->iIp6NameServer1.IsNull() ) |
|
405 { |
|
406 tempServiceRecordPtrToNew->iIp6NameServer1.SetL( |
|
407 origServiceRecord->iIp6NameServer1 ); |
|
408 } |
|
409 if ( !origServiceRecord->iIp6NameServer2.IsNull() ) |
|
410 { |
|
411 tempServiceRecordPtrToNew->iIp6NameServer2.SetL( |
|
412 origServiceRecord->iIp6NameServer2 ); |
|
413 } |
|
414 if ( !origServiceRecord->iIpAddrLeaseValidFrom.IsNull() ) |
|
415 { |
|
416 tempServiceRecordPtrToNew->iIpAddrLeaseValidFrom.SetL( |
|
417 origServiceRecord->iIpAddrLeaseValidFrom ); |
|
418 } |
|
419 if ( !origServiceRecord->iIpAddrLeaseValidTo.IsNull() ) |
|
420 { |
|
421 tempServiceRecordPtrToNew->iIpAddrLeaseValidTo.SetL( |
|
422 origServiceRecord->iIpAddrLeaseValidTo ); |
|
423 } |
|
424 if ( !origServiceRecord->iConfigDaemonManagerName.IsNull() ) |
|
425 { |
|
426 tempServiceRecordPtrToNew->iConfigDaemonManagerName.SetL( |
|
427 origServiceRecord->iConfigDaemonManagerName ); |
|
428 } |
|
429 if ( !origServiceRecord->iConfigDaemonName.IsNull() ) |
|
430 { |
|
431 tempServiceRecordPtrToNew->iConfigDaemonName.SetL( |
|
432 origServiceRecord->iConfigDaemonName ); |
|
433 } |
|
434 if ( !origServiceRecord->iServiceExtensionTableName.IsNull() ) |
|
435 { |
|
436 tempServiceRecordPtrToNew->iServiceExtensionTableName.SetL( |
|
437 origServiceRecord->iServiceExtensionTableName ); |
|
438 } |
|
439 if ( !origServiceRecord->iServiceExtensionTableRecordId.IsNull() ) |
|
440 { |
|
441 tempServiceRecordPtrToNew->iServiceExtensionTableRecordId.SetL( |
|
442 origServiceRecord->iServiceExtensionTableRecordId ); |
|
443 } |
|
444 |
|
445 CleanupStack::Pop( serviceRecord ); |
336 |
446 |
337 OstTraceFunctionExit0( CCMPLUGINLAN_COPYSERVICERECORDL_EXIT ); |
447 OstTraceFunctionExit0( CCMPLUGINLAN_COPYSERVICERECORDL_EXIT ); |
338 |
|
339 return serviceRecord; |
448 return serviceRecord; |
340 } |
449 } |
341 |
450 |
342 // ---------------------------------------------------------------------------- |
451 // ---------------------------------------------------------------------------- |
343 // CCmPluginLan::UpdateServiceRecordL() |
452 // CCmPluginLan::UpdateServiceRecordL() |
344 // ---------------------------------------------------------------------------- |
453 // ---------------------------------------------------------------------------- |
345 // |
454 // |
346 void CCmPluginLan::UpdateServiceRecordL( |
455 void CCmPluginLan::UpdateServiceRecordL( |
347 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
456 RPointerArray<CommsDat::CCDRecordBase>& aGenRecordArray, |
348 RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ ) |
457 RPointerArray<CommsDat::CCDRecordBase>& /*aBearerSpecRecordArray*/ ) |
349 { |
458 { |
350 OstTraceFunctionEntry0( CCMPLUGINLAN_UPDATESERVICERECORDL_ENTRY ); |
459 OstTraceFunctionEntry0( CCMPLUGINLAN_UPDATESERVICERECORDL_ENTRY ); |
351 |
460 |
352 // Delete the original record and create a copy from the parameter |
461 // Delete the original record and create a copy from the client's copy. |
353 delete iServiceRecord; |
462 delete iServiceRecord; |
354 iServiceRecord = NULL; |
463 iServiceRecord = NULL; |
355 |
464 |
356 iServiceRecord = static_cast<CCDLANServiceRecord*> |
465 iServiceRecord = static_cast<CCDLANServiceRecord*>( |
357 (CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) ); |
466 CCDRecordBase::RecordFactoryL( KCDTIdLANServiceRecord ) ); |
358 |
467 |
359 // LAN Service copy does not work so we have to copy it manually |
468 CCDLANServiceRecord* origServiceRecord = static_cast<CCDLANServiceRecord*>( iServiceRecord ); |
360 |
469 |
361 CCDLANServiceRecord* lanServiceRecordTo = static_cast<CCDLANServiceRecord *>( iServiceRecord ); |
470 // Client's copy of lan service record. |
362 CCDLANServiceRecord* lanServiceRecordFrom = |
471 CCDLANServiceRecord* clientServiceRecordCopy = |
363 static_cast<CCDLANServiceRecord *>( aGenRecordArray[KServiceRecordIndex] ); |
472 static_cast<CCDLANServiceRecord*>( aGenRecordArray[KServiceRecordIndex] ); |
364 |
473 |
365 if( !lanServiceRecordFrom->iRecordName.IsNull() ) |
474 // LAN Service copy does not work so we have to copy it manually. |
366 { |
475 |
367 lanServiceRecordTo->iRecordName.SetL( lanServiceRecordFrom->iRecordName ); |
476 if ( !clientServiceRecordCopy->iRecordTag.IsNull() ) |
368 } |
477 { |
369 if( !lanServiceRecordFrom->iIfNetworks.IsNull() ) |
478 origServiceRecord->iRecordTag.SetL( clientServiceRecordCopy->iRecordTag ); |
370 { |
479 } |
371 lanServiceRecordTo->iIfNetworks.SetL( lanServiceRecordFrom->iIfNetworks ); |
480 if ( !clientServiceRecordCopy->iRecordName.IsNull() ) |
372 } |
481 { |
373 if( !lanServiceRecordFrom->iIpNetmask.IsNull() ) |
482 origServiceRecord->iRecordName.SetL( clientServiceRecordCopy->iRecordName ); |
374 { |
483 } |
375 lanServiceRecordTo->iIpNetmask.SetL( lanServiceRecordFrom->iIpNetmask ); |
484 if ( !clientServiceRecordCopy->iServiceEnableLlmnr.IsNull() ) |
376 } |
485 { |
377 if( !lanServiceRecordFrom->iIpGateway.IsNull() ) |
486 origServiceRecord->iServiceEnableLlmnr.SetL( clientServiceRecordCopy->iServiceEnableLlmnr ); |
378 { |
487 } |
379 lanServiceRecordTo->iIpGateway.SetL( lanServiceRecordFrom->iIpGateway ); |
488 if ( !clientServiceRecordCopy->iIfNetworks.IsNull() ) |
380 } |
489 { |
381 if( !lanServiceRecordFrom->iIpAddrFromServer.IsNull() ) |
490 origServiceRecord->iIfNetworks.SetL( clientServiceRecordCopy->iIfNetworks ); |
382 { |
491 } |
383 lanServiceRecordTo->iIpAddrFromServer.SetL( lanServiceRecordFrom->iIpAddrFromServer ); |
492 if ( !clientServiceRecordCopy->iIpNetmask.IsNull() ) |
384 } |
493 { |
385 if( !lanServiceRecordFrom->iIpAddr.IsNull() ) |
494 origServiceRecord->iIpNetmask.SetL( clientServiceRecordCopy->iIpNetmask ); |
386 { |
495 } |
387 lanServiceRecordTo->iIpAddr.SetL( lanServiceRecordFrom->iIpAddr ); |
496 if ( !clientServiceRecordCopy->iIpGateway.IsNull() ) |
388 } |
497 { |
389 if( !lanServiceRecordFrom->iIpDnsAddrFromServer.IsNull() ) |
498 origServiceRecord->iIpGateway.SetL( clientServiceRecordCopy->iIpGateway ); |
390 { |
499 } |
391 lanServiceRecordTo->iIpDnsAddrFromServer.SetL( lanServiceRecordFrom->iIpDnsAddrFromServer ); |
500 if ( !clientServiceRecordCopy->iIpAddrFromServer.IsNull() ) |
392 } |
501 { |
393 if( !lanServiceRecordFrom->iIpNameServer1.IsNull() ) |
502 origServiceRecord->iIpAddrFromServer.SetL( clientServiceRecordCopy->iIpAddrFromServer ); |
394 { |
503 } |
395 lanServiceRecordTo->iIpNameServer1.SetL( lanServiceRecordFrom->iIpNameServer1 ); |
504 if ( !clientServiceRecordCopy->iIpAddr.IsNull() ) |
396 } |
505 { |
397 if( !lanServiceRecordFrom->iIpNameServer2.IsNull() ) |
506 origServiceRecord->iIpAddr.SetL( clientServiceRecordCopy->iIpAddr ); |
398 { |
507 } |
399 lanServiceRecordTo->iIpNameServer2.SetL( lanServiceRecordFrom->iIpNameServer2 ); |
508 if ( !clientServiceRecordCopy->iIpDnsAddrFromServer.IsNull() ) |
400 } |
509 { |
401 if( !lanServiceRecordFrom->iIp6DnsAddrFromServer.IsNull() ) |
510 origServiceRecord->iIpDnsAddrFromServer.SetL( clientServiceRecordCopy->iIpDnsAddrFromServer ); |
402 { |
511 } |
403 lanServiceRecordTo->iIp6DnsAddrFromServer.SetL( lanServiceRecordFrom->iIp6DnsAddrFromServer ); |
512 if ( !clientServiceRecordCopy->iIpNameServer1.IsNull() ) |
404 } |
513 { |
405 if( !lanServiceRecordFrom->iIp6NameServer1.IsNull() ) |
514 origServiceRecord->iIpNameServer1.SetL( clientServiceRecordCopy->iIpNameServer1 ); |
406 { |
515 } |
407 lanServiceRecordTo->iIp6NameServer1.SetL( lanServiceRecordFrom->iIp6NameServer1 ); |
516 if ( !clientServiceRecordCopy->iIpNameServer2.IsNull() ) |
408 } |
517 { |
409 if( !lanServiceRecordFrom->iIp6NameServer2.IsNull() ) |
518 origServiceRecord->iIpNameServer2.SetL( clientServiceRecordCopy->iIpNameServer2 ); |
410 { |
519 } |
411 lanServiceRecordTo->iIp6NameServer2.SetL( lanServiceRecordFrom->iIp6NameServer2 ); |
520 if ( !clientServiceRecordCopy->iIp6DnsAddrFromServer.IsNull() ) |
412 } |
521 { |
413 if( !lanServiceRecordFrom->iIpAddrLeaseValidFrom.IsNull() ) |
522 origServiceRecord->iIp6DnsAddrFromServer.SetL( clientServiceRecordCopy->iIp6DnsAddrFromServer ); |
414 { |
523 } |
415 lanServiceRecordTo->iIpAddrLeaseValidFrom.SetL( lanServiceRecordFrom->iIpAddrLeaseValidFrom ); |
524 if ( !clientServiceRecordCopy->iIp6NameServer1.IsNull() ) |
416 } |
525 { |
417 if( !lanServiceRecordFrom->iIpAddrLeaseValidTo.IsNull() ) |
526 origServiceRecord->iIp6NameServer1.SetL( clientServiceRecordCopy->iIp6NameServer1 ); |
418 { |
527 } |
419 lanServiceRecordTo->iIpAddrLeaseValidTo.SetL( lanServiceRecordFrom->iIpAddrLeaseValidTo ); |
528 if ( !clientServiceRecordCopy->iIp6NameServer2.IsNull() ) |
420 } |
529 { |
421 if( !lanServiceRecordFrom->iConfigDaemonManagerName.IsNull() ) |
530 origServiceRecord->iIp6NameServer2.SetL( clientServiceRecordCopy->iIp6NameServer2 ); |
422 { |
531 } |
423 lanServiceRecordTo->iConfigDaemonManagerName.SetL( lanServiceRecordFrom->iConfigDaemonManagerName ); |
532 if ( !clientServiceRecordCopy->iIpAddrLeaseValidFrom.IsNull() ) |
424 } |
533 { |
425 if( !lanServiceRecordFrom->iConfigDaemonName.IsNull() ) |
534 origServiceRecord->iIpAddrLeaseValidFrom.SetL( clientServiceRecordCopy->iIpAddrLeaseValidFrom ); |
426 { |
535 } |
427 lanServiceRecordTo->iConfigDaemonName.SetL( lanServiceRecordFrom->iConfigDaemonName ); |
536 if ( !clientServiceRecordCopy->iIpAddrLeaseValidTo.IsNull() ) |
428 } |
537 { |
429 |
538 origServiceRecord->iIpAddrLeaseValidTo.SetL( clientServiceRecordCopy->iIpAddrLeaseValidTo ); |
430 lanServiceRecordTo->SetElementId( lanServiceRecordFrom->ElementId() ); |
539 } |
431 |
540 if ( !clientServiceRecordCopy->iConfigDaemonManagerName.IsNull() ) |
432 if ( !ServiceRecord().RecordId() ) |
541 { |
433 { |
542 origServiceRecord->iConfigDaemonManagerName.SetL( clientServiceRecordCopy->iConfigDaemonManagerName ); |
434 ServiceRecord().SetRecordId( KCDNewRecordRequest ); |
543 } |
435 ServiceRecord().StoreL( iSession ); |
544 if ( !clientServiceRecordCopy->iConfigDaemonName.IsNull() ) |
436 |
545 { |
437 // Update needed values to record tables too( lanservice and wlanservice ) |
546 origServiceRecord->iConfigDaemonName.SetL( clientServiceRecordCopy->iConfigDaemonName ); |
438 lanServiceRecordFrom->SetElementId( ServiceRecord().ElementId() ); |
547 } |
|
548 if ( !clientServiceRecordCopy->iServiceExtensionTableName.IsNull() ) |
|
549 { |
|
550 origServiceRecord->iServiceExtensionTableName.SetL( clientServiceRecordCopy->iServiceExtensionTableName ); |
|
551 } |
|
552 if ( !clientServiceRecordCopy->iServiceExtensionTableRecordId.IsNull() ) |
|
553 { |
|
554 origServiceRecord->iServiceExtensionTableRecordId.SetL( clientServiceRecordCopy->iServiceExtensionTableRecordId ); //TODO, check this works ok. |
|
555 } |
|
556 |
|
557 origServiceRecord->SetElementId( clientServiceRecordCopy->ElementId() ); |
|
558 |
|
559 if ( !origServiceRecord->RecordId() ) |
|
560 { |
|
561 origServiceRecord->SetRecordId( KCDNewRecordRequest ); |
|
562 origServiceRecord->StoreL( iSession ); |
|
563 |
|
564 // Update received element ID to client's copy too. |
|
565 clientServiceRecordCopy->SetElementId( origServiceRecord->ElementId() ); |
439 } |
566 } |
440 else |
567 else |
441 { |
568 { |
442 ServiceRecord().ModifyL( iSession ); |
569 origServiceRecord->ModifyL( iSession ); |
443 } |
570 } |
444 |
571 |
445 OstTraceFunctionExit0( CCMPLUGINLAN_UPDATESERVICERECORDL_EXIT ); |
572 OstTraceFunctionExit0( CCMPLUGINLAN_UPDATESERVICERECORDL_EXIT ); |
446 } |
573 } |
447 |
574 |
806 switch ( aAttribute ) |
945 switch ( aAttribute ) |
807 { |
946 { |
808 case ECmIFNetworks: |
947 case ECmIFNetworks: |
809 case ELanIfNetworks: |
948 case ELanIfNetworks: |
810 { |
949 { |
811 if ( !serviceRecord->iIfNetworks.IsNull() ) |
950 retVal = TPtrC( serviceRecord->iIfNetworks ).AllocL(); |
812 { |
|
813 retVal = TPtrC( serviceRecord->iIfNetworks ).AllocL(); |
|
814 } |
|
815 } |
951 } |
816 break; |
952 break; |
817 case ECmIPNetmask: |
953 case ECmIPNetmask: |
818 case ELanIpNetMask: |
954 case ELanIpNetMask: |
819 { |
955 { |
820 if ( !serviceRecord->iIpNetmask.IsNull() ) |
956 retVal = TPtrC( serviceRecord->iIpNetmask ).AllocL(); |
821 { |
|
822 retVal = TPtrC( serviceRecord->iIpNetmask ).AllocL(); |
|
823 } |
|
824 } |
957 } |
825 break; |
958 break; |
826 case ECmIPGateway: |
959 case ECmIPGateway: |
827 case ELanIpGateway: |
960 case ELanIpGateway: |
828 { |
961 { |
829 if ( !serviceRecord->iIpGateway.IsNull() ) |
962 retVal = TPtrC( serviceRecord->iIpGateway ).AllocL(); |
830 { |
|
831 retVal = TPtrC( serviceRecord->iIpGateway ).AllocL(); |
|
832 } |
|
833 } |
963 } |
834 break; |
964 break; |
835 case ECmIPAddress: |
965 case ECmIPAddress: |
836 case ELanIpAddr: |
966 case ELanIpAddr: |
837 { |
967 { |
838 if ( !serviceRecord->iIpAddr.IsNull() ) |
968 retVal = TPtrC( serviceRecord->iIpAddr ).AllocL(); |
839 { |
|
840 retVal = TPtrC( serviceRecord->iIpAddr ).AllocL(); |
|
841 } |
|
842 } |
969 } |
843 break; |
970 break; |
844 case ECmIPNameServer1: |
971 case ECmIPNameServer1: |
845 case ELanIpNameServer1: |
972 case ELanIpNameServer1: |
846 { |
973 { |
847 if ( !serviceRecord->iIpNameServer1.IsNull() ) |
974 retVal = TPtrC( serviceRecord->iIpNameServer1 ).AllocL(); |
848 { |
|
849 retVal = TPtrC( serviceRecord->iIpNameServer1 ).AllocL(); |
|
850 } |
|
851 } |
975 } |
852 break; |
976 break; |
853 case ECmIPNameServer2: |
977 case ECmIPNameServer2: |
854 case ELanIpNameServer2: |
978 case ELanIpNameServer2: |
855 { |
979 { |
856 if ( !serviceRecord->iIpNameServer2.IsNull() ) |
980 retVal = TPtrC( serviceRecord->iIpNameServer2 ).AllocL(); |
857 { |
|
858 retVal = TPtrC( serviceRecord->iIpNameServer2 ).AllocL(); |
|
859 } |
|
860 } |
981 } |
861 break; |
982 break; |
862 case ECmIP6NameServer1: |
983 case ECmIP6NameServer1: |
863 case ELanIp6NameServer1: |
984 case ELanIp6NameServer1: |
864 { |
985 { |
865 if ( !serviceRecord->iIp6NameServer1.IsNull() ) |
986 retVal = TPtrC( serviceRecord->iIp6NameServer1 ).AllocL(); |
866 { |
|
867 retVal = TPtrC( serviceRecord->iIp6NameServer1 ).AllocL(); |
|
868 } |
|
869 } |
987 } |
870 break; |
988 break; |
871 case ECmIP6NameServer2: |
989 case ECmIP6NameServer2: |
872 case ELanIp6NameServer2: |
990 case ELanIp6NameServer2: |
873 { |
991 { |
874 if ( !serviceRecord->iIp6NameServer2.IsNull() ) |
992 retVal = TPtrC( serviceRecord->iIp6NameServer2 ).AllocL(); |
875 { |
|
876 retVal = TPtrC( serviceRecord->iIp6NameServer2 ).AllocL(); |
|
877 } |
|
878 } |
993 } |
879 break; |
994 break; |
880 case ECmIPAddrLeaseValidFrom: |
995 case ECmIPAddrLeaseValidFrom: |
881 case ELanIpAddrLeaseValidFrom: |
996 case ELanIpAddrLeaseValidFrom: |
882 { |
997 { |
883 if ( !serviceRecord->iIpAddrLeaseValidFrom.IsNull() ) |
998 retVal = TPtrC( serviceRecord->iIpAddrLeaseValidFrom ).AllocL(); |
884 { |
|
885 retVal = TPtrC( serviceRecord->iIpAddrLeaseValidFrom ).AllocL(); |
|
886 } |
|
887 } |
999 } |
888 break; |
1000 break; |
889 case ECmIPAddrLeaseValidTo: |
1001 case ECmIPAddrLeaseValidTo: |
890 case ELanIpAddrLeaseValidTo: |
1002 case ELanIpAddrLeaseValidTo: |
891 { |
1003 { |
892 if ( !serviceRecord->iIpAddrLeaseValidTo.IsNull() ) |
1004 retVal = TPtrC( serviceRecord->iIpAddrLeaseValidTo ).AllocL(); |
893 { |
|
894 retVal = TPtrC( serviceRecord->iIpAddrLeaseValidTo ).AllocL(); |
|
895 } |
|
896 } |
1005 } |
897 break; |
1006 break; |
898 case ECmConfigDaemonManagerName: |
1007 case ECmConfigDaemonManagerName: |
899 case ELanConfigDaemonManagerName: |
1008 case ELanConfigDaemonManagerName: |
900 { |
1009 { |
901 if ( !serviceRecord->iConfigDaemonManagerName.IsNull() ) |
1010 retVal = TPtrC( serviceRecord->iConfigDaemonManagerName ).AllocL(); |
902 { |
|
903 retVal = TPtrC( serviceRecord->iConfigDaemonManagerName ).AllocL(); |
|
904 } |
|
905 } |
1011 } |
906 break; |
1012 break; |
907 case ECmConfigDaemonName: |
1013 case ECmConfigDaemonName: |
908 case ELanConfigDaemonName: |
1014 case ELanConfigDaemonName: |
909 { |
1015 { |
910 if ( !serviceRecord->iConfigDaemonName.IsNull() ) |
1016 retVal = TPtrC( serviceRecord->iConfigDaemonName ).AllocL(); |
911 { |
|
912 retVal = TPtrC( serviceRecord->iConfigDaemonName ).AllocL(); |
|
913 } |
|
914 } |
1017 } |
915 break; |
1018 break; |
916 case ELanServiceExtensionTableName: |
1019 case ELanServiceExtensionTableName: |
917 { |
1020 { |
918 if ( !serviceRecord->iServiceExtensionTableName.IsNull() ) |
1021 retVal = TPtrC( serviceRecord->iServiceExtensionTableName ).AllocL(); |
919 { |
|
920 retVal = TPtrC( serviceRecord->iServiceExtensionTableName ).AllocL(); |
|
921 } |
|
922 } |
1022 } |
923 break; |
1023 break; |
924 default: |
1024 default: |
925 { |
1025 { |
926 User::Leave( KErrNotSupported ); |
1026 User::Leave( KErrNotSupported ); |