LMMS
Loading...
Searching...
No Matches
juce_ConnectedChildProcess.h
Go to the documentation of this file.
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
23namespace juce
24{
25
26//==============================================================================
48{
49public:
54
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.")]]
110
111private:
112 struct Connection;
113 std::unique_ptr<Connection> connection;
114
116};
117
118using ChildProcessSlave [[deprecated ("Replaced by ChildProcessWorker.")]] = ChildProcessWorker;
119
120//==============================================================================
141{
142public:
147
152 virtual ~ChildProcessCoordinator();
153
172 bool launchWorkerProcess (const File& executableToLaunch,
173 const String& commandLineUniqueID,
174 int timeoutMs = 0,
176
177 [[deprecated ("Replaced by launchWorkerProcess.")]]
178 bool launchSlaveProcess (const File& executableToLaunch,
179 const String& commandLineUniqueID,
180 int timeoutMs = 0,
182 {
183 return launchWorkerProcess (executableToLaunch, commandLineUniqueID, timeoutMs, streamFlags);
184 }
185
189 void killWorkerProcess();
190
191 [[deprecated ("Replaced by 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
217private:
218 std::unique_ptr<ChildProcess> childProcess;
219
220 struct Connection;
221 std::unique_ptr<Connection> connection;
222
224};
225
226using ChildProcessMaster [[deprecated ("Replaced by ChildProcessCoordinator.")]] = ChildProcessCoordinator;
227
228} // namespace juce
Definition juce_ConnectedChildProcess.h:141
void killWorkerProcess()
Definition juce_ConnectedChildProcess.cpp:186
std::unique_ptr< Connection > connection
Definition juce_ConnectedChildProcess.h:221
bool sendMessageToSlave(const MemoryBlock &mb)
Definition juce_ConnectedChildProcess.h:215
virtual void handleMessageFromSlave(const MemoryBlock &)
Definition juce_ConnectedChildProcess.h:200
void killSlaveProcess()
Definition juce_ConnectedChildProcess.h:192
bool launchSlaveProcess(const File &executableToLaunch, const String &commandLineUniqueID, int timeoutMs=0, int streamFlags=ChildProcess::wantStdOut|ChildProcess::wantStdErr)
Definition juce_ConnectedChildProcess.h:178
bool sendMessageToWorker(const MemoryBlock &)
Definition juce_ConnectedChildProcess.cpp:147
std::unique_ptr< ChildProcess > childProcess
Definition juce_ConnectedChildProcess.h:218
bool launchWorkerProcess(const File &executableToLaunch, const String &commandLineUniqueID, int timeoutMs=0, int streamFlags=ChildProcess::wantStdOut|ChildProcess::wantStdErr)
Definition juce_ConnectedChildProcess.cpp:156
@ wantStdErr
Definition juce_ChildProcess.h:53
@ wantStdOut
Definition juce_ChildProcess.h:52
Definition juce_ConnectedChildProcess.h:48
std::unique_ptr< Connection > connection
Definition juce_ConnectedChildProcess.h:113
bool sendMessageToCoordinator(const MemoryBlock &)
Definition juce_ConnectedChildProcess.cpp:263
bool sendMessageToMaster(const MemoryBlock &mb)
Definition juce_ConnectedChildProcess.h:109
virtual void handleMessageFromCoordinator(const MemoryBlock &mb)
Definition juce_ConnectedChildProcess.cpp:254
bool initialiseFromCommandLine(const String &commandLine, const String &commandLineUniqueID, int timeoutMs=0)
Definition juce_ConnectedChildProcess.cpp:272
virtual void handleMessageFromMaster(const MemoryBlock &)
Definition juce_ConnectedChildProcess.h:87
Definition juce_File.h:45
Definition juce_MemoryBlock.h:33
Definition juce_String.h:53
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
#define JUCE_API
Definition juce_StandardHeader.h:152
Definition carla_juce.cpp:31