1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>BtSongIO: Buzztrax Bt-Core Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Buzztrax Bt-Core Reference Manual">
<link rel="up" href="ch04.html" title="Song IO Reference">
<link rel="prev" href="ch04.html" title="Song IO Reference">
<link rel="next" href="BtSongIONative.html" title="BtSongIONative">
<meta name="generator" content="GTK-Doc V1.24.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#BtSongIO.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#BtSongIO.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#BtSongIO.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch04.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="BtSongIONative.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="BtSongIO"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="BtSongIO.top_of_page"></a>BtSongIO</span></h2>
<p>BtSongIO — base class for song input and output</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="BtSongIO.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="BtSongIO.html#BtSongIOInit" title="BtSongIOInit ()">*BtSongIOInit</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="BtSongIO.html" title="BtSongIO"><span class="returnvalue">BtSongIO</span></a> *
</td>
<td class="function_name">
<a class="link" href="BtSongIO.html#bt-song-io-from-data" title="bt_song_io_from_data ()">bt_song_io_from_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="BtSongIO.html" title="BtSongIO"><span class="returnvalue">BtSongIO</span></a> *
</td>
<td class="function_name">
<a class="link" href="BtSongIO.html#bt-song-io-from-file" title="bt_song_io_from_file ()">bt_song_io_from_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glibglib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
</td>
<td class="function_name">
<a class="link" href="BtSongIO.html#bt-song-io-get-module-info-list" title="bt_song_io_get_module_info_list ()">bt_song_io_get_module_info_list</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="BtSongIO.html#bt-song-io-load" title="bt_song_io_load ()">bt_song_io_load</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="BtSongIO.html#bt-song-io-save" title="bt_song_io_save ()">bt_song_io_save</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="BtSongIO.html#bt-song-io-virtual-load" title="bt_song_io_virtual_load ()">*bt_song_io_virtual_load</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="BtSongIO.html#bt-song-io-virtual-save" title="bt_song_io_virtual_save ()">*bt_song_io_virtual_save</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="BtSongIO.properties"></a><h2>Properties</h2>
<div class="informaltable"><table border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a></td>
<td class="property_name"><a class="link" href="BtSongIO.html#BtSongIO--data" title="The “data” property">data</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
<td class="property_name"><a class="link" href="BtSongIO.html#BtSongIO--data-len" title="The “data-len” property">data-len</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="BtSongIO.html#BtSongIO--file-name" title="The “file-name” property">file-name</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="BtSongIO.html#BtSongIO--status" title="The “status” property">status</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="BtSongIO.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="BtSongIO.html#BT-SONG-IO-ERROR:CAPS" title="BT_SONG_IO_ERROR">BT_SONG_IO_ERROR</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="BtSongIO.html#BT-SONG-IO-MODULE-INFO-MAX-FORMATS:CAPS" title="BT_SONG_IO_MODULE_INFO_MAX_FORMATS">BT_SONG_IO_MODULE_INFO_MAX_FORMATS</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="BtSongIO.html#BtSongIO-struct" title="struct BtSongIO">BtSongIO</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="BtSongIO.html#BtSongIOClass" title="struct BtSongIOClass">BtSongIOClass</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="BtSongIO.html#BtSongIOError" title="enum BtSongIOError">BtSongIOError</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="BtSongIO.html#BtSongIOFormatInfo" title="BtSongIOFormatInfo">BtSongIOFormatInfo</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="BtSongIO.html#BtSongIOModuleInfo" title="BtSongIOModuleInfo">BtSongIOModuleInfo</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="BtSongIO.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> BtSongIO
<span class="lineart">├──</span> <a class="link" href="BtSongIOBuzz.html" title="BtSongIOBuzz">BtSongIOBuzz</a>
<span class="lineart">╰──</span> <a class="link" href="BtSongIONative.html" title="BtSongIONative">BtSongIONative</a>
</pre>
</div>
<div class="refsect1">
<a name="BtSongIO.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <libbtcore/core.h>
</pre>
</div>
<div class="refsect1">
<a name="BtSongIO.description"></a><h2>Description</h2>
<p>A base class for <a class="link" href="BtSong.html" title="BtSong"><span class="type">BtSong</span></a> loader and saver implementations. A <a class="link" href="BtSongIO.html" title="BtSongIO"><span class="type">BtSongIO</span></a> module
needs to be installed as a shared library into LIBDIR/songio. It is
recognized, if it exports a <a class="link" href="BtSongIO.html#BtSongIOModuleInfo" title="BtSongIOModuleInfo"><span class="type">BtSongIOModuleInfo</span></a> structure. At runtime the
detect method of each module is called with the chosen file-name. The module
should return its <a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType"><span class="type">GType</span></a> if it can handle the format or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> else.</p>
<p>Such a module should overwrite the <a class="link" href="BtSongIO.html#bt-song-io-load" title="bt_song_io_load ()"><code class="function">bt_song_io_load()</code></a> and/or <a class="link" href="BtSongIO.html#bt-song-io-save" title="bt_song_io_save ()"><code class="function">bt_song_io_save()</code></a>
default implementations.</p>
<p>There is an internal subclass of this called <a class="link" href="BtSongIONative.html" title="BtSongIONative"><span class="type">BtSongIONative</span></a>.</p>
<div class="note"><p>
This API is not yet fully stable. Please discuss with the deverloper team if
you intend to write a io plugin.
</p></div>
</div>
<div class="refsect1">
<a name="BtSongIO.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="BtSongIOInit"></a><h3>BtSongIOInit ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*BtSongIOInit<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Function to init the plugin.</p>
<div class="refsect3">
<a name="id-1.4.5.2.9.2.5"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the plugin was initialized fine</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="bt-song-io-from-data"></a><h3>bt_song_io_from_data ()</h3>
<pre class="programlisting"><a class="link" href="BtSongIO.html" title="BtSongIO"><span class="returnvalue">BtSongIO</span></a> *
bt_song_io_from_data (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *data</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *media_type</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
<p>Create a new instance from the given parameters. Each installed plugin will
test if it can handle the file type.</p>
<div class="refsect3">
<a name="id-1.4.5.2.9.3.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>in memory data of the song</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>the siye of the <em class="parameter"><code>data</code></em>
block</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>media_type</p></td>
<td class="parameter_description"><p>the media-type of the song, if available</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>where to store the error message in case of an error, or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.5.2.9.3.6"></a><h4>Returns</h4>
<p> the new instance or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in case of an error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="bt-song-io-from-file"></a><h3>bt_song_io_from_file ()</h3>
<pre class="programlisting"><a class="link" href="BtSongIO.html" title="BtSongIO"><span class="returnvalue">BtSongIO</span></a> *
bt_song_io_from_file (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const file_name</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
<p>Create a new instance from the given <em class="parameter"><code>file_name</code></em>
. Each installed plugin will
test if it can handle the file type.</p>
<div class="refsect3">
<a name="id-1.4.5.2.9.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>file_name</p></td>
<td class="parameter_description"><p>the file name of the song</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>where to store the error message in case of an error, or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.5.2.9.4.6"></a><h4>Returns</h4>
<p> the new instance or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in case of an error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="bt-song-io-get-module-info-list"></a><h3>bt_song_io_get_module_info_list ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
bt_song_io_get_module_info_list (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Get read only access to list of <a class="link" href="BtSongIO.html#BtSongIOModuleInfo" title="BtSongIOModuleInfo"><span class="type">BtSongIOModuleInfo</span></a> entries.</p>
<div class="refsect3">
<a name="id-1.4.5.2.9.5.5"></a><h4>Returns</h4>
<p> the
<a href="/usr/share/gtk-doc/html/glibglib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a>. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> BuzztraxCore.SongIOModuleInfo][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="bt-song-io-load"></a><h3>bt_song_io_load ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
bt_song_io_load (<em class="parameter"><code><a class="link" href="BtSongIO.html" title="BtSongIO"><span class="type">BtSongIO</span></a> const *self</code></em>,
<em class="parameter"><code>const <a class="link" href="BtSong.html" title="BtSong"><span class="type">BtSong</span></a> * const song</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
<p>load the song from a file. The file is set in the constructor</p>
<div class="refsect3">
<a name="id-1.4.5.2.9.6.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the <a class="link" href="BtSongIO.html" title="BtSongIO"><span class="type">BtSongIO</span></a> instance to use</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>song</p></td>
<td class="parameter_description"><p>the <a class="link" href="BtSong.html" title="BtSong"><span class="type">BtSong</span></a> instance that should initialized</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>where to store the error message in case of an error, or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.5.2.9.6.6"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for success</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="bt-song-io-save"></a><h3>bt_song_io_save ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
bt_song_io_save (<em class="parameter"><code><a class="link" href="BtSongIO.html" title="BtSongIO"><span class="type">BtSongIO</span></a> const *self</code></em>,
<em class="parameter"><code>const <a class="link" href="BtSong.html" title="BtSong"><span class="type">BtSong</span></a> * const song</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
<p>save the song to a file. The file is set in the constructor</p>
<div class="refsect3">
<a name="id-1.4.5.2.9.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>the <a class="link" href="BtSongIO.html" title="BtSongIO"><span class="type">BtSongIO</span></a> instance to use</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>song</p></td>
<td class="parameter_description"><p>the <a class="link" href="BtSong.html" title="BtSong"><span class="type">BtSong</span></a> instance that should stored</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>where to store the error message in case of an error, or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.5.2.9.7.6"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for success</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="bt-song-io-virtual-load"></a><h3>bt_song_io_virtual_load ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*bt_song_io_virtual_load<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> self</code></em>,
<em class="parameter"><code>const <a class="link" href="BtSong.html" title="BtSong"><span class="type">BtSong</span></a> * const song</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
<p>Subclasses will override this methods with the loader function.</p>
<div class="refsect3">
<a name="id-1.4.5.2.9.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>song-io instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>song</p></td>
<td class="parameter_description"><p>song object to load</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>where to store the error message in case of an error, or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.5.2.9.8.6"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for success</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="bt-song-io-virtual-save"></a><h3>bt_song_io_virtual_save ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*bt_song_io_virtual_save<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> const self</code></em>,
<em class="parameter"><code>const <a class="link" href="BtSong.html" title="BtSong"><span class="type">BtSong</span></a> * const song</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
<p>Subclasses will override this methods with the saver function.</p>
<div class="refsect3">
<a name="id-1.4.5.2.9.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>song-io instance</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>song</p></td>
<td class="parameter_description"><p>song object to save</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>where to store the error message in case of an error, or <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.5.2.9.9.6"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for success</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="BtSongIO.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="BT-SONG-IO-ERROR:CAPS"></a><h3>BT_SONG_IO_ERROR</h3>
<pre class="programlisting">#define BT_SONG_IO_ERROR bt_song_io_error_quark ()
</pre>
<p>Error domain for the song-io subsystem. Errors in this domain will
be from the <a class="link" href="BtSongIO.html#BtSongIOError" title="enum BtSongIOError"><span class="type">BtSongIOError</span></a> enumeration.
See <a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> for information on error domains.</p>
</div>
<hr>
<div class="refsect2">
<a name="BT-SONG-IO-MODULE-INFO-MAX-FORMATS:CAPS"></a><h3>BT_SONG_IO_MODULE_INFO_MAX_FORMATS</h3>
<pre class="programlisting">#define BT_SONG_IO_MODULE_INFO_MAX_FORMATS 10
</pre>
<p>Maximum number of <a class="link" href="BtSongIO.html#BtSongIOFormatInfo" title="BtSongIOFormatInfo"><span class="type">BtSongIOFormatInfo</span></a> per plugin (10).</p>
</div>
<hr>
<div class="refsect2">
<a name="BtSongIO-struct"></a><h3>struct BtSongIO</h3>
<pre class="programlisting">struct BtSongIO;</pre>
<p>base object for song input and output plugins</p>
</div>
<hr>
<div class="refsect2">
<a name="BtSongIOClass"></a><h3>struct BtSongIOClass</h3>
<pre class="programlisting">struct BtSongIOClass {
const GObjectClass parent;
/* class methods */
bt_song_io_virtual_load load;
bt_song_io_virtual_save save;
};
</pre>
<p>Base class for song input and output plugins</p>
<div class="refsect3">
<a name="id-1.4.5.2.10.5.5"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p>const <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> <em class="structfield"><code><a name="BtSongIOClass.parent"></a>parent</code></em>;</p></td>
<td class="struct_member_description"><p>parent class type</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="BtSongIO.html#bt-song-io-virtual-load" title="bt_song_io_virtual_load ()"><span class="type">bt_song_io_virtual_load</span></a> <em class="structfield"><code><a name="BtSongIOClass.load"></a>load</code></em>;</p></td>
<td class="struct_member_description"><p>virtual method for loading a song</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="BtSongIO.html#bt-song-io-virtual-save" title="bt_song_io_virtual_save ()"><span class="type">bt_song_io_virtual_save</span></a> <em class="structfield"><code><a name="BtSongIOClass.save"></a>save</code></em>;</p></td>
<td class="struct_member_description"><p>virtual method for saving a song</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="BtSongIOError"></a><h3>enum BtSongIOError</h3>
<p>Error codes returned by the song-io subsystem in additions to <a href="/usr/share/gtk-doc/html/giogio-GIOError.html#GIOErrorEnum"><span class="type">GIOErrorEnum</span></a>.</p>
<div class="refsect3">
<a name="id-1.4.5.2.10.6.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="BT-SONG-IO-ERROR-UNKNOWN-FORMAT:CAPS"></a>BT_SONG_IO_ERROR_UNKNOWN_FORMAT</p></td>
<td class="enum_member_description">
<p>file is not in one of the supported formats</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="BT-SONG-IO-ERROR-UNSUPPORTED-METHOD:CAPS"></a>BT_SONG_IO_ERROR_UNSUPPORTED_METHOD</p></td>
<td class="enum_member_description">
<p>operation is not supported for this
file type</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="BT-SONG-IO-ERROR-INVALID-FORMAT:CAPS"></a>BT_SONG_IO_ERROR_INVALID_FORMAT</p></td>
<td class="enum_member_description">
<p>file has structural errors</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="BtSongIOFormatInfo"></a><h3>BtSongIOFormatInfo</h3>
<pre class="programlisting">typedef struct {
GType type;
const gchar *name;
const gchar *mime_type;
const gchar *extension;
} BtSongIOFormatInfo;
</pre>
<p>Metadata structure for <a class="link" href="BtSongIO.html" title="BtSongIO"><span class="type">BtSongIO</span></a> plugins describing one format.</p>
<div class="refsect3">
<a name="id-1.4.5.2.10.7.5"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType"><span class="type">GType</span></a> <em class="structfield"><code><a name="BtSongIOFormatInfo.type"></a>type</code></em>;</p></td>
<td class="struct_member_description"><p>the io module <a href="/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType"><span class="type">GType</span></a></p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="BtSongIOFormatInfo.name"></a>name</code></em>;</p></td>
<td class="struct_member_description"><p>format name</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="BtSongIOFormatInfo.mime-type"></a>mime_type</code></em>;</p></td>
<td class="struct_member_description"><p>mime type</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="BtSongIOFormatInfo.extension"></a>extension</code></em>;</p></td>
<td class="struct_member_description"><p>file extension</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="BtSongIOModuleInfo"></a><h3>BtSongIOModuleInfo</h3>
<pre class="programlisting">typedef struct {
BtSongIOInit init;
BtSongIOFormatInfo formats[BT_SONG_IO_MODULE_INFO_MAX_FORMATS];
} BtSongIOModuleInfo;
</pre>
<p>Metadata structure for <a class="link" href="BtSongIO.html" title="BtSongIO"><span class="type">BtSongIO</span></a> plugins.</p>
<div class="refsect3">
<a name="id-1.4.5.2.10.8.5"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a class="link" href="BtSongIO.html#BtSongIOInit" title="BtSongIOInit ()"><span class="type">BtSongIOInit</span></a> <em class="structfield"><code><a name="BtSongIOModuleInfo.init"></a>init</code></em>;</p></td>
<td class="struct_member_description"><p>pointer to init function, can be <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="BtSongIO.html#BtSongIOFormatInfo" title="BtSongIOFormatInfo"><span class="type">BtSongIOFormatInfo</span></a> <em class="structfield"><code><a name="BtSongIOModuleInfo.formats"></a>formats</code></em>[BT_SONG_IO_MODULE_INFO_MAX_FORMATS];</p></td>
<td class="struct_member_description"><p><a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated array of formats supported by this plugin</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="BtSongIO.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="BtSongIO--data"></a><h3>The <code class="literal">“data”</code> property</h3>
<pre class="programlisting"> “data” <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a></pre>
<p>in memory block pointer for load save operations.</p>
<p>Flags: Read</p>
</div>
<hr>
<div class="refsect2">
<a name="BtSongIO--data-len"></a><h3>The <code class="literal">“data-len”</code> property</h3>
<pre class="programlisting"> “data-len” <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
<p>in memory block length for load save operations.</p>
<p>Flags: Read</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="BtSongIO--file-name"></a><h3>The <code class="literal">“file-name”</code> property</h3>
<pre class="programlisting"> “file-name” <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>full filename for load save operations.</p>
<p>Flags: Read</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="BtSongIO--status"></a><h3>The <code class="literal">“status”</code> property</h3>
<pre class="programlisting"> “status” <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>status of load save operations.</p>
<p>Flags: Read / Write</p>
<p>Default value: NULL</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24.1</div>
</body>
</html>
|