diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-06 23:39:47 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-06 23:39:47 +0100 |
commit | 642032029f65e9dc0d38fbb6d35ef656c73a292c (patch) | |
tree | 78a22bd12d679ab532db490d631ee69fa085aec1 /mailnews/base/src/nsMessengerOSXIntegration.h | |
parent | 50ef259a2df60d020ccb02d76dc5aa4835ee319e (diff) | |
parent | 2529b2edece0a0ed86553d1e73eef13c3848bf64 (diff) | |
download | UXP-642032029f65e9dc0d38fbb6d35ef656c73a292c.tar UXP-642032029f65e9dc0d38fbb6d35ef656c73a292c.tar.gz UXP-642032029f65e9dc0d38fbb6d35ef656c73a292c.tar.lz UXP-642032029f65e9dc0d38fbb6d35ef656c73a292c.tar.xz UXP-642032029f65e9dc0d38fbb6d35ef656c73a292c.zip |
Merge branch 'master' into release
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 000000000..91f42f2a2 --- /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 |