os/kernelhwsrv/kerneltest/e32test/resourceman/resourceman_psl/rescontrol_extended_psl.h
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\resourceman\resourceman_psl\rescontrol_extended_psl.h
18 #ifndef __RESCONTROL_EXTENDED_PSL_H__
19 #define __RESCONTROL_EXTENDED_PSL_H__
21 //Macro to establish dependency between the specified resource
22 #define CREATE_DEPENDENCY_BETWEEN_NODES(pN1, pN2, pRes1, pRes2, priRes1, priRes2) \
23 pN1->iPriority = priRes1; \
24 pN1->iResource = pRes1; \
25 pN1->iPropagatedLevel = 0; \
26 pN1->iVisited = EFalse; \
27 pN2->iPriority = priRes2; \
28 pN2->iResource = pRes2; \
29 pN2->iPropagatedLevel = 0; \
30 pN2->iVisited = EFalse; \
31 pN1->iResource->AddNode(pN2); \
32 pN2->iResource->AddNode(pN1);
34 //class definition for multilevel single positive sense dependent resource
35 NONSHARABLE_CLASS(DMLSLGLSPDependResource) : public DStaticPowerResourceD
38 DMLSLGLSPDependResource();
39 TInt DoRequest(TPowerRequest &req);
40 TInt GetInfo(TDes8* aInfo) const;
41 TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
46 TInt iBlockTime; //Time duration the thread will be blocked.
49 //class definition for multilevel single negative sense dependent resource
50 NONSHARABLE_CLASS(DMLSIGLSNDependResource) : public DStaticPowerResourceD
53 DMLSIGLSNDependResource();
54 TInt DoRequest(TPowerRequest &req);
55 TInt GetInfo(TDes8* aInfo) const;
56 TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
61 TInt iBlockTime; //Time duration the thread will be blocked.
64 //class definition for binary single postive sense dependent resource
65 NONSHARABLE_CLASS(DBSIGLSPDependResource) : public DStaticPowerResourceD
68 DBSIGLSPDependResource();
69 TInt DoRequest(TPowerRequest &req);
70 TInt GetInfo(TDes8* aInfo) const;
71 TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
76 TInt iBlockTime; //Time duration the thread will be blocked.
79 //class definition for multilevel shared postive sense dependent resource
80 NONSHARABLE_CLASS(DMLSHIGLSPDependResource) : public DStaticPowerResourceD
83 DMLSHIGLSPDependResource();
84 TInt DoRequest(TPowerRequest &req);
85 TInt GetInfo(TDes8* aInfo) const;
86 TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
91 TInt iBlockTime; //Time duration the thread will be blocked.
94 //class definition for binary shared negative sense dependent resource
95 NONSHARABLE_CLASS(DBSHLGLSNDependResource) : public DStaticPowerResourceD
98 DBSHLGLSNDependResource();
99 TInt DoRequest(TPowerRequest &req);
100 TInt GetInfo(TDes8* aInfo) const;
101 TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
106 TInt iBlockTime; //Time duration the thread will be blocked.
109 //class definition for multilevel shared negative sense dependent resource
110 NONSHARABLE_CLASS(DMLSHLGLSNDependResource) : public DStaticPowerResourceD
113 DMLSHLGLSNDependResource();
114 TInt DoRequest(TPowerRequest &req);
115 TInt GetInfo(TDes8* aInfo) const;
116 TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
121 TInt iBlockTime; //Time duration the thread will be blocked.
124 //class definition for multilevel shared custom sense dependent resource
125 NONSHARABLE_CLASS(DMLSHLGLSCDependResource) : public DStaticPowerResourceD
128 DMLSHLGLSCDependResource();
129 TInt DoRequest(TPowerRequest &req);
130 TInt GetInfo(TDes8* aInfo) const;
131 TChangePropagationStatus TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState);
136 TInt iBlockTime; //Time duration the thread will be blocked.
139 #endif //__RESCONTROL_EXTENDED_PSL_H__