<?xml version="1.0" encoding="UTF-8" ?>
<node>
  <interface name="org.freedesktop.DBus.Introspectable">
    <method name="Introspect">
      <arg type="s" name="data" direction="out"/>
    </method>
  </interface>
  <!--
	WARNING: This interface WILL change before 1.0 is released !
	-->
  <interface name="de.berlios.Pinot">
    <signal name="IndexFlushed">
      <annotation name="de.berlios.Pinot.IndexFlushed" value="pinotDBus"/>
      <arg type="u" name="docsCount" direction="out"/>
    </signal>
    <!--
	Retrieves statistics.
	 crawledCount: the number of documents crawled
	 docsCount: the number of documents in the index
	-->
    <method name="GetStatistics">
      <annotation name="de.berlios.Pinot.GetStatistics" value="pinotDBus"/>
      <arg type="u" name="crawledCount" direction="out"/>
      <arg type="u" name="docsCount" direction="out"/>
      <arg type="b" name="lowDiskSpace" direction="out" />
      <arg type="b" name="onBattery" direction="out" />
      <arg type="b" name="crawling" direction="out" />
    </method>
    <!--
	Instructs the daemon program to reload the configuration file.
	 reloading: TRUE if the configuration is being reloaded
	-->
    <method name="Reload">
      <annotation name="de.berlios.Pinot.Reload" value="pinotDBus"/>
      <arg type="b" name="reloading" direction="out" />
    </method>
    <!--
	Stops the daemon program.
	 exitStatus: the daemon's exit status
	-->
    <method name="Stop">
      <annotation name="de.berlios.Pinot.Stop" value="pinotDBus"/>
      <arg type="i" name="exitStatus" direction="out" />
    </method>
    <!--
	Checks if a URL is indexed.
	 docId: the document's ID
	-->
    <method name="HasDocument">
      <annotation name="de.berlios.Pinot.HasDocument" value="pinotDBus"/>
      <arg type="s" name="url" direction="in"/>
      <arg type="u" name="docId" direction="out"/>
    </method>
    <!--
	Gets the list of known labels.
	 labels: array of labels
	-->
    <method name="GetLabels">
      <annotation name="de.berlios.Pinot.GetLabels" value="pinotDBus"/>
      <arg type="as" name="labels" direction="out"/>
    </method>
    <!--
	Adds a label.
	 label: the name of the new label
        This method shouldn't be used by applications other than Pinot.
	-->
    <method name="AddLabel">
      <annotation name="de.berlios.Pinot.AddLabel" value="pinotDBus"/>
      <arg type="s" name="label" direction="in"/>
      <arg type="s" name="label" direction="out"/>
    </method>
    <!--
	Deletes a label.
	 label: the name of the label to delete
        This method shouldn't be used by applications other than Pinot.
	-->
    <method name="DeleteLabel">
      <annotation name="de.berlios.Pinot.DeleteLabel" value="pinotDBus"/>
      <arg type="s" name="label" direction="in"/>
      <arg type="s" name="label" direction="out"/>
    </method>
    <!--
	Retrieves a document's labels.
	 docId: the document's ID
	 labels: array of labels applied to the document
	-->
    <method name="GetDocumentLabels">
      <annotation name="de.berlios.Pinot.GetDocumentLabels" value="pinotDBus"/>
      <arg type="u" name="docId" direction="in"/>
      <arg type="as" name="labels" direction="out"/>
    </method>
    <!--
	Sets a document's labels.
	 docId: the document's ID
	 labels: array of labels to apply to the document
	 resetLabels: TRUE if existing labels should be unset
	-->
    <method name="SetDocumentLabels">
      <annotation name="de.berlios.Pinot.SetDocumentLabels" value="pinotDBus"/>
      <arg type="u" name="docId" direction="in"/>
      <arg type="as" name="labels" direction="in"/>
      <arg type="b" name="resetLabels" direction="in"/>
      <arg type="u" name="docId" direction="out"/>
    </method>
    <!--
	Sets labels on a group of documents.
	 docIds: array of document IDs
	 labels: array of labels to apply to the documents
	 resetLabels: TRUE if existing labels should be unset
	-->
    <method name="SetDocumentsLabels">
      <annotation name="de.berlios.Pinot.SetDocumentsLabels" value="pinotDBus"/>
      <arg type="as" name="docIds" direction="in"/>
      <arg type="as" name="labels" direction="in"/>
      <arg type="b" name="resetLabels" direction="in"/>
      <arg type="b" name="status" direction="out"/>
    </method>
    <!--
	Retrieves information about a document.
	 docId: the document's ID
	 fields : array of (s name, s value) structures with name one of
	 "caption", "url", "type", "language", "modtime", "size", "extract"
	-->
    <method name="GetDocumentInfo">
      <annotation name="de.berlios.Pinot.GetDocumentInfo" value="pinotDBus"/>
      <arg type="u" name="docId" direction="in"/>
      <arg type="a(ss)" name="fields" direction="out"/>
    </method>
    <!--
	Sets information about a document.
	 docId: the document's ID
	 fields : array of (s name, s value) structures with name one of
	 "caption", "url", "type", "language", "modtime", "size", "extract"
	-->
    <method name="SetDocumentInfo">
      <annotation name="de.berlios.Pinot.SetDocumentInfo" value="pinotDBus"/>
      <arg type="u" name="docId" direction="in"/>
      <arg type="a(ss)" name="fields" direction="in"/>
      <arg type="u" name="docId" direction="out"/>
    </method>
    <!--
	Queries the index.
	 engineType : engine type (defaults to "xapian"). See pinot-search(1) for a list of supported types
	 engineName : engine name (defaults to "~/.pinot/daemon"). See pinot-search(1) for examples
	 searchText : search text, as would be entered in Pinot's live query field
	 startDoc: the first result to return, starting from 0
	 maxHits: the maximum number of hits desired
	 estimatedHits: an estimate of the total number of hits
	 hitsList: hit properties
	-->
    <method name="Query">
      <annotation name="de.berlios.Pinot.Query" value="pinotDBus"/>
      <arg type="s" name="engineType" direction="in" />
      <arg type="s" name="engineName" direction="in" />
      <arg type="s" name="searchText" direction="in" />
      <arg type="u" name="startDoc" direction="in" />
      <arg type="u" name="maxHits" direction="in" />
      <arg type="u" name="estimatedHits" direction="out" />
      <arg type="aa(ss)" name="hitsList" direction="out" />
    </method>
    <!--
	Queries the index.
	 searchText : search text, as would be entered in Pinot's live query field
	 maxHits: the maximum number of hits desired
	 docIds: array of document IDs
	 docIdsCount: the number of document IDs in the array
        WARNING: this method is obsolete
	-->
    <method name="SimpleQuery">
      <annotation name="de.berlios.Pinot.SimpleQuery" value="pinotDBus"/>
      <arg type="s" name="searchText" direction="in" />
      <arg type="u" name="maxHits" direction="in" />
      <arg type="as" name="docIds" direction="out" />
    </method>
    <!--
	Updates a document.
	 docId: the document's ID
	-->
    <method name="UpdateDocument">
      <annotation name="de.berlios.Pinot.UpdateDocument" value="pinotDBus"/>
      <arg type="u" name="docId" direction="in"/>
      <arg type="u" name="docId" direction="out"/>
    </method>
  </interface>
</node>
