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

akonadi

  • sources
  • kde-4.12
  • 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(), q( qq )
32 {
33  new Akonadi__FreeBusyProviderAdaptor( this );
34  DBusConnectionPool::threadConnection().registerObject( QLatin1String( "/FreeBusyProvider" ),
35  this, QDBusConnection::ExportAdaptors );
36 }
37 
38 QString FreeBusyProviderBasePrivate::lastCacheUpdate()
39 {
40  KDateTime last = q->lastCacheUpdate();
41  return last.toString();
42 }
43 
44 void FreeBusyProviderBasePrivate::canHandleFreeBusy( const QString &email )
45 {
46  q->canHandleFreeBusy( email );
47 }
48 
49 void FreeBusyProviderBasePrivate::retrieveFreeBusy( const QString &email, const QString &_start, const QString &_end )
50 {
51  KDateTime start = KDateTime::fromString( _start );
52  KDateTime end = KDateTime::fromString( _end );
53  q->retrieveFreeBusy( email, start, end );
54 }
55 
56 FreeBusyProviderBase::FreeBusyProviderBase()
57  : d( new FreeBusyProviderBasePrivate( this ) )
58 {
59 }
60 
61 FreeBusyProviderBase::~FreeBusyProviderBase()
62 {
63  delete d;
64 }
65 
66 void FreeBusyProviderBase::handlesFreeBusy( const QString &email, bool handles ) const
67 {
68  emit d->handlesFreeBusy( email, handles );
69 }
70 
71 void FreeBusyProviderBase::freeBusyRetrieved( const QString &email, const QString &freeBusy, bool success, const QString &errorText )
72 {
73  emit d->freeBusyRetrieved( email, freeBusy, success, errorText );
74 }
75 
76 #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.
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
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:27 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
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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