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

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
child
The message to add
inReplyTo
The message this should be in reply to
threadInThread
 
announcer
An nsIDBChangeAnnouncer to receive notification when the change is made.

getChildAt()

Returns the message at an index.

 nsIMsgDBHdr getChildAt(in long index);
Parameters
index
The index to get the message from

getChildKeyAt()

 nsMsgKey getChildKeyAt(in long index);
Parameters
index
The index to get the key from

getChild()

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

getChildHdrAt()

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

getRootHdr()

 nsIMsgDBHdr getRootHdr(out long index);
Return
index
Changed to the index of the root.

removeChildAt()

 void removeChildAt(in long index);
Parameters
index
The index to remove the message from

removeChildHdr()

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

markChildRead()

 void markChildRead(in boolean bRead);
Parameters
bRead
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.