|
1 /* |
|
2 * Copyright (c) 2005 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: Message Query Dialogue |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "SyncMLMessageQueryDialog.h" |
|
22 #include "SyncMLNotifDebug.h" |
|
23 |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CSyncMLMessageQueryDialog::CSyncMLMessageQueryDialog |
|
29 // C++ default constructor can NOT contain any code, that |
|
30 // might leave. |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 CSyncMLMessageQueryDialog::CSyncMLMessageQueryDialog(TBool& aKeyPress ):iKeyPress(aKeyPress) |
|
34 |
|
35 { |
|
36 } |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // CSyncMLMessageQueryDialog::NewL |
|
40 // Two-phased constructor. |
|
41 // ----------------------------------------------------------------------------- |
|
42 // |
|
43 CSyncMLMessageQueryDialog* CSyncMLMessageQueryDialog::NewL(TBool& aKeyPress ) |
|
44 { |
|
45 CSyncMLMessageQueryDialog* self = |
|
46 new( ELeave ) CSyncMLMessageQueryDialog (aKeyPress ); |
|
47 |
|
48 return self; |
|
49 } |
|
50 |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // CSyncMLMessageQueryDialog::~CSyncMLMessageQueryDialog |
|
54 // Destructor. |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 CSyncMLMessageQueryDialog::~CSyncMLMessageQueryDialog() |
|
58 { |
|
59 |
|
60 } |
|
61 |
|
62 // ----------------------------------------------------------------------------- |
|
63 // CSyncMLMessageQueryDialog::OkToExitL |
|
64 // Determines if the dialog can be closed.. |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 TBool CSyncMLMessageQueryDialog::OkToExitL( TInt aButtonId ) |
|
68 { |
|
69 FLOG(_L("[SmlNotif]\t CSyncMLMessageQueryDialog::OkToExitL()")); |
|
70 return CAknQueryDialog::OkToExitL( aButtonId ); |
|
71 } |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // CSyncMLMessageQueryDialog::NeedToDismissQueryL |
|
75 // Called by OfferkeyEventL(), gives a change to dismiss the query even with |
|
76 // keys different than Enter of Ok. |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 TBool CSyncMLMessageQueryDialog::NeedToDismissQueryL(const TKeyEvent& aKeyEvent) |
|
80 { |
|
81 FLOG(_L("[SmlNotif]\t CSyncMLMessageQueryDialog::NeedToDismissQueryL()")); |
|
82 if (aKeyEvent.iCode == EKeyNo) |
|
83 { |
|
84 FLOG(_L("[SmlNotif]\t CSyncMLMessageQueryDialog::NeedToDismissQueryL()--EKeyNo")); |
|
85 iKeyPress=ETrue; |
|
86 DismissQueryL(); |
|
87 return ETrue; |
|
88 } |
|
89 return EFalse; |
|
90 } |
|
91 |
|
92 // ----------------------------------------------------------------------------- |
|
93 // CSyncMLMessageQueryDialog::ExitL |
|
94 // ----------------------------------------------------------------------------- |
|
95 // |
|
96 void CSyncMLMessageQueryDialog::ExitL() |
|
97 { |
|
98 FLOG(_L("[SmlNotif]\t CSyncMLMessageQueryDialog::ExitL()")); |
|
99 OkToExitL( EKeyNo ); |
|
100 } |
|
101 |
|
102 // End of File |