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

#ifndef __gen_nsIPushClient_h__
#define __gen_nsIPushClient_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 nsIPrincipal; /* forward declaration */


/* starting interface:    nsIPushEndpointCallback */
#define NS_IPUSHENDPOINTCALLBACK_IID_STR "dc201064-8e5c-4a26-bd37-d1e33558a903"

#define NS_IPUSHENDPOINTCALLBACK_IID \
  {0xdc201064, 0x8e5c, 0x4a26, \
    { 0xbd, 0x37, 0xd1, 0xe3, 0x35, 0x58, 0xa9, 0x03 }}

class NS_NO_VTABLE nsIPushEndpointCallback : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPUSHENDPOINTCALLBACK_IID)

  /* void onPushEndpoint (in nsresult status, in DOMString endpoint, in uint32_t keyLen, [array, size_is (keyLen)] in octet key); */
  NS_IMETHOD OnPushEndpoint(nsresult status, const nsAString & endpoint, uint32_t keyLen, uint8_t *key) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPushEndpointCallback, NS_IPUSHENDPOINTCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPUSHENDPOINTCALLBACK \
  NS_IMETHOD OnPushEndpoint(nsresult status, const nsAString & endpoint, uint32_t keyLen, uint8_t *key) 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_NSIPUSHENDPOINTCALLBACK \
  NS_METHOD OnPushEndpoint(nsresult status, const nsAString & endpoint, uint32_t keyLen, uint8_t *key); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPUSHENDPOINTCALLBACK(_to) \
  NS_IMETHOD OnPushEndpoint(nsresult status, const nsAString & endpoint, uint32_t keyLen, uint8_t *key) override { return _to OnPushEndpoint(status, endpoint, keyLen, key); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPUSHENDPOINTCALLBACK(_to) \
  NS_IMETHOD OnPushEndpoint(nsresult status, const nsAString & endpoint, uint32_t keyLen, uint8_t *key) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPushEndpoint(status, endpoint, keyLen, key); } 

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

/* Header file */
class nsPushEndpointCallback : public nsIPushEndpointCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPUSHENDPOINTCALLBACK

  nsPushEndpointCallback();

private:
  ~nsPushEndpointCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsPushEndpointCallback, nsIPushEndpointCallback)

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

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

/* void onPushEndpoint (in nsresult status, in DOMString endpoint, in uint32_t keyLen, [array, size_is (keyLen)] in octet key); */
NS_IMETHODIMP nsPushEndpointCallback::OnPushEndpoint(nsresult status, const nsAString & endpoint, uint32_t keyLen, uint8_t *key)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIUnsubscribeResultCallback */
#define NS_IUNSUBSCRIBERESULTCALLBACK_IID_STR "9522934d-e844-4f2f-81e8-48c3947b44de"

#define NS_IUNSUBSCRIBERESULTCALLBACK_IID \
  {0x9522934d, 0xe844, 0x4f2f, \
    { 0x81, 0xe8, 0x48, 0xc3, 0x94, 0x7b, 0x44, 0xde }}

class NS_NO_VTABLE nsIUnsubscribeResultCallback : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUNSUBSCRIBERESULTCALLBACK_IID)

  /* void onUnsubscribe (in nsresult status, in bool success); */
  NS_IMETHOD OnUnsubscribe(nsresult status, bool success) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIUnsubscribeResultCallback, NS_IUNSUBSCRIBERESULTCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIUNSUBSCRIBERESULTCALLBACK \
  NS_IMETHOD OnUnsubscribe(nsresult status, bool success) 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_NSIUNSUBSCRIBERESULTCALLBACK \
  NS_METHOD OnUnsubscribe(nsresult status, bool success); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIUNSUBSCRIBERESULTCALLBACK(_to) \
  NS_IMETHOD OnUnsubscribe(nsresult status, bool success) override { return _to OnUnsubscribe(status, 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_NSIUNSUBSCRIBERESULTCALLBACK(_to) \
  NS_IMETHOD OnUnsubscribe(nsresult status, bool success) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnUnsubscribe(status, success); } 

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

/* Header file */
class nsUnsubscribeResultCallback : public nsIUnsubscribeResultCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIUNSUBSCRIBERESULTCALLBACK

  nsUnsubscribeResultCallback();

private:
  ~nsUnsubscribeResultCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsUnsubscribeResultCallback, nsIUnsubscribeResultCallback)

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

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

/* void onUnsubscribe (in nsresult status, in bool success); */
NS_IMETHODIMP nsUnsubscribeResultCallback::OnUnsubscribe(nsresult status, bool success)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIPushClient */
#define NS_IPUSHCLIENT_IID_STR "6622d599-439e-4ad1-af32-c941bd2b9968"

#define NS_IPUSHCLIENT_IID \
  {0x6622d599, 0x439e, 0x4ad1, \
    { 0xaf, 0x32, 0xc9, 0x41, 0xbd, 0x2b, 0x99, 0x68 }}

class NS_NO_VTABLE nsIPushClient : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPUSHCLIENT_IID)

  /* void subscribe (in DOMString scope, in nsIPrincipal principal, in nsIPushEndpointCallback callback); */
  NS_IMETHOD Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback) = 0;

  /* void unsubscribe (in DOMString scope, in nsIPrincipal principal, in nsIUnsubscribeResultCallback callback); */
  NS_IMETHOD Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback) = 0;

  /* void getSubscription (in DOMString scope, in nsIPrincipal principal, in nsIPushEndpointCallback callback); */
  NS_IMETHOD GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPushClient, NS_IPUSHCLIENT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPUSHCLIENT \
  NS_IMETHOD Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback) override; \
  NS_IMETHOD Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback) override; \
  NS_IMETHOD GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback) 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_NSIPUSHCLIENT \
  NS_METHOD Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback); \
  NS_METHOD Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback); \
  NS_METHOD GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPUSHCLIENT(_to) \
  NS_IMETHOD Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback) override { return _to Subscribe(scope, principal, callback); } \
  NS_IMETHOD Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback) override { return _to Unsubscribe(scope, principal, callback); } \
  NS_IMETHOD GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback) override { return _to GetSubscription(scope, principal, callback); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPUSHCLIENT(_to) \
  NS_IMETHOD Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Subscribe(scope, principal, callback); } \
  NS_IMETHOD Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Unsubscribe(scope, principal, callback); } \
  NS_IMETHOD GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSubscription(scope, principal, callback); } 

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

/* Header file */
class nsPushClient : public nsIPushClient
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPUSHCLIENT

  nsPushClient();

private:
  ~nsPushClient();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsPushClient, nsIPushClient)

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

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

/* void subscribe (in DOMString scope, in nsIPrincipal principal, in nsIPushEndpointCallback callback); */
NS_IMETHODIMP nsPushClient::Subscribe(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void unsubscribe (in DOMString scope, in nsIPrincipal principal, in nsIUnsubscribeResultCallback callback); */
NS_IMETHODIMP nsPushClient::Unsubscribe(const nsAString & scope, nsIPrincipal *principal, nsIUnsubscribeResultCallback *callback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getSubscription (in DOMString scope, in nsIPrincipal principal, in nsIPushEndpointCallback callback); */
NS_IMETHODIMP nsPushClient::GetSubscription(const nsAString & scope, nsIPrincipal *principal, nsIPushEndpointCallback *callback)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIPushClient_h__ */
