Author: sir_richard
Date: Thu Mar 25 15:26:04 2010
New Revision: 46443
URL:
http://svn.reactos.org/svn/reactos?rev=46443&view=rev
Log:
[COMPBATT]: Composite Battery Driver Stub Interface to keep Mr. Gutman happy.
Added:
trunk/reactos/drivers/bus/acpi/compbatt/
trunk/reactos/drivers/bus/acpi/compbatt/compbatt.c (with props)
trunk/reactos/drivers/bus/acpi/compbatt/compbatt.h (with props)
trunk/reactos/drivers/bus/acpi/compbatt/compbatt.rbuild (with props)
trunk/reactos/drivers/bus/acpi/compbatt/compbatt.rc (with props)
trunk/reactos/drivers/bus/acpi/compbatt/compmisc.c (with props)
trunk/reactos/drivers/bus/acpi/compbatt/comppnp.c (with props)
Modified:
trunk/reactos/drivers/bus/acpi/acpi.rbuild
Modified: trunk/reactos/drivers/bus/acpi/acpi.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpi.rbui…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpi.rbuild [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpi.rbuild [iso-8859-1] Thu Mar 25 15:26:04 2010
@@ -6,6 +6,9 @@
</directory>
<directory name="cmbatt">
<xi:include href="cmbatt/cmbatt.rbuild" />
+</directory>
+<directory name="compbatt">
+ <xi:include href="compbatt/compbatt.rbuild" />
</directory>
</group>
Added: trunk/reactos/drivers/bus/acpi/compbatt/compbatt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/compbatt/…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/compbatt/compbatt.c (added)
+++ trunk/reactos/drivers/bus/acpi/compbatt/compbatt.c [iso-8859-1] Thu Mar 25 15:26:04
2010
@@ -1,0 +1,168 @@
+/*
+ * PROJECT: ReactOS Composite Battery Driver
+ * LICENSE: BSD - See COPYING.ARM in the top level directory
+ * FILE: boot/drivers/bus/acpi/compbatt/compbatt.c
+ * PURPOSE: Main Initialization Code and IRP Handling
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include "compbatt.h"
+
+/* GLOBALS ********************************************************************/
+
+ULONG CompBattDebug;
+
+/* FUNCTIONS ******************************************************************/
+
+NTSTATUS
+NTAPI
+CompBattOpenClose(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattSystemControl(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattMonitorIrpComplete(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp,
+ IN PKEVENT Event)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattMonitorIrpCompleteWorker(IN PCOMPBATT_BATTERY_ENTRY BatteryData)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattRecalculateTag(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattIoctl(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattQueryTag(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
+ OUT PULONG Tag)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattDisableStatusNotify(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattSetStatusNotify(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
+ IN ULONG BatteryTag,
+ IN PBATTERY_NOTIFY BatteryNotify)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattGetBatteryStatus(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
+ IN ULONG Tag)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattQueryStatus(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension,
+ IN ULONG Tag,
+ IN PBATTERY_STATUS BatteryStatus)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattGetBatteryInformation(OUT PBATTERY_INFORMATION BatteryInformation,
+ IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattGetBatteryGranularity(OUT PBATTERY_REPORTING_SCALE ReportingScale,
+ IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattGetEstimatedTime(OUT PULONG Time,
+ IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+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)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+DriverEntry(IN PDRIVER_OBJECT DriverObject,
+ IN PUNICODE_STRING RegistryPath)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+/* EOF */
Propchange: trunk/reactos/drivers/bus/acpi/compbatt/compbatt.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/drivers/bus/acpi/compbatt/compbatt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/compbatt/…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/compbatt/compbatt.h (added)
+++ trunk/reactos/drivers/bus/acpi/compbatt/compbatt.h [iso-8859-1] Thu Mar 25 15:26:04
2010
@@ -1,0 +1,57 @@
+/*
+ * PROJECT: ReactOS Composite Battery Driver
+ * LICENSE: BSD - See COPYING.ARM in the top level directory
+ * FILE: boot/drivers/bus/acpi/compbatt/compbatt.h
+ * PURPOSE: Main Header File
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+
+#include <ntddk.h>
+#include <initguid.h>
+#include <batclass.h>
+#include <debug.h>
+
+typedef struct _COMPBATT_BATTERY_ENTRY
+{
+ LIST_ENTRY BatteryLink;
+ IO_REMOVE_LOCK RemoveLock;
+ PDEVICE_OBJECT DeviceObject;
+ PIRP Irp;
+ WORK_QUEUE_ITEM WorkItem;
+ BOOLEAN WaitFlag;
+ BATTERY_WAIT_STATUS WaitStatus;
+ union
+ {
+ BATTERY_WAIT_STATUS WorkerWaitStatus;
+ BATTERY_STATUS WorkerStatus;
+ };
+ ULONG Tag;
+ ULONG Flags;
+ BATTERY_INFORMATION BatteryInformation;
+ BATTERY_STATUS BatteryStatus;
+ ULONGLONG InterruptTime;
+ UNICODE_STRING BatteryName;
+} COMPBATT_BATTERY_ENTRY, *PCOMPBATT_BATTERY_ENTRY;
+
+typedef struct _COMPBATT_DEVICE_EXTENSION
+{
+ PVOID ClassData;
+ ULONG NextTag;
+ LIST_ENTRY BatteryList;
+ FAST_MUTEX Lock;
+ ULONG Tag;
+ ULONG Flags;
+ BATTERY_INFORMATION BatteryInformation;
+ BATTERY_STATUS BatteryStatus;
+ ULONGLONG InterruptTime;
+ POWER_STATE PowerState;
+ ULONG LowCapacity;
+ ULONG HighCapacity;
+ PDEVICE_OBJECT AttachedDevice;
+ PDEVICE_OBJECT DeviceObject;
+ PVOID NotificationEntry;
+} COMPBATT_DEVICE_EXTENSION, *PCOMPBATT_DEVICE_EXTENSION;
+
+extern ULONG CmBattDebug;
+
+/* EOF */
Propchange: trunk/reactos/drivers/bus/acpi/compbatt/compbatt.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/drivers/bus/acpi/compbatt/compbatt.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/compbatt/…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/compbatt/compbatt.rbuild (added)
+++ trunk/reactos/drivers/bus/acpi/compbatt/compbatt.rbuild [iso-8859-1] Thu Mar 25
15:26:04 2010
@@ -1,0 +1,13 @@
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<module name="compbatt" type="kernelmodedriver"
installbase="system32/drivers" installname="compbatt.sys">
+ <library>ntoskrnl</library>
+ <library>hal</library>
+ <library>battc</library>
+ <include base="compbatt">.</include>
+ <file>compbatt.c</file>
+ <file>compmisc.c</file>
+ <file>comppnp.c</file>
+ <file>compbatt.rc</file>
+ <pch>compbatt.h</pch>
+</module>
Propchange: trunk/reactos/drivers/bus/acpi/compbatt/compbatt.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/drivers/bus/acpi/compbatt/compbatt.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/compbatt/…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/compbatt/compbatt.rc (added)
+++ trunk/reactos/drivers/bus/acpi/compbatt/compbatt.rc [iso-8859-1] Thu Mar 25 15:26:04
2010
@@ -1,0 +1,5 @@
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "Composite Battery Driver\0"
+#define REACTOS_STR_INTERNAL_NAME "compbatt\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "compbatt.sys\0"
+#include <reactos/version.rc>
Propchange: trunk/reactos/drivers/bus/acpi/compbatt/compbatt.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/drivers/bus/acpi/compbatt/compmisc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/compbatt/…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/compbatt/compmisc.c (added)
+++ trunk/reactos/drivers/bus/acpi/compbatt/compmisc.c [iso-8859-1] Thu Mar 25 15:26:04
2010
@@ -1,0 +1,40 @@
+/*
+ * PROJECT: ReactOS Composite Battery Driver
+ * LICENSE: BSD - See COPYING.ARM in the top level directory
+ * FILE: boot/drivers/bus/acpi/compbatt/compmisc.c
+ * PURPOSE: Miscellaneous Support Routines
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include "compbatt.h"
+
+/* FUNCTIONS ******************************************************************/
+
+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)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattGetDeviceObjectPointer(IN PCUNICODE_STRING DeviceName,
+ IN ACCESS_MASK DesiredAccess,
+ OUT PFILE_OBJECT *FileObject,
+ OUT PDEVICE_OBJECT *DeviceObject)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+/* EOF */
Propchange: trunk/reactos/drivers/bus/acpi/compbatt/compmisc.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/drivers/bus/acpi/compbatt/comppnp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/compbatt/…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/compbatt/comppnp.c (added)
+++ trunk/reactos/drivers/bus/acpi/compbatt/comppnp.c [iso-8859-1] Thu Mar 25 15:26:04
2010
@@ -1,0 +1,95 @@
+/*
+ * PROJECT: ReactOS Composite Battery Driver
+ * LICENSE: BSD - See COPYING.ARM in the top level directory
+ * FILE: boot/drivers/bus/acpi/compbatt/comppnp.c
+ * PURPOSE: Plug-and-Play IOCTL/IRP Handling
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include "compbatt.h"
+
+/* FUNCTIONS ******************************************************************/
+
+NTSTATUS
+NTAPI
+CompBattPowerDispatch(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+PCOMPBATT_BATTERY_ENTRY
+NTAPI
+RemoveBatteryFromList(IN PCUNICODE_STRING BatteryName,
+ IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+BOOLEAN
+NTAPI
+IsBatteryAlreadyOnList(IN PCUNICODE_STRING BatteryName,
+ IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+NTSTATUS
+NTAPI
+CompBattAddNewBattery(IN PCUNICODE_STRING BatteryName,
+ IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattRemoveBattery(IN PCUNICODE_STRING BatteryName,
+ IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattGetBatteries(IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattPnpEventHandler(IN PDEVICE_INTERFACE_CHANGE_NOTIFICATION Notification,
+ IN PCOMPBATT_DEVICE_EXTENSION DeviceExtension)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattAddDevice(IN PDRIVER_OBJECT DriverObject,
+ IN PDEVICE_OBJECT PdoDeviceObject)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+NTAPI
+CompBattPnpDispatch(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+/* EOF */
Propchange: trunk/reactos/drivers/bus/acpi/compbatt/comppnp.c
------------------------------------------------------------------------------
svn:eol-style = native