Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef OSXNotificationCenter_h
7 #define OSXNotificationCenter_h
9 #import <Foundation/Foundation.h>
10 #include "nsIAlertsService.h"
11 #include "imgINotificationObserver.h"
12 #include "nsITimer.h"
13 #include "nsTArray.h"
14 #include "mozilla/RefPtr.h"
16 @class mozNotificationCenterDelegate;
18 namespace mozilla {
20 class OSXNotificationInfo;
22 class OSXNotificationCenter : public nsIAlertsService,
23 public imgINotificationObserver,
24 public nsITimerCallback
25 {
26 public:
27 NS_DECL_ISUPPORTS
28 NS_DECL_NSIALERTSSERVICE
29 NS_DECL_IMGINOTIFICATIONOBSERVER
30 NS_DECL_NSITIMERCALLBACK
32 OSXNotificationCenter();
33 virtual ~OSXNotificationCenter();
35 nsresult Init();
36 void CloseAlertCocoaString(NSString *aAlertName);
37 void OnClick(NSString *aAlertName);
38 void ShowPendingNotification(OSXNotificationInfo *osxni);
40 private:
41 mozNotificationCenterDelegate *mDelegate;
42 nsTArray<nsRefPtr<OSXNotificationInfo> > mActiveAlerts;
43 nsTArray<nsRefPtr<OSXNotificationInfo> > mPendingAlerts;
44 };
46 } // namespace mozilla
48 #endif // OSXNotificationCenter_h