korganizer

kcalendariface.h
Go to the documentation of this file.
1/*
2 This file is a generic DCOP interface, shared between KDE applications.
3 Copyright (c) 2003 David Faure <faure@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20#ifndef KCALENDARIFACE_H
21#define KCALENDARIFACE_H
22
28#include <dcopobject.h>
29#include <tqdatetime.h>
30#include <tqdatastream.h>
31#include <tqstringlist.h>
32// yes, this is this very header - but it tells dcopidl to include it
33// in _stub.cpp and _skel.cpp files, to get the definition of the structs.
34#include "kcalendariface.h"
35
36typedef TQPair<TQDateTime, TQDateTime> TQDateTimePair;
37
39class KCalendarIface : public DCOPObject
40{
41 K_DCOP
42 public:
43 KCalendarIface() : DCOPObject("CalendarIface") {}
44
45 k_dcop:
46
51 bool vCalInOK;
52 TQString vCalOut;
53 bool vCalOutOK; bool isFree;
54 TQDateTime start; TQDateTime end;
55 };
56 virtual KCalendarIface::ResourceRequestReply resourceRequest(
57 const TQValueList< TQDateTimePair >& busy,
58 const TQCString& resource,
59 const TQString& vCalIn ) = 0;
60
61 virtual void openEventEditor( const TQString& text ) = 0;
62 virtual void openEventEditor( const TQString& summary,
63 const TQString& description,
64 const TQString& attachment ) = 0;
65 virtual void openEventEditor( const TQString& summary,
66 const TQString& description,
67 const TQString& attachment,
68 const TQStringList& attendees ) = 0;
69 virtual void openEventEditor( const TQString& summary,
70 const TQString& description,
71 const TQString& uri,
72 const TQString& file,
73 const TQStringList& attendees,
74 const TQString& attachmentMimetype ) = 0;
75
76 virtual void openTodoEditor( const TQString& text ) = 0;
77 virtual void openTodoEditor( const TQString& summary,
78 const TQString& description,
79 const TQString& attachment ) = 0;
80 virtual void openTodoEditor( const TQString& summary,
81 const TQString& description,
82 const TQString& attachment,
83 const TQStringList& attendees ) = 0;
84 virtual void openTodoEditor( const TQString& summary,
85 const TQString& description,
86 const TQString& uri,
87 const TQString& file,
88 const TQStringList& attendees,
89 const TQString& attachmentMimetype,
90 bool isTask ) = 0;
91
92 virtual void openJournalEditor( const TQDate& date ) = 0;
93 virtual void openJournalEditor( const TQString& text,
94 const TQDate& date ) = 0;
95 virtual void openJournalEditor( const TQString& text ) = 0;
96 //TODO:
97 // virtual void openJournalEditor( const TQString& summary,
98 // const TQString& description,
99 // const TQString& attachment ) = 0;
100
101 virtual void showJournalView() = 0;
102 virtual void showTodoView() = 0;
103 virtual void showEventView() = 0;
104
105 virtual void goDate( const TQDate& date ) = 0;
106 virtual void goDate( const TQString& date ) = 0;
107
108 virtual void showDate( const TQDate &date ) = 0;
109};
110
111inline TQDataStream& operator<<( TQDataStream& str, const KCalendarIface::ResourceRequestReply& reply )
112{
113 str << reply.vCalInOK << reply.vCalOut << reply.vCalOutOK << reply.isFree << reply.start << reply.end;
114 return str;
115}
116
117inline TQDataStream& operator>>( TQDataStream& str, KCalendarIface::ResourceRequestReply& reply )
118{
119 str >> reply.vCalInOK >> reply.vCalOut >> reply.vCalOutOK >> reply.isFree >> reply.start >> reply.end;
120 return str;
121}
122
123#endif
Interface class for calendar requests.
This file is a generic DCOP interface, shared between KDE applications.