Commit 8f671f84 authored by Volker Krause's avatar Volker Krause

Port the freebusy provider interface to QDateTime

parent bda216e7
......@@ -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);
}
......
......@@ -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
......
......@@ -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;
};
......
......@@ -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">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment