Work on event'ing the pop3 aggregator
- POP3_C_ReAttachToFetchMessages(): we manage the transition DB-IO -> Network I/O
- POP3C_GetListCommandState(): after receiving the list-OK we have to continue reading the list items
- POP3C_GetListOneLine(): the server sends us the size of the message; save it for later use.
- POP3C_GetOneMessagID(): after reading all list-items, start DB lookup whether we knew them already.
- POP3C_GetOneMessageIDState(): if more items are in the list, call us again with the next message ID.
- POP3_FetchNetworkUsetableEntry(): fetch one UT-entry per call; forward to POP3_C_ReAttachToFetchMessages() once we saw all items in the list.
- POP3C_SendGetOneMsg(): cycle over the list till we find the next Mail we didn't know already & fetch it; if no more items in list -> goodbuye.
- POP3C_ReadMessageBody() after the I/O layer read the message from the socket, parse it; move our context over to the DB-Queue.
- POP3C_ReadMessageBodyFollowing(): On success initialize the async message reader; let the I/O layer read the message, then continue parsing & saving it.
- POP3C_StoreMsgRead(): parse & save the message to the DB. Continue with remembering it in the UT table.
- POP3C_SendDelete(): check whether we want to delete the mails on the server, if do; else continue with POP3C_SendGetOneMsg() to fetch next in list.
- POP3_C_ReadServerStatus(): switch between line based read operation and reading whole messages.
we now can successfully aggregate one pop3 account.