-rw-r--r-- | core/launcher/applauncher.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/launcher/applauncher.h b/core/launcher/applauncher.h index 4fd5491..22a458f 100644 --- a/core/launcher/applauncher.h +++ b/core/launcher/applauncher.h | |||
@@ -18,65 +18,66 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #ifndef APP_LAUNCHER_H | 21 | #ifndef APP_LAUNCHER_H |
22 | #define APP_LAUNCHER_H | 22 | #define APP_LAUNCHER_H |
23 | 23 | ||
24 | #include <qtopia/global.h> | 24 | #include <qtopia/global.h> |
25 | #include <qobject.h> | 25 | #include <qobject.h> |
26 | #include <qmap.h> | 26 | #include <qmap.h> |
27 | #ifdef Q_OS_WIN32 | 27 | #ifdef Q_OS_WIN32 |
28 | #include <qtopia/qprocess.h> | 28 | #include <qtopia/qprocess.h> |
29 | #include <qlist.h> | 29 | #include <qlist.h> |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | class QMessageBox; | 32 | class QMessageBox; |
33 | 33 | ||
34 | class AppLauncher : public QObject | 34 | class AppLauncher : public QObject |
35 | { | 35 | { |
36 | Q_OBJECT | 36 | Q_OBJECT |
37 | public: | 37 | public: |
38 | AppLauncher(QObject *parent = 0, const char *name = 0); | 38 | AppLauncher(QObject *parent = 0, const char *name = 0); |
39 | ~AppLauncher(); | 39 | ~AppLauncher(); |
40 | 40 | ||
41 | bool isRunning(const QString &app); | 41 | bool isRunning(const QString &app); |
42 | const QMap<int,QString> &runningApplications() { return runningApps; } | ||
42 | 43 | ||
43 | static const int RAISE_TIMEOUT_MS; | 44 | static const int RAISE_TIMEOUT_MS; |
44 | 45 | ||
45 | signals: | 46 | signals: |
46 | void launched(int pid, const QString &app); | 47 | void launched(int pid, const QString &app); |
47 | void terminated(int pid, const QString &app); | 48 | void terminated(int pid, const QString &app); |
48 | void connected(const QString &app); | 49 | void connected(const QString &app); |
49 | 50 | ||
50 | protected slots: | 51 | protected slots: |
51 | void sigStopped(int sigPid, int sigStatus); | 52 | void sigStopped(int sigPid, int sigStatus); |
52 | void received(const QCString& msg, const QByteArray& data); | 53 | void received(const QCString& msg, const QByteArray& data); |
53 | void newQcopChannel(const QString& channel); | 54 | void newQcopChannel(const QString& channel); |
54 | void removedQcopChannel(const QString& channel); | 55 | void removedQcopChannel(const QString& channel); |
55 | void createQuickLauncher(); | 56 | void createQuickLauncher(); |
56 | void processExited(); | 57 | void processExited(); |
57 | 58 | ||
58 | protected: | 59 | protected: |
59 | bool event(QEvent *); | 60 | bool event(QEvent *); |
60 | void timerEvent( QTimerEvent * ); | 61 | void timerEvent( QTimerEvent * ); |
61 | 62 | ||
62 | private: | 63 | private: |
63 | static void signalHandler(int sig); | 64 | static void signalHandler(int sig); |
64 | bool executeBuiltin(const QString &c, const QString &document); | 65 | bool executeBuiltin(const QString &c, const QString &document); |
65 | bool execute(const QString &c, const QString &document, bool noRaise = FALSE); | 66 | bool execute(const QString &c, const QString &document, bool noRaise = FALSE); |
66 | void kill( int pid ); | 67 | void kill( int pid ); |
67 | int pidForName( const QString & ); | 68 | int pidForName( const QString & ); |
68 | 69 | ||
69 | private: | 70 | private: |
70 | QMap<int,QString> runningApps; | 71 | QMap<int,QString> runningApps; |
71 | QMap<QString,int> waitingHeartbeat; | 72 | QMap<QString,int> waitingHeartbeat; |
72 | #ifdef Q_OS_WIN32 | 73 | #ifdef Q_OS_WIN32 |
73 | QList<QProcess> runningAppsProc; | 74 | QList<QProcess> runningAppsProc; |
74 | #endif | 75 | #endif |
75 | int qlPid; | 76 | int qlPid; |
76 | bool qlReady; | 77 | bool qlReady; |
77 | QMessageBox *appKillerBox; | 78 | QMessageBox *appKillerBox; |
78 | QString appKillerName; | 79 | QString appKillerName; |
79 | }; | 80 | }; |
80 | 81 | ||
81 | #endif | 82 | #endif |
82 | 83 | ||