|
本帖最后由 hechengjin 于 2015-11-1 23:38 编辑
- 已读:
- //////////////界面点选中邮件,自动标志为已读的流程///////////////
- messenger.xul
- onselect="ThreadPaneSelectionChanged();"
- function ThreadPaneSelectionChanged()
- {
- GetThreadTree().view.selectionChanged();
- }
- .\mailnews\base\src\nsMsgDBView.cpp
- NS_IMETHODIMP nsMsgDBView::SelectionChanged()
- {
- ????
- }
- nsImapMailFolder::MarkMessagesRead(nsIArray *messages, bool markRead)
- {
- StoreImapFlags(kImapMsgSeenFlag, markRead, keysToMarkRead.Elements(), keysToMarkRead.Length(), nullptr);
- }
- nsImapMailFolder::StoreImapFlags(int32_t flags, bool addFlags,
- {
- imapService->AddMessageFlags(this, aUrlListener ? aUrlListener : this,
- nullptr, msgIds, flags, true);
- }
- nsImapService::AddMessageFlags(nsIMsgFolder *aImapMailFolder,
- {
- return DiddleFlags(aImapMailFolder, aUrlListener, aURL, messageIdentifierList,
- "addmsgflags", flags, messageIdsAreUID);
- }
- nsImapService::DiddleFlags(nsIMsgFolder *aImapMailFolder,
- {
- nsresult rv = CreateStartOfImapUrl(EmptyCString(), getter_AddRefs(imapUrl),
- rv = uri->SetSpec(urlSpec);
- }
- nsImapUrl::SetSpec(const nsACString &aSpec)
- {
- rv = ParseUrl();
- }
- nsresult nsImapUrl::ParseUrl()
- {
- ParseImapPart(unescapedImapPartOfUrl.BeginWriting()+1);
- }
- ??????????
- nsImapProtocol::Run()
- nsImapProtocol::ImapThreadMainLoop()
- nsImapProtocol::ProcessCurrentURL()
- nsImapProtocol::ProcessSelectedStateURL()
- nsImapProtocol::ProcessStoreFlags(...)
- {
- if (flags & kImapMsgSeenFlag && kImapMsgSeenFlag & settableFlags)
- flagString .Append("\\Seen ");
- }
- nsImapProtocol::Store(const nsCString &messageList, const char * messageData,
- {
- 12 uid store 28 +Flags (\Seen)
- }
- ---------------------------------
- > xul.dll!nsMsgDBView::OnHdrFlagsChanged(nsIMsgDBHdr * aHdrChanged, unsigned int aOldFlags, unsigned int aNewFlags, nsIDBChangeListener * aInstigator) Line 5950 C++
- xul.dll!nsMsgGroupView::OnHdrFlagsChanged(nsIMsgDBHdr * aHdrChanged, unsigned int aOldFlags, unsigned int aNewFlags, nsIDBChangeListener * aInstigator) Line 614 C++
- xul.dll!nsMsgDatabase::NotifyHdrChangeAll(nsIMsgDBHdr * aHdrChanged, unsigned int aOldFlags, unsigned int aNewFlags, nsIDBChangeListener * aInstigator) Line 837 C++
- xul.dll!nsMsgDatabase::MarkHdrReadInDB(nsIMsgDBHdr * msgHdr, bool bRead, nsIDBChangeListener * instigator) Line 2134 C++
- xul.dll!nsMsgDatabase::MarkHdrRead(nsIMsgDBHdr * msgHdr, bool bRead, nsIDBChangeListener * instigator) Line 2574 C++
- xul.dll!nsMsgDatabase::MarkRead(unsigned int key, bool bRead, nsIDBChangeListener * instigator) Line 2148 C++
- xul.dll!nsMsgHdr::MarkRead(bool bRead) Line 228 C++
- xul.dll!nsMsgDBFolder::MarkMessagesRead(nsIArray * messages, bool markRead) Line 4685 C++
- xul.dll!nsImapMailFolder::MarkMessagesRead(nsIArray * messages, bool markRead) Line 1885 C++
- /////////////////////未读/////////////////
- ///web标志为未读后,客户端的更新流程
- nsIDBChangeListener.idl
- nsMsgDBView::OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags, //数据库变化通知界面
- {
- }
- nsImapMailFolder::SyncFlags(nsIImapFlagAndUidState *flagState) //分析网络返回设置邮件标志
- {
- flagState->GetNumberOfMessages(&messageIndex); //获取返回的邮件数量
- for (int32_t flagIndex = 0; flagIndex < messageIndex; flagIndex++) //对每一个邮件分别进行设置
- {
- flagState->GetUidOfMessage(flagIndex, &uidOfMessage); //获取消息的UID
- flagState->GetMessageFlags(flagIndex, &flags); //获取此消息的标志
-
- }
- }
- nsImapMailFolder::UpdateImapMailboxInfo(nsIImapProtocol* aProtocol, nsIMailboxSpec* aSpec)
- {
- nsCOMPtr <nsIImapFlagAndUidState> flagState;
- aSpec->GetFlagState(getter_AddRefs(flagState));
- }
- nsImapProtocol.cpp
- m_parser.SetFlagState(m_flagState);
- nsImapServerResponseParser.cpp
- void nsImapServerResponseParser::SetFlagState(nsIImapFlagAndUidState *state)
- {
- fFlagState = state;
- }
- /nsImapFlagAndUidState.cpp
- nsImapFlagAndUidState::AddUidFlagPair(uint32_t uid, imapMessageFlagsType flags, uint32_t zeroBasedIndex)
- {
- }
- DONE
- 15 OK IDLE completed
- 16 uid store 30 +Flags (\Seen)
- 16 OK UID STORE completed
- 17 IDLE
- + Waiting for DONE
- DONE
- 17 OK IDLE completed
- 18 noop
- 18 OK NOOP completed
- 19 UID fetch 32:* (FLAGS)
- * 14 FETCH (UID 31 FLAGS (\Seen))
- 19 OK UID FETCH completed
- 20 IDLE
- + Waiting for DONE
复制代码 |
|