Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.4 KiB

  1. // Gemplus (C) 1999
  2. // Version 1.0
  3. // Author: Sergey Ivanov
  4. // Date of creation - 18.05.1999
  5. // Change log:
  6. //
  7. #ifndef PWR_INT
  8. #define PWR_INT
  9. #include "generic.h"
  10. #pragma PAGEDCODE
  11. class CPower
  12. {
  13. public:
  14. NTSTATUS m_Status;
  15. SAFE_DESTRUCTORS();
  16. virtual VOID dispose(){self_delete();};
  17. protected:
  18. CPower(){};
  19. virtual ~CPower(){};
  20. public:
  21. virtual PULONG registerDeviceForIdleDetection (
  22. IN PDEVICE_OBJECT DeviceObject,
  23. IN ULONG ConservationIdleTime,
  24. IN ULONG PerformanceIdleTime,
  25. IN DEVICE_POWER_STATE State
  26. ) {return NULL;};
  27. virtual POWER_STATE declarePowerState(IN PDEVICE_OBJECT DeviceObject,IN POWER_STATE_TYPE Type,IN POWER_STATE State)
  28. {POWER_STATE p;
  29. p.SystemState = PowerSystemShutdown;
  30. p.DeviceState = PowerDeviceUnspecified;
  31. return p;
  32. };
  33. virtual VOID startNextPowerIrp(IN PIRP Irp) {};
  34. virtual NTSTATUS callPowerDriver (IN PDEVICE_OBJECT DeviceObject,IN OUT PIRP Irp) {return STATUS_SUCCESS;};
  35. virtual VOID setPowerDeviceBusy(PULONG IdlePointer) {};
  36. virtual NTSTATUS requestPowerIrp(IN PDEVICE_OBJECT DeviceObject,
  37. IN UCHAR MinorFunction,
  38. IN POWER_STATE PowerState,
  39. IN PREQUEST_POWER_COMPLETE CompletionFunction,
  40. IN PVOID Context,
  41. OUT PIRP *Irp OPTIONAL) {return STATUS_SUCCESS;};
  42. };
  43. #endif//POWER