AuroraRuntime/Include/Aurora/Compression/CompressionInterceptor.hpp

38 lines
1.1 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>
#include <Aurora/IO/Protocol/IProtocolLimitable.hpp>
namespace Aurora::Compression
{
struct ICompressionInterceptor :
IO::Protocol::IProtocolInterceptorEx,
IO::Protocol::IProtocolLimitable
{
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;
};
AUKN_SYM AuSPtr<ICompressionInterceptor> NewDecompressionInterceptor(const DecompressInfo &info);
AUKN_SYM AuSPtr<ICompressionInterceptor> NewCompressionInterceptor(const CompressInfo &info);
}