MultipartInputStream

This adds support for the multipart responses. For handling the multiple parts the user needs to wrap the #GInputStream obtained by sending the request with a #SoupMultipartInputStream and use soup_multipart_input_stream_next_part() before reading. Responses which are not wrapped will be treated like non-multipart responses.

Note that although #SoupMultipartInputStream is a #GInputStream, you should not read directly from it, and the results are undefined if you do.

Constructors

this
this(SoupMultipartInputStream* soupMultipartInputStream, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(Message msg, InputStream baseStream)

Creates a new #SoupMultipartInputStream that wraps the #GInputStream obtained by sending the #SoupRequest. Reads should not be done directly through this object, use the input streams returned by soup_multipart_input_stream_next_part() or its async counterpart instead.

Members

Functions

getHeaders
MessageHeaders getHeaders()

Obtains the headers for the part currently being processed. Note that the #SoupMessageHeaders that are returned are owned by the #SoupMultipartInputStream and will be replaced when a call is made to soup_multipart_input_stream_next_part() or its async counterpart, so if keeping the headers is required, a copy must be made.

getMultipartInputStreamStruct
SoupMultipartInputStream* getMultipartInputStreamStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

nextPart
InputStream nextPart(Cancellable cancellable)

Obtains an input stream for the next part. When dealing with a multipart response the input stream needs to be wrapped in a #SoupMultipartInputStream and this function or its async counterpart need to be called to obtain the first part for reading.

nextPartAsync
void nextPartAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* data)

Obtains a #GInputStream for the next request. See soup_multipart_input_stream_next_part() for details on the workflow.

nextPartFinish
InputStream nextPartFinish(AsyncResultIF result)

Finishes an asynchronous request for the next part.

Mixins

__anonymous
mixin PollableInputStreamT!(SoupMultipartInputStream)
Undocumented in source.

Static functions

getType
GType getType()

Variables

soupMultipartInputStream
SoupMultipartInputStream* soupMultipartInputStream;

the main Gtk struct

Meta

Since

2.40