KCalendarCore

freebusycache.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  SPDX-FileCopyrightText: 2004 Cornelius Schumacher <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 /**
9  @file
10  This file is part of the API for handling calendar data and
11  defines the FreeBusyCache abstract base class.
12 
13  @author Cornelius Schumacher <[email protected]>
14 */
15 
16 #ifndef KCALCORE_FREEBUSYCACHE_H
17 #define KCALCORE_FREEBUSYCACHE_H
18 
19 #include "kcalendarcore_export.h"
20 
21 #include "freebusy.h"
22 
23 class QString;
24 
25 namespace KCalendarCore
26 {
27 class Person;
28 
29 /**
30  @brief
31  An abstract base class to allow different implementations of storing
32  free busy information, e.g. local storage or storage on a Kolab server.
33 */
34 class KCALENDARCORE_EXPORT FreeBusyCache
35 {
36 public:
37  /**
38  Destructor.
39  */
40  virtual ~FreeBusyCache();
41 
42  /**
43  Save freebusy information belonging to an email.
44 
45  @param freebusy is a pointer to a valid FreeBusy instance.
46  @param person is a valid Person instance.
47  @return true if the save was successful; false otherwise.
48  */
49  virtual bool saveFreeBusy(const FreeBusy::Ptr &freebusy, const Person &person) = 0;
50 
51  /**
52  Load freebusy information belonging to an email.
53 
54  @param email is a QString containing a email string in the
55  "FirstName LastName <emailaddress>" format.
56  @return A pointer to the FreeBusy object loaded for the specified email; returns 0 if
57  there was some problem attempting to load the FreeBusy information.
58  */
59  virtual FreeBusy::Ptr loadFreeBusy(const QString &email) = 0;
60 
61 protected:
62  /**
63  @copydoc IncidenceBase::virtual_hook()
64  */
65  virtual void virtual_hook(int id, void *data);
66 };
67 
68 }
69 
70 #endif
Represents a person, by name and email address.
Definition: person.h:37
An abstract base class to allow different implementations of storing free busy information, e.g.
Definition: freebusycache.h:34
This file is part of the API for handling calendar data and defines the FreeBusy class.
Namespace for all KCalendarCore types.
Definition: alarm.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 16 2021 22:50:49 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.