notmuch/lib
Daniel Kahn Gillmor b10ce6bc23 database: add n_d_index_file (deprecates n_d_add_message)
We need a way to pass parameters to the indexing functionality on the
first index, not just on reindexing.  The obvious place is in
notmuch_database_add_message.  But since modifying the argument list
would break both API and ABI, we needed a new name.

I considered notmuch_database_add_message_with_params(), but the
functionality we're talking about doesn't always add a message.  It
tries to index a specific file, possibly adding a message, but
possibly doing other things, like adding terms to an existing message,
or failing to deal with message objects entirely (e.g. because the
file didn't contain a message).

So i chose the function name notmuch_database_index_file.

I confess i'm a little concerned about confusing future notmuch
developers with the new name, since we already have a private
_notmuch_message_index_file function, and the two do rather different
things.  But i think the added clarity for people linking against the
future libnotmuch and the capacity for using index parameters makes
this a worthwhile tradeoff.  (that said, if anyone has another name
that they strongly prefer, i'd be happy to go with it)

This changeset also adjusts the tests so that we test whether the new,
preferred function returns bad values (since the deprecated function
just calls the new one).

We can keep the deprecated n_d_add_message function around as long as
we like, but at the next place where we're forced to break API or ABI
we can probably choose to drop the name relatively safely.

NOTE: there is probably more cleanup to do in the ruby and go bindings
to complete the deprecation directly.  I don't know those languages
well enough to attempt a fix; i don't know how to test them; and i
don't know the culture around those languages about API additions or
deprecations.
2017-08-23 07:38:37 -03:00
..
add-message.cc database: add n_d_index_file (deprecates n_d_add_message) 2017-08-23 07:38:37 -03:00
built-with.c lib: add built_with handling for XAPIAN_DB_RETRY_LOCK 2016-06-29 09:05:49 +02:00
config.cc Use https instead of http where possible 2016-06-05 08:32:17 -03:00
database-private.h lib: isolate n_d_add_message and helper functions into own file 2017-08-01 21:17:47 -04:00
database.cc database: move striping of trailing '/' into helper function 2017-08-22 18:47:51 -03:00
directory.cc lib: update cached mtime in notmuch_directory_set_mtime 2016-08-23 20:58:46 -03:00
filenames.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
index.cc lib: paper over allocation difference 2017-07-14 21:23:52 -03:00
Makefile fix sum moar typos [build scripts, Makefiles] 2011-06-23 15:44:59 -07:00
Makefile.local lib: factor out message-id parsing to separate file. 2017-08-01 21:17:47 -04:00
message-file.c lib: refactor notmuch_database_add_message header parsing 2017-08-01 21:17:47 -04:00
message-id.c lib: factor out message-id parsing to separate file. 2017-08-01 21:17:47 -04:00
message-private.h lib: basic message-property API 2016-09-21 18:14:24 -03:00
message-property.cc Replace index(3) with strchr(3) 2017-04-20 06:59:22 -03:00
message.cc lib: add notmuch_message_reindex 2017-08-01 21:17:47 -04:00
messages.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
notmuch-private.h lib: add notmuch_message_reindex 2017-08-01 21:17:47 -04:00
notmuch.h database: add n_d_index_file (deprecates n_d_add_message) 2017-08-23 07:38:37 -03:00
notmuch.sym build: switch to hiding libnotmuch symbols by default 2017-05-12 07:17:18 -03:00
parse-time-vrp.cc Use https instead of http where possible 2016-06-05 08:32:17 -03:00
parse-time-vrp.h Use https instead of http where possible 2016-06-05 08:32:17 -03:00
query-fp.cc Use https instead of http where possible 2016-06-05 08:32:17 -03:00
query-fp.h Use https instead of http where possible 2016-06-05 08:32:17 -03:00
query.cc build: visibility=default for library structs is no longer needed 2017-05-13 08:38:18 -03:00
regexp-fields.cc lib: Add regexp expansion for for tags and paths 2017-05-09 07:44:29 -03:00
regexp-fields.h lib: Add regexp searching for mid: prefix 2017-05-09 07:44:15 -03:00
sha1.c lib: use glib for sha1 digests instead of embedding libsha1 2017-01-08 10:50:38 -04:00
string-list.c lib: add notmuch_message_count_files 2017-08-01 21:17:47 -04:00
string-map.c lib: add talloc reference from string map iterator to map 2016-09-24 10:08:45 -03:00
tags.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
thread.cc lib: add notmuch_thread_get_total_files 2017-08-01 21:17:47 -04:00