Nokia N97 SDK
Example Applications Guide

CCEWaitNote.cpp

00001 /*
00002 * ==============================================================================
00003 *  Name        : CCEWaitNote.cpp
00004 *  Part of     : Content Listing Framework Sample Application
00005 *  Interface   :
00006 *  Description :
00007 *  Version     :
00008 *
00009 *  Copyright (c) 2006 Nokia Corporation.
00010 *  This material, including documentation and any related
00011 *  computer programs, is protected by copyright controlled by
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 
00017 // INCLUDE FILES
00018 #include "CCEWaitNote.h"
00019 
00020 #include <CLFExample.rsg>
00021 
00022 // ============================ MEMBER FUNCTIONS ===============================
00023 
00024 // -----------------------------------------------------------------------------
00025 // CCEWaitNote::CCEWaitNote
00026 // C++ default constructor can NOT contain any code, that
00027 // might leave.
00028 // -----------------------------------------------------------------------------
00029 //
00030 CCEWaitNote::CCEWaitNote()
00031     {
00032     }
00033 
00034 // -----------------------------------------------------------------------------
00035 // CCEWaitNote::NewL
00036 // Two-phased constructor.
00037 // -----------------------------------------------------------------------------
00038 //
00039 CCEWaitNote* CCEWaitNote::NewL()
00040     {
00041     CCEWaitNote* self = new (ELeave) CCEWaitNote;
00042     return self;
00043     }
00044 
00045 // Destructor
00046 CCEWaitNote::~CCEWaitNote()
00047     {
00048     if( iWaitDialog )
00049         {
00050         // Do not delete CAknWaitDialog object:
00051         // CAknWaitDialog::ProcessFinishedL should be used instead.
00052         TRAP_IGNORE( iWaitDialog->ProcessFinishedL() );
00053         }
00054     }
00055 
00056 // -----------------------------------------------------------------------------
00057 // CCEWaitNote::DialogDismissedL
00058 // Gets called when the dialog is dismissed/closed.
00059 // -----------------------------------------------------------------------------
00060 //
00061 void CCEWaitNote::DialogDismissedL( const TInt /*aButtonId*/ )
00062     {
00063     }
00064 
00065 // -----------------------------------------------------------------------------
00066 // CCEWaitNote::CloseWaitNoteL
00067 // Close the wait note dialog.
00068 // -----------------------------------------------------------------------------
00069 //
00070 void CCEWaitNote::CloseWaitNoteL()
00071     {
00072     // Close and delete the wait note dialog,
00073     // if it has not been dismissed yet
00074     if( iWaitDialog )
00075         {
00076         iWaitDialog->ProcessFinishedL();
00077         }
00078     }
00079 
00080 // -----------------------------------------------------------------------------
00081 // CCEWaitNote::OpenWaitNoteL
00082 // Open the wait note dialog.
00083 // -----------------------------------------------------------------------------
00084 //
00085 void CCEWaitNote::OpenWaitNoteL( const TInt aResourceId )
00086     {
00087     CloseWaitNoteL();
00088 
00089     // Create and view the wait note dialog
00090     iWaitDialog = new (ELeave) CAknWaitDialog(
00091         reinterpret_cast<CEikDialog**>( &iWaitDialog ) );
00092     iWaitDialog->SetCallback( this );
00093     iWaitDialog->ExecuteLD( aResourceId );
00094     }
00095 
00096 //  End of File

© Nokia 2009

Back to top