imapclient.h
来自「Qtopia下的邮件处理程序」· C头文件 代码 · 共 114 行
H
114 行
/******************************************************************************** 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 ImapClient_H#define ImapClient_H#include <qtcpsocket.h>#include <qstring.h>#include <qstringlist.h>#include <qobject.h>#include <qtextstream.h>#include <qlist.h>#include <quuid.h>#include "maillist.h"#include "account.h"#include "imapprotocol.h"#include "client.h"class ImapClient: public Client{ Q_OBJECT public: ImapClient(); ~ImapClient(); void newConnection(); void setAccount(MailAccount *_account); void setSelectedMails(MailList *list, bool connected); void quit(); signals: void serverFolders(); void newMessage(const QString &, const QString &, const QUuid &, uint, bool, const QString &, uint); void errorOccurred(int status, QString &); void updateStatus(const QString &); void mailTransferred(int); void downloadedSize(int); void failedList(QStringList &);public slots: void errorHandling(int, QString msg);protected slots: void operationDone(ImapCommand &, OperationState &); void mailboxListed(QString &, QString &, QString &); void messageFetched(QString &, QString &, int, uint); void connectionError(int);private: void removeDeletedMailboxes(); bool nextMailbox(); void handleSelect(); void handleUid(); void handleUidFetch(); void handleSearch(); bool messagesToDelete(); void setNextDeleted(); void fetchNextMail(); private: ImapProtocol client; MailAccount *account; MailList *mailList; QString msgUidl; enum transferStatus { Init, Fetch, RFC822 }; enum SearchStatus { All,Seen,Unseen }; SearchStatus _searchStatus; QStringList _mailboxUidList; int status; int messageCount, mailSize, mailDropSize; bool selected; QStringList mailboxNames; QUuid internalId; QStringList uniqueUidList, unresolvedUid, delList; Mailbox *currentBox; uint atCurrentBox;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?