[*] Move/refactor AuIO adapters to Aurora::IO::Adapters

This commit is contained in:
Reece Wilson 2023-09-23 16:40:13 +01:00
parent 345cf608b3
commit 7e9bfd8215
17 changed files with 20 additions and 33 deletions

View File

@ -7,7 +7,7 @@
***/
#pragma once
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
struct IAsyncStreamReader : IStreamReader
{

View File

@ -7,7 +7,7 @@
***/
#pragma once
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
AUKN_SYM AuSPtr<IStreamReader> NewByteBufferReadAdapter(const AuSPtr<Memory::ByteBuffer> &pBuffer);
AUKN_SYM AuSPtr<ISeekingReader> NewByteBufferLinearSeekableAdapter(const AuSPtr<Memory::ByteBuffer> &pBuffer);

View File

@ -7,7 +7,7 @@
***/
#pragma once
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
AUKN_SYM AuSPtr<IStreamReader> NewCompressionReadAdapter(const AuSPtr<Compression::ICompressionStream> &pCompresionStream);
AUKN_SYM AuSPtr<ISeekingReader> NewCompressionSeekingAdapter(const AuSPtr<Compression::ICompressionStream> &pCompresionStream);

View File

@ -7,7 +7,7 @@
***/
#pragma once
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
AUKN_SYM AuSPtr<IStreamReader> NewSeekingReadAdapter(const AuSPtr<ISeekingReader> &pReader);
}

View File

@ -46,10 +46,10 @@
#include "IByteBufferStreamPair.hpp"
#include "IOAdapterAsyncStream.hpp"
#include "IOAdapterByteBuffer.hpp"
#include "IOAdapterCompression.hpp"
#include "IOAdapterSeeking.hpp"
#include "Adapters/IOAdapterAsyncStream.hpp"
#include "Adapters/IOAdapterByteBuffer.hpp"
#include "Adapters/IOAdapterCompression.hpp"
#include "Adapters/IOAdapterSeeking.hpp"
#include "IIOWaitableTickLimiter.hpp"
#include "IIOWaitableIOTimer.hpp"

View File

@ -8,9 +8,9 @@
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "AuIOAdapterAsyncStream.hpp"
#include "AuIOWaitableIOLoopSource.hpp"
#include "../AuIOWaitableIOLoopSource.hpp"
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
struct AsyncStreamAdapter;

View File

@ -7,7 +7,7 @@
***/
#pragma once
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
}

View File

@ -9,7 +9,7 @@
#include <Aurora/IO/IOExperimental.hpp>
#include "AuIOAdapterByteBuffer.hpp"
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
AUKN_SYM AuSPtr<IStreamReader> NewByteBufferReadAdapter(const AuSPtr<Memory::ByteBuffer> &pBuffer)
{

View File

@ -7,7 +7,7 @@
***/
#pragma once
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
}

View File

@ -9,7 +9,7 @@
#include <Aurora/IO/IOExperimental.hpp>
#include "AuIOAdapterCompression.hpp"
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
CompressionStreamReader::CompressionStreamReader(const AuSPtr<Compression::ICompressionStream> &pCompressionStream) :
pCompressionStream(pCompressionStream)

View File

@ -7,7 +7,7 @@
***/
#pragma once
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
struct CompressionStreamReader : IStreamReader
{

View File

@ -9,7 +9,7 @@
#include <Aurora/IO/IOExperimental.hpp>
#include "AuIOAdapterSeeking.hpp"
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
SeekingReader::SeekingReader(const AuSPtr<ISeekingReader> &pReader) :
pReader(pReader)

View File

@ -7,7 +7,7 @@
***/
#pragma once
namespace Aurora::IO
namespace Aurora::IO::Adapters
{
struct SeekingReader : IStreamReader
{

View File

@ -25,7 +25,7 @@ namespace Aurora::IO
this->uBytesWrittenLimit_ = request.uLengthOrZero;
this->uBytesWrittenTarget_ = request.uMinBytesToRead ? request.uMinBytesToRead : request.uLengthOrZero;
this->pAsyncTransaction_ = request.pAsyncTransaction;
this->pAsyncAdapter_ = NewAsyncStreamAdapter(request.pAsyncTransaction, request.bIsStream);
this->pAsyncAdapter_ = Adapters::NewAsyncStreamAdapter(request.pAsyncTransaction, request.bIsStream);
SysAssert(this->pAsyncAdapter_);
this->pAsyncAdapter_->SetReadOffset(request.uStartOffset);
this->pAsyncAdapter_->SetWriteOffset(request.uStartOffset);

View File

@ -93,8 +93,8 @@ namespace Aurora::IO
{
IOPipeInputData input_;
AuSPtr<IAsyncTransaction> pAsyncTransaction_;
AuSPtr<IAsyncStreamAdapter> pAsyncAdapter_;
AuSPtr<IAsyncStreamReader> pAsyncStreamReader_;
AuSPtr<Adapters::IAsyncStreamAdapter> pAsyncAdapter_;
AuSPtr<Adapters::IAsyncStreamReader> pAsyncStreamReader_;
};
IOPipeCallback output;

View File

@ -1,7 +0,0 @@
#include <Source/RuntimeInternal.hpp>
#include "BlobBuilder.hpp"
namespace Aurora::IO::Buffered
{
}

View File

@ -1,6 +0,0 @@
#pragma once
namespace Aurora::IO::Buffered
{
}