From 6e59770eee548baf0abbd524095e895ed6db9dd6 Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Thu, 13 Jul 2023 06:29:41 +0100 Subject: [PATCH] [-] Theory crafted future AuProcesses API from yesteryear --- Include/Aurora/Processes/ICommandFinished.hpp | 9 ---- Include/Aurora/Processes/Processes.hpp | 1 - Include/Aurora/Processes/UtilRun.hpp | 44 ------------------- 3 files changed, 54 deletions(-) delete mode 100644 Include/Aurora/Processes/ICommandFinished.hpp delete mode 100644 Include/Aurora/Processes/UtilRun.hpp diff --git a/Include/Aurora/Processes/ICommandFinished.hpp b/Include/Aurora/Processes/ICommandFinished.hpp deleted file mode 100644 index bfcecb66..00000000 --- a/Include/Aurora/Processes/ICommandFinished.hpp +++ /dev/null @@ -1,9 +0,0 @@ -/*** - Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved. - - File: ICommandFinished.hpp - Date: 2022-1-27 - Author: Reece -***/ -#pragma once - diff --git a/Include/Aurora/Processes/Processes.hpp b/Include/Aurora/Processes/Processes.hpp index 581838b0..d63adfa6 100644 --- a/Include/Aurora/Processes/Processes.hpp +++ b/Include/Aurora/Processes/Processes.hpp @@ -13,6 +13,5 @@ #include "IProcess.hpp" #include "StartupParmaters.hpp" #include "Spawn.hpp" -#include "UtilRun.hpp" #include "Open.hpp" \ No newline at end of file diff --git a/Include/Aurora/Processes/UtilRun.hpp b/Include/Aurora/Processes/UtilRun.hpp deleted file mode 100644 index 741eb4a4..00000000 --- a/Include/Aurora/Processes/UtilRun.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*** - Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved. - - File: UtilRun.hpp - Date: 2022-1-27 - Author: Reece -***/ -#pragma once - -namespace Aurora::Processes -{ - AUKN_INTERFACE(ICommandFinished, - AUI_METHOD(void, OnExit, (AuUInt32, exitCode)) - ); - - AUKN_INTERFACE(IStdOutConsumer, - AUI_METHOD(void, OnLines, (const AuList &, buffer)), - AUI_METHOD(void, OnBuffered, (const Memory::ByteBuffer &, buffer)) - ); - - AUKN_INTERFACE(IStdInProvider, - AUI_METHOD(bool, OnLines, (AuList &, buffer)), - AUI_METHOD(bool, OnBuffered, (Memory::ByteBuffer &, buffer)) - ); - - struct CommandRun_s - { - AuString cmd; - AuList args; - Memory::ByteBuffer startStdIn; - bool stdOutLongerThan64k {false}; // common constraint on linux and windows, at the very least. linux -> max pipe = 16k, windows -> 16k minimum guaranteed - bool stdOutIsText {true}; - bool runCallbackOnRandomThread {true}; - bool runCallbackOnWorkerPId {}; - Async::WorkerPId_t worker; - bool syncToResult {}; // default -> async - AuSPtr callback; - AuSPtr stdInPoller; - AuSPtr stdOutPoller; - AuSPtr bufferAllStdout; - }; - - AUKN_SYM void RunCommand(const CommandRun_s &in); -} \ No newline at end of file