/*
 * 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
#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 }}

/**
 * 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 nsNetCID.h
 */
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;

  /* void examineForProxy (in nsIURI aURI, out string host, out long port, out string type); */
  NS_IMETHOD ExamineForProxy(nsIURI *aURI, char **host, PRInt32 *port, char **type) = 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;

};

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

/* 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, char **host, PRInt32 *port, char **type) { return _to ## ExamineForProxy(aURI, host, port, type); } \
  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); } 

/* 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, char **host, PRInt32 *port, char **type) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> ExamineForProxy(aURI, host, port, type); } \
  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); } 

#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;
}

/* void examineForProxy (in nsIURI aURI, out string host, out long port, out string type); */
NS_IMETHODIMP nsProtocolProxyService::ExamineForProxy(nsIURI *aURI, char **host, PRInt32 *port, char **type)
{
    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;
}

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


#endif /* __gen_nsIProtocolProxyService_h__ */
