Akonadi Calendar

freebusyproviderbase.cpp
1 /*
2  SPDX-FileCopyrightText: 2011 Grégory Oestreicher <[email protected]>
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 
15 using namespace Akonadi;
16 
17 FreeBusyProviderBasePrivate::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 
25 QDateTime FreeBusyProviderBasePrivate::lastCacheUpdate()
26 {
27  return q->lastCacheUpdate();
28 }
29 
30 void FreeBusyProviderBasePrivate::canHandleFreeBusy(const QString &email)
31 {
32  q->canHandleFreeBusy(email);
33 }
34 
35 void 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 {
47  delete d;
48 }
49 
50 void FreeBusyProviderBase::handlesFreeBusy(const QString &email, bool handles) const
51 {
52  Q_EMIT d->handlesFreeBusy(email, handles);
53 }
54 
55 void FreeBusyProviderBase::freeBusyRetrieved(const QString &email, const QString &freeBusy, bool success, const QString &errorText)
56 {
57  Q_EMIT d->freeBusyRetrieved(email, freeBusy, success, errorText);
58 }
59 
60 #include "moc_freebusyproviderbase_p.cpp"
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...
virtual ~FreeBusyProviderBase()
Destroys a FreeBusyProvider.
bool registerObject(const QString &path, QObject *object, QDBusConnection::RegisterOptions options)
QDBusConnection sessionBus()
Base class for resources providing free-busy information.
FreeBusyProviderBase()
Creates a new FreeBusyProvider.
FreeBusyManager::Singleton.
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...
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jun 19 2021 23:12:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.