summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt37
-rw-r--r--debian/changelog6
-rw-r--r--debian/compat1
-rw-r--r--debian/control15
-rw-r--r--debian/copyright38
-rwxr-xr-xdebian/rules4
-rw-r--r--kded-telepathy-launcher.cpp76
-rw-r--r--kded-telepathy-launcher.h46
-rw-r--r--telepathy_launcher.desktop11
9 files changed, 234 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..3a9c232
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,37 @@
+project (kded-telepathy-launcher)
+
+find_package (KDE4 REQUIRED)
+
+# set some default settings
+include (KDE4Defaults)
+
+# make some more macros available
+include (MacroLibrary)
+
+add_definitions (${KDE4_DEFINITIONS})
+
+include_directories (${KDE4_INCLUDES}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+set (kded_telepathy_launcher_SRCS
+ kded-telepathy-launcher.cpp
+)
+
+kde4_add_plugin (kded_telepathy_launcher
+ ${kded_telepathy_launcher_SRCS}
+)
+
+target_link_libraries (kded_telepathy_launcher
+ ${KDE4_KDECORE_LIBS}
+)
+
+install (TARGETS kded_telepathy_launcher
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+install (FILES telepathy_launcher.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}/kded
+)
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..345330b
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,6 @@
+kded-telepathy-launcher (0:0.1.0.1025387-1) experimental; urgency=low
+
+ * Initial release based on upstream svn snapshot r1025387
+
+ -- George Goldberg <george.goldberg@collabora.co.uk> Fri, 18 Sep 2009 16:57:44 +0100
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..0380ef0
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,15 @@
+Source: kded-telepathy-launcher
+Section: net
+Priority: optional
+Maintainer: George Goldberg <george.goldberg@collabora.co.uk>
+Uploaders: George Goldberg <george.goldberg@collabora.co.uk>
+Build-Depends: cdbs (>= 0.4.51), debhelper (>= 7), pkg-kde-tools (>= 0.4.2),
+ kdelibs5-dev (>=4.2.96)
+Standards-Version: 3.8.2
+Homepage: http://www.kde.org/
+
+Package: kded-telepathy-launcher
+Section: net
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, telepathy-mission-control-5 (>= 5.2.2)
+Description: KDED module to launch mission control 5 on startup
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..82d0bee
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,38 @@
+This package was debianized by George Goldberg <george.goldberg@collabora.co.uk> on
+Fri, 18 Sep 2009 17:02:57 +0100.
+
+It was downloaded from http://www.kde.org/download
+
+Upstream Author: The KDE development team <kde-core-devel@kde.org>
+Numerous people, too many to count, have contributed to KDE as a
+whole. The KDE project tries to make an extensive list of people who contributed
+to KDE at http://www.kde.org/people/credits/
+
+Copyright:
+Unless something else is mentioned, copyright is
+© 2009 Collabora Ltd. <http://www.collabora.co.uk/>
+
+License:
+Unless something else is mentioned, the code files in this package are under
+the GNU Lesser General Public License:
+
+ | This program is free software; you can redistribute it and/or modify
+ | it under the terms of the GNU Lesser General Public License as published
+ | by the Free Software Foundation; either version 2.1 of the License, or
+ | (at your option) any later version.
+ |
+ | This package is distributed in the hope that it will be useful,
+ | but WITHOUT ANY WARRANTY; without even the implied warranty of
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ | GNU Lesser General Public License for more details.
+ |
+ | You should have received a copy of the GNU Lesser General Public License
+ | along with this program; if not, write to the Free Software Foundation,
+ | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ The full text of the GNU Lesser General Public License version 2.1 is available on
+ Debian systems in /usr/share/common-licenses/LGPL-2.1.
+
+The Debian packaging is (C) 2009, Collabora Ltd and
+is licensed under the LGPL v2.1 or later, see `/usr/share/common-licenses/LGPL-2.1'.
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..22a8107
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+include /usr/share/pkg-kde-tools/makefiles/1/debhelper/kde.mk
+
diff --git a/kded-telepathy-launcher.cpp b/kded-telepathy-launcher.cpp
new file mode 100644
index 0000000..e5a3df7
--- /dev/null
+++ b/kded-telepathy-launcher.cpp
@@ -0,0 +1,76 @@
+/*
+ * This file is part of KDE
+ *
+ * Copyright (C) 2009 Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "kded-telepathy-launcher.h"
+
+#include <KDebug>
+#include <KPluginFactory>
+
+#include <QtDBus/QDBusInterface>
+#include <QtDBus/QDBusPendingCall>
+#include <QtDBus/QDBusPendingCallWatcher>
+#include <QtDBus/QDBusPendingReply>
+
+K_PLUGIN_FACTORY(TelepathyLauncherFactory, registerPlugin<TelepathyLauncher>(); )
+K_EXPORT_PLUGIN(TelepathyLauncherFactory("telepathy_launcher"))
+
+TelepathyLauncher::TelepathyLauncher(QObject *parent, const QList<QVariant> &)
+ : KDEDModule(parent),
+ mc5Interface(0)
+{
+ kDebug() << "Badger Badger Mushroom...";
+
+ // Get the DBus Interface for Mission Control, and prod it to make sure it is launched.
+ mc5Interface = new QDBusInterface("org.freedesktop.Telepathy.MissionControl5",
+ "/org/freedesktop/Telepathy/AccountManager",
+ "org.freedesktop.DBus.Properties");
+
+ QDBusPendingCall call = mc5Interface->asyncCall("GetAll",
+ "org.freedesktop.Telepathy.AccountManager");
+
+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this);
+ connect(watcher,
+ SIGNAL(finished(QDBusPendingCallWatcher*)),
+ SLOT(getAccountManagerPropertiesFinished(QDBusPendingCallWatcher*)));
+
+}
+
+TelepathyLauncher::~TelepathyLauncher()
+{
+ kDebug();
+
+ mc5Interface->deleteLater();
+}
+
+void TelepathyLauncher::getAccountManagerPropertiesFinished(QDBusPendingCallWatcher *watcher)
+{
+ kDebug();
+
+ QDBusPendingReply<QVariantMap> reply = *watcher;
+ if (reply.isError()) {
+ kDebug() << "Pending Reply error:" << reply.error();
+ } else {
+ kDebug() << "Pending Reply success.";
+ }
+}
+
+
+#include "kded-telepathy-launcher.moc"
+
diff --git a/kded-telepathy-launcher.h b/kded-telepathy-launcher.h
new file mode 100644
index 0000000..76fe1cf
--- /dev/null
+++ b/kded-telepathy-launcher.h
@@ -0,0 +1,46 @@
+/*
+ * This file is part of KDE
+ *
+ * Copyright (C) 2009 Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef KDED_TELEPATHY_LAUNCHER_KDED_TELEPATHY_LAUNCHER_H
+#define KDED_TELEPATHY_LAUNCHER_KDED_TELEPATHY_LAUNCHER_H
+
+#include <KDEDModule>
+
+class QDBusInterface;
+class QDBusPendingCallWatcher;
+
+class TelepathyLauncher : public KDEDModule
+{
+ Q_OBJECT
+
+public:
+ TelepathyLauncher(QObject *parent, const QList<QVariant> &args);
+ ~TelepathyLauncher();
+
+private Q_SLOTS:
+ void getAccountManagerPropertiesFinished(QDBusPendingCallWatcher *watcher);
+
+private:
+ QDBusInterface *mc5Interface;
+};
+
+
+#endif // Header Guard
+
diff --git a/telepathy_launcher.desktop b/telepathy_launcher.desktop
new file mode 100644
index 0000000..45c8534
--- /dev/null
+++ b/telepathy_launcher.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Service
+X-KDE-ServiceTypes=KDEDModule
+X-KDE-Library=telepathy_launcher
+X-KDE-DBus-ModuleName=telepathy_launcher
+X-KDE-Kded-autoload=true
+X-KDE-Kded-phase=2
+X-KDE-Kded-load-on-demand=false
+Name=Telepathy Launcher
+Comment=A tool to make sure Telepathy infrastructure components needed by the KDE session are running
+