pnpmobileservices/pnpms/PnP/PnpProvisioningAppSrc/cwaitdialogmonitor.cpp
changeset 0 3ce708148e4d
child 54 9360ca28b668
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Contains the implementation of dialog monitor
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 //#include    <basched.h>
       
    22 #include    "PnpProvisioningSaver.h"
       
    23 #include    "cwaitdialogmonitor.h"
       
    24 #include    "mwaitdialogstatusnotifier.h"
       
    25 
       
    26 // EXTERNAL DATA STRUCTURES
       
    27 // None
       
    28 
       
    29 // EXTERNAL FUNCTION PROTOTYPES  
       
    30 // None
       
    31 
       
    32 // CONSTANTS
       
    33 // PhoneModule name
       
    34 
       
    35 
       
    36 // MACROS
       
    37 // None
       
    38 
       
    39 // LOCAL CONSTANTS AND MACROS
       
    40 // None
       
    41 
       
    42 // MODULE DATA STRUCTURES
       
    43 // None
       
    44 
       
    45 // LOCAL FUNCTION PROTOTYPES
       
    46 // None
       
    47 
       
    48 // FORWARD DECLARATIONS
       
    49 // None
       
    50 
       
    51 // ============================= LOCAL FUNCTIONS ===============================
       
    52 // None
       
    53 
       
    54 // ============================ MEMBER FUNCTIONS ===============================
       
    55 
       
    56 // -----------------------------------------------------------------------------
       
    57 // CWaitDialogMonitor::CWaitDialogMonitor
       
    58 // C++ default constructor can NOT contain any code, that
       
    59 // might leave.
       
    60 // -----------------------------------------------------------------------------
       
    61 //
       
    62 
       
    63 CWaitDialogMonitor::CWaitDialogMonitor( MWaitDialogStatusNotifier& aNotifier ) :
       
    64     CActive( CActive::EPriorityStandard ),
       
    65     iNotifier( aNotifier )
       
    66     {
       
    67     }
       
    68 
       
    69 
       
    70 // -----------------------------------------------------------------------------
       
    71 // CWaitDialogMonitor::ConstructL
       
    72 // Symbian 2nd phase constructor can leave.
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 void CWaitDialogMonitor::ConstructL()
       
    76     {
       
    77     CActiveScheduler::Add(this); 
       
    78     }
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // CWaitDialogMonitor::NewL
       
    82 // Two-phased constructor.
       
    83 // -----------------------------------------------------------------------------
       
    84 //
       
    85 CWaitDialogMonitor* CWaitDialogMonitor::NewL( MWaitDialogStatusNotifier& aNotifier )
       
    86     {
       
    87     CWaitDialogMonitor* self = new( ELeave ) CWaitDialogMonitor( aNotifier );    
       
    88     CleanupStack::PushL( self );
       
    89     self->ConstructL();
       
    90     CleanupStack::Pop();
       
    91     return self;
       
    92     }
       
    93     
       
    94 // Destructor
       
    95 CWaitDialogMonitor::~CWaitDialogMonitor()
       
    96     {
       
    97     if( IsActive() )
       
    98         {
       
    99         Cancel();
       
   100         }
       
   101     }
       
   102 
       
   103 void CWaitDialogMonitor::Start()
       
   104     {
       
   105     if( IsActive() )
       
   106         {
       
   107         Cancel();
       
   108         }
       
   109     SetActive();
       
   110     }
       
   111 
       
   112 void CWaitDialogMonitor::DoCancel()
       
   113     {
       
   114     }
       
   115 
       
   116 // -----------------------------------------------------------------------------
       
   117 // CWaitDialogMonitor::RunL()
       
   118 // Handles object’s request completion event
       
   119 // (other items were commented in a header).
       
   120 // -----------------------------------------------------------------------------
       
   121 //
       
   122 void CWaitDialogMonitor::RunL()
       
   123     {
       
   124     //LOGSTRING("Enter to CWaitDialogMonitor::RunL() ");
       
   125     //LOGSTRING2( "CWaitDialogMonitor status %i" , iStatus.Int() );
       
   126 
       
   127     iNotifier.WaitDialogDismissedL( iStatus.Int() );
       
   128     }
       
   129 
       
   130 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   131 
       
   132 // None
       
   133 
       
   134 //  End of File