]> git.notmuchmail.org Git - notmuch/blobdiff - lib/notmuch.h
NEWS: NEWS for 0.28.4
[notmuch] / lib / notmuch.h
index 216b1c75354bed58d08228248adfc87ecd7b9445..247f6ad71ebf1223b32f1c2b5e226261a309ffc1 100644 (file)
@@ -1351,7 +1351,7 @@ notmuch_messages_collect_tags (notmuch_messages_t *messages);
  * @since libnotmuch 5.2 (notmuch 0.27)
  */
 notmuch_database_t *
-notmuch_message_get_database (notmuch_message_t *message);
+notmuch_message_get_database (const notmuch_message_t *message);
 
 /**
  * Get the message ID of 'message'.
@@ -1890,6 +1890,22 @@ typedef struct _notmuch_string_map_iterator notmuch_message_properties_t;
 notmuch_message_properties_t *
 notmuch_message_get_properties (notmuch_message_t *message, const char *key, notmuch_bool_t exact);
 
+/**
+ * Return the number of properties named "key" belonging to the specific message.
+ *
+ * @param[in] message  The message to examine
+ * @param[in] key      key to count
+ * @param[out] count   The number of matching properties associated with this message.
+ *
+ * @returns
+ *
+ * NOTMUCH_STATUS_SUCCESS: successful count, possibly some other error.
+ *
+ * @since libnotmuch 5.2 (notmuch 0.27)
+ */
+notmuch_status_t
+notmuch_message_count_properties (notmuch_message_t *message, const char *key, unsigned int *count);
+
 /**
  * Is the given *properties* iterator pointing at a valid (key,value)
  * pair.