ReactOS  0.4.15-dev-976-g0f66c66
compbatt.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Composite Battery Driver
3  * LICENSE: BSD - See COPYING.ARM in the top level directory
4  * FILE: boot/drivers/bus/acpi/compbatt/compbatt.h
5  * PURPOSE: Main Header File
6  * PROGRAMMERS: ReactOS Portable Systems Group
7  */
8 
9 #ifndef _COMPBATT_PCH_
10 #define _COMPBATT_PCH_
11 
12 #include <wdm.h>
13 #include <batclass.h>
14 
15 #define COMPBATT_BATTERY_INFORMATION_PRESENT 0x04
16 #define COMPBATT_TAG_ASSIGNED 0x80
17 
18 typedef struct _COMPBATT_BATTERY_DATA
19 {
27  union
28  {
31  };
39 
41 {
58 
60 NTAPI
64 );
65 
67 NTAPI
70  IN PIRP Irp
71 );
72 
74 NTAPI
77  IN PIRP Irp
78 );
79 
81 NTAPI
84  IN ULONG Tag,
87  IN PVOID Buffer,
90 );
91 
93 NTAPI
95  IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
96  IN ULONG Tag,
98 );
99 
100 NTSTATUS
101 NTAPI
103  IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
106 );
107 
108 NTSTATUS
109 NTAPI
111  IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension
112 );
113 
114 NTSTATUS
115 NTAPI
117  IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
118  OUT PULONG Tag
119 );
120 
121 NTSTATUS
122 NTAPI
125  IN PIRP Irp,
127 );
128 
129 NTSTATUS
130 NTAPI
132  IN PCOMPBATT_BATTERY_DATA BatteryData
133 );
134 
135 NTSTATUS
136 NTAPI
142 );
143 
144 NTSTATUS
145 NTAPI
154 );
155 
156 extern ULONG CompBattDebug;
157 
158 #endif /* _COMPBATT_PCH_ */
PDEVICE_OBJECT AttachedDevice
Definition: compbatt.h:54
#define IN
Definition: typedefs.h:39
BATTERY_STATUS BatteryStatus
Definition: compbatt.h:35
_In_ ULONG _Out_ PBATTERY_STATUS BatteryStatus
Definition: batclass.h:198
NTSTATUS NTAPI CompBattQueryStatus(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension, IN ULONG Tag, IN PBATTERY_STATUS BatteryStatus)
Definition: compbatt.c:221
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG IoControlCode
Definition: fltkernel.h:1383
ULONG CompBattDebug
Definition: compbatt.c:17
_In_ PIRP Irp
Definition: csq.h:116
BATTERY_WAIT_STATUS WorkerWaitStatus
Definition: compbatt.h:29
NTSTATUS NTAPI BatteryIoctl(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl)
Definition: compmisc.c:17
enum _BATTERY_QUERY_INFORMATION_LEVEL BATTERY_QUERY_INFORMATION_LEVEL
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID _In_ ULONG _In_ BOOLEAN InternalDeviceIoControl
Definition: iofuncs.h:713
LONG NTSTATUS
Definition: precomp.h:26
LIST_ENTRY BatteryLink
Definition: compbatt.h:20
_In_ ULONG _In_ PBATTERY_NOTIFY BatteryNotify
Definition: batclass.h:215
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ ULONG _In_ ULONG OutputBufferLength
Definition: fltkernel.h:1374
_Outptr_ PUSB_DEVICE_HANDLE _In_ PUSB_DEVICE_HANDLE _In_ USHORT _In_ PUSB_PORT_PATH _Out_ PUSB_CD_ERROR_INFORMATION _In_ USHORT _In_ PDEVICE_OBJECT PdoDeviceObject
Definition: hubbusif.h:89
_Out_ PULONG BatteryTag
Definition: batclass.h:173
WCHAR DeviceName[]
Definition: adapter.cpp:21
PDEVICE_OBJECT DeviceObject
Definition: compbatt.h:22
WORK_QUEUE_ITEM WorkItem
Definition: compbatt.h:24
CHAR InputBuffer[80]
Definition: conmgr.c:33
NTSTATUS NTAPI CompBattAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PdoDeviceObject)
Definition: comppnp.c:320
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
long LONG
Definition: pedump.c:60
BATTERY_INFORMATION BatteryInformation
Definition: compbatt.h:48
NTSTATUS NTAPI CompBattQueryInformation(IN PCOMPBATT_DEVICE_EXTENSION FdoExtension, IN ULONG Tag, IN BATTERY_QUERY_INFORMATION_LEVEL InfoLevel, IN OPTIONAL LONG AtRate, IN PVOID Buffer, IN ULONG BufferLength, OUT PULONG ReturnedLength)
Definition: compbatt.c:482
UNICODE_STRING BatteryName
Definition: compbatt.h:37
PDEVICE_OBJECT DeviceObject
Definition: compbatt.h:55
unsigned char BOOLEAN
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
ULONGLONG InterruptTime
Definition: compbatt.h:36
Definition: bufpool.h:45
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:588
struct _COMPBATT_DEVICE_EXTENSION COMPBATT_DEVICE_EXTENSION
FAST_MUTEX
Definition: extypes.h:17
_In_ UCHAR BufferLength
Definition: scsi.h:4066
uint64_t ULONGLONG
Definition: typedefs.h:67
NTSTATUS NTAPI CompBattPnpDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: comppnp.c:403
BATTERY_STATUS BatteryStatus
Definition: compbatt.h:49
NTSTATUS NTAPI CompBattQueryTag(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension, OUT PULONG Tag)
Definition: compbatt.c:149
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG AtRate
Definition: batclass.h:183
NTSTATUS NTAPI CompBattGetDeviceObjectPointer(IN PUNICODE_STRING DeviceName, IN ACCESS_MASK DesiredAccess, OUT PFILE_OBJECT *FileObject, OUT PDEVICE_OBJECT *DeviceObject)
Definition: compmisc.c:74
* PFILE_OBJECT
Definition: iotypes.h:1962
BATTERY_WAIT_STATUS WaitStatus
Definition: compbatt.h:26
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:187
Definition: typedefs.h:119
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ ULONG InputBufferLength
Definition: fltkernel.h:1372
struct _COMPBATT_DEVICE_EXTENSION * PCOMPBATT_DEVICE_EXTENSION
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1569
BATTERY_INFORMATION BatteryInformation
Definition: compbatt.h:34
struct _COMPBATT_BATTERY_DATA * PCOMPBATT_BATTERY_DATA
NTSTATUS NTAPI CompBattSetStatusNotify(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension, IN ULONG BatteryTag, IN PBATTERY_NOTIFY BatteryNotify)
Definition: compbatt.c:211
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4137
NTSTATUS NTAPI CompBattPowerDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: comppnp.c:19
unsigned int * PULONG
Definition: retypes.h:1
NTSTATUS NTAPI CompBattMonitorIrpComplete(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PKEVENT Event)
Definition: compbatt.c:70
IN ULONG IN ULONG Tag
Definition: evtlib.h:159
#define OUT
Definition: typedefs.h:40
IO_REMOVE_LOCK RemoveLock
Definition: compbatt.h:21
POWER_STATE PowerState
Definition: compbatt.h:51
unsigned int ULONG
Definition: retypes.h:1
NTSTATUS NTAPI CompBattMonitorIrpCompleteWorker(IN PCOMPBATT_BATTERY_DATA BatteryData)
Definition: compbatt.c:80
NTSTATUS NTAPI CompBattDisableStatusNotify(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
Definition: compbatt.c:184
struct _COMPBATT_BATTERY_DATA COMPBATT_BATTERY_DATA
ULONG ACCESS_MASK
Definition: nt_native.h:40
BATTERY_STATUS WorkerStatus
Definition: compbatt.h:30
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68