This file is indexed.

/usr/share/gtk-doc/html/libcanberra/libcanberra-canberra.html is in libcanberra-doc 0.28-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
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
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>canberra</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libcanberra Reference Manual">
<link rel="up" href="ch01.html" title="libcanberra">
<link rel="prev" href="ch01.html" title="libcanberra">
<link rel="next" href="libcanberra-canberra-gtk.html" title="canberra-gtk">
<meta name="generator" content="GTK-Doc V1.18 (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">libcanberra Reference Manual</th>
<td><a accesskey="n" href="libcanberra-canberra-gtk.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libcanberra-canberra.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libcanberra-canberra.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libcanberra-canberra"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libcanberra-canberra.top_of_page"></a>canberra</span></h2>
<p>canberra — General libcanberra API</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libcanberra-canberra.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-MEDIA-NAME:CAPS" title="CA_PROP_MEDIA_NAME">CA_PROP_MEDIA_NAME</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-MEDIA-TITLE:CAPS" title="CA_PROP_MEDIA_TITLE">CA_PROP_MEDIA_TITLE</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-MEDIA-ARTIST:CAPS" title="CA_PROP_MEDIA_ARTIST">CA_PROP_MEDIA_ARTIST</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-MEDIA-LANGUAGE:CAPS" title="CA_PROP_MEDIA_LANGUAGE">CA_PROP_MEDIA_LANGUAGE</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-MEDIA-FILENAME:CAPS" title="CA_PROP_MEDIA_FILENAME">CA_PROP_MEDIA_FILENAME</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-MEDIA-ICON:CAPS" title="CA_PROP_MEDIA_ICON">CA_PROP_MEDIA_ICON</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-MEDIA-ICON-NAME:CAPS" title="CA_PROP_MEDIA_ICON_NAME">CA_PROP_MEDIA_ICON_NAME</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-MEDIA-ROLE:CAPS" title="CA_PROP_MEDIA_ROLE">CA_PROP_MEDIA_ROLE</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-ID:CAPS" title="CA_PROP_EVENT_ID">CA_PROP_EVENT_ID</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-DESCRIPTION:CAPS" title="CA_PROP_EVENT_DESCRIPTION">CA_PROP_EVENT_DESCRIPTION</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-MOUSE-X:CAPS" title="CA_PROP_EVENT_MOUSE_X">CA_PROP_EVENT_MOUSE_X</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-MOUSE-Y:CAPS" title="CA_PROP_EVENT_MOUSE_Y">CA_PROP_EVENT_MOUSE_Y</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-MOUSE-HPOS:CAPS" title="CA_PROP_EVENT_MOUSE_HPOS">CA_PROP_EVENT_MOUSE_HPOS</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-MOUSE-VPOS:CAPS" title="CA_PROP_EVENT_MOUSE_VPOS">CA_PROP_EVENT_MOUSE_VPOS</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-MOUSE-BUTTON:CAPS" title="CA_PROP_EVENT_MOUSE_BUTTON">CA_PROP_EVENT_MOUSE_BUTTON</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-WINDOW-NAME:CAPS" title="CA_PROP_WINDOW_NAME">CA_PROP_WINDOW_NAME</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-WINDOW-ID:CAPS" title="CA_PROP_WINDOW_ID">CA_PROP_WINDOW_ID</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-WINDOW-ICON:CAPS" title="CA_PROP_WINDOW_ICON">CA_PROP_WINDOW_ICON</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-WINDOW-ICON-NAME:CAPS" title="CA_PROP_WINDOW_ICON_NAME">CA_PROP_WINDOW_ICON_NAME</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-WINDOW-X11-DISPLAY:CAPS" title="CA_PROP_WINDOW_X11_DISPLAY">CA_PROP_WINDOW_X11_DISPLAY</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-WINDOW-X11-SCREEN:CAPS" title="CA_PROP_WINDOW_X11_SCREEN">CA_PROP_WINDOW_X11_SCREEN</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-WINDOW-X11-MONITOR:CAPS" title="CA_PROP_WINDOW_X11_MONITOR">CA_PROP_WINDOW_X11_MONITOR</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-WINDOW-X11-XID:CAPS" title="CA_PROP_WINDOW_X11_XID">CA_PROP_WINDOW_X11_XID</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-NAME:CAPS" title="CA_PROP_APPLICATION_NAME">CA_PROP_APPLICATION_NAME</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-ID:CAPS" title="CA_PROP_APPLICATION_ID">CA_PROP_APPLICATION_ID</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-VERSION:CAPS" title="CA_PROP_APPLICATION_VERSION">CA_PROP_APPLICATION_VERSION</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-ICON:CAPS" title="CA_PROP_APPLICATION_ICON">CA_PROP_APPLICATION_ICON</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-ICON-NAME:CAPS" title="CA_PROP_APPLICATION_ICON_NAME">CA_PROP_APPLICATION_ICON_NAME</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-LANGUAGE:CAPS" title="CA_PROP_APPLICATION_LANGUAGE">CA_PROP_APPLICATION_LANGUAGE</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-PROCESS-ID:CAPS" title="CA_PROP_APPLICATION_PROCESS_ID">CA_PROP_APPLICATION_PROCESS_ID</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-PROCESS-BINARY:CAPS" title="CA_PROP_APPLICATION_PROCESS_BINARY">CA_PROP_APPLICATION_PROCESS_BINARY</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-PROCESS-USER:CAPS" title="CA_PROP_APPLICATION_PROCESS_USER">CA_PROP_APPLICATION_PROCESS_USER</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-PROCESS-HOST:CAPS" title="CA_PROP_APPLICATION_PROCESS_HOST">CA_PROP_APPLICATION_PROCESS_HOST</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-CANBERRA-CACHE-CONTROL:CAPS" title="CA_PROP_CANBERRA_CACHE_CONTROL">CA_PROP_CANBERRA_CACHE_CONTROL</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-CANBERRA-VOLUME:CAPS" title="CA_PROP_CANBERRA_VOLUME">CA_PROP_CANBERRA_VOLUME</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-CANBERRA-XDG-THEME-NAME:CAPS" title="CA_PROP_CANBERRA_XDG_THEME_NAME">CA_PROP_CANBERRA_XDG_THEME_NAME</a>
#define             <a class="link" href="libcanberra-canberra.html#CA-PROP-CANBERRA-XDG-THEME-OUTPUT-PROFILE:CAPS" title="CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE">CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE</a>

typedef             <a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context">ca_context</a>;
<span class="returnvalue">void</span>                (<a class="link" href="libcanberra-canberra.html#ca-finish-callback-t" title="ca_finish_callback_t ()">*ca_finish_callback_t</a>)             (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> id</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> error_code</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *userdata</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-create" title="ca_context_create ()">ca_context_create</a>                   (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> **c</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-destroy" title="ca_context_destroy ()">ca_context_destroy</a>                  (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-open" title="ca_context_open ()">ca_context_open</a>                     (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-set-driver" title="ca_context_set_driver ()">ca_context_set_driver</a>               (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *driver</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-change-device" title="ca_context_change_device ()">ca_context_change_device</a>            (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *device</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-change-props" title="ca_context_change_props ()">ca_context_change_props</a>             (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-change-props-full" title="ca_context_change_props_full ()">ca_context_change_props_full</a>        (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-play" title="ca_context_play ()">ca_context_play</a>                     (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> id</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-play-full" title="ca_context_play_full ()">ca_context_play_full</a>                (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-finish-callback-t" title="ca_finish_callback_t ()"><span class="type">ca_finish_callback_t</span></a> cb</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *userdata</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-cancel" title="ca_context_cancel ()">ca_context_cancel</a>                   (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> id</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-cache" title="ca_context_cache ()">ca_context_cache</a>                    (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-cache-full" title="ca_context_cache_full ()">ca_context_cache_full</a>               (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-context-playing" title="ca_context_playing ()">ca_context_playing</a>                  (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> id</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> *playing</code></em>);

const <span class="returnvalue">char</span> *        <a class="link" href="libcanberra-canberra.html#ca-strerror" title="ca_strerror ()">ca_strerror</a>                         (<em class="parameter"><code><span class="type">int</span> code</code></em>);

typedef             <a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist">ca_proplist</a>;
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-proplist-create" title="ca_proplist_create ()">ca_proplist_create</a>                  (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> **p</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-proplist-destroy" title="ca_proplist_destroy ()">ca_proplist_destroy</a>                 (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-proplist-sets" title="ca_proplist_sets ()">ca_proplist_sets</a>                    (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-proplist-setf" title="ca_proplist_setf ()">ca_proplist_setf</a>                    (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libcanberra-canberra.html#ca-proplist-set" title="ca_proplist_set ()">ca_proplist_set</a>                     (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
                                                         <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
                                                         <em class="parameter"><code><span class="type">size_t</span> nbytes</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libcanberra-canberra.description"></a><h2>Description</h2>
<p>
libcanberra defines a simple abstract interface for playing event sounds.
</p>
<p>
libcanberra relies on the XDG sound naming specification for
identifying event sounds. On Unix/Linux the right sound to play is
found via the mechanisms defined in the XDG sound themeing
specification. On other systems the XDG sound name is translated to
the native sound id for the operating system.
</p>
<p>
An event sound is triggered via libcanberra by calling the
<a class="link" href="libcanberra-canberra.html#ca-context-play" title="ca_context_play ()"><code class="function">ca_context_play()</code></a> function on a previously created ca_context
object. The <a class="link" href="libcanberra-canberra.html#ca-context-play" title="ca_context_play ()"><code class="function">ca_context_play()</code></a> takes a list of key-value pairs that
describe the event sound to generate as closely as possible. The
most important property is <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-ID:CAPS" title="CA_PROP_EVENT_ID"><code class="literal">CA_PROP_EVENT_ID</code></a> which defines the XDG
sound name for the sound to play.
</p>
<p>
libcanberra is not a generic event abstraction system. It's only
purpose is playing sounds -- however in a very elaborate way. As
much information about the context the sound is triggered from
shall be supplied to the sound system as possible, so that it can
replace the sound with some other kind of feedback for a11y
cases. Also this additional information can be used to enhance user
experience (e.g. by positioning sounds in space depending on the
place on the screen the sound was triggered from, and similar
uses).
</p>
<p>
The set of properties defined for event sounds is extensible and
shared with other audio systems, such as PulseAudio. Some of
the properties that may be set are specific to an application, to a
window, to an input event or to the media being played back.
</p>
<p>
The user can attach a set of properties to the context itself,
which is than automatically inherited by each sample being played
back. (<a class="link" href="libcanberra-canberra.html#ca-context-change-props" title="ca_context_change_props ()"><code class="function">ca_context_change_props()</code></a>).
</p>
<p>
Some of the properties can be filled in by libcanberra or one of
its backends automatically and thus need not be be filled in by the
application (such as <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-PROCESS-ID:CAPS" title="CA_PROP_APPLICATION_PROCESS_ID"><code class="literal">CA_PROP_APPLICATION_PROCESS_ID</code></a> and
friends). However the application can always overwrite any of these
implicit properties.
</p>
<p>
libcanberra is thread-safe and OOM-safe (as far as the backend
allows this). It is not async-signal safe.
</p>
<p>
Most libcanberra functions return an integer that indicates success
when 0 (<code class="literal">CA_SUCCESS</code>) or an error when negative. In the latter case
<a class="link" href="libcanberra-canberra.html#ca-strerror" title="ca_strerror ()"><code class="function">ca_strerror()</code></a> can be used to convert this code into a human
readable string.
</p>
<p>
libcanberra property names need to be in 7bit ASCII, string
property values UTF8.
</p>
<p>
Optionally a libcanberra backend can support caching of sounds in a
sound system. If this functionality is used, the latencies for
event sound playback can be much smaller and fewer resources are
needed to start playback. If a backend does not support cacheing,
the respective functions will return an error code of
<code class="literal">CA_ERROR_NOTSUPPORTED</code>.
</p>
<p>
It is highly recommended that the application sets the
<a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-NAME:CAPS" title="CA_PROP_APPLICATION_NAME"><code class="literal">CA_PROP_APPLICATION_NAME</code></a>, <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-ID:CAPS" title="CA_PROP_APPLICATION_ID"><code class="literal">CA_PROP_APPLICATION_ID</code></a>,
<a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-ICON-NAME:CAPS" title="CA_PROP_APPLICATION_ICON_NAME"><code class="literal">CA_PROP_APPLICATION_ICON_NAME</code></a>/<a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-ICON:CAPS" title="CA_PROP_APPLICATION_ICON"><code class="literal">CA_PROP_APPLICATION_ICON</code></a> properties
immediately after creating the ca_context, before calling
<a class="link" href="libcanberra-canberra.html#ca-context-open" title="ca_context_open ()"><code class="function">ca_context_open()</code></a> or <a class="link" href="libcanberra-canberra.html#ca-context-play" title="ca_context_play ()"><code class="function">ca_context_play()</code></a>.
</p>
<p>
Its is highly recommended to pass at least <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-ID:CAPS" title="CA_PROP_EVENT_ID"><code class="literal">CA_PROP_EVENT_ID</code></a>,
<a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-DESCRIPTION:CAPS" title="CA_PROP_EVENT_DESCRIPTION"><code class="literal">CA_PROP_EVENT_DESCRIPTION</code></a> to <a class="link" href="libcanberra-canberra.html#ca-context-play" title="ca_context_play ()"><code class="function">ca_context_play()</code></a> for each event
sound generated. For sound events based on mouse inputs events
<a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-MOUSE-X:CAPS" title="CA_PROP_EVENT_MOUSE_X"><code class="literal">CA_PROP_EVENT_MOUSE_X</code></a>, <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-MOUSE-Y:CAPS" title="CA_PROP_EVENT_MOUSE_Y"><code class="literal">CA_PROP_EVENT_MOUSE_Y</code></a>, <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-MOUSE-HPOS:CAPS" title="CA_PROP_EVENT_MOUSE_HPOS"><code class="literal">CA_PROP_EVENT_MOUSE_HPOS</code></a>,
<a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-MOUSE-VPOS:CAPS" title="CA_PROP_EVENT_MOUSE_VPOS"><code class="literal">CA_PROP_EVENT_MOUSE_VPOS</code></a>, <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-MOUSE-BUTTON:CAPS" title="CA_PROP_EVENT_MOUSE_BUTTON"><code class="literal">CA_PROP_EVENT_MOUSE_BUTTON</code></a> should be
passed. For sound events attached to a widget on the screen, the
<code class="literal">CA_PROP_WINDOW_xxx</code> properties should be set.
</p>
</div>
<div class="refsect1">
<a name="libcanberra-canberra.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="CA-PROP-MEDIA-NAME:CAPS"></a><h3>CA_PROP_MEDIA_NAME</h3>
<pre class="programlisting">#define CA_PROP_MEDIA_NAME                         "media.name"
</pre>
<p>
A name describing the media being played. Localized if possible and applicable.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-MEDIA-TITLE:CAPS"></a><h3>CA_PROP_MEDIA_TITLE</h3>
<pre class="programlisting">#define CA_PROP_MEDIA_TITLE                        "media.title"
</pre>
<p>
A (song) title describing the media being played. Localized if possible and applicable.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-MEDIA-ARTIST:CAPS"></a><h3>CA_PROP_MEDIA_ARTIST</h3>
<pre class="programlisting">#define CA_PROP_MEDIA_ARTIST                       "media.artist"
</pre>
<p>
The artist of this media. Localized if possible and applicable.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-MEDIA-LANGUAGE:CAPS"></a><h3>CA_PROP_MEDIA_LANGUAGE</h3>
<pre class="programlisting">#define CA_PROP_MEDIA_LANGUAGE                     "media.language"
</pre>
<p>
The language this media is in, in some standard POSIX locale string, such as "de_DE".
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-MEDIA-FILENAME:CAPS"></a><h3>CA_PROP_MEDIA_FILENAME</h3>
<pre class="programlisting">#define CA_PROP_MEDIA_FILENAME                     "media.filename"
</pre>
<p>
The file name this media was or can be loaded from.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-MEDIA-ICON:CAPS"></a><h3>CA_PROP_MEDIA_ICON</h3>
<pre class="programlisting">#define CA_PROP_MEDIA_ICON                         "media.icon"
</pre>
<p>
An icon for this media in binary PNG format.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-MEDIA-ICON-NAME:CAPS"></a><h3>CA_PROP_MEDIA_ICON_NAME</h3>
<pre class="programlisting">#define CA_PROP_MEDIA_ICON_NAME                    "media.icon_name"
</pre>
<p>
An icon name as defined in the XDG icon naming specifcation.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-MEDIA-ROLE:CAPS"></a><h3>CA_PROP_MEDIA_ROLE</h3>
<pre class="programlisting">#define CA_PROP_MEDIA_ROLE                         "media.role"
</pre>
<p>
The "role" this media is played in. For event sounds the string
"event". For other cases strings like "music", "video", "game", ...
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-EVENT-ID:CAPS"></a><h3>CA_PROP_EVENT_ID</h3>
<pre class="programlisting">#define CA_PROP_EVENT_ID                           "event.id"
</pre>
<p>
A textual id for an event sound, as mandated by the XDG sound naming specification.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-EVENT-DESCRIPTION:CAPS"></a><h3>CA_PROP_EVENT_DESCRIPTION</h3>
<pre class="programlisting">#define CA_PROP_EVENT_DESCRIPTION                  "event.description"
</pre>
<p>
A descriptive string for the sound event. Localized if possible and applicable.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-EVENT-MOUSE-X:CAPS"></a><h3>CA_PROP_EVENT_MOUSE_X</h3>
<pre class="programlisting">#define CA_PROP_EVENT_MOUSE_X                      "event.mouse.x"
</pre>
<p>
If this sound event was triggered by a mouse input event, the X
position of the mouse cursor on the screen, formatted as string.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-EVENT-MOUSE-Y:CAPS"></a><h3>CA_PROP_EVENT_MOUSE_Y</h3>
<pre class="programlisting">#define CA_PROP_EVENT_MOUSE_Y                      "event.mouse.y"
</pre>
<p>
If this sound event was triggered by a mouse input event, the Y
position of the mouse cursor on the screen, formatted as string.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-EVENT-MOUSE-HPOS:CAPS"></a><h3>CA_PROP_EVENT_MOUSE_HPOS</h3>
<pre class="programlisting">#define CA_PROP_EVENT_MOUSE_HPOS                   "event.mouse.hpos"
</pre>
<p>
If this sound event was triggered by a mouse input event, the X
position of the mouse cursor as fractional value between 0 and 1,
formatted as string, 0 reflecting the left side of the screen, 1
the right side.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-EVENT-MOUSE-VPOS:CAPS"></a><h3>CA_PROP_EVENT_MOUSE_VPOS</h3>
<pre class="programlisting">#define CA_PROP_EVENT_MOUSE_VPOS                   "event.mouse.vpos"
</pre>
<p>
If this sound event was triggered by a mouse input event, the Y
position of the mouse cursor as fractional value between 0 and 1,
formatted as string, 0 reflecting the top end of the screen, 1
the bottom end.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-EVENT-MOUSE-BUTTON:CAPS"></a><h3>CA_PROP_EVENT_MOUSE_BUTTON</h3>
<pre class="programlisting">#define CA_PROP_EVENT_MOUSE_BUTTON                 "event.mouse.button"
</pre>
<p>
If this sound event was triggered by a mouse input event, the
number of the mouse button that triggered it, formatted as string. 1
for left mouse button, 3 for right, 2 for middle.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-WINDOW-NAME:CAPS"></a><h3>CA_PROP_WINDOW_NAME</h3>
<pre class="programlisting">#define CA_PROP_WINDOW_NAME                        "window.name"
</pre>
<p>
If this sound event was triggered by a window on the screen, the
name of this window as human readable string.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-WINDOW-ID:CAPS"></a><h3>CA_PROP_WINDOW_ID</h3>
<pre class="programlisting">#define CA_PROP_WINDOW_ID                          "window.id"
</pre>
<p>
If this sound event was triggered by a window on the screen, some
identification string for this window, so that the sound system can
recognize specific windows.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-WINDOW-ICON:CAPS"></a><h3>CA_PROP_WINDOW_ICON</h3>
<pre class="programlisting">#define CA_PROP_WINDOW_ICON                        "window.icon"
</pre>
<p>
If this sound event was triggered by a window on the screen, binary
icon data in PNG format for this window.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-WINDOW-ICON-NAME:CAPS"></a><h3>CA_PROP_WINDOW_ICON_NAME</h3>
<pre class="programlisting">#define CA_PROP_WINDOW_ICON_NAME                   "window.icon_name"
</pre>
<p>
If this sound event was triggered by a window on the screen, an
icon name for this window, as defined in the XDG icon naming
specification.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-WINDOW-X11-DISPLAY:CAPS"></a><h3>CA_PROP_WINDOW_X11_DISPLAY</h3>
<pre class="programlisting">#define CA_PROP_WINDOW_X11_DISPLAY                 "window.x11.display"
</pre>
<p>
If this sound event was triggered by a window on the screen and the
windowing system is X11, the X display name of the window (e.g. ":0").
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-WINDOW-X11-SCREEN:CAPS"></a><h3>CA_PROP_WINDOW_X11_SCREEN</h3>
<pre class="programlisting">#define CA_PROP_WINDOW_X11_SCREEN                  "window.x11.screen"
</pre>
<p>
If this sound event was triggered by a window on the screen and the
windowing system is X11, the X screen id of the window formatted as
string (e.g. "0").
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-WINDOW-X11-MONITOR:CAPS"></a><h3>CA_PROP_WINDOW_X11_MONITOR</h3>
<pre class="programlisting">#define CA_PROP_WINDOW_X11_MONITOR                 "window.x11.monitor"
</pre>
<p>
If this sound event was triggered by a window on the screen and the
windowing system is X11, the X monitor id of the window formatted as
string (e.g. "0").
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-WINDOW-X11-XID:CAPS"></a><h3>CA_PROP_WINDOW_X11_XID</h3>
<pre class="programlisting">#define CA_PROP_WINDOW_X11_XID                     "window.x11.xid"
</pre>
<p>
If this sound event was triggered by a window on the screen and the
windowing system is X11, the XID of the window formatted as string.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-APPLICATION-NAME:CAPS"></a><h3>CA_PROP_APPLICATION_NAME</h3>
<pre class="programlisting">#define CA_PROP_APPLICATION_NAME                   "application.name"
</pre>
<p>
The name of the application this sound event was triggered by as
human readable string. (e.g. "GNU Emacs") Localized if possible and
applicable.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-APPLICATION-ID:CAPS"></a><h3>CA_PROP_APPLICATION_ID</h3>
<pre class="programlisting">#define CA_PROP_APPLICATION_ID                     "application.id"
</pre>
<p>
An identifier for the program this sound event was triggered
by. (e.g. "org.gnu.emacs").
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-APPLICATION-VERSION:CAPS"></a><h3>CA_PROP_APPLICATION_VERSION</h3>
<pre class="programlisting">#define CA_PROP_APPLICATION_VERSION                "application.version"
</pre>
<p>
A version number for the program this sound event was triggered
by. (e.g. "22.2")
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-APPLICATION-ICON:CAPS"></a><h3>CA_PROP_APPLICATION_ICON</h3>
<pre class="programlisting">#define CA_PROP_APPLICATION_ICON                   "application.icon"
</pre>
<p>
Binary icon data in PNG format for the application this sound event
is triggered by.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-APPLICATION-ICON-NAME:CAPS"></a><h3>CA_PROP_APPLICATION_ICON_NAME</h3>
<pre class="programlisting">#define CA_PROP_APPLICATION_ICON_NAME              "application.icon_name"
</pre>
<p>
An icon name for the application this sound event is triggered by,
as defined in the XDG icon naming specification.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-APPLICATION-LANGUAGE:CAPS"></a><h3>CA_PROP_APPLICATION_LANGUAGE</h3>
<pre class="programlisting">#define CA_PROP_APPLICATION_LANGUAGE               "application.language"
</pre>
<p>
The locale string the application that is triggering this sound
event is running in. A POSIX locale string such as de_DE<em class="parameter"><code>euro</code></em>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-APPLICATION-PROCESS-ID:CAPS"></a><h3>CA_PROP_APPLICATION_PROCESS_ID</h3>
<pre class="programlisting">#define CA_PROP_APPLICATION_PROCESS_ID             "application.process.id"
</pre>
<p>
The unix PID of the process that is triggering this sound event, formatted as string.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-APPLICATION-PROCESS-BINARY:CAPS"></a><h3>CA_PROP_APPLICATION_PROCESS_BINARY</h3>
<pre class="programlisting">#define CA_PROP_APPLICATION_PROCESS_BINARY         "application.process.binary"
</pre>
<p>
The path to the process binary of the process that is triggering this sound event.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-APPLICATION-PROCESS-USER:CAPS"></a><h3>CA_PROP_APPLICATION_PROCESS_USER</h3>
<pre class="programlisting">#define CA_PROP_APPLICATION_PROCESS_USER           "application.process.user"
</pre>
<p>
The user that owns the process that is triggering this sound event.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-APPLICATION-PROCESS-HOST:CAPS"></a><h3>CA_PROP_APPLICATION_PROCESS_HOST</h3>
<pre class="programlisting">#define CA_PROP_APPLICATION_PROCESS_HOST           "application.process.host"
</pre>
<p>
The host name of the host the process that is triggering this sound event runs on.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-CANBERRA-CACHE-CONTROL:CAPS"></a><h3>CA_PROP_CANBERRA_CACHE_CONTROL</h3>
<pre class="programlisting">#define CA_PROP_CANBERRA_CACHE_CONTROL             "canberra.cache-control"
</pre>
<p>
A special property that can be used to control the automatic sound
caching of sounds in the sound server. One of "permanent",
"volatile", "never". "permanent" will cause this sample to be
cached in the server permanently. This is useful for very
frequently used sound events such as those used for input
feedback. "volatile" may be used for cacheing sounds in the sound
server temporarily. They will expire after some time or on cache
pressure. Finally, "never" may be used for sounds that should never
be cached, because they are only generated very seldomly or even
only once at most (such as desktop login sounds).
</p>
<p>
If this property is not explicitly passed to <a class="link" href="libcanberra-canberra.html#ca-context-play" title="ca_context_play ()"><code class="function">ca_context_play()</code></a> it
will default to "never". If it is not explicitly passed to
<a class="link" href="libcanberra-canberra.html#ca-context-cache" title="ca_context_cache ()"><code class="function">ca_context_cache()</code></a> it will default to "permanent".
</p>
<p>
If the list of properties is handed on to the sound server this
property is stripped from it.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-CANBERRA-VOLUME:CAPS"></a><h3>CA_PROP_CANBERRA_VOLUME</h3>
<pre class="programlisting">#define CA_PROP_CANBERRA_VOLUME                    "canberra.volume"
</pre>
<p>
A special property that can be used to control the volume this
sound event is played in if the backend supports it. A floating
point value for the decibel multiplier for the sound. 0 dB relates
to zero gain, and is the default volume these sounds are played in.
</p>
<p>
If the list of properties is handed on to the sound server this
property is stripped from it.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-CANBERRA-XDG-THEME-NAME:CAPS"></a><h3>CA_PROP_CANBERRA_XDG_THEME_NAME</h3>
<pre class="programlisting">#define CA_PROP_CANBERRA_XDG_THEME_NAME            "canberra.xdg-theme.name"
</pre>
<p>
A special property that can be used to control the XDG sound theme that
is used for this sample.
</p>
<p>
If the list of properties is handed on to the sound server this
property is stripped from it.
</p>
</div>
<hr>
<div class="refsect2">
<a name="CA-PROP-CANBERRA-XDG-THEME-OUTPUT-PROFILE:CAPS"></a><h3>CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE</h3>
<pre class="programlisting">#define CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE  "canberra.xdg-theme.output-profile"
</pre>
<p>
A special property that can be used to control the XDG sound theme
output profile that is used for this sample.
</p>
<p>
If the list of properties is handed on to the sound server this
property is stripped from it.
</p>
</div>
<hr>
<div class="refsect2">
<a name="ca-context"></a><h3>ca_context</h3>
<pre class="programlisting">typedef struct ca_context ca_context;
</pre>
<p>
A libcanberra context object.
</p>
</div>
<hr>
<div class="refsect2">
<a name="ca-finish-callback-t"></a><h3>ca_finish_callback_t ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*ca_finish_callback_t)             (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> id</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> error_code</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *userdata</code></em>);</pre>
<p>
Playback completion event callback. The context this callback is
called in is undefined, it might or might not be called from a
background thread, and from any stack frame. The code implementing
this function may not call any libcanberra API call from this
callback -- this might result in a deadlock. Instead it may only be
used to asynchronously signal some kind of notification object
(semaphore, message queue, ...).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>The libcanberra context this callback is called for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>The numerical id passed to the <a class="link" href="libcanberra-canberra.html#ca-context-play-full" title="ca_context_play_full ()"><code class="function">ca_context_play_full()</code></a> when starting the event sound playback.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error_code</code></em> :</span></p></td>
<td>A numerical error code describing the reason this callback is called. If CA_SUCCESS is passed in the playback of the event sound was successfully completed.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>userdata</code></em> :</span></p></td>
<td>Some arbitrary user data the caller of <a class="link" href="libcanberra-canberra.html#ca-context-play-full" title="ca_context_play_full ()"><code class="function">ca_context_play_full()</code></a> passed in.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-create"></a><h3>ca_context_create ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_create                   (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> **c</code></em>);</pre>
<p>
Create an (unconnected) context object. This call will not connect
to the sound system, calling this function might even suceed if no
working driver backend is available. To find out if one is
available call <a class="link" href="libcanberra-canberra.html#ca-context-open" title="ca_context_open ()"><code class="function">ca_context_open()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>A pointer wheere to fill in the newly created context object.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-destroy"></a><h3>ca_context_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_destroy                  (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>);</pre>
<p>
Destroy a (connected or unconnected) context object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>the context to destroy.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-open"></a><h3>ca_context_open ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_open                     (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>);</pre>
<p>
Connect the context to the sound system. This call is implicitly
called in <a class="link" href="libcanberra-canberra.html#ca-context-play" title="ca_context_play ()"><code class="function">ca_context_play()</code></a> or <a class="link" href="libcanberra-canberra.html#ca-context-cache" title="ca_context_cache ()"><code class="function">ca_context_cache()</code></a> if not called
explicitly. It is recommended to initialize application properties
with <a class="link" href="libcanberra-canberra.html#ca-context-change-props" title="ca_context_change_props ()"><code class="function">ca_context_change_props()</code></a> before calling this function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>the context to connect.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-set-driver"></a><h3>ca_context_set_driver ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_set_driver               (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *driver</code></em>);</pre>
<p>
Specify the backend driver used. This function may not be called again after
<a class="link" href="libcanberra-canberra.html#ca-context-open" title="ca_context_open ()"><code class="function">ca_context_open()</code></a> suceeded. This function might suceed even when
the specified driver backend is not available. Use
<a class="link" href="libcanberra-canberra.html#ca-context-open" title="ca_context_open ()"><code class="function">ca_context_open()</code></a> to find out whether the backend is available.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>the context to change the backend driver for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>driver</code></em> :</span></p></td>
<td>the backend driver to use (e.g. "alsa", "pulse", "null", ...)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-change-device"></a><h3>ca_context_change_device ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_change_device            (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *device</code></em>);</pre>
<p>
Specify the backend device to use. This function may be called not be called after
<a class="link" href="libcanberra-canberra.html#ca-context-open" title="ca_context_open ()"><code class="function">ca_context_open()</code></a> suceeded. This function might suceed even when
the specified driver backend is not available. Use
<a class="link" href="libcanberra-canberra.html#ca-context-open" title="ca_context_open ()"><code class="function">ca_context_open()</code></a> to find out whether the backend is available
</p>
<p>
Depending on the backend use this might or might not cause all
currently playing event sounds to be moved to the new device..
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>the context to change the backend device for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>the backend device to use, in a format that is specific to the backend.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-change-props"></a><h3>ca_context_change_props ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_change_props             (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Write one or more string properties to the context object. Requires
final NULL sentinel. Properties set like this will be attached to
both the client object of the sound server and to all event sounds
played or cached. It is recommended to call this function at least
once before calling <a class="link" href="libcanberra-canberra.html#ca-context-open" title="ca_context_open ()"><code class="function">ca_context_open()</code></a>, so that the initial
application properties are set properly before the initial
connection to the sound system. This function can be called both
before and after the <a class="link" href="libcanberra-canberra.html#ca-context-open" title="ca_context_open ()"><code class="function">ca_context_open()</code></a> call. Properties that have
already been set before will be overwritten.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>the context to set the properties on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>the list of string pairs for the properties. Needs to be a NULL terminated list.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-change-props-full"></a><h3>ca_context_change_props_full ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_change_props_full        (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>);</pre>
<p>
Similar to <a class="link" href="libcanberra-canberra.html#ca-context-change-props" title="ca_context_change_props ()"><code class="function">ca_context_change_props()</code></a>, but takes a ca_proplist
instead of a variable list of properties. Can be used to set binary
properties such as <a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-ICON:CAPS" title="CA_PROP_APPLICATION_ICON"><code class="literal">CA_PROP_APPLICATION_ICON</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>the context to set the properties on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>the property list to set.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-play"></a><h3>ca_context_play ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_play                     (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> id</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Play one event sound. id can be any numeric value which later can
be used to cancel an event sound that is currently being
played. You may use the same id twice or more times if you want to
cancel multiple event sounds with a single <a class="link" href="libcanberra-canberra.html#ca-context-cancel" title="ca_context_cancel ()"><code class="function">ca_context_cancel()</code></a> call
at once. It is recommended to pass 0 for the id if the event sound
shall never be canceled. If the requested sound is not cached in
the server yet this call might result in the sample being uploaded
temporarily or permanently (this may be controlled with <a class="link" href="libcanberra-canberra.html#CA-PROP-CANBERRA-CACHE-CONTROL:CAPS" title="CA_PROP_CANBERRA_CACHE_CONTROL"><code class="literal">CA_PROP_CANBERRA_CACHE_CONTROL</code></a>). This function will start playback
in the background. It will not wait until playback
completed. Depending on the backend used a sound that is started
shortly before your application terminates might or might not continue to
play after your application terminated. If you want to make sure
that all sounds finish to play you need to wait synchronously for
the callback function of <a class="link" href="libcanberra-canberra.html#ca-context-play-full" title="ca_context_play_full ()"><code class="function">ca_context_play_full()</code></a> to be called before you
terminate your application.
</p>
<p>
The sample to play is identified by the <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-ID:CAPS" title="CA_PROP_EVENT_ID"><code class="literal">CA_PROP_EVENT_ID</code></a>
property. If it is already cached in the server the cached version
is played. The properties passed in this call are merged with the
properties supplied when the sample was cached (if applicable)
and the context properties as set with <a class="link" href="libcanberra-canberra.html#ca-context-change-props" title="ca_context_change_props ()"><code class="function">ca_context_change_props()</code></a>.
</p>
<p>
If <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-ID:CAPS" title="CA_PROP_EVENT_ID"><code class="literal">CA_PROP_EVENT_ID</code></a> is not defined the sound file passed in the
<a class="link" href="libcanberra-canberra.html#CA-PROP-MEDIA-FILENAME:CAPS" title="CA_PROP_MEDIA_FILENAME"><code class="literal">CA_PROP_MEDIA_FILENAME</code></a> is played.
</p>
<p>
On Linux/Unix the right sound to play is determined according to
<a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-ID:CAPS" title="CA_PROP_EVENT_ID"><code class="literal">CA_PROP_EVENT_ID</code></a>,
<a class="link" href="libcanberra-canberra.html#CA-PROP-APPLICATION-LANGUAGE:CAPS" title="CA_PROP_APPLICATION_LANGUAGE"><code class="literal">CA_PROP_APPLICATION_LANGUAGE</code></a>/<a class="link" href="libcanberra-canberra.html#CA-PROP-MEDIA-LANGUAGE:CAPS" title="CA_PROP_MEDIA_LANGUAGE"><code class="literal">CA_PROP_MEDIA_LANGUAGE</code></a>, the system
locale, <a class="link" href="libcanberra-canberra.html#CA-PROP-CANBERRA-XDG-THEME-NAME:CAPS" title="CA_PROP_CANBERRA_XDG_THEME_NAME"><code class="literal">CA_PROP_CANBERRA_XDG_THEME_NAME</code></a> and
<a class="link" href="libcanberra-canberra.html#CA-PROP-CANBERRA-XDG-THEME-OUTPUT-PROFILE:CAPS" title="CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE"><code class="literal">CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE</code></a>, following the XDG Sound
Theming Specification. On non-Unix systems the native event sound
that matches the XDG sound name in <a class="link" href="libcanberra-canberra.html#CA-PROP-EVENT-ID:CAPS" title="CA_PROP_EVENT_ID"><code class="literal">CA_PROP_EVENT_ID</code></a> is played.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>the context to play the event sound on</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>an integer id this sound can later be identified with when calling <a class="link" href="libcanberra-canberra.html#ca-context-cancel" title="ca_context_cancel ()"><code class="function">ca_context_cancel()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>additional properties for this sound event.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-play-full"></a><h3>ca_context_play_full ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_play_full                (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-finish-callback-t" title="ca_finish_callback_t ()"><span class="type">ca_finish_callback_t</span></a> cb</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *userdata</code></em>);</pre>
<p>
Play one event sound, and call the specified callback function when
completed. See ca_finish_callback_t for the semantics the callback
is called in. Also see <a class="link" href="libcanberra-canberra.html#ca-context-play" title="ca_context_play ()"><code class="function">ca_context_play()</code></a>.
</p>
<p>
It is guaranteed that the callback is called exactly once if
<a class="link" href="libcanberra-canberra.html#ca-context-play-full" title="ca_context_play_full ()"><code class="function">ca_context_play_full()</code></a> returns CA_SUCCESS. You thus may safely pass
allocated memory to the callback and assume that it is freed
properly.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>the context to play the event sound on</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>an integer id this sound can be later be identified with when calling <a class="link" href="libcanberra-canberra.html#ca-context-cancel" title="ca_context_cancel ()"><code class="function">ca_context_cancel()</code></a> or when the callback is called.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>A property list of properties for this event sound</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cb</code></em> :</span></p></td>
<td>A callback to call when this sound event sucessfully finished playing or when an error occured during playback.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-cancel"></a><h3>ca_context_cancel ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_cancel                   (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> id</code></em>);</pre>
<p>
Cancel one or more event sounds that have been started via
<a class="link" href="libcanberra-canberra.html#ca-context-play" title="ca_context_play ()"><code class="function">ca_context_play()</code></a>. If the sound was started with
<a class="link" href="libcanberra-canberra.html#ca-context-play-full" title="ca_context_play_full ()"><code class="function">ca_context_play_full()</code></a> and a callback function was passed this
might cause this function to be called with <code class="literal">CA_ERROR_CANCELED</code> as
error code.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>the context to cancel the sounds on</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>the id that identify the sounds to cancel.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-cache"></a><h3>ca_context_cache ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_cache                    (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Upload the specified sample into the audio server and attach the
specified properties to it. This function will only return after
the sample upload was finished.
</p>
<p>
The sound to cache is found with the same algorithm that is used to
find the sounds for <a class="link" href="libcanberra-canberra.html#ca-context-play" title="ca_context_play ()"><code class="function">ca_context_play()</code></a>.
</p>
<p>
If the backend doesn't support caching sound samples this function
will return <code class="literal">CA_ERROR_NOTSUPPORTED</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>The context to use for uploading.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>The properties for this event sound. Terminated with NULL.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-cache-full"></a><h3>ca_context_cache_full ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_cache_full               (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>);</pre>
<p>
Upload the specified sample into the server and attach the
specified properties to it. Similar to <a class="link" href="libcanberra-canberra.html#ca-context-cache" title="ca_context_cache ()"><code class="function">ca_context_cache()</code></a> but takes
a ca_proplist instead of a variable number of arguments.
</p>
<p>
If the backend doesn't support caching sound samples this function
will return CA_ERROR_NOTSUPPORTED.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>The context to use for uploading.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>The property list for this event sound.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-context-playing"></a><h3>ca_context_playing ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_context_playing                  (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-context" title="ca_context"><span class="type">ca_context</span></a> *c</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> id</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> *playing</code></em>);</pre>
<p>
Check if at least one sound with the specified id is still
playing. Returns 0 in *playing if no sound with this id is playing
anymore or non-zero if there is at least one playing.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>the context to check if sound is still playing</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>the id that identify the sounds to check</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>playing</code></em> :</span></p></td>
<td>a pointer to a boolean that will be updated with the play status</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.16</p>
</div>
<hr>
<div class="refsect2">
<a name="ca-strerror"></a><h3>ca_strerror ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        ca_strerror                         (<em class="parameter"><code><span class="type">int</span> code</code></em>);</pre>
<p>
Converts a numerical error code as returned by most libcanberra API functions into a human readable error string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
<td>Numerical error code as returned by a libcanberra API function</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a human readable error string.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-proplist"></a><h3>ca_proplist</h3>
<pre class="programlisting">typedef struct ca_proplist ca_proplist;
</pre>
<p>
A canberra property list object. Basically a hashtable.
</p>
</div>
<hr>
<div class="refsect2">
<a name="ca-proplist-create"></a><h3>ca_proplist_create ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_proplist_create                  (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> **p</code></em>);</pre>
<p>
Allocate a new empty property list.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>A pointer where to fill in a pointer for the new property list.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-proplist-destroy"></a><h3>ca_proplist_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_proplist_destroy                 (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>);</pre>
<p>
Destroys a property list that was created with <a class="link" href="libcanberra-canberra.html#ca-proplist-create" title="ca_proplist_create ()"><code class="function">ca_proplist_create()</code></a> earlier.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>The property list to destroy</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-proplist-sets"></a><h3>ca_proplist_sets ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_proplist_sets                    (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);</pre>
<p>
Add a new string key/value pair to the property list.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>The property list to add this key/value pair to</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>The key for this key/value pair</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>The value for this key/value pair</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-proplist-setf"></a><h3>ca_proplist_setf ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_proplist_setf                    (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Much like <a class="link" href="libcanberra-canberra.html#ca-proplist-sets" title="ca_proplist_sets ()"><code class="function">ca_proplist_sets()</code></a>: add a new string key/value pair to
the property list. Takes a standard C format string plus arguments
and formats a string of it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>The property list to add this key/value pair to</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>The key for this key/value pair</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>The format string for the value for this key/value pair</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>The parameters for the format string</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ca-proplist-set"></a><h3>ca_proplist_set ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 ca_proplist_set                     (<em class="parameter"><code><a class="link" href="libcanberra-canberra.html#ca-proplist" title="ca_proplist"><span class="type">ca_proplist</span></a> *p</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
                                                         <em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
                                                         <em class="parameter"><code><span class="type">size_t</span> nbytes</code></em>);</pre>
<p>
Add a new binary key/value pair to the property list.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>The property list to add this key/value pair to</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>The key for this key/value pair</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>The binary value for this key value pair</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nbytes</code></em> :</span></p></td>
<td>The size of thebinary value for this key value pair.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, negative error code on error.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>