X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fnotmuch.h;h=3c5ec9883b1f0aa4c088717f070d073b8495d9c9;hp=02604c5645c3c881ec490c6ed82a9a02601873d7;hb=ab24e883b008b3fe2e211d87c6c88ec2aa01bdc0;hpb=b65ca8e0ba5e234cfdbf957a454d386da526a6fc diff --git a/lib/notmuch.h b/lib/notmuch.h index 02604c56..3c5ec988 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -287,8 +287,16 @@ notmuch_database_open (const char *path, * * notmuch_database_close can be called multiple times. Later calls * have no effect. + * + * Return value: + * + * NOTMUCH_STATUS_SUCCESS: Successfully closed the database. + * + * NOTMUCH_STATUS_XAPIAN_EXCEPTION: A Xapian exception occurred; the + * database has been closed but there are no guarantees the + * changes to the database, if any, have been flushed to disk. */ -void +notmuch_status_t notmuch_database_close (notmuch_database_t *database); /** @@ -317,8 +325,11 @@ notmuch_database_compact (const char* path, /** * Destroy the notmuch database, closing it if necessary and freeing * all associated resources. + * + * Return value as in notmuch_database_close if the database was open; + * notmuch_database_destroy itself has no failure modes. */ -void +notmuch_status_t notmuch_database_destroy (notmuch_database_t *database); /** @@ -415,6 +426,10 @@ notmuch_database_end_atomic (notmuch_database_t *notmuch); * If this directory object does not exist in the database, this * returns NOTMUCH_STATUS_SUCCESS and sets *directory to NULL. * + * Otherwise the returned directory object is owned by the database + * and as such, will only be valid until notmuch_database_destroy is + * called. + * * Return value: * * NOTMUCH_STATUS_SUCCESS: Successfully retrieved directory. @@ -802,6 +817,8 @@ notmuch_query_destroy (notmuch_query_t *query); * valid object. Whereas when this function returns FALSE, * notmuch_threads_get will return NULL. * + * If passed a NULL pointer, this function returns FALSE + * * See the documentation of notmuch_query_search_threads for example * code showing how to iterate over a notmuch_threads_t object. */ @@ -994,7 +1011,7 @@ notmuch_thread_get_newest_date (notmuch_thread_t *thread); * * for (tags = notmuch_thread_get_tags (thread); * notmuch_tags_valid (tags); - * notmuch_result_move_to_next (tags)) + * notmuch_tags_move_to_next (tags)) * { * tag = notmuch_tags_get (tags); * .... @@ -1236,7 +1253,7 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header); * * for (tags = notmuch_message_get_tags (message); * notmuch_tags_valid (tags); - * notmuch_result_move_to_next (tags)) + * notmuch_tags_move_to_next (tags)) * { * tag = notmuch_tags_get (tags); * ....