korganizer

kcalendariface.h

Go to the documentation of this file.
00001 /*
00002     This file is a generic DCOP interface, shared between KDE applications.
00003     Copyright (c) 2003 David Faure <faure@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 #ifndef KCALENDARIFACE_H
00021 #define KCALENDARIFACE_H
00022 
00028 #include <dcopobject.h>
00029 #include <qdatetime.h>
00030 #include <qdatastream.h>
00031 #include <qstringlist.h>
00032 // yes, this is this very header - but it tells dcopidl to include it
00033 // in _stub.cpp and _skel.cpp files, to get the definition of the structs.
00034 #include "kcalendariface.h"
00035 
00036 typedef QPair<QDateTime, QDateTime> QDateTimePair;
00037 
00039 class KCalendarIface : public DCOPObject
00040 {
00041     K_DCOP
00042   public:
00043     KCalendarIface() : DCOPObject("CalendarIface") {}
00044 
00045   k_dcop:
00046 
00050     struct ResourceRequestReply {
00051         bool vCalInOK;
00052         QString vCalOut;
00053         bool vCalOutOK; bool isFree;
00054         QDateTime start; QDateTime end;
00055     };
00056     virtual KCalendarIface::ResourceRequestReply resourceRequest(
00057                          const QValueList< QDateTimePair >& busy,
00058                          const QCString& resource,
00059                          const QString& vCalIn ) = 0;
00060 
00061     virtual void openEventEditor( const QString& text ) = 0;
00062     virtual void openEventEditor( const QString& summary,
00063                                   const QString& description,
00064                                   const QString& attachment ) = 0;
00065     virtual void openEventEditor( const QString& summary,
00066                                   const QString& description,
00067                                   const QString& attachment,
00068                                   const QStringList& attendees ) = 0;
00069     virtual void openEventEditor( const QString& summary,
00070                                   const QString& description,
00071                                   const QString& uri,
00072                                   const QString& file,
00073                                   const QStringList& attendees,
00074                                   const QString& attachmentMimetype ) = 0;
00075 
00076     virtual void openTodoEditor( const QString& text ) = 0;
00077     virtual void openTodoEditor( const QString& summary,
00078                                  const QString& description,
00079                                  const QString& attachment ) = 0;
00080     virtual void openTodoEditor( const QString& summary,
00081                                  const QString& description,
00082                                  const QString& attachment,
00083                                  const QStringList& attendees ) = 0;
00084     virtual void openTodoEditor( const QString& summary,
00085                                  const QString& description,
00086                                  const QString& uri,
00087                                  const QString& file,
00088                                  const QStringList& attendees,
00089                                  const QString& attachmentMimetype ) = 0;
00090 
00091     virtual void openJournalEditor( const QDate& date ) = 0;
00092     virtual void openJournalEditor( const QString& text,
00093                                     const QDate& date ) = 0;
00094     virtual void openJournalEditor( const QString& text ) = 0;
00095    //TODO:
00096    // virtual void openJournalEditor( const QString& summary,
00097    //                                 const QString& description,
00098    //                                 const QString& attachment ) = 0;
00099 
00100     virtual void showJournalView() = 0;
00101     virtual void showTodoView() = 0;
00102     virtual void showEventView() = 0;
00103 
00104     virtual void goDate( const QDate& date ) = 0;
00105     virtual void goDate( const QString& date ) = 0;
00106 
00107     virtual void showDate( const QDate &date ) = 0;
00108 };
00109 
00110 inline QDataStream& operator<<( QDataStream& str, const KCalendarIface::ResourceRequestReply& reply )
00111 {
00112     str << reply.vCalInOK << reply.vCalOut << reply.vCalOutOK << reply.isFree << reply.start << reply.end;
00113     return str;
00114 }
00115 
00116 inline QDataStream& operator>>( QDataStream& str, KCalendarIface::ResourceRequestReply& reply )
00117 {
00118     str >> reply.vCalInOK >> reply.vCalOut >> reply.vCalOutOK >> reply.isFree >> reply.start >> reply.end;
00119     return str;
00120 }
00121 
00122 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys