• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

KAlarm Library

  • kalarmcal
kacalendar.h
1 /*
2  * kacalendar.h - KAlarm kcal library calendar and event categorisation
3  * This file is part of kalarmcal library, which provides access to KAlarm
4  * calendar data.
5  * Copyright © 2005-2012 by David Jarvie <djarvie@kde.org>
6  *
7  * This library is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Library General Public License as published
9  * by the Free Software Foundation; either version 2 of the License, or (at
10  * your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
15  * License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public License
18  * along with this library; see the file COPYING.LIB. If not, write to the
19  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20  * MA 02110-1301, USA.
21  */
22 
23 #ifndef KALARM_KACALENDAR_H
24 #define KALARM_KACALENDAR_H
25 
26 #include "kalarmcal_export.h"
27 #ifndef KALARMCAL_USE_KRESOURCES
28 #include <kcalcore/filestorage.h>
29 #include <kcalcore/calendar.h>
30 #include <kcalcore/event.h>
31 #include <akonadi/collection.h>
32 #endif
33 #include <QtCore/QByteArray>
34 #include <QtCore/QStringList>
35 
36 #ifndef KALARMCAL_USE_KRESOURCES
37 namespace KCalCore {
38  class Alarm;
39 }
40 #else
41 namespace KCal {
42  class Event;
43  class Alarm;
44  class CalendarLocal;
45 }
46 #endif
47 
48 namespace KAlarmCal
49 {
50 
51 #ifndef KALARMCAL_USE_KRESOURCES
52 extern const QLatin1String KALARMCAL_EXPORT MIME_BASE;
53 extern const QLatin1String KALARMCAL_EXPORT MIME_ACTIVE;
54 extern const QLatin1String KALARMCAL_EXPORT MIME_ARCHIVED;
55 extern const QLatin1String KALARMCAL_EXPORT MIME_TEMPLATE;
56 #endif
57 
67 namespace KACalendar
68 {
69 #ifndef KALARMCAL_USE_KRESOURCES
70 
71  enum Compatibility
72  {
73  Unknown = 0,
74  Current = 0x02,
75  Converted = Current | 0x01,
76  Convertible = 0x04,
77  Incompatible = 0x08
78  };
79  Q_DECLARE_FLAGS(Compat, Compatibility)
80 #else
81 
82  enum Compat
83  {
84  Current,
85  Converted,
86  Convertible,
87  Incompatible,
88  ByEvent
89  };
90 #endif
91 
95  enum
96  {
97  CurrentFormat = 0,
98 #ifndef KALARMCAL_USE_KRESOURCES
99  MixedFormat = -2,
100 #endif
101  IncompatibleFormat = -1
102  };
103 
117 #ifndef KALARMCAL_USE_KRESOURCES
118  KALARMCAL_EXPORT int updateVersion(const KCalCore::FileStorage::Ptr&, QString& versionString);
119 #else
120  KALARMCAL_EXPORT int updateVersion(KCal::CalendarLocal& calendar, const QString& localFile, QString& versionString);
121 #endif
122 
123 #ifndef KALARMCAL_USE_KRESOURCES
124 
125  KALARMCAL_EXPORT void setKAlarmVersion(const KCalCore::Calendar::Ptr&);
126 #else
127  KALARMCAL_EXPORT void setKAlarmVersion(KCal::CalendarLocal&);
128 #endif
129 
131  KALARMCAL_EXPORT void setProductId(const QByteArray& progName, const QByteArray& progVersion);
132 
136  KALARMCAL_EXPORT QByteArray icalProductId();
137 
138  extern const QByteArray APPNAME;
139 } // namespace KACalendar
140 
141 
151 namespace CalEvent
152 {
154  enum Type
155  {
156  EMPTY = 0,
157  ACTIVE = 0x01,
158  ARCHIVED = 0x02,
159  TEMPLATE = 0x04,
160  DISPLAYING = 0x08
161  };
162  Q_DECLARE_FLAGS(Types, Type)
163 
164  KALARMCAL_EXPORT QString uid(const QString& id, Type);
165 #ifndef KALARMCAL_USE_KRESOURCES
166  KALARMCAL_EXPORT Type status(const KCalCore::Event::Ptr&, QString* param = 0);
167  KALARMCAL_EXPORT void setStatus(const KCalCore::Event::Ptr&, Type, const QString& param = QString());
168 
170  KALARMCAL_EXPORT Type type(const QString& mimeType);
172  KALARMCAL_EXPORT Types types(const QStringList& mimeTypes);
174  KALARMCAL_EXPORT QString mimeType(Type);
176  KALARMCAL_EXPORT QStringList mimeTypes(Types);
177 #else
178  KALARMCAL_EXPORT Type status(const KCal::Event*, QString* param = 0);
179  KALARMCAL_EXPORT void setStatus(KCal::Event*, Type, const QString& param = QString());
180 #endif
181 } // namespace CalEvent
182 
183 Q_DECLARE_OPERATORS_FOR_FLAGS(CalEvent::Types)
184 
185 } // namespace KAlarmCal
186 
187 #endif // KALARM_KACALENDAR_H
188 
189 // vim: et sw=4:
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:30:13 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KAlarm Library

Skip menu "KAlarm Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal