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.

163 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. isopwr.h
  5. Abstract:
  6. Environment:
  7. Kernel mode
  8. Notes:
  9. Copyright (c) 2000 Microsoft Corporation.
  10. All Rights Reserved.
  11. --*/
  12. #ifndef _ISOUSB_POWER_H
  13. #define _ISOUSB_POWER_H
  14. typedef struct _POWER_COMPLETION_CONTEXT {
  15. PDEVICE_OBJECT DeviceObject;
  16. PIRP SIrp;
  17. } POWER_COMPLETION_CONTEXT, *PPOWER_COMPLETION_CONTEXT;
  18. typedef struct _WORKER_THREAD_CONTEXT {
  19. PDEVICE_OBJECT DeviceObject;
  20. PIRP Irp;
  21. PIO_WORKITEM WorkItem;
  22. } WORKER_THREAD_CONTEXT, *PWORKER_THREAD_CONTEXT;
  23. NTSTATUS
  24. IsoUsb_DispatchPower(
  25. IN PDEVICE_OBJECT DeviceObject,
  26. IN PIRP Irp
  27. );
  28. NTSTATUS
  29. HandleSystemQueryPower(
  30. IN PDEVICE_OBJECT DeviceObject,
  31. IN PIRP Irp
  32. );
  33. NTSTATUS
  34. HandleSystemSetPower(
  35. IN PDEVICE_OBJECT DeviceObject,
  36. IN PIRP Irp
  37. );
  38. NTSTATUS
  39. HandleDeviceQueryPower(
  40. PDEVICE_OBJECT DeviceObject,
  41. PIRP Irp
  42. );
  43. NTSTATUS
  44. SysPoCompletionRoutine(
  45. IN PDEVICE_OBJECT DeviceObject,
  46. IN PIRP Irp,
  47. IN PDEVICE_EXTENSION DeviceExtension
  48. );
  49. VOID
  50. SendDeviceIrp(
  51. IN PDEVICE_OBJECT DeviceObject,
  52. IN PIRP Irp
  53. );
  54. VOID
  55. DevPoCompletionRoutine(
  56. IN PDEVICE_OBJECT DeviceObject,
  57. IN UCHAR MinorFunction,
  58. IN POWER_STATE PowerState,
  59. IN PVOID Context,
  60. IN PIO_STATUS_BLOCK IoStatus
  61. );
  62. NTSTATUS
  63. HandleDeviceSetPower(
  64. IN PDEVICE_OBJECT DeviceObject,
  65. IN PIRP Irp
  66. );
  67. NTSTATUS
  68. FinishDevPoUpIrp(
  69. IN PDEVICE_OBJECT DeviceObject,
  70. IN PIRP Irp,
  71. IN PDEVICE_EXTENSION DeviceExtension
  72. );
  73. NTSTATUS
  74. SetDeviceFunctional(
  75. IN PDEVICE_OBJECT DeviceObject,
  76. IN PIRP Irp,
  77. IN PDEVICE_EXTENSION DeviceExtension
  78. );
  79. NTSTATUS
  80. FinishDevPoDnIrp(
  81. IN PDEVICE_OBJECT DeviceObject,
  82. IN PIRP Irp,
  83. IN PDEVICE_EXTENSION DeviceExtension
  84. );
  85. NTSTATUS
  86. HoldIoRequests(
  87. IN PDEVICE_OBJECT DeviceObject,
  88. IN PIRP Irp
  89. );
  90. VOID
  91. HoldIoRequestsWorkerRoutine(
  92. IN PDEVICE_OBJECT DeviceObject,
  93. IN PVOID Context
  94. );
  95. NTSTATUS
  96. QueueRequest(
  97. IN OUT PDEVICE_EXTENSION DeviceExtension,
  98. IN PIRP Irp
  99. );
  100. VOID
  101. CancelQueued(
  102. IN PDEVICE_OBJECT DeviceObject,
  103. IN PIRP Irp
  104. );
  105. NTSTATUS
  106. WaitWakeCompletionRoutine(
  107. IN PDEVICE_OBJECT DeviceObject,
  108. IN PIRP Irp,
  109. IN PDEVICE_EXTENSION DeviceExtension
  110. );
  111. NTSTATUS
  112. IssueWaitWake(
  113. IN PDEVICE_EXTENSION DeviceExtension
  114. );
  115. VOID
  116. CancelWaitWake(
  117. IN PDEVICE_EXTENSION DeviceExtension
  118. );
  119. VOID
  120. WaitWakeCallback(
  121. IN PDEVICE_OBJECT DeviceObject,
  122. IN UCHAR MinorFunction,
  123. IN POWER_STATE PowerState,
  124. IN PVOID Context,
  125. IN PIO_STATUS_BLOCK IoStatus
  126. );
  127. PCHAR
  128. PowerMinorFunctionString (
  129. IN UCHAR MinorFunction
  130. );
  131. #endif