richcallsettingsengine/rcse2/src/rcsedbimporter.cpp
branchRCL_3
changeset 15 43658d24f35d
parent 0 a4daefaec16c
equal deleted inserted replaced
14:be41ab7b952f 15:43658d24f35d
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-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".
   826 //
   826 //
   827 void CRCSEDbImporter::GetProfileIdsFromDescriptorL(
   827 void CRCSEDbImporter::GetProfileIdsFromDescriptorL(
   828     const TDesC& aNumbers,
   828     const TDesC& aNumbers,
   829     RArray<TSettingIds>& aArray )
   829     RArray<TSettingIds>& aArray )
   830     {
   830     {
       
   831     CleanupClosePushL( aArray );
       
   832     
   831     TLex lex( aNumbers );
   833     TLex lex( aNumbers );
   832     
   834     
   833     TSettingIds value;
   835     TSettingIds value;
   834     
   836     
   835     // Reset original array
   837     // Reset original array
   851             {
   853             {
   852             // Go over the space character.
   854             // Go over the space character.
   853             lex.Inc( 1 );
   855             lex.Inc( 1 );
   854             }
   856             }
   855         } 
   857         } 
       
   858     
       
   859     CleanupStack::Pop( &aArray );
   856     }
   860     }
   857 
   861 
   858 
   862 
   859 // -----------------------------------------------------------------------------
   863 // -----------------------------------------------------------------------------
   860 // Read IDs from given descriptor to array.
   864 // Read IDs from given descriptor to array.
   863 template<class T>
   867 template<class T>
   864 void CRCSEDbImporter::GetNumbersFromDescriptorL(
   868 void CRCSEDbImporter::GetNumbersFromDescriptorL(
   865     const TDesC& aNumbers,
   869     const TDesC& aNumbers,
   866     RArray<T>& aArray )
   870     RArray<T>& aArray )
   867     {
   871     {
       
   872     CleanupClosePushL( aArray );
   868     TLex lex( aNumbers );
   873     TLex lex( aNumbers );
   869 
   874 
   870     // Reset original array
   875     // Reset original array
   871     aArray.Reset();
   876     aArray.Reset();
   872     
   877     
   882         if ( !lex.Eos() ) // Check that End of string is not next char.
   887         if ( !lex.Eos() ) // Check that End of string is not next char.
   883             {
   888             {
   884             // Go over the space character.
   889             // Go over the space character.
   885             lex.Inc( 1 );
   890             lex.Inc( 1 );
   886             }
   891             }
   887         } 
   892         }
       
   893     
       
   894     CleanupStack::Pop( &aArray );
   888     }
   895     }
   889 
   896 
   890 
   897 
   891 // -----------------------------------------------------------------------------
   898 // -----------------------------------------------------------------------------
   892 // Update new preferred audio codec IDs to imported VoIP profiles.
   899 // Update new preferred audio codec IDs to imported VoIP profiles.