contentstorage/casrv/carunningappmonitor/inc/carunningapphandler.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 27 May 2010 13:11:12 +0300
changeset 80 397d00875918
parent 60 f62f87b200ec
permissions -rw-r--r--
Revision: 201019 Kit: 2010121

/*
* 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: carunnningapphandler.h
*
*/

#ifndef C_CARUNNINGAPPHANDLER_H
#define C_CARUNNINGAPPHANDLER_H

#include "carunningtaskhandler.h"
#include "casrvplugin.h"
#include <e32cmn.h>

class CCaStorageProxy;
/**
 * Class implement task handler and content storage plugin. 
 */
NONSHARABLE_CLASS( CCaRunningAppHandler ): public CCaSrvPlugin,
                                           public MCaRunningTaskHandler
    {
public:
    /**
     * Factory function. Create and initialize handler instance. 
     */
    static CCaRunningAppHandler* NewL( TPluginParams* aParams );
    
    /**
     * Destructor
     */
    ~CCaRunningAppHandler();

private:
    /**
     * First step construction.
     */
    CCaRunningAppHandler();
    
    /**
     * Second step construction. 
     */
    void ConstructL( CCaStorageProxy& aStorage );

private: //form MCaRunningTaskHandler
    /**
     * @see MCaRunningTaskHandler
     */
    void RegisterTaskL( CBase* aTask );
    
    /**
     * @see MCaRunningTaskHandler
     */
    void UnregisterTask( CBase* aTask );

private:
    /**
     * List of running tasks.
     * Own.
     */
    RPointerArray<CBase> iRunningTasks;
    };
#endif //C_CARUNNINGAPPHANDLER_H