libbalsa API cleanup patch




Hi guys,

Attached is a patch which begins the first part of the libbalsa API cleanup I
talked about the other day.

Basically all objects/structures have been given a LibBalsa prefix and all
functions a libbalsa_ prefix. I have also moved some code into separate files,
and completely renamed some functions to better explain what they do.

As well as this I have added an option to configure '--enable-more-warnings'
this is disabled by default and when enabled will add -Werror and some other
warnings to CFLAGS.

There's also the odd change, such as using g_new instead of malloc in some
places where I noticed it.

I am still waiting for CVS write access, so I hope someone can apply this for
me. I am away the next few days, but when I get back I hope to continue to
cleanup the LibBalsaMailbox hierarchy and replace the watcher stuff with
signals.

I have put a summary of the changes below, it contains all the major changes
but I may have missed out one or two smaller functions.

Cheers,
Ian.

CHANGES:

Added --enable-more-warnings to configure.
Added lots of emacs mode hints

new files body.c address.c and contact.c
removed send.h

Address -> LibBalsaAddress
code moved to address.c
* make_list_from_string -> libbalsa_address_new_list_from_string
* make_address_from_string -> libbalsa_address_new_from_string
* translate_address -> libbalsa_address_new_from_libmutt (private)
* address_to_gchar -> libbalsa_address_to_string

Body -> LibBalsaMessageBody
code moved to body.c

Contact -> LibBalsaContact
code to contact.c

Mailbox -> LibBalsaMailbox
MailboxIMAP -> LibBalsaMailboxImap
MailboxPOP3 -> LibBalsaMailboxPop3
MailboxLocal -> LibBalsaMailboxLocal

Server -> LibBalsaServer

Message -> LibBalsaMessage
move these to from send.h to message.h:
balsa_send_message -> libbalsa_message_send
balsa_postpone_message -> libbalsa_message_postpone

MailboxRemote -> removed

mailbox_type_from_description -> remove
mailbox_type_description -> remove

mailbox_init -> libbalsa_init
moved to libbalsa.c remove the gui callback 

renames some misc functions too

-- 
Ian Campbell
Churchill College, Cambridge.

renaming.patch.gz



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