Source code of Windows XP (NT5)
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.

107 lines
2.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1998
  6. //
  7. // File: pdopower.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #if !defined (___pdopower_h___)
  11. #define ___pdopower_h___
  12. typedef struct _SET_POWER_STATE_CONTEXT {
  13. KEVENT Event;
  14. NTSTATUS Status;
  15. } SET_POWER_STATE_CONTEXT, *PSET_POWER_STATE_CONTEXT;
  16. typedef struct _IDE_POWER_CONTEXT *PIDE_POWER_CONTEXT;
  17. typedef struct _POWER_COMPLETION_CONTEXT {
  18. KEVENT Event;
  19. NTSTATUS Status;
  20. POWER_STATE State;
  21. } POWER_COMPLETION_CONTEXT, *PPOWER_COMPLETION_CONTEXT;
  22. NTSTATUS
  23. DeviceQueryPowerState (
  24. IN PDEVICE_OBJECT DeviceObject,
  25. IN OUT PIRP Irp
  26. );
  27. NTSTATUS
  28. IdePortSetPdoPowerState (
  29. IN PDEVICE_OBJECT DeviceObject,
  30. IN OUT PIRP Irp
  31. );
  32. NTSTATUS
  33. IdePortSetPdoSystemPowerState (
  34. IN PDEVICE_OBJECT DeviceObject,
  35. IN OUT PIRP Irp
  36. );
  37. NTSTATUS
  38. IdePortSetPdoDevicePowerState (
  39. IN PDEVICE_OBJECT DeviceObject,
  40. IN OUT PIRP Irp
  41. );
  42. //
  43. // private functions
  44. //
  45. VOID
  46. IdePortPdoPowerStartIo (
  47. IN PDEVICE_OBJECT DeviceObject,
  48. IN PIRP Irp
  49. );
  50. NTSTATUS
  51. PdoRequestParentPowerUpCompletionRoutine (
  52. PVOID Context,
  53. NTSTATUS ParentPowerUpStatus
  54. );
  55. VOID
  56. IdePortPdoRequestPowerCompletionRoutine (
  57. IN PDEVICE_OBJECT DeviceObject,
  58. IN UCHAR MinorFunction,
  59. IN POWER_STATE PowerState,
  60. IN PVOID Context,
  61. IN PIO_STATUS_BLOCK IoStatus
  62. );
  63. VOID
  64. IdePortPdoCompletePowerIrp (
  65. IN PDEVICE_OBJECT DeviceObject,
  66. IN PIRP Irp
  67. );
  68. VOID
  69. IdePowerPassThroughCompletion (
  70. IN PDEVICE_OBJECT DeviceObject,
  71. IN PIDE_POWER_CONTEXT Context,
  72. IN NTSTATUS Status
  73. );
  74. VOID
  75. DevicePowerUpInitCompletionRoutine (
  76. PVOID Context,
  77. NTSTATUS Status
  78. );
  79. //NTSTATUS
  80. //IdePortSetPowerDispatch(
  81. // IN PDEVICE_OBJECT DeviceObject,
  82. // IN PIRP Irp
  83. // );
  84. #endif // ___pdopower_h___