XDMSettingsUI/src/XDMPluginSLContainer.cpp
branchRCL_3
changeset 18 52d91a16fec3
parent 11 b4758b4b2d20
child 25 e53c01f160bc
equal deleted inserted replaced
14:de84881f4ac3 18:52d91a16fec3
     1 /*
     1 /*
     2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   448     CleanupStack::PopAndDestroy(1); //newXDMsetMenuList
   448     CleanupStack::PopAndDestroy(1); //newXDMsetMenuList
   449     return EFalse;      
   449     return EFalse;      
   450     }
   450     }
   451     
   451     
   452 // ---------------------------------------------------------------------------
   452 // ---------------------------------------------------------------------------
       
   453 // CXDMPluginSLContainer::IsAccessPointInUseL(TDesC& aXDMSetName)
       
   454 // ---------------------------------------------------------------------------
       
   455 //
       
   456 TBool CXDMPluginSLContainer::SettingsApInUseL(TDesC& aXDMSetName)
       
   457     {
       
   458     TBool inUse( EFalse );   
       
   459     TLex16 myLex;
       
   460     iData->Reset();
       
   461      
       
   462     iData->iSettingName = aXDMSetName;
       
   463     AknTextUtils::ConvertDigitsTo(iData->iSettingName, EDigitTypeWestern );    
       
   464     iData->iSettingId = GetSettingIdL(iData->iSettingName);
       
   465        
       
   466     CXdmSettingsCollection* xDMSet = NULL;
       
   467        
       
   468     // read the source setting
       
   469     xDMSet = TXdmSettingsApi::SettingsCollectionL(iData->iSettingId);
       
   470     CleanupStack::PushL(xDMSet);
       
   471     iData->iAccessPointDes = xDMSet->Property(EXdmPropToNapId);
       
   472     myLex.Assign(iData->iAccessPointDes);
       
   473     myLex.Val(iData->iAccessPoint);
       
   474     CleanupStack::PopAndDestroy(xDMSet);
       
   475     
       
   476     inUse = iSettingList->IsAccessPointInUseL( iData->iAccessPoint );
       
   477     iData->Reset();
       
   478 	
       
   479     return inUse;
       
   480     }
       
   481 
       
   482 // ---------------------------------------------------------------------------
   453 // CXDMPluginSLContainer::SetTitlePaneTextL( const TDesC& aTitleText ) const
   483 // CXDMPluginSLContainer::SetTitlePaneTextL( const TDesC& aTitleText ) const
   454 // ---------------------------------------------------------------------------
   484 // ---------------------------------------------------------------------------
   455 //
   485 //
   456 void CXDMPluginSLContainer::SetTitlePaneTextL( const TDesC& aTitleText ) const
   486 void CXDMPluginSLContainer::SetTitlePaneTextL( const TDesC& aTitleText ) const
   457     {
   487     {
   474     if ( (iData->iAccessPoint > -1) && ((iData->iServerAddress)!=KNullDesC) && 
   504     if ( (iData->iAccessPoint > -1) && ((iData->iServerAddress)!=KNullDesC) && 
   475         ((iData->iUserID)!=KNullDesC) )
   505         ((iData->iUserID)!=KNullDesC) )
   476         {
   506         {
   477         return ETrue;
   507         return ETrue;
   478         }
   508         }
       
   509     
   479     return EFalse;   
   510     return EFalse;   
   480     }
   511     }
   481     
   512     
   482 // ---------------------------------------------------------------------------
   513 // ---------------------------------------------------------------------------
   483 // CXDMPluginSLContainer::DisplayDeleteOrDontSaveDialog()
   514 // CXDMPluginSLContainer::DisplayDeleteOrDontSaveDialog()