ReactOS  0.4.15-dev-2961-gecb0c09
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
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3767
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2654
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
ULONG CompBattDebug
Definition: compbatt.c:17
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:715
LONG NTSTATUS
Definition: precomp.h:26
LIST_ENTRY BatteryLink
Definition: compbatt.h:20
_In_ ULONG _In_ PBATTERY_NOTIFY BatteryNotify
Definition: batclass.h:215
_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
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
Definition: wdfio.h:318
_Out_ PULONG BatteryTag
Definition: batclass.h:173
PDEVICE_OBJECT DeviceObject
Definition: compbatt.h:22
WORK_QUEUE_ITEM WorkItem
Definition: compbatt.h:24
NTSTATUS NTAPI CompBattAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PdoDeviceObject)
Definition: comppnp.c:320
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:318
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3272
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_In_ PIRP Irp
Definition: csq.h:116
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
ULONGLONG InterruptTime
Definition: compbatt.h:36
Definition: bufpool.h:45
struct _COMPBATT_DEVICE_EXTENSION COMPBATT_DEVICE_EXTENSION
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:547
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:859
FAST_MUTEX
Definition: extypes.h:17
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:949
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:1998
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
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
Definition: wdfio.h:318
Definition: typedefs.h:119
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4061
struct _COMPBATT_DEVICE_EXTENSION * PCOMPBATT_DEVICE_EXTENSION
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
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
#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