summaryrefslogtreecommitdiff
path: root/src/spawn.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/spawn.h')
-rw-r--r--src/spawn.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/spawn.h b/src/spawn.h
index 31b44739..d2853cd5 100644
--- a/src/spawn.h
+++ b/src/spawn.h
@@ -27,6 +27,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QDir>
class Settings;
+namespace MOBase { class IPluginGame; }
namespace spawn
{
@@ -46,6 +47,7 @@ struct SpawnParameters
QFileInfo binary;
QString arguments;
QDir currentDirectory;
+ QString steamAppID;
bool hooked = false;
HANDLE stdOut = INVALID_HANDLE_VALUE;
HANDLE stdErr = INVALID_HANDLE_VALUE;
@@ -69,6 +71,38 @@ bool checkBlacklist(
**/
HANDLE startBinary(QWidget* parent, const SpawnParameters& sp);
+
+class SpawnedProcess
+{
+public:
+ SpawnedProcess(HANDLE handle, SpawnParameters sp);
+
+ SpawnedProcess(const SpawnedProcess&) = delete;
+ SpawnedProcess& operator=(const SpawnedProcess&) = delete;
+ SpawnedProcess(SpawnedProcess&& other);
+ SpawnedProcess& operator=(SpawnedProcess&& other);
+ ~SpawnedProcess();
+
+ HANDLE releaseHandle();
+
+private:
+ HANDLE m_handle;
+ SpawnParameters m_parameters;
+
+ void destroy();
+};
+
+
+class Spawner
+{
+public:
+ SpawnedProcess spawn(
+ QWidget* parent, const MOBase::IPluginGame* game,
+ SpawnParameters sp, Settings& settings);
+
+private:
+};
+
} // namespace