1/*
2 * Copyright 2006, 2007 Thiago Macieira <thiago@kde.org>
3 * Copyright 2006-2008 David Faure <faure@kde.org>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) version 3, or any
9 * later version accepted by the membership of KDE e.V. (or its
10 * successor approved by the membership of KDE e.V.), which shall
11 * act as a proxy defined in Section 6 of version 3 of the license.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#ifndef KLAUNCHER_ADAPTOR_H_18181148166088
24#define KLAUNCHER_ADAPTOR_H_18181148166088
25
26#include <QtCore/QObject>
27#include <QtDBus/QtDBus>
28template<class T> class QList;
29template<class Key, class Value> class QMap;
30class QString;
31class QStringList;
32
33/*
34 * Adaptor class for interface org.kde.KLauncher
35 */
36class KLauncherAdaptor: public QDBusAbstractAdaptor
37{
38 Q_OBJECT
39 Q_CLASSINFO("D-Bus Interface", "org.kde.KLauncher")
40public:
41 KLauncherAdaptor(QObject *parent);
42 virtual ~KLauncherAdaptor();
43
44public: // PROPERTIES
45public Q_SLOTS: // METHODS
46 void autoStart(int phase = 1);
47 void exec_blind(const QString &name, const QStringList &arg_list);
48 void exec_blind(const QString &name, const QStringList &arg_list, const QStringList &envs, const QString &startup_id);
49 int kdeinit_exec(const QString &app, const QStringList &args, const QStringList &env, const QString& startup_id, const QDBusMessage &msg, QString &dbusServiceName, QString &error, int &pid);
50 int kdeinit_exec_wait(const QString &app, const QStringList &args, const QStringList &env, const QString& startup_id, const QDBusMessage &msg, QString &dbusServiceName, QString &error, int &pid);
51 int kdeinit_exec_with_workdir(const QString &app, const QStringList &args, const QString& workdir, const QStringList &env, const QString& startup_id, const QDBusMessage &msg, QString &dbusServiceName, QString &error, int &pid);
52 void reparseConfiguration();
53 int requestHoldSlave(const QString &url, const QString &app_socket);
54 int requestSlave(const QString &protocol, const QString &host, const QString &app_socket, QString &error);
55 bool checkForHeldSlave (const QString &url);
56 void setLaunchEnv(const QString &name, const QString &value);
57 int start_service_by_desktop_name(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg, QString &dbusServiceName, QString &error, int &pid);
58 int start_service_by_desktop_path(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg, QString &dbusServiceName, QString &error, int &pid);
59 // Deprecated, to be removed in KDE5.
60 int start_service_by_name(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg, QString &dbusServiceName, QString &error, int &pid);
61 void waitForSlave(int pid, const QDBusMessage &msg);
62 void terminate_kdeinit();
63Q_SIGNALS: // SIGNALS
64 void autoStart0Done();
65 void autoStart1Done();
66 void autoStart2Done();
67};
68
69#endif
70