Changeset View
Changeset View
Standalone View
Standalone View
startkde/plasma-session/startup.h
Show All 23 Lines | |||||
24 | 24 | | |||
25 | #pragma once | 25 | #pragma once | ||
26 | 26 | | |||
27 | #include <QObject> | 27 | #include <QObject> | ||
28 | #include <KJob> | 28 | #include <KJob> | ||
29 | 29 | | |||
30 | #include "autostart.h" | 30 | #include "autostart.h" | ||
31 | 31 | | |||
32 | class QProcess; | ||||
33 | | ||||
32 | class Startup : public QObject | 34 | class Startup : public QObject | ||
33 | { | 35 | { | ||
34 | Q_OBJECT | 36 | Q_OBJECT | ||
35 | public: | 37 | public: | ||
36 | Startup(QObject *parent); | 38 | Startup(QObject *parent); | ||
37 | void upAndRunning( const QString& msg ); | 39 | void upAndRunning( const QString& msg ); | ||
38 | void finishStartup(); | 40 | void finishStartup(); | ||
39 | public Q_SLOTS: | 41 | public Q_SLOTS: | ||
Show All 34 Lines | |||||
74 | public: | 76 | public: | ||
75 | AutoStartAppsJob(const AutoStart &autoStart, int phase); | 77 | AutoStartAppsJob(const AutoStart &autoStart, int phase); | ||
76 | void start() override; | 78 | void start() override; | ||
77 | private: | 79 | private: | ||
78 | AutoStart m_autoStart; | 80 | AutoStart m_autoStart; | ||
79 | }; | 81 | }; | ||
80 | 82 | | |||
81 | /** | 83 | /** | ||
84 | * Launches a process, and waits for the process to start | ||||
85 | */ | ||||
86 | class StartProcessJob: public KJob | ||||
87 | { | ||||
88 | Q_OBJECT | ||||
89 | public: | ||||
90 | StartProcessJob(const QString &process, const QStringList &args, const QStringList &env = {}); | ||||
91 | void start() override; | ||||
92 | private: | ||||
93 | QProcess* m_process; | ||||
94 | }; | ||||
95 | | ||||
96 | /** | ||||
82 | * Launches a process, and waits for the service to appear on the session bus | 97 | * Launches a process, and waits for the service to appear on the session bus | ||
83 | */ | 98 | */ | ||
84 | class StartServiceJob: public KJob | 99 | class StartServiceJob: public KJob | ||
85 | { | 100 | { | ||
86 | Q_OBJECT | 101 | Q_OBJECT | ||
87 | public: | 102 | public: | ||
88 | StartServiceJob(const QString &process, const QStringList &args, const QString &serviceId); | 103 | StartServiceJob(const QString &process, const QStringList &args, const QString &serviceId, const QStringList &env = {}); | ||
89 | void start() override; | 104 | void start() override; | ||
90 | private: | 105 | private: | ||
91 | const QString m_process; | 106 | const QString m_process; | ||
92 | const QStringList m_args; | 107 | const QStringList m_args; | ||
108 | const QStringList m_env; | ||||
93 | }; | 109 | }; | ||
94 | 110 | | |||
95 | class RestoreSessionJob: public KJob | 111 | class RestoreSessionJob: public KJob | ||
96 | { | 112 | { | ||
97 | Q_OBJECT | 113 | Q_OBJECT | ||
98 | public: | 114 | public: | ||
99 | RestoreSessionJob(); | 115 | RestoreSessionJob(); | ||
100 | void start() override; | 116 | void start() override; | ||
101 | private: | 117 | private: | ||
102 | }; | 118 | }; | ||
103 | 119 | |