korganizer Library API Documentation

kcalendariface.h

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., 59 Temple Place - Suite 330,
00018     Boston, MA 02111-1307, USA.
00019 */
00020 #ifndef KCALENDARIFACE_H
00021 #define KCALENDARIFACE_H
00022 
00023 #include <dcopobject.h>
00024 #include <qdatetime.h>
00025 #include <qdatastream.h>
00026 #include <qstringlist.h>
00027 // yes, this is this very header - but it tells dcopidl to include it
00028 // in _stub.cpp and _skel.cpp files, to get the definition of the structs.
00029 #include "kcalendariface.h"
00030 
00031 typedef QPair<QDateTime, QDateTime> QDateTimePair;
00032 
00033 class KCalendarIface : public DCOPObject
00034 {
00035     K_DCOP
00036   public:
00037     KCalendarIface() : DCOPObject("CalendarIface") {}
00038 
00039   k_dcop:
00040 
00044     struct ResourceRequestReply {
00045         bool vCalInOK;
00046         QString vCalOut;
00047         bool vCalOutOK; bool isFree;
00048         QDateTime start; QDateTime end;
00049     };
00050     virtual KCalendarIface::ResourceRequestReply resourceRequest(
00051                          const QValueList< QDateTimePair >& busy,
00052                          const QCString& resource,
00053                          const QString& vCalIn ) = 0;
00054 
00055     virtual void openEventEditor( QString text ) = 0;
00056     virtual void openEventEditor( QString summary, QString description,
00057                                   QString attachment ) = 0;
00058     virtual void openEventEditor( QString summary, QString description,
00059                                   QString attachment, QStringList attendees ) = 0;
00060 
00061     virtual void openTodoEditor( QString text ) = 0;
00062     virtual void openTodoEditor( QString summary, QString description,
00063                                  QString attachment ) = 0;
00064     virtual void openTodoEditor( QString summary, QString description,
00065                                  QString attachment, QStringList attendees ) = 0;
00066 
00067     virtual void showTodoView() = 0;
00068     virtual void showEventView() = 0;
00069 
00070     virtual void goDate( QDate date ) = 0;
00071     virtual void goDate( QString date ) = 0;
00072 };
00073 
00074 inline QDataStream& operator<<( QDataStream& str, const KCalendarIface::ResourceRequestReply& reply )
00075 {
00076     str << reply.vCalInOK << reply.vCalOut << reply.vCalOutOK << reply.isFree << reply.start << reply.end;
00077     return str;
00078 }
00079 
00080 inline QDataStream& operator>>( QDataStream& str, KCalendarIface::ResourceRequestReply& reply )
00081 {
00082     str >> reply.vCalInOK >> reply.vCalOut >> reply.vCalOutOK >> reply.isFree >> reply.start >> reply.end;
00083     return str;
00084 }
00085 
00086 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Aug 2 09:56:03 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003