cmmanager/cmmgr/cmmplugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp
changeset 53 4af712113915
parent 46 95d45f234cf3
child 61 8b0c979bbe8c
equal deleted inserted replaced
47:cb7afde124a3 53:4af712113915
   293 
   293 
   294     iBearerType = KUidPacketDataBearerType;
   294     iBearerType = KUidPacketDataBearerType;
   295     iBearerRecordId = 0;
   295     iBearerRecordId = 0;
   296     iBearerRecordName = NULL;
   296     iBearerRecordName = NULL;
   297     iPacketDataQoSRecord = NULL;
   297     iPacketDataQoSRecord = NULL;
       
   298     iBearerPriorityTableId = 0;
   298 
   299 
   299     OstTraceFunctionExit0( DUP1_CCMPLUGINPACKETDATA_CCMPLUGINPACKETDATA_EXIT );
   300     OstTraceFunctionExit0( DUP1_CCMPLUGINPACKETDATA_CCMPLUGINPACKETDATA_EXIT );
   300     }
   301     }
   301 
   302 
   302 // ----------------------------------------------------------------------------
   303 // ----------------------------------------------------------------------------
   811     CCDWCDMAPacketServiceRecord* origServiceRecord =
   812     CCDWCDMAPacketServiceRecord* origServiceRecord =
   812             static_cast<CCDWCDMAPacketServiceRecord*>( iServiceRecord );
   813             static_cast<CCDWCDMAPacketServiceRecord*>( iServiceRecord );
   813 
   814 
   814     // Client's copy of packet service record.
   815     // Client's copy of packet service record.
   815     CCDWCDMAPacketServiceRecord* clientServiceRecordCopy =
   816     CCDWCDMAPacketServiceRecord* clientServiceRecordCopy =
   816             static_cast<CCDWCDMAPacketServiceRecord*>( aGenRecordArray[KServiceRecordIndex] );
   817             static_cast<CCDWCDMAPacketServiceRecord*>(
   817 
   818                     aGenRecordArray[KServiceRecordIndex] );
   818     if ( !clientServiceRecordCopy->iRecordTag.IsNull() )
   819 
   819         {
   820     CopyRecordFieldsL( *clientServiceRecordCopy, *origServiceRecord );
   820         origServiceRecord->iRecordTag.SetL(
       
   821                 clientServiceRecordCopy->iRecordTag );
       
   822         }
       
   823     if ( !clientServiceRecordCopy->iRecordName.IsNull() )
       
   824         {
       
   825         origServiceRecord->iRecordName.SetL(
       
   826                 clientServiceRecordCopy->iRecordName );
       
   827         }
       
   828 
       
   829     if ( !clientServiceRecordCopy->iServiceEnableLlmnr.IsNull() )
       
   830         {
       
   831         origServiceRecord->iServiceEnableLlmnr.SetL(
       
   832                 clientServiceRecordCopy->iServiceEnableLlmnr );
       
   833         }
       
   834 
       
   835     if ( !clientServiceRecordCopy->iGPRSAPN.IsNull() )
       
   836         {
       
   837         origServiceRecord->iGPRSAPN.SetL(
       
   838                 clientServiceRecordCopy->iGPRSAPN );
       
   839         }
       
   840     if ( !clientServiceRecordCopy->iGPRSPDPType.IsNull() )
       
   841         {
       
   842         origServiceRecord->iGPRSPDPType.SetL(
       
   843                 clientServiceRecordCopy->iGPRSPDPType );
       
   844         }
       
   845     if ( !clientServiceRecordCopy->iGPRSPDPAddress.IsNull() )
       
   846         {
       
   847         origServiceRecord->iGPRSPDPAddress.SetL(
       
   848                 clientServiceRecordCopy->iGPRSPDPAddress );
       
   849         }
       
   850     if ( !clientServiceRecordCopy->iGPRSReqPrecedence.IsNull() )
       
   851         {
       
   852         origServiceRecord->iGPRSReqPrecedence.SetL(
       
   853                 clientServiceRecordCopy->iGPRSReqPrecedence );
       
   854         }
       
   855     if ( !clientServiceRecordCopy->iGPRSReqDelay.IsNull() )
       
   856         {
       
   857         origServiceRecord->iGPRSReqDelay.SetL(
       
   858                 clientServiceRecordCopy->iGPRSReqDelay );
       
   859         }
       
   860     if ( !clientServiceRecordCopy->iGPRSReqReliability.IsNull() )
       
   861         {
       
   862         origServiceRecord->iGPRSReqReliability.SetL(
       
   863                 clientServiceRecordCopy->iGPRSReqReliability );
       
   864         }
       
   865     if ( !clientServiceRecordCopy->iGPRSReqPeakThroughput.IsNull() )
       
   866         {
       
   867         origServiceRecord->iGPRSReqPeakThroughput.SetL(
       
   868                 clientServiceRecordCopy->iGPRSReqPeakThroughput );
       
   869         }
       
   870     if ( !clientServiceRecordCopy->iGPRSReqMeanThroughput.IsNull() )
       
   871         {
       
   872         origServiceRecord->iGPRSReqMeanThroughput.SetL(
       
   873                 clientServiceRecordCopy->iGPRSReqMeanThroughput );
       
   874         }
       
   875     if ( !clientServiceRecordCopy->iGPRSMinPrecedence.IsNull() )
       
   876         {
       
   877         origServiceRecord->iGPRSMinPrecedence.SetL(
       
   878                 clientServiceRecordCopy->iGPRSMinPrecedence );
       
   879         }
       
   880     if ( !clientServiceRecordCopy->iGPRSMinDelay.IsNull() )
       
   881         {
       
   882         origServiceRecord->iGPRSMinDelay.SetL(
       
   883                 clientServiceRecordCopy->iGPRSMinDelay );
       
   884         }
       
   885     if ( !clientServiceRecordCopy->iGPRSMinReliability.IsNull() )
       
   886         {
       
   887         origServiceRecord->iGPRSMinReliability.SetL(
       
   888                 clientServiceRecordCopy->iGPRSMinReliability );
       
   889         }
       
   890     if ( !clientServiceRecordCopy->iGPRSMinPeakThroughput.IsNull() )
       
   891         {
       
   892         origServiceRecord->iGPRSMinPeakThroughput.SetL(
       
   893                 clientServiceRecordCopy->iGPRSMinPeakThroughput );
       
   894         }
       
   895     if ( !clientServiceRecordCopy->iGPRSMinMeanThroughput.IsNull() )
       
   896         {
       
   897         origServiceRecord->iGPRSMinMeanThroughput.SetL(
       
   898                 clientServiceRecordCopy->iGPRSMinMeanThroughput );
       
   899         }
       
   900     if ( !clientServiceRecordCopy->iGPRSDataCompression.IsNull() )
       
   901         {
       
   902         origServiceRecord->iGPRSDataCompression.SetL(
       
   903                 clientServiceRecordCopy->iGPRSDataCompression );
       
   904         }
       
   905     if ( !clientServiceRecordCopy->iGPRSHeaderCompression.IsNull() )
       
   906         {
       
   907         origServiceRecord->iGPRSHeaderCompression.SetL(
       
   908                 clientServiceRecordCopy->iGPRSHeaderCompression );
       
   909         }
       
   910     if ( !clientServiceRecordCopy->iGPRSUseEdge.IsNull() )
       
   911         {
       
   912         origServiceRecord->iGPRSUseEdge.SetL(
       
   913                 clientServiceRecordCopy->iGPRSUseEdge );
       
   914         }
       
   915     if ( !clientServiceRecordCopy->iGPRSAnonymousAccess.IsNull() )
       
   916         {
       
   917         origServiceRecord->iGPRSAnonymousAccess.SetL(
       
   918                 clientServiceRecordCopy->iGPRSAnonymousAccess );
       
   919         }
       
   920     if ( !clientServiceRecordCopy->iGPRSIfParams.IsNull() )
       
   921         {
       
   922         origServiceRecord->iGPRSIfParams.SetL(
       
   923                 clientServiceRecordCopy->iGPRSIfParams );
       
   924         }
       
   925     if ( !clientServiceRecordCopy->iGPRSIfNetworks.IsNull() )
       
   926         {
       
   927         origServiceRecord->iGPRSIfNetworks.SetL(
       
   928                 clientServiceRecordCopy->iGPRSIfNetworks );
       
   929         }
       
   930     if ( !clientServiceRecordCopy->iGPRSIfPromptForAuth.IsNull() )
       
   931         {
       
   932         origServiceRecord->iGPRSIfPromptForAuth.SetL(
       
   933                 clientServiceRecordCopy->iGPRSIfPromptForAuth );
       
   934         }
       
   935     if ( !clientServiceRecordCopy->iGPRSIfAuthName.IsNull() )
       
   936         {
       
   937         origServiceRecord->iGPRSIfAuthName.SetL(
       
   938                 clientServiceRecordCopy->iGPRSIfAuthName );
       
   939         }
       
   940     if ( !clientServiceRecordCopy->iGPRSIfAuthPass.IsNull() )
       
   941         {
       
   942         origServiceRecord->iGPRSIfAuthPass.SetL(
       
   943                 clientServiceRecordCopy->iGPRSIfAuthPass );
       
   944         }
       
   945     if ( !clientServiceRecordCopy->iGPRSIfAuthRetries.IsNull() )
       
   946         {
       
   947         origServiceRecord->iGPRSIfAuthRetries.SetL(
       
   948                 clientServiceRecordCopy->iGPRSIfAuthRetries );
       
   949         }
       
   950     if ( !clientServiceRecordCopy->iGPRSIPNetMask.IsNull() )
       
   951         {
       
   952         origServiceRecord->iGPRSIPNetMask.SetL(
       
   953                 clientServiceRecordCopy->iGPRSIPNetMask );
       
   954         }
       
   955     if ( !clientServiceRecordCopy->iGPRSIPGateway.IsNull() )
       
   956         {
       
   957         origServiceRecord->iGPRSIPGateway.SetL(
       
   958                 clientServiceRecordCopy->iGPRSIPGateway );
       
   959         }
       
   960     if ( !clientServiceRecordCopy->iGPRSIPAddrFromServer.IsNull() )
       
   961         {
       
   962         origServiceRecord->iGPRSIPAddrFromServer.SetL(
       
   963                 clientServiceRecordCopy->iGPRSIPAddrFromServer );
       
   964         }
       
   965     if ( !clientServiceRecordCopy->iGPRSIPAddr.IsNull() )
       
   966         {
       
   967         origServiceRecord->iGPRSIPAddr.SetL(
       
   968                 clientServiceRecordCopy->iGPRSIPAddr );
       
   969         }
       
   970     if ( !clientServiceRecordCopy->iGPRSIPDNSAddrFromServer.IsNull() )
       
   971         {
       
   972         origServiceRecord->iGPRSIPDNSAddrFromServer.SetL(
       
   973                 clientServiceRecordCopy->iGPRSIPDNSAddrFromServer );
       
   974         }
       
   975     if ( !clientServiceRecordCopy->iGPRSIPNameServer1.IsNull() )
       
   976         {
       
   977         origServiceRecord->iGPRSIPNameServer1.SetL(
       
   978                 clientServiceRecordCopy->iGPRSIPNameServer1 );
       
   979         }
       
   980     if ( !clientServiceRecordCopy->iGPRSIPNameServer2.IsNull() )
       
   981         {
       
   982         origServiceRecord->iGPRSIPNameServer2.SetL(
       
   983                 clientServiceRecordCopy->iGPRSIPNameServer2 );
       
   984         }
       
   985     if ( !clientServiceRecordCopy->iGPRSIP6DNSAddrFromServer.IsNull() )
       
   986         {
       
   987         origServiceRecord->iGPRSIP6DNSAddrFromServer.SetL(
       
   988                 clientServiceRecordCopy->iGPRSIP6DNSAddrFromServer );
       
   989         }
       
   990     if ( !clientServiceRecordCopy->iGPRSIP6NameServer1.IsNull() )
       
   991         {
       
   992         origServiceRecord->iGPRSIP6NameServer1.SetL(
       
   993                 clientServiceRecordCopy->iGPRSIP6NameServer1 );
       
   994         }
       
   995     if ( !clientServiceRecordCopy->iGPRSIP6NameServer2.IsNull() )
       
   996         {
       
   997         origServiceRecord->iGPRSIP6NameServer2.SetL(
       
   998                 clientServiceRecordCopy->iGPRSIP6NameServer2 );
       
   999         }
       
  1000     if ( !clientServiceRecordCopy->iGPRSIPAddrLeaseValidFrom.IsNull() )
       
  1001         {
       
  1002         origServiceRecord->iGPRSIPAddrLeaseValidFrom.SetL(
       
  1003                 clientServiceRecordCopy->iGPRSIPAddrLeaseValidFrom );
       
  1004         }
       
  1005     if ( !clientServiceRecordCopy->iGPRSIPAddrLeaseValidTo.IsNull() )
       
  1006         {
       
  1007         origServiceRecord->iGPRSIPAddrLeaseValidTo.SetL(
       
  1008                 clientServiceRecordCopy->iGPRSIPAddrLeaseValidTo );
       
  1009         }
       
  1010     if ( !clientServiceRecordCopy->iGPRSConfigDaemonManagerName.IsNull() )
       
  1011         {
       
  1012         origServiceRecord->iGPRSConfigDaemonManagerName.SetL(
       
  1013                 clientServiceRecordCopy->iGPRSConfigDaemonManagerName );
       
  1014         }
       
  1015     if ( !clientServiceRecordCopy->iGPRSConfigDaemonName.IsNull() )
       
  1016         {
       
  1017         origServiceRecord->iGPRSConfigDaemonName.SetL(
       
  1018                 clientServiceRecordCopy->iGPRSConfigDaemonName );
       
  1019         }
       
  1020     if ( !clientServiceRecordCopy->iGPRSEnableLCPExtension.IsNull() )
       
  1021         {
       
  1022         origServiceRecord->iGPRSEnableLCPExtension.SetL(
       
  1023                 clientServiceRecordCopy->iGPRSEnableLCPExtension );
       
  1024         }
       
  1025     if ( !clientServiceRecordCopy->iGPRSDisablePlainTextAuth.IsNull() )
       
  1026         {
       
  1027         origServiceRecord->iGPRSDisablePlainTextAuth.SetL(
       
  1028                 clientServiceRecordCopy->iGPRSDisablePlainTextAuth );
       
  1029         }
       
  1030     if ( !clientServiceRecordCopy->iGPRSAPType.IsNull() )
       
  1031         {
       
  1032         origServiceRecord->iGPRSAPType.SetL(
       
  1033                 clientServiceRecordCopy->iGPRSAPType );
       
  1034         }
       
  1035     if ( !clientServiceRecordCopy->iGPRSQOSWarningTimeOut.IsNull() )
       
  1036         {
       
  1037         origServiceRecord->iGPRSQOSWarningTimeOut.SetL(
       
  1038                 clientServiceRecordCopy->iGPRSQOSWarningTimeOut );
       
  1039         }
       
  1040     if ( !clientServiceRecordCopy->iGPRSR5DataCompression.IsNull() )
       
  1041         {
       
  1042         origServiceRecord->iGPRSR5DataCompression.SetL(
       
  1043                 clientServiceRecordCopy->iGPRSR5DataCompression );
       
  1044         }
       
  1045     if ( !clientServiceRecordCopy->iGPRSR5HeaderCompression.IsNull() )
       
  1046         {
       
  1047         origServiceRecord->iGPRSR5HeaderCompression.SetL(
       
  1048                 clientServiceRecordCopy->iGPRSR5HeaderCompression );
       
  1049         }
       
  1050     if ( !clientServiceRecordCopy->iGPRSPacketFlowIdentifier.IsNull() )
       
  1051         {
       
  1052         origServiceRecord->iGPRSPacketFlowIdentifier.SetL(
       
  1053                 clientServiceRecordCopy->iGPRSPacketFlowIdentifier );
       
  1054         }
       
  1055     if ( !clientServiceRecordCopy->iGPRSUmtsGprsRelease.IsNull() )
       
  1056         {
       
  1057         origServiceRecord->iGPRSUmtsGprsRelease.SetL(
       
  1058                 clientServiceRecordCopy->iGPRSUmtsGprsRelease );
       
  1059         }
       
  1060 
   821 
  1061     if ( iPacketDataQoSRecord )
   822     if ( iPacketDataQoSRecord )
  1062         {
   823         {
  1063         origServiceRecord->iUmtsR99QoSAndOnTable = iPacketDataQoSRecord->RecordId();
   824         origServiceRecord->iUmtsR99QoSAndOnTable = iPacketDataQoSRecord->RecordId();
  1064         }
   825         }
  1067 
   828 
  1068     if ( !origServiceRecord->RecordId() )
   829     if ( !origServiceRecord->RecordId() )
  1069         {
   830         {
  1070         origServiceRecord->SetRecordId( KCDNewRecordRequest );
   831         origServiceRecord->SetRecordId( KCDNewRecordRequest );
  1071         origServiceRecord->StoreL( iSession );
   832         origServiceRecord->StoreL( iSession );
       
   833         // Have to be "reloaded" to get possible default values from template records.
       
   834         origServiceRecord->LoadL( iSession );
  1072 
   835 
  1073         // Update received element ID to client's copy too.
   836         // Update received element ID to client's copy too.
  1074         clientServiceRecordCopy->SetElementId( origServiceRecord->ElementId() );
   837         clientServiceRecordCopy->SetElementId( origServiceRecord->ElementId() );
  1075         }
   838         }
  1076     else
   839     else
  1077         {
   840         {
  1078         origServiceRecord->ModifyL( iSession );
   841         origServiceRecord->ModifyL( iSession );
  1079         }
   842         }
       
   843 
       
   844     CopyRecordFieldsL( *origServiceRecord, *clientServiceRecordCopy );
  1080 
   845 
  1081     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_UPDATESERVICERECORDL_EXIT );
   846     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_UPDATESERVICERECORDL_EXIT );
  1082     }
   847     }
  1083 
   848 
  1084 // ---------------------------------------------------------------------------
   849 // ---------------------------------------------------------------------------
  1103 
   868 
  1104     if ( !iPacketDataQoSRecord->RecordId() )
   869     if ( !iPacketDataQoSRecord->RecordId() )
  1105         {
   870         {
  1106         iPacketDataQoSRecord->SetRecordId( KCDNewRecordRequest );
   871         iPacketDataQoSRecord->SetRecordId( KCDNewRecordRequest );
  1107         iPacketDataQoSRecord->StoreL( iSession );
   872         iPacketDataQoSRecord->StoreL( iSession );
       
   873         iPacketDataQoSRecord->LoadL( iSession );
  1108         packetDataQoSRecord->SetElementId( iPacketDataQoSRecord->ElementId() );
   874         packetDataQoSRecord->SetElementId( iPacketDataQoSRecord->ElementId() );
  1109 
   875 
  1110         // Set service record to point to QoS record.
   876         // Set service record to point to QoS record.
  1111         ServiceRecord().iUmtsR99QoSAndOnTable = iPacketDataQoSRecord->RecordId();
   877         ServiceRecord().iUmtsR99QoSAndOnTable = iPacketDataQoSRecord->RecordId();
  1112         ServiceRecord().ModifyL( iSession );
   878         ServiceRecord().ModifyL( iSession );
  1117         }
   883         }
  1118     else
   884     else
  1119         {
   885         {
  1120         iPacketDataQoSRecord->ModifyL( iSession );
   886         iPacketDataQoSRecord->ModifyL( iSession );
  1121         }
   887         }
       
   888 
       
   889     CopyRecordFieldsL( *iPacketDataQoSRecord, *packetDataQoSRecord );
  1122 
   890 
  1123     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_UPDATEBEARERRECORDSL_EXIT );
   891     OstTraceFunctionExit0( CCMPLUGINPACKETDATA_UPDATEBEARERRECORDSL_EXIT );
  1124     }
   892     }
  1125 
   893 
  1126 // ---------------------------------------------------------------------------
   894 // ---------------------------------------------------------------------------