* refactor mu_msg_(un)load_msg_file from various versions

This commit is contained in:
djcb
2012-07-16 12:55:54 +03:00
parent 668327da84
commit d4abc249c2
5 changed files with 54 additions and 74 deletions

View File

@ -69,6 +69,18 @@ MuMsg *mu_msg_new_from_doc (XapianDocument* doc, GError **err)
G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
/**
* if we don't have a message file yet (because this message is
* database-backed), load it.
*
* @param msg a MuMsg
* @param err receives error information
*
* @return TRUE if this succceeded, FALSE in case of error
*/
gboolean mu_msg_load_msg_file (MuMsg *msg, GError **err);
/**
* close the file-backend, if any; this function is for the use case
* where you have a large amount of messages where you need some
@ -79,7 +91,9 @@ MuMsg *mu_msg_new_from_doc (XapianDocument* doc, GError **err)
*
* @param msg a message object
*/
void mu_msg_close_file_backend (MuMsg *msg);
void mu_msg_unload_msg_file (MuMsg *msg);
/**
* increase the reference count for this message