summaryrefslogtreecommitdiffhomepage
path: root/dev/modules/ACPI/ACPIFactoryInterface.h
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-04-25 13:08:33 +0200
committerAmlal <amlal@nekernel.org>2025-04-25 13:08:33 +0200
commitfb790b07aeba8e22e4190cf3e1834d11ecde6c96 (patch)
tree4cec7d1b321307b1d5935577631dae116a658a37 /dev/modules/ACPI/ACPIFactoryInterface.h
parent63a2d92c5dfe976175cda024ec01905d11b43738 (diff)
dev: better .clang-format, ran format command.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/modules/ACPI/ACPIFactoryInterface.h')
-rw-r--r--dev/modules/ACPI/ACPIFactoryInterface.h90
1 files changed, 44 insertions, 46 deletions
diff --git a/dev/modules/ACPI/ACPIFactoryInterface.h b/dev/modules/ACPI/ACPIFactoryInterface.h
index 10b8ccf1..0a10ffc2 100644
--- a/dev/modules/ACPI/ACPIFactoryInterface.h
+++ b/dev/modules/ACPI/ACPIFactoryInterface.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
------------------------------------------- */
@@ -8,52 +8,50 @@
#define __MOD_ACPI_H__
#include <KernelKit/DebugOutput.h>
-#include <modules/ACPI/ACPI.h>
-#include <NewKit/ErrorOr.h>
#include <NewKit/Defines.h>
+#include <NewKit/ErrorOr.h>
#include <NewKit/Ref.h>
+#include <modules/ACPI/ACPI.h>
#include <modules/Power/PowerFactory.h>
-namespace Kernel
-{
- class PowerFactory;
- class ACPIFactoryInterface;
-
- typedef ACPIFactoryInterface PowerFactoryInterface;
-
- class ACPIFactoryInterface final NE_POWER_FACTORY
- {
- public:
- explicit ACPIFactoryInterface(voidPtr rsp_ptr);
- ~ACPIFactoryInterface() = default;
-
- ACPIFactoryInterface& operator=(const ACPIFactoryInterface&) = default;
- ACPIFactoryInterface(const ACPIFactoryInterface&) = default;
-
- public:
- Bool Shutdown(); // shutdown
- Void Reboot(); // soft-reboot
-
- public:
- /// @brief Descriptor find factory.
- /// @param signature The signature of the descriptor table (MADT, ACPI...)
- /// @return the blob inside an ErrorOr object.
- ErrorOr<voidPtr> Find(const Char* signature);
-
- /// @brief Checksum factory.
- /// @param checksum the data to checksum
- /// @param len it's size
- /// @return if it succeed
- bool Checksum(const Char* checksum, SSizeT len); // watch for collides!
-
- public:
- ErrorOr<voidPtr> operator[](const Char* signature);
-
- private:
- VoidPtr fRsdp{nullptr}; // pointer to root descriptor.
- SizeT fEntries{0UL}; // number of entries, -1 tells that no invalid entries were
- // found.
- };
-} // namespace Kernel
-
-#endif // !__MOD_ACPI_H__
+namespace Kernel {
+class PowerFactory;
+class ACPIFactoryInterface;
+
+typedef ACPIFactoryInterface PowerFactoryInterface;
+
+class ACPIFactoryInterface final NE_POWER_FACTORY {
+ public:
+ explicit ACPIFactoryInterface(voidPtr rsp_ptr);
+ ~ACPIFactoryInterface() = default;
+
+ ACPIFactoryInterface& operator=(const ACPIFactoryInterface&) = default;
+ ACPIFactoryInterface(const ACPIFactoryInterface&) = default;
+
+ public:
+ Bool Shutdown(); // shutdown
+ Void Reboot(); // soft-reboot
+
+ public:
+ /// @brief Descriptor find factory.
+ /// @param signature The signature of the descriptor table (MADT, ACPI...)
+ /// @return the blob inside an ErrorOr object.
+ ErrorOr<voidPtr> Find(const Char* signature);
+
+ /// @brief Checksum factory.
+ /// @param checksum the data to checksum
+ /// @param len it's size
+ /// @return if it succeed
+ bool Checksum(const Char* checksum, SSizeT len); // watch for collides!
+
+ public:
+ ErrorOr<voidPtr> operator[](const Char* signature);
+
+ private:
+ VoidPtr fRsdp{nullptr}; // pointer to root descriptor.
+ SizeT fEntries{0UL}; // number of entries, -1 tells that no invalid entries were
+ // found.
+};
+} // namespace Kernel
+
+#endif // !__MOD_ACPI_H__