uiacceltk/hitchcock/tsrc/alfdebugextension/inc/alfdebugserver.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 07:56:43 +0200
changeset 0 15bf7259bb7c
permissions -rw-r--r--
Revision: 201003

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


#ifndef T_ALFDEBUGSERVER_H
#define T_ALFDEBUGSERVER_H

#include <alf/alfextensionfactory.h>

class CHuiControlGroup;
class CMonitorControl;

class TAlfDebugHandler : public MAlfExtensionFactory
    {
public:
    MAlfExtension* CreateExtensionL(
        const TInt aObjectId, 
        const TDesC8& aInitialParams, 
        MAlfInterfaceProvider& aResolver );
    void Release();
    };
    
class CAlfDebugServer : public CBase, public MAlfExtension
    {
public:
    CAlfDebugServer( CHuiEnv& aEnv );
    ~CAlfDebugServer();
    virtual void Release();
    virtual TAny* GetInterface( const THuiInterfaceSupport& aInterface );
    virtual void HandleCmdL( TInt aCommandId, const TDesC8& aInputBuffer, TDes8& aResponse );
    
    void ShowFrameRateL( TInt aInterval );
    void ShowServerHeapL( TBool aShow );
    
private:
    void CreateControlIfNeededL();
    void DeteteControlIfNeeded();

private:
    CHuiEnv& iEnv;
    
    CHuiControlGroup* iGroup;
    CMonitorControl* iControl; 
    
    // For showing the framerate
    TInt iUsedFrameRateMonitorControlGroupId;
    
public:
    // 
    TInt iFpsUpdatePeriod;
    TInt iServerHeapUpdatePeriod;
    
    };


#endif // T_ALFDEBUGSERVER_H