michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef OSXNotificationCenter_h michael@0: #define OSXNotificationCenter_h michael@0: michael@0: #import michael@0: #include "nsIAlertsService.h" michael@0: #include "imgINotificationObserver.h" michael@0: #include "nsITimer.h" michael@0: #include "nsTArray.h" michael@0: #include "mozilla/RefPtr.h" michael@0: michael@0: @class mozNotificationCenterDelegate; michael@0: michael@0: namespace mozilla { michael@0: michael@0: class OSXNotificationInfo; michael@0: michael@0: class OSXNotificationCenter : public nsIAlertsService, michael@0: public imgINotificationObserver, michael@0: public nsITimerCallback michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIALERTSSERVICE michael@0: NS_DECL_IMGINOTIFICATIONOBSERVER michael@0: NS_DECL_NSITIMERCALLBACK michael@0: michael@0: OSXNotificationCenter(); michael@0: virtual ~OSXNotificationCenter(); michael@0: michael@0: nsresult Init(); michael@0: void CloseAlertCocoaString(NSString *aAlertName); michael@0: void OnClick(NSString *aAlertName); michael@0: void ShowPendingNotification(OSXNotificationInfo *osxni); michael@0: michael@0: private: michael@0: mozNotificationCenterDelegate *mDelegate; michael@0: nsTArray > mActiveAlerts; michael@0: nsTArray > mPendingAlerts; michael@0: }; michael@0: michael@0: } // namespace mozilla michael@0: michael@0: #endif // OSXNotificationCenter_h