Your IP : 216.73.216.48


Current Path : /usr/include/seamonkey-2.40/
Upload File :
Current File : //usr/include/seamonkey-2.40/nsIAudioChannelAgent.h

/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsIAudioChannelAgent.idl
 */

#ifndef __gen_nsIAudioChannelAgent_h__
#define __gen_nsIAudioChannelAgent_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIDOMWindow; /* forward declaration */


/* starting interface:    nsIAudioChannelAgentCallback */
#define NS_IAUDIOCHANNELAGENTCALLBACK_IID_STR "5fe83b24-38b9-4901-a4a1-d1bd57d3fe18"

#define NS_IAUDIOCHANNELAGENTCALLBACK_IID \
  {0x5fe83b24, 0x38b9, 0x4901, \
    { 0xa4, 0xa1, 0xd1, 0xbd, 0x57, 0xd3, 0xfe, 0x18 }}

class NS_NO_VTABLE nsIAudioChannelAgentCallback : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IAUDIOCHANNELAGENTCALLBACK_IID)

  /* void windowVolumeChanged (in float aVolume, in bool aMuted); */
  NS_IMETHOD WindowVolumeChanged(float aVolume, bool aMuted) = 0;

  /* void windowAudioCaptureChanged (); */
  NS_IMETHOD WindowAudioCaptureChanged(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIAudioChannelAgentCallback, NS_IAUDIOCHANNELAGENTCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIAUDIOCHANNELAGENTCALLBACK \
  NS_IMETHOD WindowVolumeChanged(float aVolume, bool aMuted) override; \
  NS_IMETHOD WindowAudioCaptureChanged(void) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIAUDIOCHANNELAGENTCALLBACK \
  NS_METHOD WindowVolumeChanged(float aVolume, bool aMuted); \
  NS_METHOD WindowAudioCaptureChanged(void); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIAUDIOCHANNELAGENTCALLBACK(_to) \
  NS_IMETHOD WindowVolumeChanged(float aVolume, bool aMuted) override { return _to WindowVolumeChanged(aVolume, aMuted); } \
  NS_IMETHOD WindowAudioCaptureChanged(void) override { return _to WindowAudioCaptureChanged(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIAUDIOCHANNELAGENTCALLBACK(_to) \
  NS_IMETHOD WindowVolumeChanged(float aVolume, bool aMuted) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowVolumeChanged(aVolume, aMuted); } \
  NS_IMETHOD WindowAudioCaptureChanged(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowAudioCaptureChanged(); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsAudioChannelAgentCallback : public nsIAudioChannelAgentCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIAUDIOCHANNELAGENTCALLBACK

  nsAudioChannelAgentCallback();

private:
  ~nsAudioChannelAgentCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsAudioChannelAgentCallback, nsIAudioChannelAgentCallback)

nsAudioChannelAgentCallback::nsAudioChannelAgentCallback()
{
  /* member initializers and constructor code */
}

nsAudioChannelAgentCallback::~nsAudioChannelAgentCallback()
{
  /* destructor code */
}

/* void windowVolumeChanged (in float aVolume, in bool aMuted); */
NS_IMETHODIMP nsAudioChannelAgentCallback::WindowVolumeChanged(float aVolume, bool aMuted)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void windowAudioCaptureChanged (); */
NS_IMETHODIMP nsAudioChannelAgentCallback::WindowAudioCaptureChanged()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


/* starting interface:    nsIAudioChannelAgent */
#define NS_IAUDIOCHANNELAGENT_IID_STR "62e0037c-9786-4b79-b986-27111f6e553b"

#define NS_IAUDIOCHANNELAGENT_IID \
  {0x62e0037c, 0x9786, 0x4b79, \
    { 0xb9, 0x86, 0x27, 0x11, 0x1f, 0x6e, 0x55, 0x3b }}

class nsIAudioChannelAgent : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IAUDIOCHANNELAGENT_IID)

  enum {
    AUDIO_AGENT_CHANNEL_NORMAL = 0,
    AUDIO_AGENT_CHANNEL_CONTENT = 1,
    AUDIO_AGENT_CHANNEL_NOTIFICATION = 2,
    AUDIO_AGENT_CHANNEL_ALARM = 3,
    AUDIO_AGENT_CHANNEL_TELEPHONY = 4,
    AUDIO_AGENT_CHANNEL_RINGER = 5,
    AUDIO_AGENT_CHANNEL_PUBLICNOTIFICATION = 6,
    AUDIO_AGENT_CHANNEL_SYSTEM = 7,
    AUDIO_AGENT_CHANNEL_ERROR = 1000,
    AUDIO_AGENT_STATE_NORMAL = 0,
    AUDIO_AGENT_STATE_MUTED = 1,
    AUDIO_AGENT_STATE_FADED = 2,
    AUDIO_AGENT_DONT_NOTIFY = 0,
    AUDIO_AGENT_NOTIFY = 1
  };

  /* readonly attribute long audioChannelType; */
  NS_IMETHOD GetAudioChannelType(int32_t *aAudioChannelType) = 0;

   inline int32_t AudioChannelType() {
    int32_t channel;
    return NS_SUCCEEDED(GetAudioChannelType(&channel)) ? channel : AUDIO_AGENT_CHANNEL_ERROR;
  }
    /* void init (in nsIDOMWindow window, in long channelType, in nsIAudioChannelAgentCallback callback); */
  NS_IMETHOD Init(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) = 0;

  /* void initWithWeakCallback (in nsIDOMWindow window, in long channelType, in nsIAudioChannelAgentCallback callback); */
  NS_IMETHOD InitWithWeakCallback(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) = 0;

  /* void notifyStartedPlaying (in unsigned long notifyPlayback, out float volume, out bool muted); */
  NS_IMETHOD NotifyStartedPlaying(uint32_t notifyPlayback, float *volume, bool *muted) = 0;

  /* void notifyStoppedPlaying (in unsigned long notifyPlayback); */
  NS_IMETHOD NotifyStoppedPlaying(uint32_t notifyPlayback) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIAudioChannelAgent, NS_IAUDIOCHANNELAGENT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIAUDIOCHANNELAGENT \
  NS_IMETHOD GetAudioChannelType(int32_t *aAudioChannelType) override; \
  NS_IMETHOD Init(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override; \
  NS_IMETHOD InitWithWeakCallback(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override; \
  NS_IMETHOD NotifyStartedPlaying(uint32_t notifyPlayback, float *volume, bool *muted) override; \
  NS_IMETHOD NotifyStoppedPlaying(uint32_t notifyPlayback) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIAUDIOCHANNELAGENT \
  NS_METHOD GetAudioChannelType(int32_t *aAudioChannelType); \
  NS_METHOD Init(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback); \
  NS_METHOD InitWithWeakCallback(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback); \
  NS_METHOD NotifyStartedPlaying(uint32_t notifyPlayback, float *volume, bool *muted); \
  NS_METHOD NotifyStoppedPlaying(uint32_t notifyPlayback); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIAUDIOCHANNELAGENT(_to) \
  NS_IMETHOD GetAudioChannelType(int32_t *aAudioChannelType) override { return _to GetAudioChannelType(aAudioChannelType); } \
  NS_IMETHOD Init(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override { return _to Init(window, channelType, callback); } \
  NS_IMETHOD InitWithWeakCallback(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override { return _to InitWithWeakCallback(window, channelType, callback); } \
  NS_IMETHOD NotifyStartedPlaying(uint32_t notifyPlayback, float *volume, bool *muted) override { return _to NotifyStartedPlaying(notifyPlayback, volume, muted); } \
  NS_IMETHOD NotifyStoppedPlaying(uint32_t notifyPlayback) override { return _to NotifyStoppedPlaying(notifyPlayback); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIAUDIOCHANNELAGENT(_to) \
  NS_IMETHOD GetAudioChannelType(int32_t *aAudioChannelType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAudioChannelType(aAudioChannelType); } \
  NS_IMETHOD Init(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(window, channelType, callback); } \
  NS_IMETHOD InitWithWeakCallback(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithWeakCallback(window, channelType, callback); } \
  NS_IMETHOD NotifyStartedPlaying(uint32_t notifyPlayback, float *volume, bool *muted) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyStartedPlaying(notifyPlayback, volume, muted); } \
  NS_IMETHOD NotifyStoppedPlaying(uint32_t notifyPlayback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyStoppedPlaying(notifyPlayback); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsAudioChannelAgent : public nsIAudioChannelAgent
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIAUDIOCHANNELAGENT

  nsAudioChannelAgent();

private:
  ~nsAudioChannelAgent();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsAudioChannelAgent, nsIAudioChannelAgent)

nsAudioChannelAgent::nsAudioChannelAgent()
{
  /* member initializers and constructor code */
}

nsAudioChannelAgent::~nsAudioChannelAgent()
{
  /* destructor code */
}

/* readonly attribute long audioChannelType; */
NS_IMETHODIMP nsAudioChannelAgent::GetAudioChannelType(int32_t *aAudioChannelType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void init (in nsIDOMWindow window, in long channelType, in nsIAudioChannelAgentCallback callback); */
NS_IMETHODIMP nsAudioChannelAgent::Init(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void initWithWeakCallback (in nsIDOMWindow window, in long channelType, in nsIAudioChannelAgentCallback callback); */
NS_IMETHODIMP nsAudioChannelAgent::InitWithWeakCallback(nsIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyStartedPlaying (in unsigned long notifyPlayback, out float volume, out bool muted); */
NS_IMETHODIMP nsAudioChannelAgent::NotifyStartedPlaying(uint32_t notifyPlayback, float *volume, bool *muted)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyStoppedPlaying (in unsigned long notifyPlayback); */
NS_IMETHODIMP nsAudioChannelAgent::NotifyStoppedPlaying(uint32_t notifyPlayback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_nsIAudioChannelAgent_h__ */