/usr/share/gtk-doc/html/libiptcdata/libiptcdata-data.html is in libiptcdata-doc 1.0.4-3ubuntu3.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IPTC Data</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="libiptcdata Reference Manual">
<link rel="up" href="ch01.html" title="IPTC Data Manipulation">
<link rel="prev" href="ch01.html" title="IPTC Data Manipulation">
<link rel="next" href="libiptcdata-dataset.html" title="Datasets">
<meta name="generator" content="GTK-Doc V1.19 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libiptcdata Reference Manual</th>
<td><a accesskey="n" href="libiptcdata-dataset.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libiptcdata-data.synopsis" class="shortcut">Top</a>
|
<a href="#libiptcdata-data.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libiptcdata-data"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libiptcdata-data.top_of_page"></a>IPTC Data</span></h2>
<p>IPTC Data — creating, loading, saving, and editing a collection of IPTC datasets</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libiptcdata-data.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">struct <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData">IptcData</a>;
<a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="returnvalue">IptcData</span></a> * <a class="link" href="libiptcdata-data.html#iptc-data-new" title="iptc_data_new ()">iptc_data_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="returnvalue">IptcData</span></a> * <a class="link" href="libiptcdata-data.html#iptc-data-new-mem" title="iptc_data_new_mem ()">iptc_data_new_mem</a> (<em class="parameter"><code><a class="link" href="libiptcdata-mem.html#IptcMem" title="IptcMem"><span class="type">IptcMem</span></a> *mem</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libiptcdata-data.html#iptc-data-ref" title="iptc_data_ref ()">iptc_data_ref</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libiptcdata-data.html#iptc-data-unref" title="iptc_data_unref ()">iptc_data_unref</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libiptcdata-data.html#iptc-data-free" title="iptc_data_free ()">iptc_data_free</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);
<a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="returnvalue">IptcData</span></a> * <a class="link" href="libiptcdata-data.html#iptc-data-new-from-jpeg" title="iptc_data_new_from_jpeg ()">iptc_data_new_from_jpeg</a> (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);
<a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="returnvalue">IptcData</span></a> * <a class="link" href="libiptcdata-data.html#iptc-data-new-from-data" title="iptc_data_new_from_data ()">iptc_data_new_from_data</a> (<em class="parameter"><code>const unsigned <span class="type">char</span> *buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libiptcdata-data.html#iptc-data-load" title="iptc_data_load ()">iptc_data_load</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code>const unsigned <span class="type">char</span> *buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libiptcdata-data.html#iptc-data-save" title="iptc_data_save ()">iptc_data_save</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> **buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> *size</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libiptcdata-data.html#iptc-data-free-buf" title="iptc_data_free_buf ()">iptc_data_free_buf</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buf</code></em>);
<a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="returnvalue">IptcDataSet</span></a> * <a class="link" href="libiptcdata-data.html#iptc-data-get-dataset" title="iptc_data_get_dataset ()">iptc_data_get_dataset</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcRecord" title="enum IptcRecord"><span class="type">IptcRecord</span></a> record</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcTag" title="enum IptcTag"><span class="type">IptcTag</span></a> tag</code></em>);
<a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="returnvalue">IptcDataSet</span></a> * <a class="link" href="libiptcdata-data.html#iptc-data-get-next-dataset" title="iptc_data_get_next_dataset ()">iptc_data_get_next_dataset</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *ds</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcRecord" title="enum IptcRecord"><span class="type">IptcRecord</span></a> record</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcTag" title="enum IptcTag"><span class="type">IptcTag</span></a> tag</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libiptcdata-data.html#iptc-data-add-dataset" title="iptc_data_add_dataset ()">iptc_data_add_dataset</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *ds</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libiptcdata-data.html#iptc-data-add-dataset-before" title="iptc_data_add_dataset_before ()">iptc_data_add_dataset_before</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *ds</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *newds</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libiptcdata-data.html#iptc-data-add-dataset-after" title="iptc_data_add_dataset_after ()">iptc_data_add_dataset_after</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *ds</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *newds</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libiptcdata-data.html#iptc-data-remove-dataset" title="iptc_data_remove_dataset ()">iptc_data_remove_dataset</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *ds</code></em>);
<span class="returnvalue">void</span> (<a class="link" href="libiptcdata-data.html#IptcDataForeachDataSetFunc" title="IptcDataForeachDataSetFunc ()">*IptcDataForeachDataSetFunc</a>) (<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *dataset</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libiptcdata-data.html#iptc-data-foreach-dataset" title="iptc_data_foreach_dataset ()">iptc_data_foreach_dataset</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcDataForeachDataSetFunc" title="IptcDataForeachDataSetFunc ()"><span class="type">IptcDataForeachDataSetFunc</span></a> func</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libiptcdata-data.html#iptc-data-sort" title="iptc_data_sort ()">iptc_data_sort</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);
enum <a class="link" href="libiptcdata-data.html#IptcEncoding" title="enum IptcEncoding">IptcEncoding</a>;
<a class="link" href="libiptcdata-data.html#IptcEncoding" title="enum IptcEncoding"><span class="returnvalue">IptcEncoding</span></a> <a class="link" href="libiptcdata-data.html#iptc-data-get-encoding" title="iptc_data_get_encoding ()">iptc_data_get_encoding</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libiptcdata-data.html#iptc-data-set-encoding-utf8" title="iptc_data_set_encoding_utf8 ()">iptc_data_set_encoding_utf8</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);
#define <a class="link" href="libiptcdata-data.html#IPTC-IIM-VERSION:CAPS" title="IPTC_IIM_VERSION">IPTC_IIM_VERSION</a>
<span class="returnvalue">int</span> <a class="link" href="libiptcdata-data.html#iptc-data-set-version" title="iptc_data_set_version ()">iptc_data_set_version</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> version</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libiptcdata-data.html#iptc-data-add-dataset-with-value" title="iptc_data_add_dataset_with_value ()">iptc_data_add_dataset_with_value</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcRecord" title="enum IptcRecord"><span class="type">IptcRecord</span></a> record</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcTag" title="enum IptcTag"><span class="type">IptcTag</span></a> tag</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> value</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcValidate" title="enum IptcValidate"><span class="type">IptcValidate</span></a> validate</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libiptcdata-data.html#iptc-data-add-dataset-with-contents" title="iptc_data_add_dataset_with_contents ()">iptc_data_add_dataset_with_contents</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcRecord" title="enum IptcRecord"><span class="type">IptcRecord</span></a> record</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcTag" title="enum IptcTag"><span class="type">IptcTag</span></a> tag</code></em>,
<em class="parameter"><code>const unsigned <span class="type">char</span> *buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcValidate" title="enum IptcValidate"><span class="type">IptcValidate</span></a> validate</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libiptcdata-data.html#iptc-data-dump" title="iptc_data_dump ()">iptc_data_dump</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> indent</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libiptcdata-data.html#iptc-data-log" title="iptc_data_log ()">iptc_data_log</a> (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-log.html#IptcLog" title="IptcLog"><span class="type">IptcLog</span></a> *log</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libiptcdata-data.description"></a><h2>Description</h2>
<p>
The <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object is the top-level container for a collection of IPTC metadata tags.
Each of these tags is stored in an <a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> object.
</p>
</div>
<div class="refsect1">
<a name="libiptcdata-data.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="IptcData"></a><h3>struct IptcData</h3>
<pre class="programlisting">struct IptcData {
IptcDataSet **datasets;
unsigned int count;
IptcDataPrivate *priv;
};
</pre>
<p>
Represents the collection of datasets that make up a IPTC data block.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> **<em class="structfield"><code><a name="IptcData.datasets"></a>datasets</code></em>;</span></p></td>
<td>array of pointers to the datasets in the collection</td>
</tr>
<tr>
<td><p><span class="term">unsigned <span class="type">int</span> <em class="structfield"><code><a name="IptcData.count"></a>count</code></em>;</span></p></td>
<td>the number of datasets in the collection</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">IptcDataPrivate</span> *<em class="structfield"><code><a name="IptcData.priv"></a>priv</code></em>;</span></p></td>
<td>private data</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-new"></a><h3>iptc_data_new ()</h3>
<pre class="programlisting"><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="returnvalue">IptcData</span></a> * iptc_data_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Allocates a new collection of datasets, which is initialized to be
empty. The default memory allocation functions (malloc, etc.) are
used. If you need custom memory management functions, use
<a class="link" href="libiptcdata-data.html#iptc-data-new-mem" title="iptc_data_new_mem ()"><code class="function">iptc_data_new_mem()</code></a> instead. This allocation will set the <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a>
refcount to 1, so use <a class="link" href="libiptcdata-data.html#iptc-data-unref" title="iptc_data_unref ()"><code class="function">iptc_data_unref()</code></a> when finished with the pointer.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>pointer to the new <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object, NULL on error</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-new-mem"></a><h3>iptc_data_new_mem ()</h3>
<pre class="programlisting"><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="returnvalue">IptcData</span></a> * iptc_data_new_mem (<em class="parameter"><code><a class="link" href="libiptcdata-mem.html#IptcMem" title="IptcMem"><span class="type">IptcMem</span></a> *mem</code></em>);</pre>
<p>
Allocates a new collection of datasets, which is initialized to be
empty, using custom memory management functions. This allocation
will set the <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> refcount to 1, so use <a class="link" href="libiptcdata-data.html#iptc-data-unref" title="iptc_data_unref ()"><code class="function">iptc_data_unref()</code></a> when
finished with the object.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>mem</code></em> :</span></p></td>
<td>Pointer to an <a class="link" href="libiptcdata-mem.html#IptcMem" title="IptcMem"><span class="type">IptcMem</span></a> object that defines custom memory managment
functions. The refcount of <em class="parameter"><code>mem</code></em> will be incremented. It is decremented
when the returned <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object is freed.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>pointer to the new <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object, NULL on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-ref"></a><h3>iptc_data_ref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> iptc_data_ref (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);</pre>
<p>
Increments the reference count of an <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object. This function
should be called whenever a copy of a pointer is made by the application.
<a class="link" href="libiptcdata-data.html#iptc-data-unref" title="iptc_data_unref ()"><code class="function">iptc_data_unref()</code></a> can then be used when the pointer is no longer needed
to ensure that the object is freed once the object is completely unused.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the referenced pointer</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-unref"></a><h3>iptc_data_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> iptc_data_unref (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);</pre>
<p>
Decrements the reference count of an <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object. The object will
automatically be freed when the count reaches 0. This function should
be called whenever a pointer is no longer needed by an application. It
is also good practice to set the local copy of the pointer to NULL to
shield against accidently reusing the value.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the unreferenced pointer</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-free"></a><h3>iptc_data_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> iptc_data_free (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);</pre>
<p>
Frees an <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object. This function should be used only for error
handling since <a class="link" href="libiptcdata-data.html#iptc-data-unref" title="iptc_data_unref ()"><code class="function">iptc_data_unref()</code></a> provides a safer mechanism for freeing
that allows multiple components to have access to an object. This
function decrements the reference count of any datasets contained by the
object. This will generally cause them to be freed as well unless other
parts of the application are referencing them individually.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the object to free</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-new-from-jpeg"></a><h3>iptc_data_new_from_jpeg ()</h3>
<pre class="programlisting"><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="returnvalue">IptcData</span></a> * iptc_data_new_from_jpeg (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>);</pre>
<p>
Allocates a new collection of datasets which is initialized by decoding
the IPTC data in JPEG file <em class="parameter"><code>path</code></em>. This allocation will set the <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a>
refcount to 1, so use <a class="link" href="libiptcdata-data.html#iptc-data-unref" title="iptc_data_unref ()"><code class="function">iptc_data_unref()</code></a> when finished with the object.
This is a convenience function that reads the contents of the file,
creates a new <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object, parses the file with
<a class="link" href="libiptcdata-jpeg.html#iptc-jpeg-read-ps3" title="iptc_jpeg_read_ps3 ()"><code class="function">iptc_jpeg_read_ps3()</code></a> and <a class="link" href="libiptcdata-jpeg.html#iptc-jpeg-ps3-find-iptc" title="iptc_jpeg_ps3_find_iptc ()"><code class="function">iptc_jpeg_ps3_find_iptc()</code></a>, and loads the
data with <a class="link" href="libiptcdata-data.html#iptc-data-load" title="iptc_data_load ()"><code class="function">iptc_data_load()</code></a>. If more fine-grained error detection
is needed, those functions should be used individually.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>filesystem path of the jpeg file to be read</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>pointer to the new <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object. NULL on error (including
parsing errors or if the file did not include IPTC data).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-new-from-data"></a><h3>iptc_data_new_from_data ()</h3>
<pre class="programlisting"><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="returnvalue">IptcData</span></a> * iptc_data_new_from_data (<em class="parameter"><code>const unsigned <span class="type">char</span> *buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>);</pre>
<p>
Allocates a new collection of datasets which is initialized by decoding
the contents of <em class="parameter"><code>buf</code></em>. This allocation will set the <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a>
refcount to 1, so use <a class="link" href="libiptcdata-data.html#iptc-data-unref" title="iptc_data_unref ()"><code class="function">iptc_data_unref()</code></a> when finished with the object.
This is simply a convenience function that can be duplicated by calling
<a class="link" href="libiptcdata-data.html#iptc-data-new" title="iptc_data_new ()"><code class="function">iptc_data_new()</code></a> followed by <a class="link" href="libiptcdata-data.html#iptc-data-load" title="iptc_data_load ()"><code class="function">iptc_data_load()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td>the buffer of IPTC data to be decoded</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>the length to be read in bytes</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>pointer to the new <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object. NULL on error (including
parsing errors in the contents of <em class="parameter"><code>buf</code></em>).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-load"></a><h3>iptc_data_load ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> iptc_data_load (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code>const unsigned <span class="type">char</span> *buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>);</pre>
<p>
Parses a buffer containing raw IPTC data and adds the datasets
to the <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object <em class="parameter"><code>data</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>object to be populated with the loaded datasets</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td>data buffer to be parsed, containing IPTC data</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>length of data buffer to be parsed</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on failure. Note that in the failure
case, some datasets may still have been added to <em class="parameter"><code>data</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-save"></a><h3>iptc_data_save ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> iptc_data_save (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> **buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> *size</code></em>);</pre>
<p>
Outputs a collection of datasets as an IPTC bytestream. No memory allocation
is required in advance. <em class="parameter"><code>buf</code></em> should point to a NULL pointer that will be set
to the address of the output buffer by this function. <em class="parameter"><code>size</code></em> will contain
this buffer's length after completion. The object <em class="parameter"><code>data</code></em> is unmodified by this
function. The application should free the output buffer using
<a class="link" href="libiptcdata-data.html#iptc-data-free-buf" title="iptc_data_free_buf ()"><code class="function">iptc_data_free_buf()</code></a> when it is no longer needed.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection of datasets to be saved</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td>pointer to a pointer that will hold the address of the output buffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>pointer to an integer that will hold the length of the output buffer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on failure. In the failure case, <em class="parameter"><code>buf</code></em> should still
be checked for a non-NULL value, and freed using <a class="link" href="libiptcdata-data.html#iptc-data-free-buf" title="iptc_data_free_buf ()"><code class="function">iptc_data_free_buf()</code></a> if
necessary.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-free-buf"></a><h3>iptc_data_free_buf ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> iptc_data_free_buf (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buf</code></em>);</pre>
<p>
Frees a temporary buffer created from an <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object by the
<a class="link" href="libiptcdata-data.html#iptc-data-save" title="iptc_data_save ()"><code class="function">iptc_data_save()</code></a> function.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object that allocated the buffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td>the buffer to free</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-get-dataset"></a><h3>iptc_data_get_dataset ()</h3>
<pre class="programlisting"><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="returnvalue">IptcDataSet</span></a> * iptc_data_get_dataset (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcRecord" title="enum IptcRecord"><span class="type">IptcRecord</span></a> record</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcTag" title="enum IptcTag"><span class="type">IptcTag</span></a> tag</code></em>);</pre>
<p>
Finds the first occurence of a dataset inside a collection with
the specified record and tag identifiers.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection to search</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>record</code></em> :</span></p></td>
<td>record identifier of dataset</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tag</code></em> :</span></p></td>
<td>tag identifier (dataset number) of dataset</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>pointer to dataset if found, NULL if no matching dataset found</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-get-next-dataset"></a><h3>iptc_data_get_next_dataset ()</h3>
<pre class="programlisting"><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="returnvalue">IptcDataSet</span></a> * iptc_data_get_next_dataset (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *ds</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcRecord" title="enum IptcRecord"><span class="type">IptcRecord</span></a> record</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcTag" title="enum IptcTag"><span class="type">IptcTag</span></a> tag</code></em>);</pre>
<p>
Finds the next occurence of a dataset inside a collection with
the specified record and tag identifiers following <em class="parameter"><code>ds</code></em>. This is useful
when a collection contains more than one dataset with the same record
and tag identifier (for example, the keywords tag appears once for
each keyword in the IPTC metadata). When <em class="parameter"><code>ds</code></em> is NULL, this function
is equivalent to <a class="link" href="libiptcdata-data.html#iptc-data-get-dataset" title="iptc_data_get_dataset ()"><code class="function">iptc_data_get_dataset()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection to search</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ds</code></em> :</span></p></td>
<td>dataset where the search should originate (can be NULL)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>record</code></em> :</span></p></td>
<td>record identifier of dataset</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tag</code></em> :</span></p></td>
<td>tag identifier (dataset number) of dataset</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>pointer to dataset if found, NULL if no matching dataset found</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-add-dataset"></a><h3>iptc_data_add_dataset ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> iptc_data_add_dataset (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *ds</code></em>);</pre>
<p>
Adds an <a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> at the end of an existing collection. A
dataset can only be a member of a single collection. This
function will increment the reference count of <em class="parameter"><code>dataset</code></em>, so if
the application no longer intends to use <em class="parameter"><code>dataset</code></em> directly, it
should call <a class="link" href="libiptcdata-dataset.html#iptc-dataset-unref" title="iptc_dataset_unref ()"><code class="function">iptc_dataset_unref()</code></a> immediately following this call.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the collection to which the dataset will be added</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ds</code></em> :</span></p></td>
<td>dataset to add</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-add-dataset-before"></a><h3>iptc_data_add_dataset_before ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> iptc_data_add_dataset_before (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *ds</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *newds</code></em>);</pre>
<p>
Same as <a class="link" href="libiptcdata-data.html#iptc-data-add-dataset" title="iptc_data_add_dataset ()"><code class="function">iptc_data_add_dataset()</code></a>, except the <em class="parameter"><code>dataset</code></em> will be added
before an existing dataset <em class="parameter"><code>ds</code></em>, so that if they are enumerated,
<em class="parameter"><code>newds</code></em> will appear before <em class="parameter"><code>ds</code></em> in the collection. <em class="parameter"><code>ds</code></em> must be
a dataset already present in the collection.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the collection to which the dataset will be added</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ds</code></em> :</span></p></td>
<td>existing dataset before which <em class="parameter"><code>newds</code></em> will be added</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>newds</code></em> :</span></p></td>
<td>dataset to add</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-add-dataset-after"></a><h3>iptc_data_add_dataset_after ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> iptc_data_add_dataset_after (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *ds</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *newds</code></em>);</pre>
<p>
Same as <a class="link" href="libiptcdata-data.html#iptc-data-add-dataset" title="iptc_data_add_dataset ()"><code class="function">iptc_data_add_dataset()</code></a>, except the <em class="parameter"><code>dataset</code></em> will be added
after an existing dataset <em class="parameter"><code>ds</code></em>, so that if they are enumerated,
<em class="parameter"><code>newds</code></em> will appear after <em class="parameter"><code>ds</code></em> in the collection. <em class="parameter"><code>ds</code></em> must be a
dataset already present in the collection.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the collection to which the dataset will be added</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ds</code></em> :</span></p></td>
<td>existing dataset after which <em class="parameter"><code>newds</code></em> will be added</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>newds</code></em> :</span></p></td>
<td>dataset to add</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-remove-dataset"></a><h3>iptc_data_remove_dataset ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> iptc_data_remove_dataset (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *ds</code></em>);</pre>
<p>
Removes a dataset from a collection. This function also calls
<a class="link" href="libiptcdata-dataset.html#iptc-dataset-unref" title="iptc_dataset_unref ()"><code class="function">iptc_dataset_unref()</code></a> on <em class="parameter"><code>ds</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the collection from which to remove an entry</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ds</code></em> :</span></p></td>
<td>the dataset to remove from the collection</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="IptcDataForeachDataSetFunc"></a><h3>IptcDataForeachDataSetFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> (*IptcDataForeachDataSetFunc) (<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcDataSet" title="struct IptcDataSet"><span class="type">IptcDataSet</span></a> *dataset</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>
Application callback executed for each dataset from
<a class="link" href="libiptcdata-data.html#iptc-data-foreach-dataset" title="iptc_data_foreach_dataset ()"><code class="function">iptc_data_foreach_dataset()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dataset</code></em> :</span></p></td>
<td>the dataset</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>the same <em class="parameter"><code>user_data</code></em> passed to <a class="link" href="libiptcdata-data.html#iptc-data-foreach-dataset" title="iptc_data_foreach_dataset ()"><code class="function">iptc_data_foreach_dataset()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-foreach-dataset"></a><h3>iptc_data_foreach_dataset ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> iptc_data_foreach_dataset (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcDataForeachDataSetFunc" title="IptcDataForeachDataSetFunc ()"><span class="type">IptcDataForeachDataSetFunc</span></a> func</code></em>,
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>
Iterates through each dataset in the collection and calls the
callback function on that dataset.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection through which to iterate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>callback function</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>arbitrary user data to be passed to the callback</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-sort"></a><h3>iptc_data_sort ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> iptc_data_sort (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);</pre>
<p>
Sorts a collection of datasets in ascending order first by record
number and second by tag number. It can be useful to call this
function before saving IPTC data in order to maintain a more
organized file.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection of datasets to sort</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="IptcEncoding"></a><h3>enum IptcEncoding</h3>
<pre class="programlisting">typedef enum {
IPTC_ENCODING_UNKNOWN = 0,
IPTC_ENCODING_UNSPECIFIED = 1,
IPTC_ENCODING_UTF8 = 2
} IptcEncoding;
</pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="IPTC-ENCODING-UNKNOWN:CAPS"></a><span class="term"><code class="literal">IPTC_ENCODING_UNKNOWN</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="IPTC-ENCODING-UNSPECIFIED:CAPS"></a><span class="term"><code class="literal">IPTC_ENCODING_UNSPECIFIED</code></span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><a name="IPTC-ENCODING-UTF8:CAPS"></a><span class="term"><code class="literal">IPTC_ENCODING_UTF8</code></span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-get-encoding"></a><h3>iptc_data_get_encoding ()</h3>
<pre class="programlisting"><a class="link" href="libiptcdata-data.html#IptcEncoding" title="enum IptcEncoding"><span class="returnvalue">IptcEncoding</span></a> iptc_data_get_encoding (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);</pre>
<p>
Identifies the character encoding of the collection of datasets as
specified by the "character set" dataset (1:90). The specification
allows this dataset to contain control sequences from the ISO 2022
standard. Unfortunately, this standard is very complicated and
generally not used by application writers. Thus, rather than
attempt to decode any possible any possible control sequence, this
function only attempts to recognize the control sequence that identifies
the UTF-8 character set. If found, this function will return
<a class="link" href="libiptcdata-data.html#IPTC-ENCODING-UTF8:CAPS"><span class="type">IPTC_ENCODING_UTF8</span></a>. All character-based datasets in record 2 and
higher are then expected to contain data encoded in the UTF-8
character set. Otherwise, this function will return
<a class="link" href="libiptcdata-data.html#IPTC-ENCODING-UNKNOWN:CAPS"><span class="type">IPTC_ENCODING_UNKNOWN</span></a>, meaning that any other character set
might be used, including ISO 2022 control sequences that have not
been decoded. If dataset 1:90 is not present, this function returns
<a class="link" href="libiptcdata-data.html#IPTC-ENCODING-UNSPECIFIED:CAPS"><span class="type">IPTC_ENCODING_UNSPECIFIED</span></a>, in which case character-based datasets
will usually be plain ASCII, although broken applications may have
used some other encoding.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection of datasets</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="libiptcdata-data.html#IPTC-ENCODING-UTF8:CAPS"><span class="type">IPTC_ENCODING_UTF8</span></a>, <a class="link" href="libiptcdata-data.html#IPTC-ENCODING-UNKNOWN:CAPS"><span class="type">IPTC_ENCODING_UNKNOWN</span></a>, or
<a class="link" href="libiptcdata-data.html#IPTC-ENCODING-UNSPECIFIED:CAPS"><span class="type">IPTC_ENCODING_UNSPECIFIED</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-set-encoding-utf8"></a><h3>iptc_data_set_encoding_utf8 ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> iptc_data_set_encoding_utf8 (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>);</pre>
<p>
Sets the contents of the "character set" dataset (1:90) to contain
the control sequence that indicates UTF-8 as the character encoding
for any character-based datasets in record 2 or higher. If dataset
1:90 is not present, it will be added to the collection. Any prior
value of dataset 1:90 will be overwritten by this function.
Note that some third-party applications (notably Picasa) will ignore
all your IPTC data if this option is set.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection of datasets for which to specify the encoding</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="IPTC-IIM-VERSION:CAPS"></a><h3>IPTC_IIM_VERSION</h3>
<pre class="programlisting">#define IPTC_IIM_VERSION 4
</pre>
<p>
The version of the IPTC IIM specification implemented by this library.
</p>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-set-version"></a><h3>iptc_data_set_version ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> iptc_data_set_version (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> version</code></em>);</pre>
<p>
Specifies the version of the IIM specification used by this library by
setting the value of datasets 1:00 and 2:00. It is recommended to set the
version number to <a class="link" href="libiptcdata-data.html#IPTC-IIM-VERSION:CAPS" title="IPTC_IIM_VERSION"><span class="type">IPTC_IIM_VERSION</span></a>, which specifies the version
implemented by this library (currently 4). If datasets 1:00 or 2:00 are
not present, they will be added to the collection. Any prior value of
the datasets will be overwritten by this function. To ensure strict
compliance with the standard, this function should be called before
saving a collection of datasets. However, in practice, some applications
(notably Picasa) will ignore all your IPTC data if this option is set.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection of datasets for which to specify the version</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>version</code></em> :</span></p></td>
<td>version number to write</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-add-dataset-with-value"></a><h3>iptc_data_add_dataset_with_value ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> iptc_data_add_dataset_with_value (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcRecord" title="enum IptcRecord"><span class="type">IptcRecord</span></a> record</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcTag" title="enum IptcTag"><span class="type">IptcTag</span></a> tag</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> value</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcValidate" title="enum IptcValidate"><span class="type">IptcValidate</span></a> validate</code></em>);</pre>
<p>
This is a convenience function that creates a new dataset with the given
record and tag, adds it to the specified collection of datasets, and
stores the given numeric value as the contents of the dataset. It is
equivalent to calling this sequence of functions: <a class="link" href="libiptcdata-dataset.html#iptc-dataset-new" title="iptc_dataset_new ()"><code class="function">iptc_dataset_new()</code></a>,
<a class="link" href="libiptcdata-dataset.html#iptc-dataset-set-tag" title="iptc_dataset_set_tag ()"><code class="function">iptc_dataset_set_tag()</code></a>, <a class="link" href="libiptcdata-data.html#iptc-data-add-dataset" title="iptc_data_add_dataset ()"><code class="function">iptc_data_add_dataset()</code></a>,
and <a class="link" href="libiptcdata-dataset.html#iptc-dataset-set-value" title="iptc_dataset_set_value ()"><code class="function">iptc_dataset_set_value()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection to which the new dataset should be added</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>record</code></em> :</span></p></td>
<td>record number of the dataset to be added</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tag</code></em> :</span></p></td>
<td>tag (dataset number) of the dataset to be added</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>value for the dataset</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>validate</code></em> :</span></p></td>
<td>whether or not the passed value should be validated against
the IPTC specification for this dataset's tag.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>-1 on error, 0 if validation failed, the number of bytes copied
on success</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-add-dataset-with-contents"></a><h3>iptc_data_add_dataset_with_contents ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> iptc_data_add_dataset_with_contents (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcRecord" title="enum IptcRecord"><span class="type">IptcRecord</span></a> record</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-tag.html#IptcTag" title="enum IptcTag"><span class="type">IptcTag</span></a> tag</code></em>,
<em class="parameter"><code>const unsigned <span class="type">char</span> *buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-dataset.html#IptcValidate" title="enum IptcValidate"><span class="type">IptcValidate</span></a> validate</code></em>);</pre>
<p>
This is a convenience function that creates a new dataset with the given
record and tag, adds it to the specified collection of datasets, and
stores a copy of the given data buffer as the contents of the dataset.
It is equivalent to calling this sequence of functions: <a class="link" href="libiptcdata-dataset.html#iptc-dataset-new" title="iptc_dataset_new ()"><code class="function">iptc_dataset_new()</code></a>,
<a class="link" href="libiptcdata-dataset.html#iptc-dataset-set-tag" title="iptc_dataset_set_tag ()"><code class="function">iptc_dataset_set_tag()</code></a>, <a class="link" href="libiptcdata-data.html#iptc-data-add-dataset" title="iptc_data_add_dataset ()"><code class="function">iptc_data_add_dataset()</code></a>,
and <a class="link" href="libiptcdata-dataset.html#iptc-dataset-set-data" title="iptc_dataset_set_data ()"><code class="function">iptc_dataset_set_data()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection to which the new dataset should be added</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>record</code></em> :</span></p></td>
<td>record number of the dataset to be added</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tag</code></em> :</span></p></td>
<td>tag (dataset number) of the dataset to be added</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td>buffer containing the value</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>number of bytes to copy</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>validate</code></em> :</span></p></td>
<td>whether or not the passed value should be validated against
the IPTC specification for this dataset's tag.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>-1 on error, 0 if validation failed, the number of bytes copied
on success</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-dump"></a><h3>iptc_data_dump ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> iptc_data_dump (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> indent</code></em>);</pre>
<p>
A debugging aid that prints out the contents of a collection
of datasets to standard output.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection of datasets to print</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>indent</code></em> :</span></p></td>
<td>indentation level of the printout</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-data-log"></a><h3>iptc_data_log ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> iptc_data_log (<em class="parameter"><code><a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="libiptcdata-log.html#IptcLog" title="IptcLog"><span class="type">IptcLog</span></a> *log</code></em>);</pre>
<p>
Changes the logging object for a <a class="link" href="libiptcdata-data.html#IptcData" title="struct IptcData"><span class="type">IptcData</span></a> object. The logging
object determines how warning and error messages are relayed back
to the application. This function also calls <a class="link" href="libiptcdata-log.html#iptc-log-ref" title="iptc_log_ref ()"><code class="function">iptc_log_ref()</code></a> on
the new log object and <a class="link" href="libiptcdata-log.html#iptc-log-unref" title="iptc_log_unref ()"><code class="function">iptc_log_unref()</code></a> on the previous log
object.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>collection for which the log object should be changed.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>log</code></em> :</span></p></td>
<td>log object to use for the collection</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|