/*** Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: IStreamReader.hpp Date: 2021-6-10 Author: Reece ***/ #pragma once namespace Aurora::IO { // TODO (Reece): Consider publishing the multiple inverted ext hack for Aurora Interfaces for binding this. // It would be nice to have cs-style extensions on this interface. Maybe I shouldn't double down // over a double blocking API. Maybe I should focus on the stream pumpers. struct IStreamReader { virtual EStreamError Open() = 0; virtual EStreamError Read(const Memory::MemoryViewStreamWrite ¶mters) = 0; virtual void Close() = 0; inline EStreamError ReadAll(Memory::ByteBuffer &buffer); }; } #include "IStreamReader.inl" // ReadAll utility