os/kernelhwsrv/kerneltest/e32test/resourceman/resourceman_psl/rescontrol_extended_psl.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// e32test\resourceman\resourceman_psl\rescontrol_extended_psl.cpp
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#include "rescontrol_psl.h"
sl@0
    19
#include "rescontrol_extended_psl.h"
sl@0
    20
sl@0
    21
/** 
sl@0
    22
	This function creates all static resources which support dependencies and establishes
sl@0
    23
	the dependencies between them. This is called by PIL.
sl@0
    24
	Following is the dependency tree input
sl@0
    25
	ResourceA <----------------> ResourceD <------------->ResourceE <--------------> ResourceC
sl@0
    26
									|						  |
sl@0
    27
									|						  |
sl@0
    28
									|						  |	
sl@0
    29
									|						  |	
sl@0
    30
									|						  |
sl@0
    31
									|						  |
sl@0
    32
								ResourceF				   ResourceG	
sl@0
    33
	*/
sl@0
    34
TInt DSimulatedPowerResourceController::DoRegisterStaticResourcesDependency(DStaticPowerResourceD**& aStaticResourceDArray, TUint16& aStaticResourceDCount)
sl@0
    35
	{
sl@0
    36
	Kern::Printf(">DSimulatedPowerResourceController::DoRegisterStaticResourcesDependency");
sl@0
    37
	aStaticResourceDArray = (DStaticPowerResourceD**)new(DStaticPowerResourceD*[MAX_DEPENDENT_RESOURCE_COUNT]);
sl@0
    38
	if(!aStaticResourceDArray)
sl@0
    39
		return KErrNoMemory;
sl@0
    40
	DStaticPowerResourceD* pR = NULL;
sl@0
    41
	pR = new DMLSLGLSPDependResource();
sl@0
    42
	if(!pR)
sl@0
    43
		CLEAN_AND_RETURN(iStaticResDependencyCount, aStaticResourceDArray, KErrNoMemory)
sl@0
    44
	aStaticResourceDArray[iStaticResDependencyCount++] = pR;
sl@0
    45
sl@0
    46
	pR = new DMLSIGLSNDependResource();
sl@0
    47
	if(!pR)
sl@0
    48
		CLEAN_AND_RETURN(iStaticResDependencyCount, aStaticResourceDArray, KErrNoMemory)
sl@0
    49
	aStaticResourceDArray[iStaticResDependencyCount++] = pR;
sl@0
    50
	
sl@0
    51
	pR = new DBSIGLSPDependResource();
sl@0
    52
	if(!pR)
sl@0
    53
		CLEAN_AND_RETURN(iStaticResDependencyCount, aStaticResourceDArray, KErrNoMemory)
sl@0
    54
	aStaticResourceDArray[iStaticResDependencyCount++] = pR;
sl@0
    55
sl@0
    56
	pR = new DMLSHIGLSPDependResource();
sl@0
    57
	if(!pR)
sl@0
    58
		CLEAN_AND_RETURN(iStaticResDependencyCount, aStaticResourceDArray, KErrNoMemory)
sl@0
    59
	aStaticResourceDArray[iStaticResDependencyCount++] = pR;
sl@0
    60
sl@0
    61
	pR = new DBSHLGLSNDependResource();
sl@0
    62
	if(!pR)
sl@0
    63
		CLEAN_AND_RETURN(iStaticResDependencyCount, aStaticResourceDArray, KErrNoMemory)
sl@0
    64
	aStaticResourceDArray[iStaticResDependencyCount++] = pR;
sl@0
    65
sl@0
    66
	pR = new DMLSHLGLSNDependResource();
sl@0
    67
	if(!pR)
sl@0
    68
		CLEAN_AND_RETURN(iStaticResDependencyCount, aStaticResourceDArray, KErrNoMemory)
sl@0
    69
	aStaticResourceDArray[iStaticResDependencyCount++] = pR;
sl@0
    70
sl@0
    71
	//Establish resource dependencies
sl@0
    72
	if(CreateResourceDependency(aStaticResourceDArray))
sl@0
    73
		CLEAN_AND_RETURN(iStaticResDependencyCount, aStaticResourceDArray, KErrNoMemory)
sl@0
    74
sl@0
    75
	iDependencyResources = aStaticResourceDArray;
sl@0
    76
sl@0
    77
	aStaticResourceDCount = iStaticResDependencyCount;
sl@0
    78
	return KErrNone;
sl@0
    79
	}
sl@0
    80
sl@0
    81
sl@0
    82
// This function establishes above dependency between static dependent resource
sl@0
    83
TInt DSimulatedPowerResourceController::CreateResourceDependency(DStaticPowerResourceD** pResArray)
sl@0
    84
	{
sl@0
    85
	iNodeArray = new SNode[10];
sl@0
    86
	SNode* pN1;
sl@0
    87
	SNode* pN2;
sl@0
    88
	iNodeCount = 0;
sl@0
    89
sl@0
    90
	if(!iNodeArray)
sl@0
    91
		return KErrNoMemory;
sl@0
    92
	//Create Dependency between Resource A and Resource D 
sl@0
    93
	pN1 = &iNodeArray[iNodeCount++];
sl@0
    94
	pN2 = &iNodeArray[iNodeCount++];
sl@0
    95
	CREATE_DEPENDENCY_BETWEEN_NODES(pN1, pN2, pResArray[0], pResArray[1], 1, 1)
sl@0
    96
sl@0
    97
	//Create Dependency between Resource D and Resource F
sl@0
    98
	//Trying to add with the same priority and check whether KErrAlreadyExists is returned.
sl@0
    99
	pN1 = &iNodeArray[iNodeCount++];
sl@0
   100
	pN2 = &iNodeArray[iNodeCount++];
sl@0
   101
	pN1->iPriority = 1;																
sl@0
   102
	pN1->iResource = pResArray[0];															
sl@0
   103
	pN1->iPropagatedLevel = 0;																
sl@0
   104
	pN1->iVisited = EFalse;															
sl@0
   105
	
sl@0
   106
	pN2->iPriority = 1;																
sl@0
   107
	pN2->iResource = pResArray[2];																
sl@0
   108
	pN2->iPropagatedLevel = 0;																
sl@0
   109
	pN2->iVisited = EFalse;																	
sl@0
   110
	pN2->iResource->AddNode(pN1);
sl@0
   111
sl@0
   112
	TInt r = pN1->iResource->AddNode(pN2);
sl@0
   113
	if(r != KErrAlreadyExists)
sl@0
   114
		Kern::Fault("Power Resource Controller", __LINE__);
sl@0
   115
sl@0
   116
	pN2->iPriority = 3;
sl@0
   117
	r = pN1->iResource->AddNode(pN2);
sl@0
   118
	if(r != KErrNone)
sl@0
   119
		Kern::Fault("Power Resource Controller", __LINE__);
sl@0
   120
sl@0
   121
	//Create Dependency between Resource D and Resource E
sl@0
   122
	pN1 = &iNodeArray[iNodeCount++];
sl@0
   123
	pN2 = &iNodeArray[iNodeCount++];
sl@0
   124
	CREATE_DEPENDENCY_BETWEEN_NODES(pN1, pN2, pResArray[0], pResArray[3], 3, 2)
sl@0
   125
sl@0
   126
	//Create Dependency between Resource E and Resource C
sl@0
   127
	pN1 = &iNodeArray[iNodeCount++];
sl@0
   128
	pN2 = &iNodeArray[iNodeCount++];
sl@0
   129
	CREATE_DEPENDENCY_BETWEEN_NODES(pN1, pN2, pResArray[3], pResArray[4], 1, 1)
sl@0
   130
sl@0
   131
	//Create Dependency between Resource E and Resource G
sl@0
   132
	pN1 = &iNodeArray[iNodeCount++];
sl@0
   133
	pN2 = &iNodeArray[iNodeCount++];
sl@0
   134
	CREATE_DEPENDENCY_BETWEEN_NODES(pN1, pN2, pResArray[3], pResArray[5], 1, 2)
sl@0
   135
sl@0
   136
	return KErrNone;
sl@0
   137
	}
sl@0
   138
sl@0
   139
//Constructors of all resources
sl@0
   140
_LIT(KDMLSLGLSPDependResource, "StaticDependResourceD");
sl@0
   141
DMLSLGLSPDependResource::DMLSLGLSPDependResource() : DStaticPowerResourceD(KDMLSLGLSPDependResource, -100), iMinLevel(-100), iMaxLevel(100), iCurrentLevel(-100)
sl@0
   142
	{
sl@0
   143
	iFlags = KMultiLevel | KLongLatencyGet | KLongLatencySet;
sl@0
   144
	NKern::LockSystem();
sl@0
   145
	iBlockTime = MIN_BLOCK_TIME + Kern::Random() % MAX_BLOCK_TIME;
sl@0
   146
	NKern::UnlockSystem();
sl@0
   147
	}
sl@0
   148
sl@0
   149
_LIT(KDMLSIGLSNDependResource, "StaticDependResourceA");
sl@0
   150
DMLSIGLSNDependResource::DMLSIGLSNDependResource() : DStaticPowerResourceD(KDMLSIGLSNDependResource, -10), iMinLevel(-10), iMaxLevel(-20), iCurrentLevel(-10)
sl@0
   151
	{
sl@0
   152
	iFlags = KMultiLevel | KLongLatencySet | KSenseNegative;
sl@0
   153
	NKern::LockSystem();
sl@0
   154
	iBlockTime = MIN_BLOCK_TIME + Kern::Random() % MAX_BLOCK_TIME;
sl@0
   155
	NKern::UnlockSystem();
sl@0
   156
	}
sl@0
   157
sl@0
   158
_LIT(KDBSIGLSPDependResource, "StaticDependResourceF");
sl@0
   159
DBSIGLSPDependResource::DBSIGLSPDependResource() : DStaticPowerResourceD(KDBSIGLSPDependResource, 0), iMinLevel(0), iMaxLevel(1), iCurrentLevel(0)
sl@0
   160
	{
sl@0
   161
	iFlags = KBinary | KLongLatencySet;
sl@0
   162
	NKern::LockSystem();
sl@0
   163
	iBlockTime = MIN_BLOCK_TIME  + Kern::Random() % MAX_BLOCK_TIME;
sl@0
   164
	NKern::UnlockSystem();
sl@0
   165
	}
sl@0
   166
sl@0
   167
_LIT(KDMLSHIGLSPDependResource, "StaticDependResourceE");
sl@0
   168
DMLSHIGLSPDependResource::DMLSHIGLSPDependResource() : DStaticPowerResourceD(KDMLSHIGLSPDependResource, 10), iMinLevel(10), iMaxLevel(75), iCurrentLevel(10)
sl@0
   169
	{
sl@0
   170
	// Make it a Instantaneous Resource.
sl@0
   171
	iFlags = KMultiLevel | KShared;
sl@0
   172
	NKern::LockSystem();
sl@0
   173
	iBlockTime = MIN_BLOCK_TIME + Kern::Random() % MAX_BLOCK_TIME;
sl@0
   174
	NKern::UnlockSystem();
sl@0
   175
	}
sl@0
   176
sl@0
   177
_LIT(KDBSHLGLSNDependResource, "StaticDependResourceC");
sl@0
   178
DBSHLGLSNDependResource::DBSHLGLSNDependResource() : DStaticPowerResourceD(KDBSHLGLSNDependResource, 1), iMinLevel(1), iMaxLevel(0), iCurrentLevel(1)
sl@0
   179
	{
sl@0
   180
	iFlags = KBinary | KLongLatencyGet | KLongLatencySet | KShared | KSenseNegative;
sl@0
   181
	NKern::LockSystem();
sl@0
   182
	iBlockTime = MIN_BLOCK_TIME  + Kern::Random() % MAX_BLOCK_TIME;
sl@0
   183
	NKern::UnlockSystem();
sl@0
   184
	}
sl@0
   185
sl@0
   186
_LIT(KDMLSHLGLSNDependResource, "StaticDependResourceG");
sl@0
   187
DMLSHLGLSNDependResource::DMLSHLGLSNDependResource() : DStaticPowerResourceD(KDMLSHLGLSNDependResource, 75), iMinLevel(75), iMaxLevel(30), iCurrentLevel(75)
sl@0
   188
	{
sl@0
   189
	iFlags = KMultiLevel | KLongLatencyGet | KLongLatencySet | KShared | KSenseNegative;
sl@0
   190
	NKern::LockSystem();
sl@0
   191
	iBlockTime = MIN_BLOCK_TIME  + Kern::Random() % MAX_BLOCK_TIME;
sl@0
   192
	NKern::UnlockSystem();
sl@0
   193
	}
sl@0
   194
sl@0
   195
_LIT(KDMLSHLGLSCDependResource, "DMLSHLGLSCDependResource");
sl@0
   196
DMLSHLGLSCDependResource::DMLSHLGLSCDependResource() : DStaticPowerResourceD(KDMLSHLGLSCDependResource, -100), iMinLevel(-100), iMaxLevel(100), iCurrentLevel(-100)
sl@0
   197
	{
sl@0
   198
	iFlags = KMultiLevel;
sl@0
   199
	NKern::LockSystem();
sl@0
   200
	iBlockTime = MIN_BLOCK_TIME + Kern::Random() % MAX_BLOCK_TIME;
sl@0
   201
	NKern::UnlockSystem();
sl@0
   202
	}
sl@0
   203
sl@0
   204
//Implementation of handle dependent state for all resources
sl@0
   205
TChangePropagationStatus DMLSLGLSPDependResource::TranslateDependentState(TInt /*aDepId*/, TInt /*aDepState*/, TInt& /*aResState*/)
sl@0
   206
	{
sl@0
   207
	//This resources changes only when the client asks to change
sl@0
   208
	return ENoChange;
sl@0
   209
	}
sl@0
   210
sl@0
   211
TChangePropagationStatus DMLSIGLSNDependResource::TranslateDependentState(TInt /*aDepId*/, TInt aDepState, TInt& aResState)
sl@0
   212
	{
sl@0
   213
	if(aDepState == -100)
sl@0
   214
		{
sl@0
   215
		aResState = iMinLevel;
sl@0
   216
		return EChange;
sl@0
   217
		}
sl@0
   218
	if(aDepState < 0)
sl@0
   219
		{
sl@0
   220
		aResState = iCurrentLevel > -15 ? iCurrentLevel-1 : -15;
sl@0
   221
		if(aResState == iCurrentLevel)
sl@0
   222
			return ENoChange;
sl@0
   223
		return EChange;
sl@0
   224
		}
sl@0
   225
	aResState = iCurrentLevel > iMaxLevel ? iCurrentLevel-1 : iMaxLevel;
sl@0
   226
	if(aResState == iCurrentLevel)
sl@0
   227
		return ENoChange;
sl@0
   228
	return EChange;
sl@0
   229
	}
sl@0
   230
sl@0
   231
TChangePropagationStatus DBSIGLSPDependResource::TranslateDependentState(TInt /*aDepId*/, TInt aDepState, TInt& aResState)
sl@0
   232
	{
sl@0
   233
	if(aDepState == -100)
sl@0
   234
		{
sl@0
   235
		aResState = iMinLevel;
sl@0
   236
		return EChange;
sl@0
   237
		}
sl@0
   238
	if(iCurrentLevel == E_ON)
sl@0
   239
		return ENoChange;
sl@0
   240
	aResState = iMaxLevel;
sl@0
   241
	return EChange;
sl@0
   242
	}
sl@0
   243
sl@0
   244
TChangePropagationStatus DMLSHIGLSPDependResource::TranslateDependentState(TInt aDepId, TInt aDepState, TInt& aResState)
sl@0
   245
	{
sl@0
   246
	if((aDepId & ID_INDEX_BIT_MASK) != 0x1)
sl@0
   247
		return ENoChange;
sl@0
   248
	if(aDepState == -100)
sl@0
   249
		{
sl@0
   250
		aResState = iMinLevel;
sl@0
   251
		return EChange;
sl@0
   252
		}
sl@0
   253
	aResState = iCurrentLevel + 3;
sl@0
   254
	if(aResState == iMaxLevel)
sl@0
   255
		return ENoChange;
sl@0
   256
	return EChange;
sl@0
   257
	}
sl@0
   258
sl@0
   259
TChangePropagationStatus DBSHLGLSNDependResource::TranslateDependentState(TInt /*aDepId*/, TInt aDepState, TInt& aResState)
sl@0
   260
	{
sl@0
   261
	if(aDepState == 10)
sl@0
   262
		{
sl@0
   263
		aResState = iMinLevel;
sl@0
   264
		return EChange;
sl@0
   265
		}
sl@0
   266
	if(iCurrentLevel == iMaxLevel)
sl@0
   267
		return ENoChange;
sl@0
   268
	aResState = iMaxLevel;
sl@0
   269
	return EChange;
sl@0
   270
	}
sl@0
   271
sl@0
   272
TChangePropagationStatus DMLSHLGLSNDependResource::TranslateDependentState(TInt /*aDepId*/, TInt aDepState, TInt& aResState)
sl@0
   273
	{
sl@0
   274
	if(aDepState == 10)
sl@0
   275
		{
sl@0
   276
		aResState = iMinLevel;
sl@0
   277
		return EChange;
sl@0
   278
		}
sl@0
   279
	aResState = iCurrentLevel - 2;
sl@0
   280
	if(aResState == iMaxLevel)
sl@0
   281
		return ENoChange;
sl@0
   282
	return EChange;
sl@0
   283
	}
sl@0
   284
sl@0
   285
TChangePropagationStatus DMLSHLGLSCDependResource::TranslateDependentState(TInt /*aDepId*/, TInt aDepState, TInt& aResState)
sl@0
   286
	{
sl@0
   287
	if((aDepState == 10) && (iCurrentLevel == -100))
sl@0
   288
		return ENoChange;
sl@0
   289
	if(aDepState == 10)
sl@0
   290
		{
sl@0
   291
		aResState = -100;
sl@0
   292
		return EChange;
sl@0
   293
		}
sl@0
   294
	if(iCurrentLevel)
sl@0
   295
		aResState = iCurrentLevel + 20;
sl@0
   296
	else
sl@0
   297
		aResState = iCurrentLevel -20;
sl@0
   298
	if(aResState > iMaxLevel)
sl@0
   299
		aResState = iMaxLevel;
sl@0
   300
	return EChange;
sl@0
   301
	}
sl@0
   302
sl@0
   303
	
sl@0
   304
//Implementation of DoRequest functionality for all resource
sl@0
   305
TInt DMLSLGLSPDependResource::DoRequest(TPowerRequest& req)
sl@0
   306
	{
sl@0
   307
	return GetControllerPtr()->ProcessEventResources(req, iCurrentLevel, iMaxLevel, iMinLevel, iDefaultLevel, iBlockTime);
sl@0
   308
	}
sl@0
   309
sl@0
   310
TInt DMLSIGLSNDependResource::DoRequest(TPowerRequest& req)
sl@0
   311
	{
sl@0
   312
	return GetControllerPtr()->ProcessEventResources(req, iCurrentLevel, iMaxLevel, iMinLevel, iDefaultLevel, iBlockTime);
sl@0
   313
	}
sl@0
   314
sl@0
   315
TInt DBSIGLSPDependResource::DoRequest(TPowerRequest& req)
sl@0
   316
	{
sl@0
   317
	return GetControllerPtr()->ProcessEventResources(req, iCurrentLevel, iMaxLevel, iMinLevel, iDefaultLevel, iBlockTime);
sl@0
   318
	}
sl@0
   319
sl@0
   320
TInt DMLSHIGLSPDependResource::DoRequest(TPowerRequest& req)
sl@0
   321
	{
sl@0
   322
	return GetControllerPtr()->ProcessEventResources(req, iCurrentLevel, iMaxLevel, iMinLevel, iDefaultLevel, iBlockTime);
sl@0
   323
	}
sl@0
   324
sl@0
   325
TInt DBSHLGLSNDependResource::DoRequest(TPowerRequest& req)
sl@0
   326
	{
sl@0
   327
	return GetControllerPtr()->ProcessEventResources(req, iCurrentLevel, iMaxLevel, iMinLevel, iDefaultLevel, iBlockTime);
sl@0
   328
	}
sl@0
   329
sl@0
   330
TInt DMLSHLGLSNDependResource::DoRequest(TPowerRequest& req)
sl@0
   331
	{
sl@0
   332
	return GetControllerPtr()->ProcessEventResources(req, iCurrentLevel, iMaxLevel, iMinLevel, iDefaultLevel, iBlockTime);
sl@0
   333
	}
sl@0
   334
sl@0
   335
TInt DMLSHLGLSCDependResource::DoRequest(TPowerRequest& req)
sl@0
   336
	{
sl@0
   337
	return GetControllerPtr()->ProcessEventResources(req, iCurrentLevel, iMaxLevel, iMinLevel, iDefaultLevel, iBlockTime);
sl@0
   338
	}
sl@0
   339
sl@0
   340
//Get info implementation of all resources.
sl@0
   341
TInt DMLSLGLSPDependResource::GetInfo(TDes8* info) const
sl@0
   342
	{
sl@0
   343
	DStaticPowerResource::GetInfo((TDes8*)info);
sl@0
   344
	TPowerResourceInfoV01 *buf1 = (TPowerResourceInfoV01*)info;
sl@0
   345
	buf1->iMinLevel = iMinLevel;
sl@0
   346
	buf1->iMaxLevel = iMaxLevel;
sl@0
   347
	return KErrNone;
sl@0
   348
	}
sl@0
   349
sl@0
   350
TInt DMLSIGLSNDependResource::GetInfo(TDes8* info) const
sl@0
   351
	{
sl@0
   352
	DStaticPowerResource::GetInfo((TDes8*)info);
sl@0
   353
	TPowerResourceInfoV01 *buf1 = (TPowerResourceInfoV01*)info;
sl@0
   354
	buf1->iMinLevel = iMinLevel;
sl@0
   355
	buf1->iMaxLevel = iMaxLevel;
sl@0
   356
	return KErrNone;
sl@0
   357
	}
sl@0
   358
sl@0
   359
TInt DBSIGLSPDependResource::GetInfo(TDes8* info) const
sl@0
   360
	{
sl@0
   361
	DStaticPowerResource::GetInfo((TDes8*)info);
sl@0
   362
	TPowerResourceInfoV01 *buf1 = (TPowerResourceInfoV01*)info;
sl@0
   363
	buf1->iMinLevel = iMinLevel;
sl@0
   364
	buf1->iMaxLevel = iMaxLevel;
sl@0
   365
	return KErrNone;
sl@0
   366
	}
sl@0
   367
sl@0
   368
TInt DMLSHIGLSPDependResource::GetInfo(TDes8* info) const
sl@0
   369
	{
sl@0
   370
	DStaticPowerResource::GetInfo((TDes8*)info);
sl@0
   371
	TPowerResourceInfoV01 *buf1 = (TPowerResourceInfoV01*)info;
sl@0
   372
	buf1->iMinLevel = iMinLevel;
sl@0
   373
	buf1->iMaxLevel = iMaxLevel;
sl@0
   374
	return KErrNone;
sl@0
   375
	}
sl@0
   376
sl@0
   377
TInt DBSHLGLSNDependResource::GetInfo(TDes8* info) const
sl@0
   378
	{
sl@0
   379
	DStaticPowerResource::GetInfo((TDes8*)info);
sl@0
   380
	TPowerResourceInfoV01 *buf1 = (TPowerResourceInfoV01*)info;
sl@0
   381
	buf1->iMinLevel = iMinLevel;
sl@0
   382
	buf1->iMaxLevel = iMaxLevel;
sl@0
   383
	return KErrNone;
sl@0
   384
	}
sl@0
   385
sl@0
   386
TInt DMLSHLGLSNDependResource::GetInfo(TDes8* info) const
sl@0
   387
	{
sl@0
   388
	DStaticPowerResource::GetInfo((TDes8*)info);
sl@0
   389
	TPowerResourceInfoV01 *buf1 = (TPowerResourceInfoV01*)info;
sl@0
   390
	buf1->iMinLevel = iMinLevel;
sl@0
   391
	buf1->iMaxLevel = iMaxLevel;
sl@0
   392
	return KErrNone;
sl@0
   393
	}
sl@0
   394
sl@0
   395
TInt DMLSHLGLSCDependResource::GetInfo(TDes8* info) const
sl@0
   396
	{
sl@0
   397
	DStaticPowerResource::GetInfo((TDes8*)info);
sl@0
   398
	TPowerResourceInfoV01 *buf1 = (TPowerResourceInfoV01*)info;
sl@0
   399
	buf1->iMinLevel = iMinLevel;
sl@0
   400
	buf1->iMaxLevel = iMaxLevel;
sl@0
   401
	return KErrNone;
sl@0
   402
	}