Adventures in Mail - Week 1
I started coding during the community bonding period.
During this phase I laid out the DBus API for mail, started a basic Command module that will control configuration data. Mail will be broken down into objects.
Most of this time was spent figuring out how to handle asynchronous requests of the mail server. Initially, I am using a bunch of threads and a queue for them to pull work from.
Mail is conceptually separated into Accounts, folders, lists of messages and messages, each with their own API accessible over DBus.
Components#
Messages#
- get_(body|headers|etc)
Lists#
- get_number_of_messages
- get_message → create and return Message object
Folder#
- search → return List object that matches search criteria
Account#
- get_folder_list → returns a simple list of folders
- get_folder → returns Folder object
During the first official week of coding, I spent my time working on the caching logic. Requests for information will be handled by a central cache to abstract the DBus API from the mail server protocol, IMAP, POP or a local cache. This is currently a work in progress and will be my main focus this week as well.
I will be temporarily storing mail locally in a raw RFC822 format.