emailhandler.h
来自「Qtopia下的邮件处理程序」· C头文件 代码 · 共 119 行
H
119 行
/******************************************************************************** Copyright (C) 2000-2006 TROLLTECH ASA. All rights reserved.**** This file is part of the Phone Edition of the Qtopia Toolkit.**** Licensees holding a valid license agreement from Trolltech or any of its** authorized distributors may use this file in accordance with** the License Agreement provided with the Licensed Software.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for** information about Trolltech's Commercial License Agreements.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.********** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#ifndef EmailHandler_H#define EmailHandler_H#include "email.h"#include "account.h"#include "client.h"#include "smtpclient.h"#ifdef QTOPIA_PHONE#include "smsclient.h"#endif#include "popclient.h"#include "imapclient.h"#include "maillist.h"#include <qobject.h>#include <qstring.h>#include <qlist.h>#include <qstringlist.h>const int ErrUnknownResponse = 1001;const int ErrLoginFailed = 1002;const int ErrCancel = 1003;class MmsClient;class EmailHandler : public QObject{ Q_OBJECTpublic: EmailHandler(); enum TransmissionType { Unknown = 0, Receiving = 0x01, Sending = 0x02 }; void connectClient(Client *client, int type, QString sigName); void setMailAccount(MailAccount *account); void setSmtpAccount(MailAccount *account); void setSmsAccount(MailAccount *account); void setMmsAccount(MailAccount *account); void sendMail(QList<Email*>* mailList); void getMailHeaders(); void getMailByList(MailList *mailList, bool newConnection); void cancel(); void popQuit(); void acceptMail(const Email &mail); void rejectMail(const Email &mail); Client* clientFromAccount(MailAccount *account);signals: void mailSent(int); void smtpError(int, QString &); void popError(int, QString &); void smsError(int, QString &); void mmsError(int, QString &); void mailArrived(const Email &); void unresolvedUidlList(QString &, QStringList &); void updatePopStatus(const QString &); void updateSendingStatus(const QString &); void mailTransferred(int); void mailboxSize(int); void downloadedSize(int); void transferredSize(int); void mailSendSize(int); void serverFolders(); void failedList(QStringList &);public slots: void messageArrived(const QString &, const QString &, const QUuid &, uint size, bool complete); void messageArrived(const QString &, const QString &, const QUuid &, uint size, bool complete, const QString &, uint); void messageArrived(Email mail); void unresolvedUidl(QStringList &); private: MailAccount *mailAccount; MailAccount *smtpAccount; MailAccount *smsAccount; MailAccount *mmsAccount; SmtpClient *smtpClient;#ifdef QTOPIA_PHONE SmsClient *smsClient;#ifndef QTOPIA_NO_MMS MmsClient *mmsClient;#endif#endif PopClient *popClient; ImapClient *imapClient; bool receiving;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?