This file is indexed.

/usr/share/gtk-doc/html/libsoup-2.4/SoupMessageBody.html is in libsoup2.4-doc 2.38.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
<!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</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.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.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="SoupMessageHeaders.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.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">libsoup Reference Manual</th>
<td><a accesskey="n" href="libsoup-2.4-soup-method.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#SoupMessageBody.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#SoupMessageBody.description" class="shortcut">Description</a>
                   | 
                  <a href="#SoupMessageBody.object-hierarchy" class="shortcut">Object Hierarchy</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 valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="SoupMessageBody.synopsis"></a><h2>Synopsis</h2>
<a name="SoupBuffer"></a><pre class="synopsis">
#include &lt;libsoup/soup.h&gt;

                    <a class="link" href="SoupMessageBody.html#SoupBuffer-struct" title="SoupBuffer">SoupBuffer</a>;
enum                <a class="link" href="SoupMessageBody.html#SoupMemoryUse" title="enum SoupMemoryUse">SoupMemoryUse</a>;
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *        <a class="link" href="SoupMessageBody.html#soup-buffer-new" title="soup_buffer_new ()">soup_buffer_new</a>                     (<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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> length</code></em>);
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *        <a class="link" href="SoupMessageBody.html#soup-buffer-new-subbuffer" title="soup_buffer_new_subbuffer ()">soup_buffer_new_subbuffer</a>           (<em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *parent</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> offset</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> length</code></em>);
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *        <a class="link" href="SoupMessageBody.html#soup-buffer-new-with-owner" title="soup_buffer_new_with_owner ()">soup_buffer_new_with_owner</a>          (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> length</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> owner</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> owner_dnotify</code></em>);
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *        <a class="link" href="SoupMessageBody.html#soup-buffer-new-take" title="soup_buffer_new_take ()">soup_buffer_new_take</a>                (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> length</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="SoupMessageBody.html#soup-buffer-get-owner" title="soup_buffer_get_owner ()">soup_buffer_get_owner</a>               (<em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *buffer</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageBody.html#soup-buffer-get-data" title="soup_buffer_get_data ()">soup_buffer_get_data</a>                (<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 <span class="type">guint8</span> **data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> *length</code></em>);
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *        <a class="link" href="SoupMessageBody.html#soup-buffer-copy" title="soup_buffer_copy ()">soup_buffer_copy</a>                    (<em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *buffer</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageBody.html#soup-buffer-free" title="soup_buffer_free ()">soup_buffer_free</a>                    (<em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> *buffer</code></em>);

                    <a class="link" href="SoupMessageBody.html#SoupMessageBody-struct" title="SoupMessageBody">SoupMessageBody</a>;
<a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="returnvalue">SoupMessageBody</span></a> *   <a class="link" href="SoupMessageBody.html#soup-message-body-new" title="soup_message_body_new ()">soup_message_body_new</a>               (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageBody.html#soup-message-body-free" title="soup_message_body_free ()">soup_message_body_free</a>              (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="SoupMessageBody.html#soup-message-body-set-accumulate" title="soup_message_body_set_accumulate ()">soup_message_body_set_accumulate</a>    (<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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> accumulate</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupMessageBody.html#soup-message-body-get-accumulate" title="soup_message_body_get_accumulate ()">soup_message_body_get_accumulate</a>    (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="SoupMessageBody.html#soup-message-body-append" title="soup_message_body_append ()">soup_message_body_append</a>            (<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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> length</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageBody.html#soup-message-body-append-buffer" title="soup_message_body_append_buffer ()">soup_message_body_append_buffer</a>     (<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>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageBody.html#soup-message-body-append-take" title="soup_message_body_append_take ()">soup_message_body_append_take</a>       (<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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> length</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageBody.html#soup-message-body-truncate" title="soup_message_body_truncate ()">soup_message_body_truncate</a>          (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageBody.html#soup-message-body-complete" title="soup_message_body_complete ()">soup_message_body_complete</a>          (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>);
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *        <a class="link" href="SoupMessageBody.html#soup-message-body-flatten" title="soup_message_body_flatten ()">soup_message_body_flatten</a>           (<em class="parameter"><code><a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a> *body</code></em>);
<a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="returnvalue">SoupBuffer</span></a> *        <a class="link" href="SoupMessageBody.html#soup-message-body-get-chunk" title="soup_message_body_get_chunk ()">soup_message_body_get_chunk</a>         (<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><span class="type">goffset</span> offset</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="SoupMessageBody.html#soup-message-body-got-chunk" title="soup_message_body_got_chunk ()">soup_message_body_got_chunk</a>         (<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>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageBody.html#soup-message-body-wrote-chunk" title="soup_message_body_wrote_chunk ()">soup_message_body_wrote_chunk</a>       (<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>
</div>
<div class="refsect1">
<a name="SoupMessageBody.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GBoxed
   +----SoupBuffer
</pre>
<pre class="synopsis">
  GBoxed
   +----SoupMessageBody
</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.details"></a><h2>Details</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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> or another type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">const <span class="type">char</span> *<em class="structfield"><code><a name="SoupBuffer-struct.data"></a>data</code></em>;</span></p></td>
<td>the data. <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><p><span class="term"><span class="type">gsize</span> <em class="structfield"><code><a name="SoupBuffer-struct.length"></a>length</code></em>;</span></p></td>
<td>length of <em class="parameter"><code>data</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupMemoryUse"></a><h3>enum SoupMemoryUse</h3>
<pre class="programlisting">typedef enum {
	SOUP_MEMORY_STATIC,
	SOUP_MEMORY_TAKE,
	SOUP_MEMORY_COPY,
	SOUP_MEMORY_TEMPORARY
} SoupMemoryUse;
</pre>
<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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="SOUP-MEMORY-STATIC:CAPS"></a><span class="term"><code class="literal">SOUP_MEMORY_STATIC</code></span></p></td>
<td>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.
</td>
</tr>
<tr>
<td><p><a name="SOUP-MEMORY-TAKE:CAPS"></a><span class="term"><code class="literal">SOUP_MEMORY_TAKE</code></span></p></td>
<td>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="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>) when it is done with it.
</td>
</tr>
<tr>
<td><p><a name="SOUP-MEMORY-COPY:CAPS"></a><span class="term"><code class="literal">SOUP_MEMORY_COPY</code></span></p></td>
<td>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.
</td>
</tr>
<tr>
<td><p><a name="SOUP-MEMORY-TEMPORARY:CAPS"></a><span class="term"><code class="literal">SOUP_MEMORY_TEMPORARY</code></span></p></td>
<td>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.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> 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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>use</code></em> :</span></p></td>
<td>how <em class="parameter"><code>data</code></em> is to be used by the buffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>data</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>.</td>
</tr>
</tbody>
</table></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><span class="type">gsize</span> offset</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> 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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
<td>the parent <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
<td>offset within <em class="parameter"><code>parent</code></em> to start at</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>number of bytes to copy from <em class="parameter"><code>parent</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>.</td>
</tr>
</tbody>
</table></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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> length</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> owner</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/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>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
xmlDocDumpMemory (doc, &amp;xmlbody, &amp;len);
return soup_buffer_new_with_owner (xmlbody, len, xmlbody,
                                   (GDestroyNotify)xmlFree);
</pre></div>
<p>
</p>
<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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>data</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>owner</code></em> :</span></p></td>
<td>pointer to an object that owns <em class="parameter"><code>data</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>owner_dnotify</code></em> :</span></p></td>
<td>a function to free/unref <em class="parameter"><code>owner</code></em> when
the buffer is freed. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>.</td>
</tr>
</tbody>
</table></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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> 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>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data. <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><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>data</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>.
Rename to: soup_buffer_new</td>
</tr>
</tbody>
</table></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="/usr/share/gtk-doc/html/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>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>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the owner pointer. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></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 <span class="type">guint8</span> **data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> *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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the pointer
to the buffer data is stored here. <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><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>the length of the buffer data is stored here. <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>
<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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new (or newly-reffed) buffer</td>
</tr>
</tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>
</td>
</tr></tbody>
</table></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="/usr/share/gtk-doc/html/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">const <span class="type">char</span> *<em class="structfield"><code><a name="SoupMessageBody-struct.data"></a>data</code></em>;</span></p></td>
<td>the data</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">goffset</span> <em class="structfield"><code><a name="SoupMessageBody-struct.length"></a>length</code></em>;</span></p></td>
<td>length of <em class="parameter"><code>data</code></em>
</td>
</tr>
</tbody>
</table></div>
</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>.</td>
</tr></tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr></tbody>
</table></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="/usr/share/gtk-doc/html/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="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.) If set to <a href="/usr/share/gtk-doc/html/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="/usr/share/gtk-doc/html/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="/usr/share/gtk-doc/html/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="/usr/share/gtk-doc/html/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>accumulate</code></em> :</span></p></td>
<td>whether or not to accumulate body chunks in <em class="parameter"><code>body</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4.1</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="/usr/share/gtk-doc/html/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the accumulate flag for <em class="parameter"><code>body</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4.1</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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> 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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>use</code></em> :</span></p></td>
<td>how to use <em class="parameter"><code>data</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data to append. <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><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>data</code></em>
</td>
</tr>
</tbody>
</table></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"><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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>
</td>
</tr>
</tbody>
</table></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="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> 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>
Rename to: soup_message_body_append
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data to append. <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><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>data</code></em>
</td>
</tr>
</tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr></tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr></tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>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.)</td>
</tr>
</tbody>
</table></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><span class="type">goffset</span> 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="/usr/share/gtk-doc/html/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
<td>an offset</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
</tbody>
</table></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="/usr/share/gtk-doc/html/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>chunk</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> received from the network</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4.1</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="/usr/share/gtk-doc/html/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>body</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageBody.html" title="SoupMessageBody"><span class="type">SoupMessageBody</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>chunk</code></em> :</span></p></td>
<td>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>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4.1</p>
</div>
</div>
<div class="refsect1">
<a name="SoupMessageBody.see-also"></a><h2>See Also</h2>
<a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>