/*** Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: AuIPCPipeWriter.cpp Date: 2023-10-21 Author: Reece ***/ #include #include "IPC.hpp" #include "AuIPCHandle.hpp" #include "AuIPCPipeWriter.hpp" namespace Aurora::IO::IPC { IPCPipeWriter::IPCPipeWriter(IPCPipe *pPipe) : pParent(pPipe) { } EStreamError IPCPipeWriter::IsOpen() { auto pOpenChannel = this->pParent->AsReadChannelIsOpen(); if (!pOpenChannel && pOpenChannel->IsSignaled()) { return EStreamError::eErrorNone; } return EStreamError::eErrorStreamNotOpen; } EStreamError IPCPipeWriter::Write(const Memory::MemoryViewStreamRead ¶meters) { parameters.outVariable = 0; if (this->pParent->Write(parameters)) { return EStreamError::eErrorNone; } return EStreamError::eErrorStreamInterrupted; } void IPCPipeWriter::Flush() { } void IPCPipeWriter::Close() { } }