<root>
<object name="playlist">
<method name="list">
<static/>
<doc>
List the existing playlists.
</doc>
<returns><list type="string"/></returns>
<code type="ipc-message">
<object>collection</object><!-- XMMS_IPC_OBJECT_COLLECTION -->
<method>list</method><!-- XMMS_IPC_CMD_COLLECTION_LIST -->
<string>Playlists</string><!-- XMMS_COLLECTION_NS_PLAYLISTS -->
</code>
</method>
<!-- if there is no <returns> tag then function returns void-like value,
so it can return nothing by error (or exception) -->
<method name="create">
<constructor/>
<doc>
Create a new empty playlist.
</doc>
<args>
<string name="playlist"/>
</args>
<code type="ipc-message">
<object>collection</object><!-- XMMS_IPC_OBJECT_COLLECTION -->
<method>save</method><!-- XMMS_IPC_CMD_COLLECTION_SAVE -->
<string var="playlist"/>
<string>Playlists</string><!-- XMMS_COLLECTION_NS_PLAYLISTS -->
<collection>
<type>XMMS_COLLECTION_TYPE_IDLIST</type>
</collection>
</code>
</method>
<!-- all usual methods have playlist name as their argument,
playlist name defaults to _active
-->
<method name="shuffle">
<doc>
Shuffles the current playlist.
</doc>
<code type="ipc-message">
<object>playlist</object><!-- XMMS_IPC_OBJECT_PLAYLIST -->
<method>shuffle</method><!-- XMMS_IPC_CMD_SHUFFLE -->
<string var="playlist"/>
</code>
</method>
<method name="add_url">
<doc>
Add the url to the playlist with optinal arguments.
The url should be absolute to the server-side.
Note that you will have to include the protocol for the url to.
ie: file://mp3/my_mp3s/first.mp3.
</doc>
<args>
<string name="url"/><!-- non-encoded URL -->
<optional>
<!--
encoded (sic!) args, xmmsc_playlist_add_args & _xmmsc_playlist_add_encoded
Example: ["foo=bar", "bar=baz"]
-->
<list type="string" name="args"/>
</optional>
</args>
<mangling>
<args number="1" name="add_args"/>
</mangling>
<code type="ipc-message">
<call>
<method name="add_encoded"/>
<string name="playlist"/>
<string name="urlencoded-url"/><!-- FIXME -->
</call>
</code>
</method>
<method name="add_id">
<doc>Add a medialib id to the playlist.</doc>
<args>
<uint32 name="lib_id"/>
</args>
<code type="ipc-message">
<object>playlist</object>
<method>add_id</method><!-- XMMS_IPC_CMD_ADD_ID -->
<string var="playlist"/>
<uint32 var="lib_id"/>
</code>
</method>
<method name="add_encoded">
<doc>Add the url to the playlist. The url should be absolute to the server-side AND encoded.</doc>
<args>
<string name="url"/>
</args>
<code type="ipc-message">
<object>playlist</object>
<method>add_url</method><!-- XMMS_IPC_CMD_ADD_URL -->
<string var="playlist"/>
<string var="url"/>
</code>
</method>
<method name="add_idlist">
<doc>Adds media in idlist (FIXME: WTF?) to a playlist.</doc>
<args>
<collection name="coll"/>
</args>
<returns>FIXME</returns>
<code type="ipc-message">
<object>playlist</object>
<method>add_idlist</method><!-- XMMS_IPC_CMD_ADD_IDLIST -->
<string var="playlist"/>
<collection var="coll"/>
</code>
</method>
<method name="add_collection">
<doc>
Add the content of the given collection to a playlist.
The list of ordering properties defines how the set of matching media is added.
</doc>
<args>
<collection name="coll"/>
<list type="string" name="order"/><!-- FIXME: improve that? -->
</args>
<code type="ipc-message">
<object>playlist</object>
<method>add_collection</method><!-- XMMS_IPC_CMD_ADD_COLL -->
<string var="playlist"/>
<collection var="coll"/>
<list type="string" var="order"/>
</code>
</method>
<method name="remove_entry">
<doc>Remove an entry from the playlist.</doc>
<args>
<uint32 name="pos"/><!-- The position that should be removed from the playlist. -->
</args>
<code type="ipc-message">
<object>playlist</object>
<method>remove_entry</method><!-- XMMS_IPC_CMD_REMOVE_ENTRY -->
<string var="playlist"/>
<uint32 var="pos"/>
</code>
</method>
<method name="clear">
<doc>Clears a playlist.</doc>
<code type="ipc-message">
<object>playlist</object>
<method>clear</method><!-- XMMS_IPC_CMD_CLEAR -->
<string var="playlist"/>
</code>
</method>
<method name="remove">
<doc>Remove the given playlist.</doc>
<code type="ipc-message">
<object>collection</object><!-- XMMS_IPC_OBJECT_COLLECTION -->
<method>remove</method><!-- XMMS_IPC_CMD_COLLECTION_REMOVE -->
<string var="playlist"/>
<string>Playlists</string><!-- XMMS_COLLECTION_NS_PLAYLISTS -->
</code>
</method>
<method name="list_entries">
<doc>Retrieve the entries in a playlist. </doc>
<returns><list type="uint32"/></returns>
<code type="ipc-message">
<object>playlist</object><!-- XMMS_IPC_OBJECT_PLAYLIST -->
<method>list_entries</method><!-- XMMS_IPC_CMD_LIST -->
<string var="playlist"/>
</code>
</method>
<method name="sort">
<doc>Sorts a playlist according to a list of properties.</doc>
<args><list type="string" name="properties"/></args>
<returns><list type="string"/></returns>
<code type="ipc-message">
<object>playlist</object><!-- XMMS_IPC_OBJECT_PLAYLIST -->
<method>sort</method><!-- XMMS_IPC_CMD_SORT -->
<string var="playlist"/>
<list type="string" var="properties"/>
</code>
</method>
<method name="set_next">
<static/>
<doc>Set next entry in the playlist. Alter the position pointer.</doc>
<returns><uint32/><doc>Some ID of collection entry</doc></returns>
<args><uint32 name="position"/></args>
<code type="ipc-message">
<object>playlist</object>
<method>set_next</method><!-- XMMS_IPC_CMD_SET_POS -->
<uint32 var="position"/>
</code>
</method>
<method name="set_next_rel">
<static/>
<doc>Set next entry in the playlist. Alter the position pointer.</doc>
<returns><uint32/><doc>Some ID of collection entry</doc></returns>
<args><int32 name="position"/></args>
<code type="ipc-message">
<object>playlist</object>
<method>set_next_rel</method><!-- XMMS_IPC_CMD_SET_POS_REL -->
<int32 var="position"/>
</code>
</method>
<method name="move_entry">
<doc>Move a playlist entry to a new position (absolute move)</doc>
<args>
<uint32 name="cur_pos"/>
<uint32 name="new_pos"/>
</args>
<code type="ipc-message">
<object>playlist</object>
<method>move_entry</method><!-- XMMS_IPC_CMD_MOVE_ENTRY -->
<string var="playlist"/>
<uint32 var="cur_pos"/>
<uint32 var="new_pos"/>
</code>
</method>
<method name="">
<doc></doc>
<args>
</args>
<code type="ipc-message">
<object>playlist</object>
<method></method><!-- -->
</code>
</method>
</object>
</root>