diff -r 1fc85118c3ae -r 870918037e16 basiclocationinfodisplay/blid/ui/src/cblidnotedialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/basiclocationinfodisplay/blid/ui/src/cblidnotedialog.cpp Wed Sep 01 12:31:27 2010 +0100 @@ -0,0 +1,123 @@ +/* +* Copyright (c) 2005 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: execute a information note dialog. +* +*/ + + + +// INCLUDE FILES +#include +#include +#include "cblidnotedialog.h" + +// ============================ MEMBER FUNCTIONS ============================== +// ---------------------------------------------------------------------------- +// CBlidNoteDialog::CBlidNoteDialog +// C++ default constructor can NOT contain any code, that +// might leave. +// ---------------------------------------------------------------------------- +// +CBlidNoteDialog::CBlidNoteDialog() + :CActive(EPriorityStandard) + { + CActiveScheduler::Add( this ); + } + + +// ---------------------------------------------------------------------------- +// CBlidNoteDialog::ConstructL +// Symbian 2nd phase constructor can leave. +// ---------------------------------------------------------------------------- +// +void CBlidNoteDialog::ConstructL( ) + { + iIsNoteDisplayed = EFalse; + } + + +// ---------------------------------------------------------------------------- +// CBlidNoteDialog::NewL +// Two-phased constructor. +// ---------------------------------------------------------------------------- +// +CBlidNoteDialog* CBlidNoteDialog::NewL() + { + CBlidNoteDialog* self = new( ELeave ) CBlidNoteDialog(); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + + +// ---------------------------------------------------------------------------- +// CBlidNoteDialog::~CBlidNoteDialog +// ---------------------------------------------------------------------------- +// +CBlidNoteDialog::~CBlidNoteDialog() + { + Cancel(); + } + + +// ---------------------------------------------------------------------------- +// CBlidNoteDialog::RunL +// ---------------------------------------------------------------------------- +// +void CBlidNoteDialog::RunL() + { + switch( iStatus.Int() ) + { + case KErrNone: + { + if(!iIsNoteDisplayed) + { + iIsNoteDisplayed = ETrue; + CAknNoteDialog* dlg; + dlg = new (ELeave) CAknNoteDialog(CAknNoteDialog::EConfirmationTone,CAknNoteDialog::ENoTimeout); + dlg->ExecuteLD(R_TRIP_RESUME_CONFIRMATION_NOTE); + iIsNoteDisplayed = EFalse; + } + break; + } + default: + { + break; + } + } + } + + +// ---------------------------------------------------------------------------- +// CBlidNoteDialog::DoCancel +// ---------------------------------------------------------------------------- +// +void CBlidNoteDialog::DoCancel() + { + } + +// ---------------------------------------------------------------------------- +// CBlidNoteDialog::ExecuteNoteDialogL +// ---------------------------------------------------------------------------- +// +void CBlidNoteDialog::ExecuteNoteDialog() + { + SetActive(); + TRequestStatus *status = &iStatus; + User::RequestComplete(status, KErrNone); + } + +//End of File +