summaryrefslogtreecommitdiffstats
path: root/mailnews/base/src/nsMsgSpecialViews.h
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-03 00:17:46 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-11-03 00:17:46 -0400
commit302bf1b523012e11b60425d6eee1221ebc2724eb (patch)
treeb191a895f8716efcbe42f454f37597a545a6f421 /mailnews/base/src/nsMsgSpecialViews.h
parent21b3f6247403c06f85e1f45d219f87549862198f (diff)
downloadUXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar
UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.gz
UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.lz
UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.xz
UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.zip
Issue #1258 - Part 1: Import mailnews, ldap, and mork from comm-esr52.9.1
Diffstat (limited to 'mailnews/base/src/nsMsgSpecialViews.h')
-rw-r--r--mailnews/base/src/nsMsgSpecialViews.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/mailnews/base/src/nsMsgSpecialViews.h b/mailnews/base/src/nsMsgSpecialViews.h
new file mode 100644
index 000000000..8f3757a35
--- /dev/null
+++ b/mailnews/base/src/nsMsgSpecialViews.h
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef _nsMsgSpecialViews_H_
+#define _nsMsgSpecialViews_H_
+
+#include "mozilla/Attributes.h"
+#include "nsMsgThreadedDBView.h"
+
+class nsMsgThreadsWithUnreadDBView : public nsMsgThreadedDBView
+{
+public:
+ nsMsgThreadsWithUnreadDBView();
+ virtual ~nsMsgThreadsWithUnreadDBView();
+ virtual const char * GetViewName(void) override {return "ThreadsWithUnreadView"; }
+ NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCommandUpdater, nsIMsgDBView **_retval) override;
+ NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
+ NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs) override;
+
+virtual bool WantsThisThread(nsIMsgThread *threadHdr) override;
+protected:
+ virtual nsresult AddMsgToThreadNotInView(nsIMsgThread *threadHdr, nsIMsgDBHdr *msgHdr, bool ensureListed) override;
+ uint32_t m_totalUnwantedMessagesInView;
+};
+
+class nsMsgWatchedThreadsWithUnreadDBView : public nsMsgThreadedDBView
+{
+public:
+ nsMsgWatchedThreadsWithUnreadDBView ();
+ NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
+ NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow,
+ nsIMsgDBViewCommandUpdater *aCommandUpdater,
+ nsIMsgDBView **_retval) override;
+ NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs) override;
+ virtual const char *GetViewName(void) override { return "WatchedThreadsWithUnreadView"; }
+ virtual bool WantsThisThread(nsIMsgThread *threadHdr) override;
+protected:
+ virtual nsresult AddMsgToThreadNotInView(nsIMsgThread *threadHdr, nsIMsgDBHdr *msgHdr, bool ensureListed) override;
+ uint32_t m_totalUnwantedMessagesInView;
+
+};
+#ifdef DOING_CACHELESS_VIEW
+// This view will initially be used for cacheless IMAP.
+class nsMsgCachelessView : public nsMsgDBView
+{
+public:
+ nsMsgCachelessView();
+ NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType);
+ virtual ~nsMsgCachelessView();
+ virtual const char * GetViewName(void) {return "nsMsgCachelessView"; }
+ NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue viewType, int32_t *count);
+ nsresult SetViewSize(int32_t setSize); // Override
+ virtual nsresult AddNewMessages() ;
+ virtual nsresult AddHdr(nsIMsgDBHdr *msgHdr);
+ // for news, xover line, potentially, for IMAP, imap line...
+ virtual nsresult AddHdrFromServerLine(char *line, nsMsgKey *msgId) ;
+ virtual void SetInitialSortState(void);
+ virtual nsresult Init(uint32_t *pCount);
+protected:
+ void ClearPendingIds();
+
+ nsIMsgFolder *m_folder;
+ nsMsgViewIndex m_curStartSeq;
+ nsMsgViewIndex m_curEndSeq;
+ bool m_sizeInitialized;
+};
+
+#endif /* DOING_CACHELESS_VIEW */
+#endif