Soup.MultipartInputStream¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | Gio.FilterInputStream (3), Gio.InputStream (19), GObject.Object (37), Gio.PollableInputStream (4) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(msg, base_stream) | 
| get_headers() | |
| next_part(cancellable) | |
| next_part_async(io_priority, cancellable, callback, *data) | |
| next_part_finish(result) | 
Virtual Methods¶
| Inherited: | Gio.InputStream (9), GObject.Object (7), Gio.PollableInputStream (4) | 
|---|
Properties¶
| Inherited: | Gio.FilterInputStream (2) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| message | Soup.Message | r/w/co | The Soup.Message | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Fields¶
| Inherited: | GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| parent_instance | Gio.FilterInputStream | r | 
Class Details¶
- 
class Soup.MultipartInputStream(**kwargs)¶
- Bases: - Gio.FilterInputStream,- Gio.PollableInputStream- Abstract: - No - Structure: - Soup.MultipartInputStreamClass- 
classmethod new(msg, base_stream)¶
- Parameters: - msg (Soup.Message) – theSoup.Messagethe response is related to.
- base_stream (Gio.InputStream) – theGio.InputStreamreturned by sending the request.
 - Returns: - Return type: - Creates a new - Soup.MultipartInputStreamthat wraps the- Gio.InputStreamobtained by sending the- Soup.Request. Reads should not be done directly through this object, use the input streams returned by- Soup.MultipartInputStream.next_part() or its async counterpart instead.- New in version 2.40. 
- msg (
 - 
get_headers()¶
- Returns: - a - Soup.MessageHeaderscontaining the headers for the part currently being processed or- Noneif the headers failed to parse.- Return type: - Soup.MessageHeadersor- None- Obtains the headers for the part currently being processed. Note that the - Soup.MessageHeadersthat are returned are owned by the- Soup.MultipartInputStreamand will be replaced when a call is made to- Soup.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 - Soup.MessageHeaderswill be returned.- New in version 2.40. 
 - 
next_part(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – a- Gio.Cancellable- Raises: - GLib.Error- Returns: - a new - Gio.InputStream, or- Noneif there are no more parts- Return type: - Gio.InputStreamor- None- Obtains an input stream for the next part. When dealing with a multipart response the input stream needs to be wrapped in a - Soup.MultipartInputStreamand this function or its async counterpart need to be called to obtain the first part for reading.- After calling this function, - Soup.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.- New in version 2.40. 
 - 
next_part_async(io_priority, cancellable, callback, *data)¶
- Parameters: - io_priority (int) – the I/O priority for the request.
- cancellable (Gio.CancellableorNone) – aGio.Cancellable.
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when request is satisfied.
- data (objectorNone) – data for callback
 - Obtains a - Gio.InputStreamfor the next request. See- Soup.MultipartInputStream.next_part() for details on the workflow.- New in version 2.40. 
- io_priority (
 - 
next_part_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult.- Raises: - GLib.Error- Returns: - a newly created - Gio.InputStreamfor reading the next part or- Noneif there are no more parts.- Return type: - Gio.InputStreamor- None- Finishes an asynchronous request for the next part. - New in version 2.40. 
 
- 
classmethod 
Property Details¶
- 
Soup.MultipartInputStream.props.message¶
- Name: - message- Type: - Soup.Message- Default Value: - None- Flags: - READABLE,- WRITABLE,- CONSTRUCT_ONLY- The - Soup.Message