+typedef struct _notmuch_message_node {
+ notmuch_message_t *message;
+ struct _notmuch_message_node *next;
+} notmuch_message_node_t;
+
+typedef struct _notmuch_message_list {
+ notmuch_message_node_t *head;
+ notmuch_message_node_t **tail;
+} notmuch_message_list_t;
+
+/* There's a rumor that there's an alternate struct _notmuch_messages
+ * somewhere with some nasty C++ objects in it. We'll try to maintain
+ * ignorance of that here. (See notmuch_mset_messages_t in query.cc)
+ */
+struct _notmuch_messages {
+ notmuch_bool_t is_of_list_type;
+ notmuch_message_node_t *iterator;
+};
+
+notmuch_message_list_t *
+_notmuch_message_list_create (const void *ctx);
+
+void
+_notmuch_message_list_append (notmuch_message_list_t *list,
+ notmuch_message_node_t *node);
+
+void
+_notmuch_message_list_add_message (notmuch_message_list_t *list,
+ notmuch_message_t *message);
+