Akonadi Calendar

freebusyproviderbase.cpp
1/*
2 SPDX-FileCopyrightText: 2011 Grégory Oestreicher <greg@kamago.net>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "freebusyproviderbase.h"
8#include "freebusyproviderbase_p.h"
9
10#include "freebusyprovideradaptor.h"
11
12#include <QDBusConnection>
13#include <QDateTime>
14
15using namespace Akonadi;
16
17FreeBusyProviderBasePrivate::FreeBusyProviderBasePrivate(FreeBusyProviderBase *qq)
18 : QObject()
19 , q(qq)
20{
21 new Akonadi__FreeBusyProviderAdaptor(this);
22 QDBusConnection::sessionBus().registerObject(QStringLiteral("/FreeBusyProvider"), this, QDBusConnection::ExportAdaptors);
23}
24
25QDateTime FreeBusyProviderBasePrivate::lastCacheUpdate()
26{
27 return q->lastCacheUpdate();
28}
29
30void FreeBusyProviderBasePrivate::canHandleFreeBusy(const QString &email)
31{
32 q->canHandleFreeBusy(email);
33}
34
35void FreeBusyProviderBasePrivate::retrieveFreeBusy(const QString &email, const QDateTime &start, const QDateTime &end)
36{
37 q->retrieveFreeBusy(email, start, end);
38}
39
41 : d(new FreeBusyProviderBasePrivate(this))
42{
43}
44
46
47void FreeBusyProviderBase::handlesFreeBusy(const QString &email, bool handles) const
48{
49 Q_EMIT d->handlesFreeBusy(email, handles);
50}
51
52void FreeBusyProviderBase::freeBusyRetrieved(const QString &email, const QString &freeBusy, bool success, const QString &errorText)
53{
54 Q_EMIT d->freeBusyRetrieved(email, freeBusy, success, errorText);
55}
56
57#include "moc_freebusyproviderbase_p.cpp"
Base class for resources providing free-busy information.
virtual ~FreeBusyProviderBase()
Destroys a FreeBusyProvider.
void freeBusyRetrieved(const QString &email, const QString &freeBusy, bool success, const QString &errorText=QString())
Derivate classes must call this method to notify the requestor that the result is here.
void handlesFreeBusy(const QString &email, bool handles) const
Derivate classes must call this method once they know if they handle free-busy information for the co...
FreeBusyProviderBase()
Creates a new FreeBusyProvider.
Q_SCRIPTABLE Q_NOREPLY void start()
FreeBusyManager::Singleton.
bool registerObject(const QString &path, QObject *object, RegisterOptions options)
QDBusConnection sessionBus()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.