AuroraRuntime/Include/Aurora/Compression/CompressionInterceptor.hpp
Reece Wilson e145352920 [+] IProtocolStack::AppendSingleFrameProcessor
[+] IProtocolStack::AppendSingleFrameProcessorEx
[+] ICompressionInterceptor::FlushNextFrame
[+] ICompressionInterceptor::ConfigureAutoFlushPerFrame
2022-11-08 20:04:12 +00:00

41 lines
1.2 KiB
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: CompressionInterceptor.hpp
Date: 2022-9-14
Author: Reece
***/
#pragma once
#include <Aurora/IO/Protocol/IProtocolInterceptorEx.hpp>
namespace Aurora::Compression
{
struct ICompressionInterceptor : IO::Protocol::IProtocolInterceptorEx
{
virtual bool HasFailed() = 0;
/**
* @brief
*/
virtual void FlushNextFrame() = 0;
/**
* @brief When enabled, each IO tick is considered a logical frame instead of a streaming, meaning that a flush will occur
* To be used in conjuction with IProtocolStack::AppendSingleFrameProcessorEx
* @param bAutoFlush
* @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 AuUInt LimitGetIndex() = 0;
};
AUKN_SYM AuSPtr<ICompressionInterceptor> NewDecompressionInterceptor(const DecompressInfo &info);
AUKN_SYM AuSPtr<ICompressionInterceptor> NewCompressionInterceptor(const CompressInfo &info);
}