]> git.notmuchmail.org Git - notmuch/blobdiff - lib/notmuch.h
properties: add notmuch_message_remove_all_properties_with_prefix()
[notmuch] / lib / notmuch.h
index 669e01b120b3cbbd797389f5f7f2e63e116e5e72..89afb6d9b0b1ff14b20e5e1bdbf9ed1cd75b1895 100644 (file)
@@ -1823,6 +1823,22 @@ notmuch_message_remove_property (notmuch_message_t *message, const char *key, co
 notmuch_status_t
 notmuch_message_remove_all_properties (notmuch_message_t *message, const char *key);
 
+/**
+ * Remove all (prefix*,value) pairs from the given message
+ *
+ * @param[in,out] message  message to operate on.
+ * @param[in]     prefix   delete properties with keys that start with prefix.
+ *                        If NULL, delete all properties
+ * @returns
+ * - NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in
+ *   read-only mode so message cannot be modified.
+ * - NOTMUCH_STATUS_SUCCESS: No error occured.
+ *
+ * @since libnotmuch 5.1 (notmuch 0.26)
+ */
+notmuch_status_t
+notmuch_message_remove_all_properties_with_prefix (notmuch_message_t *message, const char *prefix);
+
 /**
  * Opaque message property iterator
  */