From 31698c31a8a48f77a64e97baa5297633b18221e5 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 1 Mar 2025 12:29:05 +0100 Subject: ADD: Add PowerFactory class. Signed-off-by: Amlal El Mahrouss --- dev/Mod/ACPI/ACPIFactoryInterface.h | 6 ++++-- dev/Mod/Pwr/PowerFactory.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 dev/Mod/Pwr/PowerFactory.h (limited to 'dev/Mod') diff --git a/dev/Mod/ACPI/ACPIFactoryInterface.h b/dev/Mod/ACPI/ACPIFactoryInterface.h index 01143c17..eb8d7353 100644 --- a/dev/Mod/ACPI/ACPIFactoryInterface.h +++ b/dev/Mod/ACPI/ACPIFactoryInterface.h @@ -12,14 +12,16 @@ #include #include #include +#include namespace NeOS { + class PowerFactory; class ACPIFactoryInterface; typedef ACPIFactoryInterface PowerFactoryInterface; - class ACPIFactoryInterface final + class ACPIFactoryInterface final : public PowerFactory { public: explicit ACPIFactoryInterface(voidPtr rsp_ptr); @@ -29,7 +31,7 @@ namespace NeOS ACPIFactoryInterface(const ACPIFactoryInterface&) = default; public: - Void Shutdown(); // shutdown + Bool Shutdown(); // shutdown Void Reboot(); // soft-reboot public: diff --git a/dev/Mod/Pwr/PowerFactory.h b/dev/Mod/Pwr/PowerFactory.h new file mode 100644 index 00000000..2992fac1 --- /dev/null +++ b/dev/Mod/Pwr/PowerFactory.h @@ -0,0 +1,35 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal EL Mahrouss, all rights reserved. + +------------------------------------------- */ + +#pragma once + +#include +#include +#include +#include +#include + +namespace NeOS +{ + class PowerFactory; + + class PowerFactory + { + public: + explicit PowerFactory() = default; + virtual ~PowerFactory() = default; + + PowerFactory& operator=(const PowerFactory&) = default; + PowerFactory(const PowerFactory&) = default; + + public: + Bool Shutdown() + { + return NO; + }; // shutdown + Void Reboot(){}; // soft-reboot + }; +} // namespace NeOS \ No newline at end of file -- cgit v1.2.3