/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIProtocolProxyService.idl
 */

#ifndef __gen_nsIProtocolProxyService_h__
#define __gen_nsIProtocolProxyService_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#ifndef __gen_nsIURI_h__
#include "nsIURI.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
/**
 * Protocol writers can obtain a very basic (ok, degenerate) implementation
 * of nsIURI by calling the component manager with NS_SIMPLEURI_CID. The
 * implementation returned will only parse things of the form:
 *
 *    about:cache
 *    \   / \   /
 *     ---   ---
 *      |     |
 *   Scheme  Path
 *
 * where the path is everything after the colon. Note that this is probably 
 * only useful for cases like about: or javascript: URIs. 
 *
 * *** What you most likely will want is NS_STANDARDURL_CID which is much more 
 * full featured. Look at nsIURL.idl for more details.
 *
 * NOTE: CIDs are declared in build/nsNetCID.h
 */
class nsIProxyInfo; /* forward declaration */

#define NS_PROTOCOLPROXYSERVICE_CID                             \
{ /* E9B301C0-E0E4-11d3-A1A8-0050041CAF44 */                    \
0xe9b301c0, 0xe0e4, 0x11d3, { 0xa1, 0xa8, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44 } }

/* starting interface:    nsIProtocolProxyService */
#define NS_IPROTOCOLPROXYSERVICE_IID_STR "495cc980-e0d4-11d3-a1a8-0050041caf44"

#define NS_IPROTOCOLPROXYSERVICE_IID \
  {0x495cc980, 0xe0d4, 0x11d3, \
    { 0xa1, 0xa8, 0x00, 0x50, 0x04, 0x1c, 0xaf, 0x44 }}

class NS_NO_VTABLE nsIProtocolProxyService : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROTOCOLPROXYSERVICE_IID)

  /* readonly attribute PRBool proxyEnabled; */
  NS_IMETHOD GetProxyEnabled(PRBool *aProxyEnabled) = 0;

  /** Given a uri, return a proxyInfo */
  /* nsIProxyInfo examineForProxy (in nsIURI aURI); */
  NS_IMETHOD ExamineForProxy(nsIURI *aURI, nsIProxyInfo **_retval) = 0;

  /** Return a proxyInfo with the given data */
  /* nsIProxyInfo newProxyInfo (in string type, in string host, in long port); */
  NS_IMETHOD NewProxyInfo(const char *type, const char *host, PRInt32 port, nsIProxyInfo **_retval) = 0;

  /**
    * Add additional items in the "No proxy for" list. This is above
    * the list specified the user-pref. 
    */
  /* void addNoProxyFor (in string host, in long port); */
  NS_IMETHOD AddNoProxyFor(const char *host, PRInt32 port) = 0;

  /* void removeNoProxyFor (in string host, in long port); */
  NS_IMETHOD RemoveNoProxyFor(const char *host, PRInt32 port) = 0;

  /* void configureFromPAC (in string url); */
  NS_IMETHOD ConfigureFromPAC(const char *url) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPROTOCOLPROXYSERVICE \
  NS_IMETHOD GetProxyEnabled(PRBool *aProxyEnabled); \
  NS_IMETHOD ExamineForProxy(nsIURI *aURI, nsIProxyInfo **_retval); \
  NS_IMETHOD NewProxyInfo(const char *type, const char *host, PRInt32 port, nsIProxyInfo **_retval); \
  NS_IMETHOD AddNoProxyFor(const char *host, PRInt32 port); \
  NS_IMETHOD RemoveNoProxyFor(const char *host, PRInt32 port); \
  NS_IMETHOD ConfigureFromPAC(const char *url); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPROTOCOLPROXYSERVICE(_to) \
  NS_IMETHOD GetProxyEnabled(PRBool *aProxyEnabled) { return _to GetProxyEnabled(aProxyEnabled); } \
  NS_IMETHOD ExamineForProxy(nsIURI *aURI, nsIProxyInfo **_retval) { return _to ExamineForProxy(aURI, _retval); } \
  NS_IMETHOD NewProxyInfo(const char *type, const char *host, PRInt32 port, nsIProxyInfo **_retval) { return _to NewProxyInfo(type, host, port, _retval); } \
  NS_IMETHOD AddNoProxyFor(const char *host, PRInt32 port) { return _to AddNoProxyFor(host, port); } \
  NS_IMETHOD RemoveNoProxyFor(const char *host, PRInt32 port) { return _to RemoveNoProxyFor(host, port); } \
  NS_IMETHOD ConfigureFromPAC(const char *url) { return _to ConfigureFromPAC(url); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPROTOCOLPROXYSERVICE(_to) \
  NS_IMETHOD GetProxyEnabled(PRBool *aProxyEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProxyEnabled(aProxyEnabled); } \
  NS_IMETHOD ExamineForProxy(nsIURI *aURI, nsIProxyInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExamineForProxy(aURI, _retval); } \
  NS_IMETHOD NewProxyInfo(const char *type, const char *host, PRInt32 port, nsIProxyInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewProxyInfo(type, host, port, _retval); } \
  NS_IMETHOD AddNoProxyFor(const char *host, PRInt32 port) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddNoProxyFor(host, port); } \
  NS_IMETHOD RemoveNoProxyFor(const char *host, PRInt32 port) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveNoProxyFor(host, port); } \
  NS_IMETHOD ConfigureFromPAC(const char *url) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfigureFromPAC(url); } 

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

/* Header file */
class nsProtocolProxyService : public nsIProtocolProxyService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPROTOCOLPROXYSERVICE

  nsProtocolProxyService();
  virtual ~nsProtocolProxyService();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsProtocolProxyService, nsIProtocolProxyService)

nsProtocolProxyService::nsProtocolProxyService()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

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

/* readonly attribute PRBool proxyEnabled; */
NS_IMETHODIMP nsProtocolProxyService::GetProxyEnabled(PRBool *aProxyEnabled)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIProxyInfo examineForProxy (in nsIURI aURI); */
NS_IMETHODIMP nsProtocolProxyService::ExamineForProxy(nsIURI *aURI, nsIProxyInfo **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIProxyInfo newProxyInfo (in string type, in string host, in long port); */
NS_IMETHODIMP nsProtocolProxyService::NewProxyInfo(const char *type, const char *host, PRInt32 port, nsIProxyInfo **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addNoProxyFor (in string host, in long port); */
NS_IMETHODIMP nsProtocolProxyService::AddNoProxyFor(const char *host, PRInt32 port)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeNoProxyFor (in string host, in long port); */
NS_IMETHODIMP nsProtocolProxyService::RemoveNoProxyFor(const char *host, PRInt32 port)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void configureFromPAC (in string url); */
NS_IMETHODIMP nsProtocolProxyService::ConfigureFromPAC(const char *url)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIProtocolProxyService_h__ */
