summaryrefslogtreecommitdiffabout
path: root/libkcal/freebusy.h
Unidiff
Diffstat (limited to 'libkcal/freebusy.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/freebusy.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/freebusy.h b/libkcal/freebusy.h
index 054feda..d741c72 100644
--- a/libkcal/freebusy.h
+++ b/libkcal/freebusy.h
@@ -1,72 +1,73 @@
1/* 1/*
2 This file is part of libkcal. 2 This file is part of libkcal.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20#ifndef KCAL_FREEBUSY_H 20#ifndef KCAL_FREEBUSY_H
21#define KCAL_FREEBUSY_H 21#define KCAL_FREEBUSY_H
22// 22//
23// FreeBusy - information about free/busy times 23// FreeBusy - information about free/busy times
24// 24//
25 25
26#include <qdatetime.h> 26#include <qdatetime.h>
27#include <qvaluelist.h> 27#include <qvaluelist.h>
28#include <qptrlist.h> 28#include <qptrlist.h>
29 29
30#include "period.h" 30#include "period.h"
31#include "calendar.h" 31#include "calendar.h"
32 32
33#include "incidencebase.h" 33#include "incidencebase.h"
34 34
35namespace KCal { 35namespace KCal {
36 36
37/** 37/**
38 This class provides information about free/busy time of a calendar user. 38 This class provides information about free/busy time of a calendar user.
39*/ 39*/
40class FreeBusy : public IncidenceBase 40class FreeBusy : public IncidenceBase
41{ 41{
42 public: 42 public:
43 FreeBusy(); 43 FreeBusy();
44 FreeBusy(const QDateTime &start, const QDateTime &end); 44 FreeBusy(const QDateTime &start, const QDateTime &end);
45 FreeBusy(Calendar *calendar, const QDateTime &start, const QDateTime &end); 45 FreeBusy(Calendar *calendar, const QDateTime &start, const QDateTime &end);
46 FreeBusy(QValueList<Period> busyPeriods); 46 FreeBusy(QValueList<Period> busyPeriods);
47 47
48 ~FreeBusy(); 48 ~FreeBusy();
49 49
50 QCString type() const { return "FreeBusy"; } 50 QCString type() const { return "FreeBusy"; }
51 IncTypeID typeID() const { return freebusyID; }
51 52
52 virtual QDateTime dtEnd() const; 53 virtual QDateTime dtEnd() const;
53 bool setDtEnd( const QDateTime &end ); 54 bool setDtEnd( const QDateTime &end );
54 55
55 QValueList<Period> busyPeriods() const; 56 QValueList<Period> busyPeriods() const;
56 57
57 void addPeriod(const QDateTime &start, const QDateTime &end); 58 void addPeriod(const QDateTime &start, const QDateTime &end);
58 void sortList(); 59 void sortList();
59 60
60 private: 61 private:
61 62
62 //This is used for creating a freebusy object for the current user 63 //This is used for creating a freebusy object for the current user
63 bool addLocalPeriod(const QDateTime &start, const QDateTime &end); 64 bool addLocalPeriod(const QDateTime &start, const QDateTime &end);
64 65
65 QDateTime mDtEnd; 66 QDateTime mDtEnd;
66 QValueList<Period> mBusyPeriods; 67 QValueList<Period> mBusyPeriods;
67 Calendar *mCalendar; 68 Calendar *mCalendar;
68}; 69};
69 70
70} 71}
71 72
72#endif 73#endif