• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KTNEF Library

ktnefwriter.h

Go to the documentation of this file.
00001 /*
00002     ktnefwriter.cpp
00003 
00004     Copyright (C) 2002 Bo Thorsen  <bo@sonofthor.dk>
00005 
00006     This file is part of KTNEF, the KDE TNEF support library/program.
00007 
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Library General Public
00010     License as published by the Free Software Foundation; either
00011     version 2 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Library General Public License for more details.
00017 
00018     You should have received a copy of the GNU Library General Public License
00019     along with this library; see the file COPYING.LIB.  If not, write to
00020     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021     Boston, MA 02110-1301, USA.
00022  */
00031 #ifndef KTNEFWRITER_H
00032 #define KTNEFWRITER_H
00033 
00034 class QString;
00035 class QVariant;
00036 class QIODevice;
00037 class QDataStream;
00038 class QDateTime;
00039 class QStringList;
00040 
00041 #include "ktnef_export.h"
00042 
00043 namespace KTnef {
00044 
00049 class KTNEF_EXPORT KTNEFWriter {
00050 public:
00054   enum MessageType {
00055     Appointment,     
00056     MeetingCancelled,
00057     MeetingRequest,  
00058     MeetingNo,       
00059     MeetingYes,      
00060     MeetingTent      
00061   };
00062 
00066   enum Method {
00067     PublishNew,      
00068     Obsolete,        
00069     RequestNew,      
00070     RequestUpdate,   
00071     Unknown          
00072   };
00073 
00077   enum Role {
00078     ReqParticipant,  
00079     OptParticipant,  
00080     NonParticipant,  
00081     Chair            
00082   };
00083 
00087   enum PartStat {
00088     NeedsAction,     
00089     Accepted,        
00090     Declined,        
00091     Tentative,       
00092     Delegated,       
00093     Completed,       
00094     InProcess        
00095   };
00096 
00100   enum Priority {
00101     High = 2,        
00102     Normal = 3,      
00103     Low = 1          
00104   };
00105 
00109   enum AlarmAction {
00110     Display          
00111   };
00112 
00116   KTNEFWriter();
00117 
00121   ~KTNEFWriter();
00122 
00130   void addProperty( int tag, int type, const QVariant &value );
00131 
00148   bool writeProperty( QDataStream &stream, int &bytes, int tag ) const;
00149 
00156   bool writeFile( QIODevice &file ) const;
00157 
00164   bool writeFile( QDataStream &stream ) const;
00165 
00172   void setSender( const QString &name, const QString &email );
00173 
00179   void setMessageType( MessageType methodType );
00180 
00186   void setMethod( Method method );
00187 
00191   void clearAttendees();
00192 
00202   void addAttendee( const QString &name, Role role, PartStat partstat,
00203                     bool rsvp, const QString &email );
00204 
00212   void setOrganizer( const QString &organizer );
00213 
00219   void setDtStart( const QDateTime &dtStart );
00220 
00226   void setDtEnd( const QDateTime &dtEnd );
00227 
00233   void setLocation( const QString &location );
00234 
00240   void setUID( const QString &uid );
00241 
00247   void setDtStamp( const QDateTime &dtStamp );
00248 
00254   void setCategories( const QStringList &categories );
00255 
00261   void setDescription( const QString &description );
00262 
00268   void setSummary( const QString &summary );
00269 
00275   void setPriority( Priority priority );
00276 
00284   void setAlarm( const QString &description, AlarmAction action,
00285                  const QDateTime &wakeBefore );
00286 
00287 private:
00288   //@cond PRIVATE
00289   class PrivateData;
00290   PrivateData *const d;
00291   //@endcond
00292 
00293   Q_DISABLE_COPY( KTNEFWriter )
00294 };
00295 
00296 }
00297 
00298 #endif // KTNEFWRITER_H

KTNEF Library

Skip menu "KTNEF Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal