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

#ifndef __gen_nsISpeechRecognitionService_h__
#define __gen_nsISpeechRecognitionService_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
#include "mozilla/WeakPtr.h"
namespace mozilla {
class AudioSegment;
namespace dom {
class SpeechRecognition;
class SpeechRecognitionResultList;
class SpeechGrammarList;
class SpeechGrammar;
}
}

/* starting interface:    nsISpeechGrammarCompilationCallback */
#define NS_ISPEECHGRAMMARCOMPILATIONCALLBACK_IID_STR "374583f0-4507-11e4-a183-164230d1df67"

#define NS_ISPEECHGRAMMARCOMPILATIONCALLBACK_IID \
  {0x374583f0, 0x4507, 0x11e4, \
    { 0xa1, 0x83, 0x16, 0x42, 0x30, 0xd1, 0xdf, 0x67 }}

class NS_NO_VTABLE nsISpeechGrammarCompilationCallback : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISPEECHGRAMMARCOMPILATIONCALLBACK_IID)

  /* void grammarCompilationEnd (in SpeechGrammarPtr grammarObject, in boolean success); */
  NS_IMETHOD GrammarCompilationEnd(mozilla::dom::SpeechGrammar *grammarObject, bool success) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsISpeechGrammarCompilationCallback, NS_ISPEECHGRAMMARCOMPILATIONCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISPEECHGRAMMARCOMPILATIONCALLBACK \
  NS_IMETHOD GrammarCompilationEnd(mozilla::dom::SpeechGrammar *grammarObject, bool success) override; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISPEECHGRAMMARCOMPILATIONCALLBACK(_to) \
  NS_IMETHOD GrammarCompilationEnd(mozilla::dom::SpeechGrammar *grammarObject, bool success) override { return _to GrammarCompilationEnd(grammarObject, success); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISPEECHGRAMMARCOMPILATIONCALLBACK(_to) \
  NS_IMETHOD GrammarCompilationEnd(mozilla::dom::SpeechGrammar *grammarObject, bool success) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GrammarCompilationEnd(grammarObject, success); } 

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

/* Header file */
class nsSpeechGrammarCompilationCallback : public nsISpeechGrammarCompilationCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSISPEECHGRAMMARCOMPILATIONCALLBACK

  nsSpeechGrammarCompilationCallback();

private:
  ~nsSpeechGrammarCompilationCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsSpeechGrammarCompilationCallback, nsISpeechGrammarCompilationCallback)

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

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

/* void grammarCompilationEnd (in SpeechGrammarPtr grammarObject, in boolean success); */
NS_IMETHODIMP nsSpeechGrammarCompilationCallback::GrammarCompilationEnd(mozilla::dom::SpeechGrammar *grammarObject, bool success)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsISpeechRecognitionService */
#define NS_ISPEECHRECOGNITIONSERVICE_IID_STR "857f3fa2-a980-4d3e-a959-a2f53af74232"

#define NS_ISPEECHRECOGNITIONSERVICE_IID \
  {0x857f3fa2, 0xa980, 0x4d3e, \
    { 0xa9, 0x59, 0xa2, 0xf5, 0x3a, 0xf7, 0x42, 0x32 }}

class NS_NO_VTABLE nsISpeechRecognitionService : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISPEECHRECOGNITIONSERVICE_IID)

  /* void initialize (in SpeechRecognitionWeakPtr aSpeechRecognition); */
  NS_IMETHOD Initialize(mozilla::WeakPtr<mozilla::dom::SpeechRecognition> aSpeechRecognition) = 0;

  /* void processAudioSegment (in AudioSegmentPtr aAudioSegment, in long aSampleRate); */
  NS_IMETHOD ProcessAudioSegment(mozilla::AudioSegment *aAudioSegment, int32_t aSampleRate) = 0;

  /* void validateAndSetGrammarList (in SpeechGrammarListPtr aSpeechGramarList, in nsISpeechGrammarCompilationCallback aCallback); */
  NS_IMETHOD ValidateAndSetGrammarList(mozilla::dom::SpeechGrammarList *aSpeechGramarList, nsISpeechGrammarCompilationCallback *aCallback) = 0;

  /* void soundEnd (); */
  NS_IMETHOD SoundEnd(void) = 0;

  /* void abort (); */
  NS_IMETHOD Abort(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsISpeechRecognitionService, NS_ISPEECHRECOGNITIONSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISPEECHRECOGNITIONSERVICE \
  NS_IMETHOD Initialize(mozilla::WeakPtr<mozilla::dom::SpeechRecognition> aSpeechRecognition) override; \
  NS_IMETHOD ProcessAudioSegment(mozilla::AudioSegment *aAudioSegment, int32_t aSampleRate) override; \
  NS_IMETHOD ValidateAndSetGrammarList(mozilla::dom::SpeechGrammarList *aSpeechGramarList, nsISpeechGrammarCompilationCallback *aCallback) override; \
  NS_IMETHOD SoundEnd(void) override; \
  NS_IMETHOD Abort(void) override; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISPEECHRECOGNITIONSERVICE(_to) \
  NS_IMETHOD Initialize(mozilla::WeakPtr<mozilla::dom::SpeechRecognition> aSpeechRecognition) override { return _to Initialize(aSpeechRecognition); } \
  NS_IMETHOD ProcessAudioSegment(mozilla::AudioSegment *aAudioSegment, int32_t aSampleRate) override { return _to ProcessAudioSegment(aAudioSegment, aSampleRate); } \
  NS_IMETHOD ValidateAndSetGrammarList(mozilla::dom::SpeechGrammarList *aSpeechGramarList, nsISpeechGrammarCompilationCallback *aCallback) override { return _to ValidateAndSetGrammarList(aSpeechGramarList, aCallback); } \
  NS_IMETHOD SoundEnd(void) override { return _to SoundEnd(); } \
  NS_IMETHOD Abort(void) override { return _to Abort(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISPEECHRECOGNITIONSERVICE(_to) \
  NS_IMETHOD Initialize(mozilla::WeakPtr<mozilla::dom::SpeechRecognition> aSpeechRecognition) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Initialize(aSpeechRecognition); } \
  NS_IMETHOD ProcessAudioSegment(mozilla::AudioSegment *aAudioSegment, int32_t aSampleRate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ProcessAudioSegment(aAudioSegment, aSampleRate); } \
  NS_IMETHOD ValidateAndSetGrammarList(mozilla::dom::SpeechGrammarList *aSpeechGramarList, nsISpeechGrammarCompilationCallback *aCallback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ValidateAndSetGrammarList(aSpeechGramarList, aCallback); } \
  NS_IMETHOD SoundEnd(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SoundEnd(); } \
  NS_IMETHOD Abort(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Abort(); } 

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

/* Header file */
class nsSpeechRecognitionService : public nsISpeechRecognitionService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSISPEECHRECOGNITIONSERVICE

  nsSpeechRecognitionService();

private:
  ~nsSpeechRecognitionService();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsSpeechRecognitionService, nsISpeechRecognitionService)

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

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

/* void initialize (in SpeechRecognitionWeakPtr aSpeechRecognition); */
NS_IMETHODIMP nsSpeechRecognitionService::Initialize(mozilla::WeakPtr<mozilla::dom::SpeechRecognition> aSpeechRecognition)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void processAudioSegment (in AudioSegmentPtr aAudioSegment, in long aSampleRate); */
NS_IMETHODIMP nsSpeechRecognitionService::ProcessAudioSegment(mozilla::AudioSegment *aAudioSegment, int32_t aSampleRate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void validateAndSetGrammarList (in SpeechGrammarListPtr aSpeechGramarList, in nsISpeechGrammarCompilationCallback aCallback); */
NS_IMETHODIMP nsSpeechRecognitionService::ValidateAndSetGrammarList(mozilla::dom::SpeechGrammarList *aSpeechGramarList, nsISpeechGrammarCompilationCallback *aCallback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void soundEnd (); */
NS_IMETHODIMP nsSpeechRecognitionService::SoundEnd()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void abort (); */
NS_IMETHODIMP nsSpeechRecognitionService::Abort()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define NS_SPEECH_RECOGNITION_SERVICE_CONTRACTID_PREFIX "@mozilla.org/webspeech/service;1?name="

#endif /* __gen_nsISpeechRecognitionService_h__ */
