* refactoring: merge mu-msg-file with mu-maildir

This commit is contained in:
Dirk-Jan C. Binnema
2011-05-06 08:11:47 +03:00
parent eabd4e2e61
commit 0758ab6645
9 changed files with 392 additions and 322 deletions

View File

@ -20,43 +20,5 @@
#ifndef __MU_MSG_FILE_H__
#define __MU_MSG_FILE_H__
#include <glib.h>
#include <mu-msg-flags.h>
G_BEGIN_DECLS
/**
* get the Maildir flags from the full path of a mailfile. The flags
* are as specified in http://cr.yp.to/proto/maildir.html, plus
* MU_MSG_FLAG_NEW for new messages, ie the ones that live in
* new/. The flags are logically OR'ed. Note that the file does not
* have to exist; the flags are based on the path only.
*
* @param pathname of a mailfile; it does not have to refer to an
* actual message
*
* @return the flags, or MU_MSG_FILE_FLAG_UNKNOWN in case of error
*/
MuMsgFlags mu_msg_file_get_flags_from_path (const char* pathname);
/**
* get the new pathname for a message, based on the old path and the
* new flags. Note that setting/removing the MU_MSG_FLAG_NEW will
* change the directory in which a message lives. The flags are as
* specified in http://cr.yp.to/proto/maildir.html, plus
* MU_MSG_FLAG_NEW for new messages, ie the ones that live in
* new/. The flags are logically OR'ed. Note that the file does not
* have to exist; the flags are based on the path only.
*
* @param oldpath the old (current) full path to the message (including the filename)
* @param newflags the new flags for this message
*
* @return a new path name; use g_free when done with. NULL in case of
* error.
*/
char* mu_msg_file_get_path_from_flags (const char *oldpath, MuMsgFlags newflags);
G_END_DECLS
#endif /*__MU_MSG_FILE_H__*/