diff options
author | Brian Smith <brian@dbsoft.org> | 2022-04-26 09:34:34 -0500 |
---|---|---|
committer | Brian Smith <brian@dbsoft.org> | 2022-04-26 10:19:00 -0500 |
commit | 378738aaa9924d0b95e2c57f27cbad2b2e644282 (patch) | |
tree | 34ce9c4ce3995576604fb4bc47d9405e661daf39 /mailnews/base/src/nsMessengerOSXIntegration.h | |
parent | 82f11ad8aaeff395629c3a3f72ece43712fd8e72 (diff) | |
download | uxp-378738aaa9924d0b95e2c57f27cbad2b2e644282.tar.gz |
Issue #1829 - Revert “Issue #1751 - Remove Mac code behind MOZ_WIDGET_TOOLKIT == 'cocoa’”
This reverts commit 1fe9c19305dadf2d5bcaa0e589fcd250389dfa8a.
Diffstat (limited to 'mailnews/base/src/nsMessengerOSXIntegration.h')
-rw-r--r-- | mailnews/base/src/nsMessengerOSXIntegration.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/mailnews/base/src/nsMessengerOSXIntegration.h b/mailnews/base/src/nsMessengerOSXIntegration.h new file mode 100644 index 0000000000..91f42f2a2a --- /dev/null +++ b/mailnews/base/src/nsMessengerOSXIntegration.h @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; 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 __nsMessengerOSXIntegration_h +#define __nsMessengerOSXIntegration_h + +#include "nsIMessengerOSIntegration.h" +#include "nsIFolderListener.h" +#include "nsIAtom.h" +#include "nsITimer.h" +#include "nsCOMPtr.h" +#include "nsStringGlue.h" +#include "nsIObserver.h" +#include "nsIAlertsService.h" +#include "mozINewMailListener.h" + +#define NS_MESSENGEROSXINTEGRATION_CID \ + {0xaa83266, 0x4225, 0x4c4b, \ + {0x93, 0xf8, 0x94, 0xb1, 0x82, 0x58, 0x6f, 0x93}} + +class nsIStringBundle; + +class nsMessengerOSXIntegration : public nsIMessengerOSIntegration, + public nsIFolderListener, + public nsIObserver, + public mozINewMailListener +{ +public: + nsMessengerOSXIntegration(); + virtual nsresult Init(); + + NS_DECL_ISUPPORTS + NS_DECL_NSIMESSENGEROSINTEGRATION + NS_DECL_NSIFOLDERLISTENER + NS_DECL_NSIOBSERVER + NS_DECL_MOZINEWMAILLISTENER + +private: + virtual ~nsMessengerOSXIntegration(); + + nsCOMPtr<nsIAtom> mBiffStateAtom; + nsCOMPtr<nsIAtom> mNewMailReceivedAtom; + nsresult ShowAlertMessage(const nsAString& aAlertTitle, const nsAString& aAlertText, const nsACString& aFolderURI); + nsresult OnAlertFinished(); + nsresult OnAlertClicked(const char16_t * aAlertCookie); +#ifdef MOZ_SUITE + nsresult OnAlertClickedSimple(); +#endif + nsresult GetStringBundle(nsIStringBundle **aBundle); + void FillToolTipInfo(nsIMsgFolder *aFolder, int32_t aNewCount); + nsresult GetFirstFolderWithNewMail(nsIMsgFolder* aFolder, nsCString& aFolderURI); + nsresult BadgeDockIcon(); + nsresult RestoreDockIcon(); + nsresult BounceDockIcon(); + nsresult GetNewMailAuthors(nsIMsgFolder* aFolder, nsString& aAuthors, int32_t aNewCount, int32_t* aNotDisplayed); + + int32_t mUnreadTotal; + int32_t mUnreadChat; +}; + +#endif // __nsMessengerOSXIntegration_h |