зеркало из https://github.com/mozilla/gecko-dev.git
82 строки
2.3 KiB
Plaintext
82 строки
2.3 KiB
Plaintext
/* 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(b76a3de4-79f4-4cbb-a0e2-871095eacb2c)]
|
|
interface nsIAudioManager : nsISupports
|
|
{
|
|
/**
|
|
* Microphone muted?
|
|
*/
|
|
attribute boolean microphoneMuted;
|
|
|
|
/**
|
|
* The master volume.
|
|
*/
|
|
attribute float masterVolume;
|
|
|
|
/**
|
|
* Master volume muted?
|
|
*/
|
|
attribute boolean masterMuted;
|
|
|
|
/**
|
|
* Are we playing audio from the FM radio?
|
|
*/
|
|
attribute boolean fmRadioAudioEnabled;
|
|
|
|
/**
|
|
* 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 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);
|
|
|
|
/**
|
|
* Control the volume of various audio streams
|
|
*/
|
|
const long STREAM_TYPE_VOICE_CALL = 0;
|
|
const long STREAM_TYPE_SYSTEM = 1;
|
|
const long STREAM_TYPE_RING = 2;
|
|
const long STREAM_TYPE_MUSIC = 3;
|
|
const long STREAM_TYPE_ALARM = 4;
|
|
const long STREAM_TYPE_NOTIFICATION = 5;
|
|
const long STREAM_TYPE_BLUETOOTH_SCO = 6;
|
|
const long STREAM_TYPE_ENFORCED_AUDIBLE = 7;
|
|
const long STREAM_TYPE_DTMF = 8;
|
|
const long STREAM_TYPE_TTS = 9;
|
|
const long STREAM_TYPE_FM = 10;
|
|
|
|
void setStreamVolumeIndex(in long stream, in long index);
|
|
long getStreamVolumeIndex(in long stream);
|
|
long getMaxStreamVolumeIndex(in long stream);
|
|
};
|