ipsservices/ipssossettings/src/ipssetdata.cpp
branchRCL_3
changeset 16 4ce476e64c59
parent 8 e1b6206813b4
child 29 6b8f3b30d0ec
equal deleted inserted replaced
13:0396474f30f5 16:4ce476e64c59
   521     TImIAPChoice ret;
   521     TImIAPChoice ret;
   522     ret.iDialogPref = ECommDbDialogPrefPrompt;
   522     ret.iDialogPref = ECommDbDialogPrefPrompt;
   523     ret.iIAP = 0;
   523     ret.iIAP = 0;
   524     if ( aIncoming )
   524     if ( aIncoming )
   525         {
   525         {
   526         
   526 		if (iIncomingIapPref->SNAPDefined())
       
   527 			{
       
   528 			ret.iIAP = iIncomingIapPref->SNAPPreference();
       
   529 			}
       
   530 			
   527         if ( iIncomingIapPref->NumberOfIAPs() > 0 )
   531         if ( iIncomingIapPref->NumberOfIAPs() > 0 )
   528             {
   532             {
   529             ret = iIncomingIapPref->IAPPreference(0);
   533             ret = iIncomingIapPref->IAPPreference(0);
   530             }
   534             }
   531         }
   535         }
   914 
   918 
   915     iIncomingIapPref = CImIAPPreferences::NewLC();
   919     iIncomingIapPref = CImIAPPreferences::NewLC();
   916     CleanupStack::Pop( iIncomingIapPref );
   920     CleanupStack::Pop( iIncomingIapPref );
   917     iOutgoingIapPref = CImIAPPreferences::NewLC();
   921     iOutgoingIapPref = CImIAPPreferences::NewLC();
   918     CleanupStack::Pop( iOutgoingIapPref );
   922     CleanupStack::Pop( iOutgoingIapPref );
   919 
       
   920     iIncomingIapPref->AddIAPL( aIncomingIap );
   923     iIncomingIapPref->AddIAPL( aIncomingIap );
   921     iOutgoingIapPref->AddIAPL( aOutgoingIap );
   924     iOutgoingIapPref->AddIAPL( aOutgoingIap );
   922     }
   925     }
       
   926 // ---------------------------------------------------------------------------
       
   927 // CIpsSetData::SetIapL()
       
   928 // ---------------------------------------------------------------------------
       
   929 //
       
   930 void CIpsSetData::SetIapL( 
       
   931     const CImIAPPreferences& aIncomingIap, 
       
   932     const CImIAPPreferences& aOutgoingIap )
       
   933     {
       
   934     FUNC_LOG;
       
   935     // This is not ideal choice, but current situation forces to do this,
       
   936     // until Reset() funcion is exported from class CImIAPPreferences
       
   937     delete iIncomingIapPref;
       
   938     iIncomingIapPref = NULL;
       
   939     delete iOutgoingIapPref;
       
   940     iOutgoingIapPref = NULL;
       
   941 
       
   942     iIncomingIapPref = CImIAPPreferences::NewLC();
       
   943     CleanupStack::Pop( iIncomingIapPref );
       
   944     iOutgoingIapPref = CImIAPPreferences::NewLC();
       
   945     CleanupStack::Pop( iOutgoingIapPref );
       
   946         
       
   947     if (aIncomingIap.SNAPDefined())
       
   948     	{
       
   949 		iIncomingIapPref->SetSNAPL(aIncomingIap.SNAPPreference());
       
   950     	}
       
   951     else
       
   952     	{
       
   953     	iIncomingIapPref->AddIAPL( aIncomingIap.IAPPreference(0) );
       
   954     	}
       
   955         
       
   956     if (aOutgoingIap.SNAPDefined())
       
   957       	{
       
   958     	iOutgoingIapPref->SetSNAPL(aOutgoingIap.SNAPPreference());
       
   959        	}
       
   960     else
       
   961     	{
       
   962     	iOutgoingIapPref->AddIAPL( aOutgoingIap.IAPPreference(0) );
       
   963     	}
       
   964     
       
   965     }
       
   966 
   923 
   967 
   924 // ---------------------------------------------------------------------------
   968 // ---------------------------------------------------------------------------
   925 // CIpsSetData::SetSecurity()
   969 // CIpsSetData::SetSecurity()
   926 // ---------------------------------------------------------------------------
   970 // ---------------------------------------------------------------------------
   927 //
   971 //