aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-private.h
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-private.h: Move NOTMUCH_BEGIN_DECLS earlierGravatar Carl Worth2009-10-21
| | | | | | | We actually need this before the include of xutil.h, but it was previously stuck randomly among various system includes. Instead, put it at the top, right after include the notmuch.h header that defines it.
* 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.
* Rename NOTMUCH_MAX_TERM to NOTMUCH_TERM_MAXGravatar Carl Worth2009-10-21
| | | | Just better consistency with our naming schemes.
* 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).
* Move declarations for xutil.c from notmuch-private to new xutil.h.Gravatar Carl Worth2009-10-21
| | | | | | | The motivation here is that our top-level notmuch.c main program wants to start using these, but we don't want it to see into notmuch-private.h, (since our main program is a test vehicle for the "public" notmuch interface in notmuch.h).
* notmuch dump: Fix the sorting of results.Gravatar Carl Worth2009-10-21
| | | | | | | | | | | | | To properly support sorting in notmuch_query we know use an Enquire object. We also throw in a QueryParser too, so we're really close to being able to support arbitrary full-text searches. I took a look at the supported QueryParser syntax and chose a set of flags for everything I like, (such as supporting Boolean operators in either case ("AND" or "and"), supporting phrase searching, supporting + and - to include/preclude terms, and supporting a trailing * on any term as a wildcard).
* 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").
* Rename private notmuch_message_t to notmuch_message_file_tGravatar Carl Worth2009-10-20
| | | | | | | | | This is in preparation for a new, public notmuch_message_t. Eventually, the public notmuch_message_t is going to grow enough features to need to be file-backed and will likely need everything that's now in message-file.c. So we may fold these back into one object/implementation in the future.
* Protect definition of _GNU_SOURCE.Gravatar Carl Worth2009-10-19
| | | | | I was getting a duplicate definition of this from somewhere, so getting compiler warnings without this protection.
* Rework message parsing to use getline rather than mmap.Gravatar Carl Worth2009-10-19
| | | | | | | The line-based parsing can be a bit awkward when wanting to peek ahead, (say, for folded header values), but it's so convenient to be able to trust that a string terminator exists on every line so it cleans up the code considerably.
* notmuch: Switch from gmime to custom, ad-hoc parsing of headers.Gravatar Carl Worth2009-10-19
| | | | | | | | | | | Since we're currently just trying to stitch together In-Reply-To and References headers we don't need that much sophistication. It's when we later add full-text searching that GMime will be useful. So for now, even though my own code here is surely very buggy compared to GMime it's also a lot faster. And speed is what we're after for the initial index creation.
* notmuch: Start actually adding messages to the index.Gravatar Carl Worth2009-10-18
This is the beginning of the notmuch library as well, with its interface in notmuch.h. So far we've got create, open, close, and add_message (all with a notmuch_database prefix). The current add_message function has already been whittled down from what we have in notmuch-index-message to add only references, message-id, and thread-id to the index, (that is---just enough to do thread-linkage but nothing for full-text searching). The concept here is to do something quickly so that the user can get some data into notmuch and start using it. (The most interesting stuff is then thread-linkage and labels like inbox and unread.) We can defer the full-text indexing of the body of the messages for later, (such as in the background while the user is reading mail). The initial thread-stitching step is still slower than I would like. We may have to stop using libgmime for this step as its overhead is not worth it for the simple case of just parsing the message-id, references, and in-reply-to headers.