ipsservices/ipssosplugin/src/ipsplgmsgiterator.cpp
branchRCL_3
changeset 25 3533d4323edc
parent 24 d189ee25cf9d
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
   223     FUNC_LOG;
   223     FUNC_LOG;
   224     TBool result = EFalse;
   224     TBool result = EFalse;
   225     TInt status;
   225     TInt status;
   226     TInt baseIndex;
   226     TInt baseIndex;
   227     
   227     
   228     // Messages are sorted always before reading the messages 
   228     if ( !iMessages )
   229     Sort();
   229         {
   230 
   230         // Messages are sorted before first reading the messages 
   231     CMsvEntrySelection* messages = FilterMessagesL();
   231         Sort();
   232     CleanupStack::PushL( messages );
   232         iMessages = FilterMessagesL();
       
   233         }
   233 
   234 
   234     status = SearchL( iMessages, aStartWith, baseIndex );
   235     status = SearchL( iMessages, aStartWith, baseIndex );
   235     
   236     
   236     if (  status == KErrNone ) 
   237     if (  status == KErrNone ) 
   237         {
   238         {
   264         	(( entry.iMtm != KSenduiMtmImap4Uid )  || !entry.DeletedIMAP4Flag() ) &&
   265         	(( entry.iMtm != KSenduiMtmImap4Uid )  || !entry.DeletedIMAP4Flag() ) &&
   265         	 ( entry.iType == KUidMsvMessageEntry ) )
   266         	 ( entry.iType == KUidMsvMessageEntry ) )
   266             {
   267             {
   267             fsMsg = iMsgMapper->GetMailMessageL( iMailboxId, entry, 
   268             fsMsg = iMsgMapper->GetMailMessageL( iMailboxId, entry, 
   268                 iRequestedDetails );
   269                 iRequestedDetails );
   269             aMessages.AppendL( fsMsg );
   270             aMessages.Append( fsMsg );
   270             counter++;
   271             counter++;
   271             }
   272             }
   272         i++;
   273         i++;
   273         }
   274         }
   274     
   275     
   304         	(( entry.iMtm != KSenduiMtmImap4Uid )  || !entry.DeletedIMAP4Flag() ) &&	
   305         	(( entry.iMtm != KSenduiMtmImap4Uid )  || !entry.DeletedIMAP4Flag() ) &&	
   305    	 		 ( entry.iType == KUidMsvMessageEntry ) )
   306    	 		 ( entry.iType == KUidMsvMessageEntry ) )
   306             {
   307             {
   307             fsMsg = iMsgMapper->GetMailMessageL( iMailboxId, entry, 
   308             fsMsg = iMsgMapper->GetMailMessageL( iMailboxId, entry, 
   308                 iRequestedDetails );
   309                 iRequestedDetails );
   309             aMessages.InsertL( fsMsg, 0 );
   310             aMessages.Insert( fsMsg, 0 );
   310             counter++;
   311             counter++;
   311             }
   312             }
   312         i--;
   313         i--;
   313         }
   314         }
   314     
   315