Struct xpcom::interfaces::nsIAudioChannelAgent
[−]
[src]
#[repr(C)]pub struct nsIAudioChannelAgent { /* fields omitted */ }
interface nsIAudioChannelAgent : nsISupports
/**
* This interface provides an agent for gecko components to participate
* in the audio channel service. Gecko components are responsible for
* 1. Notifying the agent when they start/stop using this channel.
* 2. Notifying the agent when they are audible.
*
* The agent will invoke a callback to notify Gecko components of
* 1. Changes to the playable status of this channel.
*/
Methods
impl nsIAudioChannelAgent
[src]
pub fn coerce<T: nsIAudioChannelAgentCoerce>(&self) -> &T
[src]
Cast this nsIAudioChannelAgent
to one of its base interfaces.
impl nsIAudioChannelAgent
[src]
pub const AUDIO_AGENT_STATE_NORMAL: i64
AUDIO_AGENT_STATE_NORMAL: i64 = 0
pub const AUDIO_AGENT_STATE_MUTED: i64
AUDIO_AGENT_STATE_MUTED: i64 = 1
pub const AUDIO_AGENT_STATE_FADED: i64
AUDIO_AGENT_STATE_FADED: i64 = 2
pub unsafe fn Init(
&self,
window: *const mozIDOMWindow,
callback: *const nsIAudioChannelAgentCallback
) -> nsresult
[src]
&self,
window: *const mozIDOMWindow,
callback: *const nsIAudioChannelAgentCallback
) -> nsresult
/**
* Initialize the agent with a channel type.
* Note: This function should only be called once.
*
* @param window
* The window
* @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 mozIDOMWindow window, in nsIAudioChannelAgentCallback callback);
pub unsafe fn InitWithWeakCallback(
&self,
window: *const mozIDOMWindow,
callback: *const nsIAudioChannelAgentCallback
) -> nsresult
[src]
&self,
window: *const mozIDOMWindow,
callback: *const nsIAudioChannelAgentCallback
) -> nsresult
/**
* 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 mozIDOMWindow window, in nsIAudioChannelAgentCallback callback);
pub unsafe fn NotifyStoppedPlaying(&self) -> nsresult
[src]
/**
* Notify the agent we no longer want to play.
*
* Note : even if notifyStartedPlaying() returned false, the agent would
* still be registered with the audio channel service and receive callbacks
* for status changes. So notifyStoppedPlaying must still eventually be
* called to unregister the agent with the channel service.
*/
void notifyStoppedPlaying ();
pub unsafe fn NotifyStartedAudible(
&self,
audible: uint8_t,
reason: uint32_t
) -> nsresult
[src]
&self,
audible: uint8_t,
reason: uint32_t
) -> nsresult
/**
* Notify agent that we already start producing audible data.
*
* Note : sometime audio might become silent during playing, this method is used to
* notify the actually audible state to other services which want to know
* about that, ex. tab sound indicator.
*/
void notifyStartedAudible (in uint8_t audible, in uint32_t reason);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIAudioChannelAgent
[src]
const IID: nsIID
IID: nsIID = nsID(1294018416, 23931, 17519, [147, 148, 99, 46, 53, 29, 150, 238])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIAudioChannelAgent
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIAudioChannelAgent
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.