27
|
1 |
/*
|
|
2 |
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Methods for CNcnSNNotifier class.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
// INCLUDE FILES
|
|
21 |
#include "NcnDebug.h"
|
|
22 |
#include "NcnSNNotifier.h"
|
|
23 |
#include <AknSoftNotifier.h>
|
|
24 |
#include <AknNotifyStd.h>
|
|
25 |
#include <AknSoftNotificationParameters.h>
|
|
26 |
#include <avkon.rsg>
|
|
27 |
#include <Ncnlist.rsg>
|
|
28 |
#include <aknSDData.h>
|
|
29 |
#include <centralrepository.h>
|
|
30 |
#include "NcnModel.h"
|
|
31 |
#include "CVoiceMailManager.h"
|
|
32 |
#include "messaginginternalcrkeys.h"
|
|
33 |
|
|
34 |
// ================= DEFINITIONS ============================
|
|
35 |
#define KSpeedDialViewId TVwsViewId( TUid::Uid( 0x1000590A ), TUid::Uid( 0x02 ) )
|
|
36 |
#define KMceMailViewId 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 ;
|
|
41 |
|
|
42 |
// ================= LOCAL CONSTANTS ========================
|
|
43 |
namespace
|
|
44 |
{
|
|
45 |
_LIT( KNcnResourceFile, "z:\\resource\\Ncnlist.rSC" );
|
|
46 |
const TInt KNcnNotificationPriority = 2200;
|
|
47 |
const TUid KNcnDefaultMessageUid = { 1 };
|
|
48 |
const TUid KNcnLine2MessageUid = { 2 };
|
|
49 |
const TUid KNcnAudioMessageUid = { 3 };
|
|
50 |
_LIT8( KNcnExternalLaunch, "outside" );
|
|
51 |
const TUint KNcnExternalizedNumberMaxLength = 8;
|
|
52 |
}
|
|
53 |
|
|
54 |
// ================= MEMBER FUNCTIONS =======================
|
|
55 |
|
|
56 |
// ---------------------------------------------------------
|
|
57 |
// CNcnSNNotifier default constructor
|
|
58 |
// ---------------------------------------------------------
|
|
59 |
//
|
|
60 |
CNcnSNNotifier::CNcnSNNotifier()
|
|
61 |
{
|
|
62 |
}
|
|
63 |
|
|
64 |
|
|
65 |
// ---------------------------------------------------------
|
|
66 |
// CNcnSNNotifier::~CNcnSNNotifier
|
|
67 |
// ---------------------------------------------------------
|
|
68 |
//
|
|
69 |
CNcnSNNotifier::~CNcnSNNotifier()
|
|
70 |
{
|
|
71 |
// Delete notifier
|
|
72 |
delete iNotifier;
|
|
73 |
iNotifier = NULL;
|
|
74 |
if ( iMuiuSettings )
|
|
75 |
{
|
|
76 |
delete iMuiuSettings;
|
|
77 |
iMuiuSettings = NULL;
|
|
78 |
}
|
|
79 |
}
|
|
80 |
|
|
81 |
|
|
82 |
// ---------------------------------------------------------
|
|
83 |
// CNcnSNNotifier::NewL
|
|
84 |
// ---------------------------------------------------------
|
|
85 |
//
|
|
86 |
CNcnSNNotifier* CNcnSNNotifier::NewL()
|
|
87 |
{
|
|
88 |
// Create the notifier instance
|
|
89 |
CNcnSNNotifier* self = new (ELeave) CNcnSNNotifier();
|
|
90 |
|
|
91 |
// Call the construct safely
|
|
92 |
CleanupStack::PushL( self );
|
|
93 |
self->ConstructL();
|
|
94 |
CleanupStack::Pop();
|
|
95 |
|
|
96 |
return self;
|
|
97 |
}
|
|
98 |
|
|
99 |
|
|
100 |
// ---------------------------------------------------------
|
|
101 |
// CNcnSNNotifier::ConstructL
|
|
102 |
// ---------------------------------------------------------
|
|
103 |
//
|
|
104 |
void CNcnSNNotifier::ConstructL()
|
|
105 |
{
|
|
106 |
// Create notifier instance
|
|
107 |
iNotifier = CAknSoftNotifier::NewL();
|
|
108 |
// Muiu settings repository
|
|
109 |
iMuiuSettings = CRepository::NewL(KCRUidMuiuSettings);
|
|
110 |
}
|
|
111 |
|
|
112 |
|
|
113 |
// ---------------------------------------------------------
|
|
114 |
// CNcnSNNotifier::IdleState
|
|
115 |
// ---------------------------------------------------------
|
|
116 |
//
|
|
117 |
void CNcnSNNotifier::IdleState( TBool aCurrentState )
|
|
118 |
{
|
|
119 |
TRAP_IGNORE( DoInformIdleStateL( aCurrentState ) );
|
|
120 |
}
|
|
121 |
|
|
122 |
|
|
123 |
// ---------------------------------------------------------
|
|
124 |
// CNcnSNNotifier::NewItems
|
|
125 |
// ---------------------------------------------------------
|
|
126 |
//
|
|
127 |
void CNcnSNNotifier::NewItems( const MNcnNotifier::TNcnNotificationType aNotificationType, const TInt aAmount )
|
|
128 |
{
|
|
129 |
//Convert to avkon type
|
|
130 |
TAknSoftNotificationType aknType = ConvertNCNTypeToAvkonType(aNotificationType);
|
|
131 |
|
|
132 |
//Get the secondary display id for this note
|
|
133 |
SecondaryDisplay::TSecondaryDisplayNcnListDialogs dialogID =
|
|
134 |
ConvertNCNTypeToSecondaryDisplayType(aNotificationType);
|
|
135 |
|
|
136 |
// Amount needs to be stored to "additional parameter"
|
|
137 |
TBuf8<KNcnExternalizedNumberMaxLength> additionalData;
|
|
138 |
additionalData.Num(aAmount);
|
|
139 |
|
|
140 |
// Encapsulate the sent data
|
|
141 |
CAknSDData* sdData = NULL;
|
|
142 |
TRAPD( status, sdData = CAknSDData::NewL(
|
|
143 |
SecondaryDisplay::KCatNcnList,
|
|
144 |
dialogID,
|
|
145 |
additionalData) );
|
|
146 |
|
|
147 |
// Send data to cover ui
|
|
148 |
if ( status == KErrNone && sdData != NULL)
|
|
149 |
{
|
|
150 |
iNotifier->SetSecondaryDisplayData( sdData ); //Takes ownership
|
|
151 |
}
|
|
152 |
|
|
153 |
// If there are problems with notifier, just catch the error and
|
|
154 |
// try to finish the other processes.
|
|
155 |
TRAP( status, ShowNewItemsL( aknType, aAmount ) );
|
|
156 |
|
|
157 |
NCN_RDEBUG_INT( _L("CNcnSNNotifier::NewItems: ShowNewItemsL returned %d"), status );
|
|
158 |
}
|
|
159 |
|
|
160 |
// ---------------------------------------------------------
|
|
161 |
// CNcnSNNotifier::DoInformIdleStateL
|
|
162 |
// ---------------------------------------------------------
|
|
163 |
//
|
|
164 |
void CNcnSNNotifier::DoInformIdleStateL( TBool aCurrentState )
|
|
165 |
{
|
|
166 |
NCN_RDEBUG_INT(_L("CNcnSNNotifier::DoInformIdleStateL aCurrentState = %d" ), aCurrentState );
|
|
167 |
|
|
168 |
// Inform the notifier component about new idle state status.
|
|
169 |
iNotifier->SetIdleStateL( aCurrentState );
|
|
170 |
}
|
|
171 |
|
|
172 |
|
|
173 |
// ---------------------------------------------------------
|
|
174 |
// CNcnSNNotifier::ShowNewItemsL
|
|
175 |
// ---------------------------------------------------------
|
|
176 |
//
|
|
177 |
void CNcnSNNotifier::ShowNewItemsL( const TAknSoftNotificationType aNotificationType, const TInt aAmount )
|
|
178 |
{
|
|
179 |
NCN_RDEBUG_INT2(_L("CNcnSNNotifier::ShowNewItemsL: aNotificationType %d, aAmount: %d" ), aNotificationType, aAmount );
|
|
180 |
|
|
181 |
// Separate handling for voice mail notifications for now
|
|
182 |
switch( aNotificationType )
|
|
183 |
{
|
|
184 |
case ECustomSoftNotification:
|
|
185 |
// Fallthrough
|
|
186 |
case ENewMailNotification:
|
|
187 |
// Fallthrough
|
|
188 |
case EVoiceMailNotification:
|
|
189 |
// Fallthrough
|
|
190 |
case ESeparateVoiceMailOnLine1Notification:
|
|
191 |
// Fallthrough
|
|
192 |
case ESeparateVoiceMailOnLine2Notification:
|
|
193 |
{
|
|
194 |
ShowCustomNotificationL( aNotificationType, aAmount );
|
|
195 |
break;
|
|
196 |
}
|
|
197 |
default:
|
|
198 |
{
|
|
199 |
ShowDefaultNotificationL( aNotificationType, aAmount );
|
|
200 |
break;
|
|
201 |
}
|
|
202 |
}
|
|
203 |
}
|
|
204 |
|
|
205 |
// ---------------------------------------------------------
|
|
206 |
// CNcnSNNotifier::ShowVoiceMailNotificationL
|
|
207 |
// ---------------------------------------------------------
|
|
208 |
//
|
|
209 |
void CNcnSNNotifier::ShowCustomNotificationL( const TAknSoftNotificationType aNotificationType, const TInt aAmount )
|
|
210 |
{
|
|
211 |
TBool amountKnown = ( aAmount <= CVoiceMailManager::EVMMaximumNumber );
|
|
212 |
|
|
213 |
NCN_RDEBUG_INT2(_L("CNcnSNNotifier::ShowCustomNotificationL: aNotificationType %d, amount known: %d" ), aNotificationType, amountKnown );
|
|
214 |
|
|
215 |
// fuzzy voicemail note and normal voice mail note should never exist at the same time.
|
|
216 |
// Always cancel the other before adding new note.
|
|
217 |
if ( aNotificationType == EVoiceMailNotification
|
|
218 |
|| aNotificationType == ESeparateVoiceMailOnLine1Notification
|
|
219 |
|| aNotificationType == ESeparateVoiceMailOnLine2Notification )
|
|
220 |
{
|
|
221 |
CAknSoftNotificationParameters* params =
|
|
222 |
CreateNotificationParametersLC( aNotificationType, !amountKnown );
|
|
223 |
iNotifier->CancelCustomSoftNotificationL( *params );
|
|
224 |
CleanupStack::PopAndDestroy( params );
|
|
225 |
}
|
|
226 |
|
|
227 |
// create notification parameters
|
|
228 |
CAknSoftNotificationParameters* params =
|
|
229 |
CreateNotificationParametersLC( aNotificationType, amountKnown );
|
|
230 |
|
|
231 |
if( aAmount <= 0 )
|
|
232 |
{
|
|
233 |
iNotifier->CancelCustomSoftNotificationL( *params );
|
|
234 |
}
|
|
235 |
else
|
|
236 |
{
|
|
237 |
iNotifier->SetCustomNotificationCountL( *params, aAmount );
|
|
238 |
}
|
|
239 |
|
|
240 |
// destroy parameters
|
|
241 |
CleanupStack::PopAndDestroy( params );
|
|
242 |
}
|
|
243 |
|
|
244 |
// ---------------------------------------------------------
|
|
245 |
// CNcnSNNotifier::ShowDefaultNotificationL
|
|
246 |
// ---------------------------------------------------------
|
|
247 |
//
|
|
248 |
void CNcnSNNotifier::ShowDefaultNotificationL( const TAknSoftNotificationType aNotificationType, const TInt aAmount )
|
|
249 |
{
|
|
250 |
NCN_RDEBUG_INT2(_L("CNcnSNNotifier::ShowDefaultNotificationL aNotificationType %d, aAmount: %d" ), aNotificationType, aAmount );
|
|
251 |
|
|
252 |
if( aAmount <= 0 )
|
|
253 |
{
|
|
254 |
iNotifier->CancelSoftNotificationL( aNotificationType );
|
|
255 |
}
|
|
256 |
else
|
|
257 |
{
|
|
258 |
TRAPD( err, iNotifier->SetNotificationCountL( aNotificationType, aAmount ) );
|
|
259 |
NCN_RDEBUG_INT(_L("CNcnSNNotifier::ShowDefaultNotificationL: SetNotificationCountL returned %d" ), err );
|
|
260 |
User::LeaveIfError( err );
|
|
261 |
// iNotifier->SetNotificationCountL( aNotificationType, aAmount );
|
|
262 |
}
|
|
263 |
}
|
|
264 |
// ---------------------------------------------------------
|
|
265 |
// CNcnSNNotifier::VoicemailNoteId
|
|
266 |
// ---------------------------------------------------------
|
|
267 |
//
|
|
268 |
CAknSoftNotificationParameters* CNcnSNNotifier::VoicemailNoteParametersL(
|
|
269 |
const TAknSoftNotificationType aNotificationType,
|
|
270 |
const TBool aAmountKnown )
|
|
271 |
{
|
|
272 |
NCN_RDEBUG_INT2(_L("CNcnSNNotifier::VoicemailNoteParametersL: aNotificationType %d, aAmountKnown: %d" ), aNotificationType, aAmountKnown );
|
|
273 |
|
|
274 |
// note is different only for voice mails, if amount is known or not known.
|
|
275 |
TUid customMessageId = KNcnDefaultMessageUid; // default
|
|
276 |
TInt groupId(0);
|
|
277 |
TInt noteId(0);
|
|
278 |
switch( aNotificationType )
|
|
279 |
{
|
|
280 |
case EVoiceMailNotification:
|
|
281 |
{
|
|
282 |
noteId = aAmountKnown ? R_NCN_VOICE_MAIL_NOTE : R_NCN_VOICE_MAILS_UNK_AMOUNT;
|
|
283 |
groupId = aAmountKnown ? R_NCN_VOICE_MAIL_GROUPED : R_NCN_VOICE_MAILS_UNK_AMOUNT_GROUPED;
|
|
284 |
break;
|
|
285 |
}
|
|
286 |
case ESeparateVoiceMailOnLine1Notification:
|
|
287 |
{
|
|
288 |
noteId = aAmountKnown ? R_NCN_VOICE_MAIL_ON_LINE1_NOTE : R_NCN_VOICE_MAILS_UNK_AMOUNT_ON_LINE1;
|
|
289 |
groupId = aAmountKnown ? R_NCN_VOICE_MAIL_ON_LINE1_GROUPED : R_NCN_VOICE_MAILS_UNK_AMOUNT_ON_LINE1_GROUPED;
|
|
290 |
break;
|
|
291 |
}
|
|
292 |
case ESeparateVoiceMailOnLine2Notification:
|
|
293 |
{
|
|
294 |
noteId = aAmountKnown ? R_NCN_VOICE_MAIL_ON_LINE2_NOTE : R_NCN_VOICE_MAILS_UNK_AMOUNT_ON_LINE2;
|
|
295 |
groupId = aAmountKnown ? R_NCN_VOICE_MAIL_ON_LINE2_GROUPED : R_NCN_VOICE_MAILS_UNK_AMOUNT_ON_LINE2_GROUPED;
|
|
296 |
customMessageId = KNcnLine2MessageUid;
|
|
297 |
break;
|
|
298 |
}
|
|
299 |
default:
|
|
300 |
{
|
|
301 |
ASSERT( EFalse );
|
|
302 |
break;
|
|
303 |
}
|
|
304 |
}
|
|
305 |
|
|
306 |
CAknSoftNotificationParameters* ret = CAknSoftNotificationParameters::NewL(
|
|
307 |
KNcnResourceFile,
|
|
308 |
noteId,
|
|
309 |
KNcnNotificationPriority,
|
|
310 |
R_AVKON_SOFTKEYS_LISTEN_EXIT,
|
|
311 |
CAknNoteDialog::ENoTone,
|
|
312 |
KSpeedDialViewId,
|
|
313 |
customMessageId,
|
|
314 |
EAknSoftkeyListen,
|
|
315 |
KNcnExternalLaunch );
|
|
316 |
ret->SetGroupedTexts( groupId );
|
|
317 |
return ret;
|
|
318 |
}
|
|
319 |
|
|
320 |
// ---------------------------------------------------------
|
|
321 |
// CNcnSNNotifier::CreateNotificationParametersLC
|
|
322 |
// ---------------------------------------------------------
|
|
323 |
//
|
|
324 |
CAknSoftNotificationParameters* CNcnSNNotifier::CreateNotificationParametersLC(
|
|
325 |
const TAknSoftNotificationType aNotificationType,
|
|
326 |
TBool aAmountKnown )
|
|
327 |
{
|
|
328 |
NCN_RDEBUG_INT(_L("CNcnSNNotifier::CreateNotificationParametersLC: aNotificationType %d" ), aNotificationType );
|
|
329 |
// instantiate parameters
|
|
330 |
CAknSoftNotificationParameters* ret = 0;
|
|
331 |
|
|
332 |
// determine resource ids based on notification type
|
|
333 |
switch( aNotificationType )
|
|
334 |
{
|
|
335 |
// Notification for audio message
|
|
336 |
case ECustomSoftNotification:
|
|
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 |
{
|
|
359 |
ret = CAknSoftNotificationParameters::NewL(
|
|
360 |
KNcnResourceFile,
|
|
361 |
R_NCN_AUDIO_MESSAGE_NOTE,
|
|
362 |
KNcnNotificationPriority,
|
|
363 |
R_AVKON_SOFTKEYS_SHOW_EXIT,
|
|
364 |
CAknNoteDialog::ENoTone,
|
|
365 |
KMceAudioMessageViewId,
|
|
366 |
KNcnAudioMessageUid,
|
|
367 |
EAknSoftkeyShow,
|
|
368 |
KNullDesC8() );
|
|
369 |
}
|
|
370 |
ret->SetGroupedTexts( R_NCN_AUDIO_MESSAGE_GROUPED );
|
|
371 |
break;
|
|
372 |
}
|
|
373 |
case ENewMailNotification:
|
|
374 |
{
|
|
375 |
ret = CAknSoftNotificationParameters::NewL(
|
|
376 |
KNcnResourceFile,
|
|
377 |
R_NCN_EMAIL_NOTE,
|
|
378 |
KNcnNotificationPriority,
|
|
379 |
R_AVKON_SOFTKEYS_SHOW_EXIT,
|
|
380 |
CAknNoteDialog::ENoTone,
|
|
381 |
KMceMailViewId,
|
|
382 |
KNcnDefaultMessageUid,
|
|
383 |
EAknSoftkeyShow,
|
|
384 |
KNullDesC8() );
|
|
385 |
ret->SetGroupedTexts( R_NCN_EMAIL_GROUPED );
|
|
386 |
break;
|
|
387 |
}
|
|
388 |
case EVoiceMailNotification:
|
|
389 |
case ESeparateVoiceMailOnLine1Notification:
|
|
390 |
case ESeparateVoiceMailOnLine2Notification:
|
|
391 |
{
|
|
392 |
ret = VoicemailNoteParametersL( aNotificationType, aAmountKnown );
|
|
393 |
break;
|
|
394 |
}
|
|
395 |
default:
|
|
396 |
{
|
|
397 |
// Not found.
|
|
398 |
User::Leave( KErrNotFound );
|
|
399 |
break;
|
|
400 |
}
|
|
401 |
}
|
|
402 |
|
|
403 |
CleanupStack::PushL( ret );
|
|
404 |
return ret;
|
|
405 |
}
|
|
406 |
|
|
407 |
|
|
408 |
// ---------------------------------------------------------
|
|
409 |
// CNcnSNNotifier::ConvertNCNTypeToAvkonType
|
|
410 |
// ---------------------------------------------------------
|
|
411 |
//
|
|
412 |
TAknSoftNotificationType CNcnSNNotifier::ConvertNCNTypeToAvkonType(
|
|
413 |
const MNcnNotifier::TNcnNotificationType aNotification ) const
|
|
414 |
{
|
|
415 |
// default to no notification
|
|
416 |
TAknSoftNotificationType aknNotificationType = ENoSoftNotification;
|
|
417 |
|
|
418 |
// Map ncn specific notification to Akn notification type and update
|
|
419 |
// notification.
|
|
420 |
// Note that only the messages with valid Akn notification need to be
|
|
421 |
// mapped (ie. class0 needs no mapping)
|
|
422 |
switch( aNotification )
|
|
423 |
{
|
|
424 |
case MNcnNotifier::ENcnMessagesNotification:
|
|
425 |
{
|
|
426 |
aknNotificationType = ENewMessagesNotification;
|
|
427 |
break;
|
|
428 |
}
|
|
429 |
case MNcnNotifier::ENcnAudioMessagesNotification:
|
|
430 |
{
|
|
431 |
aknNotificationType = ECustomSoftNotification;
|
|
432 |
break;
|
|
433 |
}
|
|
434 |
case MNcnNotifier::ENcnEmailNotification:
|
|
435 |
{
|
|
436 |
aknNotificationType = ENewMailNotification;
|
|
437 |
break;
|
|
438 |
}
|
|
439 |
case MNcnNotifier::ENcnVoiceMailNotification:
|
|
440 |
{
|
|
441 |
aknNotificationType = EVoiceMailNotification;
|
|
442 |
break;
|
|
443 |
}
|
|
444 |
case MNcnNotifier::ENcnVoiceMailOnLine1Notification:
|
|
445 |
{
|
|
446 |
aknNotificationType = ESeparateVoiceMailOnLine1Notification;
|
|
447 |
break;
|
|
448 |
}
|
|
449 |
case MNcnNotifier::ENcnVoiceMailOnLine2Notification:
|
|
450 |
{
|
|
451 |
aknNotificationType = ESeparateVoiceMailOnLine2Notification;
|
|
452 |
break;
|
|
453 |
}
|
|
454 |
case MNcnNotifier::ENcnMissedCallsNotification:
|
|
455 |
{
|
|
456 |
aknNotificationType = EMissedCallsNotification;
|
|
457 |
break;
|
|
458 |
}
|
|
459 |
default:
|
|
460 |
{
|
|
461 |
break;
|
|
462 |
}
|
|
463 |
}
|
|
464 |
|
|
465 |
return aknNotificationType;
|
|
466 |
}
|
|
467 |
|
|
468 |
// ---------------------------------------------------------
|
|
469 |
// CNcnSNNotifier::ConvertNCNTypeToSecondaryDisplayType
|
|
470 |
// ---------------------------------------------------------
|
|
471 |
//
|
|
472 |
SecondaryDisplay::TSecondaryDisplayNcnListDialogs CNcnSNNotifier::ConvertNCNTypeToSecondaryDisplayType(
|
|
473 |
const MNcnNotifier::TNcnNotificationType aNotification ) const
|
|
474 |
{
|
|
475 |
// default to no notification
|
|
476 |
SecondaryDisplay::TSecondaryDisplayNcnListDialogs secDisplayDialog =
|
|
477 |
SecondaryDisplay::ECmdNoNotification;
|
|
478 |
|
|
479 |
//Get the corresbonding secondary display dialog id
|
|
480 |
switch( aNotification )
|
|
481 |
{
|
|
482 |
case MNcnNotifier::ENcnMessagesNotification:
|
|
483 |
{
|
|
484 |
secDisplayDialog = SecondaryDisplay::ECmdMessagesNotification;
|
|
485 |
break;
|
|
486 |
}
|
|
487 |
case MNcnNotifier::ENcnClass0MessageNotification:
|
|
488 |
{
|
|
489 |
secDisplayDialog = SecondaryDisplay::ECmdClass0MessageNotification;
|
|
490 |
break;
|
|
491 |
}
|
|
492 |
case MNcnNotifier::ENcnAudioMessagesNotification:
|
|
493 |
{
|
|
494 |
secDisplayDialog = SecondaryDisplay::ECmdAudioMessagesNotification;
|
|
495 |
break;
|
|
496 |
}
|
|
497 |
case MNcnNotifier::ENcnEmailNotification:
|
|
498 |
{
|
|
499 |
secDisplayDialog = SecondaryDisplay::ECmdEmailNotification;
|
|
500 |
break;
|
|
501 |
}
|
|
502 |
case MNcnNotifier::ENcnVoiceMailNotification:
|
|
503 |
{
|
|
504 |
secDisplayDialog = SecondaryDisplay::ECmdVoiceMailNotification;
|
|
505 |
break;
|
|
506 |
}
|
|
507 |
case MNcnNotifier::ENcnVoiceMailOnLine1Notification:
|
|
508 |
{
|
|
509 |
secDisplayDialog = SecondaryDisplay::ECmdVoiceMailOnLine1Notification;
|
|
510 |
break;
|
|
511 |
}
|
|
512 |
case MNcnNotifier::ENcnVoiceMailOnLine2Notification:
|
|
513 |
{
|
|
514 |
secDisplayDialog = SecondaryDisplay::ECmdVoiceMailOnLine2Notification;
|
|
515 |
break;
|
|
516 |
}
|
|
517 |
case MNcnNotifier::ENcnMissedCallsNotification:
|
|
518 |
{
|
|
519 |
secDisplayDialog = SecondaryDisplay::ECmdMissedCallsNotification;
|
|
520 |
break;
|
|
521 |
}
|
|
522 |
default:
|
|
523 |
{
|
|
524 |
break;
|
|
525 |
}
|
|
526 |
}
|
|
527 |
|
|
528 |
return secDisplayDialog;
|
|
529 |
}
|
|
530 |
// End of File
|