| Copyright | (c) 2023-2024 Apotheca Labs (c) 2024-2025 Haskell Foundation |
|---|---|
| License | BSD-3-Clause |
| Maintainer | joris@well-typed.com, leo@apotheca.io |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | GHC2021 |
Botan.Bindings.View
Contents
Description
This module is based on the View Functions section of the C Botan FFI documentation.
Synopsis
- type BotanViewContext a = Ptr a
- type BotanViewBinFn ctx = BotanViewContext ctx -> ConstPtr Word8 -> CSize -> CInt
- type BotanViewBinCallback ctx = FunPtr (BotanViewBinFn ctx)
- mallocBotanViewBinCallback :: BotanViewBinFn ctx -> IO (BotanViewBinCallback ctx)
- freeBotanViewBinCallback :: BotanViewBinCallback ctx -> IO ()
- type BotanViewStrFn ctx = BotanViewContext ctx -> ConstPtr CChar -> CSize -> CInt
- type BotanViewStrCallback ctx = FunPtr (BotanViewStrFn ctx)
- mallocBotanViewStrCallback :: BotanViewStrFn ctx -> IO (BotanViewStrCallback ctx)
- freeBotanViewStrCallback :: BotanViewStrCallback ctx -> IO ()
Documentation
type BotanViewContext a = Ptr a Source #
View binary
type BotanViewBinFn ctx Source #
Arguments
| = BotanViewContext ctx | view_ctx: some application context |
| -> ConstPtr Word8 | data: the binary data |
| -> CSize | len: the length of data in bytes |
| -> CInt |
type BotanViewBinCallback ctx = FunPtr (BotanViewBinFn ctx) Source #
mallocBotanViewBinCallback :: BotanViewBinFn ctx -> IO (BotanViewBinCallback ctx) Source #
freeBotanViewBinCallback :: BotanViewBinCallback ctx -> IO () Source #
View string
type BotanViewStrFn ctx Source #
Arguments
| = BotanViewContext ctx | view_ctx: some application context |
| -> ConstPtr CChar | str: the null terminated string |
| -> CSize | len: the length of string *including* the null terminator |
| -> CInt |
type BotanViewStrCallback ctx = FunPtr (BotanViewStrFn ctx) Source #
mallocBotanViewStrCallback :: BotanViewStrFn ctx -> IO (BotanViewStrCallback ctx) Source #
freeBotanViewStrCallback :: BotanViewStrCallback ctx -> IO () Source #