/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/moz2_slave/mozilla-central-win32-xulrunner/build/modules/plugin/base/public/nsIPluginManager2.idl
 */

#ifndef __gen_nsIPluginManager2_h__
#define __gen_nsIPluginManager2_h__


#ifndef __gen_nsIPluginManager_h__
#include "nsIPluginManager.h"
#endif

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


/* starting interface:    nsIPluginManager2 */
#define NS_IPLUGINMANAGER2_IID_STR "c7706e95-2fd6-4701-992d-fa9d7787667b"

#define NS_IPLUGINMANAGER2_IID \
  {0xc7706e95, 0x2fd6, 0x4701, \
    { 0x99, 0x2d, 0xfa, 0x9d, 0x77, 0x87, 0x66, 0x7b }}

/**
 * Plugin Manager 2 Interface
 * These extensions to nsIPluginManager are only available in Communicator 5.0.
 */
class NS_NO_VTABLE nsIPluginManager2 : public nsIPluginManager {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPLUGINMANAGER2_IID)

  /**
   * Puts up a wait cursor.
   *
   * @result - NS_OK if this operation was successful
   */
  /* void beginWaitCursor (); */
  NS_IMETHOD BeginWaitCursor(void) = 0;

  /**
   * Restores the previous (non-wait) cursor.
   *
   * @result - NS_OK if this operation was successful
   */
  /* void endWaitCursor (); */
  NS_IMETHOD EndWaitCursor(void) = 0;

  /**
   * Returns true if a URL protocol (e.g. "http") is supported.
   *
   * @param aProtocol - the protocol name
   * @param aResult   - true if the protocol is supported
   * @result          - NS_OK if this operation was successful
   */
  /* void supportsURLProtocol (in string aProtocol, out boolean aResult); */
  NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult NS_OUTPARAM) = 0;

  /**
   * This method may be called by the plugin to indicate that an error 
   * has occurred, e.g. that the plugin has failed or is shutting down 
   * spontaneously. This allows the browser to clean up any plugin-specific 
   * state.
   *
   * @param aPlugin - the plugin whose status is changing
   * @param aStatus - the error status value
   * @result        - NS_OK if this operation was successful
   */
  /* void notifyStatusChange (in nsIPlugin aPlugin, in nsresult aStatus); */
  NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) = 0;

  /**
   * Returns the proxy info for a given URL. The caller is required to
   * free the resulting memory with nsIMalloc::Free. The result will be in the
   * following format
   * 
   *   i)   "DIRECT"  -- no proxy
   *   ii)  "PROXY xxx.xxx.xxx.xxx"   -- use proxy
   *   iii) "SOCKS xxx.xxx.xxx.xxx"  -- use SOCKS
   *   iv)  Mixed. e.g. "PROXY 111.111.111.111;PROXY 112.112.112.112",
   *                    "PROXY 111.111.111.111;SOCKS 112.112.112.112"....
   *
   * Which proxy/SOCKS to use is determined by the plugin.
   */
  /* void findProxyForURL (in string aURL, out string aResult); */
  NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult NS_OUTPARAM) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPluginManager2, NS_IPLUGINMANAGER2_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPLUGINMANAGER2 \
  NS_IMETHOD BeginWaitCursor(void); \
  NS_IMETHOD EndWaitCursor(void); \
  NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult NS_OUTPARAM); \
  NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus); \
  NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult NS_OUTPARAM); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPLUGINMANAGER2(_to) \
  NS_IMETHOD BeginWaitCursor(void) { return _to BeginWaitCursor(); } \
  NS_IMETHOD EndWaitCursor(void) { return _to EndWaitCursor(); } \
  NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult NS_OUTPARAM) { return _to SupportsURLProtocol(aProtocol, aResult); } \
  NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) { return _to NotifyStatusChange(aPlugin, aStatus); } \
  NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult NS_OUTPARAM) { return _to FindProxyForURL(aURL, aResult); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPLUGINMANAGER2(_to) \
  NS_IMETHOD BeginWaitCursor(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginWaitCursor(); } \
  NS_IMETHOD EndWaitCursor(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EndWaitCursor(); } \
  NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->SupportsURLProtocol(aProtocol, aResult); } \
  NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyStatusChange(aPlugin, aStatus); } \
  NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindProxyForURL(aURL, aResult); } 

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

/* Header file */
class nsPluginManager2 : public nsIPluginManager2
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPLUGINMANAGER2

  nsPluginManager2();

private:
  ~nsPluginManager2();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsPluginManager2, nsIPluginManager2)

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

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

/* void beginWaitCursor (); */
NS_IMETHODIMP nsPluginManager2::BeginWaitCursor()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void endWaitCursor (); */
NS_IMETHODIMP nsPluginManager2::EndWaitCursor()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void supportsURLProtocol (in string aProtocol, out boolean aResult); */
NS_IMETHODIMP nsPluginManager2::SupportsURLProtocol(const char *aProtocol, PRBool *aResult NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyStatusChange (in nsIPlugin aPlugin, in nsresult aStatus); */
NS_IMETHODIMP nsPluginManager2::NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void findProxyForURL (in string aURL, out string aResult); */
NS_IMETHODIMP nsPluginManager2::FindProxyForURL(const char *aURL, char **aResult NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIPluginManager2_h__ */
