- notmuch_built_with
notmuch_bool_t notmuch_built_with(const(char)* name)
interrogate the library for compile time features
- notmuch_config_list_destroy
void notmuch_config_list_destroy(notmuch_config_list_t* config_list)
free any resources held by 'config_list'
- notmuch_config_list_key
const(char)* notmuch_config_list_key(notmuch_config_list_t* config_list)
return key for current config pair
- notmuch_config_list_move_to_next
void notmuch_config_list_move_to_next(notmuch_config_list_t* config_list)
move 'config_list' iterator to the next pair
- notmuch_config_list_valid
notmuch_bool_t notmuch_config_list_valid(notmuch_config_list_t* config_list)
Is 'config_list' iterator valid (i.e. _key, _value, _move_to_next can be called).
- notmuch_config_list_value
const(char)* notmuch_config_list_value(notmuch_config_list_t* config_list)
return 'value' for current config pair
- notmuch_database_add_message
notmuch_status_t notmuch_database_add_message(notmuch_database_t* database, const(char)* filename, notmuch_message_t** message)
Add a new message to the given notmuch database or associate an
additional filename with an existing message.
- notmuch_database_begin_atomic
notmuch_status_t notmuch_database_begin_atomic(notmuch_database_t* notmuch)
Begin an atomic database operation.
- notmuch_database_close
notmuch_status_t notmuch_database_close(notmuch_database_t* database)
Commit changes and close the given notmuch database.
- notmuch_database_compact
notmuch_status_t notmuch_database_compact(const(char)* path, const(char)* backup_path, notmuch_compact_status_cb_t status_cb, void* closure)
Compact a notmuch database, backing up the original database to the
given path.
- notmuch_database_create
notmuch_status_t notmuch_database_create(const(char)* path, notmuch_database_t** database)
Create a new, empty notmuch database located at 'path'.
- notmuch_database_create_verbose
notmuch_status_t notmuch_database_create_verbose(const(char)* path, notmuch_database_t** database, char** error_message)
Like notmuch_database_create, except optionally return an error
message. This message is allocated by malloc and should be freed by
the caller.
- notmuch_database_destroy
notmuch_status_t notmuch_database_destroy(notmuch_database_t* database)
Destroy the notmuch database, closing it if necessary and freeing
all associated resources.
- notmuch_database_end_atomic
notmuch_status_t notmuch_database_end_atomic(notmuch_database_t* notmuch)
Indicate the end of an atomic database operation.
- notmuch_database_find_message
notmuch_status_t notmuch_database_find_message(notmuch_database_t* database, const(char)* message_id, notmuch_message_t** message)
Find a message with the given message_id.
- notmuch_database_find_message_by_filename
notmuch_status_t notmuch_database_find_message_by_filename(notmuch_database_t* notmuch, const(char)* filename, notmuch_message_t** message)
Find a message with the given filename.
- notmuch_database_get_all_tags
notmuch_tags_t* notmuch_database_get_all_tags(notmuch_database_t* db)
Return a list of all tags found in the database.
- notmuch_database_get_config
notmuch_status_t notmuch_database_get_config(notmuch_database_t* db, const(char)* key, char** value)
retrieve config item 'key', assign to 'value'
- notmuch_database_get_config_list
notmuch_status_t notmuch_database_get_config_list(notmuch_database_t* db, const(char)* prefix, notmuch_config_list_t** out_)
Create an iterator for all config items with keys matching a given prefix
- notmuch_database_get_directory
notmuch_status_t notmuch_database_get_directory(notmuch_database_t* database, const(char)* path, notmuch_directory_t** directory)
Retrieve a directory object from the database for 'path'.
- notmuch_database_get_path
const(char)* notmuch_database_get_path(notmuch_database_t* database)
Return the database path of the given database.
- notmuch_database_get_revision
ulong notmuch_database_get_revision(notmuch_database_t* notmuch, const(char)** uuid)
Return the committed database revision and UUID.
- notmuch_database_get_version
uint notmuch_database_get_version(notmuch_database_t* database)
Return the database format version of the given database.
- notmuch_database_needs_upgrade
notmuch_bool_t notmuch_database_needs_upgrade(notmuch_database_t* database)
Can the database be upgraded to a newer database version?
- notmuch_database_open
notmuch_status_t notmuch_database_open(const(char)* path, notmuch_database_mode_t mode, notmuch_database_t** database)
Open an existing notmuch database located at 'path'.
- notmuch_database_open_verbose
notmuch_status_t notmuch_database_open_verbose(const(char)* path, notmuch_database_mode_t mode, notmuch_database_t** database, char** error_message)
Like notmuch_database_open, except optionally return an error
message. This message is allocated by malloc and should be freed by
the caller.
- notmuch_database_remove_message
notmuch_status_t notmuch_database_remove_message(notmuch_database_t* database, const(char)* filename)
Remove a message filename from the given notmuch database. If the
message has no more filenames, remove the message.
- notmuch_database_set_config
notmuch_status_t notmuch_database_set_config(notmuch_database_t* db, const(char)* key, const(char)* value)
set config 'key' to 'value'
- notmuch_database_status_string
const(char)* notmuch_database_status_string(const notmuch_database_t* notmuch)
Retrieve last status string for given database.
- notmuch_database_upgrade
notmuch_status_t notmuch_database_upgrade(notmuch_database_t* database, void function(void* closure, double progress) progress_notify, void* closure)
Upgrade the current database to the latest supported version.
- notmuch_directory_delete
notmuch_status_t notmuch_directory_delete(notmuch_directory_t* directory)
Delete directory document from the database, and destroy the
notmuch_directory_t object. Assumes any child directories and files
have been deleted by the caller.
- notmuch_directory_destroy
void notmuch_directory_destroy(notmuch_directory_t* directory)
Destroy a notmuch_directory_t object.
- notmuch_directory_get_child_directories
notmuch_filenames_t* notmuch_directory_get_child_directories(notmuch_directory_t* directory)
Get a notmuch_filenames_t iterator listing all the filenames of
sub-directories in the database within the given directory.
- notmuch_directory_get_child_files
notmuch_filenames_t* notmuch_directory_get_child_files(notmuch_directory_t* directory)
Get a notmuch_filenames_t iterator listing all the filenames of
messages in the database within the given directory.
- notmuch_directory_get_mtime
time_t notmuch_directory_get_mtime(notmuch_directory_t* directory)
Get the mtime of a directory, (as previously stored with
notmuch_directory_set_mtime).
- notmuch_directory_set_mtime
notmuch_status_t notmuch_directory_set_mtime(notmuch_directory_t* directory, time_t mtime)
Store an mtime within the database for 'directory'.
- notmuch_filenames_destroy
void notmuch_filenames_destroy(notmuch_filenames_t* filenames)
Destroy a notmuch_filenames_t object.
- notmuch_filenames_get
const(char)* notmuch_filenames_get(notmuch_filenames_t* filenames)
Get the current filename from 'filenames' as a string.
- notmuch_filenames_move_to_next
void notmuch_filenames_move_to_next(notmuch_filenames_t* filenames)
Move the 'filenames' iterator to the next filename.
- notmuch_filenames_valid
notmuch_bool_t notmuch_filenames_valid(notmuch_filenames_t* filenames)
Is the given 'filenames' iterator pointing at a valid filename.
- notmuch_message_add_property
notmuch_status_t notmuch_message_add_property(notmuch_message_t* message, const(char)* key, const(char)* value)
Add a (key,value) pair to a message
- notmuch_message_add_tag
notmuch_status_t notmuch_message_add_tag(notmuch_message_t* message, const(char)* tag)
Add a tag to the given message.
- notmuch_message_destroy
void notmuch_message_destroy(notmuch_message_t* message)
Destroy a notmuch_message_t object.
- notmuch_message_freeze
notmuch_status_t notmuch_message_freeze(notmuch_message_t* message)
Freeze the current state of 'message' within the database.
- notmuch_message_get_date
time_t notmuch_message_get_date(notmuch_message_t* message)
Get the date of 'message' as a time_t value.
- notmuch_message_get_filename
const(char)* notmuch_message_get_filename(notmuch_message_t* message)
Get a filename for the email corresponding to 'message'.
- notmuch_message_get_filenames
notmuch_filenames_t* notmuch_message_get_filenames(notmuch_message_t* message)
Get all filenames for the email corresponding to 'message'.
- notmuch_message_get_flag
notmuch_bool_t notmuch_message_get_flag(notmuch_message_t* message, notmuch_message_flag_t flag)
Get a value of a flag for the email corresponding to 'message'.
- notmuch_message_get_header
const(char)* notmuch_message_get_header(notmuch_message_t* message, const(char)* header)
Get the value of the specified header from 'message' as a UTF-8 string.
- notmuch_message_get_message_id
const(char)* notmuch_message_get_message_id(notmuch_message_t* message)
Get the message ID of 'message'.
- notmuch_message_get_properties
notmuch_message_properties_t* notmuch_message_get_properties(notmuch_message_t* message, const(char)* key, notmuch_bool_t exact)
Get the properties for *message*, returning a
notmuch_message_properties_t object which can be used to iterate
over all properties.
- notmuch_message_get_property
notmuch_status_t notmuch_message_get_property(notmuch_message_t* message, const(char)* key, const(char)** value)
Retrieve the value for a single property key
- notmuch_message_get_replies
notmuch_messages_t* notmuch_message_get_replies(notmuch_message_t* message)
Get a notmuch_messages_t iterator for all of the replies to
'message'.
- notmuch_message_get_tags
notmuch_tags_t* notmuch_message_get_tags(notmuch_message_t* message)
Get the tags for 'message', returning a notmuch_tags_t object which
can be used to iterate over all tags.
- notmuch_message_get_thread_id
const(char)* notmuch_message_get_thread_id(notmuch_message_t* message)
Get the thread ID of 'message'.
- notmuch_message_maildir_flags_to_tags
notmuch_status_t notmuch_message_maildir_flags_to_tags(notmuch_message_t* message)
Add/remove tags according to maildir flags in the message filename(s).
- notmuch_message_properties_destroy
void notmuch_message_properties_destroy(notmuch_message_properties_t* properties)
Destroy a notmuch_message_properties_t object.
- notmuch_message_properties_key
const(char)* notmuch_message_properties_key(notmuch_message_properties_t* properties)
Return the key from the current (key,value) pair.
- notmuch_message_properties_move_to_next
void notmuch_message_properties_move_to_next(notmuch_message_properties_t* properties)
Move the *properties* iterator to the next (key,value) pair
- notmuch_message_properties_valid
notmuch_bool_t notmuch_message_properties_valid(notmuch_message_properties_t* properties)
Is the given *properties* iterator pointing at a valid (key,value)
pair.
- notmuch_message_properties_value
const(char)* notmuch_message_properties_value(notmuch_message_properties_t* properties)
Return the value from the current (key,value) pair.
- notmuch_message_remove_all_properties
notmuch_status_t notmuch_message_remove_all_properties(notmuch_message_t* message, const(char)* key)
Remove all (key,value) pairs from the given message.
- notmuch_message_remove_all_tags
notmuch_status_t notmuch_message_remove_all_tags(notmuch_message_t* message)
Remove all tags from the given message.
- notmuch_message_remove_property
notmuch_status_t notmuch_message_remove_property(notmuch_message_t* message, const(char)* key, const(char)* value)
Remove a (key,value) pair from a message.
- notmuch_message_remove_tag
notmuch_status_t notmuch_message_remove_tag(notmuch_message_t* message, const(char)* tag)
Remove a tag from the given message.
- notmuch_message_set_flag
void notmuch_message_set_flag(notmuch_message_t* message, notmuch_message_flag_t flag, notmuch_bool_t value)
Set a value of a flag for the email corresponding to 'message'.
- notmuch_message_tags_to_maildir_flags
notmuch_status_t notmuch_message_tags_to_maildir_flags(notmuch_message_t* message)
Rename message filename(s) to encode tags as maildir flags.
- notmuch_message_thaw
notmuch_status_t notmuch_message_thaw(notmuch_message_t* message)
Thaw the current 'message', synchronizing any changes that may have
occurred while 'message' was frozen into the notmuch database.
- notmuch_messages_collect_tags
notmuch_tags_t* notmuch_messages_collect_tags(notmuch_messages_t* messages)
Return a list of tags from all messages.
- notmuch_messages_destroy
void notmuch_messages_destroy(notmuch_messages_t* messages)
Destroy a notmuch_messages_t object.
- notmuch_messages_get
notmuch_message_t* notmuch_messages_get(notmuch_messages_t* messages)
Get the current message from 'messages' as a notmuch_message_t.
- notmuch_messages_move_to_next
void notmuch_messages_move_to_next(notmuch_messages_t* messages)
Move the 'messages' iterator to the next message.
- notmuch_messages_valid
notmuch_bool_t notmuch_messages_valid(notmuch_messages_t* messages)
Is the given 'messages' iterator pointing at a valid message.
- notmuch_query_add_tag_exclude
void notmuch_query_add_tag_exclude(notmuch_query_t* query, const(char)* tag)
Add a tag that will be excluded from the query results by default.
This exclusion will be overridden if this tag appears explicitly in
the query.
- notmuch_query_count_messages
uint notmuch_query_count_messages(notmuch_query_t* query)
like notmuch_query_count_messages_st, but without a status return.
- notmuch_query_count_messages_st
notmuch_status_t notmuch_query_count_messages_st(notmuch_query_t* query, uint* count)
Return the number of messages matching a search.
- notmuch_query_count_threads
uint notmuch_query_count_threads(notmuch_query_t* query)
like notmuch_query_count_threads, but without a status return.
- notmuch_query_count_threads_st
notmuch_status_t notmuch_query_count_threads_st(notmuch_query_t* query, uint* count)
Return the number of threads matching a search.
- notmuch_query_create
notmuch_query_t* notmuch_query_create(notmuch_database_t* database, const(char)* query_string)
Create a new query for 'database'.
- notmuch_query_destroy
void notmuch_query_destroy(notmuch_query_t* query)
Destroy a notmuch_query_t along with any associated resources.
- notmuch_query_get_database
notmuch_database_t* notmuch_query_get_database(const notmuch_query_t* query)
Return the notmuch database of this query. See notmuch_query_create.
- notmuch_query_get_query_string
const(char)* notmuch_query_get_query_string(const notmuch_query_t* query)
Return the query_string of this query. See notmuch_query_create.
- notmuch_query_get_sort
notmuch_sort_t notmuch_query_get_sort(const notmuch_query_t* query)
Return the sort specified for this query. See
notmuch_query_set_sort.
- notmuch_query_search_messages
notmuch_messages_t* notmuch_query_search_messages(notmuch_query_t* query)
Like notmuch_query_search_messages, but without a status return.
- notmuch_query_search_messages_st
notmuch_status_t notmuch_query_search_messages_st(notmuch_query_t* query, notmuch_messages_t** out_)
Execute a query for messages, returning a notmuch_messages_t object
which can be used to iterate over the results. The returned
messages object is owned by the query and as such, will only be
valid until notmuch_query_destroy.
- notmuch_query_search_threads
notmuch_threads_t* notmuch_query_search_threads(notmuch_query_t* query)
Like notmuch_query_search_threads_st, but without a status return.
- notmuch_query_search_threads_st
notmuch_status_t notmuch_query_search_threads_st(notmuch_query_t* query, notmuch_threads_t** out_)
Execute a query for threads, returning a notmuch_threads_t object
which can be used to iterate over the results. The returned threads
object is owned by the query and as such, will only be valid until
notmuch_query_destroy.
- notmuch_query_set_omit_excluded
void notmuch_query_set_omit_excluded(notmuch_query_t* query, notmuch_exclude_t omit_excluded)
Specify whether to omit excluded results or simply flag them. By
default, this is set to TRUE.
- notmuch_query_set_sort
void notmuch_query_set_sort(notmuch_query_t* query, notmuch_sort_t sort)
Specify the sorting desired for this query.
- notmuch_status_to_string
const(char)* notmuch_status_to_string(notmuch_status_t status)
Get a string representation of a notmuch_status_t value.
- notmuch_tags_destroy
void notmuch_tags_destroy(notmuch_tags_t* tags)
Destroy a notmuch_tags_t object.
- notmuch_tags_get
const(char)* notmuch_tags_get(notmuch_tags_t* tags)
Get the current tag from 'tags' as a string.
- notmuch_tags_move_to_next
void notmuch_tags_move_to_next(notmuch_tags_t* tags)
Move the 'tags' iterator to the next tag.
- notmuch_tags_valid
notmuch_bool_t notmuch_tags_valid(notmuch_tags_t* tags)
Is the given 'tags' iterator pointing at a valid tag.
- notmuch_thread_destroy
void notmuch_thread_destroy(notmuch_thread_t* thread)
Destroy a notmuch_thread_t object.
- notmuch_thread_get_authors
const(char)* notmuch_thread_get_authors(notmuch_thread_t* thread)
Get the authors of 'thread' as a UTF-8 string.
- notmuch_thread_get_matched_messages
int notmuch_thread_get_matched_messages(notmuch_thread_t* thread)
Get the number of messages in 'thread' that matched the search.
- notmuch_thread_get_messages
notmuch_messages_t* notmuch_thread_get_messages(notmuch_thread_t* thread)
Get a notmuch_thread_t iterator for all messages in 'thread' in
oldest-first order.
- notmuch_thread_get_newest_date
time_t notmuch_thread_get_newest_date(notmuch_thread_t* thread)
Get the date of the newest message in 'thread' as a time_t value.
- notmuch_thread_get_oldest_date
time_t notmuch_thread_get_oldest_date(notmuch_thread_t* thread)
Get the date of the oldest message in 'thread' as a time_t value.
- notmuch_thread_get_subject
const(char)* notmuch_thread_get_subject(notmuch_thread_t* thread)
Get the subject of 'thread' as a UTF-8 string.
- notmuch_thread_get_tags
notmuch_tags_t* notmuch_thread_get_tags(notmuch_thread_t* thread)
Get the tags for 'thread', returning a notmuch_tags_t object which
can be used to iterate over all tags.
- notmuch_thread_get_thread_id
const(char)* notmuch_thread_get_thread_id(notmuch_thread_t* thread)
Get the thread ID of 'thread'.
- notmuch_thread_get_toplevel_messages
notmuch_messages_t* notmuch_thread_get_toplevel_messages(notmuch_thread_t* thread)
Get a notmuch_messages_t iterator for the top-level messages in
'thread' in oldest-first order.
- notmuch_thread_get_total_messages
int notmuch_thread_get_total_messages(notmuch_thread_t* thread)
Get the total number of messages in 'thread'.
- notmuch_threads_destroy
void notmuch_threads_destroy(notmuch_threads_t* threads)
Destroy a notmuch_threads_t object.
- notmuch_threads_get
notmuch_thread_t* notmuch_threads_get(notmuch_threads_t* threads)
Get the current thread from 'threads' as a notmuch_thread_t.
- notmuch_threads_move_to_next
void notmuch_threads_move_to_next(notmuch_threads_t* threads)
Move the 'threads' iterator to the next thread.
- notmuch_threads_valid
notmuch_bool_t notmuch_threads_valid(notmuch_threads_t* threads)
Is the given 'threads' iterator pointing at a valid thread.