summaryrefslogtreecommitdiffhomepage
path: root/NewKernel/NewBoot/BootKit/Device.hxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-08 12:32:41 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-08 12:32:41 +0200
commit09dd11ddf800898c00ecb04a65fb5cd10fb481fa (patch)
treeeda0b4e23d6a71da7de3a78f0bb76ec3201dd2f9 /NewKernel/NewBoot/BootKit/Device.hxx
parentca83108fd138cc0398f900e6a6c0a53ad51aee31 (diff)
MHR-23: :boom: changes, reworked project tree.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'NewKernel/NewBoot/BootKit/Device.hxx')
-rw-r--r--NewKernel/NewBoot/BootKit/Device.hxx36
1 files changed, 36 insertions, 0 deletions
diff --git a/NewKernel/NewBoot/BootKit/Device.hxx b/NewKernel/NewBoot/BootKit/Device.hxx
new file mode 100644
index 00000000..37c617b5
--- /dev/null
+++ b/NewKernel/NewBoot/BootKit/Device.hxx
@@ -0,0 +1,36 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
+
+#pragma once
+
+#include <Builtins/ATA/ATA.hxx>
+
+using namespace NewOS;
+
+/// @brief Device type.
+class Device
+{
+public:
+ Device() = default;
+ virtual ~Device() = default;
+
+ NEWOS_MOVE_DEFAULT(Device);
+
+ struct Trait
+ {
+ SizeT mBase{1024};
+ SizeT mSize{1024};
+ };
+
+ virtual Trait& Leak() = 0;
+
+ virtual Device& Read(Char* Buf, const SizeT& SecCount) = 0;
+ virtual Device& Write(Char* Buf, const SizeT& SecCount) = 0;
+};
+
+typedef Device BootDevice;
+typedef Device NetworkDevice;
+typedef Device DiskDevice;