equal
deleted
inserted
replaced
171 */ |
171 */ |
172 EXPORT_C TInt DSimulatedPowerResourceController::CompleteResourceControllerInitialisation() |
172 EXPORT_C TInt DSimulatedPowerResourceController::CompleteResourceControllerInitialisation() |
173 { |
173 { |
174 Kern::Printf("DSimulatedPowerResourceController::CompleteResourceControllerInitialisation()\n"); |
174 Kern::Printf("DSimulatedPowerResourceController::CompleteResourceControllerInitialisation()\n"); |
175 return(TheController.InitResources()); |
175 return(TheController.InitResources()); |
|
176 } |
|
177 |
|
178 /** This function is used only for testing purpose. Test default implementation DPowerController::DoRegisterResourceController() |
|
179 */ |
|
180 EXPORT_C TInt DSimulatedPowerResourceController::ResourceControllerRegistration() |
|
181 { |
|
182 Kern::Printf("DSimulatedPowerResourceController::ResourceControllerRegistration()\n"); |
|
183 TInt r = KErrNone; |
|
184 if(TPowerController::PowerController()) |
|
185 { |
|
186 r = TPowerController::PowerController()->DoRegisterResourceController(); |
|
187 } |
|
188 else |
|
189 r = KErrNotFound; |
|
190 |
|
191 return r; |
176 } |
192 } |
177 |
193 |
178 /** This function changes the state of the resource to appropriate value */ |
194 /** This function changes the state of the resource to appropriate value */ |
179 TInt DSimulatedPowerResourceController::ChangeResource(TPowerRequest& req, TInt& aCurrentLevel, TInt aMaxLevel, TInt aMinLevel) |
195 TInt DSimulatedPowerResourceController::ChangeResource(TPowerRequest& req, TInt& aCurrentLevel, TInt aMaxLevel, TInt aMinLevel) |
180 { |
196 { |