def threadid(self):
"""The thread ID as a :class:`BinString`.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_thread_get_thread_id(self._thread_p)
return base.BinString.from_cffi(ret)
def __len__(self):
"""Return the number of messages in the thread.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
return capi.lib.notmuch_thread_get_total_messages(self._thread_p)
:returns: An iterator yielding :class:`Message` instances.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
msgs_p = capi.lib.notmuch_thread_get_toplevel_messages(self._thread_p)
- return message.MessageIter(self, msgs_p, db=self._db)
+ return message.MessageIter(self, msgs_p,
+ db=self._db,
+ msg_cls=message.OwnedMessage)
def __iter__(self):
"""Return an iterator over all the messages in the thread.
:returns: An iterator yielding :class:`Message` instances.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
msgs_p = capi.lib.notmuch_thread_get_messages(self._thread_p)
- return message.MessageIter(self, msgs_p, db=self._db)
+ return message.MessageIter(self, msgs_p,
+ db=self._db,
+ msg_cls=message.OwnedMessage)
@property
def matched(self):
which did directly match the search query which this thread
originates from.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
return capi.lib.notmuch_thread_get_matched_messages(self._thread_p)
:returns: The stringified list of authors.
:rtype: BinString
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_thread_get_authors(self._thread_p)
return base.BinString.from_cffi(ret)
:returns: The thread's subject.
:rtype: BinString
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
ret = capi.lib.notmuch_thread_get_subject(self._thread_p)
return base.BinString.from_cffi(ret)
The time the first message was sent as an integer number of
seconds since the *epoch*, 1 Jan 1970.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
return capi.lib.notmuch_thread_get_oldest_date(self._thread_p)
The time the last message was sent as an integer number of
seconds since the *epoch*, 1 Jan 1970.
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
return capi.lib.notmuch_thread_get_newest_date(self._thread_p)
:rtype: ImmutableTagSet
- :raises ObjectDestroyedError: if used after destoryed.
+ :raises ObjectDestroyedError: if used after destroyed.
"""
try:
ref = self._cached_tagset