From f3d931aa7cfaf96baef8383b59a8938779541ee7 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Thu, 15 Aug 2024 18:35:34 +0200 Subject: [IMP] Moved source code into dev/ folder. Signed-off-by: Amlal EL Mahrouss --- dev/Boot/BootKit/Device.hxx | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 dev/Boot/BootKit/Device.hxx (limited to 'dev/Boot/BootKit/Device.hxx') diff --git a/dev/Boot/BootKit/Device.hxx b/dev/Boot/BootKit/Device.hxx new file mode 100644 index 00000000..21955b79 --- /dev/null +++ b/dev/Boot/BootKit/Device.hxx @@ -0,0 +1,36 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#pragma once + +#include + +using namespace Kernel; + +/// @brief Device type. +class Device +{ +public: + explicit 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; -- cgit v1.2.3