OpenShot Audio Library | OpenShotAudio
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
juce_ConnectedChildProcess.h
1
/*
2
==============================================================================
3
4
This file is part of the JUCE library.
5
Copyright (c) 2022 - Raw Material Software Limited
6
7
JUCE is an open source library subject to commercial or open-source
8
licensing.
9
10
The code included in this file is provided under the terms of the ISC license
11
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12
To use, copy, modify, and/or distribute this software for any purpose with or
13
without fee is hereby granted provided that the above copyright notice and
14
this permission notice appear in all copies.
15
16
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18
DISCLAIMED.
19
20
==============================================================================
21
*/
22
23
namespace
juce
24
{
25
26
//==============================================================================
47
class
JUCE_API
ChildProcessWorker
48
{
49
public
:
53
ChildProcessWorker
();
54
56
virtual
~ChildProcessWorker
();
57
74
bool
initialiseFromCommandLine
(
const
String
& commandLine,
75
const
String
& commandLineUniqueID,
76
int
timeoutMs = 0);
77
78
//==============================================================================
84
virtual
void
handleMessageFromCoordinator
(
const
MemoryBlock
& mb);
85
86
[[deprecated (
"Replaced by handleMessageFromCoordinator."
)]]
87
virtual
void
handleMessageFromMaster
(
const
MemoryBlock
&) {}
88
92
virtual
void
handleConnectionMade();
93
99
virtual
void
handleConnectionLost();
100
106
bool
sendMessageToCoordinator (
const
MemoryBlock
&);
107
108
[[deprecated (
"Replaced by sendMessageToCoordinator."
)]]
109
bool
sendMessageToMaster
(
const
MemoryBlock
& mb) {
return
sendMessageToCoordinator
(mb); }
110
111
private
:
112
struct
Connection;
113
std::unique_ptr<Connection> connection;
114
115
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
ChildProcessWorker
)
116
};
117
118
using
ChildProcessSlave [[deprecated (
"Replaced by ChildProcessWorker."
)]] = ChildProcessWorker;
119
120
//==============================================================================
140
class
JUCE_API
ChildProcessCoordinator
141
{
142
public
:
146
ChildProcessCoordinator
();
147
152
virtual
~ChildProcessCoordinator
();
153
172
bool
launchWorkerProcess
(
const
File
& executableToLaunch,
173
const
String
& commandLineUniqueID,
174
int
timeoutMs = 0,
175
int
streamFlags = ChildProcess::wantStdOut | ChildProcess::wantStdErr);
176
177
[[deprecated (
"Replaced by launchWorkerProcess."
)]]
178
bool
launchSlaveProcess
(
const
File
& executableToLaunch,
179
const
String
& commandLineUniqueID,
180
int
timeoutMs = 0,
181
int
streamFlags = ChildProcess::wantStdOut | ChildProcess::wantStdErr)
182
{
183
return
launchWorkerProcess
(executableToLaunch, commandLineUniqueID, timeoutMs, streamFlags);
184
}
185
189
void
killWorkerProcess();
190
191
[[deprecated (
"Replaced by killWorkerProcess."
)]]
192
void
killSlaveProcess
() {
killWorkerProcess
(); }
193
197
virtual
void
handleMessageFromWorker (
const
MemoryBlock
&);
198
199
[[deprecated (
"Replaced by handleMessageFromWorker"
)]]
200
virtual
void
handleMessageFromSlave
(
const
MemoryBlock
&) {}
201
205
virtual
void
handleConnectionLost();
206
212
bool
sendMessageToWorker (
const
MemoryBlock
&);
213
214
[[deprecated (
"Replaced by sendMessageToWorker."
)]]
215
bool
sendMessageToSlave
(
const
MemoryBlock
& mb) {
return
sendMessageToWorker
(mb); }
216
217
private
:
218
std::shared_ptr<ChildProcess> childProcess;
219
220
struct
Connection;
221
std::unique_ptr<Connection> connection;
222
223
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
ChildProcessCoordinator
)
224
};
225
226
using
ChildProcessMaster [[deprecated (
"Replaced by ChildProcessCoordinator."
)]] = ChildProcessCoordinator;
227
228
}
// namespace juce
juce::ChildProcessCoordinator
Definition
juce_ConnectedChildProcess.h:141
juce::ChildProcessCoordinator::killWorkerProcess
void killWorkerProcess()
Definition
juce_ConnectedChildProcess.cpp:197
juce::ChildProcessCoordinator::ChildProcessCoordinator
ChildProcessCoordinator()
juce::ChildProcessCoordinator::sendMessageToSlave
bool sendMessageToSlave(const MemoryBlock &mb)
Definition
juce_ConnectedChildProcess.h:215
juce::ChildProcessCoordinator::handleMessageFromSlave
virtual void handleMessageFromSlave(const MemoryBlock &)
Definition
juce_ConnectedChildProcess.h:200
juce::ChildProcessCoordinator::killSlaveProcess
void killSlaveProcess()
Definition
juce_ConnectedChildProcess.h:192
juce::ChildProcessCoordinator::launchSlaveProcess
bool launchSlaveProcess(const File &executableToLaunch, const String &commandLineUniqueID, int timeoutMs=0, int streamFlags=ChildProcess::wantStdOut|ChildProcess::wantStdErr)
Definition
juce_ConnectedChildProcess.h:178
juce::ChildProcessCoordinator::sendMessageToWorker
bool sendMessageToWorker(const MemoryBlock &)
Definition
juce_ConnectedChildProcess.cpp:147
juce::ChildProcessCoordinator::launchWorkerProcess
bool launchWorkerProcess(const File &executableToLaunch, const String &commandLineUniqueID, int timeoutMs=0, int streamFlags=ChildProcess::wantStdOut|ChildProcess::wantStdErr)
Definition
juce_ConnectedChildProcess.cpp:156
juce::ChildProcessWorker
Definition
juce_ConnectedChildProcess.h:48
juce::ChildProcessWorker::sendMessageToCoordinator
bool sendMessageToCoordinator(const MemoryBlock &)
Definition
juce_ConnectedChildProcess.cpp:274
juce::ChildProcessWorker::sendMessageToMaster
bool sendMessageToMaster(const MemoryBlock &mb)
Definition
juce_ConnectedChildProcess.h:109
juce::ChildProcessWorker::ChildProcessWorker
ChildProcessWorker()
juce::ChildProcessWorker::~ChildProcessWorker
virtual ~ChildProcessWorker()
juce::ChildProcessWorker::handleMessageFromCoordinator
virtual void handleMessageFromCoordinator(const MemoryBlock &mb)
Definition
juce_ConnectedChildProcess.cpp:265
juce::ChildProcessWorker::initialiseFromCommandLine
bool initialiseFromCommandLine(const String &commandLine, const String &commandLineUniqueID, int timeoutMs=0)
Definition
juce_ConnectedChildProcess.cpp:283
juce::ChildProcessWorker::handleMessageFromMaster
virtual void handleMessageFromMaster(const MemoryBlock &)
Definition
juce_ConnectedChildProcess.h:87
juce::File
Definition
juce_File.h:45
juce::MemoryBlock
Definition
juce_MemoryBlock.h:33
juce::String
Definition
juce_String.h:53
libopenshot-audio
JuceLibraryCode
modules
juce_events
interprocess
juce_ConnectedChildProcess.h
Generated by
1.18.0