aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Krause <[email protected]>2017-04-08 11:36:34 +0200
committerVolker Krause <[email protected]>2017-04-08 11:36:34 +0200
commit8f671f84b56eb29474039d598d1f90a24a5526c8 (patch)
treefa20ad5d26679737d3b1f5db870279a71329aec8
parentbda216e77fafba6e64aa8331249edc608af706c2 (diff)
Port the freebusy provider interface to QDateTime
-rw-r--r--src/freebusyproviderbase.cpp11
-rw-r--r--src/freebusyproviderbase.h6
-rw-r--r--src/freebusyproviderbase_p.h4
-rw-r--r--src/interfaces/org.freedesktop.Akonadi.Resource.FreeBusyProvider.xml10
4 files changed, 16 insertions, 15 deletions
diff --git a/src/freebusyproviderbase.cpp b/src/freebusyproviderbase.cpp
index 6260c74..7575722 100644
--- a/src/freebusyproviderbase.cpp
+++ b/src/freebusyproviderbase.cpp
@@ -23,7 +23,7 @@
#include <KDBusConnectionPool>
#include "freebusyprovideradaptor.h"
-#include <kdatetime.h>
+#include <QDateTime>
using namespace Akonadi;
@@ -35,10 +35,9 @@ FreeBusyProviderBasePrivate::FreeBusyProviderBasePrivate(FreeBusyProviderBase *q
this, QDBusConnection::ExportAdaptors);
}
-QString FreeBusyProviderBasePrivate::lastCacheUpdate()
+QDateTime FreeBusyProviderBasePrivate::lastCacheUpdate()
{
- KDateTime last = q->lastCacheUpdate();
- return last.toString();
+ return q->lastCacheUpdate();
}
void FreeBusyProviderBasePrivate::canHandleFreeBusy(const QString &email)
@@ -46,10 +45,8 @@ void FreeBusyProviderBasePrivate::canHandleFreeBusy(const QString &email)
q->canHandleFreeBusy(email);
}
-void FreeBusyProviderBasePrivate::retrieveFreeBusy(const QString &email, const QString &_start, const QString &_end)
+void FreeBusyProviderBasePrivate::retrieveFreeBusy(const QString &email, const QDateTime &start, const QDateTime &end)
{
- KDateTime start = KDateTime::fromString(_start);
- KDateTime end = KDateTime::fromString(_end);
q->retrieveFreeBusy(email, start, end);
}
diff --git a/src/freebusyproviderbase.h b/src/freebusyproviderbase.h
index 787936a..6f76ab6 100644
--- a/src/freebusyproviderbase.h
+++ b/src/freebusyproviderbase.h
@@ -24,7 +24,7 @@
#include <QtCore/QString>
-class KDateTime;
+class QDateTime;
namespace Akonadi
{
@@ -73,7 +73,7 @@ public:
*
* @return The date and time the cache was last updated.
*/
- virtual KDateTime lastCacheUpdate() const = 0;
+ virtual QDateTime lastCacheUpdate() const = 0;
/**
* This method is called to find out is the resource
@@ -124,7 +124,7 @@ public:
* @param end The end of the free-busy period
* @see freeBusyRetrieved()
*/
- virtual void retrieveFreeBusy(const QString &email, const KDateTime &start, const KDateTime &end) = 0;
+ virtual void retrieveFreeBusy(const QString &email, const QDateTime &start, const QDateTime &end) = 0;
/**
* Derivate classes must call this method to notify the requestor
diff --git a/src/freebusyproviderbase_p.h b/src/freebusyproviderbase_p.h
index ab3fa64..479bf2c 100644
--- a/src/freebusyproviderbase_p.h
+++ b/src/freebusyproviderbase_p.h
@@ -72,9 +72,9 @@ private:
friend class ::Akonadi__FreeBusyProviderAdaptor;
// D-Bus calls
- QString lastCacheUpdate();
+ QDateTime lastCacheUpdate();
void canHandleFreeBusy(const QString &email);
- void retrieveFreeBusy(const QString &email, const QString &start, const QString &end);
+ void retrieveFreeBusy(const QString &email, const QDateTime &start, const QDateTime &end);
FreeBusyProviderBase *const q;
};
diff --git a/src/interfaces/org.freedesktop.Akonadi.Resource.FreeBusyProvider.xml b/src/interfaces/org.freedesktop.Akonadi.Resource.FreeBusyProvider.xml
index a1ebdd0..1d25e7b 100644
--- a/src/interfaces/org.freedesktop.Akonadi.Resource.FreeBusyProvider.xml
+++ b/src/interfaces/org.freedesktop.Akonadi.Resource.FreeBusyProvider.xml
@@ -2,7 +2,8 @@
<node>
<interface name="org.freedesktop.Akonadi.Resource.FreeBusyProvider">
<method name="lastCacheUpdate">
- <arg type="s" direction="out"/>
+ <arg type="((iii)(iiii)i)" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QDateTime"/>
</method>
<method name="canHandleFreeBusy">
<arg name="email" type="s" direction="in"/>
@@ -10,8 +11,11 @@
</method>
<method name="retrieveFreeBusy">
<arg name="email" type="s" direction="in"/>
- <arg name="start" type="s" direction="in"/>
- <arg name="end" type="s" direction="in"/>
+ <arg name="start" type="((iii)(iiii)i)" direction="in"/>
+ <arg name="end" type="((iii)(iiii)i)" direction="in"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QDateTime"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QDateTime"/>
+ </signal>
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
</method>
<signal name="handlesFreeBusy">