8
8
<link rel="up" href="api-reference.html" title="API Reference">
9
9
<link rel="prev" href="api-reference.html" title="API Reference">
10
10
<link rel="next" href="TotemPlPlaylist.html" title="TotemPlPlaylist">
11
<meta name="generator" content="GTK-Doc V1.17.1 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
48
48
<div class="refsynopsisdiv">
49
49
<a name="TotemPlParser.synopsis"></a><h2>Synopsis</h2>
50
<pre class="synopsis">
50
<a name="TotemPlParserMetadata"></a><pre class="synopsis">
51
51
#include <totem-pl-parser.h>
53
struct <a class="link" href="TotemPlParser.html#TotemPlParser-struct" title="struct TotemPlParser">TotemPlParser</a>;
54
typedef <a class="link" href="TotemPlParser.html#TotemPlParserClass" title="TotemPlParserClass">TotemPlParserClass</a>;
53
<a class="link" href="TotemPlParser.html#TotemPlParser-struct" title="TotemPlParser">TotemPlParser</a>;
54
<a class="link" href="TotemPlParser.html#TotemPlParserClass" title="TotemPlParserClass">TotemPlParserClass</a>;
55
55
enum <a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult">TotemPlParserResult</a>;
56
56
enum <a class="link" href="TotemPlParser.html#TotemPlParserType" title="enum TotemPlParserType">TotemPlParserType</a>;
57
57
enum <a class="link" href="TotemPlParser.html#TotemPlParserError" title="enum TotemPlParserError">TotemPlParserError</a>;
58
typedef <a class="link" href="TotemPlParser.html#TotemPlParserMetadata">TotemPlParserMetadata</a>;
58
59
<a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="returnvalue">TotemPlParser</span></a> * <a class="link" href="TotemPlParser.html#totem-pl-parser-new" title="totem_pl_parser_new ()">totem_pl_parser_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
59
<a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> <a class="link" href="TotemPlParser.html#totem-pl-parser-parse" title="totem_pl_parser_parse ()">totem_pl_parser_parse</a> (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
60
<a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> <a class="link" href="TotemPlParser.html#totem-pl-parser-parse" title="totem_pl_parser_parse ()">totem_pl_parser_parse</a> (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
60
61
<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>,
61
62
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fallback</code></em>);
62
63
<span class="returnvalue">void</span> <a class="link" href="TotemPlParser.html#totem-pl-parser-parse-async" title="totem_pl_parser_parse_async ()">totem_pl_parser_parse_async</a> (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
65
66
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
66
67
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
67
68
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
68
<a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> <a class="link" href="TotemPlParser.html#totem-pl-parser-parse-finish" title="totem_pl_parser_parse_finish ()">totem_pl_parser_parse_finish</a> (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
69
<a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> <a class="link" href="TotemPlParser.html#totem-pl-parser-parse-finish" title="totem_pl_parser_parse_finish ()">totem_pl_parser_parse_finish</a> (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
69
70
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *async_result</code></em>,
70
71
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
71
<a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> <a class="link" href="TotemPlParser.html#totem-pl-parser-parse-with-base" title="totem_pl_parser_parse_with_base ()">totem_pl_parser_parse_with_base</a> (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
72
<a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> <a class="link" href="TotemPlParser.html#totem-pl-parser-parse-with-base" title="totem_pl_parser_parse_with_base ()">totem_pl_parser_parse_with_base</a> (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
72
73
<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>,
73
74
<em class="parameter"><code>const <span class="type">char</span> *base</code></em>,
74
75
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fallback</code></em>);
123
124
#define <a class="link" href="TotemPlParser.html#TOTEM-PL-PARSER-FIELD-ID:CAPS" title="TOTEM_PL_PARSER_FIELD_ID">TOTEM_PL_PARSER_FIELD_ID</a>
124
125
#define <a class="link" href="TotemPlParser.html#TOTEM-PL-PARSER-FIELD-IS-PLAYLIST:CAPS" title="TOTEM_PL_PARSER_FIELD_IS_PLAYLIST">TOTEM_PL_PARSER_FIELD_IS_PLAYLIST</a>
125
126
#define <a class="link" href="TotemPlParser.html#TOTEM-PL-PARSER-FIELD-SUBTITLE-URI:CAPS" title="TOTEM_PL_PARSER_FIELD_SUBTITLE_URI">TOTEM_PL_PARSER_FIELD_SUBTITLE_URI</a>
127
#define <a class="link" href="TotemPlParser.html#TOTEM-PL-PARSER-FIELD-CONTENT-TYPE:CAPS" title="TOTEM_PL_PARSER_FIELD_CONTENT_TYPE">TOTEM_PL_PARSER_FIELD_CONTENT_TYPE</a>
128
130
<div class="refsect1">
161
167
<div class="example">
162
<a name="id435036"></a><p class="title"><b>Example 1. Reading a Playlist</b></p>
168
<a name="id326105"></a><p class="title"><b>Example 1. Reading a Playlist</b></p>
163
169
<div class="example-contents">
164
170
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
195
201
<div class="example">
196
<a name="id435057"></a><p class="title"><b>Example 2. Reading a Playlist Asynchronously</b></p>
202
<a name="id326127"></a><p class="title"><b>Example 2. Reading a Playlist Asynchronously</b></p>
197
203
<div class="example-contents">
198
204
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
245
251
<div class="example">
246
<a name="id435081"></a><p class="title"><b>Example 3. Getting Metadata from Entries</b></p>
252
<a name="id326150"></a><p class="title"><b>Example 3. Getting Metadata from Entries</b></p>
247
253
<div class="example-contents">
248
254
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
279
285
<div class="example">
280
<a name="id435101"></a><p class="title"><b>Example 4. Writing a Playlist</b></p>
286
<a name="id326171"></a><p class="title"><b>Example 4. Writing a Playlist</b></p>
281
287
<div class="example-contents">
282
288
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
354
360
<div class="refsect1">
355
361
<a name="TotemPlParser.details"></a><h2>Details</h2>
356
362
<div class="refsect2">
357
<a name="TotemPlParser-struct"></a><h3>struct TotemPlParser</h3>
358
<pre class="programlisting">struct TotemPlParser;</pre>
363
<a name="TotemPlParser-struct"></a><h3>TotemPlParser</h3>
364
<pre class="programlisting">typedef struct _TotemPlParser TotemPlParser;</pre>
360
366
All the fields in the <a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> structure are private and should never be accessed directly.
364
370
<div class="refsect2">
365
371
<a name="TotemPlParserClass"></a><h3>TotemPlParserClass</h3>
366
<pre class="programlisting">typedef struct TotemPlParserClass TotemPlParserClass;
372
<pre class="programlisting">typedef struct {
373
GObjectClass parent_class;
376
void (*entry_parsed) (TotemPlParser *parser,
378
GHashTable *metadata);
379
void (*playlist_started) (TotemPlParser *parser,
381
GHashTable *metadata);
382
void (*playlist_ended) (TotemPlParser *parser,
384
} TotemPlParserClass;
369
387
The class structure for the <a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> type.
389
<div class="variablelist"><table border="0">
390
<col align="left" valign="top">
393
<td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> <em class="structfield"><code><a name="TotemPlParserClass.parent-class"></a>parent_class</code></em>;</span></p></td>
394
<td>the parent class</td>
397
<td><p><span class="term"><em class="structfield"><code><a name="TotemPlParserClass.entry-parsed"></a>entry_parsed</code></em> ()</span></p></td>
398
<td>the generic signal handler for the <a class="link" href="TotemPlParser.html#TotemPlParser-entry-parsed" title='The "entry-parsed" signal'><span class="type">"entry-parsed"</span></a> signal,
399
which can be overridden by inheriting classes</td>
402
<td><p><span class="term"><em class="structfield"><code><a name="TotemPlParserClass.playlist-started"></a>playlist_started</code></em> ()</span></p></td>
403
<td>the generic signal handler for the <a class="link" href="TotemPlParser.html#TotemPlParser-playlist-started" title='The "playlist-started" signal'><span class="type">"playlist-started"</span></a> signal,
404
which can be overridden by inheriting classes</td>
407
<td><p><span class="term"><em class="structfield"><code><a name="TotemPlParserClass.playlist-ended"></a>playlist_ended</code></em> ()</span></p></td>
408
<td>the generic signal handler for the <a class="link" href="TotemPlParser.html#TotemPlParser-playlist-ended" title='The "playlist-ended" signal'><span class="type">"playlist-ended"</span></a> signal,
409
which can be overridden by inheriting classes</td>
373
415
<div class="refsect2">
498
540
<div class="refsect2">
541
<a name="TotemPlParserMetadata"></a><h3>TotemPlParserMetadata</h3>
542
<pre class="programlisting">typedef GHashTable TotemPlParserMetadata;
546
<div class="refsect2">
499
547
<a name="totem-pl-parser-new"></a><h3>totem_pl_parser_new ()</h3>
500
548
<pre class="programlisting"><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="returnvalue">TotemPlParser</span></a> * totem_pl_parser_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
514
562
<div class="refsect2">
515
563
<a name="totem-pl-parser-parse"></a><h3>totem_pl_parser_parse ()</h3>
516
<pre class="programlisting"><a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> totem_pl_parser_parse (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
564
<pre class="programlisting"><a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> totem_pl_parser_parse (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
517
565
<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>,
518
566
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fallback</code></em>);</pre>
609
657
<div class="refsect2">
610
658
<a name="totem-pl-parser-parse-finish"></a><h3>totem_pl_parser_parse_finish ()</h3>
611
<pre class="programlisting"><a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> totem_pl_parser_parse_finish (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
659
<pre class="programlisting"><a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> totem_pl_parser_parse_finish (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
612
660
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *async_result</code></em>,
613
661
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
649
697
<div class="refsect2">
650
698
<a name="totem-pl-parser-parse-with-base"></a><h3>totem_pl_parser_parse_with_base ()</h3>
651
<pre class="programlisting"><a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> totem_pl_parser_parse_with_base (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
699
<pre class="programlisting"><a class="link" href="TotemPlParser.html#TotemPlParserResult" title="enum TotemPlParserResult"><span class="returnvalue">TotemPlParserResult</span></a> totem_pl_parser_parse_with_base (<em class="parameter"><code><a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser</code></em>,
652
700
<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>,
653
701
<em class="parameter"><code>const <span class="type">char</span> *base</code></em>,
654
702
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fallback</code></em>);</pre>
1185
1233
The URI of the entry's subtitle file.
1237
<div class="refsect2">
1238
<a name="TOTEM-PL-PARSER-FIELD-CONTENT-TYPE:CAPS"></a><h3>TOTEM_PL_PARSER_FIELD_CONTENT_TYPE</h3>
1239
<pre class="programlisting">#define TOTEM_PL_PARSER_FIELD_CONTENT_TYPE "content-type"
1189
1243
<div class="refsect1">
1190
1244
<a name="TotemPlParser.property-details"></a><h2>Property Details</h2>
1234
1288
<a name="TotemPlParser-entry-parsed"></a><h3>The <code class="literal">"entry-parsed"</code> signal</h3>
1235
1289
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser,
1236
1290
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri,
1237
<span class="type">TotemPlParserMetadata</span> *metadata,
1291
<a class="link" href="TotemPlParser.html#TotemPlParserMetadata"><span class="type">TotemPlParserMetadata</span></a> *metadata,
1238
1292
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
1240
1294
The ::entry-parsed signal is emitted when a new entry is parsed.
1254
1308
<td><p><span class="term"><em class="parameter"><code>metadata</code></em> :</span></p></td>
1255
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> of metadata relating to the entry added</td>
1309
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> of metadata relating to the entry added. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> TotemPlParser.ParserMetadata]</span>
1258
1313
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1295
1350
<a name="TotemPlParser-playlist-started"></a><h3>The <code class="literal">"playlist-started"</code> signal</h3>
1296
1351
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="TotemPlParser.html" title="TotemPlParser"><span class="type">TotemPlParser</span></a> *parser,
1297
1352
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri,
1298
<span class="type">TotemPlParserMetadata</span> *metadata,
1353
<a class="link" href="TotemPlParser.html#TotemPlParserMetadata"><span class="type">TotemPlParserMetadata</span></a> *metadata,
1299
1354
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
1301
1356
The ::playlist-started signal is emitted when a playlist parsing has
1318
1373
<td><p><span class="term"><em class="parameter"><code>metadata</code></em> :</span></p></td>
1319
1374
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> of metadata relating to the playlist that
1375
started. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> TotemPlParser.ParserMetadata]</span>
1323
1379
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>