1/*
2 This file is part of the kcal library.
3
4 Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21/**
22 @file
23 This file is part of the API for handling calendar data and
24 defines the FreeBusyCache abstract base class.
25
26 @author Cornelius Schumacher \<schumacher@kde.org\>
27*/
28
29#ifndef KCAL_FREEBUSYCACHE_H
30#define KCAL_FREEBUSYCACHE_H
31
32class QString;
33
34namespace KCal {
35
36class FreeBusy;
37class Person;
38
39/**
40 @brief
41 An abstract base class to allow different implementations of storing
42 free busy information, e.g. local storage or storage on a Kolab server.
43*/
44class FreeBusyCache
45{
46 public:
47 /**
48 Destructor.
49 */
50 virtual ~FreeBusyCache(){}
51
52 /**
53 Save freebusy information belonging to an email.
54
55 @param freebusy is a pointer to a valid FreeBusy instance.
56 @param person is a valid Person instance.
57 */
58 virtual bool saveFreeBusy( FreeBusy *freebusy, const Person &person ) = 0;
59
60 /**
61 Load freebusy information belonging to an email.
62
63 @param email is a QString containing a email string in the
64 "FirstName LastName <emailaddress>" format.
65 */
66 virtual FreeBusy *loadFreeBusy( const QString &email ) = 0;
67};
68
69}
70
71#endif
72