Loading...
Searching...
No Matches
juce_ChildProcess.h
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2022 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
//==============================================================================
class JUCE_API ChildProcess
{
public:
//==============================================================================
ChildProcess();
~ChildProcess();
enum StreamFlags
{
wantStdOut = 1,
wantStdErr = 2
};
bool start (const String& command, int streamFlags = wantStdOut | wantStdErr);
bool start (const StringArray& arguments, int streamFlags = wantStdOut | wantStdErr);
bool isRunning() const;
int readProcessOutput (void* destBuffer, int numBytesToRead);
String readAllProcessOutput();
bool waitForProcessToFinish (int timeoutMs) const;
uint32 getExitCode() const;
bool kill();
private:
//==============================================================================
class ActiveProcess;
std::unique_ptr<ActiveProcess> activeProcess;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChildProcess)
};
} // namespace juce
juce::ChildProcess::getExitCode
uint32 getExitCode() const
Definition juce_ChildProcess.cpp:44
juce::ChildProcess::readAllProcessOutput
String readAllProcessOutput()
Definition juce_ChildProcess.cpp:65
juce::ChildProcess::start
bool start(const StringArray &arguments, int streamFlags=wantStdOut|wantStdErr)
juce::ChildProcess::readProcessOutput
int readProcessOutput(void *destBuffer, int numBytesToRead)
Definition juce_ChildProcess.cpp:34
juce::ChildProcess::isRunning
bool isRunning() const
Definition juce_ChildProcess.cpp:29
juce::ChildProcess::waitForProcessToFinish
bool waitForProcessToFinish(int timeoutMs) const
Definition juce_ChildProcess.cpp:49
juce::ChildProcess::StreamFlags
StreamFlags
Definition juce_ChildProcess.h:51
juce::ChildProcess::kill
bool kill()
Definition juce_ChildProcess.cpp:39
juce::ChildProcess::ChildProcess
ChildProcess()
Definition juce_ChildProcess.cpp:26
juce::ChildProcess::start
bool start(const String &command, int streamFlags=wantStdOut|wantStdErr)
juce::StringArray
Definition juce_StringArray.h:35
juce::String
Definition juce_String.h:53