1 /* |
|
2 * Copyright (c) 2008 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: This module contains the implementation of CSsNoteDialog class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "cssnotedialog.h" |
|
21 #include "cssconnectionhandler.h" |
|
22 #include "cssuiutilities.h" |
|
23 #include "cssserviceutilities.h" |
|
24 #include "csslogger.h" |
|
25 #include <StringLoader.h> |
|
26 #include <avkon.rsg> |
|
27 |
|
28 // ================= MEMBER FUNCTIONS ======================================= |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CSsNoteDialog::CSsNoteDialog |
|
32 // C++ constructor can NOT contain any code, that |
|
33 // might leave. |
|
34 // ----------------------------------------------------------------------------- |
|
35 // |
|
36 CSsNoteDialog::CSsNoteDialog( |
|
37 CEikDialog** aSelf ) |
|
38 : CAknNoteDialog(EConfirmationTone, ELongTimeout), |
|
39 iSelf( aSelf ) |
|
40 { |
|
41 } |
|
42 |
|
43 // Destructor |
|
44 CSsNoteDialog::~CSsNoteDialog() |
|
45 { |
|
46 CSSLOGSTRING("CSsNoteDialog::~CSsNoteDialog"); |
|
47 // Set self pointer as null. |
|
48 // Query could be destroyed by client application or by |
|
49 // the user selection. |
|
50 if ( iSelf ) |
|
51 { |
|
52 *iSelf = NULL; |
|
53 iSelf = NULL; |
|
54 } |
|
55 } |
|
56 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // CSsNoteDialog::RunDialogLD |
|
59 // Runs the dialog |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 void CSsNoteDialog::RunDialogLD( |
|
63 TInt aResourceId ) |
|
64 { |
|
65 CSSLOGSTRING("CSsNoteDialog::RunDialogLD <"); |
|
66 HBufC* text = StringLoader::LoadLC( aResourceId ); |
|
67 SetTextL( *text ); |
|
68 CAknNoteDialog::PrepareLC( R_AKN_INFORMATION_NOTE_DIALOG_WAIT ); |
|
69 CAknNoteDialog::RunLD(); |
|
70 CleanupStack::PopAndDestroy( text ); |
|
71 CSSLOGSTRING("CSsNoteDialog::RunDialogLD >"); |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // CSsNoteDialog::OfferKeyEventL |
|
76 // Send key handling overriden |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 TKeyResponse CSsNoteDialog::OfferKeyEventL( |
|
80 const TKeyEvent& aKeyEvent, |
|
81 TEventCode aType ) |
|
82 { |
|
83 CSSLOGSTRING2("CSsNoteDialog::OfferKeyEventL, aKeyEvent.iScanCode: %d" |
|
84 ,aKeyEvent.iScanCode ); |
|
85 TKeyResponse ret = EKeyWasNotConsumed; |
|
86 |
|
87 if ( aKeyEvent.iScanCode == EStdKeyYes && aType == EEventKey ) |
|
88 { |
|
89 CSSLOGSTRING("CSsNoteDialog::OfferKeyEventL, EKeyWasConsumed"); |
|
90 ret = EKeyWasConsumed; |
|
91 } |
|
92 return ret; |
|
93 } |
|
94 |
|
95 // ================= OTHER EXPORTED FUNCTIONS =============================== |
|
96 |
|
97 // End of File |
|