24 #include <AknNotifyStd.h> |
24 #include <AknNotifyStd.h> |
25 #include <AknSoftNotificationParameters.h> |
25 #include <AknSoftNotificationParameters.h> |
26 #include <avkon.rsg> |
26 #include <avkon.rsg> |
27 #include <Ncnlist.rsg> |
27 #include <Ncnlist.rsg> |
28 #include <aknSDData.h> |
28 #include <aknSDData.h> |
|
29 #include <centralrepository.h> |
29 #include "NcnModel.h" |
30 #include "NcnModel.h" |
30 #include "CVoiceMailManager.h" |
31 #include "CVoiceMailManager.h" |
|
32 #include "messaginginternalcrkeys.h" |
31 |
33 |
32 // ================= DEFINITIONS ============================ |
34 // ================= DEFINITIONS ============================ |
33 #define KSpeedDialViewId TVwsViewId( TUid::Uid( 0x1000590A ), TUid::Uid( 0x02 ) ) |
35 #define KSpeedDialViewId TVwsViewId( TUid::Uid( 0x1000590A ), TUid::Uid( 0x02 ) ) |
34 #define KMceMailViewId TVwsViewId( TUid::Uid( 0x100058C5 ), TUid::Uid( 0x01 ) ) |
36 #define KMceMailViewId TVwsViewId( TUid::Uid( 0x100058C5 ), TUid::Uid( 0x01 ) ) |
35 #define KMceAudioMessageViewId TVwsViewId(TUid::Uid(0x100058C5),TUid::Uid(0x01) ) |
37 #define KMceAudioMessageViewId TVwsViewId(TUid::Uid(0x100058C5),TUid::Uid(0x01) ) |
|
38 // Conversational messaging UIDs. |
|
39 #define KConversationApplicationViewUid TVwsViewId(TUid::Uid(0x2002A540),TUid::Uid(0x01)) |
|
40 const TInt KConversationListViewUid = 0x01 ; |
36 |
41 |
37 // ================= LOCAL CONSTANTS ======================== |
42 // ================= LOCAL CONSTANTS ======================== |
38 namespace |
43 namespace |
39 { |
44 { |
40 _LIT( KNcnResourceFile, "z:\\resource\\Ncnlist.rSC" ); |
45 _LIT( KNcnResourceFile, "z:\\resource\\Ncnlist.rSC" ); |
93 // |
103 // |
94 void CNcnSNNotifier::ConstructL() |
104 void CNcnSNNotifier::ConstructL() |
95 { |
105 { |
96 // Create notifier instance |
106 // Create notifier instance |
97 iNotifier = CAknSoftNotifier::NewL(); |
107 iNotifier = CAknSoftNotifier::NewL(); |
|
108 // Muiu settings repository |
|
109 iMuiuSettings = CRepository::NewL(KCRUidMuiuSettings); |
98 } |
110 } |
99 |
111 |
100 |
112 |
101 // --------------------------------------------------------- |
113 // --------------------------------------------------------- |
102 // CNcnSNNotifier::IdleState |
114 // CNcnSNNotifier::IdleState |
321 switch( aNotificationType ) |
333 switch( aNotificationType ) |
322 { |
334 { |
323 // Notification for audio message |
335 // Notification for audio message |
324 case ECustomSoftNotification: |
336 case ECustomSoftNotification: |
325 { |
337 { |
|
338 TInt viewtype = 0; // Default is traditional Inbox |
|
339 if ( iMuiuSettings ) |
|
340 { |
|
341 // Read the messaging settings |
|
342 iMuiuSettings->Get(KMuiuMceDefaultView,viewtype); |
|
343 } |
|
344 if ( viewtype == 1 ) // Launch conversations |
|
345 { |
|
346 ret = CAknSoftNotificationParameters::NewL( |
|
347 KNcnResourceFile, |
|
348 R_NCN_AUDIO_MESSAGE_NOTE, |
|
349 KNcnNotificationPriority, |
|
350 R_AVKON_SOFTKEYS_SHOW_EXIT, |
|
351 CAknNoteDialog::ENoTone, |
|
352 KConversationApplicationViewUid, |
|
353 TUid::Uid(KConversationListViewUid), |
|
354 EAknSoftkeyShow, |
|
355 KNullDesC8() ); |
|
356 } |
|
357 else |
|
358 { |
326 ret = CAknSoftNotificationParameters::NewL( |
359 ret = CAknSoftNotificationParameters::NewL( |
327 KNcnResourceFile, |
360 KNcnResourceFile, |
328 R_NCN_AUDIO_MESSAGE_NOTE, |
361 R_NCN_AUDIO_MESSAGE_NOTE, |
329 KNcnNotificationPriority, |
362 KNcnNotificationPriority, |
330 R_AVKON_SOFTKEYS_SHOW_EXIT, |
363 R_AVKON_SOFTKEYS_SHOW_EXIT, |
331 CAknNoteDialog::ENoTone, |
364 CAknNoteDialog::ENoTone, |
332 KMceAudioMessageViewId, |
365 KMceAudioMessageViewId, |
333 KNcnAudioMessageUid, |
366 KNcnAudioMessageUid, |
334 EAknSoftkeyShow, |
367 EAknSoftkeyShow, |
335 KNullDesC8() ); |
368 KNullDesC8() ); |
|
369 } |
336 ret->SetGroupedTexts( R_NCN_AUDIO_MESSAGE_GROUPED ); |
370 ret->SetGroupedTexts( R_NCN_AUDIO_MESSAGE_GROUPED ); |
337 break; |
371 break; |
338 } |
372 } |
339 case ENewMailNotification: |
373 case ENewMailNotification: |
340 { |
374 { |