KAlarm Library
kacalendar.h
00001 /* 00002 * kacalendar.h - KAlarm kcal library calendar and event categorisation 00003 * This file is part of kalarmcal library, which provides access to KAlarm 00004 * calendar data. 00005 * Copyright © 2005-2012 by David Jarvie <djarvie@kde.org> 00006 * 00007 * This library is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU Library General Public License as published 00009 * by the Free Software Foundation; either version 2 of the License, or (at 00010 * your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, but WITHOUT 00013 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00015 * License for more details. 00016 * 00017 * You should have received a copy of the GNU Library General Public License 00018 * along with this library; see the file COPYING.LIB. If not, write to the 00019 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00020 * MA 02110-1301, USA. 00021 */ 00022 00023 #ifndef KALARM_KACALENDAR_H 00024 #define KALARM_KACALENDAR_H 00025 00026 #include "kalarmcal_export.h" 00027 #ifndef KALARMCAL_USE_KRESOURCES 00028 #include <kcalcore/filestorage.h> 00029 #include <kcalcore/calendar.h> 00030 #include <kcalcore/event.h> 00031 #include <akonadi/collection.h> 00032 #endif 00033 #include <QtCore/QByteArray> 00034 #include <QtCore/QStringList> 00035 00036 #ifndef KALARMCAL_USE_KRESOURCES 00037 namespace KCalCore { 00038 class Alarm; 00039 } 00040 #else 00041 namespace KCal { 00042 class Event; 00043 class Alarm; 00044 class CalendarLocal; 00045 } 00046 #endif 00047 00048 namespace KAlarmCal 00049 { 00050 00051 #ifndef KALARMCAL_USE_KRESOURCES 00052 extern const QLatin1String KALARMCAL_EXPORT MIME_BASE; 00053 extern const QLatin1String KALARMCAL_EXPORT MIME_ACTIVE; 00054 extern const QLatin1String KALARMCAL_EXPORT MIME_ARCHIVED; 00055 extern const QLatin1String KALARMCAL_EXPORT MIME_TEMPLATE; 00056 #endif 00057 00067 namespace KACalendar 00068 { 00069 #ifndef KALARMCAL_USE_KRESOURCES 00070 00071 enum Compatibility 00072 { 00073 Unknown = 0, 00074 Current = 0x02, 00075 Converted = Current | 0x01, 00076 Convertible = 0x04, 00077 Incompatible = 0x08 00078 }; 00079 Q_DECLARE_FLAGS(Compat, Compatibility) 00080 #else 00081 00082 enum Compat 00083 { 00084 Current, 00085 Converted, 00086 Convertible, 00087 Incompatible, 00088 ByEvent 00089 }; 00090 #endif 00091 00095 enum 00096 { 00097 CurrentFormat = 0, 00098 #ifndef KALARMCAL_USE_KRESOURCES 00099 MixedFormat = -2, 00100 #endif 00101 IncompatibleFormat = -1 00102 }; 00103 00117 #ifndef KALARMCAL_USE_KRESOURCES 00118 KALARMCAL_EXPORT int updateVersion(const KCalCore::FileStorage::Ptr&, QString& versionString); 00119 #else 00120 KALARMCAL_EXPORT int updateVersion(KCal::CalendarLocal& calendar, const QString& localFile, QString& versionString); 00121 #endif 00122 00123 #ifndef KALARMCAL_USE_KRESOURCES 00124 00125 KALARMCAL_EXPORT void setKAlarmVersion(const KCalCore::Calendar::Ptr&); 00126 #else 00127 KALARMCAL_EXPORT void setKAlarmVersion(KCal::CalendarLocal&); 00128 #endif 00129 00131 KALARMCAL_EXPORT void setProductId(const QByteArray& progName, const QByteArray& progVersion); 00132 00136 KALARMCAL_EXPORT QByteArray icalProductId(); 00137 00138 extern const QByteArray APPNAME; 00139 } // namespace KACalendar 00140 00141 00151 namespace CalEvent 00152 { 00154 enum Type 00155 { 00156 EMPTY = 0, 00157 ACTIVE = 0x01, 00158 ARCHIVED = 0x02, 00159 TEMPLATE = 0x04, 00160 DISPLAYING = 0x08 00161 }; 00162 Q_DECLARE_FLAGS(Types, Type) 00163 00164 KALARMCAL_EXPORT QString uid(const QString& id, Type); 00165 #ifndef KALARMCAL_USE_KRESOURCES 00166 KALARMCAL_EXPORT Type status(const KCalCore::Event::Ptr&, QString* param = 0); 00167 KALARMCAL_EXPORT void setStatus(const KCalCore::Event::Ptr&, Type, const QString& param = QString()); 00168 00170 KALARMCAL_EXPORT Type type(const QString& mimeType); 00172 KALARMCAL_EXPORT Types types(const QStringList& mimeTypes); 00174 KALARMCAL_EXPORT QString mimeType(Type); 00176 KALARMCAL_EXPORT QStringList mimeTypes(Types); 00177 #else 00178 KALARMCAL_EXPORT Type status(const KCal::Event*, QString* param = 0); 00179 KALARMCAL_EXPORT void setStatus(KCal::Event*, Type, const QString& param = QString()); 00180 #endif 00181 } // namespace CalEvent 00182 00183 Q_DECLARE_OPERATORS_FOR_FLAGS(CalEvent::Types) 00184 00185 } // namespace KAlarmCal 00186 00187 #endif // KALARM_KACALENDAR_H 00188 00189 // vim: et sw=4:
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:10:38 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:10:38 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.