dom/power/nsIPowerManagerService.idl

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.

michael@0 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7
michael@0 8 %{C++
michael@0 9 #define NS_POWERMANAGERSERVICE_CID { 0x18c2e238, 0x3a0a, 0x4153, {0x89, 0xfc, 0x16, 0x6b, 0x3b, 0x14, 0x65, 0xa1 } }
michael@0 10 #define POWERMANAGERSERVICE_CONTRACTID "@mozilla.org/power/powermanagerservice;1"
michael@0 11 %}
michael@0 12
michael@0 13 interface nsIDOMMozWakeLockListener;
michael@0 14 interface nsIDOMWindow;
michael@0 15
michael@0 16 /**
michael@0 17 * For use with non-content code.
michael@0 18 */
michael@0 19 [scriptable, builtinclass, uuid(a232e826-07bd-11e2-8a8f-236186ff1a14)]
michael@0 20 interface nsIPowerManagerService : nsISupports
michael@0 21 {
michael@0 22 /**
michael@0 23 * This API will power off the machine.
michael@0 24 */
michael@0 25 void powerOff();
michael@0 26
michael@0 27 /**
michael@0 28 * This API will completely shut down and boot the machine.
michael@0 29 */
michael@0 30 void reboot();
michael@0 31
michael@0 32 /**
michael@0 33 * This API will restart the Gecko processes without powering off the machine.
michael@0 34 */
michael@0 35 void restart();
michael@0 36
michael@0 37 void addWakeLockListener(in nsIDOMMozWakeLockListener aListener);
michael@0 38 void removeWakeLockListener(in nsIDOMMozWakeLockListener aListener);
michael@0 39 DOMString getWakeLockState(in DOMString aTopic);
michael@0 40
michael@0 41 /**
michael@0 42 * Return a wake lock (MozWakeLock) object of aTopic associated with aWindow.
michael@0 43 * A wake lock without associated window, e.g. used in chrome, is
michael@0 44 * always considered invisible.
michael@0 45 */
michael@0 46 nsISupports newWakeLock(in DOMString aTopic, [optional] in nsIDOMWindow aWindow);
michael@0 47 };

mercurial