This file is indexed.

/usr/share/idl/thunderbird/nsIAudioChannelAgent.idl is in thunderbird-dev 1:24.4.0+build1-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
/* 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"

[function, scriptable, uuid(c7227506-5f8e-11e2-8bb3-10bf48d64bd4)]
interface nsIAudioChannelAgentCallback : nsISupports
{
  /**
   * Notified when the playable status of channel is changed.
   *
   * @param canPlay
   *        Callback from agent to notify component of the playable status
   *        of the channel. If canPlay is false, component SHOULD stop playing
   *        media associated with this channel as soon as possible.
   */
  void canPlayChanged(in boolean canPlay);
};

/**
 * This interface provides an agent for gecko components to participate
 * in the audio channel service. Gecko components are responsible for
 *   1. Indicating what channel type they are using (via the init() member function).
 *   2. Before playing, checking the playable status of the channel.
 *   3. Notifying the agent when they start/stop using this channel.
 *   4. Notifying the agent of changes to the visibility of the component using
 *       this channel.
 *
 * The agent will invoke a callback to notify Gecko components of
 *   1. Changes to the playable status of this channel.
 */

[scriptable, uuid(f012a9b7-6431-4915-a4ac-4ba7d833e28e)]
interface nsIAudioChannelAgent : nsISupports
{
  const long AUDIO_AGENT_CHANNEL_NORMAL             = 0;
  const long AUDIO_AGENT_CHANNEL_CONTENT            = 1;
  const long AUDIO_AGENT_CHANNEL_NOTIFICATION       = 2;
  const long AUDIO_AGENT_CHANNEL_ALARM              = 3;
  const long AUDIO_AGENT_CHANNEL_TELEPHONY          = 4;
  const long AUDIO_AGENT_CHANNEL_RINGER             = 5;
  const long AUDIO_AGENT_CHANNEL_PUBLICNOTIFICATION = 6;

  const long AUDIO_AGENT_CHANNEL_ERROR              = 1000;

  /**
   * Before init() is called, this returns AUDIO_AGENT_CHANNEL_ERROR.
   */
  readonly attribute long audioChannelType;

  /**
   * Initialize the agent with a channel type.
   * Note: This function should only be called once.
   *
   * @param channelType
   *    Audio Channel Type listed as above
   * @param callback
   *    1. Once the playable status changes, agent uses this callback function to notify
   *       Gecko component.
   *    2. The callback is allowed to be null. Ex: telephony doesn't need to listen change
   *       of the playable status.
   *    3. The AudioChannelAgent keeps a strong reference to the callback object.
   */
  void init(in long channelType, in nsIAudioChannelAgentCallback callback);

  /**
   * This method is just like init(), except the audio channel agent keeps a
   * weak reference to the callback object.
   *
   * In order for this to work, |callback| must implement
   * nsISupportsWeakReference.
   */
  void initWithWeakCallback(in long channelType, in nsIAudioChannelAgentCallback callback);

  /**
   * Notify the agent that we want to start playing.
   * Note: Gecko component SHOULD call this function first then start to
   *          play audio stream only when return value is true.
   *
   *
   * @return
   *    true: the agent has registered with audio channel service and the
   *          component should start playback.
   *    false: the agent has registered with audio channel service but the
   *          component should not start playback.
   */
  boolean startPlaying();

  /**
   * Notify the agent we no longer want to play.
   *
   * Note : even if startPlaying() returned false, the agent would still be
   *        registered with the audio channel service and receive callbacks for status changes.
   *        So stopPlaying must still eventually be called to unregister the agent with the
   *        channel service.
   */
  void stopPlaying();

  /**
   * Notify the agent of the visibility state of the window using this agent.
   * @param visible
   *    True if the window associated with the agent is visible.
   */
  void setVisibilityState(in boolean visible);

};