Just updated my primates hacking page with the beginnings of a port of my IMAP client implementation into the Evolution tree. I've also committed what I have to Evolution CVS under evolution/camel/providers/imap4/. Until I implement CamelIMAPFolder and CamelIMAPSummary classes, what's there will probably fail to build all the way, although CamelIMAPStream should build okay.
I've also got a lot of other experimental ideas on my local system for Camel (of which this IMAP plugin was a part of, which is why I need to port it to the current infrastructure)
Some of my other experimental changes include:
- Support for namespaces (eg. for IMAP's NAMESPACE command)
- CamelFolder::open() and CamelFolder::close() methods
When ::open() gets called for the first time, it increments CamelFolder::open_count to 1 and loads cached CamelMessageInfo structures off disc. Addtional calls to ::open() will simply increment ::open_count. Conversly, when ::close() is caleld, the ::open_count will be decrememnted by 1 until the count reaches 0 at which point the folder is considered truly "closed"
As a part of this change, I've also got an additional method on CamelFolderSummary called ::unload() which, funnily enough, unloads the CamelMessageInfo's from memory. This is better than simply unref'ing the summary object because it allows the folder to continue to have access to a few of the cached items such as unread count, deleted count, total count, (junk count?), etc.
- Moved a number of CamelStore methods to the CamelFolder class, such as: ::list(), ::lsub(), ::create(), ::delete(), ::rename(), ::subscribe(), and ::unsubscribe()
- READ-ONLY and READ-WRITE modes for CamelFolder (just an integer state variable) - mostly only useful for IMAP right now, but perhaps also useful for local mail archives located on a ROM in the future?
- The removal of CamelFolderInfo's. I did this by making each CamelFolder have a pointer to its parent folder (actually, this was needed for ::create(), ::delete() and ::rename() anyway). Unfortunately this idea hasn't been a total success story. Ideally, you'd be able to use a true tree structure of CamelFolders like we were able to with CamelFolderInfo, but that is quite a bit more complicated when dealing with actual CamelFolder objects due to having to keep the CamelFolder object tree in sync all the time (which is why my CamelFolder objects don't have child/sibling pointers).