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

#ifndef __gen_flockILuceneAsync_h__
#define __gen_flockILuceneAsync_h__


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

#ifndef __gen_nsIDOMDocument_h__
#include "nsIDOMDocument.h"
#endif

#ifndef __gen_nsIRDFDataSource_h__
#include "nsIRDFDataSource.h"
#endif

#ifndef __gen_flockIHistorySearchService_h__
#include "flockIHistorySearchService.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:    flockILuceneAsync */
#define FLOCKILUCENEASYNC_IID_STR "5d8477b5-3ce0-4bbd-a7f2-6405aeee436e"

#define FLOCKILUCENEASYNC_IID \
  {0x5d8477b5, 0x3ce0, 0x4bbd, \
    { 0xa7, 0xf2, 0x64, 0x05, 0xae, 0xee, 0x43, 0x6e }}

class NS_NO_VTABLE flockILuceneAsync : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(FLOCKILUCENEASYNC_IID)

  /**
	 * Initialize using a database named @aTarget
	 */
  /* void Init (in string aTarget); */
  NS_IMETHOD Init(const char *aTarget) = 0;

  /**
	 * Add the document in @aText with title @aTitle, tags @aTags and url 
     * @aURL to the index. The request to do this will be dispatched to 
     * the worker thread for the actual indexing.
	 */
  /* void AddDocumentText (in string aURL, in string aTags, in long aIsFavorite, in AString aTitle, in AString aDescription, in AString aText); */
  NS_IMETHOD AddDocumentText(const char *aURL, const char *aTags, PRInt32 aIsFavorite, const nsAString & aTitle, const nsAString & aDescription, const nsAString & aText) = 0;

  /** 
	 * Remove the document identified by hash @hash from the index.
	 */
  /* void DeleteDocument (in string aURL); */
  NS_IMETHOD DeleteDocument(const char *aURL) = 0;

  /** 
	 * Search the index with the query @query and return at most 
	 * @max_results results to @listener.
	 */
  /* void Search (in AString query, in long max_results, in flockIHistorySearchListener listener, in nsIRDFDataSource data_source); */
  NS_IMETHOD Search(const nsAString & query, PRInt32 max_results, flockIHistorySearchListener *listener, nsIRDFDataSource *data_source) = 0;

  /**
	 * Shut down the worker thread and cancel outstanding requests.
	 */
  /* void Shutdown (); */
  NS_IMETHOD Shutdown(void) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKILUCENEASYNC \
  NS_IMETHOD Init(const char *aTarget); \
  NS_IMETHOD AddDocumentText(const char *aURL, const char *aTags, PRInt32 aIsFavorite, const nsAString & aTitle, const nsAString & aDescription, const nsAString & aText); \
  NS_IMETHOD DeleteDocument(const char *aURL); \
  NS_IMETHOD Search(const nsAString & query, PRInt32 max_results, flockIHistorySearchListener *listener, nsIRDFDataSource *data_source); \
  NS_IMETHOD Shutdown(void); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKILUCENEASYNC(_to) \
  NS_IMETHOD Init(const char *aTarget) { return _to Init(aTarget); } \
  NS_IMETHOD AddDocumentText(const char *aURL, const char *aTags, PRInt32 aIsFavorite, const nsAString & aTitle, const nsAString & aDescription, const nsAString & aText) { return _to AddDocumentText(aURL, aTags, aIsFavorite, aTitle, aDescription, aText); } \
  NS_IMETHOD DeleteDocument(const char *aURL) { return _to DeleteDocument(aURL); } \
  NS_IMETHOD Search(const nsAString & query, PRInt32 max_results, flockIHistorySearchListener *listener, nsIRDFDataSource *data_source) { return _to Search(query, max_results, listener, data_source); } \
  NS_IMETHOD Shutdown(void) { return _to Shutdown(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_FLOCKILUCENEASYNC(_to) \
  NS_IMETHOD Init(const char *aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aTarget); } \
  NS_IMETHOD AddDocumentText(const char *aURL, const char *aTags, PRInt32 aIsFavorite, const nsAString & aTitle, const nsAString & aDescription, const nsAString & aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddDocumentText(aURL, aTags, aIsFavorite, aTitle, aDescription, aText); } \
  NS_IMETHOD DeleteDocument(const char *aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteDocument(aURL); } \
  NS_IMETHOD Search(const nsAString & query, PRInt32 max_results, flockIHistorySearchListener *listener, nsIRDFDataSource *data_source) { return !_to ? NS_ERROR_NULL_POINTER : _to->Search(query, max_results, listener, data_source); } \
  NS_IMETHOD Shutdown(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Shutdown(); } 

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

/* Header file */
class _MYCLASS_ : public flockILuceneAsync
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKILUCENEASYNC

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, flockILuceneAsync)

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

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

/* void Init (in string aTarget); */
NS_IMETHODIMP _MYCLASS_::Init(const char *aTarget)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void AddDocumentText (in string aURL, in string aTags, in long aIsFavorite, in AString aTitle, in AString aDescription, in AString aText); */
NS_IMETHODIMP _MYCLASS_::AddDocumentText(const char *aURL, const char *aTags, PRInt32 aIsFavorite, const nsAString & aTitle, const nsAString & aDescription, const nsAString & aText)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void DeleteDocument (in string aURL); */
NS_IMETHODIMP _MYCLASS_::DeleteDocument(const char *aURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Search (in AString query, in long max_results, in flockIHistorySearchListener listener, in nsIRDFDataSource data_source); */
NS_IMETHODIMP _MYCLASS_::Search(const nsAString & query, PRInt32 max_results, flockIHistorySearchListener *listener, nsIRDFDataSource *data_source)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Shutdown (); */
NS_IMETHODIMP _MYCLASS_::Shutdown()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_flockILuceneAsync_h__ */
