Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

smtpwrapper.h

Go to the documentation of this file.
00001 // -*- Mode: C++; -*-
00002 #ifndef SMTPwrapper_H
00003 #define SMTPwrapper_H
00004 
00005 #include <qpe/applnk.h>
00006 
00007 #include <qbitarray.h>
00008 #include <qdatetime.h>
00009 #include <libetpan/clist.h>
00010 
00011 #include "settings.h"
00012 #include "generatemail.h"
00013 
00014 #include <opie2/osmartpointer.h>
00015 
00016 class SMTPaccount;
00017 class AbstractMail;
00018 
00019 class SMTPwrapper : public Generatemail
00020 {
00021     Q_OBJECT
00022 
00023 public:
00024     SMTPwrapper(SMTPaccount * aSmtp);
00025     virtual ~SMTPwrapper();
00026     void sendMail(const Opie::Core::OSmartPointer<Mail>& mail,bool later=false );
00027     bool flushOutbox();
00028 
00029     static progressMailSend*sendProgress;
00030 
00031 signals:
00032     void queuedMails( int );
00033 
00034 protected:
00035     mailsmtp *m_smtp;
00036     SMTPaccount * m_SmtpAccount;
00037 
00038     void connect_server();
00039     void disc_server();
00040     int start_smtp_tls();
00041 
00042 
00043     void smtpSend( mailmime *mail,bool later);
00044 
00045     static void storeMail(const char*mail, size_t length, const QString&box);
00046     static QString mailsmtpError( int err );
00047     static void progress( size_t current, size_t maximum );
00048 
00049     int smtpSend(char*from,clist*rcpts,const char*data,size_t size);
00050 
00051     void storeMail(mailmime*mail, const QString&box);
00052 
00053     int sendQueuedMail(AbstractMail*wrap,const Opie::Core::OSmartPointer<RecMail>&which);
00054     void storeFailedMail(const char*data,unsigned int size, const char*failuremessage);
00055 
00056     int m_queuedMail;
00057 
00058 protected slots:
00059     void emitQCop( int queued );
00060 
00061 };
00062 
00063 #endif

Generated on Sat Nov 5 16:17:38 2005 for OPIE by  doxygen 1.4.2