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

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

mercurial