os/kernelhwsrv/kerneltest/e32test/resourceman/dynamicresource.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // e32test\resourceman\dynamicresource.h
    15 // 
    16 //
    17 
    18 #ifndef __DYNAMICRESOURCE_H__
    19 #define __DYNAMICRESOURCE_H__
    20 
    21 //Class definitions of dynamic resource
    22 //Binary single postive dynamic resource
    23 NONSHARABLE_CLASS(DBIGISSPDynamicResource) : public DDynamicPowerResource
    24 	{
    25 public:
    26 	DBIGISSPDynamicResource();
    27 	TInt DoRequest(TPowerRequest &req);
    28 	TInt GetInfo(TDes8* aInfo) const;
    29 private:
    30 	TInt iMinLevel;
    31 	TInt iMaxLevel;
    32 	TInt iCurrentLevel;
    33 	};
    34 
    35 //Multilevel shared negative dynamic resource
    36 NONSHARABLE_CLASS(DMLIGLSSHNDynamicResource) : public DDynamicPowerResource
    37 	{
    38 public:
    39 	DMLIGLSSHNDynamicResource();
    40 	TInt DoRequest(TPowerRequest &req);
    41 	TInt GetInfo(TDes8* aInfo) const;
    42 private:
    43 	TInt iMinLevel;
    44 	TInt iMaxLevel;
    45 	TInt iCurrentLevel;
    46 	TInt iBlockTime;
    47 	};
    48 
    49 //Binary shared negative dynamic resource
    50 NONSHARABLE_CLASS(DBLGLSSHNDynamicResource) : public DDynamicPowerResource
    51 	{
    52 public:
    53 	DBLGLSSHNDynamicResource();
    54 	TInt DoRequest(TPowerRequest &req);
    55 	TInt GetInfo(TDes8* aInfo) const;
    56 private:
    57 	TInt iMinLevel;
    58 	TInt iMaxLevel;
    59 	TInt iCurrentLevel;
    60 	TInt iBlockTime;
    61 	};
    62 
    63 //Multilevel shared postive dynamic resource
    64 NONSHARABLE_CLASS(DMLLGLSSHPDynamicResource) : public DDynamicPowerResource
    65 	{
    66 public:
    67 	DMLLGLSSHPDynamicResource();
    68 	TInt DoRequest(TPowerRequest &req);
    69 	TInt GetInfo(TDes8* aInfo) const;
    70 private:
    71 	TInt iMinLevel;
    72 	TInt iMaxLevel;
    73 	TInt iCurrentLevel;
    74 	TInt iBlockTime;
    75 	};
    76 
    77 //Multilevel single positive dynamic dependent resource
    78 NONSHARABLE_CLASS(DDynamicResourceD01) : public DDynamicPowerResourceD
    79 	{
    80 public:
    81 	DDynamicResourceD01();
    82 	TInt DoRequest(TPowerRequest &req);
    83 	TInt GetInfo(TDes8* aInfo) const;
    84 	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
    85 private:
    86 	TInt iMinLevel;
    87 	TInt iMaxLevel;
    88 	TInt iCurrentLevel;
    89 	TInt iBlockTime;
    90 	};
    91 	
    92 //Binary shared positive dynamic dependent resource
    93 NONSHARABLE_CLASS(DDynamicResourceD02) : public DDynamicPowerResourceD
    94 	{
    95 public:
    96 	DDynamicResourceD02();
    97 	TInt DoRequest(TPowerRequest &req);
    98 	TInt GetInfo(TDes8* aInfo) const;
    99 	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
   100 private:
   101 	TInt iMinLevel;
   102 	TInt iMaxLevel;
   103 	TInt iCurrentLevel;
   104 	TInt iBlockTime;
   105 	};
   106 
   107 //Multilevel shared negative dependent resource
   108 NONSHARABLE_CLASS(DDynamicResourceD03) : public DDynamicPowerResourceD
   109 	{
   110 public:
   111 	DDynamicResourceD03();
   112 	TInt DoRequest(TPowerRequest &req);
   113 	TInt GetInfo(TDes8* aInfo) const;
   114 	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
   115 private:
   116 	TInt iMinLevel;
   117 	TInt iMaxLevel;
   118 	TInt iCurrentLevel;
   119 	TInt iBlockTime;
   120 	};
   121 
   122 //Binary single positive dependent resource
   123 NONSHARABLE_CLASS(DDynamicResourceD04) : public DDynamicPowerResourceD
   124 	{
   125 public:
   126 	DDynamicResourceD04();
   127 	TInt DoRequest(TPowerRequest &req);
   128 	TInt GetInfo(TDes8* aInfo) const;
   129 	TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
   130 private:
   131 	TInt iMinLevel;
   132 	TInt iMaxLevel;
   133 	TInt iCurrentLevel;
   134 	TInt iBlockTime;
   135 	};
   136 
   137 #endif /*__DYANMICRESOURCE_H__*/