emailservices/nmailagent/inc/nmmailagent.h
changeset 23 2dc6caa42ec3
parent 20 ecc8def7944a
child 27 9ba4404ef423
--- a/emailservices/nmailagent/inc/nmmailagent.h	Mon May 03 12:23:15 2010 +0300
+++ b/emailservices/nmailagent/inc/nmmailagent.h	Fri May 14 15:41:10 2010 +0300
@@ -30,6 +30,7 @@
     NmId mId;
     int mIndicatorIndex;
     QString mName;
+    QString mIconName;
     NmId mInboxFolderId;
     NmId mOutboxFolderId;
     NmSyncState mSyncState;
@@ -37,7 +38,7 @@
     int mInboxCreatedMessages;
     int mInboxChangedMessages;
     int mInboxDeletedMessages;
-    int mUnreadMails;
+    QList<NmId> mUnreadMailIdList;
     int mOutboxMails;
     bool mActive;
 
@@ -74,19 +75,19 @@
     void handleConnectionEvent(NmConnectState state, const NmId mailboxId);
 
     void delayedStart();
+    
+    void enableAlertTone();
 
 private:
 
     void initMailboxStatus();
 
-    int getUnreadCount(const NmId& mailboxId, int maxCount);
+    bool updateUnreadCount(const NmId &mailboxId, NmMailboxInfo &mailboxInfo);
 
     int getOutboxCount(const NmId& mailboxId);
 
     int getIndicatorIndex();
 
-    bool isMailboxActive(const NmMailboxInfo& mailboxInfo);
-
     bool updateIndicator(bool active,
         const NmMailboxInfo& mailboxInfo);
 
@@ -103,12 +104,18 @@
         bool active, bool refreshAlways);
 
     static QStringList pluginFolders();
-
+    
+    bool getMessageUnreadInfo(const NmId &folderId, 
+        const NmId &messageId, const NmId &mailboxId, bool &unreadMessage);
+    
+    void playAlertTone();
+    
 private: // data
 
     NmDataPluginFactory *mPluginFactory;
     QList<NmMailboxInfo*> mMailboxes;
     bool mSendingState;
+    bool mAlertToneAllowed;
 };