--- a/emailservices/nmailagent/inc/nmmailagent.h Thu May 27 12:43:55 2010 +0300
+++ b/emailservices/nmailagent/inc/nmmailagent.h Fri Jun 11 13:27:14 2010 +0300
@@ -23,6 +23,8 @@
class NmMailbox;
class NmDataPluginFactory;
class NmDataPluginInterface;
+class HbIndicator;
+class XQSystemToneService;
class NmMailboxInfo
{
@@ -41,6 +43,7 @@
QList<NmId> mUnreadMailIdList;
int mOutboxMails;
bool mActive;
+ QDateTime mLastSeenTime;
NmMailboxInfo();
};
@@ -66,7 +69,7 @@
NmMessageEvent event,
const NmId &folderId,
const QList<NmId> &messageIds,
- const NmId& mailboxId);
+ const NmId &mailboxId);
void handleSyncStateEvent(
NmSyncState state,
@@ -77,6 +80,8 @@
void delayedStart();
void enableAlertTone();
+
+ void indicatorActivated(const QString &type, const QVariantMap &data);
private:
@@ -84,10 +89,18 @@
bool updateUnreadCount(const NmId &mailboxId, NmMailboxInfo &mailboxInfo);
- int getOutboxCount(const NmId& mailboxId);
+ int getOutboxCount(const NmId &mailboxId);
+
+ NmMailboxInfo *getMailboxByType(const QString &type);
- int getIndicatorIndex();
+ int getFreeIndicatorIndex();
+
+ int getTotalUnreadCount() const;
+ bool updateUnreadIndicator();
+
+ bool updateUnreadIndicator(bool active);
+
bool updateIndicator(bool active,
const NmMailboxInfo& mailboxInfo);
@@ -108,14 +121,21 @@
bool getMessageUnreadInfo(const NmId &folderId,
const NmId &messageId, const NmId &mailboxId, bool &unreadMessage);
- void playAlertTone();
+ bool playAlertTone();
+
+ void updateSendIndicator();
+
+ bool launchMailbox(quint64 mailboxId);
private: // data
+ HbIndicator *mIndicator;
+ XQSystemToneService *mSystemTone;
NmDataPluginFactory *mPluginFactory;
QList<NmMailboxInfo*> mMailboxes;
- bool mSendingState;
bool mAlertToneAllowed;
+ int mLastOutboxCount;
+ bool mUnreadIndicatorActive;
};