X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=lib%2Fnotmuch.h;h=a8981c5c0e38f1c469feb1aa2689e4eeade1dacf;hb=499bb78178df86ceae82893fbc272c4dd1870b6c;hp=216b1c75354bed58d08228248adfc87ecd7b9445;hpb=4a6371f1d80aec5947b41d7c4e1fdb60cca3c55d;p=notmuch diff --git a/lib/notmuch.h b/lib/notmuch.h index 216b1c75..a8981c5c 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -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.