X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fruby%2Fmessage.c;h=1b2c01ef4cbfb79cb02b1305e2397644159540f6;hp=f97e1a4ef1f0f04bad3ed4a1941eb5aeb4bb39fd;hb=02369d031c1499e015db1736bd259d314d39b8cf;hpb=5c9e385591b66fa20cbb186393c48c52831a23b7 diff --git a/bindings/ruby/message.c b/bindings/ruby/message.c index f97e1a4e..1b2c01ef 100644 --- a/bindings/ruby/message.c +++ b/bindings/ruby/message.c @@ -283,6 +283,44 @@ notmuch_rb_message_remove_all_tags(VALUE self) return Qtrue; } +/* + * call-seq: MESSAGE.maildir_flags_to_tags => true + * + * Add/remove tags according to maildir flags in the message filename(s) + */ +VALUE +notmuch_rb_message_maildir_flags_to_tags(VALUE self) +{ + notmuch_status_t ret; + notmuch_message_t *message; + + Data_Get_Notmuch_Message(self, message); + + ret = notmuch_message_maildir_flags_to_tags(message); + notmuch_rb_status_raise(ret); + + return Qtrue; +} + +/* + * call-seq: MESSAGE.tags_to_maildir_flags => true + * + * Rename message filename(s) to encode tags as maildir flags + */ +VALUE +notmuch_rb_message_tags_to_maildir_flags(VALUE self) +{ + notmuch_status_t ret; + notmuch_message_t *message; + + Data_Get_Notmuch_Message(self, message); + + ret = notmuch_message_tags_to_maildir_flags(message); + notmuch_rb_status_raise(ret); + + return Qtrue; +} + /* * call-seq: MESSAGE.freeze => true *