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

#ifndef __gen_nsIUrlListManager_h__
#define __gen_nsIUrlListManager_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:    nsIUrlListManagerCallback */
#define NS_IURLLISTMANAGERCALLBACK_IID_STR "ba913c5c-13d6-41eb-83c1-de2f4165a516"

#define NS_IURLLISTMANAGERCALLBACK_IID \
  {0xba913c5c, 0x13d6, 0x41eb, \
    { 0x83, 0xc1, 0xde, 0x2f, 0x41, 0x65, 0xa5, 0x16 }}

/**
 * Interface for a class that manages updates of multiple nsIUrlClassifierTables.
 */
class NS_NO_VTABLE nsIUrlListManagerCallback : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IURLLISTMANAGERCALLBACK_IID)

  /* void handleEvent (in boolean value); */
  NS_IMETHOD HandleEvent(PRBool value) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIURLLISTMANAGERCALLBACK \
  NS_IMETHOD HandleEvent(PRBool value); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIURLLISTMANAGERCALLBACK(_to) \
  NS_IMETHOD HandleEvent(PRBool value) { return _to HandleEvent(value); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIURLLISTMANAGERCALLBACK(_to) \
  NS_IMETHOD HandleEvent(PRBool value) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleEvent(value); } 

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

/* Header file */
class nsUrlListManagerCallback : public nsIUrlListManagerCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIURLLISTMANAGERCALLBACK

  nsUrlListManagerCallback();

private:
  ~nsUrlListManagerCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsUrlListManagerCallback, nsIUrlListManagerCallback)

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

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

/* void handleEvent (in boolean value); */
NS_IMETHODIMP nsUrlListManagerCallback::HandleEvent(PRBool value)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIUrlListManager */
#define NS_IURLLISTMANAGER_IID_STR "d39982d6-da4f-4a27-8d91-f9c7b179aa33"

#define NS_IURLLISTMANAGER_IID \
  {0xd39982d6, 0xda4f, 0x4a27, \
    { 0x8d, 0x91, 0xf9, 0xc7, 0xb1, 0x79, 0xaa, 0x33 }}

class NS_NO_VTABLE nsIUrlListManager : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IURLLISTMANAGER_IID)

  /**
     * Set the URL we check for updates.
     */
  /* void setUpdateUrl (in ACString url); */
  NS_IMETHOD SetUpdateUrl(const nsACString & url) = 0;

  /**
     * Set the URL we use to get keys used to decrypt URLs in
     * enchash tables.
     */
  /* void setKeyUrl (in ACString url); */
  NS_IMETHOD SetKeyUrl(const nsACString & url) = 0;

  /**
     * Add a table to the list of tables we are managing.  The name is a
     * string of the format provider_name-semantic_type-table_type.  For
     * example, goog-white-enchash or goog-black-url.
     */
  /* boolean registerTable (in ACString tableName, in boolean requireMac); */
  NS_IMETHOD RegisterTable(const nsACString & tableName, PRBool requireMac, PRBool *_retval) = 0;

  /**
     * Turn on update checking for a table.  I.e., during the next server
     * check, download updates for this table.
     */
  /* void enableUpdate (in ACString tableName); */
  NS_IMETHOD EnableUpdate(const nsACString & tableName) = 0;

  /**
     * Turn off update checking for a table.
     */
  /* void disableUpdate (in ACString tableName); */
  NS_IMETHOD DisableUpdate(const nsACString & tableName) = 0;

  /**
     * Lookup a key in a table.  Should not raise exceptions.  Calls
     * the callback function with a single parameter: true if the key
     * is in the table, false if it isn't.
     */
  /* void safeExists (in ACString tableName, in ACString key, in nsIUrlListManagerCallback cb); */
  NS_IMETHOD SafeExists(const nsACString & tableName, const nsACString & key, nsIUrlListManagerCallback *cb) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIURLLISTMANAGER \
  NS_IMETHOD SetUpdateUrl(const nsACString & url); \
  NS_IMETHOD SetKeyUrl(const nsACString & url); \
  NS_IMETHOD RegisterTable(const nsACString & tableName, PRBool requireMac, PRBool *_retval); \
  NS_IMETHOD EnableUpdate(const nsACString & tableName); \
  NS_IMETHOD DisableUpdate(const nsACString & tableName); \
  NS_IMETHOD SafeExists(const nsACString & tableName, const nsACString & key, nsIUrlListManagerCallback *cb); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIURLLISTMANAGER(_to) \
  NS_IMETHOD SetUpdateUrl(const nsACString & url) { return _to SetUpdateUrl(url); } \
  NS_IMETHOD SetKeyUrl(const nsACString & url) { return _to SetKeyUrl(url); } \
  NS_IMETHOD RegisterTable(const nsACString & tableName, PRBool requireMac, PRBool *_retval) { return _to RegisterTable(tableName, requireMac, _retval); } \
  NS_IMETHOD EnableUpdate(const nsACString & tableName) { return _to EnableUpdate(tableName); } \
  NS_IMETHOD DisableUpdate(const nsACString & tableName) { return _to DisableUpdate(tableName); } \
  NS_IMETHOD SafeExists(const nsACString & tableName, const nsACString & key, nsIUrlListManagerCallback *cb) { return _to SafeExists(tableName, key, cb); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIURLLISTMANAGER(_to) \
  NS_IMETHOD SetUpdateUrl(const nsACString & url) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUpdateUrl(url); } \
  NS_IMETHOD SetKeyUrl(const nsACString & url) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetKeyUrl(url); } \
  NS_IMETHOD RegisterTable(const nsACString & tableName, PRBool requireMac, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterTable(tableName, requireMac, _retval); } \
  NS_IMETHOD EnableUpdate(const nsACString & tableName) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnableUpdate(tableName); } \
  NS_IMETHOD DisableUpdate(const nsACString & tableName) { return !_to ? NS_ERROR_NULL_POINTER : _to->DisableUpdate(tableName); } \
  NS_IMETHOD SafeExists(const nsACString & tableName, const nsACString & key, nsIUrlListManagerCallback *cb) { return !_to ? NS_ERROR_NULL_POINTER : _to->SafeExists(tableName, key, cb); } 

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

/* Header file */
class nsUrlListManager : public nsIUrlListManager
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIURLLISTMANAGER

  nsUrlListManager();

private:
  ~nsUrlListManager();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsUrlListManager, nsIUrlListManager)

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

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

/* void setUpdateUrl (in ACString url); */
NS_IMETHODIMP nsUrlListManager::SetUpdateUrl(const nsACString & url)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setKeyUrl (in ACString url); */
NS_IMETHODIMP nsUrlListManager::SetKeyUrl(const nsACString & url)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean registerTable (in ACString tableName, in boolean requireMac); */
NS_IMETHODIMP nsUrlListManager::RegisterTable(const nsACString & tableName, PRBool requireMac, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void enableUpdate (in ACString tableName); */
NS_IMETHODIMP nsUrlListManager::EnableUpdate(const nsACString & tableName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void disableUpdate (in ACString tableName); */
NS_IMETHODIMP nsUrlListManager::DisableUpdate(const nsACString & tableName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void safeExists (in ACString tableName, in ACString key, in nsIUrlListManagerCallback cb); */
NS_IMETHODIMP nsUrlListManager::SafeExists(const nsACString & tableName, const nsACString & key, nsIUrlListManagerCallback *cb)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIUrlListManager_h__ */
