diff options
author | Carl Worth <cworth@cworth.org> | 2009-10-21 16:12:53 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-10-21 16:12:53 -0700 |
commit | 302d54834d090d7e62377883f36dc709c95e5673 (patch) | |
tree | 4349f104408f0963ae520020b13b7623085af21a /notmuch.h | |
parent | f232f0a797b4fb657e630ca4bd664f9dcfe90dac (diff) |
Add notmuch_status_to_string function.
Be kind and let the user print error messages, not just error
codes.
Diffstat (limited to 'notmuch.h')
-rw-r--r-- | notmuch.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -49,6 +49,10 @@ typedef int notmuch_bool_t; * * NOTMUCH_STATUS_SUCCESS: No error occurred. * + * XXX: We don't really want to expose this lame XAPIAN_EXCEPTION + * value. Instead we should map to things like DATABASE_LOCKED or + * whatever. + * * NOTMUCH_STATUS_XAPIAN_EXCEPTION: A Xapian exception occurred * * NOTMUCH_STATUS_FILE_NOT_EMAIL: A file was presented that doesn't @@ -72,6 +76,13 @@ typedef enum _notmuch_status { NOTMUCH_STATUS_LAST_STATUS } notmuch_status_t; +/* Get a string representation of a notmuch_status_t value. + * + * The result is readonly. + */ +const char * +notmuch_status_to_string (notmuch_status_t status); + /* Various opaque data types. For each notmuch_<foo>_t see the various * notmuch_<foo> functions below. */ typedef struct _notmuch_database notmuch_database_t; |