/* The Ruby interface to the notmuch mail library
*
- * Copyright © 2010 Ali Polatel
+ * Copyright © 2010, 2011 Ali Polatel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* Ruby extension to the <tt>notmuch</tt> mail library.
*
+ * == Classes
+ *
+ * Following are the classes that are most likely to be of interest to
+ * the user:
+ *
+ * - Notmuch::Database
+ * - Notmuch::Filenames
+ * - Notmuch::Query
+ * - Notmuch::Threads
+ * - Notmuch::Messages
+ * - Notmuch::Thread
+ * - Notmuch::Message
+ * - Notmuch::Tags
+ *
* == Constants
*
* - Notmuch::MODE_READ_ONLY
* than notmuch_message_freeze.
*/
-#define RDOC_HATE 1
void
Init_notmuch(void)
notmuch_rb_cQuery = rb_define_class_under(mod, "Query", rb_cData);
rb_undef_method(notmuch_rb_cQuery, "initialize");
rb_define_method(notmuch_rb_cQuery, "destroy", notmuch_rb_query_destroy, 0);
+ rb_define_method(notmuch_rb_cQuery, "sort", notmuch_rb_query_get_sort, 0);
rb_define_method(notmuch_rb_cQuery, "sort=", notmuch_rb_query_set_sort, 1);
+ rb_define_method(notmuch_rb_cQuery, "to_s", notmuch_rb_query_get_string, 0);
rb_define_method(notmuch_rb_cQuery, "search_threads", notmuch_rb_query_search_threads, 0);
rb_define_method(notmuch_rb_cQuery, "search_messages", notmuch_rb_query_search_messages, 0);
rb_define_method(notmuch_rb_cMessage, "thread_id", notmuch_rb_message_get_thread_id, 0);
rb_define_method(notmuch_rb_cMessage, "replies", notmuch_rb_message_get_replies, 0);
rb_define_method(notmuch_rb_cMessage, "filename", notmuch_rb_message_get_filename, 0);
+ rb_define_method(notmuch_rb_cMessage, "filenames", notmuch_rb_message_get_filenames, 0);
rb_define_method(notmuch_rb_cMessage, "get_flag", notmuch_rb_message_get_flag, 1);
rb_define_method(notmuch_rb_cMessage, "set_flag", notmuch_rb_message_set_flag, 2);
rb_define_method(notmuch_rb_cMessage, "date", notmuch_rb_message_get_date, 0);
rb_define_alias(notmuch_rb_cMessage, "<<", "add_tag");
rb_define_method(notmuch_rb_cMessage, "remove_tag", notmuch_rb_message_remove_tag, 1);
rb_define_method(notmuch_rb_cMessage, "remove_all_tags", notmuch_rb_message_remove_all_tags, 0);
+ rb_define_method(notmuch_rb_cMessage, "maildir_flags_to_tags", notmuch_rb_message_maildir_flags_to_tags, 0);
+ rb_define_method(notmuch_rb_cMessage, "tags_to_maildir_flags", notmuch_rb_message_tags_to_maildir_flags, 0);
rb_define_method(notmuch_rb_cMessage, "freeze", notmuch_rb_message_freeze, 0);
rb_define_method(notmuch_rb_cMessage, "thaw", notmuch_rb_message_thaw, 0);