Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- type AttachmentSaveFunc = ByteString -> IO ()
- type AttachmentSaveFunc_WithClosures = ByteString -> Ptr () -> IO ()
- type C_AttachmentSaveFunc = Ptr Word8 -> Word64 -> Ptr () -> Ptr (Ptr GError) -> IO CInt
- drop_closures_AttachmentSaveFunc :: AttachmentSaveFunc -> AttachmentSaveFunc_WithClosures
- dynamic_AttachmentSaveFunc :: (HasCallStack, MonadIO m) => FunPtr C_AttachmentSaveFunc -> ByteString -> Ptr () -> m ()
- mk_AttachmentSaveFunc :: C_AttachmentSaveFunc -> IO (FunPtr C_AttachmentSaveFunc)
- noAttachmentSaveFunc :: Maybe AttachmentSaveFunc
- noAttachmentSaveFunc_WithClosures :: Maybe AttachmentSaveFunc_WithClosures
- type C_MediaSaveFunc = Ptr Word8 -> Word64 -> Ptr () -> Ptr (Ptr GError) -> IO CInt
- type MediaSaveFunc = ByteString -> IO ()
- type MediaSaveFunc_WithClosures = ByteString -> Ptr () -> IO ()
- drop_closures_MediaSaveFunc :: MediaSaveFunc -> MediaSaveFunc_WithClosures
- dynamic_MediaSaveFunc :: (HasCallStack, MonadIO m) => FunPtr C_MediaSaveFunc -> ByteString -> Ptr () -> m ()
- mk_MediaSaveFunc :: C_MediaSaveFunc -> IO (FunPtr C_MediaSaveFunc)
- noMediaSaveFunc :: Maybe MediaSaveFunc
- noMediaSaveFunc_WithClosures :: Maybe MediaSaveFunc_WithClosures
Signals
AttachmentSaveFunc
type AttachmentSaveFunc Source #
= ByteString |
|
-> IO () | Returns: |
Specifies the type of the function passed to
attachmentSaveToCallback
. It is called once for each block of
bytes that is "written" by attachmentSaveToCallback
. If
successful it should return True
. If an error occurs it should set
error
and return False
, in which case attachmentSaveToCallback
will fail with the same error.
type AttachmentSaveFunc_WithClosures Source #
= ByteString |
|
-> Ptr () |
|
-> IO () | Returns: |
Specifies the type of the function passed to
attachmentSaveToCallback
. It is called once for each block of
bytes that is "written" by attachmentSaveToCallback
. If
successful it should return True
. If an error occurs it should set
error
and return False
, in which case attachmentSaveToCallback
will fail with the same error.
type C_AttachmentSaveFunc = Ptr Word8 -> Word64 -> Ptr () -> Ptr (Ptr GError) -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
drop_closures_AttachmentSaveFunc :: AttachmentSaveFunc -> AttachmentSaveFunc_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_AttachmentSaveFunc Source #
:: (HasCallStack, MonadIO m) | |
=> FunPtr C_AttachmentSaveFunc | |
-> ByteString |
|
-> Ptr () |
|
-> m () | (Can throw |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
mk_AttachmentSaveFunc :: C_AttachmentSaveFunc -> IO (FunPtr C_AttachmentSaveFunc) Source #
Generate a function pointer callable from C code, from a C_AttachmentSaveFunc
.
noAttachmentSaveFunc :: Maybe AttachmentSaveFunc Source #
A convenience synonym for
.Nothing
:: Maybe
AttachmentSaveFunc
noAttachmentSaveFunc_WithClosures :: Maybe AttachmentSaveFunc_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
AttachmentSaveFunc_WithClosures
MediaSaveFunc
type C_MediaSaveFunc = Ptr Word8 -> Word64 -> Ptr () -> Ptr (Ptr GError) -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type MediaSaveFunc Source #
= ByteString |
|
-> IO () | Returns: |
Specifies the type of the function passed to
mediaSaveToCallback
. It is called once for each block of
bytes that is "written" by mediaSaveToCallback
. If
successful it should return True
. If an error occurs it should set
error
and return False
, in which case mediaSaveToCallback
will fail with the same error.
Since: 0.14
type MediaSaveFunc_WithClosures Source #
= ByteString |
|
-> Ptr () |
|
-> IO () | Returns: |
Specifies the type of the function passed to
mediaSaveToCallback
. It is called once for each block of
bytes that is "written" by mediaSaveToCallback
. If
successful it should return True
. If an error occurs it should set
error
and return False
, in which case mediaSaveToCallback
will fail with the same error.
Since: 0.14
drop_closures_MediaSaveFunc :: MediaSaveFunc -> MediaSaveFunc_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_MediaSaveFunc Source #
:: (HasCallStack, MonadIO m) | |
=> FunPtr C_MediaSaveFunc | |
-> ByteString |
|
-> Ptr () |
|
-> m () | (Can throw |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
mk_MediaSaveFunc :: C_MediaSaveFunc -> IO (FunPtr C_MediaSaveFunc) Source #
Generate a function pointer callable from C code, from a C_MediaSaveFunc
.
noMediaSaveFunc :: Maybe MediaSaveFunc Source #
A convenience synonym for
.Nothing
:: Maybe
MediaSaveFunc
noMediaSaveFunc_WithClosures :: Maybe MediaSaveFunc_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
MediaSaveFunc_WithClosures