author | alwin <alwin> | 2004-02-13 02:52:41 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-02-13 02:52:41 (UTC) |
commit | aca5ba5ed24b4da61517560ea91f566afd132d28 (patch) (side-by-side diff) | |
tree | 86085c6042e591dc9f211a8716cb63ff30cb5f4e /noncore/net/mail/libmailwrapper/smtpwrapper.h | |
parent | 2fd9c32e07714b7caf38994c0b0f1da8ffb27aa9 (diff) | |
download | opie-aca5ba5ed24b4da61517560ea91f566afd132d28.zip opie-aca5ba5ed24b4da61517560ea91f566afd132d28.tar.gz opie-aca5ba5ed24b4da61517560ea91f566afd132d28.tar.bz2 |
interface changes
Diffstat (limited to 'noncore/net/mail/libmailwrapper/smtpwrapper.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.h b/noncore/net/mail/libmailwrapper/smtpwrapper.h index 75e4891..7f6aac1 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.h +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.h @@ -1,76 +1,83 @@ +// -*- Mode: C++; -*- #ifndef SMTPwrapper_H #define SMTPwrapper_H #include <qpe/applnk.h> #include <qbitarray.h> #include <qdatetime.h> #include <libetpan/clist.h> #include "settings.h" class Mail; class AbstractMail; class RecMail; class Attachment; struct mailimf_fields; struct mailimf_field; struct mailimf_mailbox; struct mailmime; struct mailimf_address_list; class progressMailSend; struct mailsmtp; +class SMTPaccount; class SMTPwrapper : public QObject { Q_OBJECT public: - SMTPwrapper( Settings *s ); - virtual ~SMTPwrapper(){} - void sendMail(const Mail& mail,SMTPaccount*smtp,bool later=false ); - bool flushOutbox(SMTPaccount*smtp); + SMTPwrapper(SMTPaccount * aSmtp); + virtual ~SMTPwrapper(); + void sendMail(const Mail& mail,bool later=false ); + bool flushOutbox(); static progressMailSend*sendProgress; signals: void queuedMails( int ); protected: + mailsmtp *m_smtp; + SMTPaccount * m_SmtpAccount; + + void connect_server(); + void disc_server(); + int start_smtp_tls(); + mailimf_mailbox *newMailbox(const QString&name,const QString&mail ); mailimf_fields *createImfFields(const Mail &mail ); mailmime *createMimeMail(const Mail&mail ); mailimf_address_list *parseAddresses(const QString&addr ); void addFileParts( mailmime *message,const QList<Attachment>&files ); mailmime *buildTxtPart(const QString&str ); mailmime *buildFilePart(const QString&filename,const QString&mimetype,const QString&content); - void smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ); + void smtpSend( mailmime *mail,bool later); clist *createRcptList( mailimf_fields *fields ); static void storeMail(const char*mail, size_t length, const QString&box); static QString mailsmtpError( int err ); static void progress( size_t current, size_t maximum ); static void addRcpts( clist *list, mailimf_address_list *addr_list ); static char *getFrom( mailmime *mail ); static char *getFrom( mailimf_field *ffrom); static mailimf_field *getField( mailimf_fields *fields, int type ); - static int start_smtp_tls(mailsmtp *session); - int smtpSend(char*from,clist*rcpts,const char*data,size_t size, SMTPaccount *smtp ); + int smtpSend(char*from,clist*rcpts,const char*data,size_t size); void storeMail(mailmime*mail, const QString&box); - Settings *settings; - int sendQueuedMail(AbstractMail*wrap,SMTPaccount*smtp,RecMail*which); + int sendQueuedMail(AbstractMail*wrap,RecMail*which); void storeFailedMail(const char*data,unsigned int size, const char*failuremessage); int m_queuedMail; static const char* USER_AGENT; protected slots: void emitQCop( int queued ); }; #endif |