richcallsettingsengine/rcse2/src/crcseprofileregistry.cpp
branchRCL_3
changeset 15 43658d24f35d
parent 12 876a3df1f464
equal deleted inserted replaced
14:be41ab7b952f 15:43658d24f35d
     1 /*
     1 /*
     2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002-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".
    28 #include <featmgr.h>
    28 #include <featmgr.h>
    29 
    29 
    30 #include <cenrepdatabaseutil.h>
    30 #include <cenrepdatabaseutil.h>
    31 #include <cenrepdatabaseproperty.h>
    31 #include <cenrepdatabaseproperty.h>
    32 
    32 
       
    33 #include <mmf/common/mmfcontrollerpluginresolver.h>
       
    34 
    33 #include "crcseprofileregistry.h"
    35 #include "crcseprofileregistry.h"
    34 #include "crcseprofileentry.h"
    36 #include "crcseprofileentry.h"
    35 #include "crcseaudiocodecregistry.h"
    37 #include "crcseaudiocodecregistry.h"
    36 #include "rcsepanic.h"
    38 #include "rcsepanic.h"
    37 #include "rcseconstants.h"
    39 #include "rcseconstants.h"
   349 EXPORT_C void CRCSEProfileRegistry::FindByServiceIdL( TUint32 aServiceId, 
   351 EXPORT_C void CRCSEProfileRegistry::FindByServiceIdL( TUint32 aServiceId, 
   350     RPointerArray<CRCSEProfileEntry>& aFoundEntries )
   352     RPointerArray<CRCSEProfileEntry>& aFoundEntries )
   351     {
   353     {
   352     RCSELOGSTRING( "CRCSEProfileRegistry::FindByServiceIdL() - IN" );
   354     RCSELOGSTRING( "CRCSEProfileRegistry::FindByServiceIdL() - IN" );
   353 
   355 
       
   356     CleanupResetAndDestroyPushL( aFoundEntries );
       
   357     
   354     BeginL();
   358     BeginL();
   355 
   359 
   356     TBuf<KDesLength128> des;
   360     TBuf<KDesLength128> des;
   357 
   361 
   358     RArray<TUint32> entryIds;
   362     RArray<TUint32> entryIds;
   391         {
   395         {
   392         UpdateSIPProfileLinksL( *aFoundEntries[k] );
   396         UpdateSIPProfileLinksL( *aFoundEntries[k] );
   393         }
   397         }
   394 
   398 
   395     EndL();
   399     EndL();
       
   400     
       
   401     CleanupStack::Pop( &aFoundEntries );
   396 
   402 
   397     RCSELOGSTRING( "CRCSEProfileRegistry::FindByServiceIdL() - OUT" );
   403     RCSELOGSTRING( "CRCSEProfileRegistry::FindByServiceIdL() - OUT" );
   398     }
   404     }
   399 
   405 
   400 
   406 
   405 //
   411 //
   406 EXPORT_C void CRCSEProfileRegistry::FindBySIPProfileIdL( TUint32 aSipProfileId, 
   412 EXPORT_C void CRCSEProfileRegistry::FindBySIPProfileIdL( TUint32 aSipProfileId, 
   407     RPointerArray<CRCSEProfileEntry>& aFoundEntries )
   413     RPointerArray<CRCSEProfileEntry>& aFoundEntries )
   408     {
   414     {
   409     RCSELOGSTRING( "CRCSEProfileRegistry::FindBySIPProfileIdL() - IN" );
   415     RCSELOGSTRING( "CRCSEProfileRegistry::FindBySIPProfileIdL() - IN" );
       
   416     
       
   417     CleanupResetAndDestroyPushL( aFoundEntries );
   410 
   418 
   411     BeginL();
   419     BeginL();
   412 
   420 
   413     // Find all profile IDs
   421     // Find all profile IDs
   414     RArray<TUint32> voipIds;
   422     RArray<TUint32> voipIds;
   472         UpdateSIPProfileLinksL( *aFoundEntries[k] );
   480         UpdateSIPProfileLinksL( *aFoundEntries[k] );
   473         }
   481         }
   474 
   482 
   475     CleanupStack::PopAndDestroy( &voipIds );
   483     CleanupStack::PopAndDestroy( &voipIds );
   476     EndL();
   484     EndL();
       
   485     
       
   486     CleanupStack::Pop( &aFoundEntries );
   477 
   487 
   478     RCSELOGSTRING( "CRCSEProfileRegistry::FindBySIPProfileIdL() - OUT" );
   488     RCSELOGSTRING( "CRCSEProfileRegistry::FindBySIPProfileIdL() - OUT" );
   479     }
   489     }
   480 
   490 
   481 // ---------------------------------------------------------------------------
   491 // ---------------------------------------------------------------------------
  1146 // -----------------------------------------------------------------------------
  1156 // -----------------------------------------------------------------------------
  1147 //
  1157 //
  1148 void CRCSEProfileRegistry::ExtractProtocoIdsL( 
  1158 void CRCSEProfileRegistry::ExtractProtocoIdsL( 
  1149     const TDesC& aDes, RArray<TSettingIds>& aArray )
  1159     const TDesC& aDes, RArray<TSettingIds>& aArray )
  1150     {
  1160     {
       
  1161     CleanupClosePushL( aArray );
       
  1162     
  1151     TLex lex( aDes );
  1163     TLex lex( aDes );
  1152     
  1164     
  1153     TSettingIds value;
  1165     TSettingIds value;
  1154     
  1166     
  1155     // Reset original array
  1167     // Reset original array
  1170         if ( !lex.Eos() ) // Check that End of string is not next char.
  1182         if ( !lex.Eos() ) // Check that End of string is not next char.
  1171             {
  1183             {
  1172             // Go over the space character.
  1184             // Go over the space character.
  1173             lex.Inc( 1 );
  1185             lex.Inc( 1 );
  1174             }
  1186             }
  1175         } 
  1187         }
       
  1188     
       
  1189     CleanupStack::Pop( &aArray );
  1176     }
  1190     }
  1177 
  1191 
  1178 // -----------------------------------------------------------------------------
  1192 // -----------------------------------------------------------------------------
  1179 // CRCSEProfileRegistry::UpdateSIPProfileLinksL
  1193 // CRCSEProfileRegistry::UpdateSIPProfileLinksL
  1180 // Validates profile's SIP profile IDs and updates if necessary
  1194 // Validates profile's SIP profile IDs and updates if necessary