]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/ruby/init.c
ruby: Add list of classes to main documentation
[notmuch] / bindings / ruby / init.c
index e19b0356ffc08c874f009a257608beb09d95e36b..0a3945151b213a8f58e9a6e1bd411ba5c97de4e2 100644 (file)
@@ -1,6 +1,6 @@
 /* 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)
@@ -224,7 +237,9 @@ 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);
 
@@ -261,6 +276,7 @@ Init_notmuch(void)
     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);
@@ -271,6 +287,8 @@ Init_notmuch(void)
     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);