* mu_store_add_path now takes a maildir arg

This commit is contained in:
Dirk-Jan C. Binnema
2011-09-20 00:22:21 +03:00
parent d1e843cf29
commit c130ad6a57
2 changed files with 8 additions and 3 deletions

View File

@ -634,7 +634,8 @@ mu_store_update_msg (MuStore *store, unsigned docid, MuMsg *msg, GError **err)
unsigned
mu_store_add_path (MuStore *store, const char *path, GError **err)
mu_store_add_path (MuStore *store, const char *path, const char *maildir,
GError **err)
{
MuMsg *msg;
unsigned docid;
@ -643,7 +644,7 @@ mu_store_add_path (MuStore *store, const char *path, GError **err)
g_return_val_if_fail (path, FALSE);
err = NULL;
msg = mu_msg_new_from_file (path, NULL, err);
msg = mu_msg_new_from_file (path, maildir, err);
if (!msg)
return MU_STORE_INVALID_DOCID;

View File

@ -198,11 +198,15 @@ unsigned mu_store_update_msg (MuStore *store, unsigned docid, MuMsg *msg,
*
* @param store a valid store
* @param path full filesystem path to a valid message
* @param maildir set the maildir (e.g. "/drafts") for this message, or NULL
* note that you cannot mu_msg_move_msg_to_maildir unless maildir is set.
* @param err receives error information, if any, or NULL
*
* @return the docid of the stored message, or 0
* (MU_STORE_INVALID_DOCID) in case of error
*/
unsigned mu_store_add_path (MuStore *store, const char *path, GError **err);
unsigned mu_store_add_path (MuStore *store, const char *path,
const char* maildir, GError **err);
/**
* remove a message from the database based on its path