- merge audio headers
[reactos.git] / drivers / bluetooth / fbtusb / include / fbtpwr.h
1 // Copyright (c) 2004, Antony C. Roberts
2
3 // Use of this file is subject to the terms
4 // described in the LICENSE.TXT file that
5 // accompanies this file.
6 //
7 // Your use of this file indicates your
8 // acceptance of the terms described in
9 // LICENSE.TXT.
10 //
11 // http://www.freebt.net
12
13 #ifndef _FREEBT_POWER_H
14 #define _FREEBT_POWER_H
15
16 typedef struct _POWER_COMPLETION_CONTEXT
17 {
18 PDEVICE_OBJECT DeviceObject;
19 PIRP SIrp;
20
21 } POWER_COMPLETION_CONTEXT, *PPOWER_COMPLETION_CONTEXT;
22
23 typedef struct _WORKER_THREAD_CONTEXT
24 {
25 PDEVICE_OBJECT DeviceObject;
26 PIRP Irp;
27 PIO_WORKITEM WorkItem;
28
29 } WORKER_THREAD_CONTEXT, *PWORKER_THREAD_CONTEXT;
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 NTSTATUS FreeBT_DispatchPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
36 NTSTATUS HandleSystemQueryPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
37 NTSTATUS HandleSystemSetPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
38 NTSTATUS HandleDeviceQueryPower(PDEVICE_OBJECT DeviceObject, PIRP Irp);
39 NTSTATUS SysPoCompletionRoutine(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PDEVICE_EXTENSION DeviceExtension);
40 VOID SendDeviceIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
41 VOID DevPoCompletionRoutine(
42 IN PDEVICE_OBJECT DeviceObject,
43 IN UCHAR MinorFunction,
44 IN POWER_STATE PowerState,
45 IN PVOID Context,
46 IN PIO_STATUS_BLOCK IoStatus
47 );
48
49 NTSTATUS HandleDeviceSetPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
50 NTSTATUS FinishDevPoUpIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PDEVICE_EXTENSION DeviceExtension);
51 NTSTATUS SetDeviceFunctional(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PDEVICE_EXTENSION DeviceExtension);
52 NTSTATUS FinishDevPoDnIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PDEVICE_EXTENSION DeviceExtension);
53 NTSTATUS HoldIoRequests(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
54 VOID HoldIoRequestsWorkerRoutine(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context);
55 NTSTATUS QueueRequest(IN OUT PDEVICE_EXTENSION DeviceExtension, IN PIRP Irp);
56 VOID CancelQueued(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
57 NTSTATUS WaitWakeCompletionRoutine(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PDEVICE_EXTENSION DeviceExtension);
58 NTSTATUS IssueWaitWake(IN PDEVICE_EXTENSION DeviceExtension);
59 VOID CancelWaitWake(IN PDEVICE_EXTENSION DeviceExtension);
60 VOID WaitWakeCallback(
61 IN PDEVICE_OBJECT DeviceObject,
62 IN UCHAR MinorFunction,
63 IN POWER_STATE PowerState,
64 IN PVOID Context,
65 IN PIO_STATUS_BLOCK IoStatus
66 );
67
68 PCHAR PowerMinorFunctionString(IN UCHAR MinorFunction);
69
70 #ifdef __cplusplus
71 };
72 #endif
73
74 #endif