summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit/LoaderInterface.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-15 08:03:35 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-15 08:03:35 +0100
commitb3e76bf866b4223390585589786600475c9fdcae (patch)
tree7b10c496e94aa98dedf441f67fb39d0aaa7fbda9 /Private/KernelKit/LoaderInterface.hpp
parent159d312c0dd3c02995950270e173cc10ade273cf (diff)
API: Inconsitency fix.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/KernelKit/LoaderInterface.hpp')
-rw-r--r--Private/KernelKit/LoaderInterface.hpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/Private/KernelKit/LoaderInterface.hpp b/Private/KernelKit/LoaderInterface.hpp
new file mode 100644
index 00000000..a19ba483
--- /dev/null
+++ b/Private/KernelKit/LoaderInterface.hpp
@@ -0,0 +1,30 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
+
+#pragma once
+
+#include <CompilerKit/CompilerKit.hxx>
+#include <NewKit/Defines.hpp>
+#include <NewKit/ErrorOr.hpp>
+
+namespace HCore {
+/// @brief This interface is used to make loader contracts (MSCOFF, PEF).
+/// @author @Amlal-El-Mahrouss
+class LoaderInterface {
+ public:
+ explicit LoaderInterface() = default;
+ virtual ~LoaderInterface() = default;
+
+ HCORE_COPY_DEFAULT(LoaderInterface);
+
+ public:
+ virtual const char* Format() = 0;
+ virtual const char* MIME() = 0;
+ virtual const char* Path() = 0;
+ virtual ErrorOr<VoidPtr> FindStart() = 0;
+ virtual VoidPtr FindSymbol(const char* name, Int32 kind) = 0;
+};
+} // namespace HCore