Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype MultipartInputStream = MultipartInputStream (ManagedPtr MultipartInputStream)
- class (GObject o, IsDescendantOf MultipartInputStream o) => IsMultipartInputStream o
- toMultipartInputStream :: (MonadIO m, IsMultipartInputStream o) => o -> m MultipartInputStream
- multipartInputStreamGetHeaders :: (HasCallStack, MonadIO m, IsMultipartInputStream a) => a -> m (Maybe MessageHeaders)
- multipartInputStreamNew :: (HasCallStack, MonadIO m, IsMessage a, IsInputStream b) => a -> b -> m MultipartInputStream
- multipartInputStreamNextPart :: (HasCallStack, MonadIO m, IsMultipartInputStream a, IsCancellable b) => a -> Maybe b -> m (Maybe InputStream)
- multipartInputStreamNextPartAsync :: (HasCallStack, MonadIO m, IsMultipartInputStream a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- multipartInputStreamNextPartFinish :: (HasCallStack, MonadIO m, IsMultipartInputStream a, IsAsyncResult b) => a -> b -> m (Maybe InputStream)
- constructMultipartInputStreamMessage :: (IsMultipartInputStream o, MonadIO m, IsMessage a) => a -> m (GValueConstruct o)
- getMultipartInputStreamMessage :: (MonadIO m, IsMultipartInputStream o) => o -> m (Maybe Message)
Exported types
newtype MultipartInputStream Source #
Memory-managed wrapper type.
MultipartInputStream (ManagedPtr MultipartInputStream) |
Instances
class (GObject o, IsDescendantOf MultipartInputStream o) => IsMultipartInputStream o Source #
Type class for types which can be safely cast to MultipartInputStream
, for instance with toMultipartInputStream
.
Instances
(GObject o, IsDescendantOf MultipartInputStream o) => IsMultipartInputStream o Source # | |
Defined in GI.Soup.Objects.MultipartInputStream |
toMultipartInputStream :: (MonadIO m, IsMultipartInputStream o) => o -> m MultipartInputStream Source #
Cast to MultipartInputStream
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Overloaded methods
getHeaders
multipartInputStreamGetHeaders Source #
:: (HasCallStack, MonadIO m, IsMultipartInputStream a) | |
=> a |
|
-> m (Maybe MessageHeaders) | Returns: a |
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 multipartInputStreamNextPart
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.
Since: 2.40
new
multipartInputStreamNew Source #
:: (HasCallStack, MonadIO m, IsMessage a, IsInputStream b) | |
=> a |
|
-> b |
|
-> m MultipartInputStream | Returns: a new |
Creates a new MultipartInputStream
that wraps the
InputStream
obtained by sending the Request
. Reads should
not be done directly through this object, use the input streams
returned by multipartInputStreamNextPart
or its async
counterpart instead.
Since: 2.40
nextPart
multipartInputStreamNextPart Source #
:: (HasCallStack, MonadIO m, IsMultipartInputStream a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m (Maybe InputStream) | Returns: a new |
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,
multipartInputStreamGetHeaders
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.
Since: 2.40
nextPartAsync
multipartInputStreamNextPartAsync Source #
:: (HasCallStack, MonadIO m, IsMultipartInputStream a, IsCancellable b) | |
=> a |
|
-> Int32 |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Obtains a InputStream
for the next request. See
multipartInputStreamNextPart
for details on the
workflow.
Since: 2.40
nextPartFinish
multipartInputStreamNextPartFinish Source #
:: (HasCallStack, MonadIO m, IsMultipartInputStream a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m (Maybe InputStream) | Returns: a newly created
|
Finishes an asynchronous request for the next part.
Since: 2.40
Properties
message
No description available in the introspection data.
constructMultipartInputStreamMessage :: (IsMultipartInputStream o, MonadIO m, IsMessage a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “message
” property. This is rarely needed directly, but it is used by new
.
getMultipartInputStreamMessage :: (MonadIO m, IsMultipartInputStream o) => o -> m (Maybe Message) Source #
Get the value of the “message
” property.
When overloading is enabled, this is equivalent to
get
multipartInputStream #message