• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

KCal Library

icalformat_p.h
Go to the documentation of this file.
00001 /*
00002   This file is part of the kcal library.
00003 
00004   Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
00005   Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00006   Copyright (c) 2006 David Jarvie <software@astrojar.org.uk>
00007 
00008   This library is free software; you can redistribute it and/or
00009   modify it under the terms of the GNU Library General Public
00010   License as published by the Free Software Foundation; either
00011   version 2 of the License, or (at your option) any later version.
00012 
00013   This library is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016   Library General Public License for more details.
00017 
00018   You should have received a copy of the GNU Library General Public License
00019   along with this library; see the file COPYING.LIB.  If not, write to
00020   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021   Boston, MA 02110-1301, USA.
00022 */
00033 #ifndef KCAL_ICALFORMAT_P_H
00034 #define KCAL_ICALFORMAT_P_H
00035 
00036 #include "freebusy.h"
00037 #include "scheduler.h"
00038 
00039 #include <libical/ical.h>
00040 
00041 #include <kdatetime.h>
00042 
00043 #include <QtCore/QString>
00044 #include <QtCore/QList>
00045 
00046 namespace KCal {
00047 
00048 class Alarm;
00049 class Attachment;
00050 class Incidence;
00051 class ICalTimeZones;
00052 class Recurrence;
00053 class RecurrenceRule;
00054 
00055 #define _ICAL_VERSION "2.0"
00056 
00067 class ICalFormatImpl
00068 {
00069   public:
00071     explicit ICalFormatImpl( ICalFormat *parent );
00072 
00073     virtual ~ICalFormatImpl();
00074 
00080     bool populate( Calendar *calendar, icalcomponent *fs );
00081 
00082     icalcomponent *writeIncidence( IncidenceBase *incidence,
00083                                    iTIPMethod method = iTIPRequest );
00084 
00085     icalcomponent *writeTodo( Todo *todo, ICalTimeZones *tzlist = 0,
00086                               ICalTimeZones *tzUsedList = 0 );
00087 
00088     icalcomponent *writeEvent( Event *event, ICalTimeZones *tzlist = 0,
00089                                ICalTimeZones *tzUsedList = 0 );
00090 
00091     icalcomponent *writeFreeBusy( FreeBusy *freebusy,
00092                                   iTIPMethod method = iTIPPublish );
00093 
00094     icalcomponent *writeJournal( Journal *journal, ICalTimeZones *tzlist = 0,
00095                                  ICalTimeZones *tzUsedList = 0 );
00096 
00097     void writeIncidence( icalcomponent *parent, Incidence *incidence,
00098                          ICalTimeZones *tzlist = 0, ICalTimeZones *tzUsedList = 0 );
00099 
00100     icalproperty *writeDescription( const QString &description, bool isRich = false );
00101     icalproperty *writeSummary( const QString &summary, bool isRich = false );
00102     icalproperty *writeLocation( const QString &location, bool isRich = false );
00103     icalproperty *writeAttendee( Attendee *attendee );
00104     icalproperty *writeOrganizer( const Person &organizer );
00105     icalproperty *writeAttachment( Attachment *attach );
00106     icalproperty *writeRecurrenceRule( Recurrence * );
00107     icalrecurrencetype writeRecurrenceRule( RecurrenceRule *recur );
00108     icalcomponent *writeAlarm( Alarm *alarm );
00109 
00110     QString extractErrorProperty( icalcomponent * );
00111     Todo *readTodo( icalcomponent *vtodo, ICalTimeZones *tzlist );
00112     Event *readEvent( icalcomponent *vevent, ICalTimeZones *tzlist );
00113     FreeBusy *readFreeBusy( icalcomponent *vfreebusy );
00114     Journal *readJournal( icalcomponent *vjournal, ICalTimeZones *tzlist );
00115     Attendee *readAttendee( icalproperty *attendee );
00116     Person readOrganizer( icalproperty *organizer );
00117     Attachment *readAttachment( icalproperty *attach );
00118     void readIncidence( icalcomponent *parent, Incidence *incidence,
00119                         ICalTimeZones *tzlist );
00120     void readRecurrenceRule( icalproperty *rrule, Incidence *event );
00121     void readExceptionRule( icalproperty *rrule, Incidence *incidence );
00122     void readRecurrence( const struct icalrecurrencetype &r,
00123                          RecurrenceRule *recur );
00124     void readAlarm( icalcomponent *alarm, Incidence *incidence,
00125                     ICalTimeZones *tzlist );
00126 
00130     QString loadedProductId() const;
00131 
00132     static icaltimetype writeICalDate( const QDate & );
00133 
00134     static QDate readICalDate(icaltimetype);
00135 
00136     static icaltimetype writeICalDateTime( const KDateTime & );
00137 
00138     static icaltimetype writeICalUtcDateTime( const KDateTime & );
00139 
00155     static icalproperty *writeICalDateTimeProperty( const icalproperty_kind kind,
00156                                                     const KDateTime &dt,
00157                                                     ICalTimeZones *tzlist = 0,
00158                                                     ICalTimeZones *tzUsedList = 0 );
00159 
00172     static KDateTime readICalDateTime( icalproperty *p, const icaltimetype &t,
00173                                        ICalTimeZones *tzlist, bool utc = false );
00174 
00182     static KDateTime readICalUtcDateTime( icalproperty *p, icaltimetype &t,
00183                                           ICalTimeZones *tzlist = 0 )
00184     { return readICalDateTime( p, t, tzlist, true ); }
00185 
00196     static KDateTime readICalDateTimeProperty( icalproperty *p,
00197                                                ICalTimeZones *tzlist, bool utc = false );
00198 
00202     static KDateTime readICalUtcDateTimeProperty( icalproperty *p )
00203     { return readICalDateTimeProperty( p, 0, true ); }
00204 
00205     static icaldurationtype writeICalDuration( const Duration &duration );
00206 
00207     static Duration readICalDuration( icaldurationtype d );
00208 
00209     static icaldatetimeperiodtype writeICalDatePeriod( const QDate &date );
00210 
00211     icalcomponent *createCalendarComponent( Calendar *calendar = 0 );
00212 
00213     icalcomponent *createScheduleComponent( IncidenceBase *incidence,
00214                                             iTIPMethod method );
00215 
00216   protected:
00217     void dumpIcalRecurrence( icalrecurrencetype r );
00218 
00219   private:
00220     //@cond PRIVATE
00221     class Private;
00222     Private *const d;
00223     //@endcond
00224 };
00225 
00226 }
00227 
00228 #endif

KCal Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal