Hi all,
As promised I've been busy reworking imapcommands.c lately. Since what I'm doing
will be pretty invasive wrt the imap code I want to share with you some of the
progress made and what I plan to do...
1) change the signature for all _ic_XXX functions
2) change the way results are gathered and flushed to to client
3) use glib and gmime extensively
ad 1)
Currently all _ic_XXX functions look like:
int _ic_XXX(char *tag, char **args, ClientInfo * ci)
I plan to change this to
int _ic_XXX(struct ImapSession *self)
where a struct ImapSession contains much of the currently globalized variables
in imapcommands.c and imaputil.c
This will enable splitting up of _ic_fetch and friends, and generally make life
easier for people who want to refactor the imap code.
ad 2)
Currently all results are written to the client by calling fprintf all over the
place (or ci_write which is a wrapper).
I'm almost finished with rewriting the imapcode and replace all those fprintf's
with a GList setup. This helps building up clean lists of items to be returned
to the client, and sanatize their formatting. No more trailing spaces in
parentisized lists, etc...
ad3)
While working at (2) I began using GLib extensively, but now I've also started
working on the actual message-retrieval code. Using gmime there makes a lot of
sense, and I've already rewritten some the rfcsize code.
Using GMime will help clean up the message parsing *a lot*.
All this is being worked on on the nfg-0-1 branch. Code is currently working
well, in sync with head as of sept 16, and tested with both the testframe and
thunderbird.
Of course, doing this started out with a plan to phase-in the is_header field,
and start working toward a header-caching setup. Those plans will largely
determine what I'll be working on in this branch.
--
________________________________________________________________
Paul Stevens [EMAIL PROTECTED]
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl