sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\resourceman\dynamicresource.h sl@0: // sl@0: // sl@0: sl@0: #ifndef __DYNAMICRESOURCE_H__ sl@0: #define __DYNAMICRESOURCE_H__ sl@0: sl@0: //Class definitions of dynamic resource sl@0: //Binary single postive dynamic resource sl@0: NONSHARABLE_CLASS(DBIGISSPDynamicResource) : public DDynamicPowerResource sl@0: { sl@0: public: sl@0: DBIGISSPDynamicResource(); sl@0: TInt DoRequest(TPowerRequest &req); sl@0: TInt GetInfo(TDes8* aInfo) const; sl@0: private: sl@0: TInt iMinLevel; sl@0: TInt iMaxLevel; sl@0: TInt iCurrentLevel; sl@0: }; sl@0: sl@0: //Multilevel shared negative dynamic resource sl@0: NONSHARABLE_CLASS(DMLIGLSSHNDynamicResource) : public DDynamicPowerResource sl@0: { sl@0: public: sl@0: DMLIGLSSHNDynamicResource(); sl@0: TInt DoRequest(TPowerRequest &req); sl@0: TInt GetInfo(TDes8* aInfo) const; sl@0: private: sl@0: TInt iMinLevel; sl@0: TInt iMaxLevel; sl@0: TInt iCurrentLevel; sl@0: TInt iBlockTime; sl@0: }; sl@0: sl@0: //Binary shared negative dynamic resource sl@0: NONSHARABLE_CLASS(DBLGLSSHNDynamicResource) : public DDynamicPowerResource sl@0: { sl@0: public: sl@0: DBLGLSSHNDynamicResource(); sl@0: TInt DoRequest(TPowerRequest &req); sl@0: TInt GetInfo(TDes8* aInfo) const; sl@0: private: sl@0: TInt iMinLevel; sl@0: TInt iMaxLevel; sl@0: TInt iCurrentLevel; sl@0: TInt iBlockTime; sl@0: }; sl@0: sl@0: //Multilevel shared postive dynamic resource sl@0: NONSHARABLE_CLASS(DMLLGLSSHPDynamicResource) : public DDynamicPowerResource sl@0: { sl@0: public: sl@0: DMLLGLSSHPDynamicResource(); sl@0: TInt DoRequest(TPowerRequest &req); sl@0: TInt GetInfo(TDes8* aInfo) const; sl@0: private: sl@0: TInt iMinLevel; sl@0: TInt iMaxLevel; sl@0: TInt iCurrentLevel; sl@0: TInt iBlockTime; sl@0: }; sl@0: sl@0: //Multilevel single positive dynamic dependent resource sl@0: NONSHARABLE_CLASS(DDynamicResourceD01) : public DDynamicPowerResourceD sl@0: { sl@0: public: sl@0: DDynamicResourceD01(); sl@0: TInt DoRequest(TPowerRequest &req); sl@0: TInt GetInfo(TDes8* aInfo) const; sl@0: TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState); sl@0: private: sl@0: TInt iMinLevel; sl@0: TInt iMaxLevel; sl@0: TInt iCurrentLevel; sl@0: TInt iBlockTime; sl@0: }; sl@0: sl@0: //Binary shared positive dynamic dependent resource sl@0: NONSHARABLE_CLASS(DDynamicResourceD02) : public DDynamicPowerResourceD sl@0: { sl@0: public: sl@0: DDynamicResourceD02(); sl@0: TInt DoRequest(TPowerRequest &req); sl@0: TInt GetInfo(TDes8* aInfo) const; sl@0: TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState); sl@0: private: sl@0: TInt iMinLevel; sl@0: TInt iMaxLevel; sl@0: TInt iCurrentLevel; sl@0: TInt iBlockTime; sl@0: }; sl@0: sl@0: //Multilevel shared negative dependent resource sl@0: NONSHARABLE_CLASS(DDynamicResourceD03) : public DDynamicPowerResourceD sl@0: { sl@0: public: sl@0: DDynamicResourceD03(); sl@0: TInt DoRequest(TPowerRequest &req); sl@0: TInt GetInfo(TDes8* aInfo) const; sl@0: TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState); sl@0: private: sl@0: TInt iMinLevel; sl@0: TInt iMaxLevel; sl@0: TInt iCurrentLevel; sl@0: TInt iBlockTime; sl@0: }; sl@0: sl@0: //Binary single positive dependent resource sl@0: NONSHARABLE_CLASS(DDynamicResourceD04) : public DDynamicPowerResourceD sl@0: { sl@0: public: sl@0: DDynamicResourceD04(); sl@0: TInt DoRequest(TPowerRequest &req); sl@0: TInt GetInfo(TDes8* aInfo) const; sl@0: TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState); sl@0: private: sl@0: TInt iMinLevel; sl@0: TInt iMaxLevel; sl@0: TInt iCurrentLevel; sl@0: TInt iBlockTime; sl@0: }; sl@0: sl@0: #endif /*__DYANMICRESOURCE_H__*/