dom/system/gonk/nsIAudioManager.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #include "nsISupports.idl"
michael@0 6
michael@0 7 [scriptable, builtinclass, uuid(60da41b4-cdc2-11e2-8a91-10bf48d64bd4)]
michael@0 8 interface nsIAudioManager : nsISupports
michael@0 9 {
michael@0 10 /**
michael@0 11 * Microphone muted?
michael@0 12 */
michael@0 13 attribute boolean microphoneMuted;
michael@0 14
michael@0 15 /**
michael@0 16 * Are we playing audio from the FM radio?
michael@0 17 */
michael@0 18 attribute boolean fmRadioAudioEnabled;
michael@0 19
michael@0 20 /**
michael@0 21 * Set the phone's audio mode.
michael@0 22 */
michael@0 23 const long PHONE_STATE_INVALID = -2;
michael@0 24 const long PHONE_STATE_CURRENT = -1;
michael@0 25 const long PHONE_STATE_NORMAL = 0;
michael@0 26 const long PHONE_STATE_RINGTONE = 1;
michael@0 27 const long PHONE_STATE_IN_CALL = 2;
michael@0 28 const long PHONE_STATE_IN_COMMUNICATION = 3;
michael@0 29
michael@0 30 attribute long phoneState;
michael@0 31
michael@0 32 /**
michael@0 33 * Configure a particular device ("force") to be used for one of the uses
michael@0 34 * (communication, media playback, etc.)
michael@0 35 */
michael@0 36 const long FORCE_NONE = 0; // the default
michael@0 37 const long FORCE_SPEAKER = 1;
michael@0 38 const long FORCE_HEADPHONES = 2;
michael@0 39 const long FORCE_BT_SCO = 3;
michael@0 40 const long FORCE_BT_A2DP = 4;
michael@0 41 const long FORCE_WIRED_ACCESSORY = 5;
michael@0 42 const long FORCE_BT_CAR_DOCK = 6;
michael@0 43 const long FORCE_BT_DESK_DOCK = 7;
michael@0 44
michael@0 45 const long USE_COMMUNICATION = 0;
michael@0 46 const long USE_MEDIA = 1;
michael@0 47 const long USE_RECORD = 2;
michael@0 48 const long USE_DOCK = 3;
michael@0 49
michael@0 50 void setForceForUse(in long usage, in long force);
michael@0 51 long getForceForUse(in long usage);
michael@0 52
michael@0 53 /* The range of volume index is from 0 to N. Ex: 0 ~ 15 */
michael@0 54 void setAudioChannelVolume(in long channel, in long index);
michael@0 55 long getAudioChannelVolume(in long channel);
michael@0 56 long getMaxAudioChannelVolume(in long channel);
michael@0 57 };

mercurial