diff options
Diffstat (limited to 'src/spawn.h')
| -rw-r--r-- | src/spawn.h | 67 |
1 files changed, 43 insertions, 24 deletions
diff --git a/src/spawn.h b/src/spawn.h index 1ccfb307..e0d1f958 100644 --- a/src/spawn.h +++ b/src/spawn.h @@ -17,27 +17,46 @@ You should have received a copy of the GNU General Public License along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SPAWN_H
-#define SPAWN_H
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <tchar.h>
-#include <QFileInfo>
-#include <QDir>
-
-/**
- * @brief spawn a binary with Mod Organizer injected
- *
- * @param binary the binary to spawn
- * @param arguments arguments to pass to the binary
- * @param profileName name of the active profile
- * @param currentDirectory the directory to use as the working directory to run in
- * @param hooked if set, the binary is started with mo injected
- * @return the process handle
- * @todo is the profile name even used any more?
- * @todo is the hooked parameter used?
- **/
-HANDLE startBinary(const QFileInfo &binary, const QString &arguments, const QString &profileName, int logLevel, const QDir ¤tDirectory, bool hooked);
-
-#endif // SPAWN_H
+#ifndef SPAWN_H +#define SPAWN_H + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#include <tchar.h> +#include <QFileInfo> +#include <QDir> + + +/** + * @brief a dirty little trick so we can issue a clean restart from startBinary + * @note unused + */ +class ExitProxy : public QObject { + Q_OBJECT +public: + static ExitProxy *instance(); + void emitExit(); +signals: + void exit(); +private: + ExitProxy() {} +private: + static ExitProxy *s_Instance; +}; + + +/** + * @brief spawn a binary with Mod Organizer injected + * + * @param binary the binary to spawn + * @param arguments arguments to pass to the binary + * @param profileName name of the active profile + * @param currentDirectory the directory to use as the working directory to run in + * @param hooked if set, the binary is started with mo injected + * @return the process handle + * @todo is the profile name even used any more? + * @todo is the hooked parameter used? + **/ +HANDLE startBinary(const QFileInfo &binary, const QString &arguments, const QString &profileName, int logLevel, const QDir ¤tDirectory, bool hooked); + +#endif // SPAWN_H |
