From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [rfc patch v2 1/5] lib: add definitions for notmuch_param_t
Date: Sun, 2 Apr 2017 10:16:42 -0300 [thread overview]
Message-ID: <20170402131646.29884-2-david@tethera.net> (raw)
In-Reply-To: <20170402131646.29884-1-david@tethera.net>
This is not an opaque struct because we envision using static
initialization much like the command-line-options.h structures.
---
lib/notmuch.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/lib/notmuch.h b/lib/notmuch.h
index d374dc96..fc00f96d 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -219,6 +219,23 @@ typedef struct _notmuch_filenames notmuch_filenames_t;
typedef struct _notmuch_config_list notmuch_config_list_t;
#endif /* __DOXYGEN__ */
+enum notmuch_param_type {
+ NOTMUCH_PARAM_END = 0,
+ NOTMUCH_PARAM_BOOLEAN,
+ NOTMUCH_PARAM_INT,
+ NOTMUCH_PARAM_STRING
+};
+
+typedef struct notmuch_param_desc {
+ enum notmuch_param_type param_type;
+ int key;
+ union {
+ notmuch_bool_t bool_val;
+ int int_val;
+ const char *string_val;
+ };
+} notmuch_param_t;
+
/**
* Create a new, empty notmuch database located at 'path'.
*
--
2.11.0
next prev parent reply other threads:[~2017-04-02 13:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-02 13:16 second round of indexing all files David Bremner
2017-04-02 13:16 ` David Bremner [this message]
2017-04-02 13:16 ` [rfc patch v2 2/5] added notmuch_message_reindex David Bremner
2017-04-02 13:16 ` [rfc patch v2 3/5] add "notmuch reindex" subcommand David Bremner
2017-04-02 13:16 ` [rfc patch v2 4/5] test: add known broken test for duplicate message id David Bremner
2017-04-02 13:16 ` [rfc patch v2 5/5] lib: index message files with duplicate message-ids David Bremner
2017-04-04 1:47 ` third round of indexing all files David Bremner
2017-04-04 1:47 ` [rfc patch v3 1/6] lib: add definitions for notmuch_param_t David Bremner
2017-04-04 1:47 ` [rfc patch v3 2/6] lib: add _notmuch_message_remove_indexed_terms David Bremner
2017-04-04 1:47 ` [rfc patch v3 3/6] added notmuch_message_reindex David Bremner
2017-04-04 1:47 ` [rfc patch v3 4/6] add "notmuch reindex" subcommand David Bremner
2017-04-04 1:47 ` [rfc patch v3 5/6] test: add known broken test for duplicate message id David Bremner
2017-04-04 1:47 ` [rfc patch v3 6/6] lib: index message files with duplicate message-ids David Bremner
2017-04-04 11:10 ` third round of indexing all files David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170402131646.29884-2-david@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).