/*
 * BEGIN FLOCK GPL
 *
 * Copyright Flock Inc. 2005-2008
 * http://flock.com
 *
 * This file may be used under the terms of the
 * GNU General Public License Version 2 or later (the "GPL"),
 * http://www.gnu.org/licenses/gpl.html
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * END FLOCK GPL
 */
 
#include "nsISupports.idl"
#include "nsISimpleEnumerator.idl"

/**
 * flockILuceneResult
 *
 * This is an interface that describes a result from a Lucene query.
 */
[scriptable, uuid(625248a0-9d3f-4060-9585-a765b8242df3)]
interface flockILuceneResult : nsISupports {
  readonly attribute string URI;
  readonly attribute string type;
  readonly attribute wstring URL;
  readonly attribute wstring title;
  readonly attribute double score;
};
 
/**
 * flockILuceneListener
 * 
 * This is a listener interface used by flockILucene.
 */
[scriptable, uuid(288ac5a5-4671-4ddf-8dff-e3a98a5385ba)]
interface flockILuceneListener : nsISupports {
  /**
   * Called on completetion of an associated flockILucene search call.
   *
   * @param aNumResults
   *        the number of search results being returned
   * @param aEnumerator
   *        an enumerator of flockILuceneResults
   */
  void onSearchComplete(in unsigned long aNumResults,
                        in nsISimpleEnumerator aEnumerator);
  
  /**
   * Called on completetion of an associated flockILucene addDocument call.
   *
   * @param aURI
   *        the URI of the document that has been added
   */
  void onAddDocumentComplete(in string aURI);

  /**
   * Called on completetion of an associated flockILucene deleteDocument call.
   *
   * @param aURI
   *        the URI of the document that has been deleted
   */
  void onDeleteDocumentComplete(in string aURI);
};
