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 // yes, this is this very header - but it tells dcopidl to include it
00027 // in _stub.cpp and _skel.cpp files, to get the definition of the structs.
00028 #include "kcalendariface.h"
00029 
00030 typedef QPair<QDateTime, QDateTime> QDateTimePair;
00031 
00032 class KCalendarIface : public DCOPObject
00033 {
00034     K_DCOP
00035 public:
00036     KCalendarIface() : DCOPObject("CalendarIface") {}
00037 
00038 k_dcop:
00039 
00043     struct ResourceRequestReply {
00044         bool vCalInOK;
00045         QString vCalOut;
00046         bool vCalOutOK; bool isFree;
00047         QDateTime start; QDateTime end;
00048     };
00049     virtual KCalendarIface::ResourceRequestReply resourceRequest(
00050                          const QValueList< QDateTimePair >& busy,
00051                          const QCString& resource,
00052                          const QString& vCalIn ) = 0;
00053 
00054     virtual void openEventEditor( QString text ) = 0;
00055     virtual void openEventEditor( QString summary, QString description,
00056                                   QString attachment ) = 0;
00057 
00058     virtual void openTodoEditor( QString text ) = 0;
00059     virtual void openTodoEditor( QString summary, QString description,
00060                                  QString attachment ) = 0;
00061 
00062     virtual void showTodoView() = 0;
00063     virtual void showEventView() = 0;
00064 };
00065 
00066 inline QDataStream& operator<<( QDataStream& str, const KCalendarIface::ResourceRequestReply& reply )
00067 {
00068     str << reply.vCalInOK << reply.vCalOut << reply.vCalOutOK << reply.isFree << reply.start << reply.end;
00069     return str;
00070 }
00071 
00072 inline QDataStream& operator>>( QDataStream& str, KCalendarIface::ResourceRequestReply& reply )
00073 {
00074     str >> reply.vCalInOK >> reply.vCalOut >> reply.vCalOutOK >> reply.isFree >> reply.start >> reply.end;
00075     return str;
00076 }
00077 
00078 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:27 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003