os/kernelhwsrv/kerneltest/e32test/resourceman/dynamicresource.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/resourceman/dynamicresource.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,137 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// e32test\resourceman\dynamicresource.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef __DYNAMICRESOURCE_H__
    1.22 +#define __DYNAMICRESOURCE_H__
    1.23 +
    1.24 +//Class definitions of dynamic resource
    1.25 +//Binary single postive dynamic resource
    1.26 +NONSHARABLE_CLASS(DBIGISSPDynamicResource) : public DDynamicPowerResource
    1.27 +	{
    1.28 +public:
    1.29 +	DBIGISSPDynamicResource();
    1.30 +	TInt DoRequest(TPowerRequest &req);
    1.31 +	TInt GetInfo(TDes8* aInfo) const;
    1.32 +private:
    1.33 +	TInt iMinLevel;
    1.34 +	TInt iMaxLevel;
    1.35 +	TInt iCurrentLevel;
    1.36 +	};
    1.37 +
    1.38 +//Multilevel shared negative dynamic resource
    1.39 +NONSHARABLE_CLASS(DMLIGLSSHNDynamicResource) : public DDynamicPowerResource
    1.40 +	{
    1.41 +public:
    1.42 +	DMLIGLSSHNDynamicResource();
    1.43 +	TInt DoRequest(TPowerRequest &req);
    1.44 +	TInt GetInfo(TDes8* aInfo) const;
    1.45 +private:
    1.46 +	TInt iMinLevel;
    1.47 +	TInt iMaxLevel;
    1.48 +	TInt iCurrentLevel;
    1.49 +	TInt iBlockTime;
    1.50 +	};
    1.51 +
    1.52 +//Binary shared negative dynamic resource
    1.53 +NONSHARABLE_CLASS(DBLGLSSHNDynamicResource) : public DDynamicPowerResource
    1.54 +	{
    1.55 +public:
    1.56 +	DBLGLSSHNDynamicResource();
    1.57 +	TInt DoRequest(TPowerRequest &req);
    1.58 +	TInt GetInfo(TDes8* aInfo) const;
    1.59 +private:
    1.60 +	TInt iMinLevel;
    1.61 +	TInt iMaxLevel;
    1.62 +	TInt iCurrentLevel;
    1.63 +	TInt iBlockTime;
    1.64 +	};
    1.65 +
    1.66 +//Multilevel shared postive dynamic resource
    1.67 +NONSHARABLE_CLASS(DMLLGLSSHPDynamicResource) : public DDynamicPowerResource
    1.68 +	{
    1.69 +public:
    1.70 +	DMLLGLSSHPDynamicResource();
    1.71 +	TInt DoRequest(TPowerRequest &req);
    1.72 +	TInt GetInfo(TDes8* aInfo) const;
    1.73 +private:
    1.74 +	TInt iMinLevel;
    1.75 +	TInt iMaxLevel;
    1.76 +	TInt iCurrentLevel;
    1.77 +	TInt iBlockTime;
    1.78 +	};
    1.79 +
    1.80 +//Multilevel single positive dynamic dependent resource
    1.81 +NONSHARABLE_CLASS(DDynamicResourceD01) : public DDynamicPowerResourceD
    1.82 +	{
    1.83 +public:
    1.84 +	DDynamicResourceD01();
    1.85 +	TInt DoRequest(TPowerRequest &req);
    1.86 +	TInt GetInfo(TDes8* aInfo) const;
    1.87 +	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
    1.88 +private:
    1.89 +	TInt iMinLevel;
    1.90 +	TInt iMaxLevel;
    1.91 +	TInt iCurrentLevel;
    1.92 +	TInt iBlockTime;
    1.93 +	};
    1.94 +	
    1.95 +//Binary shared positive dynamic dependent resource
    1.96 +NONSHARABLE_CLASS(DDynamicResourceD02) : public DDynamicPowerResourceD
    1.97 +	{
    1.98 +public:
    1.99 +	DDynamicResourceD02();
   1.100 +	TInt DoRequest(TPowerRequest &req);
   1.101 +	TInt GetInfo(TDes8* aInfo) const;
   1.102 +	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
   1.103 +private:
   1.104 +	TInt iMinLevel;
   1.105 +	TInt iMaxLevel;
   1.106 +	TInt iCurrentLevel;
   1.107 +	TInt iBlockTime;
   1.108 +	};
   1.109 +
   1.110 +//Multilevel shared negative dependent resource
   1.111 +NONSHARABLE_CLASS(DDynamicResourceD03) : public DDynamicPowerResourceD
   1.112 +	{
   1.113 +public:
   1.114 +	DDynamicResourceD03();
   1.115 +	TInt DoRequest(TPowerRequest &req);
   1.116 +	TInt GetInfo(TDes8* aInfo) const;
   1.117 +	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
   1.118 +private:
   1.119 +	TInt iMinLevel;
   1.120 +	TInt iMaxLevel;
   1.121 +	TInt iCurrentLevel;
   1.122 +	TInt iBlockTime;
   1.123 +	};
   1.124 +
   1.125 +//Binary single positive dependent resource
   1.126 +NONSHARABLE_CLASS(DDynamicResourceD04) : public DDynamicPowerResourceD
   1.127 +	{
   1.128 +public:
   1.129 +	DDynamicResourceD04();
   1.130 +	TInt DoRequest(TPowerRequest &req);
   1.131 +	TInt GetInfo(TDes8* aInfo) const;
   1.132 +	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
   1.133 +private:
   1.134 +	TInt iMinLevel;
   1.135 +	TInt iMaxLevel;
   1.136 +	TInt iCurrentLevel;
   1.137 +	TInt iBlockTime;
   1.138 +	};
   1.139 +
   1.140 +#endif /*__DYANMICRESOURCE_H__*/