aboutsummaryrefslogtreecommitdiffhomepage
path: root/message.cc
Commit message (Collapse)AuthorAge
* Add notmuch_message_add_tag and notmuch_message_remove_tagGravatar Carl Worth2009-10-21
| | | | | With these two added, we now have enough functionality in the library to implement "notmuch restore".
* notmuch_message_get_message_id: Fix to cache resultGravatar Carl Worth2009-10-21
| | | | | | | | | Previously, this would allocate new memory with every call. That was with talloc, of course, so there wasn't any leaking (eventually). But since we're now calling this internally we want to be a little less wasteful. It's easy enough to just stash the result into the message on the first call, and then just return that on subsequent calls.
* database: Add new notmuch_database_find_messageGravatar Carl Worth2009-10-21
| | | | | | | With this function, and the recently added support for notmuch_message_get_thread_ids, we now recode the find_thread_ids function to work just the way we expect a user of the public notmuch API to work. Not too bad really.
* Add notmuch_message_get_thread_ids functionGravatar Carl Worth2009-10-21
| | | | | | Along with all of the notmuch_thread_ids_t iterator functions. Using a consistent idiom seems better here rather than returning a comma-separated string and forcing the user to parse it.
* Move find_prefix function from database.cc to message.ccGravatar Carl Worth2009-10-21
| | | | | | It's definitely a better fit there for now, (and can likely eventually be made static as add_term moves from database to message as well).
* Add destroy functions for results, message, and tags.Gravatar Carl Worth2009-10-20
| | | | | | | | | | | | None of these are strictly necessary, (everything was leak-free without them), but notmuch_message_destroy can actually be useful for when one query has many message results, but only one is needed to be live at a time. The destroy functions for results and tags are fairly gratuitous, as there's unlikely to be any benefit from calling them. But they're all easy to add, (all of these functions are just wrappers for talloc_free), and we do so for consistency and completeness.
* Rename our talloc destructor functions to _destructor.Gravatar Carl Worth2009-10-20
| | | | | I want to reserve the _destroy names for some public functions I'm about to add.
* Implement 'notmuch dump'.Gravatar Carl Worth2009-10-20
This is a fairly big milestone for notmuch. It's our first command to do anything besides building the index, so it proves we can actually read valid results out from the index. It also puts in place almost all of the API and infrastructure we will need to allow searching of the database. Finally, with this change we are now using talloc inside of notmuch which is truly a delight to use. And now that I figured out how to use C++ objects with talloc allocation, (it requires grotty parts of C++ such as "placement new" and "explicit destructors"), we are valgrind-clean for "notmuch dump", (as in "no leaks are possible").