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

#ifndef __gen_nsIXPathNodeSelector_h__
#define __gen_nsIXPathNodeSelector_h__


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

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

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
#include "nsString.h"

/* starting interface:    nsIXPathNodeSelector */
#define NS_IXPATHNODESELECTOR_IID_STR "f70c3f08-1dd1-11b2-b582-db02dfacb173"

#define NS_IXPATHNODESELECTOR_IID \
  {0xf70c3f08, 0x1dd1, 0x11b2, \
    { 0xb5, 0x82, 0xdb, 0x02, 0xdf, 0xac, 0xb1, 0x73 }}

/**
 * The nsIXPathNodeSelector can be used to query a DOM tree using XPath.
 */
class NS_NO_VTABLE nsIXPathNodeSelector : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXPATHNODESELECTOR_IID)

  /**
   * Return a nodelist that is the result of an XPath query of the tree
   * fragment starting with the context node.
   *
   * @param aContextNode The context node for the query.
   * @param aPattern The pattern for the query.
   *
   * @returns The result of the XPath query.
   */
  /* nsIDOMNodeList selectNodes (in nsIDOMNode aContextNode, in DOMString aPattern); */
  NS_IMETHOD SelectNodes(nsIDOMNode *aContextNode, const nsAString & aPattern, nsIDOMNodeList **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIXPATHNODESELECTOR \
  NS_IMETHOD SelectNodes(nsIDOMNode *aContextNode, const nsAString & aPattern, nsIDOMNodeList **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIXPATHNODESELECTOR(_to) \
  NS_IMETHOD SelectNodes(nsIDOMNode *aContextNode, const nsAString & aPattern, nsIDOMNodeList **_retval) { return _to SelectNodes(aContextNode, aPattern, _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_NSIXPATHNODESELECTOR(_to) \
  NS_IMETHOD SelectNodes(nsIDOMNode *aContextNode, const nsAString & aPattern, nsIDOMNodeList **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectNodes(aContextNode, aPattern, _retval); } 

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

/* Header file */
class nsXPathNodeSelector : public nsIXPathNodeSelector
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIXPATHNODESELECTOR

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsXPathNodeSelector, nsIXPathNodeSelector)

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

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

/* nsIDOMNodeList selectNodes (in nsIDOMNode aContextNode, in DOMString aPattern); */
NS_IMETHODIMP nsXPathNodeSelector::SelectNodes(nsIDOMNode *aContextNode, const nsAString & aPattern, nsIDOMNodeList **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

extern nsresult
NS_NewXPathNodeSelector(nsIXPathNodeSelector** aNodeSelector);

#endif /* __gen_nsIXPathNodeSelector_h__ */
