/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM h:/projects/mozilla/mozilla/extensions/p3p/public/nsIPolicyListener.idl
 */

#ifndef __gen_nsIPolicyListener_h__
#define __gen_nsIPolicyListener_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

/* starting interface:    nsIPolicyListener */
#define NS_IPOLICYLISTENER_IID_STR "05d74f35-5081-4c01-b814-34f44dd8eb50"

#define NS_IPOLICYLISTENER_IID \
  {0x05d74f35, 0x5081, 0x4c01, \
    { 0xb8, 0x14, 0x34, 0xf4, 0x4d, 0xd8, 0xeb, 0x50 }}

class NS_NO_VTABLE nsIPolicyListener : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPOLICYLISTENER_IID)

  /**
   * Notify listeners about the availabiltiy of a policy
   *
   * @param aPolicyLocation -> Points to the sites full p3p policy
   * @param aError          -> POLICY_LOAD_SUCCESS | POLICY_LOAD_FAILURE | POLICY_LIFE_EXPIRED | POLICY_SYNTAX_ERROR
   *
   */
  /* void notifyPolicyLocation (in string aPolicyLocation, in long aError); */
  NS_IMETHOD NotifyPolicyLocation(const char *aPolicyLocation, PRInt32 aError) = 0;

  /**
   * Notify an error to the listener
   *
   * @param aError          -> POLICY_LOAD_FAILURE | POLICY_LIFE_EXPIRED | POLICY_SYNTAX_ERROR
   *
   */
  /* void notifyPolicyError (in long aError); */
  NS_IMETHOD NotifyPolicyError(PRInt32 aError) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPOLICYLISTENER \
  NS_IMETHOD NotifyPolicyLocation(const char *aPolicyLocation, PRInt32 aError); \
  NS_IMETHOD NotifyPolicyError(PRInt32 aError); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPOLICYLISTENER(_to) \
  NS_IMETHOD NotifyPolicyLocation(const char *aPolicyLocation, PRInt32 aError) { return _to NotifyPolicyLocation(aPolicyLocation, aError); } \
  NS_IMETHOD NotifyPolicyError(PRInt32 aError) { return _to NotifyPolicyError(aError); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPOLICYLISTENER(_to) \
  NS_IMETHOD NotifyPolicyLocation(const char *aPolicyLocation, PRInt32 aError) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyPolicyLocation(aPolicyLocation, aError); } \
  NS_IMETHOD NotifyPolicyError(PRInt32 aError) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyPolicyError(aError); } 

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

/* Header file */
class nsPolicyListener : public nsIPolicyListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPOLICYLISTENER

  nsPolicyListener();

private:
  ~nsPolicyListener();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsPolicyListener, nsIPolicyListener)

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

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

/* void notifyPolicyLocation (in string aPolicyLocation, in long aError); */
NS_IMETHODIMP nsPolicyListener::NotifyPolicyLocation(const char *aPolicyLocation, PRInt32 aError)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyPolicyError (in long aError); */
NS_IMETHODIMP nsPolicyListener::NotifyPolicyError(PRInt32 aError)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIPolicyListener_h__ */
