AuroraRuntime/Include/Aurora/IO/Protocol/IProtocolPiece.hpp

75 lines
1.6 KiB
C++
Raw Normal View History

/***
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
{
2023-06-04 18:07:26 +00:00
struct ProtocolStack;
struct IProtocolPiece
{
2023-06-04 18:07:26 +00:00
/**
* @brief
* @return
*/
virtual AuSPtr<ProtocolStack> GetParent() = 0;
/**
* @brief
* @return
*/
virtual AuSPtr<IProtocolPiece> GetNextPiece() = 0;
/**
* @brief
* @param uOutputLength
* @return
*/
virtual bool ReallocateDrainBuffer(AuUInt32 uOutputLength) = 0;
/**
* @brief Removes this piece from the stack
*/
virtual void Remove() = 0;
/**
* @brief
* @return
*/
virtual AuSPtr<IStreamWriter> ToInputWriter() = 0;
/**
2023-04-21 04:44:23 +00:00
* @brief Fetches an IStreamWriter representation of the next piece in the stack
* @return
*/
virtual AuSPtr<IStreamWriter> ToNextWriter() = 0;
/**
* @brief
* @warning returns self shared reference
* @return
*/
virtual AuSPtr<Memory::ByteBuffer> GetNextPieceBuffer() = 0;
/**
* @brief
* @return
*/
virtual AuSPtr<IProtocolInterceptorEx> GetExtendedInterceptor() = 0;
/**
* @brief
* @return
*/
virtual AuSPtr<IProtocolInterceptor> GetShortPipeInterceptor() = 0;
virtual AuOptional<AuUInt> ExchangeMaximumBufferLength(AuOptional<AuUInt> optMax) = 0;
AURT_ADD_USR_DATA;
};
}