nsIMsgThread

The nsIMsgFolder interface is used to interact with threads in Thunderbird.


web.html($0) is defined in wiki.template('tbsource', mediawiki.args([$1])). It is wiki.template(mediawiki.path('InterfaceStatus:Scriptable_' + $4, "en")) and wiki.template(mediawiki.path('InterfaceStatus:' + $2, "en"), mediawiki.args([$3])).

Inherits from: nsISupports

Method overview

void addChild(in nsIMsgDBHdr child, in nsIMsgDBHdr inReplyTo, in boolean threadInThread, in nsIDBChangeAnnouncer announcer);
nsIMsgDBHdr getChildAt(in long index);
nsMsgKey getChildKeyAt(in long index);
nsIMsgDBHdr getChild(in nsMsgKey msgKey);
nsIMsgDBHdr getChildHdrAt(in long index);
nsIMsgDBHdr getRootHdr(out long index);
void removeChildAt(in long index);
void removeChildHdr(in nsIMsgDBHdr child, in nsIDBChangeAnnouncer announcer);
void markChildRead(in boolean bRead);
nsIMsgDBHdr getFirstUnreadChild();
nsISimpleEnumerator enumerateMessages(in nsMsgKey parent);

Attributes

Attribute Type Description
threadKey nsMsgKey unsigned long key designating this thread.
flags unsigned long Flags attached to the thread.
subject ACString Subject of the thread
newestMsgDate unsigned long
numChildren unsigned long Readonly: Number of messages in the thread.
numUnreadChildren unsigned long Readonly: Number of unread messages in the thread.

Methods

addChild()

Add a message to the thread.

 void addChild(in nsIMsgDBHdr child,
               in nsIMsgDBHdr inReplyTo,
               in boolean threadInThread,
               in nsIDBChangeAnnouncer announcer);
Parameters
<tt>child</tt>
The message to add
<tt>inReplyTo</tt>
The message this should be in reply to
<tt>threadInThread</tt>
<tt>announcer</tt>
An nsIDBChangeAnnouncer to receive notification when the change is made.

getChildAt()

Returns the message at an index.

 nsIMsgDBHdr getChildAt(in long index);
Parameters
<tt>index</tt>
The index to get the message from

getChildKeyAt()

 nsMsgKey getChildKeyAt(in long index);
Parameters
<tt>index</tt>
The index to get the key from

getChild()

 nsIMsgDBHdr getChild(in nsMsgKey msgKey);
Parameters
<tt>msgKey</tt>
The index to get the key from

getChildHdrAt()

 nsIMsgDBHdr getChildHdrAt(in long index);
Parameters
<tt>index</tt>
The index to get the message from.

getRootHdr()

 nsIMsgDBHdr getRootHdr(out long index);
Return
<tt>index</tt>
Changed to the index of the root.

removeChildAt()

 void removeChildAt(in long index);
Parameters
<tt>index</tt>
The index to remove the message from

removeChildHdr()

 void removeChildHdr(in nsIMsgDBHdr child, in nsIDBChangeAnnouncer announcer);
Parameters
<tt>child</tt>
The message to remove
<tt>announcer</tt>
An nsIDBChangeAnnouncer to receive notification when the change is made.

markChildRead()

 void markChildRead(in boolean bRead);
Parameters
<tt>bRead</tt>
true if the messages should be marked read. false if unread.

getFirstUnreadChild()

 nsIMsgDBHdr getFirstUnreadChild();

enumerateMessages()

 nsISimpleEnumerator enumerateMessages(in nsMsgKey parent);
Parameters
parent
A key representing the message to start enumerating with.

Document Tags and Contributors

Contributors to this page: Wjjohnst, Sheppy
Last updated by: Sheppy,