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

#ifndef __gen_nsIServiceWorkerManager_h__
#define __gen_nsIServiceWorkerManager_h__


#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif

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

class nsIURI; /* forward declaration */


/* starting interface:    nsIServiceWorkerUnregisterCallback */
#define NS_ISERVICEWORKERUNREGISTERCALLBACK_IID_STR "d6a9d4b6-39b0-4cd2-957d-28a57df5a031"

#define NS_ISERVICEWORKERUNREGISTERCALLBACK_IID \
  {0xd6a9d4b6, 0x39b0, 0x4cd2, \
    { 0x95, 0x7d, 0x28, 0xa5, 0x7d, 0xf5, 0xa0, 0x31 }}

class NS_NO_VTABLE nsIServiceWorkerUnregisterCallback : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISERVICEWORKERUNREGISTERCALLBACK_IID)

  /* [noscript] void UnregisterSucceeded (in bool aState); */
  NS_IMETHOD UnregisterSucceeded(bool aState) = 0;

  /* [noscript] void UnregisterFailed (); */
  NS_IMETHOD UnregisterFailed(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIServiceWorkerUnregisterCallback, NS_ISERVICEWORKERUNREGISTERCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISERVICEWORKERUNREGISTERCALLBACK \
  NS_IMETHOD UnregisterSucceeded(bool aState) MOZ_OVERRIDE; \
  NS_IMETHOD UnregisterFailed(void) MOZ_OVERRIDE; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISERVICEWORKERUNREGISTERCALLBACK(_to) \
  NS_IMETHOD UnregisterSucceeded(bool aState) MOZ_OVERRIDE { return _to UnregisterSucceeded(aState); } \
  NS_IMETHOD UnregisterFailed(void) MOZ_OVERRIDE { return _to UnregisterFailed(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISERVICEWORKERUNREGISTERCALLBACK(_to) \
  NS_IMETHOD UnregisterSucceeded(bool aState) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterSucceeded(aState); } \
  NS_IMETHOD UnregisterFailed(void) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterFailed(); } 

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

/* Header file */
class nsServiceWorkerUnregisterCallback : public nsIServiceWorkerUnregisterCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSISERVICEWORKERUNREGISTERCALLBACK

  nsServiceWorkerUnregisterCallback();

private:
  ~nsServiceWorkerUnregisterCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsServiceWorkerUnregisterCallback, nsIServiceWorkerUnregisterCallback)

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

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

/* [noscript] void UnregisterSucceeded (in bool aState); */
NS_IMETHODIMP nsServiceWorkerUnregisterCallback::UnregisterSucceeded(bool aState)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void UnregisterFailed (); */
NS_IMETHODIMP nsServiceWorkerUnregisterCallback::UnregisterFailed()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIServiceWorkerManager */
#define NS_ISERVICEWORKERMANAGER_IID_STR "79ad5b57-d65d-46d3-b5e9-32d27e16052d"

#define NS_ISERVICEWORKERMANAGER_IID \
  {0x79ad5b57, 0xd65d, 0x46d3, \
    { 0xb5, 0xe9, 0x32, 0xd2, 0x7e, 0x16, 0x05, 0x2d }}

class NS_NO_VTABLE nsIServiceWorkerManager : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISERVICEWORKERMANAGER_IID)

  /* nsISupports register (in DOMString aScope, in DOMString aScriptURI); */
  NS_IMETHOD Register(const nsAString & aScope, const nsAString & aScriptURI, nsISupports * *_retval) = 0;

  /* void unregister (in nsIServiceWorkerUnregisterCallback aCallback, in DOMString aScope); */
  NS_IMETHOD Unregister(nsIServiceWorkerUnregisterCallback *aCallback, const nsAString & aScope) = 0;

  /* nsISupports getRegistrations (in nsIDOMWindow aWindow); */
  NS_IMETHOD GetRegistrations(nsIDOMWindow *aWindow, nsISupports * *_retval) = 0;

  /* nsISupports getRegistration (in nsIDOMWindow aWindow, in DOMString aScope); */
  NS_IMETHOD GetRegistration(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) = 0;

  /* nsISupports getReadyPromise (in nsIDOMWindow aWindow); */
  NS_IMETHOD GetReadyPromise(nsIDOMWindow *aWindow, nsISupports * *_retval) = 0;

  /* void removeReadyPromise (in nsIDOMWindow aWindow); */
  NS_IMETHOD RemoveReadyPromise(nsIDOMWindow *aWindow) = 0;

  /* [noscript] void AddRegistrationEventListener (in nsIURI aPageURI, in nsIDOMEventTarget aTarget); */
  NS_IMETHOD AddRegistrationEventListener(nsIURI *aPageURI, nsIDOMEventTarget *aTarget) = 0;

  /* [noscript] void RemoveRegistrationEventListener (in nsIURI aPageURI, in nsIDOMEventTarget aTarget); */
  NS_IMETHOD RemoveRegistrationEventListener(nsIURI *aPageURI, nsIDOMEventTarget *aTarget) = 0;

  /* [nostdcall,notxpcom] void MaybeStartControlling (in nsIDocument aDoc); */
  virtual void MaybeStartControlling(nsIDocument *aDoc) = 0;

  /* [nostdcall,notxpcom] void MaybeStopControlling (in nsIDocument aDoc); */
  virtual void MaybeStopControlling(nsIDocument *aDoc) = 0;

  /* [noscript] nsISupports GetInstalling (in nsIDOMWindow aWindow, in DOMString aScope); */
  NS_IMETHOD GetInstalling(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) = 0;

  /* [noscript] nsISupports GetWaiting (in nsIDOMWindow aWindow, in DOMString aScope); */
  NS_IMETHOD GetWaiting(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) = 0;

  /* [noscript] nsISupports GetActive (in nsIDOMWindow aWindow, in DOMString aScope); */
  NS_IMETHOD GetActive(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) = 0;

  /* [noscript] nsISupports GetDocumentController (in nsIDOMWindow aWindow); */
  NS_IMETHOD GetDocumentController(nsIDOMWindow *aWindow, nsISupports * *_retval) = 0;

  /* DOMString getScopeForUrl (in DOMString path); */
  NS_IMETHOD GetScopeForUrl(const nsAString & path, nsAString & _retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIServiceWorkerManager, NS_ISERVICEWORKERMANAGER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISERVICEWORKERMANAGER \
  NS_IMETHOD Register(const nsAString & aScope, const nsAString & aScriptURI, nsISupports * *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD Unregister(nsIServiceWorkerUnregisterCallback *aCallback, const nsAString & aScope) MOZ_OVERRIDE; \
  NS_IMETHOD GetRegistrations(nsIDOMWindow *aWindow, nsISupports * *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD GetRegistration(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD GetReadyPromise(nsIDOMWindow *aWindow, nsISupports * *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD RemoveReadyPromise(nsIDOMWindow *aWindow) MOZ_OVERRIDE; \
  NS_IMETHOD AddRegistrationEventListener(nsIURI *aPageURI, nsIDOMEventTarget *aTarget) MOZ_OVERRIDE; \
  NS_IMETHOD RemoveRegistrationEventListener(nsIURI *aPageURI, nsIDOMEventTarget *aTarget) MOZ_OVERRIDE; \
  virtual void MaybeStartControlling(nsIDocument *aDoc) MOZ_OVERRIDE; \
  virtual void MaybeStopControlling(nsIDocument *aDoc) MOZ_OVERRIDE; \
  NS_IMETHOD GetInstalling(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD GetWaiting(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD GetActive(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD GetDocumentController(nsIDOMWindow *aWindow, nsISupports * *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD GetScopeForUrl(const nsAString & path, nsAString & _retval) MOZ_OVERRIDE; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISERVICEWORKERMANAGER(_to) \
  NS_IMETHOD Register(const nsAString & aScope, const nsAString & aScriptURI, nsISupports * *_retval) MOZ_OVERRIDE { return _to Register(aScope, aScriptURI, _retval); } \
  NS_IMETHOD Unregister(nsIServiceWorkerUnregisterCallback *aCallback, const nsAString & aScope) MOZ_OVERRIDE { return _to Unregister(aCallback, aScope); } \
  NS_IMETHOD GetRegistrations(nsIDOMWindow *aWindow, nsISupports * *_retval) MOZ_OVERRIDE { return _to GetRegistrations(aWindow, _retval); } \
  NS_IMETHOD GetRegistration(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE { return _to GetRegistration(aWindow, aScope, _retval); } \
  NS_IMETHOD GetReadyPromise(nsIDOMWindow *aWindow, nsISupports * *_retval) MOZ_OVERRIDE { return _to GetReadyPromise(aWindow, _retval); } \
  NS_IMETHOD RemoveReadyPromise(nsIDOMWindow *aWindow) MOZ_OVERRIDE { return _to RemoveReadyPromise(aWindow); } \
  NS_IMETHOD AddRegistrationEventListener(nsIURI *aPageURI, nsIDOMEventTarget *aTarget) MOZ_OVERRIDE { return _to AddRegistrationEventListener(aPageURI, aTarget); } \
  NS_IMETHOD RemoveRegistrationEventListener(nsIURI *aPageURI, nsIDOMEventTarget *aTarget) MOZ_OVERRIDE { return _to RemoveRegistrationEventListener(aPageURI, aTarget); } \
  virtual void MaybeStartControlling(nsIDocument *aDoc) MOZ_OVERRIDE { return _to MaybeStartControlling(aDoc); } \
  virtual void MaybeStopControlling(nsIDocument *aDoc) MOZ_OVERRIDE { return _to MaybeStopControlling(aDoc); } \
  NS_IMETHOD GetInstalling(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE { return _to GetInstalling(aWindow, aScope, _retval); } \
  NS_IMETHOD GetWaiting(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE { return _to GetWaiting(aWindow, aScope, _retval); } \
  NS_IMETHOD GetActive(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE { return _to GetActive(aWindow, aScope, _retval); } \
  NS_IMETHOD GetDocumentController(nsIDOMWindow *aWindow, nsISupports * *_retval) MOZ_OVERRIDE { return _to GetDocumentController(aWindow, _retval); } \
  NS_IMETHOD GetScopeForUrl(const nsAString & path, nsAString & _retval) MOZ_OVERRIDE { return _to GetScopeForUrl(path, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISERVICEWORKERMANAGER(_to) \
  NS_IMETHOD Register(const nsAString & aScope, const nsAString & aScriptURI, nsISupports * *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->Register(aScope, aScriptURI, _retval); } \
  NS_IMETHOD Unregister(nsIServiceWorkerUnregisterCallback *aCallback, const nsAString & aScope) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->Unregister(aCallback, aScope); } \
  NS_IMETHOD GetRegistrations(nsIDOMWindow *aWindow, nsISupports * *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRegistrations(aWindow, _retval); } \
  NS_IMETHOD GetRegistration(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRegistration(aWindow, aScope, _retval); } \
  NS_IMETHOD GetReadyPromise(nsIDOMWindow *aWindow, nsISupports * *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReadyPromise(aWindow, _retval); } \
  NS_IMETHOD RemoveReadyPromise(nsIDOMWindow *aWindow) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveReadyPromise(aWindow); } \
  NS_IMETHOD AddRegistrationEventListener(nsIURI *aPageURI, nsIDOMEventTarget *aTarget) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRegistrationEventListener(aPageURI, aTarget); } \
  NS_IMETHOD RemoveRegistrationEventListener(nsIURI *aPageURI, nsIDOMEventTarget *aTarget) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveRegistrationEventListener(aPageURI, aTarget); } \
  virtual void MaybeStartControlling(nsIDocument *aDoc) MOZ_OVERRIDE; \
  virtual void MaybeStopControlling(nsIDocument *aDoc) MOZ_OVERRIDE; \
  NS_IMETHOD GetInstalling(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInstalling(aWindow, aScope, _retval); } \
  NS_IMETHOD GetWaiting(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWaiting(aWindow, aScope, _retval); } \
  NS_IMETHOD GetActive(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetActive(aWindow, aScope, _retval); } \
  NS_IMETHOD GetDocumentController(nsIDOMWindow *aWindow, nsISupports * *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentController(aWindow, _retval); } \
  NS_IMETHOD GetScopeForUrl(const nsAString & path, nsAString & _retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScopeForUrl(path, _retval); } 

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

/* Header file */
class nsServiceWorkerManager : public nsIServiceWorkerManager
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSISERVICEWORKERMANAGER

  nsServiceWorkerManager();

private:
  ~nsServiceWorkerManager();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsServiceWorkerManager, nsIServiceWorkerManager)

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

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

/* nsISupports register (in DOMString aScope, in DOMString aScriptURI); */
NS_IMETHODIMP nsServiceWorkerManager::Register(const nsAString & aScope, const nsAString & aScriptURI, nsISupports * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void unregister (in nsIServiceWorkerUnregisterCallback aCallback, in DOMString aScope); */
NS_IMETHODIMP nsServiceWorkerManager::Unregister(nsIServiceWorkerUnregisterCallback *aCallback, const nsAString & aScope)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISupports getRegistrations (in nsIDOMWindow aWindow); */
NS_IMETHODIMP nsServiceWorkerManager::GetRegistrations(nsIDOMWindow *aWindow, nsISupports * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISupports getRegistration (in nsIDOMWindow aWindow, in DOMString aScope); */
NS_IMETHODIMP nsServiceWorkerManager::GetRegistration(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISupports getReadyPromise (in nsIDOMWindow aWindow); */
NS_IMETHODIMP nsServiceWorkerManager::GetReadyPromise(nsIDOMWindow *aWindow, nsISupports * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeReadyPromise (in nsIDOMWindow aWindow); */
NS_IMETHODIMP nsServiceWorkerManager::RemoveReadyPromise(nsIDOMWindow *aWindow)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void AddRegistrationEventListener (in nsIURI aPageURI, in nsIDOMEventTarget aTarget); */
NS_IMETHODIMP nsServiceWorkerManager::AddRegistrationEventListener(nsIURI *aPageURI, nsIDOMEventTarget *aTarget)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void RemoveRegistrationEventListener (in nsIURI aPageURI, in nsIDOMEventTarget aTarget); */
NS_IMETHODIMP nsServiceWorkerManager::RemoveRegistrationEventListener(nsIURI *aPageURI, nsIDOMEventTarget *aTarget)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [nostdcall,notxpcom] void MaybeStartControlling (in nsIDocument aDoc); */
void nsServiceWorkerManager::MaybeStartControlling(nsIDocument *aDoc)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [nostdcall,notxpcom] void MaybeStopControlling (in nsIDocument aDoc); */
void nsServiceWorkerManager::MaybeStopControlling(nsIDocument *aDoc)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] nsISupports GetInstalling (in nsIDOMWindow aWindow, in DOMString aScope); */
NS_IMETHODIMP nsServiceWorkerManager::GetInstalling(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] nsISupports GetWaiting (in nsIDOMWindow aWindow, in DOMString aScope); */
NS_IMETHODIMP nsServiceWorkerManager::GetWaiting(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] nsISupports GetActive (in nsIDOMWindow aWindow, in DOMString aScope); */
NS_IMETHODIMP nsServiceWorkerManager::GetActive(nsIDOMWindow *aWindow, const nsAString & aScope, nsISupports * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] nsISupports GetDocumentController (in nsIDOMWindow aWindow); */
NS_IMETHODIMP nsServiceWorkerManager::GetDocumentController(nsIDOMWindow *aWindow, nsISupports * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* DOMString getScopeForUrl (in DOMString path); */
NS_IMETHODIMP nsServiceWorkerManager::GetScopeForUrl(const nsAString & path, nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define SERVICEWORKERMANAGER_CONTRACTID "@mozilla.org/serviceworkers/manager;1"

#endif /* __gen_nsIServiceWorkerManager_h__ */
