/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Linux_2.6.18-8.el5_Depend/mozilla/uriloader/exthandler/nsIHandlerService.idl
 */

#ifndef __gen_nsIHandlerService_h__
#define __gen_nsIHandlerService_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
class nsIHandlerInfo; /* forward declaration */

class nsISimpleEnumerator; /* forward declaration */


/* starting interface:    nsIHandlerService */
#define NS_IHANDLERSERVICE_IID_STR "18bd7cc7-04b5-46d1-ad95-386e51191eb2"

#define NS_IHANDLERSERVICE_IID \
  {0x18bd7cc7, 0x04b5, 0x46d1, \
    { 0xad, 0x95, 0x38, 0x6e, 0x51, 0x19, 0x1e, 0xb2 }}

class NS_NO_VTABLE nsIHandlerService : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IHANDLERSERVICE_IID)

  /**
   * Retrieve a list of all handlers in the datastore.  This list is not
   * guaranteed to be in any particular order, and callers should not assume
   * it will remain in the same order in the future.
   *
   * @returns a list of all handlers in the datastore
   */
  /* nsISimpleEnumerator enumerate (); */
  NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval) = 0;

  /**
   * Save the preferred action, preferred handler, and always ask properties
   * of the given handler info object to the datastore.  Updates an existing
   * record or creates a new one if necessary.
   *
   * Note: if preferred action is undefined or invalid, then we assume
   * the default value nsIHandlerInfo::useHelperApp.
   *
   * FIXME: also store any changes to the list of possible handlers
   * (once we support possible handlers).
   *
   * @param aHandlerInfo  the handler info object
   */
  /* void store (in nsIHandlerInfo aHandlerInfo); */
  NS_IMETHOD Store(nsIHandlerInfo *aHandlerInfo) = 0;

  /**
   * Remove the given handler info object from the datastore.  Deletes all
   * records associated with the object, including the preferred handler, info,
   * and type records plus the entry in the list of types, if they exist.
   * Otherwise, it does nothing and does not return an error.
   *
   * @param aHandlerInfo  the handler info object
   */
  /* void remove (in nsIHandlerInfo aHandlerInfo); */
  NS_IMETHOD Remove(nsIHandlerInfo *aHandlerInfo) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIHandlerService, NS_IHANDLERSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIHANDLERSERVICE \
  NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval); \
  NS_IMETHOD Store(nsIHandlerInfo *aHandlerInfo); \
  NS_IMETHOD Remove(nsIHandlerInfo *aHandlerInfo); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIHANDLERSERVICE(_to) \
  NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval) { return _to Enumerate(_retval); } \
  NS_IMETHOD Store(nsIHandlerInfo *aHandlerInfo) { return _to Store(aHandlerInfo); } \
  NS_IMETHOD Remove(nsIHandlerInfo *aHandlerInfo) { return _to Remove(aHandlerInfo); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIHANDLERSERVICE(_to) \
  NS_IMETHOD Enumerate(nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Enumerate(_retval); } \
  NS_IMETHOD Store(nsIHandlerInfo *aHandlerInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->Store(aHandlerInfo); } \
  NS_IMETHOD Remove(nsIHandlerInfo *aHandlerInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(aHandlerInfo); } 

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

/* Header file */
class nsHandlerService : public nsIHandlerService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIHANDLERSERVICE

  nsHandlerService();

private:
  ~nsHandlerService();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsHandlerService, nsIHandlerService)

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

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

/* nsISimpleEnumerator enumerate (); */
NS_IMETHODIMP nsHandlerService::Enumerate(nsISimpleEnumerator **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void store (in nsIHandlerInfo aHandlerInfo); */
NS_IMETHODIMP nsHandlerService::Store(nsIHandlerInfo *aHandlerInfo)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void remove (in nsIHandlerInfo aHandlerInfo); */
NS_IMETHODIMP nsHandlerService::Remove(nsIHandlerInfo *aHandlerInfo)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIHandlerService_h__ */
