kmail Library API Documentation

kmgroupware.h

00001 /* 00002 kmgroupware.h 00003 00004 This file is part of KMail. 00005 00006 Copyright (c) 2003 Bo Thorsen <bo@klaralvdalens-datakonsult.se> 00007 Copyright (c) 2002 Karl-Heinz Zimmer <khz@klaralvdalens-datakonsult.se> 00008 Copyright (c) 2003 Steffen Hansen <steffen@klaralvdalens-datakonsult.se> 00009 00010 This library is free software; you can redistribute it and/or 00011 modify it under the terms of the GNU Library General Public 00012 License as published by the Free Software Foundation; either 00013 version 2 of the License, or (at your option) any later version. 00014 00015 This library is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 Library General Public License for more details. 00019 00020 You should have received a copy of the GNU Library General Public License 00021 along with this library; see the file COPYING.LIB. If not, write to 00022 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00023 Boston, MA 02111-1307, USA. 00024 */ 00025 00026 #ifndef KMGROUPWARE_H 00027 #define KMGROUPWARE_H 00028 00029 #include <qguardedptr.h> 00030 00031 class KMAccount; 00032 class KMMessage; 00033 class KMReaderWin; 00034 class KMMainWidget; 00035 class KURL; 00036 00037 00038 class KMGroupware : public QObject 00039 { 00040 Q_OBJECT 00041 00042 public: 00043 KMGroupware( QObject* parent = 0, const char* name = 0 ); 00044 virtual ~KMGroupware(); 00045 00046 00047 public: 00048 void processVCalRequest( const QCString& receiver, const QString& vCalIn, 00049 QString& choice ); 00050 void processVCalReply( const QCString& sender, const QString& vCalIn, 00051 const QString& choice ); 00052 00053 /* (Re-)Read configuration file */ 00054 void readConfig(); 00055 00056 bool isEnabled() const { return mUseGroupware; } 00057 00058 // retrieve matching body part (either text/vCal (or vCard) or application/ms-tnef) 00059 // and decode it 00060 // returns a readable vPart in *s or in *sc or in both 00061 // (please make sure to set s or sc to o if you don't want ot use it) 00062 // note: Additionally the number of the update counter (if any was found) is 00063 // returned in aUpdateCounter, this applies only to TNEF data - in the 00064 // iCal standard (RfC2445,2446) there is no update counter. 00065 static bool vPartFoundAndDecoded( KMMessage* msg, QString& s ); 00066 00067 enum DefaultUpdateCounterValue { NoUpdateCounter=-1 }; 00068 // functions to be called by KMReaderWin for 'print formatting' 00069 bool vPartToHTML( int aUpdateCounter, const QString& vCal, QString fname, 00070 QString& prefix, QString& postfix ) const; 00071 static bool msTNEFToVPart( const QByteArray& tnef, QString& aVPart ); 00072 bool msTNEFToHTML( KMReaderWin* reader, QString& vPart, QString fname, 00073 QString& prefix, QString& postfix ) const; 00074 00075 // function to be called by KMReaderWin for analyzing of clicked URL 00076 static bool foundGroupwareLink( const QString aUrl, 00077 QString& gwType, 00078 QString& gwAction, 00079 QString& gwAction2, 00080 QString& gwData ); 00081 00084 virtual bool handleLink( const KURL &aUrl, KMMessage* msg ); 00085 00087 virtual void requestAddresses( QString ); 00088 virtual bool storeAddresses(QString, QStringList); 00089 00090 // automatic resource handling 00091 bool incomingResourceMessage( KMAccount*, KMMessage* ); 00092 00093 // To be exchanged with something reasonable 00094 void reloadFolderTree() const; 00095 00096 void setMainWidget( KMMainWidget* mw ) { mMainWidget = mw; } 00097 00098 protected: 00099 // Figure out if a vCal is a todo, event or neither 00100 enum VCalType { vCalEvent, vCalTodo, vCalUnknown }; 00101 static VCalType getVCalType( const QString &vCard ); 00102 00103 void setEnabled( bool b ); 00104 00105 bool mUseGroupware; 00106 00107 QGuardedPtr<KMMainWidget> mMainWidget; 00108 }; 00109 00110 #endif /* KMGROUPWARE_H */
KDE Logo
This file is part of the documentation for kmail Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:01 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003