2014-12-08 22:03:36 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// MuldeR's Utilities for Qt
|
2017-01-06 23:17:56 +01:00
|
|
|
// Copyright (C) 2004-2017 LoRd_MuldeR <MuldeR2@GMX.de>
|
2014-12-08 22:03:36 +01:00
|
|
|
//
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2.1 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
//
|
|
|
|
// http://www.gnu.org/licenses/lgpl-2.1.txt
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <MUtils/Global.h>
|
|
|
|
|
|
|
|
class QProcess;
|
|
|
|
|
|
|
|
namespace MUtils
|
|
|
|
{
|
|
|
|
class MUTILS_API JobObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
JobObject(void);
|
|
|
|
~JobObject(void);
|
|
|
|
|
2017-01-03 23:47:59 +01:00
|
|
|
bool isObjectCreated(void);
|
|
|
|
bool addProcessToJob(const QProcess *const process);
|
|
|
|
bool terminateJob(const quint32 &exitCode);
|
2014-12-08 22:03:36 +01:00
|
|
|
|
|
|
|
private:
|
2017-01-03 23:47:59 +01:00
|
|
|
uintptr_t m_jobPtr;
|
|
|
|
MUTILS_NO_COPY(JobObject)
|
2014-12-08 22:03:36 +01:00
|
|
|
};
|
|
|
|
}
|