[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [Akonadi] f7d9e08: Add possibility to sync a colleciton recursively.
From: Mantia Andras <amantia () kde ! org>
Date: 2010-12-12 12:30:22
Message-ID: 20101212123022.21024A60B0 () git ! kde ! org
[Download RAW message or body]
commit f7d9e080a3f4960af88175e486b677f87ebc2998
branch master
Author: Mantia Andras <amantia@kde.org>
Date: Sun Dec 12 14:30:12 2010 +0200
Add possibility to sync a colleciton recursively. This is just the interface in the server, the \
actula implementation is in the resources.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec8b5a0..0769a6a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_CURRENT_BIN
set(AKONADI_VERSION_MAJOR "1")
set(AKONADI_VERSION_MINOR "4")
-set(AKONADI_VERSION_PATCH "80")
+set(AKONADI_VERSION_PATCH "81")
set(AKONADI_VERSION "${AKONADI_VERSION_MAJOR}.${AKONADI_VERSION_MINOR}.${AKONADI_VERSION_PATCH}")
set(AKONADI_VERSION_STRING "${AKONADI_VERSION}")
diff --git a/interfaces/org.freedesktop.Akonadi.AgentManager.xml \
b/interfaces/org.freedesktop.Akonadi.AgentManager.xml index 66bed15..b35dfc7 100644
--- a/interfaces/org.freedesktop.Akonadi.AgentManager.xml
+++ b/interfaces/org.freedesktop.Akonadi.AgentManager.xml
@@ -135,6 +135,11 @@
<arg name="identifier" type="s" direction="in"/>
<arg name="collection" type="x" direction="in"/>
</method>
+ <method name="agentInstanceSynchronizeCollection">
+ <arg name="identifier" type="s" direction="in"/>
+ <arg name="collection" type="x" direction="in"/>
+ <arg name="recursive" type="b" direction="in"/>
+ </method>
<method name="agentInstanceOnline">
<arg type="b" direction="out"/>
<arg name="identifier" type="s" direction="in"/>
diff --git a/interfaces/org.freedesktop.Akonadi.Resource.xml \
b/interfaces/org.freedesktop.Akonadi.Resource.xml index 5673dd1..d971274 100644
--- a/interfaces/org.freedesktop.Akonadi.Resource.xml
+++ b/interfaces/org.freedesktop.Akonadi.Resource.xml
@@ -25,6 +25,11 @@
<arg name="collectionId" type="x" direction="in"/>
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
</method>
+ <method name="synchronizeCollection">
+ <arg name="collectionId" type="x" direction="in"/>
+ <arg name="recursive" type="b" direction="in"/>
+ <annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
+ </method>
<method name="synchronizeCollectionAttributes">
<arg name="collectionId" type="x" direction="in"/>
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
diff --git a/server/control/agentmanager.cpp b/server/control/agentmanager.cpp
index 9a306a8..97335c9 100644
--- a/server/control/agentmanager.cpp
+++ b/server/control/agentmanager.cpp
@@ -392,9 +392,14 @@ void AgentManager::agentInstanceSynchronizeCollectionTree(const QString & identi
void AgentManager::agentInstanceSynchronizeCollection(const QString & identifier, qint64 collection)
{
+ agentInstanceSynchronizeCollection( identifier, collection, false );
+}
+
+void AgentManager::agentInstanceSynchronizeCollection(const QString & identifier, qint64 collection, \
bool recursive) +{
if ( !checkResourceInterface( identifier, QLatin1String( "agentInstanceSynchronizeCollection" ) ) )
return;
- mAgentInstances.value( identifier )->resourceInterface()->synchronizeCollection( collection );
+ mAgentInstances.value( identifier )->resourceInterface()->synchronizeCollection( collection, recursive \
); }
void AgentManager::restartAgentInstance(const QString& identifier)
diff --git a/server/control/agentmanager.h b/server/control/agentmanager.h
index 0a8c571..eb79e46 100644
--- a/server/control/agentmanager.h
+++ b/server/control/agentmanager.h
@@ -194,6 +194,11 @@ class AgentManager : public QObject, protected QDBusContext
*/
void agentInstanceSynchronizeCollection( const QString &identifier, qint64 collection );
+ /**
+ Trigger a synchronization of the given collection by its owning resource agent.
+ @param recursive set it true to have sub-collection syncronized as well
+ */
+ void agentInstanceSynchronizeCollection( const QString &identifier, qint64 collection, bool \
recursive );
/**
Returns if the agent instance @p identifier is in online mode.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic