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

#ifndef __gen_nsICookiePermission_h__
#define __gen_nsICookiePermission_h__


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

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
/**
 * An interface to test for cookie permissions
 */
class nsICookie; /* forward declaration */

class nsIURI; /* forward declaration */

class nsIDOMWindow; /* forward declaration */


/* starting interface:    nsICookiePermission */
#define NS_ICOOKIEPERMISSION_IID_STR "ef565d0a-ab9a-4a13-9160-0644cdfd859a"

#define NS_ICOOKIEPERMISSION_IID \
  {0xef565d0a, 0xab9a, 0x4a13, \
    { 0x91, 0x60, 0x06, 0x44, 0xcd, 0xfd, 0x85, 0x9a }}

class NS_NO_VTABLE nsICookiePermission : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOOKIEPERMISSION_IID)

  /**
   * Test if a cookie from the given host should be accepted or denied
   * @param uri             the website to be tested
   * @param cookie          the cookie that wants to be set
   * @param parent          the parant window
   * @param cookiesFromHost number of cookies this host already has set
   * @param changingCookie  are we changing this cookie?
   * @param showDialog      show a prompt to the user?
   * @return                 whether the cookie has permission to be loaded
   */
  /* boolean testPermission (in nsIURI uri, in nsICookie cookie, in nsIDOMWindow parent, in long cookiesFromHost, in boolean changingCookie, in boolean showDialog); */
  NS_IMETHOD TestPermission(nsIURI *uri, nsICookie *cookie, nsIDOMWindow *parent, PRInt32 cookiesFromHost, PRBool changingCookie, PRBool showDialog, PRBool *_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICOOKIEPERMISSION \
  NS_IMETHOD TestPermission(nsIURI *uri, nsICookie *cookie, nsIDOMWindow *parent, PRInt32 cookiesFromHost, PRBool changingCookie, PRBool showDialog, PRBool *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICOOKIEPERMISSION(_to) \
  NS_IMETHOD TestPermission(nsIURI *uri, nsICookie *cookie, nsIDOMWindow *parent, PRInt32 cookiesFromHost, PRBool changingCookie, PRBool showDialog, PRBool *_retval) { return _to TestPermission(uri, cookie, parent, cookiesFromHost, changingCookie, showDialog, _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_NSICOOKIEPERMISSION(_to) \
  NS_IMETHOD TestPermission(nsIURI *uri, nsICookie *cookie, nsIDOMWindow *parent, PRInt32 cookiesFromHost, PRBool changingCookie, PRBool showDialog, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->TestPermission(uri, cookie, parent, cookiesFromHost, changingCookie, showDialog, _retval); } 

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

/* Header file */
class nsCookiePermission : public nsICookiePermission
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSICOOKIEPERMISSION

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsCookiePermission, nsICookiePermission)

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

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

/* boolean testPermission (in nsIURI uri, in nsICookie cookie, in nsIDOMWindow parent, in long cookiesFromHost, in boolean changingCookie, in boolean showDialog); */
NS_IMETHODIMP nsCookiePermission::TestPermission(nsIURI *uri, nsICookie *cookie, nsIDOMWindow *parent, PRInt32 cookiesFromHost, PRBool changingCookie, PRBool showDialog, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define NS_COOKIEPERMISSION_CONTRACTID "@mozilla.org/cookie/permission;1"

#endif /* __gen_nsICookiePermission_h__ */
