mmsengine/mmsserversettings/src/mmsmessagestoreutils.cpp
branchRCL_3
changeset 27 7fdbb852d323
parent 26 ebe688cedc25
equal deleted inserted replaced
26:ebe688cedc25 27:7fdbb852d323
   113 
   113 
   114     //
   114     //
   115     // Concentrate on service entries
   115     // Concentrate on service entries
   116     //
   116     //
   117     TMsvEntry tEntry;
   117     TMsvEntry tEntry;
   118     for( TInt index = count-1; index >= 0; --index )
   118     for( TInt index = count-1; index >= 0; index-- )
   119         {
   119         {
   120         iMmsEntry->SetEntryL( selection->At( index ) );
   120         iMmsEntry->SetEntryL( selection->At( index ) );
   121         tEntry = iMmsEntry->Entry();
   121         tEntry = iMmsEntry->Entry();
   122         if( tEntry.iType != KUidMsvServiceEntry )
   122         if( tEntry.iType != KUidMsvServiceEntry )
   123             {
   123             {
   142         iParentEntry->CreateL( tEntry );
   142         iParentEntry->CreateL( tEntry );
   143         id = tEntry.Id();        
   143         id = tEntry.Id();        
   144         } 
   144         } 
   145     else // At least one service found
   145     else // At least one service found
   146         {
   146         {
   147         for( TInt index = 1; index < count; ++index )
   147         for( TInt index = 1; index < count; index++ )
   148             {
   148             {
   149             // More than 1 service found -> delete them
   149             // More than 1 service found -> delete them
   150             // The error must be ignored because there is nothing we can do
   150             // The error must be ignored because there is nothing we can do
   151             // if we can't delete the extra services
   151             // if we can't delete the extra services
   152 #ifdef _DEBUG
   152 #ifdef _DEBUG
   187 
   187 
   188     //
   188     //
   189     // Concentrate on folders that have name 'aFolderName'
   189     // Concentrate on folders that have name 'aFolderName'
   190     //
   190     //
   191     TMsvEntry tEntry;
   191     TMsvEntry tEntry;
   192     for( TInt index = count-1; index >= 0; --index )
   192     for( TInt index = count-1; index >= 0; index-- )
   193         {
   193         {
   194         iMmsEntry->SetEntryL( selection->At( index ) );
   194         iMmsEntry->SetEntryL( selection->At( index ) );
   195         tEntry = iMmsEntry->Entry();
   195         tEntry = iMmsEntry->Entry();
   196         if( tEntry.iDetails.Compare( aFolderName ) != 0 )
   196         if( tEntry.iDetails.Compare( aFolderName ) != 0 )
   197             {
   197             {
   290     CMsvEntrySelection* selection = iMmsEntry->ChildrenWithTypeL( KUidMsvFolderEntry );
   290     CMsvEntrySelection* selection = iMmsEntry->ChildrenWithTypeL( KUidMsvFolderEntry );
   291     CleanupStack::PushL( selection );
   291     CleanupStack::PushL( selection );
   292 
   292 
   293     // If selection contains folders, check if the folder is found.
   293     // If selection contains folders, check if the folder is found.
   294     TInt count = selection->Count();
   294     TInt count = selection->Count();
   295     for ( TInt i = 0; i < count && folderId == KMsvNullIndexEntryId; ++i )
   295     for ( TInt i = 0; i < count && folderId == KMsvNullIndexEntryId; i++ )
   296         {
   296         {
   297         iMmsEntry->SetEntryL( selection->At( i ) );
   297         iMmsEntry->SetEntryL( selection->At( i ) );
   298         // must be exact match
   298         // must be exact match
   299         if ( iMmsEntry->Entry().iDetails.Compare( aFolderName ) == 0 )
   299         if ( iMmsEntry->Entry().iDetails.Compare( aFolderName ) == 0 )
   300             {
   300             {