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 
00070     virtual void openTodoEditor( const QString& text ) = 0;
00071     virtual void openTodoEditor( const QString& summary,
00072                                  const QString& description,
00073                                  const QString& attachment ) = 0;
00074     virtual void openTodoEditor( const QString& summary,
00075                                  const QString& description,
00076                                  const QString& attachment,
00077                                  const QStringList& attendees ) = 0;
00078 
00079     virtual void openJournalEditor( const QDate& date ) = 0;
00080     virtual void openJournalEditor( const QString& text,
00081                                     const QDate& date ) = 0;
00082     virtual void openJournalEditor( const QString& text ) = 0;
00083    //TODO:
00084    // virtual void openJournalEditor( const QString& summary,
00085    //                                 const QString& description,
00086    //                                 const QString& attachment ) = 0;
00087 
00088     virtual void showJournalView() = 0;
00089     virtual void showTodoView() = 0;
00090     virtual void showEventView() = 0;
00091 
00092     virtual void goDate( const QDate& date ) = 0;
00093     virtual void goDate( const QString& date ) = 0;
00094 };
00095 
00096 inline QDataStream& operator<<( QDataStream& str, const KCalendarIface::ResourceRequestReply& reply )
00097 {
00098     str << reply.vCalInOK << reply.vCalOut << reply.vCalOutOK << reply.isFree << reply.start << reply.end;
00099     return str;
00100 }
00101 
00102 inline QDataStream& operator>>( QDataStream& str, KCalendarIface::ResourceRequestReply& reply )
00103 {
00104     str >> reply.vCalInOK >> reply.vCalOut >> reply.vCalOutOK >> reply.isFree >> reply.start >> reply.end;
00105     return str;
00106 }
00107 
00108 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys