It derives from
<GFilterInputStream>.
Handles streams of multipart messages.
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 MultipartInputStream and use
MultipartInputStream.next_part before reading. Responses which
are not wrapped will be treated like non-multipart responses.
Note that although MultipartInputStream is a
<GInputStream>, you should not read
directly from it, and the results are undefined if you do.
The Message.
Its value is a <SoupMessage>, or #f.
It can only be set when the object is made, with #:message.
Obtains the headers for the part currently being processed.
Note that the MessageHeaders that are returned are owned by the
MultipartInputStream and will be replaced when a call is made to
MultipartInputStream.next_part or its async counterpart, so if
keeping the headers is required, a copy must be made.
Note that if a part had no headers at all an empty MessageHeaders
will be returned.
Passed: a <SoupMultipartInputStream>.
Returned: a <SoupMessageHeaders>, or
#f.
a <SoupMessageHeaders> containing the
headers for the part currently being processed or #f if the
headers failed to parse.
Creates a new MultipartInputStream that wraps the
<GInputStream> obtained by sending the
Message.
Reads should not be done directly through this object, use the input
streams returned by MultipartInputStream.next_part or its async
counterpart instead.
Passed: a <SoupMessage>.
the <SoupMessage> the response is related to.
Passed: a <GInputStream>.
the <GInputStream> returned by sending the
request.
Returned: a
<SoupMultipartInputStream>.
Obtains an input stream for the next part.
When dealing with a multipart response the input stream needs to be
wrapped in a MultipartInputStream and this function or its async
counterpart need to be called to obtain the first part for reading.
After calling this function, MultipartInputStream.get_headers can
be used to obtain the headers for the first part. A read of 0 bytes
indicates the end of the part; a new call to this function should be
done at that point, to obtain the next part.
error will only be set if an error happens during a read,
#f is a valid return value otherwise.
Passed: a <SoupMultipartInputStream>.
Passed, or left out: a <GCancellable>, or
#f.
Returned: a <GInputStream>, or #f.
a new <GInputStream>, or #f if
there are no more parts
Obtains a <GInputStream> for the next
request.
See MultipartInputStream.next_part for details on the workflow.
Passed: a <SoupMultipartInputStream>.
Passed: a 32-bit integer.
the I/O priority for the request.
Passed, or left out: a <GCancellable>, or
#f.
Passed, or left out: a procedure, or #f.
callback to call when request is satisfied.
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data for callback
Finishes an asynchronous request for the next part.
Passed: a <SoupMultipartInputStream>.
Passed: a <GAsyncResult>.
Returned: a <GInputStream>, or #f.
a newly created <GInputStream> for reading
the next part or #f if there are no more parts.