summaryrefslogtreecommitdiffstats
path: root/dom/system/gonk/nsIAudioManager.idl
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/system/gonk/nsIAudioManager.idl
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/system/gonk/nsIAudioManager.idl')
-rw-r--r--dom/system/gonk/nsIAudioManager.idl58
1 files changed, 58 insertions, 0 deletions
diff --git a/dom/system/gonk/nsIAudioManager.idl b/dom/system/gonk/nsIAudioManager.idl
new file mode 100644
index 000000000..c2eb62b21
--- /dev/null
+++ b/dom/system/gonk/nsIAudioManager.idl
@@ -0,0 +1,58 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsISupports.idl"
+
+[scriptable, builtinclass, uuid(df31c280-1ef1-11e5-867f-0800200c9a66)]
+interface nsIAudioManager : nsISupports
+{
+ /**
+ * Microphone muted?
+ */
+ attribute boolean microphoneMuted;
+
+ /**
+ * Set the phone's audio mode.
+ */
+ const long PHONE_STATE_INVALID = -2;
+ const long PHONE_STATE_CURRENT = -1;
+ const long PHONE_STATE_NORMAL = 0;
+ const long PHONE_STATE_RINGTONE = 1;
+ const long PHONE_STATE_IN_CALL = 2;
+ const long PHONE_STATE_IN_COMMUNICATION = 3;
+
+ attribute long phoneState;
+
+ /**
+ * Configure a particular device ("force") to be used for one of the uses
+ * (communication, media playback, etc.)
+ */
+ const long FORCE_NONE = 0; // the default
+ const long FORCE_SPEAKER = 1;
+ const long FORCE_HEADPHONES = 2;
+ const long FORCE_BT_SCO = 3;
+ const long FORCE_BT_A2DP = 4;
+ const long FORCE_WIRED_ACCESSORY = 5;
+ const long FORCE_BT_CAR_DOCK = 6;
+ const long FORCE_BT_DESK_DOCK = 7;
+ const long FORCE_ANALOG_DOCK = 8;
+ const long FORCE_DIGITAL_DOCK = 9;
+ const long FORCE_NO_BT_A2DP = 10;
+ const long USE_COMMUNICATION = 0;
+ const long USE_MEDIA = 1;
+ const long USE_RECORD = 2;
+ const long USE_DOCK = 3;
+
+ void setForceForUse(in long usage, in long force);
+ long getForceForUse(in long usage);
+
+ /**
+ * These functions would be used when we enable the new volume control API
+ * (mozAudioChannelManager). The range of volume index is from 0 to N.
+ * More details on : https://gist.github.com/evanxd/41d8e2d91c5201a42bfa
+ */
+ void setAudioChannelVolume(in unsigned long channel, in unsigned long index);
+ unsigned long getAudioChannelVolume(in unsigned long channel);
+ unsigned long getMaxAudioChannelVolume(in unsigned long channel);
+};