IMAP: downloading mails is now working.

* Changed the way the attributes are written to make sure that everything
  that can be written once is in fact written just once.
* The rename code in BMailProtocol::_ProcessFetchedHeader() was broken,
  and caused the hang of the last commit.
This commit is contained in:
Axel Dörfler
2015-01-06 15:26:47 +01:00
parent cf14e7f21f
commit d33e4744df
16 changed files with 178 additions and 116 deletions
+4 -2
View File
@@ -21,8 +21,10 @@ public:
virtual ~BMailFilter();
// Message hooks if filter is installed to an inbound protocol
virtual BMailFilterAction HeaderFetched(entry_ref& ref, BFile& file);
virtual void BodyFetched(const entry_ref& ref, BFile& file);
virtual BMailFilterAction HeaderFetched(entry_ref& ref, BFile& file,
BMessage& attributes);
virtual void BodyFetched(const entry_ref& ref, BFile& file,
BMessage& attributes);
virtual void MailboxSynchronized(status_t status);
// Message hooks if filter is installed to an outbound protocol
@@ -95,9 +95,11 @@ protected:
// Filter notifications
BMailFilterAction ProcessHeaderFetched(entry_ref& ref,
BFile& mail);
BFile& mail, BMessage& attributes);
void NotifyBodyFetched(const entry_ref& ref,
BFile& mail);
BFile& mail, BMessage& attributes);
BMailFilterAction ProcessMessageFetched(entry_ref& ref,
BFile& mail, BMessage& attributes);
void NotifyMessageReadyToSend(const entry_ref& ref,
BFile& mail);
void NotifyMessageSent(const entry_ref& ref,
@@ -108,6 +110,10 @@ protected:
private:
BMailFilter* _LoadFilter(const BMailAddOnSettings& settings);
BMailFilterAction _ProcessHeaderFetched(entry_ref& ref,
BFile& mail, BMessage& attributes);
void _NotifyBodyFetched(const entry_ref& ref,
BFile& mail, BMessage& attributes);
protected:
const BMailAccountSettings fAccountSettings;
+2 -1
View File
@@ -489,7 +489,8 @@ public:
status_t SetRect(const char* name, const BRect& value);
status_t SetSize(const char* name, const BSize& value);
status_t SetData(const char* name, type_code type,
const void* data, ssize_t numBytes);
const void* data, ssize_t numBytes,
bool fixedSize = true, int count = 1);
class Private;
struct message_header;