1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>RBStaticPlaylistSource</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
<link rel="home" href="index.html" title="Rhythmbox Development Reference Manual">
8
<link rel="up" href="ch06.html" title="Sources">
9
<link rel="prev" href="RBSource.html" title="RBSource">
10
<link rel="next" href="RBStreamingSource.html" title="RBStreamingSource">
11
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="RBSource.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="ch06.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">Rhythmbox Development Reference Manual</th>
21
<td><a accesskey="n" href="RBStreamingSource.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#RBStaticPlaylistSource.synopsis" class="shortcut">Top</a>
26
<a href="#RBStaticPlaylistSource.description" class="shortcut">Description</a>
28
<a href="#RBStaticPlaylistSource.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#RBStaticPlaylistSource.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
33
<div class="refentry">
34
<a name="RBStaticPlaylistSource"></a><div class="titlepage"></div>
35
<div class="refnamediv"><table width="100%"><tr>
37
<h2><span class="refentrytitle"><a name="RBStaticPlaylistSource.top_of_page"></a>RBStaticPlaylistSource</span></h2>
38
<p>RBStaticPlaylistSource — Manually defined playlist class</p>
40
<td valign="top" align="right"></td>
42
<div class="refsynopsisdiv">
43
<a name="RBStaticPlaylistSource.synopsis"></a><h2>Synopsis</h2>
44
<pre class="synopsis">struct <a class="link" href="RBStaticPlaylistSource.html#RBStaticPlaylistSource-struct" title="struct RBStaticPlaylistSource">RBStaticPlaylistSource</a>;
45
struct <a class="link" href="RBStaticPlaylistSource.html#RBStaticPlaylistSourceClass" title="struct RBStaticPlaylistSourceClass">RBStaticPlaylistSourceClass</a>;
46
<a class="link" href="RBSource.html" title="RBSource"><span class="returnvalue">RBSource</span></a> * <a class="link" href="RBStaticPlaylistSource.html#rb-static-playlist-source-new" title="rb_static_playlist_source_new ()">rb_static_playlist_source_new</a> (<em class="parameter"><code><a class="link" href="RBShell.html" title="RBShell"><span class="type">RBShell</span></a> *shell</code></em>,
47
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
48
<em class="parameter"><code>const <span class="type">char</span> *sorting_name</code></em>,
49
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> local</code></em>,
50
<em class="parameter"><code><a class="link" href="RhythmDBEntryType.html" title="RhythmDBEntryType"><span class="type">RhythmDBEntryType</span></a> *entry_type</code></em>);
51
<a class="link" href="RBSource.html" title="RBSource"><span class="returnvalue">RBSource</span></a> * <a class="link" href="RBStaticPlaylistSource.html#rb-static-playlist-source-new-from-xml" title="rb_static_playlist_source_new_from_xml ()">rb_static_playlist_source_new_from_xml</a>
52
(<em class="parameter"><code><a class="link" href="RBShell.html" title="RBShell"><span class="type">RBShell</span></a> *shell</code></em>,
53
<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>);
54
<span class="returnvalue">void</span> <a class="link" href="RBStaticPlaylistSource.html#rb-static-playlist-source-load-from-xml" title="rb_static_playlist_source_load_from_xml ()">rb_static_playlist_source_load_from_xml</a>
55
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
56
<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>);
57
<span class="returnvalue">void</span> <a class="link" href="RBStaticPlaylistSource.html#rb-static-playlist-source-add-entry" title="rb_static_playlist_source_add_entry ()">rb_static_playlist_source_add_entry</a> (<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
58
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>,
59
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> index</code></em>);
60
<span class="returnvalue">void</span> <a class="link" href="RBStaticPlaylistSource.html#rb-static-playlist-source-remove-entry" title="rb_static_playlist_source_remove_entry ()">rb_static_playlist_source_remove_entry</a>
61
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
62
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>);
63
<span class="returnvalue">void</span> <a class="link" href="RBStaticPlaylistSource.html#rb-static-playlist-source-add-location" title="rb_static_playlist_source_add_location ()">rb_static_playlist_source_add_location</a>
64
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
65
<em class="parameter"><code>const <span class="type">char</span> *location</code></em>,
66
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> index</code></em>);
67
<span class="returnvalue">void</span> <a class="link" href="RBStaticPlaylistSource.html#rb-static-playlist-source-add-locations" title="rb_static_playlist_source_add_locations ()">rb_static_playlist_source_add_locations</a>
68
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
69
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *locations</code></em>);
70
<span class="returnvalue">void</span> <a class="link" href="RBStaticPlaylistSource.html#rb-static-playlist-source-remove-location" title="rb_static_playlist_source_remove_location ()">rb_static_playlist_source_remove_location</a>
71
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
72
<em class="parameter"><code>const <span class="type">char</span> *location</code></em>);
73
<span class="returnvalue">void</span> <a class="link" href="RBStaticPlaylistSource.html#rb-static-playlist-source-move-entry" title="rb_static_playlist_source_move_entry ()">rb_static_playlist_source_move_entry</a>
74
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
75
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>,
76
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> index</code></em>);
79
<div class="refsect1">
80
<a name="RBStaticPlaylistSource.object-hierarchy"></a><h2>Object Hierarchy</h2>
81
<pre class="synopsis">
82
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
83
+----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
84
+----<a href="http://library.gnome.org/devel/gtk/GtkWidget.html">GtkWidget</a>
85
+----<a href="http://library.gnome.org/devel/gtk/GtkContainer.html">GtkContainer</a>
86
+----<a href="http://library.gnome.org/devel/gtk/GtkBox.html">GtkBox</a>
87
+----<a href="http://library.gnome.org/devel/gtk/GtkHBox.html">GtkHBox</a>
89
+----<a class="link" href="RBSource.html" title="RBSource">RBSource</a>
90
+----<a class="link" href="RBPlaylistSource.html" title="RBPlaylistSource">RBPlaylistSource</a>
91
+----RBStaticPlaylistSource
92
+----<a class="link" href="RBPlayQueueSource.html" title="RBPlayQueueSource">RBPlayQueueSource</a>
95
<div class="refsect1">
96
<a name="RBStaticPlaylistSource.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
98
RBStaticPlaylistSource implements
99
AtkImplementorIface, <a href="http://library.gnome.org/devel/gtk/GtkBuildable.html">GtkBuildable</a> and <a href="http://library.gnome.org/devel/gtk/gtk3-Orientable.html#GtkOrientable">GtkOrientable</a>.</p>
101
<div class="refsect1">
102
<a name="RBStaticPlaylistSource.description"></a><h2>Description</h2>
104
Static playlists are not defined by a query, but instead by manually selected
108
This class is used for static playlists built from the user's library, and is
109
also a base class for the play queue and for playlists on devices and network
113
It has some ability to track locations that are not yet present in the database
114
and to add them to the playlist once they are added.
117
<div class="refsect1">
118
<a name="RBStaticPlaylistSource.details"></a><h2>Details</h2>
119
<div class="refsect2">
120
<a name="RBStaticPlaylistSource-struct"></a><h3>struct RBStaticPlaylistSource</h3>
121
<pre class="programlisting">struct RBStaticPlaylistSource;</pre>
126
<div class="refsect2">
127
<a name="RBStaticPlaylistSourceClass"></a><h3>struct RBStaticPlaylistSourceClass</h3>
128
<pre class="programlisting">struct RBStaticPlaylistSourceClass {
129
RBPlaylistSourceClass parent;
136
<div class="refsect2">
137
<a name="rb-static-playlist-source-new"></a><h3>rb_static_playlist_source_new ()</h3>
138
<pre class="programlisting"><a class="link" href="RBSource.html" title="RBSource"><span class="returnvalue">RBSource</span></a> * rb_static_playlist_source_new (<em class="parameter"><code><a class="link" href="RBShell.html" title="RBShell"><span class="type">RBShell</span></a> *shell</code></em>,
139
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
140
<em class="parameter"><code>const <span class="type">char</span> *sorting_name</code></em>,
141
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> local</code></em>,
142
<em class="parameter"><code><a class="link" href="RhythmDBEntryType.html" title="RhythmDBEntryType"><span class="type">RhythmDBEntryType</span></a> *entry_type</code></em>);</pre>
144
Creates a new static playlist source.
146
<div class="variablelist"><table border="0">
147
<col align="left" valign="top">
150
<td><p><span class="term"><em class="parameter"><code>shell</code></em> :</span></p></td>
151
<td>the <a class="link" href="RBShell.html" title="RBShell"><span class="type">RBShell</span></a>
155
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
156
<td>the playlist name</td>
159
<td><p><span class="term"><em class="parameter"><code>local</code></em> :</span></p></td>
160
<td>if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the playlist is local to the library</td>
163
<td><p><span class="term"><em class="parameter"><code>entry_type</code></em> :</span></p></td>
164
<td>type of database entries that can be added to the playlist.</td>
167
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
168
<td>new playlist.</td>
174
<div class="refsect2">
175
<a name="rb-static-playlist-source-new-from-xml"></a><h3>rb_static_playlist_source_new_from_xml ()</h3>
176
<pre class="programlisting"><a class="link" href="RBSource.html" title="RBSource"><span class="returnvalue">RBSource</span></a> * rb_static_playlist_source_new_from_xml
177
(<em class="parameter"><code><a class="link" href="RBShell.html" title="RBShell"><span class="type">RBShell</span></a> *shell</code></em>,
178
<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>);</pre>
180
Constructs a new playlist from the given XML document node.
182
<div class="variablelist"><table border="0">
183
<col align="left" valign="top">
186
<td><p><span class="term"><em class="parameter"><code>shell</code></em> :</span></p></td>
187
<td>the <a class="link" href="RBShell.html" title="RBShell"><span class="type">RBShell</span></a>
191
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
192
<td>XML node containing playlist entries</td>
195
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
196
<td>playlist read from XML</td>
202
<div class="refsect2">
203
<a name="rb-static-playlist-source-load-from-xml"></a><h3>rb_static_playlist_source_load_from_xml ()</h3>
204
<pre class="programlisting"><span class="returnvalue">void</span> rb_static_playlist_source_load_from_xml
205
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
206
<em class="parameter"><code><span class="type">xmlNodePtr</span> node</code></em>);</pre>
208
Loads the playlist contents from the specified XML document node.
210
<div class="variablelist"><table border="0">
211
<col align="left" valign="top">
214
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
215
<td>an <a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a>
219
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
220
<td>XML node to load from</td>
226
<div class="refsect2">
227
<a name="rb-static-playlist-source-add-entry"></a><h3>rb_static_playlist_source_add_entry ()</h3>
228
<pre class="programlisting"><span class="returnvalue">void</span> rb_static_playlist_source_add_entry (<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
229
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>,
230
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> index</code></em>);</pre>
232
Adds the specified entry to the playlist.
234
<div class="variablelist"><table border="0">
235
<col align="left" valign="top">
238
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
239
<td>an <a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a>
243
<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
244
<td>entry to add to the playlist</td>
247
<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
248
<td>position at which to add it (-1 to add at the end)</td>
254
<div class="refsect2">
255
<a name="rb-static-playlist-source-remove-entry"></a><h3>rb_static_playlist_source_remove_entry ()</h3>
256
<pre class="programlisting"><span class="returnvalue">void</span> rb_static_playlist_source_remove_entry
257
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
258
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>);</pre>
260
Removes the specified entry from the playlist.
262
<div class="variablelist"><table border="0">
263
<col align="left" valign="top">
266
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
267
<td>an <a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a>
271
<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
272
<td>the entry to remove</td>
278
<div class="refsect2">
279
<a name="rb-static-playlist-source-add-location"></a><h3>rb_static_playlist_source_add_location ()</h3>
280
<pre class="programlisting"><span class="returnvalue">void</span> rb_static_playlist_source_add_location
281
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
282
<em class="parameter"><code>const <span class="type">char</span> *location</code></em>,
283
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> index</code></em>);</pre>
285
If the location matches an entry in the database, the entry is added
286
to the playlist. Otherwise, if it identifies a directory, the contents
287
of that directory are added.
289
<div class="variablelist"><table border="0">
290
<col align="left" valign="top">
293
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
294
<td>an <a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a>
298
<td><p><span class="term"><em class="parameter"><code>location</code></em> :</span></p></td>
299
<td>location (URI) to add to the playlist</td>
302
<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
303
<td>position at which to add the location (-1 to add at the end)</td>
309
<div class="refsect2">
310
<a name="rb-static-playlist-source-add-locations"></a><h3>rb_static_playlist_source_add_locations ()</h3>
311
<pre class="programlisting"><span class="returnvalue">void</span> rb_static_playlist_source_add_locations
312
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
313
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *locations</code></em>);</pre>
315
Adds the locations specified in <em class="parameter"><code>locations</code></em> to the playlist.
316
See <em class="parameter"><code>rb_static_playlist_source_add_location</code></em> for details.
318
<div class="variablelist"><table border="0">
319
<col align="left" valign="top">
322
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
323
<td>an <a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a>
327
<td><p><span class="term"><em class="parameter"><code>locations</code></em> :</span></p></td>
328
<td>URI strings to add. <span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8][<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span>
335
<div class="refsect2">
336
<a name="rb-static-playlist-source-remove-location"></a><h3>rb_static_playlist_source_remove_location ()</h3>
337
<pre class="programlisting"><span class="returnvalue">void</span> rb_static_playlist_source_remove_location
338
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
339
<em class="parameter"><code>const <span class="type">char</span> *location</code></em>);</pre>
341
Removes the specified location from the playlist. This affects both
342
the location map and the query model, whether an entry exists for the
345
<div class="variablelist"><table border="0">
346
<col align="left" valign="top">
349
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
350
<td>an <a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a>
354
<td><p><span class="term"><em class="parameter"><code>location</code></em> :</span></p></td>
355
<td>location to remove</td>
361
<div class="refsect2">
362
<a name="rb-static-playlist-source-move-entry"></a><h3>rb_static_playlist_source_move_entry ()</h3>
363
<pre class="programlisting"><span class="returnvalue">void</span> rb_static_playlist_source_move_entry
364
(<em class="parameter"><code><a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a> *source</code></em>,
365
<em class="parameter"><code><a class="link" href="RhythmDB.html#RhythmDBEntry"><span class="type">RhythmDBEntry</span></a> *entry</code></em>,
366
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> index</code></em>);</pre>
368
Moves an entry within the playlist.
370
<div class="variablelist"><table border="0">
371
<col align="left" valign="top">
374
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
375
<td>an <a class="link" href="RBStaticPlaylistSource.html" title="RBStaticPlaylistSource"><span class="type">RBStaticPlaylistSource</span></a>
379
<td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
380
<td>the entry to move</td>
383
<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
384
<td>new location for the entry</td>
393
Generated by GTK-Doc V1.17</div>
b'\\ No newline at end of file'