• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
  • kcal
kcal/freebusyproviderbase.cpp
1/*
2 Copyright (c) 2011 Grégory Oestreicher <greg@kamago.net>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#include "freebusyproviderbase.h"
21#include "freebusyproviderbase_p.h"
22
23#include "../dbusconnectionpool.h"
24#include "freebusyprovideradaptor.h"
25
26#include <kdatetime.h>
27
28using namespace Akonadi;
29
30FreeBusyProviderBasePrivate::FreeBusyProviderBasePrivate(FreeBusyProviderBase *qq)
31 : QObject()
32 , q(qq)
33{
34 new Akonadi__FreeBusyProviderAdaptor(this);
35 DBusConnectionPool::threadConnection().registerObject(QLatin1String("/FreeBusyProvider"),
36 this, QDBusConnection::ExportAdaptors);
37}
38
39QString FreeBusyProviderBasePrivate::lastCacheUpdate()
40{
41 KDateTime last = q->lastCacheUpdate();
42 return last.toString();
43}
44
45void FreeBusyProviderBasePrivate::canHandleFreeBusy(const QString &email)
46{
47 q->canHandleFreeBusy(email);
48}
49
50void FreeBusyProviderBasePrivate::retrieveFreeBusy(const QString &email, const QString &_start, const QString &_end)
51{
52 KDateTime start = KDateTime::fromString(_start);
53 KDateTime end = KDateTime::fromString(_end);
54 q->retrieveFreeBusy(email, start, end);
55}
56
57FreeBusyProviderBase::FreeBusyProviderBase()
58 : d(new FreeBusyProviderBasePrivate(this))
59{
60}
61
62FreeBusyProviderBase::~FreeBusyProviderBase()
63{
64 delete d;
65}
66
67void FreeBusyProviderBase::handlesFreeBusy(const QString &email, bool handles) const
68{
69 emit d->handlesFreeBusy(email, handles);
70}
71
72void FreeBusyProviderBase::freeBusyRetrieved(const QString &email, const QString &freeBusy, bool success, const QString &errorText)
73{
74 emit d->freeBusyRetrieved(email, freeBusy, success, errorText);
75}
76
77#include "moc_freebusyproviderbase_p.cpp"
Akonadi::FreeBusyProviderBasePrivate
Definition: calendar/freebusyproviderbase_p.h:39
Akonadi::FreeBusyProviderBase
Base class for resources providing free-busy information.
Definition: calendar/freebusyproviderbase.h:55
Akonadi::FreeBusyProviderBase::~FreeBusyProviderBase
virtual ~FreeBusyProviderBase()
Destroys a FreeBusyProvider.
Definition: calendar/freebusyproviderbase.cpp:61
Akonadi::FreeBusyProviderBase::freeBusyRetrieved
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.
Definition: calendar/freebusyproviderbase.cpp:71
Akonadi::FreeBusyProviderBase::handlesFreeBusy
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...
Definition: calendar/freebusyproviderbase.cpp:66
Akonadi::FreeBusyProviderBase::lastCacheUpdate
virtual KDateTime lastCacheUpdate() const =0
Returns the last time the free-busy information was fetched from the server.
Akonadi::FreeBusyProviderBase::retrieveFreeBusy
virtual void retrieveFreeBusy(const QString &email, const KDateTime &start, const KDateTime &end)=0
This method is called when the resource must do the real work and fetch the free-busy information for...
Akonadi::FreeBusyProviderBase::FreeBusyProviderBase
FreeBusyProviderBase()
Creates a new FreeBusyProvider.
Definition: calendar/freebusyproviderbase.cpp:56
Akonadi::FreeBusyProviderBase::canHandleFreeBusy
virtual void canHandleFreeBusy(const QString &email) const =0
This method is called to find out is the resource handle free-busy information for the contact with e...
Akonadi
FreeBusyManager::Singleton.
Definition: actionstatemanager_p.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal