/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM $SRCDIR/netwerk/protocol/http/nsIHttpChannelAuthProvider.idl
 */

#ifndef __gen_nsIHttpChannelAuthProvider_h__
#define __gen_nsIHttpChannelAuthProvider_h__


#include "nsICancelable.h"

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

class nsIHttpAuthenticableChannel; /* forward declaration */


/* starting interface:    nsIHttpChannelAuthProvider */
#define NS_IHTTPCHANNELAUTHPROVIDER_IID_STR "788f331b-2e1f-436c-b405-4f88a31a105b"

#define NS_IHTTPCHANNELAUTHPROVIDER_IID \
  {0x788f331b, 0x2e1f, 0x436c, \
    { 0xb4, 0x05, 0x4f, 0x88, 0xa3, 0x1a, 0x10, 0x5b }}

class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIHttpChannelAuthProvider) nsIHttpChannelAuthProvider : public nsICancelable {
 public:

  NS_INLINE_DECL_STATIC_IID(NS_IHTTPCHANNELAUTHPROVIDER_IID)

  /* [must_use] void init (in nsIHttpAuthenticableChannel channel); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIHttpChannelAuthProvider_init)
  [[nodiscard]] NS_IMETHOD Init(nsIHttpAuthenticableChannel *channel) = 0;

  /* [must_use] void processAuthentication (in unsigned long httpStatus, in boolean sslConnectFailed); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIHttpChannelAuthProvider_processAuthentication)
  [[nodiscard]] NS_IMETHOD ProcessAuthentication(uint32_t httpStatus, bool sslConnectFailed) = 0;

  /* [must_use] void addAuthorizationHeaders (in boolean dontUseCachedWWWCreds); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIHttpChannelAuthProvider_addAuthorizationHeaders)
  [[nodiscard]] NS_IMETHOD AddAuthorizationHeaders(bool dontUseCachedWWWCreds) = 0;

  /* [must_use] void disconnect (in nsresult status); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIHttpChannelAuthProvider_disconnect)
  [[nodiscard]] NS_IMETHOD Disconnect(nsresult status) = 0;

  /* void clearProxyIdent (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIHttpChannelAuthProvider_clearProxyIdent)
  NS_IMETHOD ClearProxyIdent(void) = 0;

};


/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIHTTPCHANNELAUTHPROVIDER \
  [[nodiscard]] NS_IMETHOD Init(nsIHttpAuthenticableChannel *channel) override; \
  [[nodiscard]] NS_IMETHOD ProcessAuthentication(uint32_t httpStatus, bool sslConnectFailed) override; \
  [[nodiscard]] NS_IMETHOD AddAuthorizationHeaders(bool dontUseCachedWWWCreds) override; \
  [[nodiscard]] NS_IMETHOD Disconnect(nsresult status) override; \
  NS_IMETHOD ClearProxyIdent(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_NSIHTTPCHANNELAUTHPROVIDER \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIHttpChannelAuthProvider_init)\
  [[nodiscard]] nsresult Init(nsIHttpAuthenticableChannel *channel); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIHttpChannelAuthProvider_processAuthentication)\
  [[nodiscard]] nsresult ProcessAuthentication(uint32_t httpStatus, bool sslConnectFailed); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIHttpChannelAuthProvider_addAuthorizationHeaders)\
  [[nodiscard]] nsresult AddAuthorizationHeaders(bool dontUseCachedWWWCreds); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIHttpChannelAuthProvider_disconnect)\
  [[nodiscard]] nsresult Disconnect(nsresult status); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIHttpChannelAuthProvider_clearProxyIdent)\
  nsresult ClearProxyIdent(void); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIHTTPCHANNELAUTHPROVIDER(_to) \
  [[nodiscard]] NS_IMETHOD Init(nsIHttpAuthenticableChannel *channel) override { return _to Init(channel); } \
  [[nodiscard]] NS_IMETHOD ProcessAuthentication(uint32_t httpStatus, bool sslConnectFailed) override { return _to ProcessAuthentication(httpStatus, sslConnectFailed); } \
  [[nodiscard]] NS_IMETHOD AddAuthorizationHeaders(bool dontUseCachedWWWCreds) override { return _to AddAuthorizationHeaders(dontUseCachedWWWCreds); } \
  [[nodiscard]] NS_IMETHOD Disconnect(nsresult status) override { return _to Disconnect(status); } \
  NS_IMETHOD ClearProxyIdent(void) override { return _to ClearProxyIdent(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIHTTPCHANNELAUTHPROVIDER(_to) \
  [[nodiscard]] NS_IMETHOD Init(nsIHttpAuthenticableChannel *channel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(channel); } \
  [[nodiscard]] NS_IMETHOD ProcessAuthentication(uint32_t httpStatus, bool sslConnectFailed) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ProcessAuthentication(httpStatus, sslConnectFailed); } \
  [[nodiscard]] NS_IMETHOD AddAuthorizationHeaders(bool dontUseCachedWWWCreds) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddAuthorizationHeaders(dontUseCachedWWWCreds); } \
  [[nodiscard]] NS_IMETHOD Disconnect(nsresult status) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Disconnect(status); } \
  NS_IMETHOD ClearProxyIdent(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearProxyIdent(); } 


#endif /* __gen_nsIHttpChannelAuthProvider_h__ */
