basiclocationinfodisplay/blid/ui/src/cblidnotedialog.cpp
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2005 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:  execute a information note dialog.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <aknnotedialog.h>
       
    22 #include <blid.rsg>
       
    23 #include "cblidnotedialog.h"
       
    24 
       
    25 // ============================ MEMBER FUNCTIONS ==============================
       
    26 // ----------------------------------------------------------------------------
       
    27 // CBlidNoteDialog::CBlidNoteDialog
       
    28 // C++ default constructor can NOT contain any code, that
       
    29 // might leave.
       
    30 // ----------------------------------------------------------------------------
       
    31 //
       
    32 CBlidNoteDialog::CBlidNoteDialog()
       
    33     :CActive(EPriorityStandard)
       
    34     {
       
    35     CActiveScheduler::Add( this );    
       
    36     }
       
    37     
       
    38     
       
    39 // ----------------------------------------------------------------------------
       
    40 // CBlidNoteDialog::ConstructL
       
    41 // Symbian 2nd phase constructor can leave.
       
    42 // ----------------------------------------------------------------------------
       
    43 //
       
    44 void CBlidNoteDialog::ConstructL( )
       
    45     {
       
    46     iIsNoteDisplayed = EFalse; 
       
    47     }
       
    48     
       
    49     
       
    50 // ----------------------------------------------------------------------------
       
    51 // CBlidNoteDialog::NewL
       
    52 // Two-phased constructor.
       
    53 // ----------------------------------------------------------------------------
       
    54 //
       
    55 CBlidNoteDialog* CBlidNoteDialog::NewL()
       
    56     {
       
    57     CBlidNoteDialog* self = new( ELeave ) CBlidNoteDialog();    
       
    58     CleanupStack::PushL( self );
       
    59     self->ConstructL();
       
    60     CleanupStack::Pop( self );
       
    61     return self;
       
    62     }    
       
    63     
       
    64     
       
    65 // ----------------------------------------------------------------------------
       
    66 // CBlidNoteDialog::~CBlidNoteDialog
       
    67 // ----------------------------------------------------------------------------
       
    68 //
       
    69 CBlidNoteDialog::~CBlidNoteDialog()
       
    70     {
       
    71     Cancel();
       
    72     }  
       
    73     
       
    74     
       
    75 // ----------------------------------------------------------------------------
       
    76 // CBlidNoteDialog::RunL
       
    77 // ----------------------------------------------------------------------------
       
    78 //
       
    79 void CBlidNoteDialog::RunL()
       
    80     {
       
    81     switch( iStatus.Int() ) 
       
    82         {
       
    83         case KErrNone:
       
    84             {
       
    85             if(!iIsNoteDisplayed)
       
    86                 {
       
    87                 iIsNoteDisplayed = ETrue;
       
    88                 CAknNoteDialog* dlg;
       
    89                 dlg = new (ELeave) CAknNoteDialog(CAknNoteDialog::EConfirmationTone,CAknNoteDialog::ENoTimeout);
       
    90                 dlg->ExecuteLD(R_TRIP_RESUME_CONFIRMATION_NOTE);
       
    91                 iIsNoteDisplayed = EFalse;
       
    92                 }
       
    93             break;
       
    94             }
       
    95         default:
       
    96             {
       
    97             break;
       
    98             }            
       
    99         }
       
   100     }
       
   101     
       
   102 
       
   103 // ----------------------------------------------------------------------------
       
   104 // CBlidNoteDialog::DoCancel
       
   105 // ----------------------------------------------------------------------------
       
   106 //
       
   107 void CBlidNoteDialog::DoCancel()
       
   108     {
       
   109     }
       
   110 
       
   111 // ----------------------------------------------------------------------------
       
   112 // CBlidNoteDialog::ExecuteNoteDialogL
       
   113 // ----------------------------------------------------------------------------
       
   114 //
       
   115 void CBlidNoteDialog::ExecuteNoteDialog()
       
   116     {
       
   117     SetActive();  
       
   118     TRequestStatus *status = &iStatus;  
       
   119     User::RequestComplete(status, KErrNone);
       
   120     }
       
   121     
       
   122 //End of File
       
   123