File indexing completed on 2024-11-10 04:40:08
0001 /* 0002 * SPDX-FileCopyrightText: 2008 Igor Trindade Oliveira <igor_trindade@yahoo.com.br> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QList> 0010 #include <QPair> 0011 #include <QString> 0012 0013 class ShellScript 0014 { 0015 public: 0016 ShellScript(); 0017 void makeShellScript(const QString &filename); 0018 0019 using EnvVar = QPair<QByteArray, QByteArray>; 0020 void setEnvironmentVariables(const QList<EnvVar> &envVars); 0021 0022 private: 0023 void writeEnvironmentVariables(); 0024 void writeShutdownFunction(); 0025 0026 QString mScript; 0027 QList<EnvVar> mEnvVars; 0028 };