diff -r 000000000000 -r 5a93021fdf25 connectionutilities/ConnectionDialogs/cconndlg/src/ReconnectDialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionutilities/ConnectionDialogs/cconndlg/src/ReconnectDialog.cpp Thu Dec 17 08:55:21 2009 +0200 @@ -0,0 +1,99 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implementation of class CReconnectDialog. +* +*/ + + +// INCLUDE FILES +#include "ReconnectDialog.h" +#include "ConnDlgPlugin.h" +#include "ExpiryTimer.h" + +#include + + +// CONSTANTS +#if defined(_DEBUG) +_LIT( KErrNullPointer, "NULL pointer" ); +#endif + + +// ================= MEMBER FUNCTIONS ======================= +// +// --------------------------------------------------------- +// CReconnectDialog::CReconnectDialog +// --------------------------------------------------------- +// +CReconnectDialog::CReconnectDialog( CConnDlgReconnectPlugin* aPlugin, + TBool& aBool ) +: iPlugin( aPlugin ), + iBool( aBool ) + { + } + + +// --------------------------------------------------------- +// CReconnectDialog::~CReconnectDialog +// --------------------------------------------------------- +// +CReconnectDialog::~CReconnectDialog() + { + STATIC_CAST( CEikServAppUi*, + CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( EFalse ); + delete iExpiryTimer; + } + +// --------------------------------------------------------- +// CReconnectDialog::PreLayoutDynInitL() +// --------------------------------------------------------- +// +void CReconnectDialog::PreLayoutDynInitL() + { + CAknQueryDialog::PreLayoutDynInitL(); + + iExpiryTimer = CExpiryTimer::NewL( *this ); + iExpiryTimer->Start(); + + STATIC_CAST( CEikServAppUi*, + CCoeEnv::Static()->AppUi() )->SuppressAppSwitching( ETrue ); + } + + +// --------------------------------------------------------- +// CReconnectDialog::OkToExitL +// --------------------------------------------------------- +// +TBool CReconnectDialog::OkToExitL( TInt aButtonId ) + { + iBool = EFalse; + if ( aButtonId == EAknSoftkeyYes || aButtonId == EAknSoftkeyDone || + aButtonId == EAknSoftkeyOk ) + { + iBool = ETrue; + } + + + __ASSERT_DEBUG( iPlugin, User::Panic( KErrNullPointer, KErrNone ) ); + iPlugin->CompleteL( KErrNone ); + + return ETrue; + } + +void CReconnectDialog::HandleTimedOut() + { + TRAP_IGNORE( TryExitL(EAknSoftkeyCancel) ); + } + +// End of File