This file is indexed.

/usr/share/gtk-doc/html/libsoup-2.4/SoupMessageBody.html is in libsoup2.4-doc 2.62.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SoupMessageBody: libsoup Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch02.html" title="Core API">
<link rel="prev" href="SoupMessageHeaders.html" title="SoupMessageHeaders">
<link rel="next" href="libsoup-2.4-soup-method.html" title="soup-method">
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#SoupMessageBody.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#SoupMessageBody.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="SoupMessageHeaders.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libsoup-2.4-soup-method.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="SoupMessageBody"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="SoupMessageBody.top_of_page"></a>SoupMessageBody</span></h2>
<p>SoupMessageBody — HTTP message body</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="SoupMessageBody.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-buffer-new" title="soup_buffer_new ()">soup_buffer_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-buffer-new-subbuffer" title="soup_buffer_new_subbuffer ()">soup_buffer_new_subbuffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-buffer-new-with-owner" title="soup_buffer_new_with_owner ()">soup_buffer_new_with_owner</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-buffer-new-take" title="soup_buffer_new_take ()">soup_buffer_new_take</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-buffer-get-owner" title="soup_buffer_get_owner ()">soup_buffer_get_owner</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-buffer-get-data" title="soup_buffer_get_data ()">soup_buffer_get_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-buffer-copy" title="soup_buffer_copy ()">soup_buffer_copy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-buffer-free" title="soup_buffer_free ()">soup_buffer_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-buffer-get-as-bytes" title="soup_buffer_get_as_bytes ()">soup_buffer_get_as_bytes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="returnvalue">SoupMessageBody</span></a> *
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-new" title="soup_message_body_new ()">soup_message_body_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-free" title="soup_message_body_free ()">soup_message_body_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-set-accumulate" title="soup_message_body_set_accumulate ()">soup_message_body_set_accumulate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-get-accumulate" title="soup_message_body_get_accumulate ()">soup_message_body_get_accumulate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-append" title="soup_message_body_append ()">soup_message_body_append</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-append-buffer" title="soup_message_body_append_buffer ()">soup_message_body_append_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-append-take" title="soup_message_body_append_take ()">soup_message_body_append_take</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-truncate" title="soup_message_body_truncate ()">soup_message_body_truncate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-complete" title="soup_message_body_complete ()">soup_message_body_complete</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-flatten" title="soup_message_body_flatten ()">soup_message_body_flatten</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-get-chunk" title="soup_message_body_get_chunk ()">soup_message_body_get_chunk</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-got-chunk" title="soup_message_body_got_chunk ()">soup_message_body_got_chunk</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupMessageBody.html#soup-message-body-wrote-chunk" title="soup_message_body_wrote_chunk ()">soup_message_body_wrote_chunk</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<a name="SoupBuffer"></a><div class="refsect1">
<a name="SoupMessageBody.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="SoupMessageBody.html#SoupBuffer-struct" title="SoupBuffer">SoupBuffer</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="SoupMessageBody.html#SoupMemoryUse" title="enum SoupMemoryUse">SoupMemoryUse</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="SoupMessageBody.html#SoupMessageBody-struct" title="SoupMessageBody">SoupMessageBody</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="SoupMessageBody.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Boxed-Types.html">GBoxed</a>
    <span class="lineart">├──</span> SoupBuffer
    <span class="lineart">╰──</span> SoupMessageBody
</pre>
</div>
<div class="refsect1">
<a name="SoupMessageBody.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libsoup/soup.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="SoupMessageBody.description"></a><h2>Description</h2>
<p><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> represents the request or response body of a
<a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>.</p>
<p>In addition to <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>, libsoup also defines a "smaller"
data buffer type, <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>, which is primarily used as a
component of <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>. In particular, when using chunked
encoding to transmit or receive a message, each chunk is
represented as a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>.</p>
</div>
<div class="refsect1">
<a name="SoupMessageBody.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="soup-buffer-new"></a><h3>soup_buffer_new ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
soup_buffer_new (<em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupMemoryUse" title="enum SoupMemoryUse"><span class="type">SoupMemoryUse</span></a> use</code></em>,
                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>Creates a new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> containing <em class="parameter"><code>length</code></em>
 bytes from <em class="parameter"><code>data</code></em>
.</p>
<div class="refsect3">
<a name="soup-buffer-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>use</p></td>
<td class="parameter_description"><p>how <em class="parameter"><code>data</code></em>
is to be used by the buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>length of <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="soup-buffer-new.returns"></a><h4>Returns</h4>
<p> the new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-buffer-new-subbuffer"></a><h3>soup_buffer_new_subbuffer ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
soup_buffer_new_subbuffer (<em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *parent</code></em>,
                           <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> offset</code></em>,
                           <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>Creates a new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> containing <em class="parameter"><code>length</code></em>
 bytes "copied" from
<em class="parameter"><code>parent</code></em>
 starting at <em class="parameter"><code>offset</code></em>
. (Normally this will not actually copy
any data, but will instead simply reference the same data as
<em class="parameter"><code>parent</code></em>
 does.)</p>
<div class="refsect3">
<a name="soup-buffer-new-subbuffer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>parent</p></td>
<td class="parameter_description"><p>the parent <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>offset within <em class="parameter"><code>parent</code></em>
to start at</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>number of bytes to copy from <em class="parameter"><code>parent</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="soup-buffer-new-subbuffer.returns"></a><h4>Returns</h4>
<p> the new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-buffer-new-with-owner"></a><h3>soup_buffer_new_with_owner ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
soup_buffer_new_with_owner (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
                            <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>,
                            <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> owner</code></em>,
                            <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> owner_dnotify</code></em>);</pre>
<p>Creates a new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> containing <em class="parameter"><code>length</code></em>
 bytes from <em class="parameter"><code>data</code></em>
. When
the <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> is freed, it will call <em class="parameter"><code>owner_dnotify</code></em>
, passing
<em class="parameter"><code>owner</code></em>
 to it. You must ensure that <em class="parameter"><code>data</code></em>
 will remain valid until
<em class="parameter"><code>owner_dnotify</code></em>
 is called.</p>
<p>For example, you could use this to create a buffer containing data
returned from libxml without needing to do an extra copy:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="function">xmlDocDumpMemory</span> <span class="gtkdoc opt">(</span>doc<span class="gtkdoc opt">, &amp;</span>xmlbody<span class="gtkdoc opt">, &amp;</span>len<span class="gtkdoc opt">);</span>
<span class="keyword">return</span> <span class="function"><a href="SoupMessageBody.html#soup-buffer-new-with-owner">soup_buffer_new_with_owner</a></span> <span class="gtkdoc opt">(</span>xmlbody<span class="gtkdoc opt">,</span> len<span class="gtkdoc opt">,</span> xmlbody<span class="gtkdoc opt">,</span>
                                   <span class="gtkdoc opt">(</span>GDestroyNotify<span class="gtkdoc opt">)</span>xmlFree<span class="gtkdoc opt">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>In this example, <em class="parameter"><code>data</code></em>
 and <em class="parameter"><code>owner</code></em>
 are the same, but in other cases
they would be different (eg, <em class="parameter"><code>owner</code></em>
 would be a object, and <em class="parameter"><code>data</code></em>

would be a pointer to one of the object's fields).</p>
<div class="refsect3">
<a name="soup-buffer-new-with-owner.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>length of <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>owner</p></td>
<td class="parameter_description"><p>pointer to an object that owns <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>owner_dnotify</p></td>
<td class="parameter_description"><p>a function to free/unref <em class="parameter"><code>owner</code></em>
when
the buffer is freed. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="soup-buffer-new-with-owner.returns"></a><h4>Returns</h4>
<p> the new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-buffer-new-take"></a><h3>soup_buffer_new_take ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
soup_buffer_new_take (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>Creates a new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> containing <em class="parameter"><code>length</code></em>
 bytes from <em class="parameter"><code>data</code></em>
.</p>
<p>This function is exactly equivalent to <a class="link" href="SoupMessageBody.html#soup-buffer-new" title="soup_buffer_new ()"><code class="function">soup_buffer_new()</code></a> with
<a class="link" href="SoupMessageBody.html#SOUP-MEMORY-TAKE:CAPS"><code class="literal">SOUP_MEMORY_TAKE</code></a> as first argument; it exists mainly for
convenience and simplifying language bindings.</p>
<p><span class="annotation">[<acronym title="Rename the original symbol's name to SYMBOL."><span class="acronym">rename-to</span></acronym> soup_buffer_new]</span></p>
<div class="refsect3">
<a name="soup-buffer-new-take.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>length of <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="soup-buffer-new-take.returns"></a><h4>Returns</h4>
<p> the new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>.</p>
</div>
<p class="since">Since: 2.32</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-buffer-get-owner"></a><h3>soup_buffer_get_owner ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
soup_buffer_get_owner (<em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *buffer</code></em>);</pre>
<p>Gets the "owner" object for a buffer created with
<a class="link" href="SoupMessageBody.html#soup-buffer-new-with-owner" title="soup_buffer_new_with_owner ()"><code class="function">soup_buffer_new_with_owner()</code></a>.</p>
<div class="refsect3">
<a name="soup-buffer-get-owner.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> created with <a class="link" href="SoupMessageBody.html#soup-buffer-new-with-owner" title="soup_buffer_new_with_owner ()"><code class="function">soup_buffer_new_with_owner()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="soup-buffer-get-owner.returns"></a><h4>Returns</h4>
<p>the owner pointer. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-buffer-get-data"></a><h3>soup_buffer_get_data ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_buffer_get_data (<em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *buffer</code></em>,
                      <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> **data</code></em>,
                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *length</code></em>);</pre>
<p>This function exists for use by language bindings, because it's not
currently possible to get the right effect by annotating the fields
of <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>.</p>
<div class="refsect3">
<a name="soup-buffer-get-data.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>the pointer
to the buffer data is stored here. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of the buffer data is stored here. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.32</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-buffer-copy"></a><h3>soup_buffer_copy ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
soup_buffer_copy (<em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *buffer</code></em>);</pre>
<p>Makes a copy of <em class="parameter"><code>buffer</code></em>
. In reality, <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> is a refcounted
type, and calling <a class="link" href="SoupMessageBody.html#soup-buffer-copy" title="soup_buffer_copy ()"><code class="function">soup_buffer_copy()</code></a> will normally just increment
the refcount on <em class="parameter"><code>buffer</code></em>
 and return it. However, if <em class="parameter"><code>buffer</code></em>
 was
created with <a class="link" href="SoupMessageBody.html#SOUP-MEMORY-TEMPORARY:CAPS"><span class="type">SOUP_MEMORY_TEMPORARY</span></a> memory, then <a class="link" href="SoupMessageBody.html#soup-buffer-copy" title="soup_buffer_copy ()"><code class="function">soup_buffer_copy()</code></a>
will actually return a copy of it, so that the data in the copy
will remain valid after the temporary buffer is freed.</p>
<div class="refsect3">
<a name="soup-buffer-copy.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="soup-buffer-copy.returns"></a><h4>Returns</h4>
<p> the new (or newly-reffed) buffer</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-buffer-free"></a><h3>soup_buffer_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_buffer_free (<em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *buffer</code></em>);</pre>
<p>Frees <em class="parameter"><code>buffer</code></em>
. (In reality, as described in the documentation for
<a class="link" href="SoupMessageBody.html#soup-buffer-copy" title="soup_buffer_copy ()"><code class="function">soup_buffer_copy()</code></a>, this is actually an "unref" operation, and may
or may not actually free <em class="parameter"><code>buffer</code></em>
.)</p>
<div class="refsect3">
<a name="soup-buffer-free.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-buffer-get-as-bytes"></a><h3>soup_buffer_get_as_bytes ()</h3>
<pre class="programlisting"><a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="returnvalue">GBytes</span></a> *
soup_buffer_get_as_bytes (<em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *buffer</code></em>);</pre>
<p>Creates a <a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> pointing to the same memory as <em class="parameter"><code>buffer</code></em>
. The
<a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> will hold a reference on <em class="parameter"><code>buffer</code></em>
 to ensure that it is not
freed while the <a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> is still valid.</p>
<div class="refsect3">
<a name="soup-buffer-get-as-bytes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="soup-buffer-get-as-bytes.returns"></a><h4>Returns</h4>
<p>a new <a href="../glib/glib-Byte-Arrays.html#GBytes"><span class="type">GBytes</span></a> which has the same content
as the <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.40</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-new"></a><h3>soup_message_body_new ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="returnvalue">SoupMessageBody</span></a> *
soup_message_body_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>. <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> uses this internally; you
will not normally need to call it yourself.</p>
<div class="refsect3">
<a name="soup-message-body-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-free"></a><h3>soup_message_body_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_message_body_free (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>);</pre>
<p>Frees <em class="parameter"><code>body</code></em>
. You will not normally need to use this, as
<a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> frees its associated message bodies automatically.</p>
<div class="refsect3">
<a name="soup-message-body-free.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-set-accumulate"></a><h3>soup_message_body_set_accumulate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_message_body_set_accumulate (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>,
                                  <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> accumulate</code></em>);</pre>
<p>Sets or clears the accumulate flag on <em class="parameter"><code>body</code></em>
. (The default value is
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.) If set to <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, <em class="parameter"><code>body</code></em>
's <code class="literal">data</code> field will not be filled in
after the body is fully sent/received, and the chunks that make up
<em class="parameter"><code>body</code></em>
 may be discarded when they are no longer needed.</p>
<p>In particular, if you set this flag to <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on an "incoming"
message body (that is, the <a class="link" href="SoupMessage.html#SoupMessage--response-body" title="The “response-body” property"><span class="type">“response_body”</span></a> of a
client-side message, or <a class="link" href="SoupMessage.html#SoupMessage--request-body" title="The “request-body” property"><span class="type">“request_body”</span></a> of a server-side
message), this will cause each chunk of the body to be discarded
after its corresponding <a class="link" href="SoupMessage.html#SoupMessage-got-chunk" title="The “got-chunk” signal"><span class="type">“got_chunk”</span></a> signal is emitted.
(This is equivalent to setting the deprecated
<a class="link" href="SoupMessage.html#SOUP-MESSAGE-OVERWRITE-CHUNKS:CAPS"><code class="literal">SOUP_MESSAGE_OVERWRITE_CHUNKS</code></a> flag on the message.)</p>
<p>If you set this flag to <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on the <a class="link" href="SoupMessage.html#SoupMessage--response-body" title="The “response-body” property"><span class="type">“response_body”</span></a> of
a server-side message, it will cause each chunk of the body to be
discarded after its corresponding <a class="link" href="SoupMessage.html#SoupMessage-wrote-chunk" title="The “wrote-chunk” signal"><span class="type">“wrote_chunk”</span></a> signal
is emitted.</p>
<p>If you set the flag to <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on the <a class="link" href="SoupMessage.html#SoupMessage--request-body" title="The “request-body” property"><span class="type">“request_body”</span></a> of a
client-side message, it will block the accumulation of chunks into
<em class="parameter"><code>body</code></em>
's <code class="literal">data</code> field, but it will not normally cause the chunks to
be discarded after being written like in the server-side
<a class="link" href="SoupMessage.html#SoupMessage--response-body" title="The “response-body” property"><span class="type">“response_body”</span></a> case, because the request body needs to
be kept around in case the request needs to be sent a second time
due to redirection or authentication. However, if you set the
<a class="link" href="SoupMessage.html#SOUP-MESSAGE-CAN-REBUILD:CAPS"><code class="literal">SOUP_MESSAGE_CAN_REBUILD</code></a> flag on the message, then the chunks will
be discarded, and you will be responsible for recreating the
request body after the <a class="link" href="SoupMessage.html#SoupMessage-restarted" title="The “restarted” signal"><span class="type">“restarted”</span></a> signal is emitted.</p>
<div class="refsect3">
<a name="soup-message-body-set-accumulate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>accumulate</p></td>
<td class="parameter_description"><p>whether or not to accumulate body chunks in <em class="parameter"><code>body</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.24</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-get-accumulate"></a><h3>soup_message_body_get_accumulate ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
soup_message_body_get_accumulate (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>);</pre>
<p>Gets the accumulate flag on <em class="parameter"><code>body</code></em>
; see
<a class="link" href="SoupMessageBody.html#soup-message-body-set-accumulate" title="soup_message_body_set_accumulate ()"><code class="function">soup_message_body_set_accumulate()</code></a> for details.</p>
<div class="refsect3">
<a name="soup-message-body-get-accumulate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="soup-message-body-get-accumulate.returns"></a><h4>Returns</h4>
<p> the accumulate flag for <em class="parameter"><code>body</code></em>
.</p>
</div>
<p class="since">Since: 2.24</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-append"></a><h3>soup_message_body_append ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_message_body_append (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>,
                          <em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupMemoryUse" title="enum SoupMemoryUse"><span class="type">SoupMemoryUse</span></a> use</code></em>,
                          <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
                          <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>Appends <em class="parameter"><code>length</code></em>
 bytes from <em class="parameter"><code>data</code></em>
 to <em class="parameter"><code>body</code></em>
 according to <em class="parameter"><code>use</code></em>
.</p>
<div class="refsect3">
<a name="soup-message-body-append.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>use</p></td>
<td class="parameter_description"><p>how to use <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data to append. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>length of <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-append-buffer"></a><h3>soup_message_body_append_buffer ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_message_body_append_buffer (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>,
                                 <em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *buffer</code></em>);</pre>
<p>Appends the data from <em class="parameter"><code>buffer</code></em>
 to <em class="parameter"><code>body</code></em>
. (<a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> uses
<a href="SoupMessageBody.html#SoupBuffer-struct"><span class="type">SoupBuffers</span></a> internally, so this is normally a constant-time
operation that doesn't actually require copying the data in
<em class="parameter"><code>buffer</code></em>
.)</p>
<div class="refsect3">
<a name="soup-message-body-append-buffer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-append-take"></a><h3>soup_message_body_append_take ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_message_body_append_take (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>,
                               <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
                               <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>Appends <em class="parameter"><code>length</code></em>
 bytes from <em class="parameter"><code>data</code></em>
 to <em class="parameter"><code>body</code></em>
.</p>
<p>This function is exactly equivalent to <a class="link" href="SoupMessageBody.html#soup-message-body-append" title="soup_message_body_append ()"><code class="function">soup_message_body_append()</code></a>
with <a class="link" href="SoupMessageBody.html#SOUP-MEMORY-TAKE:CAPS"><code class="literal">SOUP_MEMORY_TAKE</code></a> as second argument; it exists mainly for
convenience and simplifying language bindings.</p>
<p><span class="annotation">[<acronym title="Rename the original symbol's name to SYMBOL."><span class="acronym">rename-to</span></acronym> soup_message_body_append]</span></p>
<div class="refsect3">
<a name="soup-message-body-append-take.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data to append. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>length of <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.32</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-truncate"></a><h3>soup_message_body_truncate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_message_body_truncate (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>);</pre>
<p>Deletes all of the data in <em class="parameter"><code>body</code></em>
.</p>
<div class="refsect3">
<a name="soup-message-body-truncate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-complete"></a><h3>soup_message_body_complete ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_message_body_complete (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>);</pre>
<p>Tags <em class="parameter"><code>body</code></em>
 as being complete; Call this when using chunked encoding
after you have appended the last chunk.</p>
<div class="refsect3">
<a name="soup-message-body-complete.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-flatten"></a><h3>soup_message_body_flatten ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
soup_message_body_flatten (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>);</pre>
<p>Fills in <em class="parameter"><code>body</code></em>
's data field with a buffer containing all of the
data in <em class="parameter"><code>body</code></em>
 (plus an additional '\0' byte not counted by <em class="parameter"><code>body</code></em>
's
length field).</p>
<div class="refsect3">
<a name="soup-message-body-flatten.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="soup-message-body-flatten.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> containing the same data as <em class="parameter"><code>body</code></em>
.
(You must free this buffer if you do not want it.)</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-get-chunk"></a><h3>soup_message_body_get_chunk ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *
soup_message_body_get_chunk (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>,
                             <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> offset</code></em>);</pre>
<p>Gets a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> containing data from <em class="parameter"><code>body</code></em>
 starting at <em class="parameter"><code>offset</code></em>
.
The size of the returned chunk is unspecified. You can iterate
through the entire body by first calling
<a class="link" href="SoupMessageBody.html#soup-message-body-get-chunk" title="soup_message_body_get_chunk ()"><code class="function">soup_message_body_get_chunk()</code></a> with an offset of 0, and then on each
successive call, increment the offset by the length of the
previously-returned chunk.</p>
<p>If <em class="parameter"><code>offset</code></em>
 is greater than or equal to the total length of <em class="parameter"><code>body</code></em>
,
then the return value depends on whether or not
<a class="link" href="SoupMessageBody.html#soup-message-body-complete" title="soup_message_body_complete ()"><code class="function">soup_message_body_complete()</code></a> has been called or not; if it has,
then <a class="link" href="SoupMessageBody.html#soup-message-body-get-chunk" title="soup_message_body_get_chunk ()"><code class="function">soup_message_body_get_chunk()</code></a> will return a 0-length chunk
(indicating the end of <em class="parameter"><code>body</code></em>
). If it has not, then
<a class="link" href="SoupMessageBody.html#soup-message-body-get-chunk" title="soup_message_body_get_chunk ()"><code class="function">soup_message_body_get_chunk()</code></a> will return <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> (indicating that
<em class="parameter"><code>body</code></em>
 may still potentially have more data, but that data is not
currently available).</p>
<div class="refsect3">
<a name="soup-message-body-get-chunk.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>an offset</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="soup-message-body-get-chunk.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-got-chunk"></a><h3>soup_message_body_got_chunk ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_message_body_got_chunk (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>,
                             <em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *chunk</code></em>);</pre>
<p>Handles the <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> part of receiving a chunk of data from
the network. Normally this means appending <em class="parameter"><code>chunk</code></em>
 to <em class="parameter"><code>body</code></em>
, exactly
as with <a class="link" href="SoupMessageBody.html#soup-message-body-append-buffer" title="soup_message_body_append_buffer ()"><code class="function">soup_message_body_append_buffer()</code></a>, but if you have set
<em class="parameter"><code>body</code></em>
's accumulate flag to <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, then that will not happen.</p>
<p>This is a low-level method which you should not normally need to
use.</p>
<div class="refsect3">
<a name="soup-message-body-got-chunk.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>chunk</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> received from the network</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.24</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-body-wrote-chunk"></a><h3>soup_message_body_wrote_chunk ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_message_body_wrote_chunk (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>,
                               <em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *chunk</code></em>);</pre>
<p>Handles the <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> part of writing a chunk of data to the
network. Normally this is a no-op, but if you have set <em class="parameter"><code>body</code></em>
's
accumulate flag to <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, then this will cause <em class="parameter"><code>chunk</code></em>
 to be
discarded to free up memory.</p>
<p>This is a low-level method which you should not need to use, and
there are further restrictions on its proper use which are not
documented here.</p>
<div class="refsect3">
<a name="soup-message-body-wrote-chunk.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>body</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>chunk</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> returned from <a class="link" href="SoupMessageBody.html#soup-message-body-get-chunk" title="soup_message_body_get_chunk ()"><code class="function">soup_message_body_get_chunk()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.24</p>
</div>
</div>
<div class="refsect1">
<a name="SoupMessageBody.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="SoupBuffer-struct"></a><h3>SoupBuffer</h3>
<pre class="programlisting">typedef struct {
	const char *data;
	gsize       length;
} SoupBuffer;
</pre>
<p>A data buffer, generally used to represent a chunk of a
<a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>.</p>
<p><em class="parameter"><code>data</code></em>
 is a <span class="type">char</span> because that's generally convenient; in some
situations you may need to cast it to <a href="../glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> or another type.</p>
<div class="refsect3">
<a name="SoupBuffer.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p>const <span class="type">char</span> *<em class="structfield"><code><a name="SoupBuffer-struct.data"></a>data</code></em>;</p></td>
<td class="struct_member_description"><p>the data. </p></td>
<td class="struct_member_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> gpointer]</span></td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> <em class="structfield"><code><a name="SoupBuffer-struct.length"></a>length</code></em>;</p></td>
<td class="struct_member_description"><p>length of <em class="parameter"><code>data</code></em>
</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="SoupMemoryUse"></a><h3>enum SoupMemoryUse</h3>
<p>Describes how <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> should use the data passed in by the
caller.</p>
<p>See also <a class="link" href="SoupMessageBody.html#soup-buffer-new-with-owner" title="soup_buffer_new_with_owner ()"><code class="function">soup_buffer_new_with_owner()</code></a>, which allows to you create a
buffer containing data which is owned by another object.</p>
<div class="refsect3">
<a name="SoupMemoryUse.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="SOUP-MEMORY-STATIC:CAPS"></a>SOUP_MEMORY_STATIC</p></td>
<td class="enum_member_description">
<p>The memory is statically allocated and
constant; libsoup can use the passed-in buffer directly and not
need to worry about it being modified or freed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="SOUP-MEMORY-TAKE:CAPS"></a>SOUP_MEMORY_TAKE</p></td>
<td class="enum_member_description">
<p>The caller has allocated the memory for the
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>'s use; libsoup will assume ownership of it and free it
(with <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>) when it is done with it.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="SOUP-MEMORY-COPY:CAPS"></a>SOUP_MEMORY_COPY</p></td>
<td class="enum_member_description">
<p>The passed-in data belongs to the caller; the
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> will copy it into new memory, leaving the caller free
to reuse the original memory.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="SOUP-MEMORY-TEMPORARY:CAPS"></a>SOUP_MEMORY_TEMPORARY</p></td>
<td class="enum_member_description">
<p>The passed-in data belongs to the caller,
but will remain valid for the lifetime of the <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>. The
difference between this and <em class="parameter"><code>SOUP_MEMORY_STATIC</code></em>
 is that if you copy
a <em class="parameter"><code>SOUP_MEMORY_TEMPORARY</code></em>
 buffer, it will make a copy of the memory
as well, rather than reusing the original memory.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="SoupMessageBody-struct"></a><h3>SoupMessageBody</h3>
<pre class="programlisting">typedef struct {
	const char *data;
	goffset     length;
} SoupMessageBody;
</pre>
<p>A <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> request or response body.</p>
<p>Note that while <em class="parameter"><code>length</code></em>
 always reflects the full length of the
message body, <em class="parameter"><code>data</code></em>
 is normally <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, and will only be filled in
after <a class="link" href="SoupMessageBody.html#soup-message-body-flatten" title="soup_message_body_flatten ()"><code class="function">soup_message_body_flatten()</code></a> is called. For client-side
messages, this automatically happens for the response body after it
has been fully read, unless you set the
<a class="link" href="SoupMessage.html#SOUP-MESSAGE-OVERWRITE-CHUNKS:CAPS"><code class="literal">SOUP_MESSAGE_OVERWRITE_CHUNKS</code></a> flags. Likewise, for server-side
messages, the request body is automatically filled in after being
read.</p>
<p>As an added bonus, when <em class="parameter"><code>data</code></em>
 is filled in, it is always terminated
with a '\0' byte (which is not reflected in <em class="parameter"><code>length</code></em>
).</p>
<div class="refsect3">
<a name="SoupMessageBody.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p>const <span class="type">char</span> *<em class="structfield"><code><a name="SoupMessageBody-struct.data"></a>data</code></em>;</p></td>
<td class="struct_member_description"><p>the data</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> <em class="structfield"><code><a name="SoupMessageBody-struct.length"></a>length</code></em>;</p></td>
<td class="struct_member_description"><p>length of <em class="parameter"><code>data</code></em>
</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="SoupMessageBody.see-also"></a><h2>See Also</h2>
<p><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.27</div>
</body>
</html>