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

<node name="/">

  <!--
    interface for tree model iterators over dbus.

    tree models that want to be iterated over dbus can provide
    'IterFirst' and/or 'IterNthChild' methods that create an iterator
    object and return its path.

    iterator objects are inherently bound to the model they iterate, so
    there is no need for a 'model' argument to any of the methods.

    the 'GetBatch' method returns values from the next n rows and moves
    the iterator past them.  this saves many round trips.  it's only intended
    for use with list-like models, but as a slight concession, it will only
    return data up to the next row with children.

    when the client is done with the iterator, it calls Unref, which
    will unref the iterator object on the server side, which should remove
    it from the bus.

    the Children and NthChild methods return new iterator objects, which
    must themselves be unreffed when no longer needed.  these objects are
    independent of the iterator they were created from.
  -->
      
  <interface name="org.gnome.Rhythmbox.TreeIter">

    <method name="GetColumns">
      <arg type="as" direction="out" name="names"/>
      <arg type="av" direction="out" name="types"/>
    </method>

    <method name="GetValue">
      <arg type="i" name="column"/>
      <arg type="v" direction="out" name="value"/>
    </method>

    <method name="Get">
      <arg type="ai" name="columns"/>
      <arg type="av" direction="out" name="values"/>
    </method>

    <method name="GetBatch">
      <arg type="i" name="rows"/>
      <arg type="ai" name="columns"/>
      <arg type="aav" direction="out" name="values"/>
      <arg type="b" direction="out" name="more"/>
    </method>

    <method name="Next">
      <arg type="b" direction="out" name="result">
        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
      </arg>
    </method>

    <method name="HasChild">
      <arg type="b" direction="out" name="result">
        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
      </arg>
    </method>
      
    <method name="NChildren">
      <arg type="i" direction="out" name="result">
        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
      </arg>
    </method>

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

    <method name="NthChild">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="i" name="n"/>
      <arg type="o" direction="out" name="iter">
        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
      </arg>
    </method>

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

    <!-- these are async only because they need to access the caller info -->
    <method name="Ref">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
    </method>
    <method name="Unref">
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
    </method>
    
  </interface>
</node>

