michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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 nsAlertsService_h__ michael@0: #define nsAlertsService_h__ michael@0: michael@0: #include "nsIAlertsService.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "nsXULAlerts.h" michael@0: michael@0: #ifdef XP_WIN michael@0: typedef enum tagMOZ_QUERY_USER_NOTIFICATION_STATE { michael@0: QUNS_NOT_PRESENT = 1, michael@0: QUNS_BUSY = 2, michael@0: QUNS_RUNNING_D3D_FULL_SCREEN = 3, michael@0: QUNS_PRESENTATION_MODE = 4, michael@0: QUNS_ACCEPTS_NOTIFICATIONS = 5, michael@0: QUNS_QUIET_TIME = 6, michael@0: QUNS_IMMERSIVE = 7 michael@0: } MOZ_QUERY_USER_NOTIFICATION_STATE; michael@0: michael@0: extern "C" { michael@0: // This function is Windows Vista or later michael@0: typedef HRESULT (__stdcall *SHQueryUserNotificationStatePtr)(MOZ_QUERY_USER_NOTIFICATION_STATE *pquns); michael@0: } michael@0: #endif // defined(XP_WIN) michael@0: michael@0: class nsAlertsService : public nsIAlertsService, michael@0: public nsIAlertsProgressListener michael@0: { michael@0: public: michael@0: NS_DECL_NSIALERTSPROGRESSLISTENER michael@0: NS_DECL_NSIALERTSSERVICE michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: nsAlertsService(); michael@0: virtual ~nsAlertsService(); michael@0: michael@0: protected: michael@0: bool ShouldShowAlert(); michael@0: nsXULAlerts mXULAlerts; michael@0: }; michael@0: michael@0: #endif /* nsAlertsService_h__ */