Changeset View
Changeset View
Standalone View
Standalone View
src/util/externalcommand.h
Show All 25 Lines | |||||
26 | #include <QString> | 26 | #include <QString> | ||
27 | #include <QStringList> | 27 | #include <QStringList> | ||
28 | #include <QtGlobal> | 28 | #include <QtGlobal> | ||
29 | #include <QThread> | 29 | #include <QThread> | ||
30 | #include <QVariant> | 30 | #include <QVariant> | ||
31 | 31 | | |||
32 | #include <memory> | 32 | #include <memory> | ||
33 | 33 | | |||
34 | class KJob; | | |||
35 | namespace KAuth { class ExecuteJob; } | 34 | namespace KAuth { class ExecuteJob; } | ||
36 | namespace QCA { class PrivateKey; class Initializer; } | 35 | | ||
36 | class KJob; | ||||
37 | class Report; | 37 | class Report; | ||
38 | class CopySource; | 38 | class CopySource; | ||
39 | class CopyTarget; | 39 | class CopyTarget; | ||
40 | class QDBusInterface; | 40 | class QDBusInterface; | ||
41 | | ||||
41 | struct ExternalCommandPrivate; | 42 | struct ExternalCommandPrivate; | ||
42 | 43 | | |||
43 | class DBusThread : public QThread | 44 | class DBusThread : public QThread | ||
44 | { | 45 | { | ||
45 | Q_OBJECT | 46 | Q_OBJECT | ||
46 | // We register on DBus so the helper can monitor us and terminate if we | 47 | // We register on DBus so the helper can monitor us and terminate if we | ||
47 | // terminate. | 48 | // terminate. | ||
48 | Q_CLASSINFO("D-Bus Interface", "org.kde.kpmcore.applicationinterface") | 49 | Q_CLASSINFO("D-Bus Interface", "org.kde.kpmcore.applicationinterface") | ||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 121 | Q_SIGNALS: | |||
121 | void progress(int); | 122 | void progress(int); | ||
122 | void reportSignal(const QVariantMap&); | 123 | void reportSignal(const QVariantMap&); | ||
123 | 124 | | |||
124 | public Q_SLOTS: | 125 | public Q_SLOTS: | ||
125 | void emitProgress(KJob*, unsigned long percent) { emit progress(percent); }; | 126 | void emitProgress(KJob*, unsigned long percent) { emit progress(percent); }; | ||
126 | 127 | | |||
127 | private: | 128 | private: | ||
128 | void setExitCode(int i); | 129 | void setExitCode(int i); | ||
129 | | ||||
130 | void onReadOutput(); | 130 | void onReadOutput(); | ||
131 | static quint64 getNonce(QDBusInterface& iface); | | |||
132 | 131 | | |||
133 | private: | 132 | private: | ||
134 | std::unique_ptr<ExternalCommandPrivate> d; | 133 | std::unique_ptr<ExternalCommandPrivate> d; | ||
135 | 134 | | |||
136 | // KAuth | 135 | // KAuth | ||
137 | static quint64 m_Nonce; | | |||
138 | static KAuth::ExecuteJob *m_job; | 136 | static KAuth::ExecuteJob *m_job; | ||
139 | static QCA::Initializer *init; | | |||
140 | static QCA::PrivateKey *privateKey; | | |||
141 | static bool helperStarted; | 137 | static bool helperStarted; | ||
142 | static QWidget *parent; | 138 | static QWidget *parent; | ||
143 | }; | 139 | }; | ||
144 | 140 | | |||
145 | #endif | 141 | #endif |