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

#ifndef __gen_nsIResProtocolHandler_h__
#define __gen_nsIResProtocolHandler_h__


#ifndef __gen_nsIProtocolHandler_h__
#include "nsIProtocolHandler.h"
#endif

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

class nsISupportsArray; /* forward declaration */

#include "nsVoidArray.h"
#define NS_RESPROTOCOLHANDLER_CID                    \
{ /* e64f152a-9f07-11d3-8cda-0060b0fc14a3 */         \
    0xe64f152a,                                      \
    0x9f07,                                          \
    0x11d3,                                          \
    {0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
}

/* starting interface:    nsIResProtocolHandler */
#define NS_IRESPROTOCOLHANDLER_IID_STR "d12c08c6-9ef6-11d3-8cda-0060b0fc14a3"

#define NS_IRESPROTOCOLHANDLER_IID \
  {0xd12c08c6, 0x9ef6, 0x11d3, \
    { 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}

class NS_NO_VTABLE nsIResProtocolHandler : public nsIProtocolHandler {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IRESPROTOCOLHANDLER_IID)

  /**
     * Registers a new substitution for root key, e.g.:
     *   res://<root>/<path> ==> <url>/<path>
     * This substitution is put at the beginning of the list
     * so that it overrides existing substitutions.
     */
  /* void prependSubstitution (in string root, in string url); */
  NS_IMETHOD PrependSubstitution(const char *root, const char *url) = 0;

  /**
     * Registers a new substitution for root key, e.g.:
     *   res://<root>/<path> ==> <url>/<path>
     * This substitution is put at the end of the list
     * so that it doesn't override existing substitutions.
     */
  /* void appendSubstitution (in string root, in string url); */
  NS_IMETHOD AppendSubstitution(const char *root, const char *url) = 0;

  /**
     * Unregisters a previously registered substitution. If the
     * specified root is not found, or if the url string doesn't match
     * any registered entries, an error is returned. 
     */
  /* void removeSubstitution (in string root, in string url); */
  NS_IMETHOD RemoveSubstitution(const char *root, const char *url) = 0;

  /**
     * Returns an nsISupportsArray of nsIURIs containing all substitutions
     * currently registered for the root. This array is a snapshot of the 
     * registered entries so it can be iterated over without fear of
     * thread-safety concerns.
     */
  /* nsISupportsArray getSubstitutions (in string root); */
  NS_IMETHOD GetSubstitutions(const char *root, nsISupportsArray **_retval) = 0;

  /**
     * Returns true if substitutions are already defined for the specified root.
     */
  /* boolean hasSubstitutions (in string root); */
  NS_IMETHOD HasSubstitutions(const char *root, PRBool *_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIRESPROTOCOLHANDLER \
  NS_IMETHOD PrependSubstitution(const char *root, const char *url); \
  NS_IMETHOD AppendSubstitution(const char *root, const char *url); \
  NS_IMETHOD RemoveSubstitution(const char *root, const char *url); \
  NS_IMETHOD GetSubstitutions(const char *root, nsISupportsArray **_retval); \
  NS_IMETHOD HasSubstitutions(const char *root, PRBool *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIRESPROTOCOLHANDLER(_to) \
  NS_IMETHOD PrependSubstitution(const char *root, const char *url) { return _to ## PrependSubstitution(root, url); } \
  NS_IMETHOD AppendSubstitution(const char *root, const char *url) { return _to ## AppendSubstitution(root, url); } \
  NS_IMETHOD RemoveSubstitution(const char *root, const char *url) { return _to ## RemoveSubstitution(root, url); } \
  NS_IMETHOD GetSubstitutions(const char *root, nsISupportsArray **_retval) { return _to ## GetSubstitutions(root, _retval); } \
  NS_IMETHOD HasSubstitutions(const char *root, PRBool *_retval) { return _to ## HasSubstitutions(root, _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_NSIRESPROTOCOLHANDLER(_to) \
  NS_IMETHOD PrependSubstitution(const char *root, const char *url) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> PrependSubstitution(root, url); } \
  NS_IMETHOD AppendSubstitution(const char *root, const char *url) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> AppendSubstitution(root, url); } \
  NS_IMETHOD RemoveSubstitution(const char *root, const char *url) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> RemoveSubstitution(root, url); } \
  NS_IMETHOD GetSubstitutions(const char *root, nsISupportsArray **_retval) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> GetSubstitutions(root, _retval); } \
  NS_IMETHOD HasSubstitutions(const char *root, PRBool *_retval) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> HasSubstitutions(root, _retval); } 

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

/* Header file */
class nsResProtocolHandler : public nsIResProtocolHandler
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIRESPROTOCOLHANDLER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsResProtocolHandler, nsIResProtocolHandler)

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

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

/* void prependSubstitution (in string root, in string url); */
NS_IMETHODIMP nsResProtocolHandler::PrependSubstitution(const char *root, const char *url)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void appendSubstitution (in string root, in string url); */
NS_IMETHODIMP nsResProtocolHandler::AppendSubstitution(const char *root, const char *url)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeSubstitution (in string root, in string url); */
NS_IMETHODIMP nsResProtocolHandler::RemoveSubstitution(const char *root, const char *url)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISupportsArray getSubstitutions (in string root); */
NS_IMETHODIMP nsResProtocolHandler::GetSubstitutions(const char *root, nsISupportsArray **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean hasSubstitutions (in string root); */
NS_IMETHODIMP nsResProtocolHandler::HasSubstitutions(const char *root, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIResProtocolHandler_h__ */
