From af8a516fc22865abd80d6e26f1541fa3d6bebfdc Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 9 May 2024 00:42:44 +0200 Subject: MHR-23: :boom:, refactors. - Move NewBoot to /Boot, thus making Kernel directory only containing the kernel. Signed-off-by: Amlal El Mahrouss --- Kernel/KernelKit/LoaderInterface.hpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Kernel/KernelKit/LoaderInterface.hpp (limited to 'Kernel/KernelKit/LoaderInterface.hpp') diff --git a/Kernel/KernelKit/LoaderInterface.hpp b/Kernel/KernelKit/LoaderInterface.hpp new file mode 100644 index 00000000..71c90e0c --- /dev/null +++ b/Kernel/KernelKit/LoaderInterface.hpp @@ -0,0 +1,33 @@ +/* ------------------------------------------- + + Copyright SoftwareLabs + +------------------------------------------- */ + +#pragma once + +#include +#include +#include +#include + +namespace NewOS +{ + /// @brief This interface is used to make loader contracts (MSCOFF, PEF). + /// @author @Amlal-El-Mahrouss + class LoaderInterface + { + public: + explicit LoaderInterface() = default; + virtual ~LoaderInterface() = default; + + NEWOS_COPY_DEFAULT(LoaderInterface); + + public: + virtual _Output const char* FormatAsString() = 0; + virtual _Output const char* MIME() = 0; + virtual _Output const char* Path() = 0; + virtual _Output ErrorOr FindStart() = 0; + virtual _Output VoidPtr FindSymbol(_Input const char* name, _Input Int32 kind) = 0; + }; +} // namespace NewOS -- cgit v1.2.3