|
1 /* |
|
2 * Copyright (c) 2007-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: Source file for FS Email authentication dialog |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 #include "emailtrace.h" |
|
22 #include "FsEmailAuthenticationDialog.h" |
|
23 |
|
24 // --------------------------------------------------------- |
|
25 // CFsEmailAuthenticationDialog::CFsEmailAuthenticationDialog |
|
26 // --------------------------------------------------------- |
|
27 // |
|
28 CFsEmailAuthenticationDialog::CFsEmailAuthenticationDialog( |
|
29 TRequestStatus& aStatus, |
|
30 TDesC& aMailboxName, |
|
31 TDes& aPassword ) |
|
32 : CAknTextQueryDialog( aPassword, CAknQueryDialog::ENoTone ), |
|
33 iRequest( &aStatus ), |
|
34 iMailboxName( aMailboxName ) |
|
35 { |
|
36 FUNC_LOG; |
|
37 *iRequest = KRequestPending; |
|
38 } |
|
39 |
|
40 |
|
41 // --------------------------------------------------------- |
|
42 // CFsEmailAuthenticationDialog::~CFsEmailAuthenticationDialog |
|
43 // --------------------------------------------------------- |
|
44 // |
|
45 CFsEmailAuthenticationDialog::~CFsEmailAuthenticationDialog() |
|
46 { |
|
47 FUNC_LOG; |
|
48 } |
|
49 |
|
50 // --------------------------------------------------------- |
|
51 // CFsEmailAuthenticationDialog::NewL |
|
52 // --------------------------------------------------------- |
|
53 // |
|
54 CFsEmailAuthenticationDialog* CFsEmailAuthenticationDialog::NewL( |
|
55 TRequestStatus& aStatus, |
|
56 TDesC& aMailboxName, |
|
57 TDes& aPassword ) |
|
58 { |
|
59 FUNC_LOG; |
|
60 CFsEmailAuthenticationDialog* dialog = new( ELeave ) |
|
61 CFsEmailAuthenticationDialog( aStatus, aMailboxName, aPassword ); |
|
62 |
|
63 return dialog; |
|
64 } |
|
65 |
|
66 |
|
67 // --------------------------------------------------------- |
|
68 // CFsEmailAuthenticationDialog::PreLayoutDynInitL() |
|
69 // --------------------------------------------------------- |
|
70 // |
|
71 void CFsEmailAuthenticationDialog::PreLayoutDynInitL() |
|
72 { |
|
73 FUNC_LOG; |
|
74 CAknTextQueryDialog::PreLayoutDynInitL(); |
|
75 |
|
76 CAknPopupHeadingPane* heading = QueryHeading(); |
|
77 if( heading ) |
|
78 { |
|
79 heading->SetTextL( iMailboxName ); |
|
80 } |
|
81 } |
|
82 |
|
83 // --------------------------------------------------------- |
|
84 // CFsEmailAuthenticationDialog::OkToExitL |
|
85 // --------------------------------------------------------- |
|
86 // |
|
87 TBool CFsEmailAuthenticationDialog::OkToExitL( TInt aButtonId ) |
|
88 { |
|
89 FUNC_LOG; |
|
90 if ( CAknTextQueryDialog::OkToExitL( aButtonId ) ) |
|
91 { |
|
92 if ( aButtonId == EAknSoftkeySelect || |
|
93 aButtonId == EAknSoftkeyOk || |
|
94 aButtonId == EAknSoftkeyDone ) |
|
95 { |
|
96 // Ignore any errors to avoid the situation that the notifier keeps |
|
97 // hanging in screen if the calling party is crashed etc. |
|
98 User::RequestComplete( iRequest, KErrNone ); |
|
99 } |
|
100 else //if ( aButtonId == EAknSoftkeyCancel ) |
|
101 { |
|
102 // Ignore any errors to avoid the situation that the notifier keeps |
|
103 // hanging in screen if the calling party is crashed etc. |
|
104 User::RequestComplete( iRequest, KErrCancel ); |
|
105 } |
|
106 |
|
107 return ETrue; |
|
108 } |
|
109 |
|
110 return EFalse; |
|
111 } |
|
112 |
|
113 // End of File |
|
114 |