78 void handleConnectionEvent(NmConnectState state, const NmId mailboxId, int errorcode); |
81 void handleConnectionEvent(NmConnectState state, const NmId mailboxId, int errorcode); |
79 |
82 |
80 void delayedStart(); |
83 void delayedStart(); |
81 |
84 |
82 void enableAlertTone(); |
85 void enableAlertTone(); |
83 |
86 |
84 void indicatorActivated(const QString &type, const QVariantMap &data); |
87 void indicatorActivated(const QString &type, const QVariantMap &data); |
85 |
88 |
86 private: |
89 private: |
87 |
90 |
88 void initMailboxStatus(); |
91 void initMailboxStatus(); |
92 int getOutboxCount(const NmId &mailboxId); |
95 int getOutboxCount(const NmId &mailboxId); |
93 |
96 |
94 NmMailboxInfo *getMailboxByType(const QString &type); |
97 NmMailboxInfo *getMailboxByType(const QString &type); |
95 |
98 |
96 int getFreeIndicatorIndex(); |
99 int getFreeIndicatorIndex(); |
97 |
100 |
98 int getTotalUnreadCount() const; |
101 int getTotalUnreadCount() const; |
99 |
102 |
100 bool updateUnreadIndicator(); |
103 bool updateUnreadIndicator(); |
101 |
104 |
102 bool updateUnreadIndicator(bool active); |
105 bool updateUnreadIndicator(bool active); |
103 |
106 |
104 bool updateIndicator(bool active, |
107 bool updateIndicator(bool active, |
105 const NmMailboxInfo& mailboxInfo); |
108 const NmMailboxInfo& mailboxInfo); |
106 |
109 |
107 NmMailboxInfo* getMailboxInfo(const NmId &id); |
110 NmMailboxInfo *getMailboxInfo(const NmId &id); |
108 |
111 |
109 NmMailboxInfo* createMailboxInfo(const NmId &id); |
112 NmMailboxInfo *createMailboxInfo(const NmId &id); |
110 |
113 |
111 NmMailboxInfo* createMailboxInfo(const NmMailbox &mailbox, |
114 NmMailboxInfo *createMailboxInfo(const NmMailbox &mailbox, |
112 NmDataPluginInterface *plugin); |
115 NmDataPluginInterface *plugin); |
113 |
116 |
114 bool removeMailboxInfo(const NmId &id); |
117 bool removeMailboxInfo(const NmId &id); |
115 |
118 |
116 bool updateMailboxState(const NmId &mailboxId, |
119 bool updateMailboxState(const NmId &mailboxId, |
123 |
126 |
124 bool playAlertTone(); |
127 bool playAlertTone(); |
125 |
128 |
126 void updateSendIndicator(); |
129 void updateSendIndicator(); |
127 |
130 |
|
131 void storeMailboxActive(const NmId &mailboxId, bool active); |
|
132 |
|
133 bool isMailboxActive(const NmId &mailboxId); |
|
134 |
|
135 void deleteStoredMailboxActivity(const NmId &mailboxId); |
|
136 |
128 bool launchMailbox(quint64 mailboxId); |
137 bool launchMailbox(quint64 mailboxId); |
129 |
138 |
130 private: // data |
139 private: // data |
131 |
140 |
132 HbIndicator *mIndicator; |
141 HbIndicator *mIndicator; |
133 XQSystemToneService *mSystemTone; |
142 XQSystemToneService *mSystemTone; |
134 NmDataPluginFactory *mPluginFactory; |
143 NmDataPluginFactory *mPluginFactory; |
135 QList<NmMailboxInfo*> mMailboxes; |
144 QList<NmMailboxInfo*> mMailboxes; |
|
145 CHWRMVibra *mVibra; // Owned |
136 bool mAlertToneAllowed; |
146 bool mAlertToneAllowed; |
137 int mLastOutboxCount; |
147 int mLastOutboxCount; |
138 bool mUnreadIndicatorActive; |
148 bool mUnreadIndicatorActive; |
139 }; |
149 }; |
140 |
150 |