/usr/share/gir-1.0/MediaArt-2.0.gir is in libmediaart-2.0-dev 1.9.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 | <?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository version="1.2"
xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GObject" version="2.0"/>
<include name="Gio" version="2.0"/>
<c:include name="libmediaart/mediaart.h"/>
<namespace name="MediaArt"
version="2.0"
shared-library="libmediaart-2.0.so.0"
c:identifier-prefixes="MediaArt"
c:symbol-prefixes="media_art">
<enumeration name="Error"
version="0.2.0"
c:type="MediaArtError"
glib:error-domain="media-art-error-quark">
<doc xml:space="preserve">Enumeration values used in errors returned by the
#MediaArtError API.</doc>
<member name="no_storage"
value="0"
c:identifier="MEDIA_ART_ERROR_NO_STORAGE">
<doc xml:space="preserve">Storage information is unknown, we
have no knowledge about removable media.</doc>
</member>
<member name="no_title"
value="1"
c:identifier="MEDIA_ART_ERROR_NO_TITLE">
<doc xml:space="preserve">Title is required, but was not provided,
or was empty.</doc>
</member>
<member name="symlink_failed"
value="2"
c:identifier="MEDIA_ART_ERROR_SYMLINK_FAILED">
<doc xml:space="preserve">A call to symlink() failed
resulting in the incorrect storage of media art.</doc>
</member>
<member name="rename_failed"
value="3"
c:identifier="MEDIA_ART_ERROR_RENAME_FAILED">
<doc xml:space="preserve">File could not be renamed.</doc>
</member>
<member name="no_cache_dir"
value="4"
c:identifier="MEDIA_ART_ERROR_NO_CACHE_DIR">
<doc xml:space="preserve">This is given when the
XDG_CACHE_HOME directory could not be used to create the
'media-art' subdirectory used for caching media art. This is
usually an initiation error.</doc>
</member>
</enumeration>
<class name="Process"
c:symbol-prefix="process"
c:type="MediaArtProcess"
parent="GObject.Object"
glib:type-name="MediaArtProcess"
glib:get-type="media_art_process_get_type"
glib:type-struct="ProcessClass">
<doc xml:space="preserve">A class implementation for processing and extracting media art.</doc>
<implements name="Gio.Initable"/>
<constructor name="new"
c:identifier="media_art_process_new"
version="0.5.0"
throws="1">
<doc xml:space="preserve">Initialize a GObject for processing and extracting media art.
This function initializes cache hash tables, backend plugins,
and storage modules used for removable devices.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new #MediaArtProcess object on success or %NULL if
@error is set. This object must be freed using g_object_unref().</doc>
<type name="Process" c:type="MediaArtProcess*"/>
</return-value>
</constructor>
<method name="buffer"
c:identifier="media_art_process_buffer"
version="0.5.0"
throws="1">
<doc xml:space="preserve">Processes a memory buffer represented by @buffer and @len. If you
have extracted any embedded media art and passed this in as
@buffer, the image data will be converted to the correct format and
saved in the media art cache.
Either @artist OR @title can be %NULL, but they can not both be %NULL.
If @file is on a removable filesystem, the media art file will be saved in a
cache on the removable file system rather than on the host machine.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @file could be processed or %FALSE if @error is set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="process" transfer-ownership="none">
<doc xml:space="preserve">Media art process object</doc>
<type name="Process" c:type="MediaArtProcess*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">The type of media</doc>
<type name="Type" c:type="MediaArtType"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">The options given for how to process the media art</doc>
<type name="ProcessFlags" c:type="MediaArtProcessFlags"/>
</parameter>
<parameter name="related_file" transfer-ownership="none">
<doc xml:space="preserve">File related to the media art</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
<parameter name="buffer"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">a buffer containing @file data, or %NULL</doc>
<array length="4" zero-terminated="0" c:type="guchar*">
<type name="guint8" c:type="guchar"/>
</array>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">length of @buffer, or 0</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
<parameter name="mime"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">MIME type of @buffer, or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="artist"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The artist name @file or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="title"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The title for @file or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">optional #GCancellable object, %NULL to
ignore</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
</parameters>
</method>
<method name="buffer_async"
c:identifier="media_art_process_buffer_async"
version="0.7.0">
<doc xml:space="preserve">Processes media art. Precisely the same operation as
media_art_process_buffer() is performing, but asynchronously.
When all i/o for the operation is finished the @callback will be
called.
In case of a partial error the callback will be called with any
succeeding items and no error, and on the next request the error
will be reported. If a request is cancelled the callback will be
called with %G_IO_ERROR_CANCELLED.
Dbufferng an async request no other sync and async calls are allowed,
and will result in %G_IO_ERROR_PENDING errors.
Any outstanding i/o request with higher priority (lower numerical
value) will be executed before an outstanding request with lower
priority. Default priority is %G_PRIORITY_DEFAULT.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="process" transfer-ownership="none">
<doc xml:space="preserve">Media art process object</doc>
<type name="Process" c:type="MediaArtProcess*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">The type of media</doc>
<type name="Type" c:type="MediaArtType"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">The options given for how to process the media art</doc>
<type name="ProcessFlags" c:type="MediaArtProcessFlags"/>
</parameter>
<parameter name="related_file" transfer-ownership="none">
<doc xml:space="preserve">File related to the media art</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
<parameter name="buffer"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">a buffer containing @file
data, or %NULL</doc>
<array length="4" zero-terminated="0" c:type="guchar*">
<type name="guint8" c:type="guchar"/>
</array>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">length of @buffer, or 0</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
<parameter name="mime" transfer-ownership="none">
<doc xml:space="preserve">MIME type of @buffer, or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="artist"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The artist name @file or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="title"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The title for @file or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="io_priority" transfer-ownership="none">
<doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">optional #GCancellable object, %NULL to
ignore</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
<parameter name="callback"
transfer-ownership="none"
nullable="1"
allow-none="1"
scope="async"
closure="11">
<doc xml:space="preserve">a #GAsyncReadyCallback to call when the
request is satisfied</doc>
<type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
</parameter>
<parameter name="user_data"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the data to pass to callback function</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="buffer_finish"
c:identifier="media_art_process_buffer_finish"
version="0.7.0"
throws="1">
<doc xml:space="preserve">Finishes the asynchronous operation started with
media_art_process_file_async().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, otherwise %FALSE when @error will be set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="process" transfer-ownership="none">
<doc xml:space="preserve">the #MediaArtProcess</doc>
<type name="Process" c:type="MediaArtProcess*"/>
</instance-parameter>
<parameter name="result" transfer-ownership="none">
<doc xml:space="preserve">a #GAsyncResult.</doc>
<type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
</parameter>
</parameters>
</method>
<method name="file"
c:identifier="media_art_process_file"
version="0.3.0"
throws="1">
<doc xml:space="preserve">Process @file and check if media art exists and if it is up to date
with @artist and @title provided. Either @artist OR @title can be
%NULL, but they can not both be %NULL.
NOTE: This function MAY retrieve media art for
@artist and @title combinations. It is not guaranteed and depends
on download services available over DBus at the time.
In cases where download is unavailable, media_art_process_file()
will only try to procure a cache for possible media art found in
directories surrounding the location of @file. If a buffer or
memory chunk needs to be saved to disk which has been retrieved
from an MP3 (for example), you should use
media_art_process_buffer().
The modification time (mtime) of @file is checked against the
cached stored for @artist and @title. If the cache is old or
doesn't exist, it will be updated. What this actually does is
update the mtime of the cache (a symlink) on the disk.
If there is no actual media art stored locally (for example, it's
stored in a directory on a removable device), it is copied locally
(usually to an XDG cache directory).
If @file is on a removable filesystem, the media art file will be
saved in a cache on the removable file system rather than on the
host machine.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @file could be processed or %FALSE if @error is set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="process" transfer-ownership="none">
<doc xml:space="preserve">Media art process object</doc>
<type name="Process" c:type="MediaArtProcess*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">The type of media</doc>
<type name="Type" c:type="MediaArtType"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">The options given for how to process the media art</doc>
<type name="ProcessFlags" c:type="MediaArtProcessFlags"/>
</parameter>
<parameter name="file" transfer-ownership="none">
<doc xml:space="preserve">File to be processed</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
<parameter name="artist"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The artist name @file or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="title"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The title for @file or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">optional #GCancellable object, %NULL to
ignore</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
</parameters>
</method>
<method name="file_async"
c:identifier="media_art_process_file_async"
version="0.7.0">
<doc xml:space="preserve">Processes media art. Precisely the same operation as
media_art_process_file() is performing, but asynchronously.
When all i/o for the operation is finished the @callback will be
called.
In case of a partial error the callback will be called with any
succeeding items and no error, and on the next request the error
will be reported. If a request is cancelled the callback will be
called with %G_IO_ERROR_CANCELLED.
During an async request no other sync and async calls are allowed,
and will result in %G_IO_ERROR_PENDING errors.
Any outstanding i/o request with higher priority (lower numerical
value) will be executed before an outstanding request with lower
priority. Default priority is %G_PRIORITY_DEFAULT.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="process" transfer-ownership="none">
<doc xml:space="preserve">Media art process object</doc>
<type name="Process" c:type="MediaArtProcess*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">The type of media</doc>
<type name="Type" c:type="MediaArtType"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">The options given for how to process the media art</doc>
<type name="ProcessFlags" c:type="MediaArtProcessFlags"/>
</parameter>
<parameter name="file" transfer-ownership="none">
<doc xml:space="preserve">File to be processed</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
<parameter name="artist"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The artist name @file or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="title"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The title for @file or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="io_priority" transfer-ownership="none">
<doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">optional #GCancellable object, %NULL to
ignore</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
<parameter name="callback"
transfer-ownership="none"
nullable="1"
allow-none="1"
scope="async"
closure="8">
<doc xml:space="preserve">a #GAsyncReadyCallback to call when the
request is satisfied</doc>
<type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
</parameter>
<parameter name="user_data"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the data to pass to callback function</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="file_finish"
c:identifier="media_art_process_file_finish"
version="0.7.0"
throws="1">
<doc xml:space="preserve">Finishes the asynchronous operation started with
media_art_process_file_async().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, otherwise %FALSE when @error will be set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="process" transfer-ownership="none">
<doc xml:space="preserve">the #MediaArtProcess</doc>
<type name="Process" c:type="MediaArtProcess*"/>
</instance-parameter>
<parameter name="result" transfer-ownership="none">
<doc xml:space="preserve">a #GAsyncResult.</doc>
<type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
</parameter>
</parameters>
</method>
<method name="uri"
c:identifier="media_art_process_uri"
version="0.5.0"
throws="1">
<doc xml:space="preserve">This function calls media_art_process_file(), but takes the @uri as
a string rather than a #GFile object. Either @artist OR @title can be
%NULL, but they can not both be %NULL.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @uri could be processed or %FALSE if @error is set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="process" transfer-ownership="none">
<doc xml:space="preserve">Media art process object</doc>
<type name="Process" c:type="MediaArtProcess*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">The type of media that contained the image data</doc>
<type name="Type" c:type="MediaArtType"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">How the media art is processed</doc>
<type name="ProcessFlags" c:type="MediaArtProcessFlags"/>
</parameter>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">URI of the media file that contained the data</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="artist"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The artist name @uri or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="title"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The title for @uri or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">optional #GCancellable object, %NULL to
ignore</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
</parameters>
</method>
<method name="uri_async"
c:identifier="media_art_process_uri_async"
version="0.7.0">
<doc xml:space="preserve">Processes media art. Precisely the same operation as
media_art_process_uri() is performing, but asynchronously.
When all i/o for the operation is finished the @callback will be
called.
In case of a partial error the callback will be called with any
succeeding items and no error, and on the next request the error
will be reported. If a request is cancelled the callback will be
called with %G_IO_ERROR_CANCELLED.
During an async request no other sync and async calls are allowed,
and will result in %G_IO_ERROR_PENDING errors.
Any outstanding i/o request with higher priority (lower numerical
value) will be executed before an outstanding request with lower
priority. Default priority is %G_PRIORITY_DEFAULT.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="process" transfer-ownership="none">
<doc xml:space="preserve">Media art process object</doc>
<type name="Process" c:type="MediaArtProcess*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">The type of media</doc>
<type name="Type" c:type="MediaArtType"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">The options given for how to process the media art</doc>
<type name="ProcessFlags" c:type="MediaArtProcessFlags"/>
</parameter>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">A string representing a URI to be processed</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="artist"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The artist name @file or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="title"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">The title for @file or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="io_priority" transfer-ownership="none">
<doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">optional #GCancellable object, %NULL to
ignore</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
<parameter name="callback"
transfer-ownership="none"
nullable="1"
allow-none="1"
scope="async"
closure="8">
<doc xml:space="preserve">a #GAsyncReadyCallback to call when the
request is satisfied</doc>
<type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
</parameter>
<parameter name="user_data"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the data to pass to callback function</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="uri_finish"
c:identifier="media_art_process_uri_finish"
version="0.7.0"
throws="1">
<doc xml:space="preserve">Finishes the asynchronous operation started with
media_art_process_file_async().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, otherwise %FALSE when @error will be set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="process" transfer-ownership="none">
<doc xml:space="preserve">the #MediaArtProcess</doc>
<type name="Process" c:type="MediaArtProcess*"/>
</instance-parameter>
<parameter name="result" transfer-ownership="none">
<doc xml:space="preserve">a #GAsyncResult.</doc>
<type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
</parameter>
</parameters>
</method>
<field name="parent">
<doc xml:space="preserve">parent object</doc>
<type name="GObject.Object" c:type="GObject"/>
</field>
</class>
<record name="ProcessClass"
c:type="MediaArtProcessClass"
glib:is-gtype-struct-for="Process">
<doc xml:space="preserve">Prototype for the class.</doc>
<field name="parent">
<doc xml:space="preserve">parent object class</doc>
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<bitfield name="ProcessFlags"
version="0.3.0"
c:type="MediaArtProcessFlags">
<doc xml:space="preserve">This type categorized the flags used when processing media art.</doc>
<member name="none"
value="0"
c:identifier="MEDIA_ART_PROCESS_FLAGS_NONE">
<doc xml:space="preserve">Normal operation.</doc>
</member>
<member name="force"
value="1"
c:identifier="MEDIA_ART_PROCESS_FLAGS_FORCE">
<doc xml:space="preserve">Force media art to be re-saved to disk even if it already exists and the related file or URI has the same modified time (mtime).</doc>
</member>
</bitfield>
<enumeration name="Type" c:type="MediaArtType">
<doc xml:space="preserve">This type categorized the type of media art we're dealing with.</doc>
<member name="none" value="0" c:identifier="MEDIA_ART_NONE">
<doc xml:space="preserve">No media art is available</doc>
</member>
<member name="album" value="1" c:identifier="MEDIA_ART_ALBUM">
<doc xml:space="preserve">Media art is an album</doc>
</member>
<member name="video" value="2" c:identifier="MEDIA_ART_VIDEO">
<doc xml:space="preserve">Media art is a movie or video</doc>
</member>
</enumeration>
<function name="buffer_to_jpeg"
c:identifier="media_art_buffer_to_jpeg"
version="0.1.0"
throws="1">
<doc xml:space="preserve">This function performs the same operation as
media_art_file_to_jpeg() with the exception that a raw @buffer can
be used instead providing @len and the @buffer_mime too.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if conversion was successful, otherwise %FALSE is
returned if @error is set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">Raw buffer representing content to save</doc>
<array length="1" zero-terminated="0" c:type="unsigned char*">
<type name="guint8" c:type="unsigned char"/>
</array>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">Length of @buffer to use</doc>
<type name="gsize" c:type="size_t"/>
</parameter>
<parameter name="buffer_mime" transfer-ownership="none">
<doc xml:space="preserve">MIME type for @buffer</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="target" transfer-ownership="none">
<doc xml:space="preserve">Output file name (not URI) to save converted content to</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</function>
<function name="error_quark"
c:identifier="media_art_error_quark"
version="0.2.0">
<return-value transfer-ownership="none">
<doc xml:space="preserve">the #GQuark used to identify media art errors in
GError structures.</doc>
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
<function name="file_to_jpeg"
c:identifier="media_art_file_to_jpeg"
version="0.1.0"
throws="1">
<doc xml:space="preserve">Save @filename to @target as JPEG format. The @filename may not be
a JPEG in the first place.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if conversion was successful, otherwise %FALSE is
returned if @error is set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="filename" transfer-ownership="none">
<doc xml:space="preserve">Original file name (not URI) to convert</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="target" transfer-ownership="none">
<doc xml:space="preserve">Output file name (not URI) to save converted content to</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</function>
<function name="get_file"
c:identifier="media_art_get_file"
version="0.2.0">
<doc xml:space="preserve">Gets the files pointing to cache files suitable for storing the media
art provided by the @artist, @title and @file arguments. @cache_file
will point to a location in the XDG user cache directory..
The @cache_file relates to a symlink stored in XDG cache directories
for the user. A @cache_file would be expected to look like
<filename>file:///home/martyn/.cache/media-art/...</filename>. This
is normally the location that is most useful (assuming the cache
has been extracted in the first place).
When done, both #GFile<!-- -->s must be freed with g_object_unref() if
non-%NULL.
This operation should not use i/o, but it depends on the backend
GFile implementation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cache_file was returned, otherwise %FALSE.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="artist"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the artist</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="title"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the title</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="prefix"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the prefix for cache files, for example "album"</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="cache_file"
direction="out"
caller-allocates="0"
transfer-ownership="full"
optional="1"
allow-none="1">
<doc xml:space="preserve">a pointer to a
#GFile which represents the cached file for media art, or %NULL
a #GFile representing the user&apos;s cache path, or %NULL
#GFile representing the location of the local media art</doc>
<type name="Gio.File" c:type="GFile**"/>
</parameter>
</parameters>
</function>
<function name="get_path"
c:identifier="media_art_get_path"
version="0.2.0">
<doc xml:space="preserve">This function calls media_art_get_file() by creating a #GFile for
@uri and passing the same arguments to media_art_get_file(). For more
details about what this function does, see media_art_get_file().
Get the path to media art for a given resource. Newly allocated
data returned in @cache_path must be freed with g_free().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cache_path was returned, otherwise %FALSE.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="artist"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the artist</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="title"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the title</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="prefix"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the prefix, for example "album"</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="cache_path"
direction="out"
caller-allocates="0"
transfer-ownership="full"
optional="1"
allow-none="1">
<doc xml:space="preserve">a string
representing the path to the cache for this media art
path or %NULL</doc>
<type name="utf8" c:type="gchar**"/>
</parameter>
</parameters>
</function>
<function name="plugin_init"
c:identifier="media_art_plugin_init"
version="0.1.0">
<doc xml:space="preserve">This function facilitates a plugin&apos;s need to create any
internal caches before anything else is done. This function must
exist in each plugin and is called immediately after the plugin is
loaded. Conversely, media_art_plugin_shutdown() is called before
tear down of the plugin system or plugin itself.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="max_width" transfer-ownership="none">
<doc xml:space="preserve">The maximum width that an image is allowed to be</doc>
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</function>
<function name="plugin_shutdown"
c:identifier="media_art_plugin_shutdown"
version="0.1.0">
<doc xml:space="preserve">This function facilitates a plugin&apos;s need to clean up any
internal caches. This function must exist in each plugin and is
called immediately after the plugin is loaded. Conversely,
media_art_plugin_init() is called after the plugin is loaded.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</function>
<function name="remove"
c:identifier="media_art_remove"
version="0.2.0"
throws="1">
<doc xml:space="preserve">Removes media art for given album/artist provided.
If @artist and @album are %NULL, ALL media art cache is removed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">#TRUE on success, otherwise #FALSE where @error will be set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="artist" transfer-ownership="none">
<doc xml:space="preserve">artist the media art belongs to</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="album"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">album the media art belongs or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">optional #GCancellable object, %NULL to ignore.</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
</parameters>
</function>
<function name="remove_async"
c:identifier="media_art_remove_async"
version="0.7.0">
<doc xml:space="preserve">Removes media art for given album/artist provided. Precisely the
same operation as media_art_remove() is performing, but
asynchronously.
When all i/o for the operation is finished the @callback will be
called.
In case of a partial error the callback will be called with any
succeeding items and no error, and on the next request the error
will be reported. If a request is cancelled the callback will be
called with %G_IO_ERROR_CANCELLED.
During an async request no other sync and async calls are allowed,
and will result in %G_IO_ERROR_PENDING errors.
Any outstanding i/o request with higher priority (lower numerical
value) will be executed before an outstanding request with lower
priority. Default priority is %G_PRIORITY_DEFAULT.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="artist" transfer-ownership="none">
<doc xml:space="preserve">artist the media art belongs to</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="album"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">album the media art belongs or %NULL</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="io_priority" transfer-ownership="none">
<doc xml:space="preserve">the [I/O priority][io-priority] of the request</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="source_object"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the #GObject this task belongs to,
can be %NULL.</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="cancellable"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">optional #GCancellable object, %NULL to
ignore</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
<parameter name="callback"
transfer-ownership="none"
nullable="1"
allow-none="1"
scope="async"
closure="6">
<doc xml:space="preserve">a #GAsyncReadyCallback to call when the
request is satisfied</doc>
<type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
</parameter>
<parameter name="user_data"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the data to pass to callback function</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</function>
<function name="remove_finish"
c:identifier="media_art_remove_finish"
version="0.7.0"
throws="1">
<doc xml:space="preserve">Finishes the asynchronous operation started with
media_art_remove_async().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, otherwise %FALSE when @error will be set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="source_object"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the #GObject this task belongs to,
can be %NULL.</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="result" transfer-ownership="none">
<doc xml:space="preserve">a #GAsyncResult.</doc>
<type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
</parameter>
</parameters>
</function>
<function name="strip_invalid_entities"
c:identifier="media_art_strip_invalid_entities"
version="0.2.0">
<doc xml:space="preserve">Strip a albumname or artistname string to prepare it for calculating the
media art path with it. Certain characters and charactersets will be stripped
and a newly allocated string returned which you must free with g_free().
This functions is used internally by media_art_get_file() and
media_art_get_path(). You will not normally need to call it yourself.
This function provides the following features:
1. Invalid characters include: ()[]<>{}_!@#$^&*+=|\/"'?~;
2. Text inside brackets of (), {}, [] and <> pairs are removed.
3. Multiples of space characters are removed.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">@original stripped of invalid characters which must be
freed. On error or if @original is empty, %NULL is returned.</doc>
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="original" transfer-ownership="none">
<doc xml:space="preserve">original string</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</function>
</namespace>
</repository>
|