Changeset View
Changeset View
Standalone View
Standalone View
startkde/plasma-session/startup.h
- This file was moved from ksmserver/startup.h.
Show All 24 Lines | |||||
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 KSMServer; | 32 | class KSMServer; | ||
33 | class KCompositeJob; | ||||
33 | 34 | | |||
34 | class Startup : public QObject | 35 | class Startup : public QObject | ||
35 | { | 36 | { | ||
36 | Q_OBJECT | 37 | Q_OBJECT | ||
37 | public: | 38 | public: | ||
38 | Startup(KSMServer *parent); | 39 | Startup(QObject *parent); | ||
39 | void upAndRunning( const QString& msg ); | 40 | void upAndRunning( const QString& msg ); | ||
40 | void finishStartup(); | 41 | void finishStartup(); | ||
42 | public Q_SLOTS: | ||||
43 | // alternatively we could drop this and have a rule that we /always/ launch everything through klauncher | ||||
44 | // need resolution from frameworks discussion on kdeinit | ||||
45 | void updateLaunchEnv(const QString &key, const QString &value); | ||||
41 | private: | 46 | private: | ||
42 | void autoStart(int phase); | 47 | void autoStart(int phase); | ||
48 | }; | ||||
43 | 49 | | |||
44 | private: | 50 | class SleepJob: public KJob | ||
45 | KSMServer *ksmserver = nullptr; | 51 | { | ||
52 | Q_OBJECT | ||||
53 | public: | ||||
54 | SleepJob(); | ||||
55 | void start() override; | ||||
46 | }; | 56 | }; | ||
47 | 57 | | |||
48 | class KCMInitJob: public KJob | 58 | class KCMInitJob: public KJob | ||
49 | { | 59 | { | ||
50 | Q_OBJECT | 60 | Q_OBJECT | ||
51 | public: | 61 | public: | ||
52 | KCMInitJob(int phase); | 62 | KCMInitJob(int phase); | ||
53 | void start() override; | 63 | void start() override; | ||
Show All 14 Lines | |||||
68 | Q_OBJECT | 78 | Q_OBJECT | ||
69 | public: | 79 | public: | ||
70 | AutoStartAppsJob(int phase); | 80 | AutoStartAppsJob(int phase); | ||
71 | void start() override; | 81 | void start() override; | ||
72 | private: | 82 | private: | ||
73 | AutoStart m_autoStart; | 83 | AutoStart m_autoStart; | ||
74 | }; | 84 | }; | ||
75 | 85 | | |||
86 | /** | ||||
87 | * Launches a process, and waits for the service to appear on the session bus | ||||
88 | */ | ||||
89 | class StartServiceJob: public KJob | ||||
90 | { | ||||
91 | Q_OBJECT | ||||
92 | public: | ||||
93 | StartServiceJob(const QString &process, const QStringList &args, const QString &serviceId); | ||||
94 | void start() override; | ||||
95 | private: | ||||
96 | const QString m_process; | ||||
97 | const QStringList m_args; | ||||
98 | }; | ||||
99 | | ||||
76 | class RestoreSessionJob: public KJob | 100 | class RestoreSessionJob: public KJob | ||
77 | { | 101 | { | ||
78 | Q_OBJECT | 102 | Q_OBJECT | ||
79 | public: | 103 | public: | ||
80 | RestoreSessionJob(KSMServer *ksmserver); | 104 | RestoreSessionJob(); | ||
81 | void start() override; | 105 | void start() override; | ||
82 | private: | 106 | private: | ||
83 | KSMServer *m_ksmserver; | | |||
84 | }; | 107 | }; | ||
85 | 108 | |