Akonadi::FreeBusyProviderBase
#include <freebusyproviderbase.h>
Public Member Functions | |
FreeBusyProviderBase () | |
virtual | ~FreeBusyProviderBase () |
virtual void | canHandleFreeBusy (const QString &email) const =0 |
void | freeBusyRetrieved (const QString &email, const QString &freeBusy, bool success, const QString &errorText=QString()) |
void | handlesFreeBusy (const QString &email, bool handles) const |
virtual QDateTime | lastCacheUpdate () const =0 |
virtual void | retrieveFreeBusy (const QString &email, const QDateTime &start, const QDateTime &end)=0 |
Detailed Description
Base class for resources providing free-busy information.
This class must be inherited by resources that are able to provide free-busy information for a given contact on request. A resource will thus inherit from ResourceBase and FreeBusyProvider.
Resources that provide FB info must declare it by adding 'FreeBusyProvider' in the X-Akonadi-Capabilities field of their .desktop file:
Resource inheriting from this class must implement lastCacheUpdate(), canHandleFreeBusy() and retrieveFreeBusy().
- Since
- 4.7
Definition at line 41 of file freebusyproviderbase.h.
Constructor & Destructor Documentation
◆ FreeBusyProviderBase()
FreeBusyProviderBase::FreeBusyProviderBase | ( | ) |
Creates a new FreeBusyProvider.
Definition at line 40 of file freebusyproviderbase.cpp.
◆ ~FreeBusyProviderBase()
|
virtualdefault |
Destroys a FreeBusyProvider.
Member Function Documentation
◆ canHandleFreeBusy()
|
pure virtual |
This method is called to find out is the resource handle free-busy information for the contact with email address email
.
The caller will not wait for the result. Once the decision is known, the resource must call handlesFreeBusy().
- Parameters
-
email The email address of the contact we want the free-busy info. This is a simple email address, in the form foo@b.nosp@m.ar.c.nosp@m.om (no display name or quoting).
- See also
- handlesFreeBusy()
◆ freeBusyRetrieved()
void FreeBusyProviderBase::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.
The freeBusy
is expected to be an iTIP request containing the free-busy data. The simplest way to generate this is to use KCalendarCore::ICalFormat::createScheduleMessage() with the method KCalendarCore::iTIPRequest.
- Parameters
-
email The email address of the contact we give the response for. This is a simple email address, in the form foo@b.nosp@m.ar.c.nosp@m.om (no display name or quoting). freeBusy The free-busy data. success Whether the retrieval was successful or not. errorText An optional error message that can be displayed back to the user.
Definition at line 52 of file freebusyproviderbase.cpp.
◆ handlesFreeBusy()
void FreeBusyProviderBase::handlesFreeBusy | ( | const QString & | email, |
bool | handles ) const |
Derivate classes must call this method once they know if they handle free-busy information for the contact with email address email
.
- Parameters
-
email The email address of the contact we give the response for. This is a simple email address, in the form foo@b.nosp@m.ar.c.nosp@m.om (no display name or quoting). handles Whether this resource handles free-busy (true) or not (false).
Definition at line 47 of file freebusyproviderbase.cpp.
◆ lastCacheUpdate()
|
pure virtual |
Returns the last time the free-busy information was fetched from the server.
This can be used for example to issue a warning to the user that this information may not be accurate and must be refreshed; pretty useful when the resource was offline for too long.
- Returns
- The date and time the cache was last updated.
◆ retrieveFreeBusy()
|
pure virtual |
This method is called when the resource must do the real work and fetch the free-busy information for the contact with email address email
.
As with canHandleFreeBusy() the caller will not wait for the result and the resource must call freeBusyRetrieved() once done.
- Parameters
-
email The email address of the contact we want the free-busy info. This is a simple email address, in the form foo@b.nosp@m.ar.c.nosp@m.om (no display name or quoting). start The start of the period the free-busy request covers end The end of the free-busy period
- See also
- freeBusyRetrieved()
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.