/usr/include/kcal/freebusy.h is in kdepimlibs5-dev 4:4.8.5-0ubuntu0.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | /*
This file is part of the kcal library.
Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
/**
@file
This file is part of the API for handling calendar data and
defines the FreeBusy class.
@author Cornelius Schumacher \<schumacher@kde.org\>
@author Reinhold Kainhofer \<reinhold@kainhofer.com\>
*/
#ifndef KCAL_FREEBUSY_H
#define KCAL_FREEBUSY_H
#include "incidencebase.h"
#include "event.h"
#include "freebusyperiod.h"
#include <QtCore/QByteArray>
namespace KCal {
class Calendar;
/**
@brief
Provides information about the free/busy time of a calendar.
A free/busy is a collection of Periods (@see Period).
*/
class KCAL_EXPORT_DEPRECATED FreeBusy : public IncidenceBase
{
public:
/**
Constructs an free/busy without any periods.
*/
FreeBusy();
/**
Copy constructor.
@param other is the free/busy to copy.
*/
FreeBusy( const FreeBusy &other );
/**
Constructs a free/busy from a list of periods.
@param busyPeriods is a QList of periods.
*/
explicit FreeBusy( const Period::List &busyPeriods );
/**
Constructs a free/busy from a list of periods.
@param busyPeriods is a QList of periods.
*/
explicit FreeBusy( const FreeBusyPeriod::List &busyPeriods );
/**
Constructs a free/busy from a single period.
@param start is the start datetime of the period.
@param end is the end datetime of the period.
*/
FreeBusy( const KDateTime &start, const KDateTime &end );
/**
Constructs a freebusy for a specified calendar give a single period.
@param calendar is a pointer to a valid Calendar object.
@param start is the start datetime of the period.
@param end is the end datetime of the period.
*/
FreeBusy( Calendar *calendar, const KDateTime &start, const KDateTime &end );
/**
Constructs a freebusy for a specified list of events given a single period.
@param events list of events.
@param start is the start datetime of the period.
@param end is the end datetime of the period.
@since 4.4
*/
FreeBusy( const Event::List &events, const KDateTime &start, const KDateTime &end );
/**
Destroys a free/busy.
*/
~FreeBusy();
/**
@copydoc
IncidenceBase::type()
*/
QByteArray type() const;
/**
@copydoc
IncidenceBase::typeStr()
*/
//KDE5: QString typeStr() const;
/**
Sets the start datetime for the free/busy. Note that this datetime
may be later or earlier than all periods within the free/busy.
@param start is a KDateTime specifying an start datetime.
@see IncidenceBase::dtStart(), setDtEnd().
*/
virtual void setDtStart( const KDateTime &start );
/**
Sets the end datetime for the free/busy. Note that this datetime
may be later or earlier than all periods within the free/busy.
@param end is a KDateTime specifying an end datetime.
@see dtEnd(), setDtStart().
*/
void setDtEnd( const KDateTime &end );
/**
Returns the end datetime for the free/busy.
FIXME: calling addPeriod() does not change mDtEnd. Is that incorrect?
@see setDtEnd().
*/
virtual KDateTime dtEnd() const;
/**
@copydoc
IncidenceBase::shiftTimes()
*/
virtual void shiftTimes( const KDateTime::Spec &oldSpec,
const KDateTime::Spec &newSpec );
/**
Returns the list of all periods within the free/busy.
*/
Period::List busyPeriods() const;
/**
Returns the list of all periods within the free/busy.
*/
FreeBusyPeriod::List fullBusyPeriods() const;
/**
Adds a period to the freebusy list and sorts the list.
@param start is the start datetime of the period.
@param end is the end datetime of the period.
*/
void addPeriod( const KDateTime &start, const KDateTime &end );
/**
Adds a period to the freebusy list and sorts the list.
@param start is the start datetime of the period.
@param duration is the Duration of the period.
*/
void addPeriod( const KDateTime &start, const Duration &duration );
/**
Adds a list of periods to the freebusy object and then sorts that list.
Use this if you are adding many items, instead of the addPeriod method,
to avoid sorting repeatedly.
@param list is a QList of Period objects.
*/
void addPeriods( const Period::List &list );
/**
Adds a list of periods to the freebusy object and then sorts that list.
Use this if you are adding many items, instead of the addPeriod method,
to avoid sorting repeatedly.
@param list is a QList of FreeBusyPeriod objects.
*/
void addPeriods( const FreeBusyPeriod::List &list );
/**
Sorts the list of free/busy periods into ascending order.
*/
void sortList();
/**
Merges another free/busy into this free/busy.
@param freebusy is a pointer to a valid FreeBusy object.
*/
void merge( FreeBusy *freebusy );
/**
Assignment operator.
*/
FreeBusy &operator=( const FreeBusy &other );
/**
Compare this with @p freebusy for equality.
@param freebusy is the FreeBusy to compare.
*/
bool operator==( const FreeBusy &freebusy ) const;
private:
/**
@copydoc
IncidenceBase::accept()
*/
bool accept( Visitor &v ) { return v.visit( this ); }
//@cond PRIVATE
class Private;
Private *const d;
//@endcond
};
}
#endif
|