mmsengine/clientmtm/src/mmsnotificationclient.cpp
changeset 23 238255e8b033
parent 0 72b543305e3a
child 47 5b14749788d7
child 60 7fdbb852d323
equal deleted inserted replaced
5:4697dfb2d7ad 23:238255e8b033
   358         return;
   358         return;
   359         }
   359         }
   360     CMsvEntry* clientEntry = Session().GetEntryL( aNotifications.At( 0 ));
   360     CMsvEntry* clientEntry = Session().GetEntryL( aNotifications.At( 0 ));
   361     CleanupStack::PushL( clientEntry );
   361     CleanupStack::PushL( clientEntry );
   362 
   362 
   363     for ( TInt i = aNotifications.Count() - 1 ; i >= 0 ; i-- ) 
   363     for ( TInt i = aNotifications.Count() - 1 ; i >= 0 ; --i ) 
   364         {
   364         {
   365         TBool drop = EFalse;
   365         TBool drop = EFalse;
   366         TBool alreadyMarked = EFalse;
   366         TBool alreadyMarked = EFalse;
   367 
   367 
   368         clientEntry->SetEntryL( aNotifications.At( i ) );
   368         clientEntry->SetEntryL( aNotifications.At( i ) );
   539         }
   539         }
   540 
   540 
   541     CMmsHeaders* mmsHeaders = CMmsHeaders::NewL( iMmsSettings->MmsVersion() );
   541     CMmsHeaders* mmsHeaders = CMmsHeaders::NewL( iMmsSettings->MmsVersion() );
   542     CleanupStack::PushL( mmsHeaders );
   542     CleanupStack::PushL( mmsHeaders );
   543      
   543      
   544     for ( TInt i = count; i > 0 && ( aDuplicate == KMsvNullIndexEntryId ); i-- )
   544     for ( TInt i = count; i > 0 && ( aDuplicate == KMsvNullIndexEntryId ); --i )
   545         {
   545         {
   546         cEntry->SetEntryL( selection->At( i - 1 ) );
   546         cEntry->SetEntryL( selection->At( i - 1 ) );
   547                    
   547                    
   548         CMsvStore* store = cEntry->ReadStoreL();
   548         CMsvStore* store = cEntry->ReadStoreL();
   549         CleanupStack::PushL( store );
   549         CleanupStack::PushL( store );
   666     CleanupStack::PushL( notifications );
   666     CleanupStack::PushL( notifications );
   667    
   667    
   668     // Loop through the notifications and reserve them for the operation
   668     // Loop through the notifications and reserve them for the operation
   669     TInt retval = KErrNone;
   669     TInt retval = KErrNone;
   670     TInt count = notifications->Count();
   670     TInt count = notifications->Count();
   671     for ( TInt i = count; i > 0; i-- ) 
   671     for ( TInt i = count; i > 0; --i ) 
   672         {
   672         {
   673         retval = ReserveNotificationOperationL( notifications->At( i - 1 ), KMmsOperationFetch );
   673         retval = ReserveNotificationOperationL( notifications->At( i - 1 ), KMmsOperationFetch );
   674         if( retval != KErrNone )
   674         if( retval != KErrNone )
   675             {
   675             {
   676             // Remove the entry from selection
   676             // Remove the entry from selection
   769     // Modifying indexentries
   769     // Modifying indexentries
   770     //
   770     //
   771     CMsvEntry* cEntry = NULL;
   771     CMsvEntry* cEntry = NULL;
   772     cEntry = Session().GetEntryL( aSelection.At( 0 ) );
   772     cEntry = Session().GetEntryL( aSelection.At( 0 ) );
   773     CleanupStack::PushL( cEntry ); // ***
   773     CleanupStack::PushL( cEntry ); // ***
   774     for ( TInt i = 0; i < aSelection.Count(); i++ ) 
   774     for ( TInt i = 0; i < aSelection.Count(); ++i ) 
   775         {
   775         {
   776         cEntry->SetEntryL( aSelection.At( i ) );
   776         cEntry->SetEntryL( aSelection.At( i ) );
   777         TMsvEntry tEntry = cEntry->Entry();
   777         TMsvEntry tEntry = cEntry->Entry();
   778         tEntry.SetReadOnly( EFalse );
   778         tEntry.SetReadOnly( EFalse );
   779         cEntry->ChangeL( tEntry );
   779         cEntry->ChangeL( tEntry );
   883     {
   883     {
   884     //
   884     //
   885     // Loop through the selection of forward entries
   885     // Loop through the selection of forward entries
   886     //
   886     //
   887     TInt count = aSelection.Count();
   887     TInt count = aSelection.Count();
   888     for( TInt index = 0; index < count; index++ )
   888     for( TInt index = 0; index < count; ++index )
   889         {
   889         {
   890         iMsvEntry->SetEntryL( aSelection.At( index ) );
   890         iMsvEntry->SetEntryL( aSelection.At( index ) );
   891         TMsvEntry tEntry = iMsvEntry->Entry();
   891         TMsvEntry tEntry = iMsvEntry->Entry();
   892         // Test entry type
   892         // Test entry type
   893         if( tEntry.iType != KUidMsvMessageEntry ||
   893         if( tEntry.iType != KUidMsvMessageEntry ||