[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:24 UTC 2016


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

The following commit has been merged in the master branch:
commit a86c5d54f57ebcd496d4d4bcd2760e100bb894b5
Author: George Goldberg <grundleborg at googlemail.com>
Date:   Sun Jul 5 17:46:08 2009 +0000

    Check if an Akonadi resource already exists for this telepathy account.
    
    svn path=/trunk/playground/network/telepathy-integration-daemon/; revision=991803
---
 kpeople/nepomuk-feeder/telepathyaccount.cpp | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/kpeople/nepomuk-feeder/telepathyaccount.cpp b/kpeople/nepomuk-feeder/telepathyaccount.cpp
index e9f4318..41269a7 100644
--- a/kpeople/nepomuk-feeder/telepathyaccount.cpp
+++ b/kpeople/nepomuk-feeder/telepathyaccount.cpp
@@ -30,6 +30,8 @@
 // Full Ontologies
 #include "personcontact.h"
 
+#include <Akonadi/AgentManager>
+
 #include <kdebug.h>
 
 #include <Nepomuk/Thing>
@@ -110,6 +112,20 @@ void TelepathyAccount::doNepomukSetup()
 
 void TelepathyAccount::doAkonadiSetup()
 {
-    // FIXME: Implement me!
+    // Loop over the list of Agents to find one with the unique identifier of this account and with
+    // the correct type.
+    Akonadi::AgentInstance::List agentList = Akonadi::AgentManager::self()->instances();
+
+    foreach (Akonadi::AgentInstance agent, agentList) {
+        if (agent.type().identifier() == "telepathy_contacts_resource") {
+            if (agent.type().identifier() == "telepathy_contacts_resource") {
+                // This is our agent. Nothing to do. Return.
+                return;
+            }
+        }
+    }
+
+    // If we reach here, the agent doesn't exist for this account, so create an instance of it.
+    // TODO: Implement me!
 }
 

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list