<?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 is subject to change
    These methods shouldn't be used by any applications other than Pinot.
	-->
  <interface name="com.github.fabricecolin.Pinot">
    <!--
	Retrieves statistics.
	 crawledCount: the number of documents crawled
	 docsCount: the number of documents in the index
	-->
    <method name="GetStatistics">
      <annotation name="com.github.fabricecolin.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="com.github.fabricecolin.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="com.github.fabricecolin.Pinot.Stop" value="pinotDBus"/>
      <arg type="i" name="exitStatus" direction="out" />
    </method>
    <!--
	Returns a document's properties.
	 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="com.github.fabricecolin.Pinot.GetDocumentInfo" value="pinotDBus"/>
      <arg type="u" name="docId" direction="in"/>
      <arg type="a(ss)" name="fields" direction="out"/>
    </method>
    <!--
	Returns a document's terms count.
	 docId: the document's ID
	 count: the terms count
	-->
    <method name="GetDocumentTermsCount">
      <annotation name="com.github.fabricecolin.Pinot.GetDocumentTermsCount" value="pinotDBus"/>
      <arg type="u" name="docId" direction="in"/>
      <arg type="u" name="count" direction="out"/>
    </method>
    <!--
	Returns a document's terms.
	 docId: the document's ID
	 terms: array of terms
	-->
    <method name="GetDocumentTerms">
      <annotation name="com.github.fabricecolin.Pinot.GetDocumentTerms" value="pinotDBus"/>
      <arg type="u" name="docId" direction="in"/>
      <arg type="as" name="terms" direction="out"/>
    </method>
    <!--
	Gets the list of known labels.
	 labels: array of labels
	-->
    <method name="GetLabels">
      <annotation name="com.github.fabricecolin.Pinot.GetLabels" value="pinotDBus"/>
      <arg type="as" name="labels" direction="out"/>
    </method>
    <!--
	Adds a label.
	 label: the name of the new label
	-->
    <method name="AddLabel">
      <annotation name="com.github.fabricecolin.Pinot.AddLabel" value="pinotDBus"/>
      <arg type="s" name="label" direction="in"/>
      <arg type="s" name="label" direction="out"/>
    </method>
    <!--
	Deletes all references to a label.
	 label: the name of the label to delete
	-->
    <method name="DeleteLabel">
      <annotation name="com.github.fabricecolin.Pinot.DeleteLabel" value="pinotDBus"/>
      <arg type="s" name="label" direction="in"/>
      <arg type="s" name="label" direction="out"/>
    </method>
    <!--
	Determines whether a document has a label.
	 docId: the document's ID
	 label: the label to check
	-->
    <method name="HasLabel">
      <annotation name="com.github.fabricecolin.Pinot.HasLabel" value="pinotDBus"/>
      <arg type="u" name="docId" direction="in"/>
      <arg type="s" name="label" direction="in"/>
      <arg type="u" name="docId" direction="out"/>
    </method>
    <!--
	Returns a document's labels.
	 docId: the document's ID
	 labels: array of labels applied to the document
	-->
    <method name="GetDocumentLabels">
      <annotation name="com.github.fabricecolin.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="com.github.fabricecolin.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 documents' labels.
	 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="com.github.fabricecolin.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>
    <!--
	Checks whether the given URL is in the index.
	 docId: the document's ID
	-->
    <method name="HasDocument">
      <annotation name="com.github.fabricecolin.Pinot.HasDocument" value="pinotDBus"/>
      <arg type="s" name="url" direction="in"/>
      <arg type="u" name="docId" direction="out"/>
    </method>
    <!--
	Gets terms with the same root.
	 term: the base term
     terms: array of suggested terms
	-->
    <method name="GetCloseTerms">
      <annotation name="com.github.fabricecolin.Pinot.GetCloseTerms" value="pinotDBus"/>
      <arg type="s" name="term" direction="in"/>
      <arg type="as" name="terms" direction="out"/>
    </method>
    <!--
	Returns the number of documents.
	 label: a label name
	 count: the terms count
	-->
    <method name="GetDocumentsCount">
      <annotation name="com.github.fabricecolin.Pinot.GetDocumentsCount" value="pinotDBus"/>
      <arg type="s" name="label" direction="in"/>
      <arg type="u" name="count" direction="out"/>
    </method>
    <!--
	Lists documents.
	 term: the term to optionally filter documents with
	 termType: the term type
	 maxCount: the maximum count
     startOffset: the start offset
	 docIds: array of document ID
	-->
    <method name="ListDocuments">
      <annotation name="com.github.fabricecolin.Pinot.ListDocuments" value="pinotDBus"/>
      <arg type="s" name="term" direction="in"/>
      <arg type="u" name="termType" direction="in"/>
      <arg type="u" name="maxCount" direction="in"/>
      <arg type="u" name="startOffset" direction="in"/>
      <arg type="as" name="docIds" direction="out"/>
    </method>
    <!--
	Updates the given document.
	 docId: the document's ID
	-->
    <method name="UpdateDocument">
      <annotation name="com.github.fabricecolin.Pinot.UpdateDocument" value="pinotDBus"/>
      <arg type="u" name="docId" direction="in"/>
      <arg type="u" name="docId" direction="out"/>
    </method>
    <!--
	Sets a document's properties.
	 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="com.github.fabricecolin.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="com.github.fabricecolin.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="com.github.fabricecolin.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>
    <!--
    The daemon's version.
	-->
    <property name="DaemonVersion" type="s" access="read">
    </property>
    <!--
    Epoch of the latest flush operation.
	-->
    <property name="IndexFlushEpoch" type="u" access="read">
    </property>
  </interface>
  <interface name="org.gnome.Shell.SearchProvider2">

    <!--
        GetInitialResultSet:
        @terms: Array of search terms, which the provider should treat as logical AND.
        @results: An array of result identifier strings representing items which match the given search terms. Identifiers must be unique within the provider's domain, but other than that may be chosen freely by the provider.

        Called when the user first begins a search.
    -->
    <method name="GetInitialResultSet">
      <arg type="as" name="terms" direction="in" />
      <arg type="as" name="results" direction="out" />
    </method>

    <!--
        GetSubsearchResultSet:
        @previous_results: Array of results previously returned by GetInitialResultSet().
        @terms: Array of updated search terms, which the provider should treat as logical AND.
        @results: An array of result identifier strings representing items which match the given search terms. Identifiers must be unique within the provider's domain, but other than that may be chosen freely by the provider.

        Called when a search is performed which is a "subsearch" of
        the previous search, e.g. the method may return less results, but
        not more or different results.

        This allows search providers to only search through the previous
        result set, rather than possibly performing a full re-query.
    -->
    <method name="GetSubsearchResultSet">
      <arg type="as" name="previous_results" direction="in" />
      <arg type="as" name="terms" direction="in" />
      <arg type="as" name="results" direction="out" />
    </method>

    <!--
        GetResultMetas:
        @identifiers: An array of result identifiers as returned by GetInitialResultSet() or GetSubsearchResultSet()
        @metas: A dictionary describing the given search result, containing a human-readable 'name' (string), along with the result identifier this meta is for, 'id' (string). Optionally, 'icon' (a serialized GIcon as obtained by g_icon_serialize) can be specified if the result can be better served with a thumbnail of the content (such as with images). 'gicon' (a serialized GIcon as obtained by g_icon_to_string) or 'icon-data' (raw image data as (iiibiiay) - width, height, rowstride, has-alpha, bits per sample, channels, data) are deprecated values that can also be used for that purpose. A 'description' field (string) may also be specified if more context would help the user find the desired result.

        Return an array of meta data used to display each given result
    -->
    <method name="GetResultMetas">
      <arg type="as" name="identifiers" direction="in" />
      <arg type="aa{sv}" name="metas" direction="out" />
    </method>

    <!--
        ActivateResult:
        @identifier: A result identifier as returned by GetInitialResultSet() or GetSubsearchResultSet()
        @terms: Array of search terms, which the provider should treat as logical AND.
        @timestamp: A timestamp of the user interaction that triggered this call

        Called when the users chooses a given result. The result should
        be displayed in the application associated with the corresponding
        provider. The provided search terms can be used to allow launching a full search in
        the application.
    -->
    <method name="ActivateResult">
      <arg type="s" name="identifier" direction="in" />
      <arg type="as" name="terms" direction="in" />
      <arg type="u" name="timestamp" direction="in" />
    </method>

    <!--
        LaunchSearch:
        @terms: Array of search terms, which the provider should treat as logical AND.
        @timestamp: A timestamp of the user interaction that triggered this call

        Asks the search provider to launch a full search in the application for the provided terms.
    -->
    <method name="LaunchSearch">
      <arg type="as" name="terms" direction="in" />
      <arg type="u" name="timestamp" direction="in" />
    </method>
  </interface>
</node>
