equal
deleted
inserted
replaced
25 #include <QString> |
25 #include <QString> |
26 #include <w32std.h> |
26 #include <w32std.h> |
27 #include <apgtask.h> |
27 #include <apgtask.h> |
28 #include <XQSettingsManager> |
28 #include <XQSettingsManager> |
29 #include <xqpublishandsubscribeutils.h> |
29 #include <xqpublishandsubscribeutils.h> |
|
30 #include <xqsystemtoneservice.h> |
30 |
31 |
31 //USER INCLUDES |
32 //USER INCLUDES |
32 #include "msgnotifier.h" |
33 #include "msgnotifier.h" |
33 #include "msgnotifier_p.h" |
34 #include "msgnotifier_p.h" |
34 #include "s60qconversions.h" |
35 #include <xqconversions.h> |
35 #include "msgstorehandler.h" |
36 #include "msgstorehandler.h" |
36 #include "msginfodefs.h" |
37 #include "msginfodefs.h" |
37 #include "conversationidpsconsts.h" |
38 #include "conversationidpsconsts.h" |
38 #include "debugtraces.h" |
39 #include "debugtraces.h" |
39 |
40 |
78 if(mSettingsManager) |
79 if(mSettingsManager) |
79 { |
80 { |
80 delete mSettingsManager; |
81 delete mSettingsManager; |
81 } |
82 } |
82 |
83 |
|
84 if(mSts) |
|
85 { |
|
86 delete mSts; |
|
87 mSts = NULL; |
|
88 } |
|
89 |
83 QDEBUG_WRITE("MsgNotifierPrivate::~MsgNotifierPrivate : Exit") |
90 QDEBUG_WRITE("MsgNotifierPrivate::~MsgNotifierPrivate : Exit") |
84 } |
91 } |
85 |
92 |
86 // ---------------------------------------------------------------------------- |
93 // ---------------------------------------------------------------------------- |
87 // MsgNotifierPrivate::initL |
94 // MsgNotifierPrivate::initL |
112 // write -1 initially |
119 // write -1 initially |
113 success = mSettingsManager->writeItemValue(convIdKey,-1); |
120 success = mSettingsManager->writeItemValue(convIdKey,-1); |
114 |
121 |
115 QDEBUG_WRITE_FORMAT("MsgNotifierPrivate::initL " |
122 QDEBUG_WRITE_FORMAT("MsgNotifierPrivate::initL " |
116 "writing ret value",success) |
123 "writing ret value",success) |
|
124 |
|
125 mSts = new XQSystemToneService(); |
117 |
126 |
118 QDEBUG_WRITE("MsgNotifierPrivate::initL : Exit") |
127 QDEBUG_WRITE("MsgNotifierPrivate::initL : Exit") |
119 } |
128 } |
120 |
129 |
121 // ---------------------------------------------------------------------------- |
130 // ---------------------------------------------------------------------------- |
203 HBufC* descrp = convEntry->Description(); |
212 HBufC* descrp = convEntry->Description(); |
204 |
213 |
205 if(displayName) |
214 if(displayName) |
206 { |
215 { |
207 notifData.mDisplayName = |
216 notifData.mDisplayName = |
208 S60QConversions::s60DescToQString(*displayName); |
217 XQConversions::s60DescToQString(*displayName); |
209 } |
218 } |
210 if(number) |
219 if(number) |
211 { |
220 { |
212 notifData.mContactNum = S60QConversions::s60DescToQString(*number); |
221 notifData.mContactNum = XQConversions::s60DescToQString(*number); |
213 } |
222 } |
214 if(descrp) |
223 if(descrp) |
215 { |
224 { |
216 notifData.mDescription = S60QConversions::s60DescToQString(*descrp); |
225 notifData.mDescription = XQConversions::s60DescToQString(*descrp); |
217 } |
226 } |
|
227 |
|
228 //Play new message alert tone. |
|
229 mSts->playTone(XQSystemToneService::SmsAlertTone); |
218 |
230 |
219 // check whether opened cv id and received |
231 // check whether opened cv id and received |
220 // cv id are same and show notification |
232 // cv id are same and show notification |
221 if( showNotification(notifData.mConversationId )) |
233 if( showNotification(notifData.mConversationId )) |
222 { |
234 { |