idlehomescreen/widgetmanager/inc/wmprocessmonitor.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 21 Jun 2010 15:27:11 +0300
branchRCL_3
changeset 28 d721605b30d0
parent 9 f966699dea19
permissions -rw-r--r--
Revision: 201023 Kit: 2010125

/*
* Copyright (c) 2009 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:
*
*/

#ifndef __WMPROCESSMONITOR_
#define __WMPROCESSMONITOR_

//includes
#include <e32base.h>

// Forward declaration
class RProcess;


/**
 * CWmProcessMonitor 
 * Monitoring running process
 */
NONSHARABLE_CLASS( CWmProcessMonitor ) : public CActive
    {
public:
    /**
     * Two-phased constructors.
     */
    static CWmProcessMonitor* NewL();
    static CWmProcessMonitor* NewLC();
    
    /** Destructor */
    ~CWmProcessMonitor();
    
private:    
    /** constructor */
    CWmProcessMonitor();
    
    /** 2nd phase constructor */
    void ConstructL();
    
protected: // implementation of CActive
    /**
     * Implements cancellation of an outstanding request.
     * 
     * @see CActive::DoCancel
     */
    void DoCancel();
    
    /**
     * Handles an active object's request completion event.
     * 
     * @see CActive::RunL
     */
    void RunL();
    
    /**
     * RunError
     * 
     * @see CActive::RunError
     */
    TInt RunError(TInt aError);
    
public:
	/**
	 * Starts monitoring process
	 */
    void Monitor( RProcess& aProcess );
    
private:
    
	/** process to monitor*/
    RProcess iProcess;
    };

#endif // __WMPROCESSMONITOR_