LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include - nsIAudioChannelAgent.h (source / functions) Hit Total Coverage
Test: output.info Lines: 2 4 50.0 %
Date: 2017-07-14 16:53:18 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsIAudioChannelAgent.idl
       3             :  */
       4             : 
       5             : #ifndef __gen_nsIAudioChannelAgent_h__
       6             : #define __gen_nsIAudioChannelAgent_h__
       7             : 
       8             : 
       9             : #ifndef __gen_nsISupports_h__
      10             : #include "nsISupports.h"
      11             : #endif
      12             : 
      13             : /* For IDL files that don't want to include root IDL files. */
      14             : #ifndef NS_NO_VTABLE
      15             : #define NS_NO_VTABLE
      16             : #endif
      17             : class mozIDOMWindow; /* forward declaration */
      18             : 
      19             : typedef uint32_t  nsSuspendedTypes;
      20             : 
      21             : 
      22             : /* starting interface:    nsISuspendedTypes */
      23             : #define NS_ISUSPENDEDTYPES_IID_STR "2822a840-f009-11e5-a837-0800200c9a66"
      24             : 
      25             : #define NS_ISUSPENDEDTYPES_IID \
      26             :   {0x2822a840, 0xf009, 0x11e5, \
      27             :     { 0xa8, 0x37, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }}
      28             : 
      29             : class NS_NO_VTABLE nsISuspendedTypes : public nsISupports {
      30             :  public:
      31             : 
      32             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISUSPENDEDTYPES_IID)
      33             : 
      34             :   enum {
      35             :     NONE_SUSPENDED = 0U,
      36             :     SUSPENDED_PAUSE = 1U,
      37             :     SUSPENDED_BLOCK = 2U,
      38             :     SUSPENDED_PAUSE_DISPOSABLE = 3U,
      39             :     SUSPENDED_STOP_DISPOSABLE = 4U
      40             :   };
      41             : 
      42             : };
      43             : 
      44             :   NS_DEFINE_STATIC_IID_ACCESSOR(nsISuspendedTypes, NS_ISUSPENDEDTYPES_IID)
      45             : 
      46             : /* Use this macro when declaring classes that implement this interface. */
      47             : #define NS_DECL_NSISUSPENDEDTYPES \
      48             : 
      49             : /* Use this macro when declaring the members of this interface when the
      50             :    class doesn't implement the interface. This is useful for forwarding. */
      51             : #define NS_DECL_NON_VIRTUAL_NSISUSPENDEDTYPES \
      52             : 
      53             : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
      54             : #define NS_FORWARD_NSISUSPENDEDTYPES(_to) \
      55             : 
      56             : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
      57             : #define NS_FORWARD_SAFE_NSISUSPENDEDTYPES(_to) \
      58             : 
      59             : #if 0
      60             : /* Use the code below as a template for the implementation class for this interface. */
      61             : 
      62             : /* Header file */
      63             : class nsSuspendedTypes : public nsISuspendedTypes
      64             : {
      65             : public:
      66             :   NS_DECL_ISUPPORTS
      67             :   NS_DECL_NSISUSPENDEDTYPES
      68             : 
      69             :   nsSuspendedTypes();
      70             : 
      71             : private:
      72             :   ~nsSuspendedTypes();
      73             : 
      74             : protected:
      75             :   /* additional members */
      76             : };
      77             : 
      78             : /* Implementation file */
      79             : NS_IMPL_ISUPPORTS(nsSuspendedTypes, nsISuspendedTypes)
      80             : 
      81             : nsSuspendedTypes::nsSuspendedTypes()
      82             : {
      83             :   /* member initializers and constructor code */
      84             : }
      85             : 
      86             : nsSuspendedTypes::~nsSuspendedTypes()
      87             : {
      88             :   /* destructor code */
      89             : }
      90             : 
      91             : /* End of implementation class template. */
      92             : #endif
      93             : 
      94             : namespace mozilla {
      95             : namespace dom {
      96             : // It's defined in dom/audiochannel/AudioChannelService.h.
      97             : class AudioPlaybackConfig;
      98             : }
      99             : }
     100             : 
     101             : /* starting interface:    nsIAudioChannelAgentCallback */
     102             : #define NS_IAUDIOCHANNELAGENTCALLBACK_IID_STR "15c05894-408e-4798-b527-a8c32d9c5f8c"
     103             : 
     104             : #define NS_IAUDIOCHANNELAGENTCALLBACK_IID \
     105             :   {0x15c05894, 0x408e, 0x4798, \
     106             :     { 0xb5, 0x27, 0xa8, 0xc3, 0x2d, 0x9c, 0x5f, 0x8c }}
     107             : 
     108           1 : class NS_NO_VTABLE nsIAudioChannelAgentCallback : public nsISupports {
     109             :  public:
     110             : 
     111             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IAUDIOCHANNELAGENTCALLBACK_IID)
     112             : 
     113             :   /* void windowVolumeChanged (in float aVolume, in bool aMuted); */
     114             :   NS_IMETHOD WindowVolumeChanged(float aVolume, bool aMuted) = 0;
     115             : 
     116             :   /* void windowSuspendChanged (in uint32_t aSuspend); */
     117             :   NS_IMETHOD WindowSuspendChanged(uint32_t aSuspend) = 0;
     118             : 
     119             :   /* void windowAudioCaptureChanged (in bool aCapture); */
     120             :   NS_IMETHOD WindowAudioCaptureChanged(bool aCapture) = 0;
     121             : 
     122             : };
     123             : 
     124             :   NS_DEFINE_STATIC_IID_ACCESSOR(nsIAudioChannelAgentCallback, NS_IAUDIOCHANNELAGENTCALLBACK_IID)
     125             : 
     126             : /* Use this macro when declaring classes that implement this interface. */
     127             : #define NS_DECL_NSIAUDIOCHANNELAGENTCALLBACK \
     128             :   NS_IMETHOD WindowVolumeChanged(float aVolume, bool aMuted) override; \
     129             :   NS_IMETHOD WindowSuspendChanged(uint32_t aSuspend) override; \
     130             :   NS_IMETHOD WindowAudioCaptureChanged(bool aCapture) override; 
     131             : 
     132             : /* Use this macro when declaring the members of this interface when the
     133             :    class doesn't implement the interface. This is useful for forwarding. */
     134             : #define NS_DECL_NON_VIRTUAL_NSIAUDIOCHANNELAGENTCALLBACK \
     135             :   nsresult WindowVolumeChanged(float aVolume, bool aMuted); \
     136             :   nsresult WindowSuspendChanged(uint32_t aSuspend); \
     137             :   nsresult WindowAudioCaptureChanged(bool aCapture); 
     138             : 
     139             : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
     140             : #define NS_FORWARD_NSIAUDIOCHANNELAGENTCALLBACK(_to) \
     141             :   NS_IMETHOD WindowVolumeChanged(float aVolume, bool aMuted) override { return _to WindowVolumeChanged(aVolume, aMuted); } \
     142             :   NS_IMETHOD WindowSuspendChanged(uint32_t aSuspend) override { return _to WindowSuspendChanged(aSuspend); } \
     143             :   NS_IMETHOD WindowAudioCaptureChanged(bool aCapture) override { return _to WindowAudioCaptureChanged(aCapture); } 
     144             : 
     145             : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
     146             : #define NS_FORWARD_SAFE_NSIAUDIOCHANNELAGENTCALLBACK(_to) \
     147             :   NS_IMETHOD WindowVolumeChanged(float aVolume, bool aMuted) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowVolumeChanged(aVolume, aMuted); } \
     148             :   NS_IMETHOD WindowSuspendChanged(uint32_t aSuspend) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowSuspendChanged(aSuspend); } \
     149             :   NS_IMETHOD WindowAudioCaptureChanged(bool aCapture) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowAudioCaptureChanged(aCapture); } 
     150             : 
     151             : #if 0
     152             : /* Use the code below as a template for the implementation class for this interface. */
     153             : 
     154             : /* Header file */
     155             : class nsAudioChannelAgentCallback : public nsIAudioChannelAgentCallback
     156             : {
     157             : public:
     158             :   NS_DECL_ISUPPORTS
     159             :   NS_DECL_NSIAUDIOCHANNELAGENTCALLBACK
     160             : 
     161             :   nsAudioChannelAgentCallback();
     162             : 
     163             : private:
     164             :   ~nsAudioChannelAgentCallback();
     165             : 
     166             : protected:
     167             :   /* additional members */
     168             : };
     169             : 
     170             : /* Implementation file */
     171             : NS_IMPL_ISUPPORTS(nsAudioChannelAgentCallback, nsIAudioChannelAgentCallback)
     172             : 
     173             : nsAudioChannelAgentCallback::nsAudioChannelAgentCallback()
     174             : {
     175             :   /* member initializers and constructor code */
     176             : }
     177             : 
     178             : nsAudioChannelAgentCallback::~nsAudioChannelAgentCallback()
     179             : {
     180             :   /* destructor code */
     181             : }
     182             : 
     183             : /* void windowVolumeChanged (in float aVolume, in bool aMuted); */
     184             : NS_IMETHODIMP nsAudioChannelAgentCallback::WindowVolumeChanged(float aVolume, bool aMuted)
     185             : {
     186             :     return NS_ERROR_NOT_IMPLEMENTED;
     187             : }
     188             : 
     189             : /* void windowSuspendChanged (in uint32_t aSuspend); */
     190             : NS_IMETHODIMP nsAudioChannelAgentCallback::WindowSuspendChanged(uint32_t aSuspend)
     191             : {
     192             :     return NS_ERROR_NOT_IMPLEMENTED;
     193             : }
     194             : 
     195             : /* void windowAudioCaptureChanged (in bool aCapture); */
     196             : NS_IMETHODIMP nsAudioChannelAgentCallback::WindowAudioCaptureChanged(bool aCapture)
     197             : {
     198             :     return NS_ERROR_NOT_IMPLEMENTED;
     199             : }
     200             : 
     201             : /* End of implementation class template. */
     202             : #endif
     203             : 
     204             : 
     205             : /* starting interface:    nsIAudioChannelAgent */
     206             : #define NS_IAUDIOCHANNELAGENT_IID_STR "ab7e21c0-970c-11e5-a837-0800200c9a66"
     207             : 
     208             : #define NS_IAUDIOCHANNELAGENT_IID \
     209             :   {0xab7e21c0, 0x970c, 0x11e5, \
     210             :     { 0xa8, 0x37, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }}
     211             : 
     212           1 : class nsIAudioChannelAgent : public nsISupports {
     213             :  public:
     214             : 
     215             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IAUDIOCHANNELAGENT_IID)
     216             : 
     217             :   enum {
     218             :     AUDIO_AGENT_CHANNEL_NORMAL = 0,
     219             :     AUDIO_AGENT_CHANNEL_CONTENT = 1,
     220             :     AUDIO_AGENT_CHANNEL_NOTIFICATION = 2,
     221             :     AUDIO_AGENT_CHANNEL_ALARM = 3,
     222             :     AUDIO_AGENT_CHANNEL_TELEPHONY = 4,
     223             :     AUDIO_AGENT_CHANNEL_RINGER = 5,
     224             :     AUDIO_AGENT_CHANNEL_PUBLICNOTIFICATION = 6,
     225             :     AUDIO_AGENT_CHANNEL_SYSTEM = 7,
     226             :     AUDIO_AGENT_CHANNEL_ERROR = 1000,
     227             :     AUDIO_AGENT_STATE_NORMAL = 0,
     228             :     AUDIO_AGENT_STATE_MUTED = 1,
     229             :     AUDIO_AGENT_STATE_FADED = 2
     230             :   };
     231             : 
     232             :   /* readonly attribute long audioChannelType; */
     233             :   NS_IMETHOD GetAudioChannelType(int32_t *aAudioChannelType) = 0;
     234             : 
     235           0 :    inline int32_t AudioChannelType() {
     236             :     int32_t channel;
     237           0 :     return NS_SUCCEEDED(GetAudioChannelType(&channel)) ? channel : AUDIO_AGENT_CHANNEL_ERROR;
     238             :   }
     239             :     /* void init (in mozIDOMWindow window, in long channelType, in nsIAudioChannelAgentCallback callback); */
     240             :   NS_IMETHOD Init(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) = 0;
     241             : 
     242             :   /* void initWithWeakCallback (in mozIDOMWindow window, in long channelType, in nsIAudioChannelAgentCallback callback); */
     243             :   NS_IMETHOD InitWithWeakCallback(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) = 0;
     244             : 
     245             :   /* void notifyStartedPlaying (in AudioPlaybackConfig config, in uint8_t audible); */
     246             :   NS_IMETHOD NotifyStartedPlaying(mozilla::dom::AudioPlaybackConfig *config, uint8_t audible) = 0;
     247             : 
     248             :   /* void notifyStoppedPlaying (); */
     249             :   NS_IMETHOD NotifyStoppedPlaying(void) = 0;
     250             : 
     251             :   /* void notifyStartedAudible (in uint8_t audible, in uint32_t reason); */
     252             :   NS_IMETHOD NotifyStartedAudible(uint8_t audible, uint32_t reason) = 0;
     253             : 
     254             : };
     255             : 
     256             :   NS_DEFINE_STATIC_IID_ACCESSOR(nsIAudioChannelAgent, NS_IAUDIOCHANNELAGENT_IID)
     257             : 
     258             : /* Use this macro when declaring classes that implement this interface. */
     259             : #define NS_DECL_NSIAUDIOCHANNELAGENT \
     260             :   NS_IMETHOD GetAudioChannelType(int32_t *aAudioChannelType) override; \
     261             :   NS_IMETHOD Init(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override; \
     262             :   NS_IMETHOD InitWithWeakCallback(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override; \
     263             :   NS_IMETHOD NotifyStartedPlaying(mozilla::dom::AudioPlaybackConfig *config, uint8_t audible) override; \
     264             :   NS_IMETHOD NotifyStoppedPlaying(void) override; \
     265             :   NS_IMETHOD NotifyStartedAudible(uint8_t audible, uint32_t reason) override; 
     266             : 
     267             : /* Use this macro when declaring the members of this interface when the
     268             :    class doesn't implement the interface. This is useful for forwarding. */
     269             : #define NS_DECL_NON_VIRTUAL_NSIAUDIOCHANNELAGENT \
     270             :   nsresult GetAudioChannelType(int32_t *aAudioChannelType); \
     271             :   nsresult Init(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback); \
     272             :   nsresult InitWithWeakCallback(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback); \
     273             :   nsresult NotifyStartedPlaying(mozilla::dom::AudioPlaybackConfig *config, uint8_t audible); \
     274             :   nsresult NotifyStoppedPlaying(void); \
     275             :   nsresult NotifyStartedAudible(uint8_t audible, uint32_t reason); 
     276             : 
     277             : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
     278             : #define NS_FORWARD_NSIAUDIOCHANNELAGENT(_to) \
     279             :   NS_IMETHOD GetAudioChannelType(int32_t *aAudioChannelType) override { return _to GetAudioChannelType(aAudioChannelType); } \
     280             :   NS_IMETHOD Init(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override { return _to Init(window, channelType, callback); } \
     281             :   NS_IMETHOD InitWithWeakCallback(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override { return _to InitWithWeakCallback(window, channelType, callback); } \
     282             :   NS_IMETHOD NotifyStartedPlaying(mozilla::dom::AudioPlaybackConfig *config, uint8_t audible) override { return _to NotifyStartedPlaying(config, audible); } \
     283             :   NS_IMETHOD NotifyStoppedPlaying(void) override { return _to NotifyStoppedPlaying(); } \
     284             :   NS_IMETHOD NotifyStartedAudible(uint8_t audible, uint32_t reason) override { return _to NotifyStartedAudible(audible, reason); } 
     285             : 
     286             : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
     287             : #define NS_FORWARD_SAFE_NSIAUDIOCHANNELAGENT(_to) \
     288             :   NS_IMETHOD GetAudioChannelType(int32_t *aAudioChannelType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAudioChannelType(aAudioChannelType); } \
     289             :   NS_IMETHOD Init(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(window, channelType, callback); } \
     290             :   NS_IMETHOD InitWithWeakCallback(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithWeakCallback(window, channelType, callback); } \
     291             :   NS_IMETHOD NotifyStartedPlaying(mozilla::dom::AudioPlaybackConfig *config, uint8_t audible) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyStartedPlaying(config, audible); } \
     292             :   NS_IMETHOD NotifyStoppedPlaying(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyStoppedPlaying(); } \
     293             :   NS_IMETHOD NotifyStartedAudible(uint8_t audible, uint32_t reason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyStartedAudible(audible, reason); } 
     294             : 
     295             : #if 0
     296             : /* Use the code below as a template for the implementation class for this interface. */
     297             : 
     298             : /* Header file */
     299             : class nsAudioChannelAgent : public nsIAudioChannelAgent
     300             : {
     301             : public:
     302             :   NS_DECL_ISUPPORTS
     303             :   NS_DECL_NSIAUDIOCHANNELAGENT
     304             : 
     305             :   nsAudioChannelAgent();
     306             : 
     307             : private:
     308             :   ~nsAudioChannelAgent();
     309             : 
     310             : protected:
     311             :   /* additional members */
     312             : };
     313             : 
     314             : /* Implementation file */
     315             : NS_IMPL_ISUPPORTS(nsAudioChannelAgent, nsIAudioChannelAgent)
     316             : 
     317             : nsAudioChannelAgent::nsAudioChannelAgent()
     318             : {
     319             :   /* member initializers and constructor code */
     320             : }
     321             : 
     322             : nsAudioChannelAgent::~nsAudioChannelAgent()
     323             : {
     324             :   /* destructor code */
     325             : }
     326             : 
     327             : /* readonly attribute long audioChannelType; */
     328             : NS_IMETHODIMP nsAudioChannelAgent::GetAudioChannelType(int32_t *aAudioChannelType)
     329             : {
     330             :     return NS_ERROR_NOT_IMPLEMENTED;
     331             : }
     332             : 
     333             : /* void init (in mozIDOMWindow window, in long channelType, in nsIAudioChannelAgentCallback callback); */
     334             : NS_IMETHODIMP nsAudioChannelAgent::Init(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback)
     335             : {
     336             :     return NS_ERROR_NOT_IMPLEMENTED;
     337             : }
     338             : 
     339             : /* void initWithWeakCallback (in mozIDOMWindow window, in long channelType, in nsIAudioChannelAgentCallback callback); */
     340             : NS_IMETHODIMP nsAudioChannelAgent::InitWithWeakCallback(mozIDOMWindow *window, int32_t channelType, nsIAudioChannelAgentCallback *callback)
     341             : {
     342             :     return NS_ERROR_NOT_IMPLEMENTED;
     343             : }
     344             : 
     345             : /* void notifyStartedPlaying (in AudioPlaybackConfig config, in uint8_t audible); */
     346             : NS_IMETHODIMP nsAudioChannelAgent::NotifyStartedPlaying(mozilla::dom::AudioPlaybackConfig *config, uint8_t audible)
     347             : {
     348             :     return NS_ERROR_NOT_IMPLEMENTED;
     349             : }
     350             : 
     351             : /* void notifyStoppedPlaying (); */
     352             : NS_IMETHODIMP nsAudioChannelAgent::NotifyStoppedPlaying()
     353             : {
     354             :     return NS_ERROR_NOT_IMPLEMENTED;
     355             : }
     356             : 
     357             : /* void notifyStartedAudible (in uint8_t audible, in uint32_t reason); */
     358             : NS_IMETHODIMP nsAudioChannelAgent::NotifyStartedAudible(uint8_t audible, uint32_t reason)
     359             : {
     360             :     return NS_ERROR_NOT_IMPLEMENTED;
     361             : }
     362             : 
     363             : /* End of implementation class template. */
     364             : #endif
     365             : 
     366             : 
     367             : #endif /* __gen_nsIAudioChannelAgent_h__ */

Generated by: LCOV version 1.13