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

#ifndef __gen_flockIHistorySearchService_h__
#define __gen_flockIHistorySearchService_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

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

/* starting interface:    flockIHistorySearchListener */
#define FLOCKIHISTORYSEARCHLISTENER_IID_STR "8dc0eea1-1f4a-4d42-9193-fa177a171db2"

#define FLOCKIHISTORYSEARCHLISTENER_IID \
  {0x8dc0eea1, 0x1f4a, 0x4d42, \
    { 0x91, 0x93, 0xfa, 0x17, 0x7a, 0x17, 0x1d, 0xb2 }}

class NS_NO_VTABLE flockIHistorySearchListener : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(FLOCKIHISTORYSEARCHLISTENER_IID)

  /* void FoundResults (in long aNumResults, in nsIRDFDataSource aDataSource); */
  NS_IMETHOD FoundResults(PRInt32 aNumResults, nsIRDFDataSource *aDataSource) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKIHISTORYSEARCHLISTENER \
  NS_IMETHOD FoundResults(PRInt32 aNumResults, nsIRDFDataSource *aDataSource); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKIHISTORYSEARCHLISTENER(_to) \
  NS_IMETHOD FoundResults(PRInt32 aNumResults, nsIRDFDataSource *aDataSource) { return _to FoundResults(aNumResults, aDataSource); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_FLOCKIHISTORYSEARCHLISTENER(_to) \
  NS_IMETHOD FoundResults(PRInt32 aNumResults, nsIRDFDataSource *aDataSource) { return !_to ? NS_ERROR_NULL_POINTER : _to->FoundResults(aNumResults, aDataSource); } 

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

/* Header file */
class _MYCLASS_ : public flockIHistorySearchListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKIHISTORYSEARCHLISTENER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* void FoundResults (in long aNumResults, in nsIRDFDataSource aDataSource); */
NS_IMETHODIMP _MYCLASS_::FoundResults(PRInt32 aNumResults, nsIRDFDataSource *aDataSource)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    flockIHistorySearchService */
#define FLOCKIHISTORYSEARCHSERVICE_IID_STR "a5670b75-1988-46e2-a505-3742ecdba945"

#define FLOCKIHISTORYSEARCHSERVICE_IID \
  {0xa5670b75, 0x1988, 0x46e2, \
    { 0xa5, 0x05, 0x37, 0x42, 0xec, 0xdb, 0xa9, 0x45 }}

class NS_NO_VTABLE flockIHistorySearchService : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(FLOCKIHISTORYSEARCHSERVICE_IID)

  /**
	 * 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 aDocument, in AString aText); */
  NS_IMETHOD AddDocumentText(const char *aURL, const char *aTags, PRInt32 aIsFavorite, const nsAString & aTitle, const nsAString & aDocument, const nsAString & aText) = 0;

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

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

  enum { FAVORITE_YES = 1 };

  enum { FAVORITE_NO = 0 };

  enum { FAVORITE_COPY = -1 };

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKIHISTORYSEARCHSERVICE \
  NS_IMETHOD AddDocumentText(const char *aURL, const char *aTags, PRInt32 aIsFavorite, const nsAString & aTitle, const nsAString & aDocument, const nsAString & aText); \
  NS_IMETHOD DeleteDocument(const char *aURL); \
  NS_IMETHOD Search(const nsAString & aQuery, PRInt32 aMaxResults, flockIHistorySearchListener *aListener, nsIRDFDataSource *aDataSource); \

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKIHISTORYSEARCHSERVICE(_to) \
  NS_IMETHOD AddDocumentText(const char *aURL, const char *aTags, PRInt32 aIsFavorite, const nsAString & aTitle, const nsAString & aDocument, const nsAString & aText) { return _to AddDocumentText(aURL, aTags, aIsFavorite, aTitle, aDocument, aText); } \
  NS_IMETHOD DeleteDocument(const char *aURL) { return _to DeleteDocument(aURL); } \
  NS_IMETHOD Search(const nsAString & aQuery, PRInt32 aMaxResults, flockIHistorySearchListener *aListener, nsIRDFDataSource *aDataSource) { return _to Search(aQuery, aMaxResults, aListener, aDataSource); } \

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_FLOCKIHISTORYSEARCHSERVICE(_to) \
  NS_IMETHOD AddDocumentText(const char *aURL, const char *aTags, PRInt32 aIsFavorite, const nsAString & aTitle, const nsAString & aDocument, const nsAString & aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddDocumentText(aURL, aTags, aIsFavorite, aTitle, aDocument, aText); } \
  NS_IMETHOD DeleteDocument(const char *aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteDocument(aURL); } \
  NS_IMETHOD Search(const nsAString & aQuery, PRInt32 aMaxResults, flockIHistorySearchListener *aListener, nsIRDFDataSource *aDataSource) { return !_to ? NS_ERROR_NULL_POINTER : _to->Search(aQuery, aMaxResults, aListener, aDataSource); } \

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

/* Header file */
class _MYCLASS_ : public flockIHistorySearchService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKIHISTORYSEARCHSERVICE

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* void AddDocumentText (in string aURL, in string aTags, in long aIsFavorite, in AString aTitle, in AString aDocument, in AString aText); */
NS_IMETHODIMP _MYCLASS_::AddDocumentText(const char *aURL, const char *aTags, PRInt32 aIsFavorite, const nsAString & aTitle, const nsAString & aDocument, 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 aQuery, in long aMaxResults, in flockIHistorySearchListener aListener, in nsIRDFDataSource aDataSource); */
NS_IMETHODIMP _MYCLASS_::Search(const nsAString & aQuery, PRInt32 aMaxResults, flockIHistorySearchListener *aListener, nsIRDFDataSource *aDataSource)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_flockIHistorySearchService_h__ */
