From 5468ca71a59c9e24c1d392554e8f97f0c1705394 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 10 Mar 2024 15:41:08 +0100 Subject: Kernel: Reworked StorageKit to add AHCI support. Signed-off-by: Amlal El Mahrouss --- Public/Kits/System.Core/FileAPI.hxx | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Public/Kits/System.Core/FileAPI.hxx (limited to 'Public/Kits/System.Core/FileAPI.hxx') diff --git a/Public/Kits/System.Core/FileAPI.hxx b/Public/Kits/System.Core/FileAPI.hxx new file mode 100644 index 00000000..66ecef22 --- /dev/null +++ b/Public/Kits/System.Core/FileAPI.hxx @@ -0,0 +1,40 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +#ifndef _SYSTEM_KIT_HCORE_FILE_HPP +#define _SYSTEM_KIT_HCORE_FILE_HPP + +#include +#include + +using namespace HCore; + +/// @brief SOM class, translated to C++ + +class HFile final { + public: + explicit HFile(const char *path); + ~HFile(); + + public: + HCORE_COPY_DEFAULT(HFile); + + public: + voidPtr Read(SizeT off, SizeT sz); + void Write(voidPtr buf, SizeT off, SizeT sz); + void Seek(SizeT off); + voidPtr Read(SizeT sz); + void Write(voidPtr buf, SizeT sz); + void Rewind(); + + public: + const char *MIME(); + void MIME(const char *mime); +}; + +typedef HFile *HFilePtr; + +#endif // ifndef _SYSTEM_KIT_HCORE_FILE_HPP -- cgit v1.2.3