toolkit/components/alerts/nsAlertsService.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     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 nsAlertsService_h__
     7 #define nsAlertsService_h__
     9 #include "nsIAlertsService.h"
    10 #include "nsCOMPtr.h"
    11 #include "nsXULAlerts.h"
    13 #ifdef XP_WIN
    14 typedef enum tagMOZ_QUERY_USER_NOTIFICATION_STATE {
    15     QUNS_NOT_PRESENT = 1,
    16     QUNS_BUSY = 2,
    17     QUNS_RUNNING_D3D_FULL_SCREEN = 3,
    18     QUNS_PRESENTATION_MODE = 4,
    19     QUNS_ACCEPTS_NOTIFICATIONS = 5,
    20     QUNS_QUIET_TIME = 6,
    21     QUNS_IMMERSIVE = 7
    22 } MOZ_QUERY_USER_NOTIFICATION_STATE;
    24 extern "C" {
    25 // This function is Windows Vista or later
    26 typedef HRESULT (__stdcall *SHQueryUserNotificationStatePtr)(MOZ_QUERY_USER_NOTIFICATION_STATE *pquns);
    27 }
    28 #endif // defined(XP_WIN)
    30 class nsAlertsService : public nsIAlertsService,
    31                         public nsIAlertsProgressListener
    32 {
    33 public:
    34   NS_DECL_NSIALERTSPROGRESSLISTENER
    35   NS_DECL_NSIALERTSSERVICE
    36   NS_DECL_ISUPPORTS
    38   nsAlertsService();
    39   virtual ~nsAlertsService();
    41 protected:
    42   bool ShouldShowAlert();
    43   nsXULAlerts mXULAlerts;
    44 };
    46 #endif /* nsAlertsService_h__ */

mercurial