kmservertest.h
00001 /* -*- c++ -*- 00002 kmservertest.h 00003 00004 This file is part of KMail, the KDE mail client. 00005 Copyright (c) 2001-2002 Michael Haeckel <haeckel@kde.org> 00006 Copyright (c) 2003 Marc Mutz <mutz@kde.org> 00007 00008 KMail is free software; you can redistribute it and/or modify it 00009 under the terms of the GNU General Public License, version 2, as 00010 published by the Free Software Foundation. 00011 00012 KMail is distributed in the hope that it will be useful, but 00013 WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00020 00021 In addition, as a special exception, the copyright holders give 00022 permission to link the code of this program with any edition of 00023 the TQt library by Trolltech AS, Norway (or with modified versions 00024 of TQt that use the same license as TQt), and distribute linked 00025 combinations including the two. You must obey the GNU General 00026 Public License in all respects for all of the code used other than 00027 TQt. If you modify this file, you may extend this exception to 00028 your version of the file, but you are not obligated to do so. If 00029 you do not wish to do so, delete this exception statement from 00030 your version. 00031 */ 00032 00033 #ifndef kmservertest_h 00034 #define kmservertest_h 00035 00036 #include <tqobject.h> 00037 #include <tqstring.h> 00038 #include <tqstringlist.h> 00039 00040 namespace TDEIO { 00041 class Job; 00042 class Slave; 00043 class SimpleJob; 00044 class MetaData; 00045 } 00046 00047 class KMServerTest : public TQObject 00048 { 00049 Q_OBJECT 00050 00051 00052 public: 00053 KMServerTest( const TQString & protocol, const TQString & host, int port ); 00054 virtual ~KMServerTest(); 00055 00056 signals: 00057 void capabilities( const TQStringList & capaNormal, 00058 const TQStringList & capaSSL ); 00059 void capabilities( const TQStringList & capaNormal, 00060 const TQStringList & capaSSL, 00061 const TQString & authNone, const TQString & authSSL, 00062 const TQString & authTLS ); 00063 00064 protected slots: 00065 void slotData(TDEIO::Job *job, const TQString &data); 00066 void slotResult(TDEIO::Job *job); 00067 void slotMetaData( const TDEIO::MetaData & ); 00068 void slotSlaveResult(TDEIO::Slave *aSlave, int error, 00069 const TQString &errorText = TQString()); 00070 00071 protected: 00072 TDEIO::MetaData slaveConfig() const; 00073 void startOffSlave( int port=0 ); 00074 00075 protected: 00076 const TQString mProtocol; 00077 const TQString mHost; 00078 bool mSSL; 00079 TQStringList mListNormal; 00080 TQStringList mListSSL; 00081 TQString mAuthNone; 00082 TQString mAuthSSL; 00083 TQString mAuthTLS; 00084 TDEIO::SimpleJob *mJob; 00085 TDEIO::Slave *mSlave; 00086 int mConnectionErrorCount; 00087 }; 00088 00089 #endif