[+] Aurora::IO::Protocol::IProtocolLimitable

This commit is contained in:
Reece Wilson 2023-07-27 17:26:23 +01:00
parent 2b777f1e38
commit 6e035195f7
3 changed files with 29 additions and 10 deletions

View File

@ -8,10 +8,13 @@
#pragma once
#include <Aurora/IO/Protocol/IProtocolInterceptorEx.hpp>
#include <Aurora/IO/Protocol/IProtocolLimitable.hpp>
namespace Aurora::Compression
{
struct ICompressionInterceptor : IO::Protocol::IProtocolInterceptorEx
struct ICompressionInterceptor :
IO::Protocol::IProtocolInterceptorEx,
IO::Protocol::IProtocolLimitable
{
virtual bool HasFailed() = 0;
@ -27,16 +30,9 @@ namespace Aurora::Compression
* @return
*/
virtual bool ConfigureAutoFlushPerFrame(bool bAutoFlush) = 0;
// TODO (Reece): interface potential
virtual bool LimitHasHit() = 0;
virtual void LimitReset() = 0;
virtual void LimitSet(AuUInt uLength) = 0;
virtual bool LimitPassthroughOnOverflow(bool bPassthrough) = 0;
virtual AuUInt LimitGetIndex() = 0;
};
AUKN_SYM AuSPtr<ICompressionInterceptor> NewDecompressionInterceptor(const DecompressInfo &info);
AUKN_SYM AuSPtr<ICompressionInterceptor> NewCompressionInterceptor(const CompressInfo &info);
}

View File

@ -0,0 +1,21 @@
/***
Copyright (C) 2022-2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IProtocolLimitable.hpp
Date: 2022-9-14
Date: 2023-7-27
Author: Reece
***/
#pragma once
namespace Aurora::IO::Protocol
{
struct IProtocolLimitable
{
virtual bool LimitHasHit() = 0;
virtual void LimitReset() = 0;
virtual void LimitSet(AuUInt uLength) = 0;
virtual bool LimitPassthroughOnOverflow(bool bPassthrough) = 0;
virtual AuUInt LimitGetIndex() = 0;
};
}

View File

@ -14,4 +14,6 @@
#include "IProtocolInterceptorEx.hpp"
#include "IProtocolPiece.hpp"
#include "IProtocolStack.hpp"
#include "IProtocolStack.hpp"
#include "IProtocolLimitable.hpp"