diff options
author | Carl Worth <cworth@cworth.org> | 2009-10-19 23:08:49 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-10-19 23:16:05 -0700 |
commit | ad784f38ce30d39b058325baf050eb784fb9a02e (patch) | |
tree | 2403422f5d17070ce77ff4fdf920a799d5803432 /notmuch.h | |
parent | b6dd413903370bd9b4f50428a32276f1f8457937 (diff) |
notmuch: Ignore files that don't look like email messages.
This is helpful for things like indexes that other mail programs
may have left around. It also means we can make the initial
instructions much easier, (the user need not worry about moving
away auxiliary files from some other email program).
Diffstat (limited to 'notmuch.h')
-rw-r--r-- | notmuch.h | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -40,10 +40,14 @@ NOTMUCH_BEGIN_DECLS * NOTMUCH_STATUS_SUCCESS: No error occurred. * * NOTMUCH_STATUS_XAPIAN_EXCEPTION: A Xapian exception occurred + * + * NOTMUCH_STATUS_FILE_NOT_EMAIL: A file was presented that doesn't + * appear to be an email message. */ typedef enum _notmuch_status { NOTMUCH_STATUS_SUCCESS = 0, - NOTMUCH_STATUS_XAPIAN_EXCEPTION + NOTMUCH_STATUS_XAPIAN_EXCEPTION, + NOTMUCH_STATUS_FILE_NOT_EMAIL } notmuch_status_t; /* An opaque data structure representing a notmuch database. See @@ -116,7 +120,15 @@ notmuch_database_get_path (notmuch_database_t *database); * single mail message (not a multi-message mbox) that is expected to * remain at its current location, (since the notmuch database will * reference the filename, and will not copy the entire contents of - * the file. */ + * the file. + * + * Return value: + * + * NOTMUCH_STATUS_SUCCESS: Message successfully added to database. + * + * NOTMUCH_STATUS_FILE_NOT_EMAIL: the contents of filename don't look + * like an email message. Nothing added to the database. + */ notmuch_status_t notmuch_database_add_message (notmuch_database_t *database, const char *filename); |