connectionutilities/ConnectionDialogs/cconndlg/src/ReconnectDialog.cpp
changeset 20 9c97ad6591ae
parent 18 fcbbe021d614
child 21 b8e8e15e80f2
child 23 7ec726f93df1
child 28 860702281757
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
     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 CReconnectDialog.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "ReconnectDialog.h"
       
    21 #include "ConnDlgPlugin.h"
       
    22 #include "ExpiryTimer.h"
       
    23 
       
    24 #include <uikon/eiksrvui.h>
       
    25 
       
    26 
       
    27 // CONSTANTS
       
    28 #if defined(_DEBUG)
       
    29 _LIT( KErrNullPointer, "NULL pointer" );
       
    30 #endif
       
    31 
       
    32 
       
    33 // ================= MEMBER FUNCTIONS =======================
       
    34 //
       
    35 // ---------------------------------------------------------
       
    36 // CReconnectDialog::CReconnectDialog
       
    37 // ---------------------------------------------------------
       
    38 //
       
    39 CReconnectDialog::CReconnectDialog( CConnDlgReconnectPlugin* aPlugin, 
       
    40                                     TBool& aBool )
       
    41 : iPlugin( aPlugin ),
       
    42   iBool( aBool )
       
    43     {
       
    44     }
       
    45 
       
    46 
       
    47 // ---------------------------------------------------------
       
    48 // CReconnectDialog::~CReconnectDialog
       
    49 // ---------------------------------------------------------
       
    50 //
       
    51 CReconnectDialog::~CReconnectDialog()
       
    52     {
       
    53     STATIC_CAST( CEikServAppUi*, 
       
    54                 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse );
       
    55     delete iExpiryTimer;
       
    56     }
       
    57 
       
    58 // ---------------------------------------------------------
       
    59 // CReconnectDialog::PreLayoutDynInitL()
       
    60 // ---------------------------------------------------------
       
    61 //
       
    62 void CReconnectDialog::PreLayoutDynInitL()
       
    63     {
       
    64     CAknQueryDialog::PreLayoutDynInitL();
       
    65     
       
    66     iExpiryTimer = CExpiryTimer::NewL( *this );
       
    67     iExpiryTimer->Start();
       
    68     
       
    69     STATIC_CAST( CEikServAppUi*, 
       
    70                 CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue );
       
    71     }
       
    72 
       
    73 
       
    74 // ---------------------------------------------------------
       
    75 // CReconnectDialog::OkToExitL
       
    76 // ---------------------------------------------------------
       
    77 //
       
    78 TBool CReconnectDialog::OkToExitL( TInt aButtonId )
       
    79     {
       
    80     iBool = EFalse;
       
    81     if ( aButtonId == EAknSoftkeyYes || aButtonId == EAknSoftkeyDone || 
       
    82          aButtonId == EAknSoftkeyOk )
       
    83         {
       
    84         iBool = ETrue;
       
    85         }
       
    86 
       
    87 
       
    88     __ASSERT_DEBUG( iPlugin, User::Panic( KErrNullPointer, KErrNone ) );
       
    89     iPlugin->CompleteL( KErrNone );
       
    90 
       
    91     return ETrue;
       
    92     }
       
    93 
       
    94 void CReconnectDialog::HandleTimedOut()
       
    95     {
       
    96     TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) );
       
    97     }
       
    98 
       
    99 // End of File