summaryrefslogtreecommitdiffstats
path: root/ktnef/ktnef/ktnefwriter.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /ktnef/ktnef/ktnefwriter.h
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ktnef/ktnef/ktnefwriter.h')
-rw-r--r--ktnef/ktnef/ktnefwriter.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/ktnef/ktnef/ktnefwriter.h b/ktnef/ktnef/ktnefwriter.h
new file mode 100644
index 00000000..ab04c0b3
--- /dev/null
+++ b/ktnef/ktnef/ktnefwriter.h
@@ -0,0 +1,92 @@
+/*
+ ktnefwriter.cpp
+
+ Copyright (C) 2002 Bo Thorsen <bo@sonofthor.dk>
+
+ This file is part of KTNEF, the KDE TNEF support library/program.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef KTNEFWRITER_H
+#define KTNEFWRITER_H
+
+class QString;
+class QVariant;
+class QIODevice;
+class QDataStream;
+class QDateTime;
+class QStringList;
+
+class KTNEFWriter {
+public:
+ KTNEFWriter();
+ ~KTNEFWriter();
+
+ void addProperty( int tag, int type, const QVariant& value );
+
+ bool writeFile( QIODevice &file );
+ bool writeFile( QDataStream &stream );
+
+ bool writeProperty( QDataStream &stream, int &bytes, int type);
+
+ enum MessageType {
+ Appointment, MeetingCancelled, MeetingRequest,
+ MeetingNo, MeetingYes, MeetingTent
+ };
+
+ enum Method {
+ PublishNew, Obsolete, RequestNew, RequestUpdate, Unknown
+ };
+
+ enum Role {
+ ReqParticipant, OptParticipant, NonParticipant, Chair
+ };
+
+ enum PartStat {
+ NeedsAction, Accepted, Declined, Tentative,
+ Delegated, Completed, InProcess
+ };
+
+ enum Priority {
+ High = 2, Normal = 3, Low = 1
+ };
+
+ enum AlarmAction {
+ Display
+ };
+
+ // This set of functions sets all properties on the file you want to save
+ void setSender(const QString &name, const QString &email);
+ void setMessageType(MessageType m);
+ void setMethod( Method m );
+ void clearAttendees();
+ void addAttendee( const QString& cn, Role r, PartStat p, bool rsvp,
+ const QString& mailto );
+ void setOrganizer( const QString& organizer ); // Is that the same as sender???
+ void setDtStart( const QDateTime& dtStart );
+ void setDtEnd( const QDateTime& dtEnd );
+ void setLocation( const QString& location );
+ void setUID( const QString& uid );
+ void setDtStamp( const QDateTime& dtStamp );
+ void setCategories( const QStringList& );
+ void setDescription( const QString& );
+ void setSummary( const QString& );
+ void setPriority( Priority p );
+ void setAlarm( const QString& description, AlarmAction action,
+ const QDateTime& wakeBefore );
+
+private:
+ class PrivateData;
+ PrivateData *mData;
+};
+
+
+#endif // KTNEFWRITER_H