History log of /haiku/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPConnectionWorker.h
Revision Date Author Comments
# 6fa27973 08-Dec-2018 Peter Kosyh <p.kosyh@gmail.com>

IMAP: sync fixes

This patch should fix:

- deadlocks while manual syncing/shutdown;
- crashes while manual syncing/shutdown.

Change-Id: I0962ff5580c19cbf740d002b6f62681ed5f558ab
Reviewed-on: https://review.haiku-os.org/758
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>


# 81805393 04-Jan-2016 Axel Dörfler <axeld@pinc-software.de>

IMAP: setting flags, and body fetching works now.

* The direct methods in BMailProtocol now forward the request to the
looper; it's no longer the mail_daemon's responsibility to know
anything about that protocol.
* It's in desperate need of refactoring, but it doesn't hurt to add
it to the repository as is.


# 46019292 18-Jul-2013 Axel Dörfler <axeld@pinc-software.de>

IMAP: let mail retrieval scale better.

* We now also maintain a mail index -> UID array in IMAPMailbox.
* Instead of fetching the message entries by a fixed range of UIDs, we use the
message count, and get the entries by index.
* Likewise, in FetchHeadersCommand, we now get a list of UIDs rather than a
range. This makes it possible to only download exactly the headers we want.
* Extended FetchCommand to be able to dynamically build a sequence list from
a list of UIDs.
* Besides the suboptimal body fetching (one at a time, due to holes in the
IMAP specification), we should now be able to retrieve the messages with
pretty much optimal performance, while retaining an acceptable responsiveness
to user requests.


# 29e5da6f 13-May-2013 Axel Dörfler <axeld@pinc-software.de>

IMAP: allow only one sync at a time, divided header fetching.

* CheckMailboxesCommand, and FetchHeadersCommand now inherit from SyncCommand
which will prevent new CheckMailboxesCommand to be enqueued.
* FetchHeadersCommand now only retrieves up to kMaxFetchEntries headers at
once. This gets the same TODO about scaling as the limit in
CheckMailboxesCommand when fetching the flags/UIDs. Since we already read
all new UIDs at that point, we could easily do better there, though.


# 229c7773 14-Apr-2013 Axel Dörfler <axeld@pinc-software.de>

imap: Testing for new messages is now working.

* There is now a CheckSubscribedFoldersCommand that is issued on the main
connection that triggers everything.
* The new CheckMailboxesCommand divides the new mail check into several
portions, and requeues itself until the next step, ie. the
FetchHeadersCommand.
* The headers of the new mails are downloaded, but nothing is done with
them yet.
* The actual check for the new mails doesn't scale that well yet, not sure
how to properly do this without having to rely on the mail indices. Might
be sensible to solve this via some simple heuristic.


# 7993ddfa 10-Apr-2013 Axel Dörfler <axeld@pinc-software.de>

imap: Fleshed out command processing.

* Still doesn't do anything useful, though.


# a4bdd26d 05-Apr-2013 Axel Dörfler <axeld@pinc-software.de>

imap: Work in progress of connection setup.

* SelectCommand now correctly encodes the mailbox name again.
* Hierarchy separators from the LIST/LSUB commands are now properly parsed,
and taken into account.
* Folders in the file system are now created for mailboxes on the server,
supporting hierarchical mailbox names.
* A connection worker now has an IMAPFolder that handles the local side of the
mailbox, and an IMAPMailbox that handles the server side.
* Connection workers are now created/deleted, and setup correctly. They will
now also wait in case they don't have a mailbox until they get some.


# adbe8fc9 24-Mar-2013 Axel Dörfler <axeld@pinc-software.de>

IMAP: The connection workers are now started.

* On SyncMessages(), the main connection worker is started if it is not already
running (it may only run already in idle mode).
* This will then list the subscribed folders, and create as many more connection
workers as allowed and make sense.
* Finally, it will distribute the folders to the workers which don't do anything
further yet.


# 9192d4dc 14-Dec-2011 Axel Dörfler <axeld@pinc-software.de>

Started working on the IMAP add-on itself.

* Renamed imap_config.cpp to ConfigView.cpp, IMAPFolderConfig.(h|cpp)
to FolderConfigWindow.(h|cpp).
* Got the latter to build.
* Added Settings class to simplify and unify the BMessage based
settings access.
* Removed the InboundProtocol[Thread] implementation from the build for now.


# 46019292630b815296175cf61031f574dc15a69e 18-Jul-2013 Axel Dörfler <axeld@pinc-software.de>

IMAP: let mail retrieval scale better.

* We now also maintain a mail index -> UID array in IMAPMailbox.
* Instead of fetching the message entries by a fixed range of UIDs, we use the
message count, and get the entries by index.
* Likewise, in FetchHeadersCommand, we now get a list of UIDs rather than a
range. This makes it possible to only download exactly the headers we want.
* Extended FetchCommand to be able to dynamically build a sequence list from
a list of UIDs.
* Besides the suboptimal body fetching (one at a time, due to holes in the
IMAP specification), we should now be able to retrieve the messages with
pretty much optimal performance, while retaining an acceptable responsiveness
to user requests.


# 29e5da6f2070ba3c177a8383e9ad3e1c4cdcbd0d 13-May-2013 Axel Dörfler <axeld@pinc-software.de>

IMAP: allow only one sync at a time, divided header fetching.

* CheckMailboxesCommand, and FetchHeadersCommand now inherit from SyncCommand
which will prevent new CheckMailboxesCommand to be enqueued.
* FetchHeadersCommand now only retrieves up to kMaxFetchEntries headers at
once. This gets the same TODO about scaling as the limit in
CheckMailboxesCommand when fetching the flags/UIDs. Since we already read
all new UIDs at that point, we could easily do better there, though.


# 229c7773234389164b47efc09f348b248b8caf47 14-Apr-2013 Axel Dörfler <axeld@pinc-software.de>

imap: Testing for new messages is now working.

* There is now a CheckSubscribedFoldersCommand that is issued on the main
connection that triggers everything.
* The new CheckMailboxesCommand divides the new mail check into several
portions, and requeues itself until the next step, ie. the
FetchHeadersCommand.
* The headers of the new mails are downloaded, but nothing is done with
them yet.
* The actual check for the new mails doesn't scale that well yet, not sure
how to properly do this without having to rely on the mail indices. Might
be sensible to solve this via some simple heuristic.


# 7993ddfabaa0069192062289b4fb18c0034cdf76 10-Apr-2013 Axel Dörfler <axeld@pinc-software.de>

imap: Fleshed out command processing.

* Still doesn't do anything useful, though.


# a4bdd26d61967231469220573c4b5ee09e29dd49 05-Apr-2013 Axel Dörfler <axeld@pinc-software.de>

imap: Work in progress of connection setup.

* SelectCommand now correctly encodes the mailbox name again.
* Hierarchy separators from the LIST/LSUB commands are now properly parsed,
and taken into account.
* Folders in the file system are now created for mailboxes on the server,
supporting hierarchical mailbox names.
* A connection worker now has an IMAPFolder that handles the local side of the
mailbox, and an IMAPMailbox that handles the server side.
* Connection workers are now created/deleted, and setup correctly. They will
now also wait in case they don't have a mailbox until they get some.


# adbe8fc944d2568ba87d7603e921115830ef1416 24-Mar-2013 Axel Dörfler <axeld@pinc-software.de>

IMAP: The connection workers are now started.

* On SyncMessages(), the main connection worker is started if it is not already
running (it may only run already in idle mode).
* This will then list the subscribed folders, and create as many more connection
workers as allowed and make sense.
* Finally, it will distribute the folders to the workers which don't do anything
further yet.


# 9192d4dcf36ca64087e0702be1ef464c1e49d208 14-Dec-2011 Axel Dörfler <axeld@pinc-software.de>

Started working on the IMAP add-on itself.

* Renamed imap_config.cpp to ConfigView.cpp, IMAPFolderConfig.(h|cpp)
to FolderConfigWindow.(h|cpp).
* Got the latter to build.
* Added Settings class to simplify and unify the BMessage based
settings access.
* Removed the InboundProtocol[Thread] implementation from the build for now.