/usr/share/gtk-doc/html/appstream-glib/appstream-glib-as-utils.html is in appstream-glib-doc 0.5.13-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 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>as-utils: AppStream-glib Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="AppStream-glib Reference Manual">
<link rel="up" href="libappstream-glib.html" title="libappstream-glib GObject library">
<link rel="prev" href="AsTranslation.html" title="AsTranslation">
<link rel="next" href="appstream-glib-as-version.html" title="as-version">
<meta name="generator" content="GTK-Doc V1.25 (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="#appstream-glib-as-utils.description" class="shortcut">Description</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="libappstream-glib.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="AsTranslation.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="appstream-glib-as-version.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="appstream-glib-as-utils"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="appstream-glib-as-utils.top_of_page"></a>as-utils</span></h2>
<p>as-utils — Helper functions that are used inside libappstream-glib</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="appstream-glib-as-utils.stability-level"></a><h2>Stability Level</h2>
<acronym title="The intention of a Stable interface is to enable arbitrary third parties to
develop applications to these interfaces, release them, and have confidence that
they will run on all minor releases of the product (after the one in which the
interface was introduced, and within the same major release). Even at a major
release, incompatible changes are expected to be rare, and to have strong
justifications.
"><span class="acronym">Stable</span></acronym>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="appstream-glib-as-utils.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-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-error-quark" title="as_utils_error_quark ()">as_utils_error_quark</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="appstream-glib-as-utils.html#as-utils-is-stock-icon-name" title="as_utils_is_stock_icon_name ()">as_utils_is_stock_icon_name</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="appstream-glib-as-utils.html#as-utils-is-spdx-license-id" title="as_utils_is_spdx_license_id ()">as_utils_is_spdx_license_id</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="appstream-glib-as-utils.html#as-utils-is-spdx-license" title="as_utils_is_spdx_license ()">as_utils_is_spdx_license</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="appstream-glib-as-utils.html#as-utils-is-environment-id" title="as_utils_is_environment_id ()">as_utils_is_environment_id</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="appstream-glib-as-utils.html#as-utils-is-category-id" title="as_utils_is_category_id ()">as_utils_is_category_id</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="appstream-glib-as-utils.html#as-utils-is-blacklisted-id" title="as_utils_is_blacklisted_id ()">as_utils_is_blacklisted_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-spdx-license-tokenize" title="as_utils_spdx_license_tokenize ()">as_utils_spdx_license_tokenize</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-spdx-license-detokenize" title="as_utils_spdx_license_detokenize ()">as_utils_spdx_license_detokenize</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-license-to-spdx" title="as_utils_license_to_spdx ()">as_utils_license_to_spdx</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-find-icon-filename" title="as_utils_find_icon_filename ()">as_utils_find_icon_filename</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-find-icon-filename-full" title="as_utils_find_icon_filename_full ()">as_utils_find_icon_filename_full</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="appstream-glib-as-utils.html#as-utils-install-filename" title="as_utils_install_filename ()">as_utils_install_filename</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="appstream-glib-as-utils.html#as-utils-search-token-valid" title="as_utils_search_token_valid ()">as_utils_search_token_valid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-search-tokenize" title="as_utils_search_tokenize ()">as_utils_search_tokenize</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-vercmp" title="as_utils_vercmp ()">as_utils_vercmp</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="appstream-glib-as-utils.html#as-utils-guid-is-valid" title="as_utils_guid_is_valid ()">as_utils_guid_is_valid</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-guid-from-string" title="as_utils_guid_from_string ()">as_utils_guid_from_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-version-from-uint32" title="as_utils_version_from_uint32 ()">as_utils_version_from_uint32</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-version-from-uint16" title="as_utils_version_from_uint16 ()">as_utils_version_from_uint16</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-version-parse" title="as_utils_version_parse ()">as_utils_version_parse</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="appstream-glib-as-utils.html#as-utils-string-replace" title="as_utils_string_replace ()">as_utils_string_replace</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="appstream-glib-as-utils.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="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="appstream-glib-as-utils.html#AsUtilsError" title="enum AsUtilsError">AsUtilsError</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="appstream-glib-as-utils.html#AS-UTILS-ERROR:CAPS" title="AS_UTILS_ERROR">AS_UTILS_ERROR</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="appstream-glib-as-utils.html#AsUtilsFindIconFlag" title="enum AsUtilsFindIconFlag">AsUtilsFindIconFlag</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="appstream-glib-as-utils.html#AsUtilsLocation" title="enum AsUtilsLocation">AsUtilsLocation</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="appstream-glib-as-utils.html#AsVersionParseFlag" title="enum AsVersionParseFlag">AsVersionParseFlag</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="appstream-glib-as-utils.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <appstream-glib.h>
</pre>
</div>
<div class="refsect1">
<a name="appstream-glib-as-utils.description"></a><h2>Description</h2>
<p>These functions are used internally to libappstream-glib, and some may be
useful to user-applications.</p>
</div>
<div class="refsect1">
<a name="appstream-glib-as-utils.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="as-utils-error-quark"></a><h3>as_utils_error_quark ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>
as_utils_error_quark (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="refsect3">
<a name="as-utils-error-quark.returns"></a><h4>Returns</h4>
<p> An error quark.</p>
</div>
<p class="since">Since: 0.3.7</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-is-stock-icon-name"></a><h3>as_utils_is_stock_icon_name ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
as_utils_is_stock_icon_name (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>Searches the known list of stock icons.</p>
<div class="refsect3">
<a name="as-utils-is-stock-icon-name.parameters"></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>name</p></td>
<td class="parameter_description"><p>an icon name</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-is-stock-icon-name.returns"></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 icon is a "stock icon name" and does not need to be
included in the AppStream icon tarball</p>
</div>
<p class="since">Since: 0.1.3</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-is-spdx-license-id"></a><h3>as_utils_is_spdx_license_id ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
as_utils_is_spdx_license_id (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_id</code></em>);</pre>
<p>Searches the known list of SPDX license IDs.</p>
<div class="refsect3">
<a name="as-utils-is-spdx-license-id.parameters"></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>license_id</p></td>
<td class="parameter_description"><p>a single SPDX license ID, e.g. "CC-BY-3.0"</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-is-spdx-license-id.returns"></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 icon is a valid "SPDX license ID"</p>
</div>
<p class="since">Since: 0.1.5</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-is-spdx-license"></a><h3>as_utils_is_spdx_license ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
as_utils_is_spdx_license (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license</code></em>);</pre>
<p>Checks the licence string to check it being a valid licence.
NOTE: SPDX licences can't typically contain brackets.</p>
<div class="refsect3">
<a name="as-utils-is-spdx-license.parameters"></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>license</p></td>
<td class="parameter_description"><p>a SPDX license string, e.g. "CC-BY-3.0 and GFDL-1.3"</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-is-spdx-license.returns"></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 icon is a valid "SPDX license"</p>
</div>
<p class="since">Since: 0.2.5</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-is-environment-id"></a><h3>as_utils_is_environment_id ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
as_utils_is_environment_id (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *environment_id</code></em>);</pre>
<p>Searches the known list of registered environment IDs.</p>
<div class="refsect3">
<a name="as-utils-is-environment-id.parameters"></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>environment_id</p></td>
<td class="parameter_description"><p>a desktop ID, e.g. "GNOME"</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-is-environment-id.returns"></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 environment ID is valid</p>
</div>
<p class="since">Since: 0.2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-is-category-id"></a><h3>as_utils_is_category_id ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
as_utils_is_category_id (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *category_id</code></em>);</pre>
<p>Searches the known list of registered category IDs.</p>
<div class="refsect3">
<a name="as-utils-is-category-id.parameters"></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>category_id</p></td>
<td class="parameter_description"><p>a desktop ID, e.g. "AudioVideoEditing"</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-is-category-id.returns"></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 category ID is valid</p>
</div>
<p class="since">Since: 0.2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-is-blacklisted-id"></a><h3>as_utils_is_blacklisted_id ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
as_utils_is_blacklisted_id (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *desktop_id</code></em>);</pre>
<div class="warning"><p><code class="literal">as_utils_is_blacklisted_id</code> is deprecated and should not be used in newly-written code.</p></div>
<p>Searches the known list of blacklisted desktop IDs.</p>
<div class="refsect3">
<a name="as-utils-is-blacklisted-id.parameters"></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>desktop_id</p></td>
<td class="parameter_description"><p>a desktop ID, e.g. "gimp.desktop"</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-is-blacklisted-id.returns"></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 desktop ID is blacklisted</p>
</div>
<p class="since">Since: 0.2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-spdx-license-tokenize"></a><h3>as_utils_spdx_license_tokenize ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
as_utils_spdx_license_tokenize (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license</code></em>);</pre>
<p>Tokenizes the SPDX license string (or any simarly formatted string)
into parts. Any licence parts of the string e.g. "LGPL-2.0+" are prefexed
with "@", the conjunctive replaced with "&" and the disjunctive replaced
with "|". Brackets are added as indervidual tokens and other strings are
appended into single tokens where possible.</p>
<div class="refsect3">
<a name="as-utils-spdx-license-tokenize.parameters"></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>license</p></td>
<td class="parameter_description"><p>a license string, e.g. "LGPLv2+ and (QPL or GPLv2) and MIT"</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-spdx-license-tokenize.returns"></a><h4>Returns</h4>
<p> array of strings, or <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for invalid. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 0.1.5</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-spdx-license-detokenize"></a><h3>as_utils_spdx_license_detokenize ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
as_utils_spdx_license_detokenize (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **license_tokens</code></em>);</pre>
<p>De-tokenizes the SPDX licenses into a string.</p>
<div class="refsect3">
<a name="as-utils-spdx-license-detokenize.parameters"></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>license_tokens</p></td>
<td class="parameter_description"><p>license tokens, typically from <a class="link" href="appstream-glib-as-utils.html#as-utils-spdx-license-tokenize" title="as_utils_spdx_license_tokenize ()"><code class="function">as_utils_spdx_license_tokenize()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-spdx-license-detokenize.returns"></a><h4>Returns</h4>
<p> string, or <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for invalid. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 0.2.5</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-license-to-spdx"></a><h3>as_utils_license_to_spdx ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
as_utils_license_to_spdx (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license</code></em>);</pre>
<p>Converts a non-SPDX license into an SPDX format string where possible.</p>
<div class="refsect3">
<a name="as-utils-license-to-spdx.parameters"></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>license</p></td>
<td class="parameter_description"><p>a not-quite SPDX license string, e.g. "GPLv3+"</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-license-to-spdx.returns"></a><h4>Returns</h4>
<p> the best-effort SPDX license string</p>
</div>
<p class="since">Since: 0.5.5</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-find-icon-filename"></a><h3>as_utils_find_icon_filename ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
as_utils_find_icon_filename (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *destdir</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> *search</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Finds an icon filename from a filesystem root.</p>
<div class="refsect3">
<a name="as-utils-find-icon-filename.parameters"></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>destdir</p></td>
<td class="parameter_description"><p>the destdir.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>search</p></td>
<td class="parameter_description"><p>the icon search name, e.g. "microphone.svg"</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>A <a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.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="as-utils-find-icon-filename.returns"></a><h4>Returns</h4>
<p> a newly allocated <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated string. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 0.2.5</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-find-icon-filename-full"></a><h3>as_utils_find_icon_filename_full ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
as_utils_find_icon_filename_full (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *destdir</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> *search</code></em>,
<em class="parameter"><code><a class="link" href="appstream-glib-as-utils.html#AsUtilsFindIconFlag" title="enum AsUtilsFindIconFlag"><span class="type">AsUtilsFindIconFlag</span></a> flags</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Finds an icon filename from a filesystem root.</p>
<div class="refsect3">
<a name="as-utils-find-icon-filename-full.parameters"></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>destdir</p></td>
<td class="parameter_description"><p>the destdir.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>search</p></td>
<td class="parameter_description"><p>the icon search name, e.g. "microphone.svg"</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>A <a class="link" href="appstream-glib-as-utils.html#AsUtilsFindIconFlag" title="enum AsUtilsFindIconFlag"><span class="type">AsUtilsFindIconFlag</span></a> bitfield</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>A <a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.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="as-utils-find-icon-filename-full.returns"></a><h4>Returns</h4>
<p> a newly allocated <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated string. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 0.3.1</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-install-filename"></a><h3>as_utils_install_filename ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
as_utils_install_filename (<em class="parameter"><code><a class="link" href="appstream-glib-as-utils.html#AsUtilsLocation" title="enum AsUtilsLocation"><span class="type">AsUtilsLocation</span></a> location</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> *filename</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> *origin</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> *destdir</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Installs an AppData, MetaInfo, AppStream XML or AppStream Icon metadata file.</p>
<div class="refsect3">
<a name="as-utils-install-filename.parameters"></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>location</p></td>
<td class="parameter_description"><p>the <a class="link" href="appstream-glib-as-utils.html#AsUtilsLocation" title="enum AsUtilsLocation"><span class="type">AsUtilsLocation</span></a>, e.g. <a class="link" href="appstream-glib-as-utils.html#AS-UTILS-LOCATION-CACHE:CAPS"><code class="literal">AS_UTILS_LOCATION_CACHE</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>the full path of the file to install</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>origin</p></td>
<td class="parameter_description"><p>the origin to use for the installation, or <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>destdir</p></td>
<td class="parameter_description"><p>the destdir to use, or <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>A <a href="/usr/share/gtk-doc/html/glibglib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.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="as-utils-install-filename.returns"></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, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if error is set</p>
</div>
<p class="since">Since: 0.3.4</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-search-token-valid"></a><h3>as_utils_search_token_valid ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
as_utils_search_token_valid (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *token</code></em>);</pre>
<p>Checks the search token if it is valid. Valid tokens are at least 3 chars in
length, not common words like "and", and do not contain markup.</p>
<div class="refsect3">
<a name="as-utils-search-token-valid.parameters"></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>token</p></td>
<td class="parameter_description"><p>the search token</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-search-token-valid.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is the search token was valid</p>
</div>
<p class="since">Since: 0.3.4</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-search-tokenize"></a><h3>as_utils_search_tokenize ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
as_utils_search_tokenize (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *search</code></em>);</pre>
<p>Splits up a string into tokens and returns tokens that are suitable for
searching. This includes taking out common words and casefolding the
returned search tokens.</p>
<div class="refsect3">
<a name="as-utils-search-tokenize.parameters"></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>search</p></td>
<td class="parameter_description"><p>the search string</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-search-tokenize.returns"></a><h4>Returns</h4>
<p> Valid tokens to search for, or <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for 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>
<p class="since">Since: 0.3.4</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-vercmp"></a><h3>as_utils_vercmp ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
as_utils_vercmp (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *version_a</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> *version_b</code></em>);</pre>
<p>Compares version numbers for sorting. This function cannot deal with version
strings that do not contain numbers, for instance "rev2706" or "1.2_alpha".</p>
<div class="refsect3">
<a name="as-utils-vercmp.parameters"></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>version_a</p></td>
<td class="parameter_description"><p>the release version, e.g. 1.2.3</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>version_b</p></td>
<td class="parameter_description"><p>the release version, e.g. 1.2.3.1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-vercmp.returns"></a><h4>Returns</h4>
<p> -1 if a < b, +1 if a > b, 0 if they are equal, and <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#G-MAXINT:CAPS"><code class="literal">G_MAXINT</code></a> on error</p>
</div>
<p class="since">Since: 0.3.5</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-guid-is-valid"></a><h3>as_utils_guid_is_valid ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
as_utils_guid_is_valid (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *guid</code></em>);</pre>
<p>Checks the source string is a valid string GUID descriptor.</p>
<div class="refsect3">
<a name="as-utils-guid-is-valid.parameters"></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>guid</p></td>
<td class="parameter_description"><p>string to check</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-guid-is-valid.returns"></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 <em class="parameter"><code>guid</code></em>
was a valid GUID, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
<p class="since">Since: 0.5.0</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-guid-from-string"></a><h3>as_utils_guid_from_string ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
as_utils_guid_from_string (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);</pre>
<p>Returns a GUID for a given string. This uses a hash and so even small
differences in the <em class="parameter"><code>str</code></em>
will produce radically different return values.</p>
<p>The implementation is taken from RFC4122, Section 4.1.3; specifically
using a type-5 SHA-1 hash with a DNS namespace.
The same result can be obtained with this simple python program:</p>
<p> #!/usr/bin/python
import uuid
print uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')</p>
<div class="refsect3">
<a name="as-utils-guid-from-string.parameters"></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>str</p></td>
<td class="parameter_description"><p>A source string to use as a key</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-guid-from-string.returns"></a><h4>Returns</h4>
<p> A new GUID, or <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if the string was invalid</p>
</div>
<p class="since">Since: 0.5.0</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-version-from-uint32"></a><h3>as_utils_version_from_uint32 ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
as_utils_version_from_uint32 (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint32"><span class="type">guint32</span></a> val</code></em>,
<em class="parameter"><code><a class="link" href="appstream-glib-as-utils.html#AsVersionParseFlag" title="enum AsVersionParseFlag"><span class="type">AsVersionParseFlag</span></a> flags</code></em>);</pre>
<p>Returns a dotted decimal version string from a 32 bit number.</p>
<div class="refsect3">
<a name="as-utils-version-from-uint32.parameters"></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>val</p></td>
<td class="parameter_description"><p>A uint32le version number</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags used for formatting, e.g. <a class="link" href="appstream-glib-as-utils.html#AS-VERSION-PARSE-FLAG-USE-TRIPLET:CAPS"><code class="literal">AS_VERSION_PARSE_FLAG_USE_TRIPLET</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-version-from-uint32.returns"></a><h4>Returns</h4>
<p> A version number, e.g. "1.0.3"</p>
</div>
<p class="since">Since: 0.5.2</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-version-from-uint16"></a><h3>as_utils_version_from_uint16 ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
as_utils_version_from_uint16 (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint16"><span class="type">guint16</span></a> val</code></em>,
<em class="parameter"><code><a class="link" href="appstream-glib-as-utils.html#AsVersionParseFlag" title="enum AsVersionParseFlag"><span class="type">AsVersionParseFlag</span></a> flags</code></em>);</pre>
<p>Returns a dotted decimal version string from a 16 bit number.</p>
<div class="refsect3">
<a name="as-utils-version-from-uint16.parameters"></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>val</p></td>
<td class="parameter_description"><p>A uint16le version number</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags used for formatting, e.g. <a class="link" href="appstream-glib-as-utils.html#AS-VERSION-PARSE-FLAG-USE-TRIPLET:CAPS"><code class="literal">AS_VERSION_PARSE_FLAG_USE_TRIPLET</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-version-from-uint16.returns"></a><h4>Returns</h4>
<p> A version number, e.g. "1.3"</p>
</div>
<p class="since">Since: 0.5.2</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-version-parse"></a><h3>as_utils_version_parse ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
as_utils_version_parse (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *version</code></em>);</pre>
<p>Returns a dotted decimal version string from a version string. The supported
formats are:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>Dotted decimal, e.g. "1.2.3"</p></li>
<li class="listitem"><p>Base 16, a hex number *with* a 0x prefix, e.g. "0x10203"</p></li>
<li class="listitem"><p>Base 10, a string containing just [0-9], e.g. "66051"</p></li>
<li class="listitem"><p>Date in YYYYMMDD format, e.g. 20150915</p></li>
</ul></div>
<p>Anything with a '.' or that doesn't match [0-9] or 0x[a-f,0-9] is considered
a string and returned without modification.</p>
<div class="refsect3">
<a name="as-utils-version-parse.parameters"></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>version</p></td>
<td class="parameter_description"><p>A version number</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-version-parse.returns"></a><h4>Returns</h4>
<p> A version number, e.g. "1.0.3"</p>
</div>
<p class="since">Since: 0.5.2</p>
</div>
<hr>
<div class="refsect2">
<a name="as-utils-string-replace"></a><h3>as_utils_string_replace ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
as_utils_string_replace (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Strings.html#GString"><span class="type">GString</span></a> *string</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> *search</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> *replace</code></em>);</pre>
<p>Performs multiple search and replace operations on the given string.</p>
<div class="refsect3">
<a name="as-utils-string-replace.parameters"></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>string</p></td>
<td class="parameter_description"><p>The <a href="/usr/share/gtk-doc/html/glibglib-Strings.html#GString"><span class="type">GString</span></a> to operate on</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>search</p></td>
<td class="parameter_description"><p>The text to search for</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>replace</p></td>
<td class="parameter_description"><p>The text to use for substitutions</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="as-utils-string-replace.returns"></a><h4>Returns</h4>
<p> the number of replacements done, or 0 if <em class="parameter"><code>search</code></em>
is not found.</p>
</div>
<p class="since">Since: 0.5.11</p>
</div>
</div>
<div class="refsect1">
<a name="appstream-glib-as-utils.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="AsUtilsError"></a><h3>enum AsUtilsError</h3>
<p>The error type.</p>
<div class="refsect3">
<a name="AsUtilsError.members"></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="AS-UTILS-ERROR-FAILED:CAPS"></a>AS_UTILS_ERROR_FAILED</p></td>
<td class="enum_member_description">
<p>Generic failure</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="AS-UTILS-ERROR-INVALID-TYPE:CAPS"></a>AS_UTILS_ERROR_INVALID_TYPE</p></td>
<td class="enum_member_description">
<p>Invalid type</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="AS-UTILS-ERROR:CAPS"></a><h3>AS_UTILS_ERROR</h3>
<pre class="programlisting">#define AS_UTILS_ERROR as_utils_error_quark ()
</pre>
</div>
<hr>
<div class="refsect2">
<a name="AsUtilsFindIconFlag"></a><h3>enum AsUtilsFindIconFlag</h3>
<p>The flags used when finding icons.</p>
<div class="refsect3">
<a name="AsUtilsFindIconFlag.members"></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="AS-UTILS-FIND-ICON-NONE:CAPS"></a>AS_UTILS_FIND_ICON_NONE</p></td>
<td class="enum_member_description">
<p>No flags set</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="AS-UTILS-FIND-ICON-HI-DPI:CAPS"></a>AS_UTILS_FIND_ICON_HI_DPI</p></td>
<td class="enum_member_description">
<p>Prefer a HiDPI icon</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="AsUtilsLocation"></a><h3>enum AsUtilsLocation</h3>
<p>The flags used when installing and removing metadata files.</p>
<div class="refsect3">
<a name="AsUtilsLocation.members"></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="AS-UTILS-LOCATION-SHARED:CAPS"></a>AS_UTILS_LOCATION_SHARED</p></td>
<td class="enum_member_description">
<p>Installed by the vendor, shared</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="AS-UTILS-LOCATION-CACHE:CAPS"></a>AS_UTILS_LOCATION_CACHE</p></td>
<td class="enum_member_description">
<p>Installed as metadata, shared</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="AS-UTILS-LOCATION-USER:CAPS"></a>AS_UTILS_LOCATION_USER</p></td>
<td class="enum_member_description">
<p>Installed by the user</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="AsVersionParseFlag"></a><h3>enum AsVersionParseFlag</h3>
<p>The flags used when parsing version numbers.</p>
<div class="refsect3">
<a name="AsVersionParseFlag.members"></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="AS-VERSION-PARSE-FLAG-NONE:CAPS"></a>AS_VERSION_PARSE_FLAG_NONE</p></td>
<td class="enum_member_description">
<p>No flags set</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="AS-VERSION-PARSE-FLAG-USE-TRIPLET:CAPS"></a>AS_VERSION_PARSE_FLAG_USE_TRIPLET</p></td>
<td class="enum_member_description">
<p>Use Microsoft-style version numbers</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
|