/*** Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: IProtocolStack.hpp Date: 2022-9-29 Author: Reece ***/ #pragma once namespace Aurora::IO::Protocol { struct IProtocolStack; struct IProtocolPiece { /** * @brief * @return */ virtual AuSPtr GetParent() = 0; /** * @brief * @return */ virtual AuSPtr GetNextPiece() = 0; /** * @brief * @return */ virtual AuSPtr GetPreviousPiece() = 0; /** * @brief * @param uOutputLength * @return */ virtual bool ReallocateDrainBuffer(AuUInt32 uOutputLength) = 0; /** * @brief * @param uInputLength * @return */ virtual bool ReallocateSourceBuffer(AuUInt32 uInputLength) = 0; /** * @brief Removes this piece from the stack */ virtual void Remove() = 0; /** * @brief * @return */ virtual AuSPtr GetInputWriter() = 0; /** * @brief * @return */ virtual AuSPtr GetOutputReader() = 0; /** * @brief Fetches an IStreamWriter representation of the next piece in the stack * @return */ virtual AuSPtr GetNextWriter() = 0; /** * @brief * @warning returns self shared reference * @return */ virtual AuSPtr GetNextPieceBuffer() = 0; /** * @brief * @return */ virtual AuSPtr GetExtendedInterceptor() = 0; /** * @brief * @return */ virtual AuSPtr GetShortPipeInterceptor() = 0; virtual AuOptional ExchangeMaximumBufferLength(AuOptional optMax) = 0; AURT_ADD_USR_DATA; }; }