$(dir)/sha1.c \
$(dir)/built-with.c \
$(dir)/string-map.c \
+ $(dir)/indexopts.c \
$(dir)/tags.c
libnotmuch_cxx_srcs = \
notmuch_status_t
notmuch_database_index_file (notmuch_database_t *notmuch,
const char *filename,
- notmuch_param_t unused (*indexopts),
+ notmuch_indexopts_t unused (*indexopts),
notmuch_message_t **message_ret)
{
notmuch_message_file_t *message_file;
--- /dev/null
+/* indexopts.c - options for indexing messages (currently a stub)
+ *
+ * Copyright © 2017 Daniel Kahn Gillmor
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see https://www.gnu.org/licenses/ .
+ *
+ * Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+ */
+
+#include "notmuch-private.h"
+
+notmuch_indexopts_t *
+notmuch_database_get_default_indexopts (notmuch_database_t unused (*db))
+{
+ return NULL;
+}
+
+void
+notmuch_indexopts_destroy (notmuch_indexopts_t *indexopts)
+{
+ talloc_free (indexopts);
+}
notmuch_status_t
notmuch_message_reindex (notmuch_message_t *message,
- notmuch_param_t unused (*indexopts))
+ notmuch_indexopts_t unused (*indexopts))
{
notmuch_database_t *notmuch = NULL;
notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
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__ */
/**
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);
/**
*/
notmuch_status_t
notmuch_message_reindex (notmuch_message_t *message,
- notmuch_param_t *indexopts);
+ notmuch_indexopts_t *indexopts);
/**
* Message flags.
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
*
*/
static int
reindex_query (notmuch_database_t *notmuch, const char *query_string,
- notmuch_param_t *indexopts)
+ notmuch_indexopts_t *indexopts)
{
notmuch_query_t *query;
notmuch_messages_t *messages;
struct sigaction action;
int opt_index;
int ret;
- notmuch_param_t *indexopts = NULL;
+ notmuch_indexopts_t *indexopts = NULL;
/* Set up our handler for SIGINT */
memset (&action, 0, sizeof (struct sigaction));