2022-06-11 23:01:27 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: IIOBufferedProcessor.hpp
|
|
|
|
Date: 2022-6-6
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::IO
|
|
|
|
{
|
|
|
|
struct IIOBufferedProcessor
|
|
|
|
{
|
|
|
|
virtual AuUInt32 TryProcessBuffered() = 0;
|
|
|
|
virtual AuUInt32 GetRawBytesBuffered() = 0;
|
|
|
|
virtual AuUInt32 GetRawBytesLimit() = 0;
|
|
|
|
};
|
|
|
|
|
2022-08-29 15:46:46 +00:00
|
|
|
/**
|
|
|
|
* @brief
|
|
|
|
* @param source
|
|
|
|
* @param processor
|
|
|
|
* @param drain
|
|
|
|
* @param bufferSize
|
|
|
|
* @deprecated by Aurora::IO::Protocol (tobe AuProtocol:: and AuIOProtocol::)
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
AUKN_SYM AuSPtr<IIOBufferedProcessor> NewBufferedProcessor(const AuSPtr<IStreamReader> &pSource,
|
|
|
|
const AuSPtr<IIOPipeInterceptor> &pProcessor,
|
|
|
|
const AuSPtr<IStreamWriter> &pDrain, // TODO: share IOPipeCallback
|
|
|
|
AuUInt32 uBufferSize);
|
2022-06-11 23:01:27 +00:00
|
|
|
}
|