<?xml version="1.0" encoding="UTF-8" ?>

<node name="/">

  <interface name="org.gnome.Rhythmbox.QueryModel">

    <method name="GetSize">
      <arg type="x" direction="out">
        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
      </arg>
    </method>

    <method name="GetDuration">
      <arg type="u" direction="out">
        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
      </arg>
    </method>

    <method name="GetNumEntries">
      <arg type="u" direction="out">
        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
      </arg>
    </method>

    <method name="GetIter">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="u" name="index"/>
      <arg type="o" direction="out" name="iter">
        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
      </arg>
    </method>

    <method name="GetIterForEntry">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="s" name="location"/>
      <arg type="o" direction="out" name="iter">
        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
      </arg>
    </method>

    <!-- things to add..
     - add entry
     - remove entry
     - move entry
     - shuffle?
     - set sort order .. somehow
    -->

    <!-- 
      these are async only because they need to access the caller info.
      the argument to Ref describes whether the reference owner is interested
      in getting signals for changes to the model.  signals are only
      emitted if one or more reference owners are interested.
    -->
    <method name="Ref">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="b" name="enable_signals"/>
    </method>
    <method name="Unref">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
    </method>

    <signal name="QueryComplete"/>

    <signal name="EntryPropChanged">
      <arg type="s" name="entry"/>
      <arg type="i" name="property"/>
      <arg type="v" name="oldValue"/>
      <arg type="v" name="newValue"/>
    </signal>

    <signal name="EntryRemoved">
      <arg type="s" name="entry"/>
    </signal>

    <!-- only emitted once the query is complete? -->
    <signal name="EntryAdded">
      <arg type="s" name="entry"/>
      <!-- position? -->
    </signal>

     <signal name="EntriesReordered"/>

  </interface>
</node>
