GammaRay  2.4.0
launchoptions.h
1 /*
2  launchoptions.h
3 
4  This file is part of GammaRay, the Qt application inspection and
5  manipulation tool.
6 
7  Copyright (C) 2013-2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
8  Author: Volker Krause <volker.krause@kdab.com>
9 
10  Licensees holding valid commercial KDAB GammaRay licenses may use this file in
11  accordance with GammaRay Commercial License Agreement provided with the Software.
12 
13  Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 
15  This program is free software; you can redistribute it and/or modify
16  it under the terms of the GNU General Public License as published by
17  the Free Software Foundation, either version 2 of the License, or
18  (at your option) any later version.
19 
20  This program is distributed in the hope that it will be useful,
21  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  GNU General Public License for more details.
24 
25  You should have received a copy of the GNU General Public License
26  along with this program. If not, see <http://www.gnu.org/licenses/>.
27 */
28 
29 #ifndef GAMMARAY_LAUNCHOPTIONS_H
30 #define GAMMARAY_LAUNCHOPTIONS_H
31 
32 #include "gammaray_launcher_export.h"
33 
34 #include <QHash>
35 #include <QSharedDataPointer>
36 
37 class QStringList;
38 class QVariant;
39 class QProcessEnvironment;
40 
41 namespace GammaRay {
42 
43 class ProbeABI;
44 class LaunchOptionsPrivate;
45 
47 class GAMMARAY_LAUNCHER_EXPORT LaunchOptions
48 {
49 public:
50  LaunchOptions();
51  LaunchOptions(const LaunchOptions &other);
52  ~LaunchOptions();
53  LaunchOptions &operator=(const LaunchOptions &other);
54 
55  enum UiMode {
56  InProcessUi,
57  OutOfProcessUi,
58  NoUi
59  };
60 
62  bool isLaunch() const;
63 
65  bool isAttach() const;
66 
68  bool isValid() const;
69 
71  void setProbeSetting(const QString &key, const QVariant &value);
72  QHash<QByteArray, QByteArray> probeSettings() const;
73 
75  void setLaunchArguments(const QStringList &args);
76  QStringList launchArguments() const;
80  QString absoluteExecutablePath() const;
81 
83  void setPid(int pid);
84  int pid() const;
85 
87  UiMode uiMode() const;
88  void setUiMode(UiMode mode);
89 
91  QString injectorType() const;
92  void setInjectorType(const QString &injectorType);
93 
95  ProbeABI probeABI() const;
96  void setProbeABI(const ProbeABI &abi);
97 
101  void setProbePath(const QString &path);
102  QString probePath() const;
103 
107  void setRootPath(const QString &path);
108  QString rootPath() const;
109 
111  void setProcessEnvironment(const QProcessEnvironment &env);
112  QProcessEnvironment processEnvironment() const;
113 
115  bool execute(const QString& launcherPath) const;
116 
117 private:
118  QSharedDataPointer<LaunchOptionsPrivate> d;
119 };
120 }
121 
122 #endif // GAMMARAY_LAUNCHOPTIONS_H
Describes a probe ABI. The probe ABI is everything that determines if a probe is compatible with a gi...
Definition: probeabi.h:44
Definition: endpoint.h:42
Describes the injection and probe options used for launching/attacing to a host process.
Definition: launchoptions.h:47

Klarälvdalens Datakonsult AB (KDAB)
"The Qt Experts"
http://www.kdab.com/
GammaRay
Qt-application inspection and manipulation tool
http://www.kdab.com/kdab-products/gammaray/