idlehomescreen/widgetmanager/inc/wmprocessmonitor.h
branchRCL_3
changeset 9 f966699dea19
equal deleted inserted replaced
5:c743ef5928ba 9:f966699dea19
       
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __WMPROCESSMONITOR_
       
    19 #define __WMPROCESSMONITOR_
       
    20 
       
    21 //includes
       
    22 #include <e32base.h>
       
    23 
       
    24 // Forward declaration
       
    25 class RProcess;
       
    26 
       
    27 
       
    28 /**
       
    29  * CWmProcessMonitor 
       
    30  * Monitoring running process
       
    31  */
       
    32 NONSHARABLE_CLASS( CWmProcessMonitor ) : public CActive
       
    33     {
       
    34 public:
       
    35     /**
       
    36      * Two-phased constructors.
       
    37      */
       
    38     static CWmProcessMonitor* NewL();
       
    39     static CWmProcessMonitor* NewLC();
       
    40     
       
    41     /** Destructor */
       
    42     ~CWmProcessMonitor();
       
    43     
       
    44 private:    
       
    45     /** constructor */
       
    46     CWmProcessMonitor();
       
    47     
       
    48     /** 2nd phase constructor */
       
    49     void ConstructL();
       
    50     
       
    51 protected: // implementation of CActive
       
    52     /**
       
    53      * Implements cancellation of an outstanding request.
       
    54      * 
       
    55      * @see CActive::DoCancel
       
    56      */
       
    57     void DoCancel();
       
    58     
       
    59     /**
       
    60      * Handles an active object's request completion event.
       
    61      * 
       
    62      * @see CActive::RunL
       
    63      */
       
    64     void RunL();
       
    65     
       
    66     /**
       
    67      * RunError
       
    68      * 
       
    69      * @see CActive::RunError
       
    70      */
       
    71     TInt RunError(TInt aError);
       
    72     
       
    73 public:
       
    74 	/**
       
    75 	 * Starts monitoring process
       
    76 	 */
       
    77     void Monitor( RProcess& aProcess );
       
    78     
       
    79 private:
       
    80     
       
    81 	/** process to monitor*/
       
    82     RProcess iProcess;
       
    83     };
       
    84 
       
    85 #endif // __WMPROCESSMONITOR_