1 /* |
|
2 * Copyright (c) 2002 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: Implementation of class CNewIapDialog. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "NewIapDialog.h" |
|
22 #include "ConnDlgPlugin.h" |
|
23 #include "ExpiryTimer.h" |
|
24 |
|
25 #include <uikon/eiksrvui.h> |
|
26 #include <StringLoader.h> |
|
27 |
|
28 #include <CConnDlgPlugin.rsg> |
|
29 |
|
30 |
|
31 // CONST DECLARATIONS |
|
32 |
|
33 #if defined(_DEBUG) |
|
34 _LIT( KErrNullPointer, "NULL pointer" ); |
|
35 #endif |
|
36 |
|
37 |
|
38 // ================= MEMBER FUNCTIONS ======================= |
|
39 // |
|
40 // --------------------------------------------------------- |
|
41 // CNewIapDialog::CNewIapDialog |
|
42 // --------------------------------------------------------- |
|
43 // |
|
44 CNewIapDialog::CNewIapDialog( CConnDlgNewIapPlugin* aPlugin, TBool& aConnect, |
|
45 const TNewIapConnectionPrefs& aPrefs ) |
|
46 : iPlugin( aPlugin ), |
|
47 iConnect( aConnect ), |
|
48 iPrefs( aPrefs ) |
|
49 { |
|
50 } |
|
51 |
|
52 |
|
53 // --------------------------------------------------------- |
|
54 // CNewIapDialog::~CNewIapDialog |
|
55 // --------------------------------------------------------- |
|
56 // |
|
57 CNewIapDialog::~CNewIapDialog() |
|
58 { |
|
59 STATIC_CAST( CEikServAppUi*, |
|
60 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse ); |
|
61 delete iExpiryTimer; |
|
62 } |
|
63 |
|
64 // --------------------------------------------------------- |
|
65 // CNewIapDialog::PreLayoutDynInitL |
|
66 // --------------------------------------------------------- |
|
67 // |
|
68 void CNewIapDialog::PreLayoutDynInitL() |
|
69 { |
|
70 CAknQueryDialog::PreLayoutDynInitL(); |
|
71 |
|
72 STATIC_CAST( CEikServAppUi*, |
|
73 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue ); |
|
74 |
|
75 // New connection name |
|
76 HBufC *msg = StringLoader::LoadL( R_CONNDLG_NEW_CONNECTION_ATTEMPT, |
|
77 iPrefs.iName ); |
|
78 CleanupStack::PushL( msg ); |
|
79 SetPromptL( msg->Des() ); |
|
80 CleanupStack::PopAndDestroy( msg ); |
|
81 |
|
82 iExpiryTimer = CExpiryTimer::NewL( *this ); |
|
83 iExpiryTimer->Start(); |
|
84 } |
|
85 |
|
86 |
|
87 // --------------------------------------------------------- |
|
88 // CNewIapDialog::OkToExitL |
|
89 // --------------------------------------------------------- |
|
90 // |
|
91 TBool CNewIapDialog::OkToExitL( TInt aButtonId ) |
|
92 { |
|
93 iConnect = EFalse; |
|
94 if ( aButtonId == EAknSoftkeyYes || aButtonId == EAknSoftkeyDone || |
|
95 aButtonId == EAknSoftkeyOk ) |
|
96 { |
|
97 iConnect = ETrue; |
|
98 } |
|
99 |
|
100 __ASSERT_DEBUG( iPlugin, User::Panic( KErrNullPointer, KErrNone ) ); |
|
101 iPlugin->CompleteL( KErrNone ); |
|
102 |
|
103 return( ETrue ); |
|
104 } |
|
105 |
|
106 void CNewIapDialog::HandleTimedOut() |
|
107 { |
|
108 TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) ); |
|
109 } |
|
110 |
|
111 // End of File |
|