summaryrefslogtreecommitdiffstats
path: root/mailnews/db/msgdb/public
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-11 00:00:30 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-11 00:00:30 -0500
commit31fea2bc2b99c1c5008a41c02c78f921d3fa1c62 (patch)
tree87c6436ad39590985f175cba9f3b7c0d64c3bbad /mailnews/db/msgdb/public
parent3d9db9cb381f7e4461708d844cc958cb65a04e56 (diff)
downloadUXP-31fea2bc2b99c1c5008a41c02c78f921d3fa1c62.tar
UXP-31fea2bc2b99c1c5008a41c02c78f921d3fa1c62.tar.gz
UXP-31fea2bc2b99c1c5008a41c02c78f921d3fa1c62.tar.lz
UXP-31fea2bc2b99c1c5008a41c02c78f921d3fa1c62.tar.xz
UXP-31fea2bc2b99c1c5008a41c02c78f921d3fa1c62.zip
Bug 1508054 - reduce exposed API of nsMsgHdr.
Tag #1273
Diffstat (limited to 'mailnews/db/msgdb/public')
-rw-r--r--mailnews/db/msgdb/public/nsMsgHdr.h44
1 files changed, 27 insertions, 17 deletions
diff --git a/mailnews/db/msgdb/public/nsMsgHdr.h b/mailnews/db/msgdb/public/nsMsgHdr.h
index 6d23e7b49..23e2d083f 100644
--- a/mailnews/db/msgdb/public/nsMsgHdr.h
+++ b/mailnews/db/msgdb/public/nsMsgHdr.h
@@ -20,27 +20,18 @@ class nsIMsgThread;
class nsMsgHdr : public nsIMsgDBHdr {
public:
NS_DECL_NSIMSGDBHDR
- friend class nsMsgDatabase;
- friend class nsMsgPropertyEnumerator; // accesses m_mdb
+ friend class nsMsgDatabase;
+ friend class nsImapMailDatabase;
+ friend class nsMsgPropertyEnumerator;
+ friend class nsMsgThread;
+
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
// nsMsgHdr methods:
nsMsgHdr(nsMsgDatabase *db, nsIMdbRow *dbRow);
- virtual nsresult GetRawFlags(uint32_t *result);
- void Init();
- virtual nsresult InitCachedValues();
- virtual nsresult InitFlags();
- void ClearCachedValues() {m_initedValues = 0;}
-
NS_DECL_ISUPPORTS
- nsIMdbRow *GetMDBRow() {return m_mdbRow;}
- bool IsParentOf(nsIMsgDBHdr *possibleChild);
- bool IsAncestorOf(nsIMsgDBHdr *possibleChild);
- bool IsAncestorKilled(uint32_t ancestorsToCheck);
- void ReparentInThread(nsIMsgThread *thread);
-
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOfFun) const
{
return m_references.ShallowSizeOfExcludingThis(aMallocSizeOfFun);
@@ -51,7 +42,26 @@ public:
}
protected:
- virtual ~nsMsgHdr();
+ nsIMdbRow* GetMDBRow() { return m_mdbRow; }
+ void ReleaseMDBRow() { NS_IF_RELEASE(m_mdbRow); }
+ nsMsgDatabase* GetMdb() { return m_mdb; }
+ void ClearCachedValues() { m_initedValues = 0; }
+
+ virtual nsresult GetRawFlags(uint32_t *result);
+
+ bool IsParentOf(nsIMsgDBHdr *possibleChild);
+ bool IsAncestorOf(nsIMsgDBHdr *possibleChild);
+
+private:
+ virtual ~nsMsgHdr();
+
+ void Init();
+ virtual nsresult InitFlags();
+ virtual nsresult InitCachedValues();
+
+ bool IsAncestorKilled(uint32_t ancestorsToCheck);
+ void ReparentInThread(nsIMsgThread *thread);
+
nsresult SetStringColumn(const char *str, mdb_token token);
nsresult SetUInt32Column(uint32_t value, mdb_token token);
nsresult GetUInt32Column(mdb_token token, uint32_t *pvalue, uint32_t defaultValue = 0);
@@ -64,11 +74,11 @@ protected:
bool acceptNonDelimitedReferences);
nsMsgKey m_threadId;
- nsMsgKey m_messageKey; //news: article number, mail mbox offset, imap uid...
+ nsMsgKey m_messageKey; // news: article number, local mail: key, imap: uid...
nsMsgKey m_threadParent; // message this is a reply to, in thread.
PRTime m_date;
uint32_t m_messageSize; // lines for news articles, bytes for mail messages
- uint32_t m_statusOffset; // offset in a local mail message of the mozilla status hdr
+ uint32_t m_statusOffset; // offset in a local mail message of the x-mozilla-status header
uint32_t m_flags;
// avoid parsing references every time we want one
nsTArray<nsCString> m_references;