Cleanup of libbalsa API 2



Hi there,

I have put up a patch at
http://www.btinternet.com/~ijc/balsa-renaming-2.patch.gz which does the same
renaming as the last patch I sent, but also adds a load of other cleanups and
goes most of the way to making some stuff into GtkObjects. LibBalsaMessage is
done, and LibBalsaMailbox is mostly done.

I haven't got CVS access yet myself, so I wonder if someone (Pawel?) would
mind
commiting it - I would rather get it in sooner, since everytime someone checks
something in the can be quite a few conflicts due to changed names etc.

The changes on top of the previous patch are:

libbalsa_address_to_string -> libbalsa_address_to_gchar to avoid confusion
with
returning gchar* or GString*.

I have been trying to remove dependencies of libbalsa on balsa - so I have
changed some of the date parsing stuff in libbalsa_message and added
libbalsa_message_date_as_gchar.

LibBalsaMessage->fcc_mailbox -> a string (path) rather than a LibBalsaMailbox
reference (I forget why - it was todo with removing a dependency of libbalsa
on
balsa I think).

I removed all the mailbox watcher stuff and replaced it with signals of
various
sorts (many of which were already there and not used). LibBalsaMailbox now
emits a "message-status-changed" signal when a message in that mailbox changes
state (eg read/unread flagged/unflagged etc). LibBalsaMessage emits signals on
these too.

libbalsa_mailbox_load_messages now always emits a signal if there are new
messages (it used to have a paramter controlling this, which as far as I can
tell served no purpose and just confused things)

LibBalsaServer - removed it, subclasses of LibBalsaMailbox can deal with this
themselves if they want (it was just a struct and was not very helpful).

I removed a libbalsa_mailbox_imap_set_username (was set_imap_username) from
balsa-index-page.c - it wasn't usefull as far as I could see, if it was it
should be called from the relevant part of LibBalsaMailboxImap. There is a
private function in LibBalsaMailboxImap set_mutt_username with the same
functionality.

mailbox_open_{ref,unref,append,etc} -> libbalsa_mailbox_open/close open has a
boolean append parameter.

check_all_imap_hosts was an empty function , so I killed it.

I added methods to set username, password and host/port to LibBalsaMailbox -
eventually I hope to encapsulate the add_mailbox_for_checking and buffy
stuff...

I made LibBalsaMailbox make better use of the hierarchy of classes to separate
Imap/Pop/Local specific code. Basically I moved a load of code from mailbox.c
to mailbox_{local,imap,pop3}.c 

-- 
Ian Campbell 
Churchill College,
Cambridge.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]