lib: Add new, public notmuch_message_get_filenames
authorCarl Worth <cworth@cworth.org>
Thu, 11 Nov 2010 08:07:24 +0000 (00:07 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 11 Nov 2010 11:40:19 +0000 (03:40 -0800)
commit1d02dd64afe245a2b5a8461feeba975e61f0c233
tree53ac99ecf481c27709e2d0f26b9c7d8d6d246b02
parentd87db8843266caf6b11c1f2f1874328830b23878
lib: Add new, public notmuch_message_get_filenames

This augments the existing notmuch_message_get_filename by allowing
the caller access to all filenames in the case of multiple files for a
single message.

To support this, we split the iterator (notmuch_filenames_t) away from
the list storage (notmuch_filename_list_t) where previously these were
a single object (notmuch_filenames_t). Then, whenever the user asks
for a file or filename, the message object lazily creates a complete
notmuch_filename_list_t and then:

For notmuch_message_get_filename, returns the first filename
in the list.

For notmuch_message_get_filenames, creates and returns a new
iterator for the filename list.
lib/directory.cc
lib/filenames.c
lib/message.cc
lib/notmuch-private.h
lib/notmuch.h