/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Linux_2.6.18-8.el5_Depend/mozilla/accessible/public/nsIAccessibleTreeCache.idl
 */

#ifndef __gen_nsIAccessibleTreeCache_h__
#define __gen_nsIAccessibleTreeCache_h__


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

#ifndef __gen_nsITreeColumns_h__
#include "nsITreeColumns.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIAccessible; /* forward declaration */


/* starting interface:    nsIAccessibleTreeCache */
#define NS_IACCESSIBLETREECACHE_IID_STR "7cdad914-948b-4bbc-9c47-ee5e1ae6b148"

#define NS_IACCESSIBLETREECACHE_IID \
  {0x7cdad914, 0x948b, 0x4bbc, \
    { 0x9c, 0x47, 0xee, 0x5e, 0x1a, 0xe6, 0xb1, 0x48 }}

/**
 * A cross-platform interface that supports cache for tree item 
 *
 * @status UNDER_REVIEW
 */
class NS_NO_VTABLE nsIAccessibleTreeCache : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IACCESSIBLETREECACHE_IID)

  /**
   * Get tree item from cache according to row and column, create if doesn't
   * exist in cache.
   *
   * @param aRow     the given row index
   * @param aColumn  the given column object. If is is nsnull then primary
   *                 column is used. It makes sense for ATK only.
   */
  /* nsIAccessible getCachedTreeitemAccessible (in long aRow, in nsITreeColumn aColumn); */
  NS_IMETHOD GetCachedTreeitemAccessible(PRInt32 aRow, nsITreeColumn *aColumn, nsIAccessible **_retval) = 0;

  /**
   * Invalidates the number of cached treeitem accessibles.
   *
   * @param aRow    row index the invalidation starts from
   * @param aCount  the number of treeitem accessibles to invalidate,
   *                the number sign specifies whether rows have been
   *                inserted (plus) or removed (minus)
   */
  /* void invalidateCache (in long aRow, in long aCount); */
  NS_IMETHOD InvalidateCache(PRInt32 aRow, PRInt32 aCount) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIAccessibleTreeCache, NS_IACCESSIBLETREECACHE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIACCESSIBLETREECACHE \
  NS_IMETHOD GetCachedTreeitemAccessible(PRInt32 aRow, nsITreeColumn *aColumn, nsIAccessible **_retval); \
  NS_IMETHOD InvalidateCache(PRInt32 aRow, PRInt32 aCount); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIACCESSIBLETREECACHE(_to) \
  NS_IMETHOD GetCachedTreeitemAccessible(PRInt32 aRow, nsITreeColumn *aColumn, nsIAccessible **_retval) { return _to GetCachedTreeitemAccessible(aRow, aColumn, _retval); } \
  NS_IMETHOD InvalidateCache(PRInt32 aRow, PRInt32 aCount) { return _to InvalidateCache(aRow, aCount); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIACCESSIBLETREECACHE(_to) \
  NS_IMETHOD GetCachedTreeitemAccessible(PRInt32 aRow, nsITreeColumn *aColumn, nsIAccessible **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCachedTreeitemAccessible(aRow, aColumn, _retval); } \
  NS_IMETHOD InvalidateCache(PRInt32 aRow, PRInt32 aCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->InvalidateCache(aRow, aCount); } 

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

/* Header file */
class nsAccessibleTreeCache : public nsIAccessibleTreeCache
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIACCESSIBLETREECACHE

  nsAccessibleTreeCache();

private:
  ~nsAccessibleTreeCache();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsAccessibleTreeCache, nsIAccessibleTreeCache)

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

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

/* nsIAccessible getCachedTreeitemAccessible (in long aRow, in nsITreeColumn aColumn); */
NS_IMETHODIMP nsAccessibleTreeCache::GetCachedTreeitemAccessible(PRInt32 aRow, nsITreeColumn *aColumn, nsIAccessible **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void invalidateCache (in long aRow, in long aCount); */
NS_IMETHODIMP nsAccessibleTreeCache::InvalidateCache(PRInt32 aRow, PRInt32 aCount)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIAccessibleTreeCache_h__ */
