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

akonadi

  • sources
  • kde-4.14
  • kdepimlibs
  • 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 
28 using namespace Akonadi;
29 
30 FreeBusyProviderBasePrivate::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 
39 QString FreeBusyProviderBasePrivate::lastCacheUpdate()
40 {
41  KDateTime last = q->lastCacheUpdate();
42  return last.toString();
43 }
44 
45 void FreeBusyProviderBasePrivate::canHandleFreeBusy(const QString &email)
46 {
47  q->canHandleFreeBusy(email);
48 }
49 
50 void 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 
57 FreeBusyProviderBase::FreeBusyProviderBase()
58  : d(new FreeBusyProviderBasePrivate(this))
59 {
60 }
61 
62 FreeBusyProviderBase::~FreeBusyProviderBase()
63 {
64  delete d;
65 }
66 
67 void FreeBusyProviderBase::handlesFreeBusy(const QString &email, bool handles) const
68 {
69  emit d->handlesFreeBusy(email, handles);
70 }
71 
72 void 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::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::FreeBusyProviderBasePrivate
Definition: calendar/freebusyproviderbase_p.h:38
Akonadi::FreeBusyProviderBase::~FreeBusyProviderBase
virtual ~FreeBusyProviderBase()
Destroys a FreeBusyProvider.
Definition: calendar/freebusyproviderbase.cpp:61
Akonadi::FreeBusyProviderBase::lastCacheUpdate
virtual KDateTime lastCacheUpdate() const =0
Returns the last time the free-busy information was fetched from the server.
QObject
QString
Akonadi::FreeBusyProviderBase
Base class for resources providing free-busy information.
Definition: calendar/freebusyproviderbase.h:54
Akonadi::FreeBusyProviderBase::FreeBusyProviderBase
FreeBusyProviderBase()
Creates a new FreeBusyProvider.
Definition: calendar/freebusyproviderbase.cpp:56
QLatin1String
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::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::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...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs 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

Search



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