[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:04:21 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=7aefd0a

The following commit has been merged in the master branch:
commit 7aefd0af2ba7875196ace700a7d55a19d4683186
Author: George Goldberg <grundleborg at googlemail.com>
Date:   Sat Jun 20 16:29:55 2009 +0000

    Get an instance of the Telepathy AM ready in the AccountMonitor class.
    
    svn path=/trunk/playground/network/telepathy-integration-daemon/; revision=984366
---
 kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp | 22 +++++++++++++++++++++-
 kpeople/nepomuk-feeder/telepathyaccountmonitor.h   |  9 ++++++++-
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp b/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp
index 727578d..f2551e8 100644
--- a/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp
+++ b/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp
@@ -20,13 +20,33 @@
 
 #include "telepathyaccountmonitor.h"
 
+#include <kdebug.h>
+
+#include <TelepathyQt4/PendingReady>
+
 TelepathyAccountMonitor::TelepathyAccountMonitor(QObject *parent)
  : QObject(parent)
 {
-    // TODO: Implement me!
+    // Create an instance of the AccountManager and start to get it ready.
+    m_accountManager = Tp::AccountManager::create();
+
+    connect(m_accountManager->becomeReady(),
+            SIGNAL(finished(Tp::PendingOperation*)),
+            SLOT(onAccountManagerReady(Tp::PendingOperation*)));
 }
 
 TelepathyAccountMonitor::~TelepathyAccountMonitor()
 {
 }
 
+void TelepathyAccountMonitor::onAccountManagerReady(Tp::PendingOperation *op)
+{
+    if (op->isError()) {
+        kWarning() << "Account manager cannot become ready:"
+                   << op->errorName() << "-" << op->errorMessage();
+        return;
+    }
+
+    // TODO: Implement me!
+}
+
diff --git a/kpeople/nepomuk-feeder/telepathyaccountmonitor.h b/kpeople/nepomuk-feeder/telepathyaccountmonitor.h
index 77cce94..28f3cbc 100644
--- a/kpeople/nepomuk-feeder/telepathyaccountmonitor.h
+++ b/kpeople/nepomuk-feeder/telepathyaccountmonitor.h
@@ -23,6 +23,12 @@
 
 #include <QtCore/QObject>
 
+#include <TelepathyQt4/AccountManager>
+
+namespace Tp {
+    class PendingOperation;
+}
+
 class TelepathyAccountMonitor : public QObject
 {
     Q_OBJECT
@@ -32,9 +38,10 @@ public:
     ~TelepathyAccountMonitor();
 
 private Q_SLOTS:
+    void onAccountManagerReady(Tp::PendingOperation *op);
 
 private:
-
+    Tp::AccountManagerPtr m_accountManager;
 };
 
 

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list