mu: add 'tickle' command, for renaming messages

The new command 'tickle' renames message files in place, which can be
useful for 3rd-party tools.
This commit is contained in:
djcb
2017-01-14 13:09:17 +02:00
parent f91969e0b7
commit 786e7c3d1f
6 changed files with 76 additions and 0 deletions

View File

@ -476,6 +476,23 @@ gboolean mu_msg_move_to_maildir (MuMsg *msg, const char *maildir,
GError **err);
/**
* Tickle a message -- ie., rxename a message while maintaining the maildir and
* flags. This can be useful when dealing with third-party tools such as mbsync
* that depend on changed filenames.
*
* @param msg a message with an existing file system path in an actual
* maildir
* @param err (may be NULL) may contain error information; note if the
* function return FALSE, err is not set for all error condition
* (ie. not for parameter error
*
* @return TRUE if it worked, FALSE otherwise
*/
gboolean mu_msg_tickle (MuMsg *msg, GError **err);
enum _MuMsgContactType { /* Reply-To:? */
MU_MSG_CONTACT_TYPE_TO = 0,
MU_MSG_CONTACT_TYPE_FROM,