smtpjob.h

00001 /*
00002     Copyright (c) 2007 Volker Krause <vkrause@kde.org>
00003 
00004     Based on KMail code by:
00005     Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
00006 
00007     This library is free software; you can redistribute it and/or modify it
00008     under the terms of the GNU Library General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or (at your
00010     option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful, but WITHOUT
00013     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00015     License for more details.
00016 
00017     You should have received a copy of the GNU Library General Public License
00018     along with this library; see the file COPYING.LIB.  If not, write to the
00019     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00020     02110-1301, USA.
00021 */
00022 
00023 #ifndef MAILTRANSPORT_SMTPJOB_H
00024 #define MAILTRANSPORT_SMTPJOB_H
00025 
00026 #include <mailtransport/transportjob.h>
00027 
00028 namespace KIO {
00029   class Job;
00030   class Slave;
00031 }
00032 
00033 class SmtpJobPrivate;
00034 
00035 namespace MailTransport {
00036 
00049 class MAILTRANSPORT_EXPORT_DEPRECATED SmtpJob : public TransportJob
00050 {
00051   Q_OBJECT
00052   public:
00058     explicit SmtpJob( Transport *transport, QObject *parent = 0 );
00059 
00063     virtual ~SmtpJob();
00064 
00065   protected:
00066     virtual void doStart();
00067     virtual bool doKill();
00068 
00069   protected Q_SLOTS:
00070     virtual void slotResult( KJob *job );
00071     void slaveError( KIO::Slave *slave, int errorCode, const QString &errorMsg );
00072 
00073   private:
00074     void startSmtpJob();
00075 
00076   private Q_SLOTS:
00077     void dataRequest( KIO::Job *job, QByteArray &data );
00078 
00079   private:
00080     SmtpJobPrivate *const d;
00081 };
00082 
00083 } // namespace MailTransport
00084 
00085 #endif // MAILTRANSPORT_SMTPJOB_H
KDE Home | KDE Accessibility Home | Description of Access Keys