nsIMsgThread 编辑

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

AttributeTypeDescription
threadKeynsMsgKeyunsigned long key designating this thread.
flagsunsigned longFlags attached to the thread.
subjectACStringSubject of the thread
newestMsgDateunsigned long 
numChildrenunsigned longReadonly: Number of messages in the thread.
numUnreadChildrenunsigned longReadonly: 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:96 次

字数:8346

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文