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 <tqdatetime.h> 00030 #include <tqdatastream.h> 00031 #include <tqstringlist.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 TQPair<TQDateTime, TQDateTime> TQDateTimePair; 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 TQString vCalOut; 00053 bool vCalOutOK; bool isFree; 00054 TQDateTime start; TQDateTime end; 00055 }; 00056 virtual KCalendarIface::ResourceRequestReply resourceRequest( 00057 const TQValueList< TQDateTimePair >& busy, 00058 const TQCString& resource, 00059 const TQString& vCalIn ) = 0; 00060 00061 virtual void openEventEditor( const TQString& text ) = 0; 00062 virtual void openEventEditor( const TQString& summary, 00063 const TQString& description, 00064 const TQString& attachment ) = 0; 00065 virtual void openEventEditor( const TQString& summary, 00066 const TQString& description, 00067 const TQString& attachment, 00068 const TQStringList& attendees ) = 0; 00069 virtual void openEventEditor( const TQString& summary, 00070 const TQString& description, 00071 const TQString& uri, 00072 const TQString& file, 00073 const TQStringList& attendees, 00074 const TQString& attachmentMimetype ) = 0; 00075 00076 virtual void openTodoEditor( const TQString& text ) = 0; 00077 virtual void openTodoEditor( const TQString& summary, 00078 const TQString& description, 00079 const TQString& attachment ) = 0; 00080 virtual void openTodoEditor( const TQString& summary, 00081 const TQString& description, 00082 const TQString& attachment, 00083 const TQStringList& attendees ) = 0; 00084 virtual void openTodoEditor( const TQString& summary, 00085 const TQString& description, 00086 const TQString& uri, 00087 const TQString& file, 00088 const TQStringList& attendees, 00089 const TQString& attachmentMimetype, 00090 bool isTask ) = 0; 00091 00092 virtual void openJournalEditor( const TQDate& date ) = 0; 00093 virtual void openJournalEditor( const TQString& text, 00094 const TQDate& date ) = 0; 00095 virtual void openJournalEditor( const TQString& text ) = 0; 00096 //TODO: 00097 // virtual void openJournalEditor( const TQString& summary, 00098 // const TQString& description, 00099 // const TQString& attachment ) = 0; 00100 00101 virtual void showJournalView() = 0; 00102 virtual void showTodoView() = 0; 00103 virtual void showEventView() = 0; 00104 00105 virtual void goDate( const TQDate& date ) = 0; 00106 virtual void goDate( const TQString& date ) = 0; 00107 00108 virtual void showDate( const TQDate &date ) = 0; 00109 }; 00110 00111 inline TQDataStream& operator<<( TQDataStream& str, const KCalendarIface::ResourceRequestReply& reply ) 00112 { 00113 str << reply.vCalInOK << reply.vCalOut << reply.vCalOutOK << reply.isFree << reply.start << reply.end; 00114 return str; 00115 } 00116 00117 inline TQDataStream& operator>>( TQDataStream& str, KCalendarIface::ResourceRequestReply& reply ) 00118 { 00119 str >> reply.vCalInOK >> reply.vCalOut >> reply.vCalOutOK >> reply.isFree >> reply.start >> reply.end; 00120 return str; 00121 } 00122 00123 #endif