X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fnotmuch.h;h=669e01b120b3cbbd797389f5f7f2e63e116e5e72;hp=a64efc17ae367c370b9e0ecabaabde11f8b38ef2;hb=a18bbf7f155369f251b0513788eade23be3555d5;hpb=b10ce6bc23002d48916b1b2f375480e7540e3164 diff --git a/lib/notmuch.h b/lib/notmuch.h index a64efc17..669e01b1 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -191,6 +191,23 @@ typedef enum _notmuch_status { * function, in a way not covered by a more specific argument. */ NOTMUCH_STATUS_ILLEGAL_ARGUMENT, + /** + * A MIME object claimed to have cryptographic protection which + * notmuch tried to handle, but the protocol was not specified in + * an intelligible way. + */ + NOTMUCH_STATUS_MALFORMED_CRYPTO_PROTOCOL, + /** + * Notmuch attempted to do crypto processing, but could not + * initialize the engine needed to do so. + */ + NOTMUCH_STATUS_FAILED_CRYPTO_CONTEXT_CREATION, + /** + * A MIME object claimed to have cryptographic protection, and + * notmuch attempted to process it, but the specific protocol was + * something that notmuch doesn't know how to handle. + */ + NOTMUCH_STATUS_UNKNOWN_CRYPTO_PROTOCOL, /** * Not an actual status value. Just a way to find out how many * valid status values there are. @@ -219,7 +236,7 @@ typedef struct _notmuch_tags notmuch_tags_t; typedef struct _notmuch_directory notmuch_directory_t; typedef struct _notmuch_filenames notmuch_filenames_t; typedef struct _notmuch_config_list notmuch_config_list_t; -typedef struct _notmuch_param notmuch_param_t; +typedef struct _notmuch_indexopts notmuch_indexopts_t; #endif /* __DOXYGEN__ */ /** @@ -562,9 +579,10 @@ notmuch_database_get_directory (notmuch_database_t *database, * terms from the identified file to the existing message's index, and * adds 'filename' to the list of filenames known for the message. * - * 'indexopts' can be NULL (meaning, use the indexing defaults from - * the database), or can be an explicit choice of indexing options - * that should govern the indexing of this specific 'filename'. + * The 'indexopts' parameter can be NULL (meaning, use the indexing + * defaults from the database), or can be an explicit choice of + * indexing options that should govern the indexing of this specific + * 'filename'. * * If 'message' is not NULL, then, on successful return * (NOTMUCH_STATUS_SUCCESS or NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) '*message' @@ -603,7 +621,7 @@ notmuch_database_get_directory (notmuch_database_t *database, notmuch_status_t notmuch_database_index_file (notmuch_database_t *database, const char *filename, - notmuch_param_t *indexopts, + notmuch_indexopts_t *indexopts, notmuch_message_t **message); /** @@ -1430,7 +1448,7 @@ notmuch_message_get_filenames (notmuch_message_t *message); */ notmuch_status_t notmuch_message_reindex (notmuch_message_t *message, - notmuch_param_t *indexopts); + notmuch_indexopts_t *indexopts); /** * Message flags. @@ -1612,6 +1630,14 @@ notmuch_message_remove_all_tags (notmuch_message_t *message); notmuch_status_t notmuch_message_maildir_flags_to_tags (notmuch_message_t *message); +/** + * return TRUE if any filename of 'message' has maildir flag 'flag', + * FALSE otherwise. + * + */ +notmuch_bool_t +notmuch_message_has_maildir_flag (notmuch_message_t *message, char flag); + /** * Rename message filename(s) to encode tags as maildir flags. * @@ -1847,7 +1873,7 @@ notmuch_message_get_properties (notmuch_message_t *message, const char *key, not * says. Whereas when this function returns FALSE, calling any of * these functions results in undefined behaviour. * - * See the documentation of notmuch_message_properties_get for example + * See the documentation of notmuch_message_get_properties for example * code showing how to iterate over a notmuch_message_properties_t * object. * @@ -2172,6 +2198,31 @@ notmuch_config_list_move_to_next (notmuch_config_list_t *config_list); void notmuch_config_list_destroy (notmuch_config_list_t *config_list); + +/** + * get the current default indexing options for a given database. + * + * This object will survive until the database itself is destroyed, + * but the caller may also release it earlier with + * notmuch_indexopts_destroy. + * + * This object represents a set of options on how a message can be + * added to the index. At the moment it is a featureless stub. + * + * @since libnotmuch 5.1 (notmuch 0.26) + */ +notmuch_indexopts_t * +notmuch_database_get_default_indexopts (notmuch_database_t *db); + +/** + * Destroy a notmuch_indexopts_t object. + * + * @since libnotmuch 5.1 (notmuch 0.26) + */ +void +notmuch_indexopts_destroy (notmuch_indexopts_t *options); + + /** * interrogate the library for compile time features *