ReactOS 0.4.15-dev-8127-g6338913
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
19{
27 union
28 {
31 };
39
41{
58
64);
65
70 IN PIRP Irp
71);
72
77 IN PIRP Irp
78);
79
84 IN ULONG Tag,
90);
91
95 IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
96 IN ULONG Tag,
98);
99
101NTAPI
103 IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
106);
107
109NTAPI
111 IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension
112);
113
115NTAPI
117 IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
119);
120
122NTAPI
125 IN PIRP Irp,
127);
128
130NTAPI
132 IN PCOMPBATT_BATTERY_DATA BatteryData
133);
134
136NTAPI
142);
143
145NTAPI
154);
155
156extern ULONG CompBattDebug;
157
158#endif /* _COMPBATT_PCH_ */
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:188
_In_ ULONG _In_ PBATTERY_NOTIFY BatteryNotify
Definition: batclass.h:216
_Out_ PULONG BatteryTag
Definition: batclass.h:173
_In_ ULONG _Out_ PBATTERY_STATUS BatteryStatus
Definition: batclass.h:199
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG AtRate
Definition: batclass.h:185
enum _BATTERY_QUERY_INFORMATION_LEVEL BATTERY_QUERY_INFORMATION_LEVEL
Definition: bufpool.h:45
NTSTATUS NTAPI CompBattMonitorIrpComplete(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PKEVENT Event)
Definition: compbatt.c:70
ULONG CompBattDebug
Definition: compbatt.c:17
NTSTATUS NTAPI CompBattDisableStatusNotify(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
Definition: compbatt.c:184
struct _COMPBATT_BATTERY_DATA COMPBATT_BATTERY_DATA
NTSTATUS NTAPI CompBattGetDeviceObjectPointer(IN PUNICODE_STRING DeviceName, IN ACCESS_MASK DesiredAccess, OUT PFILE_OBJECT *FileObject, OUT PDEVICE_OBJECT *DeviceObject)
Definition: compmisc.c:74
NTSTATUS NTAPI CompBattPowerDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: comppnp.c:19
struct _COMPBATT_BATTERY_DATA * PCOMPBATT_BATTERY_DATA
NTSTATUS NTAPI CompBattMonitorIrpCompleteWorker(IN PCOMPBATT_BATTERY_DATA BatteryData)
Definition: compbatt.c:80
NTSTATUS NTAPI CompBattQueryTag(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension, OUT PULONG Tag)
Definition: compbatt.c:149
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
struct _COMPBATT_DEVICE_EXTENSION COMPBATT_DEVICE_EXTENSION
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
NTSTATUS NTAPI CompBattSetStatusNotify(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension, IN ULONG BatteryTag, IN PBATTERY_NOTIFY BatteryNotify)
Definition: compbatt.c:211
NTSTATUS NTAPI CompBattAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PdoDeviceObject)
Definition: comppnp.c:320
struct _COMPBATT_DEVICE_EXTENSION * PCOMPBATT_DEVICE_EXTENSION
NTSTATUS NTAPI CompBattPnpDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: comppnp.c:403
NTSTATUS NTAPI CompBattQueryStatus(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension, IN ULONG Tag, IN PBATTERY_STATUS BatteryStatus)
Definition: compbatt.c:221
_In_ PIRP Irp
Definition: csq.h:116
@ FdoExtension
Definition: precomp.h:48
_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:95
ULONG ACCESS_MASK
Definition: nt_native.h:40
long LONG
Definition: pedump.c:60
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
PDEVICE_OBJECT DeviceObject
Definition: compbatt.h:22
BATTERY_WAIT_STATUS WorkerWaitStatus
Definition: compbatt.h:29
LIST_ENTRY BatteryLink
Definition: compbatt.h:20
BATTERY_STATUS WorkerStatus
Definition: compbatt.h:30
BATTERY_INFORMATION BatteryInformation
Definition: compbatt.h:34
BATTERY_WAIT_STATUS WaitStatus
Definition: compbatt.h:26
BATTERY_STATUS BatteryStatus
Definition: compbatt.h:35
UNICODE_STRING BatteryName
Definition: compbatt.h:37
WORK_QUEUE_ITEM WorkItem
Definition: compbatt.h:24
IO_REMOVE_LOCK RemoveLock
Definition: compbatt.h:21
ULONGLONG InterruptTime
Definition: compbatt.h:36
POWER_STATE PowerState
Definition: compbatt.h:51
PDEVICE_OBJECT DeviceObject
Definition: compbatt.h:55
PDEVICE_OBJECT AttachedDevice
Definition: compbatt.h:54
BATTERY_INFORMATION BatteryInformation
Definition: compbatt.h:48
BATTERY_STATUS BatteryStatus
Definition: compbatt.h:49
Definition: typedefs.h:120
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
#define OUT
Definition: typedefs.h:40
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
Definition: wdfio.h:325
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:320
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
Definition: wdfio.h:322
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:953
FAST_MUTEX
Definition: extypes.h:17
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID _In_ ULONG _In_ BOOLEAN InternalDeviceIoControl
Definition: iofuncs.h:720
* PFILE_OBJECT
Definition: iotypes.h:1998