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

#ifndef __gen_nsIXULTemplateBuilder_h__
#define __gen_nsIXULTemplateBuilder_h__


#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif

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

#ifndef __gen_nsIRDFCompositeDataSource_h__
#include "nsIRDFCompositeDataSource.h"
#endif

#ifndef __gen_nsIRDFResource_h__
#include "nsIRDFResource.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:    nsIXULTemplateBuilder */
#define NS_IXULTEMPLATEBUILDER_IID_STR "fb744f8e-1dd1-11b2-a5d7-935c9ab60602"

#define NS_IXULTEMPLATEBUILDER_IID \
  {0xfb744f8e, 0x1dd1, 0x11b2, \
    { 0xa5, 0xd7, 0x93, 0x5c, 0x9a, 0xb6, 0x06, 0x02 }}

class NS_NO_VTABLE nsIXULTemplateBuilder : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXULTEMPLATEBUILDER_IID)

  /**
     * The ``root'' node in the DOM to which this builder is attached
     */
  /* readonly attribute nsIDOMElement root; */
  NS_IMETHOD GetRoot(nsIDOMElement * *aRoot) = 0;

  /**
     * The composite datasource that the template builder observes
     * and uses to create content
     */
  /* readonly attribute nsIRDFCompositeDataSource database; */
  NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase) = 0;

  /**
     * Force the template builder to rebuild its content.
     */
  /* void rebuild (); */
  NS_IMETHOD Rebuild(void) = 0;

  /**
     * Called to initialize a XUL content builder on a particular root
     * element. This element presumably has a ``datasources''
     * attribute, which the builder will parse to set up the template
     * builder's datasources.
     */
  /* [noscript] void init (in nsIContent_ptr aElement); */
  NS_IMETHOD Init(nsIContent * aElement) = 0;

  /**
     * Invoked lazily by a XUL element that needs its child content
     * built.
     */
  /* [noscript] void createContents (in nsIContent_ptr aElement); */
  NS_IMETHOD CreateContents(nsIContent * aElement) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIXULTEMPLATEBUILDER \
  NS_IMETHOD GetRoot(nsIDOMElement * *aRoot); \
  NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase); \
  NS_IMETHOD Rebuild(void); \
  NS_IMETHOD Init(nsIContent * aElement); \
  NS_IMETHOD CreateContents(nsIContent * aElement); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIXULTEMPLATEBUILDER(_to) \
  NS_IMETHOD GetRoot(nsIDOMElement * *aRoot) { return _to GetRoot(aRoot); } \
  NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase) { return _to GetDatabase(aDatabase); } \
  NS_IMETHOD Rebuild(void) { return _to Rebuild(); } \
  NS_IMETHOD Init(nsIContent * aElement) { return _to Init(aElement); } \
  NS_IMETHOD CreateContents(nsIContent * aElement) { return _to CreateContents(aElement); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIXULTEMPLATEBUILDER(_to) \
  NS_IMETHOD GetRoot(nsIDOMElement * *aRoot) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRoot(aRoot); } \
  NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDatabase(aDatabase); } \
  NS_IMETHOD Rebuild(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Rebuild(); } \
  NS_IMETHOD Init(nsIContent * aElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aElement); } \
  NS_IMETHOD CreateContents(nsIContent * aElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateContents(aElement); } 

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

/* Header file */
class nsXULTemplateBuilder : public nsIXULTemplateBuilder
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIXULTEMPLATEBUILDER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsXULTemplateBuilder, nsIXULTemplateBuilder)

nsXULTemplateBuilder::nsXULTemplateBuilder()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

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

/* readonly attribute nsIDOMElement root; */
NS_IMETHODIMP nsXULTemplateBuilder::GetRoot(nsIDOMElement * *aRoot)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIRDFCompositeDataSource database; */
NS_IMETHODIMP nsXULTemplateBuilder::GetDatabase(nsIRDFCompositeDataSource * *aDatabase)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void rebuild (); */
NS_IMETHODIMP nsXULTemplateBuilder::Rebuild()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void init (in nsIContent_ptr aElement); */
NS_IMETHODIMP nsXULTemplateBuilder::Init(nsIContent * aElement)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void createContents (in nsIContent_ptr aElement); */
NS_IMETHODIMP nsXULTemplateBuilder::CreateContents(nsIContent * aElement)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIXULTreeBuilderObserver */
#define NS_IXULTREEBUILDEROBSERVER_IID_STR "f6ed69be-1dd1-11b2-adfc-9db02ac57d88"

#define NS_IXULTREEBUILDEROBSERVER_IID \
  {0xf6ed69be, 0x1dd1, 0x11b2, \
    { 0xad, 0xfc, 0x9d, 0xb0, 0x2a, 0xc5, 0x7d, 0x88 }}

/**
 * nsIXULTreeBuilderObserver
 *  This interface allows clients of the XULTreeBuilder to define domain 
 *  specific handling of specific nsITreeView methods that 
 *  XULTreeBuilder does not implement.
 */
class NS_NO_VTABLE nsIXULTreeBuilderObserver : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXULTREEBUILDEROBSERVER_IID)

  /**
     * Methods used by the drag feedback code to determine if a drag is allowable at
     * the current location. To get the behavior where drops are only allowed on
     * items, such as the mailNews folder pane, always return false from |canDropBeforeAfter()|.
     */
  /* boolean canDropOn (in long index); */
  NS_IMETHOD CanDropOn(PRInt32 index, PRBool *_retval) = 0;

  /* boolean canDropBeforeAfter (in long index, in boolean before); */
  NS_IMETHOD CanDropBeforeAfter(PRInt32 index, PRBool before, PRBool *_retval) = 0;

  /**
     * Called when the user drops something on this view. The |orientation| param
     * specifies before/on/after the given |row|.
     */
  enum { inDropBefore = 1 };

  enum { inDropOn = 2 };

  enum { inDropAfter = 3 };

  /* void onDrop (in long row, in long orientation); */
  NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation) = 0;

  /** 
     * Called when an item is opened or closed. 
     */
  /* void onToggleOpenState (in long index); */
  NS_IMETHOD OnToggleOpenState(PRInt32 index) = 0;

  /** 
	 * Called when a header is clicked.
     */
  /* void onCycleHeader (in wstring colID, in nsIDOMElement elt); */
  NS_IMETHOD OnCycleHeader(const PRUnichar *colID, nsIDOMElement *elt) = 0;

  /**
     * Called when a cell in a non-selectable cycling column (e.g. 
     * unread/flag/etc.) is clicked.
     */
  /* void onCycleCell (in long row, in wstring colID); */
  NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar *colID) = 0;

  /** 
     * Called when selection in the tree changes
     */
  /* void onSelectionChanged (); */
  NS_IMETHOD OnSelectionChanged(void) = 0;

  /** 
     * APIs for inline editing.  isEditable is called to ask the view if the 
     * cell contents are editable.  A value of true will result in the 
     * tree popping up a text field when the user tries to inline edit 
     * the cell. 
     */
  /* boolean isEditable (in long row, in wstring colID); */
  NS_IMETHOD IsEditable(PRInt32 row, const PRUnichar *colID, PRBool *_retval) = 0;

  /** 
     * onSetCellText is called when the contents of the cell have been edited by the user.
     */
  /* void onSetCellText (in long row, in wstring colID, in wstring value); */
  NS_IMETHOD OnSetCellText(PRInt32 row, const PRUnichar *colID, const PRUnichar *value) = 0;

  /**
     * A command API that can be used to invoke commands on the selection.  
     * The tree will automatically invoke this method when certain keys 
     * are pressed.  For example, when the DEL key is pressed, performAction 
     * will be called with the "delete" string. 
     */
  /* void onPerformAction (in wstring action); */
  NS_IMETHOD OnPerformAction(const PRUnichar *action) = 0;

  /**
     * A command API that can be used to invoke commands on a specific row.
     */
  /* void onPerformActionOnRow (in wstring action, in long row); */
  NS_IMETHOD OnPerformActionOnRow(const PRUnichar *action, PRInt32 row) = 0;

  /**
     * A command API that can be used to invoke commands on a specific cell.
     */
  /* void onPerformActionOnCell (in wstring action, in long row, in wstring colID); */
  NS_IMETHOD OnPerformActionOnCell(const PRUnichar *action, PRInt32 row, const PRUnichar *colID) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIXULTREEBUILDEROBSERVER \
  NS_IMETHOD CanDropOn(PRInt32 index, PRBool *_retval); \
  NS_IMETHOD CanDropBeforeAfter(PRInt32 index, PRBool before, PRBool *_retval); \
  NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation); \
  NS_IMETHOD OnToggleOpenState(PRInt32 index); \
  NS_IMETHOD OnCycleHeader(const PRUnichar *colID, nsIDOMElement *elt); \
  NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar *colID); \
  NS_IMETHOD OnSelectionChanged(void); \
  NS_IMETHOD IsEditable(PRInt32 row, const PRUnichar *colID, PRBool *_retval); \
  NS_IMETHOD OnSetCellText(PRInt32 row, const PRUnichar *colID, const PRUnichar *value); \
  NS_IMETHOD OnPerformAction(const PRUnichar *action); \
  NS_IMETHOD OnPerformActionOnRow(const PRUnichar *action, PRInt32 row); \
  NS_IMETHOD OnPerformActionOnCell(const PRUnichar *action, PRInt32 row, const PRUnichar *colID); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIXULTREEBUILDEROBSERVER(_to) \
  NS_IMETHOD CanDropOn(PRInt32 index, PRBool *_retval) { return _to CanDropOn(index, _retval); } \
  NS_IMETHOD CanDropBeforeAfter(PRInt32 index, PRBool before, PRBool *_retval) { return _to CanDropBeforeAfter(index, before, _retval); } \
  NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation) { return _to OnDrop(row, orientation); } \
  NS_IMETHOD OnToggleOpenState(PRInt32 index) { return _to OnToggleOpenState(index); } \
  NS_IMETHOD OnCycleHeader(const PRUnichar *colID, nsIDOMElement *elt) { return _to OnCycleHeader(colID, elt); } \
  NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar *colID) { return _to OnCycleCell(row, colID); } \
  NS_IMETHOD OnSelectionChanged(void) { return _to OnSelectionChanged(); } \
  NS_IMETHOD IsEditable(PRInt32 row, const PRUnichar *colID, PRBool *_retval) { return _to IsEditable(row, colID, _retval); } \
  NS_IMETHOD OnSetCellText(PRInt32 row, const PRUnichar *colID, const PRUnichar *value) { return _to OnSetCellText(row, colID, value); } \
  NS_IMETHOD OnPerformAction(const PRUnichar *action) { return _to OnPerformAction(action); } \
  NS_IMETHOD OnPerformActionOnRow(const PRUnichar *action, PRInt32 row) { return _to OnPerformActionOnRow(action, row); } \
  NS_IMETHOD OnPerformActionOnCell(const PRUnichar *action, PRInt32 row, const PRUnichar *colID) { return _to OnPerformActionOnCell(action, row, colID); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIXULTREEBUILDEROBSERVER(_to) \
  NS_IMETHOD CanDropOn(PRInt32 index, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanDropOn(index, _retval); } \
  NS_IMETHOD CanDropBeforeAfter(PRInt32 index, PRBool before, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanDropBeforeAfter(index, before, _retval); } \
  NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDrop(row, orientation); } \
  NS_IMETHOD OnToggleOpenState(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnToggleOpenState(index); } \
  NS_IMETHOD OnCycleHeader(const PRUnichar *colID, nsIDOMElement *elt) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCycleHeader(colID, elt); } \
  NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar *colID) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCycleCell(row, colID); } \
  NS_IMETHOD OnSelectionChanged(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSelectionChanged(); } \
  NS_IMETHOD IsEditable(PRInt32 row, const PRUnichar *colID, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsEditable(row, colID, _retval); } \
  NS_IMETHOD OnSetCellText(PRInt32 row, const PRUnichar *colID, const PRUnichar *value) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSetCellText(row, colID, value); } \
  NS_IMETHOD OnPerformAction(const PRUnichar *action) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPerformAction(action); } \
  NS_IMETHOD OnPerformActionOnRow(const PRUnichar *action, PRInt32 row) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPerformActionOnRow(action, row); } \
  NS_IMETHOD OnPerformActionOnCell(const PRUnichar *action, PRInt32 row, const PRUnichar *colID) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPerformActionOnCell(action, row, colID); } 

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

/* Header file */
class nsXULTreeBuilderObserver : public nsIXULTreeBuilderObserver
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIXULTREEBUILDEROBSERVER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsXULTreeBuilderObserver, nsIXULTreeBuilderObserver)

nsXULTreeBuilderObserver::nsXULTreeBuilderObserver()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

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

/* boolean canDropOn (in long index); */
NS_IMETHODIMP nsXULTreeBuilderObserver::CanDropOn(PRInt32 index, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean canDropBeforeAfter (in long index, in boolean before); */
NS_IMETHODIMP nsXULTreeBuilderObserver::CanDropBeforeAfter(PRInt32 index, PRBool before, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onDrop (in long row, in long orientation); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnDrop(PRInt32 row, PRInt32 orientation)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onToggleOpenState (in long index); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnToggleOpenState(PRInt32 index)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onCycleHeader (in wstring colID, in nsIDOMElement elt); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnCycleHeader(const PRUnichar *colID, nsIDOMElement *elt)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onCycleCell (in long row, in wstring colID); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnCycleCell(PRInt32 row, const PRUnichar *colID)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onSelectionChanged (); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnSelectionChanged()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean isEditable (in long row, in wstring colID); */
NS_IMETHODIMP nsXULTreeBuilderObserver::IsEditable(PRInt32 row, const PRUnichar *colID, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onSetCellText (in long row, in wstring colID, in wstring value); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnSetCellText(PRInt32 row, const PRUnichar *colID, const PRUnichar *value)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onPerformAction (in wstring action); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnPerformAction(const PRUnichar *action)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onPerformActionOnRow (in wstring action, in long row); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnPerformActionOnRow(const PRUnichar *action, PRInt32 row)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onPerformActionOnCell (in wstring action, in long row, in wstring colID); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnPerformActionOnCell(const PRUnichar *action, PRInt32 row, const PRUnichar *colID)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIXULTreeBuilder */
#define NS_IXULTREEBUILDER_IID_STR "06b31b15-ebf5-4e74-a0e2-6bc0a18a3969"

#define NS_IXULTREEBUILDER_IID \
  {0x06b31b15, 0xebf5, 0x4e74, \
    { 0xa0, 0xe2, 0x6b, 0xc0, 0xa1, 0x8a, 0x39, 0x69 }}

class NS_NO_VTABLE nsIXULTreeBuilder : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXULTREEBUILDER_IID)

  /**
     * Retrieve the RDF resource associated with the specified row.
     */
  /* nsIRDFResource getResourceAtIndex (in long aRowIndex); */
  NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource **_retval) = 0;

  /**
     * Retrieve the index associated with specified RDF resource.
     */
  /* long getIndexOfResource (in nsIRDFResource resource); */
  NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval) = 0;

  /** 
     * Add a Tree Builder Observer to handle Tree View 
     * methods that the base builder does not implement. 
     */
  /* void addObserver (in nsIXULTreeBuilderObserver aObserver); */
  NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver) = 0;

  /** 
     * Remove an Tree Builder Observer.
     */
  /* void removeObserver (in nsIXULTreeBuilderObserver aObserver); */
  NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver) = 0;

  /** 
     * Sort the contents of the tree using the specified column.
     */
  /* void sort (in nsIDOMElement aColumnElement); */
  NS_IMETHOD Sort(nsIDOMElement *aColumnElement) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIXULTREEBUILDER \
  NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource **_retval); \
  NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval); \
  NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver); \
  NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver); \
  NS_IMETHOD Sort(nsIDOMElement *aColumnElement); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIXULTREEBUILDER(_to) \
  NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource **_retval) { return _to GetResourceAtIndex(aRowIndex, _retval); } \
  NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval) { return _to GetIndexOfResource(resource, _retval); } \
  NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver) { return _to AddObserver(aObserver); } \
  NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver) { return _to RemoveObserver(aObserver); } \
  NS_IMETHOD Sort(nsIDOMElement *aColumnElement) { return _to Sort(aColumnElement); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIXULTREEBUILDER(_to) \
  NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResourceAtIndex(aRowIndex, _retval); } \
  NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIndexOfResource(resource, _retval); } \
  NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(aObserver); } \
  NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(aObserver); } \
  NS_IMETHOD Sort(nsIDOMElement *aColumnElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->Sort(aColumnElement); } 

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

/* Header file */
class nsXULTreeBuilder : public nsIXULTreeBuilder
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIXULTREEBUILDER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsXULTreeBuilder, nsIXULTreeBuilder)

nsXULTreeBuilder::nsXULTreeBuilder()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

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

/* nsIRDFResource getResourceAtIndex (in long aRowIndex); */
NS_IMETHODIMP nsXULTreeBuilder::GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* long getIndexOfResource (in nsIRDFResource resource); */
NS_IMETHODIMP nsXULTreeBuilder::GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addObserver (in nsIXULTreeBuilderObserver aObserver); */
NS_IMETHODIMP nsXULTreeBuilder::AddObserver(nsIXULTreeBuilderObserver *aObserver)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeObserver (in nsIXULTreeBuilderObserver aObserver); */
NS_IMETHODIMP nsXULTreeBuilder::RemoveObserver(nsIXULTreeBuilderObserver *aObserver)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void sort (in nsIDOMElement aColumnElement); */
NS_IMETHODIMP nsXULTreeBuilder::Sort(nsIDOMElement *aColumnElement)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIXULTemplateBuilder_h__ */
