From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 092BA6DE0B78 for ; Mon, 3 Apr 2017 18:47:48 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.005 X-Spam-Level: X-Spam-Status: No, score=-0.005 tagged_above=-999 required=5 tests=[AWL=0.006, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IQgGoeKTW0e8 for ; Mon, 3 Apr 2017 18:47:47 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 717516DE0999 for ; Mon, 3 Apr 2017 18:47:47 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1cvDYj-0006Rd-Ir; Mon, 03 Apr 2017 21:47:01 -0400 Received: (nullmailer pid 26082 invoked by uid 1000); Tue, 04 Apr 2017 01:47:42 -0000 From: David Bremner To: David Bremner , notmuch@notmuchmail.org Subject: [rfc patch v3 1/6] lib: add definitions for notmuch_param_t Date: Mon, 3 Apr 2017 22:47:33 -0300 Message-Id: <20170404014738.25963-2-david@tethera.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170404014738.25963-1-david@tethera.net> References: <20170402131646.29884-1-david@tethera.net> <20170404014738.25963-1-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Apr 2017 01:47:48 -0000 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