cmmanager/cmmgr/Framework/Src/cmdestinationimpl.cpp
branchRCL_3
changeset 24 c45d4fe2ff0a
parent 1 40cb640ef159
equal deleted inserted replaced
19:22c3c67e5001 24:c45d4fe2ff0a
  1063     CCmPluginBase* connMethod = new (ELeave) 
  1063     CCmPluginBase* connMethod = new (ELeave) 
  1064                             CCmPluginBase(aConnectionMethod.Plugin());
  1064                             CCmPluginBase(aConnectionMethod.Plugin());
  1065     CleanupStack::PushL( connMethod );// 2           
  1065     CleanupStack::PushL( connMethod );// 2           
  1066     connMethod->IncrementRefCounter();    
  1066     connMethod->IncrementRefCounter();    
  1067     item->iPlugin = connMethod;
  1067     item->iPlugin = connMethod;
  1068         
  1068 
  1069     CleanupStack::PushL( item->iPlugin ); // 3         
       
  1070     // create the new record
  1069     // create the new record
  1071     item->iDNRecord = iCmMgr.SNAPRecordL( 0 );
  1070     item->iDNRecord = iCmMgr.SNAPRecordL( 0 );
  1072 
  1071 
  1073     CleanupStack::PushL( item->iDNRecord ); // 4
  1072     CleanupStack::PushL( item->iDNRecord ); // 3
  1074     
  1073     
  1075     // if the destination is protection level 1, the connection method must be protected
  1074     // if the destination is protection level 1, the connection method must be protected
  1076     if ( ProtectionLevel() == EProtLevel1 )
  1075     if ( ProtectionLevel() == EProtLevel1 )
  1077         {
  1076         {
  1078         item->iPlugin->SetBoolAttributeL( ECmProtected, ETrue );
  1077         item->iPlugin->SetBoolAttributeL( ECmProtected, ETrue );
  1079         }
  1078         }
  1080     
  1079     
  1081     TInt index = AddToArrayL( item );
  1080     TInt index = AddToArrayL( item );
  1082     index = index - KCmInitIndex; //the array contains one initial item, so subtract KCmInitIndex from the index to get cm index!
  1081     index = index - KCmInitIndex; //the array contains one initial item, so subtract KCmInitIndex from the index to get cm index!
  1083     
  1082     
  1084     CleanupStack::Pop( 4, item ); // item, connMethod, iDNRecord, iPlugin
  1083     CleanupStack::Pop( 3, item ); // item, connMethod, iDNRecord
  1085     
  1084     
  1086     return index;
  1085     return index;
  1087     }
  1086     }
  1088 
  1087 
  1089 // -----------------------------------------------------------------------------
  1088 // -----------------------------------------------------------------------------