messagingappbase/ncnlist/src/NcnOutboxObserver.cpp
branchRCL_3
changeset 21 c6838af47512
parent 0 72b543305e3a
child 22 52d61119153d
--- a/messagingappbase/ncnlist/src/NcnOutboxObserver.cpp	Mon Mar 15 12:40:06 2010 +0200
+++ b/messagingappbase/ncnlist/src/NcnOutboxObserver.cpp	Wed Mar 31 21:25:02 2010 +0300
@@ -33,7 +33,9 @@
 #include    "NcnModelBase.h"
 #include    "CNcnMsvSessionHandler.h"
 #include    "CNcnMobileSignalStrengthHandler.h"
+#include <MIUTSET.H>
 
+const TUid KUidMsgTypeCmailMtmVal = {0x2001F406};
 // ================= MEMBER FUNCTIONS =======================
 
 // ---------------------------------------------------------
@@ -117,6 +119,30 @@
     // Check messagecount in outbox
     TInt msgCount = iOutboxFolder->Count();
     
+    CMsvEntrySelection *smtpselection = NULL ;
+    CMsvEntrySelection *pop3selection = NULL;
+    CMsvEntrySelection *imapselection = NULL ;
+    CMsvEntrySelection *cmailselection = NULL ;
+
+    smtpselection = iOutboxFolder ->ChildrenWithMtmL( KUidMsgTypeSMTP );
+    CleanupStack::PushL( smtpselection );
+    TInt smtpCount= smtpselection ->Count();
+    
+    pop3selection = iOutboxFolder ->ChildrenWithMtmL( KUidMsgTypePOP3 );
+    CleanupStack::PushL( pop3selection );    
+    TInt pop3Count= pop3selection ->Count();
+
+    imapselection = iOutboxFolder ->ChildrenWithMtmL( KUidMsgTypeIMAP4 );
+    CleanupStack::PushL( imapselection );
+    TInt imapCount= imapselection ->Count();
+    
+    cmailselection = iOutboxFolder ->ChildrenWithMtmL( KUidMsgTypeCmailMtmVal);
+    CleanupStack::PushL( cmailselection );
+    TInt cmailCount= cmailselection ->Count();
+    
+    CleanupStack::Pop( 4 );
+    // Check messagecount in outbox
+    msgCount  = msgCount - (smtpCount+pop3Count+ imapCount+cmailCount);
     // Set msg count to the CR key
     NCN_RDEBUG_INT( _L("CNcnOutboxObserver::CheckOutboxAndNotifyL SetCRInt(KNcnMessageCountInOutbox) %d" ), msgCount );
     User::LeaveIfError( iModel->SetCRInt(