LMMS
Loading...
Searching...
No Matches
ChildProcess.h
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the Water library.
5 Copyright (c) 2016 ROLI Ltd.
6 Copyright (C) 2017-2022 Filipe Coelho <falktx@falktx.com>
7
8 Permission is granted to use this software under the terms of the ISC license
9 http://www.isc.org/downloads/software-support-policy/isc-license/
10
11 Permission to use, copy, modify, and/or distribute this software for any
12 purpose with or without fee is hereby granted, provided that the above
13 copyright notice and this permission notice appear in all copies.
14
15 THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD
16 TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17 FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
18 OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
19 USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
20 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
21 OF THIS SOFTWARE.
22
23 ==============================================================================
24*/
25
26#ifndef WATER_CHILDPROCESS_H_INCLUDED
27#define WATER_CHILDPROCESS_H_INCLUDED
28
29#include "../text/StringArray.h"
30
31#include "CarlaScopeUtils.hpp"
32
33namespace water {
34
35//==============================================================================
43{
44public:
45 //==============================================================================
52
57
62
72 bool start (const String& command, Type type = TypeAny);
73
83 bool start (const StringArray& arguments, Type type = TypeAny);
84
86 bool isRunning() const;
87
89 bool waitForProcessToFinish (int timeoutMs);
90
93
98 bool kill();
99 bool terminate();
100
102
103private:
104 //==============================================================================
105 class ActiveProcess;
106 CarlaScopedPointer<ActiveProcess> activeProcess;
107
109};
110
111}
112
113#endif // WATER_CHILDPROCESS_H_INCLUDED
#define CARLA_DECLARE_NON_COPYABLE(ClassName)
Definition CarlaDefines.h:242
#define noexcept
Definition DistrhoDefines.h:72
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
ChildProcess()
Definition ChildProcess.cpp:280
Definition juce_posix_SharedCode.h:1119
bool terminate()
Definition ChildProcess.cpp:293
uint32 getExitCodeAndClearPID()
Definition ChildProcess.cpp:298
ChildProcess()
Definition ChildProcess.cpp:280
Type
Definition ChildProcess.h:47
@ TypeARM
Definition ChildProcess.h:49
@ TypeAny
Definition ChildProcess.h:48
@ TypeIntel
Definition ChildProcess.h:50
bool waitForProcessToFinish(int timeoutMs)
Definition ChildProcess.cpp:303
~ChildProcess()
Definition ChildProcess.cpp:281
bool isRunning() const
Definition ChildProcess.cpp:283
uint32 getPID() const noexcept
Definition ChildProcess.cpp:321
bool kill()
Definition ChildProcess.cpp:288
CarlaScopedPointer< ActiveProcess > activeProcess
Definition ChildProcess.h:106
Definition StringArray.h:41
Definition String.h:48
virtual ASIOError start()=0
Definition AudioSampleBuffer.h:33
unsigned int uint32
Definition water.h:98
#define const
Definition zconf.h:137