From d48cbe75ef29a9c67c9d176bf58e56ea6448fb9e Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 21 Oct 2024 20:23:36 +0200 Subject: IMP: Major refactor of header and source files extensions. Signed-off-by: Amlal El Mahrouss --- dev/zba/BootKit/Device.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 dev/zba/BootKit/Device.h (limited to 'dev/zba/BootKit/Device.h') diff --git a/dev/zba/BootKit/Device.h b/dev/zba/BootKit/Device.h new file mode 100644 index 00000000..f6352b7b --- /dev/null +++ b/dev/zba/BootKit/Device.h @@ -0,0 +1,36 @@ +/* ------------------------------------------- + + Copyright ZKA Web Services Co. + +------------------------------------------- */ + +#pragma once + +#include + +using namespace Kernel; + +/// @brief Device type. +class Device +{ +public: + explicit Device() = default; + virtual ~Device() = default; + + ZKA_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