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

#ifndef __gen_flockILucene_h__
#define __gen_flockILucene_h__


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

#ifndef __gen_nsIFile_h__
#include "nsIFile.h"
#endif

#ifndef __gen_flockILuceneListener_h__
#include "flockILuceneListener.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:    flockILucene */
#define FLOCKILUCENE_IID_STR "5d8477b5-3ce0-4bbd-a7f2-6405aeee436e"

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

/**
 * flockILucene
 * 
 * This interface maintains and provides asychronous access to a Lucene
 * indexer thread.
 */
class NS_NO_VTABLE flockILucene : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(FLOCKILUCENE_IID)

  /**
   * Initialize the Lucene thread using the directory aIndexDir
   *
   * @param aIndexDir
   *        a Lucene index directory containing Lucene index files
   */
  /* void init (in nsIFile aIndexDir); */
  NS_IMETHOD Init(nsIFile *aIndexDir) = 0;

  /**
   * Adds a document to the Lucene index.  The request to do this will
   * be dispatched to the worker thread for the actual indexing.
   *
   * @param aURI
   *        the URI of the document to be indexed
   * @param aType
   *        the Flock Type of the document
   * @param aURL
   *        the URL of the document, if one exists
   * @param aTitle
   *        the title of the document
   * @param aTags
   *        comma delimited string of tags for the document, if any exist
   * @param aDescription
   *        notes or other out-of-band text attached to the document
   * @param aText
   *        the text of the document
   * @param aListener
   *        a listener to be called when the document has been added
   */
  /* void addDocument (in string aURI, in string aType, in AString aURL, in AString aTitle, in AString aTags, in AString aDescription, in AString aText, in flockILuceneListener aListener); */
  NS_IMETHOD AddDocument(const char *aURI, const char *aType, const nsAString & aURL, const nsAString & aTitle, const nsAString & aTags, const nsAString & aDescription, const nsAString & aText, flockILuceneListener *aListener) = 0;

  /**
   * Adds a document to the Lucene index synchronously.  The request to
   * do this will be dispatched to the worker thread for the actual
   * indexing.
   *
   * @param aURI
   *        the URI of the document to be indexed
   * @param aType
   *        the Flock Type of the document
   * @param aURL
   *        the URL of the document, if one exists
   * @param aTitle
   *        the title of the document
   * @param aTags
   *        comma delimited string of tags for the document, if any exist
   * @param aDescription
   *        notes or other out-of-band text attached to the document
   * @param aText
   *        the text of the document
   */
  /* void addDocumentSync (in string aURI, in string aType, in AString aURL, in AString aTitle, in AString aTags, in AString aDescription, in AString aText); */
  NS_IMETHOD AddDocumentSync(const char *aURI, const char *aType, const nsAString & aURL, const nsAString & aTitle, const nsAString & aTags, const nsAString & aDescription, const nsAString & aText) = 0;

  /**
   * Removes a document from the Lucene index.
   *
   * @param aURI
   *        the URI of the document to be removed
   * @param aListener
   *        a listener to be called when the document has been deleted
   */
  /* void deleteDocument (in string aURI, in flockILuceneListener aListener); */
  NS_IMETHOD DeleteDocument(const char *aURI, flockILuceneListener *aListener) = 0;

  /**
   * Removes a document from the Lucene index synchronously.
   *
   * @param aURI
   *        the URI of the document to be removed
   */
  /* void deleteDocumentSync (in string aURI); */
  NS_IMETHOD DeleteDocumentSync(const char *aURI) = 0;

  /**
   * Searches the Lucene index.
   *
   * @param aQuery
   *        a Lucene query string
   * @param aType
   *        a Flock Type to restrict the search to.  NULL searches all types.
   * @param aMaxResults
   *        the maximum number of results to return
   * @param aListener
   *        a listener to be called when the search is complete
   */
  /* void search (in AString aQuery, in string aType, in long aMaxResults, in flockILuceneListener aListener); */
  NS_IMETHOD Search(const nsAString & aQuery, const char *aType, PRInt32 aMaxResults, flockILuceneListener *aListener) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKILUCENE \
  NS_IMETHOD Init(nsIFile *aIndexDir); \
  NS_IMETHOD AddDocument(const char *aURI, const char *aType, const nsAString & aURL, const nsAString & aTitle, const nsAString & aTags, const nsAString & aDescription, const nsAString & aText, flockILuceneListener *aListener); \
  NS_IMETHOD AddDocumentSync(const char *aURI, const char *aType, const nsAString & aURL, const nsAString & aTitle, const nsAString & aTags, const nsAString & aDescription, const nsAString & aText); \
  NS_IMETHOD DeleteDocument(const char *aURI, flockILuceneListener *aListener); \
  NS_IMETHOD DeleteDocumentSync(const char *aURI); \
  NS_IMETHOD Search(const nsAString & aQuery, const char *aType, PRInt32 aMaxResults, flockILuceneListener *aListener); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKILUCENE(_to) \
  NS_IMETHOD Init(nsIFile *aIndexDir) { return _to Init(aIndexDir); } \
  NS_IMETHOD AddDocument(const char *aURI, const char *aType, const nsAString & aURL, const nsAString & aTitle, const nsAString & aTags, const nsAString & aDescription, const nsAString & aText, flockILuceneListener *aListener) { return _to AddDocument(aURI, aType, aURL, aTitle, aTags, aDescription, aText, aListener); } \
  NS_IMETHOD AddDocumentSync(const char *aURI, const char *aType, const nsAString & aURL, const nsAString & aTitle, const nsAString & aTags, const nsAString & aDescription, const nsAString & aText) { return _to AddDocumentSync(aURI, aType, aURL, aTitle, aTags, aDescription, aText); } \
  NS_IMETHOD DeleteDocument(const char *aURI, flockILuceneListener *aListener) { return _to DeleteDocument(aURI, aListener); } \
  NS_IMETHOD DeleteDocumentSync(const char *aURI) { return _to DeleteDocumentSync(aURI); } \
  NS_IMETHOD Search(const nsAString & aQuery, const char *aType, PRInt32 aMaxResults, flockILuceneListener *aListener) { return _to Search(aQuery, aType, aMaxResults, aListener); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_FLOCKILUCENE(_to) \
  NS_IMETHOD Init(nsIFile *aIndexDir) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aIndexDir); } \
  NS_IMETHOD AddDocument(const char *aURI, const char *aType, const nsAString & aURL, const nsAString & aTitle, const nsAString & aTags, const nsAString & aDescription, const nsAString & aText, flockILuceneListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddDocument(aURI, aType, aURL, aTitle, aTags, aDescription, aText, aListener); } \
  NS_IMETHOD AddDocumentSync(const char *aURI, const char *aType, const nsAString & aURL, const nsAString & aTitle, const nsAString & aTags, const nsAString & aDescription, const nsAString & aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddDocumentSync(aURI, aType, aURL, aTitle, aTags, aDescription, aText); } \
  NS_IMETHOD DeleteDocument(const char *aURI, flockILuceneListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteDocument(aURI, aListener); } \
  NS_IMETHOD DeleteDocumentSync(const char *aURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteDocumentSync(aURI); } \
  NS_IMETHOD Search(const nsAString & aQuery, const char *aType, PRInt32 aMaxResults, flockILuceneListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->Search(aQuery, aType, aMaxResults, aListener); } 

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

/* Header file */
class _MYCLASS_ : public flockILucene
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKILUCENE

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* void init (in nsIFile aIndexDir); */
NS_IMETHODIMP _MYCLASS_::Init(nsIFile *aIndexDir)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addDocument (in string aURI, in string aType, in AString aURL, in AString aTitle, in AString aTags, in AString aDescription, in AString aText, in flockILuceneListener aListener); */
NS_IMETHODIMP _MYCLASS_::AddDocument(const char *aURI, const char *aType, const nsAString & aURL, const nsAString & aTitle, const nsAString & aTags, const nsAString & aDescription, const nsAString & aText, flockILuceneListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addDocumentSync (in string aURI, in string aType, in AString aURL, in AString aTitle, in AString aTags, in AString aDescription, in AString aText); */
NS_IMETHODIMP _MYCLASS_::AddDocumentSync(const char *aURI, const char *aType, const nsAString & aURL, const nsAString & aTitle, const nsAString & aTags, const nsAString & aDescription, const nsAString & aText)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void deleteDocument (in string aURI, in flockILuceneListener aListener); */
NS_IMETHODIMP _MYCLASS_::DeleteDocument(const char *aURI, flockILuceneListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void deleteDocumentSync (in string aURI); */
NS_IMETHODIMP _MYCLASS_::DeleteDocumentSync(const char *aURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void search (in AString aQuery, in string aType, in long aMaxResults, in flockILuceneListener aListener); */
NS_IMETHODIMP _MYCLASS_::Search(const nsAString & aQuery, const char *aType, PRInt32 aMaxResults, flockILuceneListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_flockILucene_h__ */
