Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- Signals
- AddressCallback
- AuthDomainBasicAuthCallback
- AuthDomainDigestAuthCallback
- AuthDomainFilter
- AuthDomainGenericAuthCallback
- ChunkAllocator
- LoggerFilter
- LoggerPrinter
- MessageHeadersForeachFunc
- PasswordManagerCallback
- ProxyResolverCallback
- ProxyURIResolverCallback
- ServerCallback
- ServerWebsocketCallback
- SessionCallback
- SessionConnectProgressCallback
- SocketCallback
Synopsis
- type AddressCallback = Address -> Word32 -> IO ()
- type AddressCallback_WithClosures = Address -> Word32 -> Ptr () -> IO ()
- type C_AddressCallback = Ptr Address -> Word32 -> Ptr () -> IO ()
- drop_closures_AddressCallback :: AddressCallback -> AddressCallback_WithClosures
- dynamic_AddressCallback :: (HasCallStack, MonadIO m, IsAddress a) => FunPtr C_AddressCallback -> a -> Word32 -> Ptr () -> m ()
- genClosure_AddressCallback :: MonadIO m => AddressCallback -> m (GClosure C_AddressCallback)
- mk_AddressCallback :: C_AddressCallback -> IO (FunPtr C_AddressCallback)
- noAddressCallback :: Maybe AddressCallback
- noAddressCallback_WithClosures :: Maybe AddressCallback_WithClosures
- wrap_AddressCallback :: Maybe (Ptr (FunPtr C_AddressCallback)) -> AddressCallback_WithClosures -> C_AddressCallback
- type AuthDomainBasicAuthCallback = AuthDomainBasic -> Message -> Text -> Text -> IO Bool
- type AuthDomainBasicAuthCallback_WithClosures = AuthDomainBasic -> Message -> Text -> Text -> Ptr () -> IO Bool
- type C_AuthDomainBasicAuthCallback = Ptr AuthDomainBasic -> Ptr Message -> CString -> CString -> Ptr () -> IO CInt
- drop_closures_AuthDomainBasicAuthCallback :: AuthDomainBasicAuthCallback -> AuthDomainBasicAuthCallback_WithClosures
- dynamic_AuthDomainBasicAuthCallback :: (HasCallStack, MonadIO m, IsAuthDomainBasic a, IsMessage b) => FunPtr C_AuthDomainBasicAuthCallback -> a -> b -> Text -> Text -> Ptr () -> m Bool
- genClosure_AuthDomainBasicAuthCallback :: MonadIO m => AuthDomainBasicAuthCallback -> m (GClosure C_AuthDomainBasicAuthCallback)
- mk_AuthDomainBasicAuthCallback :: C_AuthDomainBasicAuthCallback -> IO (FunPtr C_AuthDomainBasicAuthCallback)
- noAuthDomainBasicAuthCallback :: Maybe AuthDomainBasicAuthCallback
- noAuthDomainBasicAuthCallback_WithClosures :: Maybe AuthDomainBasicAuthCallback_WithClosures
- wrap_AuthDomainBasicAuthCallback :: Maybe (Ptr (FunPtr C_AuthDomainBasicAuthCallback)) -> AuthDomainBasicAuthCallback_WithClosures -> C_AuthDomainBasicAuthCallback
- type AuthDomainDigestAuthCallback = AuthDomainDigest -> Message -> Text -> IO (Maybe Text)
- type AuthDomainDigestAuthCallback_WithClosures = AuthDomainDigest -> Message -> Text -> Ptr () -> IO (Maybe Text)
- type C_AuthDomainDigestAuthCallback = Ptr AuthDomainDigest -> Ptr Message -> CString -> Ptr () -> IO CString
- drop_closures_AuthDomainDigestAuthCallback :: AuthDomainDigestAuthCallback -> AuthDomainDigestAuthCallback_WithClosures
- dynamic_AuthDomainDigestAuthCallback :: (HasCallStack, MonadIO m, IsAuthDomainDigest a, IsMessage b) => FunPtr C_AuthDomainDigestAuthCallback -> a -> b -> Text -> Ptr () -> m (Maybe Text)
- genClosure_AuthDomainDigestAuthCallback :: MonadIO m => AuthDomainDigestAuthCallback -> m (GClosure C_AuthDomainDigestAuthCallback)
- mk_AuthDomainDigestAuthCallback :: C_AuthDomainDigestAuthCallback -> IO (FunPtr C_AuthDomainDigestAuthCallback)
- noAuthDomainDigestAuthCallback :: Maybe AuthDomainDigestAuthCallback
- noAuthDomainDigestAuthCallback_WithClosures :: Maybe AuthDomainDigestAuthCallback_WithClosures
- wrap_AuthDomainDigestAuthCallback :: Maybe (Ptr (FunPtr C_AuthDomainDigestAuthCallback)) -> AuthDomainDigestAuthCallback_WithClosures -> C_AuthDomainDigestAuthCallback
- type AuthDomainFilter = AuthDomain -> Message -> IO Bool
- type AuthDomainFilter_WithClosures = AuthDomain -> Message -> Ptr () -> IO Bool
- type C_AuthDomainFilter = Ptr AuthDomain -> Ptr Message -> Ptr () -> IO CInt
- drop_closures_AuthDomainFilter :: AuthDomainFilter -> AuthDomainFilter_WithClosures
- dynamic_AuthDomainFilter :: (HasCallStack, MonadIO m, IsAuthDomain a, IsMessage b) => FunPtr C_AuthDomainFilter -> a -> b -> Ptr () -> m Bool
- genClosure_AuthDomainFilter :: MonadIO m => AuthDomainFilter -> m (GClosure C_AuthDomainFilter)
- mk_AuthDomainFilter :: C_AuthDomainFilter -> IO (FunPtr C_AuthDomainFilter)
- noAuthDomainFilter :: Maybe AuthDomainFilter
- noAuthDomainFilter_WithClosures :: Maybe AuthDomainFilter_WithClosures
- wrap_AuthDomainFilter :: Maybe (Ptr (FunPtr C_AuthDomainFilter)) -> AuthDomainFilter_WithClosures -> C_AuthDomainFilter
- type AuthDomainGenericAuthCallback = AuthDomain -> Message -> Text -> IO Bool
- type AuthDomainGenericAuthCallback_WithClosures = AuthDomain -> Message -> Text -> Ptr () -> IO Bool
- type C_AuthDomainGenericAuthCallback = Ptr AuthDomain -> Ptr Message -> CString -> Ptr () -> IO CInt
- drop_closures_AuthDomainGenericAuthCallback :: AuthDomainGenericAuthCallback -> AuthDomainGenericAuthCallback_WithClosures
- dynamic_AuthDomainGenericAuthCallback :: (HasCallStack, MonadIO m, IsAuthDomain a, IsMessage b) => FunPtr C_AuthDomainGenericAuthCallback -> a -> b -> Text -> Ptr () -> m Bool
- genClosure_AuthDomainGenericAuthCallback :: MonadIO m => AuthDomainGenericAuthCallback -> m (GClosure C_AuthDomainGenericAuthCallback)
- mk_AuthDomainGenericAuthCallback :: C_AuthDomainGenericAuthCallback -> IO (FunPtr C_AuthDomainGenericAuthCallback)
- noAuthDomainGenericAuthCallback :: Maybe AuthDomainGenericAuthCallback
- noAuthDomainGenericAuthCallback_WithClosures :: Maybe AuthDomainGenericAuthCallback_WithClosures
- wrap_AuthDomainGenericAuthCallback :: Maybe (Ptr (FunPtr C_AuthDomainGenericAuthCallback)) -> AuthDomainGenericAuthCallback_WithClosures -> C_AuthDomainGenericAuthCallback
- type C_ChunkAllocator = Ptr Message -> Word64 -> Ptr () -> IO (Ptr Buffer)
- type ChunkAllocator = Message -> Word64 -> IO (Maybe Buffer)
- type ChunkAllocator_WithClosures = Message -> Word64 -> Ptr () -> IO (Maybe Buffer)
- drop_closures_ChunkAllocator :: ChunkAllocator -> ChunkAllocator_WithClosures
- dynamic_ChunkAllocator :: (HasCallStack, MonadIO m, IsMessage a) => FunPtr C_ChunkAllocator -> a -> Word64 -> Ptr () -> m (Maybe Buffer)
- genClosure_ChunkAllocator :: MonadIO m => ChunkAllocator -> m (GClosure C_ChunkAllocator)
- mk_ChunkAllocator :: C_ChunkAllocator -> IO (FunPtr C_ChunkAllocator)
- noChunkAllocator :: Maybe ChunkAllocator
- noChunkAllocator_WithClosures :: Maybe ChunkAllocator_WithClosures
- wrap_ChunkAllocator :: Maybe (Ptr (FunPtr C_ChunkAllocator)) -> ChunkAllocator_WithClosures -> C_ChunkAllocator
- type C_LoggerFilter = Ptr Logger -> Ptr Message -> Ptr () -> IO CUInt
- type LoggerFilter = Logger -> Message -> IO LoggerLogLevel
- type LoggerFilter_WithClosures = Logger -> Message -> Ptr () -> IO LoggerLogLevel
- drop_closures_LoggerFilter :: LoggerFilter -> LoggerFilter_WithClosures
- dynamic_LoggerFilter :: (HasCallStack, MonadIO m, IsLogger a, IsMessage b) => FunPtr C_LoggerFilter -> a -> b -> Ptr () -> m LoggerLogLevel
- genClosure_LoggerFilter :: MonadIO m => LoggerFilter -> m (GClosure C_LoggerFilter)
- mk_LoggerFilter :: C_LoggerFilter -> IO (FunPtr C_LoggerFilter)
- noLoggerFilter :: Maybe LoggerFilter
- noLoggerFilter_WithClosures :: Maybe LoggerFilter_WithClosures
- wrap_LoggerFilter :: Maybe (Ptr (FunPtr C_LoggerFilter)) -> LoggerFilter_WithClosures -> C_LoggerFilter
- type C_LoggerPrinter = Ptr Logger -> CUInt -> Int8 -> CString -> Ptr () -> IO ()
- type LoggerPrinter = Logger -> LoggerLogLevel -> Int8 -> Text -> IO ()
- type LoggerPrinter_WithClosures = Logger -> LoggerLogLevel -> Int8 -> Text -> Ptr () -> IO ()
- drop_closures_LoggerPrinter :: LoggerPrinter -> LoggerPrinter_WithClosures
- dynamic_LoggerPrinter :: (HasCallStack, MonadIO m, IsLogger a) => FunPtr C_LoggerPrinter -> a -> LoggerLogLevel -> Int8 -> Text -> Ptr () -> m ()
- genClosure_LoggerPrinter :: MonadIO m => LoggerPrinter -> m (GClosure C_LoggerPrinter)
- mk_LoggerPrinter :: C_LoggerPrinter -> IO (FunPtr C_LoggerPrinter)
- noLoggerPrinter :: Maybe LoggerPrinter
- noLoggerPrinter_WithClosures :: Maybe LoggerPrinter_WithClosures
- wrap_LoggerPrinter :: Maybe (Ptr (FunPtr C_LoggerPrinter)) -> LoggerPrinter_WithClosures -> C_LoggerPrinter
- type C_MessageHeadersForeachFunc = CString -> CString -> Ptr () -> IO ()
- type MessageHeadersForeachFunc = Text -> Text -> IO ()
- type MessageHeadersForeachFunc_WithClosures = Text -> Text -> Ptr () -> IO ()
- drop_closures_MessageHeadersForeachFunc :: MessageHeadersForeachFunc -> MessageHeadersForeachFunc_WithClosures
- dynamic_MessageHeadersForeachFunc :: (HasCallStack, MonadIO m) => FunPtr C_MessageHeadersForeachFunc -> Text -> Text -> Ptr () -> m ()
- genClosure_MessageHeadersForeachFunc :: MonadIO m => MessageHeadersForeachFunc -> m (GClosure C_MessageHeadersForeachFunc)
- mk_MessageHeadersForeachFunc :: C_MessageHeadersForeachFunc -> IO (FunPtr C_MessageHeadersForeachFunc)
- noMessageHeadersForeachFunc :: Maybe MessageHeadersForeachFunc
- noMessageHeadersForeachFunc_WithClosures :: Maybe MessageHeadersForeachFunc_WithClosures
- wrap_MessageHeadersForeachFunc :: Maybe (Ptr (FunPtr C_MessageHeadersForeachFunc)) -> MessageHeadersForeachFunc_WithClosures -> C_MessageHeadersForeachFunc
- type C_PasswordManagerCallback = Ptr PasswordManager -> Ptr Message -> Ptr Auth -> CInt -> Ptr () -> IO ()
- type PasswordManagerCallback = PasswordManager -> Message -> Auth -> Bool -> IO ()
- type PasswordManagerCallback_WithClosures = PasswordManager -> Message -> Auth -> Bool -> Ptr () -> IO ()
- drop_closures_PasswordManagerCallback :: PasswordManagerCallback -> PasswordManagerCallback_WithClosures
- dynamic_PasswordManagerCallback :: (HasCallStack, MonadIO m, IsPasswordManager a, IsMessage b, IsAuth c) => FunPtr C_PasswordManagerCallback -> a -> b -> c -> Bool -> Ptr () -> m ()
- genClosure_PasswordManagerCallback :: MonadIO m => PasswordManagerCallback -> m (GClosure C_PasswordManagerCallback)
- mk_PasswordManagerCallback :: C_PasswordManagerCallback -> IO (FunPtr C_PasswordManagerCallback)
- noPasswordManagerCallback :: Maybe PasswordManagerCallback
- noPasswordManagerCallback_WithClosures :: Maybe PasswordManagerCallback_WithClosures
- wrap_PasswordManagerCallback :: Maybe (Ptr (FunPtr C_PasswordManagerCallback)) -> PasswordManagerCallback_WithClosures -> C_PasswordManagerCallback
- type C_ProxyResolverCallback = Ptr ProxyResolver -> Ptr Message -> Word32 -> Ptr Address -> Ptr () -> IO ()
- type ProxyResolverCallback = ProxyResolver -> Message -> Word32 -> Address -> IO ()
- type ProxyResolverCallback_WithClosures = ProxyResolver -> Message -> Word32 -> Address -> Ptr () -> IO ()
- drop_closures_ProxyResolverCallback :: ProxyResolverCallback -> ProxyResolverCallback_WithClosures
- dynamic_ProxyResolverCallback :: (HasCallStack, MonadIO m, IsProxyResolver a, IsMessage b, IsAddress c) => FunPtr C_ProxyResolverCallback -> a -> b -> Word32 -> c -> Ptr () -> m ()
- genClosure_ProxyResolverCallback :: MonadIO m => ProxyResolverCallback -> m (GClosure C_ProxyResolverCallback)
- mk_ProxyResolverCallback :: C_ProxyResolverCallback -> IO (FunPtr C_ProxyResolverCallback)
- noProxyResolverCallback :: Maybe ProxyResolverCallback
- noProxyResolverCallback_WithClosures :: Maybe ProxyResolverCallback_WithClosures
- wrap_ProxyResolverCallback :: Maybe (Ptr (FunPtr C_ProxyResolverCallback)) -> ProxyResolverCallback_WithClosures -> C_ProxyResolverCallback
- type C_ProxyURIResolverCallback = Ptr ProxyURIResolver -> Word32 -> Ptr URI -> Ptr () -> IO ()
- type ProxyURIResolverCallback = ProxyURIResolver -> Word32 -> URI -> IO ()
- type ProxyURIResolverCallback_WithClosures = ProxyURIResolver -> Word32 -> URI -> Ptr () -> IO ()
- drop_closures_ProxyURIResolverCallback :: ProxyURIResolverCallback -> ProxyURIResolverCallback_WithClosures
- dynamic_ProxyURIResolverCallback :: (HasCallStack, MonadIO m, IsProxyURIResolver a) => FunPtr C_ProxyURIResolverCallback -> a -> Word32 -> URI -> Ptr () -> m ()
- genClosure_ProxyURIResolverCallback :: MonadIO m => ProxyURIResolverCallback -> m (GClosure C_ProxyURIResolverCallback)
- mk_ProxyURIResolverCallback :: C_ProxyURIResolverCallback -> IO (FunPtr C_ProxyURIResolverCallback)
- noProxyURIResolverCallback :: Maybe ProxyURIResolverCallback
- noProxyURIResolverCallback_WithClosures :: Maybe ProxyURIResolverCallback_WithClosures
- wrap_ProxyURIResolverCallback :: Maybe (Ptr (FunPtr C_ProxyURIResolverCallback)) -> ProxyURIResolverCallback_WithClosures -> C_ProxyURIResolverCallback
- type C_ServerCallback = Ptr Server -> Ptr Message -> CString -> Ptr (GHashTable CString CString) -> Ptr ClientContext -> Ptr () -> IO ()
- type ServerCallback = Server -> Message -> Text -> Maybe (Map Text Text) -> ClientContext -> IO ()
- type ServerCallback_WithClosures = Server -> Message -> Text -> Maybe (Map Text Text) -> ClientContext -> Ptr () -> IO ()
- drop_closures_ServerCallback :: ServerCallback -> ServerCallback_WithClosures
- dynamic_ServerCallback :: (HasCallStack, MonadIO m, IsServer a, IsMessage b) => FunPtr C_ServerCallback -> a -> b -> Text -> Maybe (Map Text Text) -> ClientContext -> Ptr () -> m ()
- genClosure_ServerCallback :: MonadIO m => ServerCallback -> m (GClosure C_ServerCallback)
- mk_ServerCallback :: C_ServerCallback -> IO (FunPtr C_ServerCallback)
- noServerCallback :: Maybe ServerCallback
- noServerCallback_WithClosures :: Maybe ServerCallback_WithClosures
- wrap_ServerCallback :: Maybe (Ptr (FunPtr C_ServerCallback)) -> ServerCallback_WithClosures -> C_ServerCallback
- type C_ServerWebsocketCallback = Ptr Server -> Ptr WebsocketConnection -> CString -> Ptr ClientContext -> Ptr () -> IO ()
- type ServerWebsocketCallback = Server -> WebsocketConnection -> Text -> ClientContext -> IO ()
- type ServerWebsocketCallback_WithClosures = Server -> WebsocketConnection -> Text -> ClientContext -> Ptr () -> IO ()
- drop_closures_ServerWebsocketCallback :: ServerWebsocketCallback -> ServerWebsocketCallback_WithClosures
- dynamic_ServerWebsocketCallback :: (HasCallStack, MonadIO m, IsServer a, IsWebsocketConnection b) => FunPtr C_ServerWebsocketCallback -> a -> b -> Text -> ClientContext -> Ptr () -> m ()
- genClosure_ServerWebsocketCallback :: MonadIO m => ServerWebsocketCallback -> m (GClosure C_ServerWebsocketCallback)
- mk_ServerWebsocketCallback :: C_ServerWebsocketCallback -> IO (FunPtr C_ServerWebsocketCallback)
- noServerWebsocketCallback :: Maybe ServerWebsocketCallback
- noServerWebsocketCallback_WithClosures :: Maybe ServerWebsocketCallback_WithClosures
- wrap_ServerWebsocketCallback :: Maybe (Ptr (FunPtr C_ServerWebsocketCallback)) -> ServerWebsocketCallback_WithClosures -> C_ServerWebsocketCallback
- type C_SessionCallback = Ptr Session -> Ptr Message -> Ptr () -> IO ()
- type SessionCallback = Session -> Message -> IO ()
- type SessionCallback_WithClosures = Session -> Message -> Ptr () -> IO ()
- drop_closures_SessionCallback :: SessionCallback -> SessionCallback_WithClosures
- dynamic_SessionCallback :: (HasCallStack, MonadIO m, IsSession a, IsMessage b) => FunPtr C_SessionCallback -> a -> b -> Ptr () -> m ()
- genClosure_SessionCallback :: MonadIO m => SessionCallback -> m (GClosure C_SessionCallback)
- mk_SessionCallback :: C_SessionCallback -> IO (FunPtr C_SessionCallback)
- noSessionCallback :: Maybe SessionCallback
- noSessionCallback_WithClosures :: Maybe SessionCallback_WithClosures
- wrap_SessionCallback :: Maybe (Ptr (FunPtr C_SessionCallback)) -> SessionCallback_WithClosures -> C_SessionCallback
- type C_SessionConnectProgressCallback = Ptr Session -> CUInt -> Ptr IOStream -> Ptr () -> IO ()
- type SessionConnectProgressCallback = Session -> SocketClientEvent -> IOStream -> IO ()
- type SessionConnectProgressCallback_WithClosures = Session -> SocketClientEvent -> IOStream -> Ptr () -> IO ()
- drop_closures_SessionConnectProgressCallback :: SessionConnectProgressCallback -> SessionConnectProgressCallback_WithClosures
- dynamic_SessionConnectProgressCallback :: (HasCallStack, MonadIO m, IsSession a, IsIOStream b) => FunPtr C_SessionConnectProgressCallback -> a -> SocketClientEvent -> b -> Ptr () -> m ()
- genClosure_SessionConnectProgressCallback :: MonadIO m => SessionConnectProgressCallback -> m (GClosure C_SessionConnectProgressCallback)
- mk_SessionConnectProgressCallback :: C_SessionConnectProgressCallback -> IO (FunPtr C_SessionConnectProgressCallback)
- noSessionConnectProgressCallback :: Maybe SessionConnectProgressCallback
- noSessionConnectProgressCallback_WithClosures :: Maybe SessionConnectProgressCallback_WithClosures
- wrap_SessionConnectProgressCallback :: Maybe (Ptr (FunPtr C_SessionConnectProgressCallback)) -> SessionConnectProgressCallback_WithClosures -> C_SessionConnectProgressCallback
- type C_SocketCallback = Ptr Socket -> Word32 -> Ptr () -> IO ()
- type SocketCallback = Socket -> Word32 -> IO ()
- type SocketCallback_WithClosures = Socket -> Word32 -> Ptr () -> IO ()
- drop_closures_SocketCallback :: SocketCallback -> SocketCallback_WithClosures
- dynamic_SocketCallback :: (HasCallStack, MonadIO m, IsSocket a) => FunPtr C_SocketCallback -> a -> Word32 -> Ptr () -> m ()
- genClosure_SocketCallback :: MonadIO m => SocketCallback -> m (GClosure C_SocketCallback)
- mk_SocketCallback :: C_SocketCallback -> IO (FunPtr C_SocketCallback)
- noSocketCallback :: Maybe SocketCallback
- noSocketCallback_WithClosures :: Maybe SocketCallback_WithClosures
- wrap_SocketCallback :: Maybe (Ptr (FunPtr C_SocketCallback)) -> SocketCallback_WithClosures -> C_SocketCallback
Signals
AddressCallback
type AddressCallback Source #
= Address |
|
-> Word32 |
|
-> IO () |
The callback function passed to addressResolveAsync
.
type AddressCallback_WithClosures Source #
= Address |
|
-> Word32 |
|
-> Ptr () |
|
-> IO () |
The callback function passed to addressResolveAsync
.
type C_AddressCallback = Ptr Address -> Word32 -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
drop_closures_AddressCallback :: AddressCallback -> AddressCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_AddressCallback Source #
:: (HasCallStack, MonadIO m, IsAddress a) | |
=> FunPtr C_AddressCallback | |
-> a |
|
-> Word32 |
|
-> Ptr () |
|
-> m () |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_AddressCallback :: MonadIO m => AddressCallback -> m (GClosure C_AddressCallback) Source #
Wrap the callback into a GClosure
.
mk_AddressCallback :: C_AddressCallback -> IO (FunPtr C_AddressCallback) Source #
Generate a function pointer callable from C code, from a C_AddressCallback
.
noAddressCallback :: Maybe AddressCallback Source #
A convenience synonym for
.Nothing
:: Maybe
AddressCallback
noAddressCallback_WithClosures :: Maybe AddressCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
AddressCallback_WithClosures
wrap_AddressCallback :: Maybe (Ptr (FunPtr C_AddressCallback)) -> AddressCallback_WithClosures -> C_AddressCallback Source #
Wrap a AddressCallback
into a C_AddressCallback
.
AuthDomainBasicAuthCallback
type AuthDomainBasicAuthCallback Source #
= AuthDomainBasic |
|
-> Message |
|
-> Text |
|
-> Text |
|
-> IO Bool | Returns: |
Callback used by AuthDomainBasic
for authentication purposes.
The application should verify that username
and password
and valid
and return True
or False
.
If you are maintaining your own password database (rather than using the password to authenticate against some other system like PAM or a remote server), you should make sure you know what you are doing. In particular, don't store cleartext passwords, or easily-computed hashes of cleartext passwords, even if you don't care that much about the security of your server, because users will frequently use the same password for multiple sites, and so compromising any site with a cleartext (or easily-cracked) password database may give attackers access to other more-interesting sites as well.
type AuthDomainBasicAuthCallback_WithClosures Source #
= AuthDomainBasic |
|
-> Message |
|
-> Text |
|
-> Text |
|
-> Ptr () |
|
-> IO Bool | Returns: |
Callback used by AuthDomainBasic
for authentication purposes.
The application should verify that username
and password
and valid
and return True
or False
.
If you are maintaining your own password database (rather than using the password to authenticate against some other system like PAM or a remote server), you should make sure you know what you are doing. In particular, don't store cleartext passwords, or easily-computed hashes of cleartext passwords, even if you don't care that much about the security of your server, because users will frequently use the same password for multiple sites, and so compromising any site with a cleartext (or easily-cracked) password database may give attackers access to other more-interesting sites as well.
type C_AuthDomainBasicAuthCallback = Ptr AuthDomainBasic -> Ptr Message -> CString -> CString -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
drop_closures_AuthDomainBasicAuthCallback :: AuthDomainBasicAuthCallback -> AuthDomainBasicAuthCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_AuthDomainBasicAuthCallback Source #
:: (HasCallStack, MonadIO m, IsAuthDomainBasic a, IsMessage b) | |
=> FunPtr C_AuthDomainBasicAuthCallback | |
-> a |
|
-> b |
|
-> Text |
|
-> Text |
|
-> Ptr () |
|
-> m Bool | Returns: |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_AuthDomainBasicAuthCallback :: MonadIO m => AuthDomainBasicAuthCallback -> m (GClosure C_AuthDomainBasicAuthCallback) Source #
Wrap the callback into a GClosure
.
mk_AuthDomainBasicAuthCallback :: C_AuthDomainBasicAuthCallback -> IO (FunPtr C_AuthDomainBasicAuthCallback) Source #
Generate a function pointer callable from C code, from a C_AuthDomainBasicAuthCallback
.
noAuthDomainBasicAuthCallback :: Maybe AuthDomainBasicAuthCallback Source #
A convenience synonym for
.Nothing
:: Maybe
AuthDomainBasicAuthCallback
noAuthDomainBasicAuthCallback_WithClosures :: Maybe AuthDomainBasicAuthCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
AuthDomainBasicAuthCallback_WithClosures
wrap_AuthDomainBasicAuthCallback :: Maybe (Ptr (FunPtr C_AuthDomainBasicAuthCallback)) -> AuthDomainBasicAuthCallback_WithClosures -> C_AuthDomainBasicAuthCallback Source #
Wrap a AuthDomainBasicAuthCallback
into a C_AuthDomainBasicAuthCallback
.
AuthDomainDigestAuthCallback
type AuthDomainDigestAuthCallback Source #
= AuthDomainDigest |
|
-> Message |
|
-> Text |
|
-> IO (Maybe Text) | Returns: the encoded password, or |
Callback used by AuthDomainDigest
for authentication purposes.
The application should look up username
in its password database,
and return the corresponding encoded password (see
authDomainDigestEncodePassword
).
type AuthDomainDigestAuthCallback_WithClosures Source #
= AuthDomainDigest |
|
-> Message |
|
-> Text |
|
-> Ptr () |
|
-> IO (Maybe Text) | Returns: the encoded password, or |
Callback used by AuthDomainDigest
for authentication purposes.
The application should look up username
in its password database,
and return the corresponding encoded password (see
authDomainDigestEncodePassword
).
type C_AuthDomainDigestAuthCallback = Ptr AuthDomainDigest -> Ptr Message -> CString -> Ptr () -> IO CString Source #
Type for the callback on the (unwrapped) C side.
drop_closures_AuthDomainDigestAuthCallback :: AuthDomainDigestAuthCallback -> AuthDomainDigestAuthCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_AuthDomainDigestAuthCallback Source #
:: (HasCallStack, MonadIO m, IsAuthDomainDigest a, IsMessage b) | |
=> FunPtr C_AuthDomainDigestAuthCallback | |
-> a |
|
-> b |
|
-> Text |
|
-> Ptr () |
|
-> m (Maybe Text) | Returns: the encoded password, or |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_AuthDomainDigestAuthCallback :: MonadIO m => AuthDomainDigestAuthCallback -> m (GClosure C_AuthDomainDigestAuthCallback) Source #
Wrap the callback into a GClosure
.
mk_AuthDomainDigestAuthCallback :: C_AuthDomainDigestAuthCallback -> IO (FunPtr C_AuthDomainDigestAuthCallback) Source #
Generate a function pointer callable from C code, from a C_AuthDomainDigestAuthCallback
.
noAuthDomainDigestAuthCallback :: Maybe AuthDomainDigestAuthCallback Source #
A convenience synonym for
.Nothing
:: Maybe
AuthDomainDigestAuthCallback
noAuthDomainDigestAuthCallback_WithClosures :: Maybe AuthDomainDigestAuthCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
AuthDomainDigestAuthCallback_WithClosures
wrap_AuthDomainDigestAuthCallback :: Maybe (Ptr (FunPtr C_AuthDomainDigestAuthCallback)) -> AuthDomainDigestAuthCallback_WithClosures -> C_AuthDomainDigestAuthCallback Source #
Wrap a AuthDomainDigestAuthCallback
into a C_AuthDomainDigestAuthCallback
.
AuthDomainFilter
type AuthDomainFilter Source #
= AuthDomain |
|
-> Message |
|
-> IO Bool |
The prototype for a AuthDomain
filter; see
authDomainSetFilter
for details.
type AuthDomainFilter_WithClosures Source #
= AuthDomain |
|
-> Message |
|
-> Ptr () |
|
-> IO Bool |
The prototype for a AuthDomain
filter; see
authDomainSetFilter
for details.
type C_AuthDomainFilter = Ptr AuthDomain -> Ptr Message -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
drop_closures_AuthDomainFilter :: AuthDomainFilter -> AuthDomainFilter_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_AuthDomainFilter Source #
:: (HasCallStack, MonadIO m, IsAuthDomain a, IsMessage b) | |
=> FunPtr C_AuthDomainFilter | |
-> a |
|
-> b |
|
-> Ptr () |
|
-> m Bool |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_AuthDomainFilter :: MonadIO m => AuthDomainFilter -> m (GClosure C_AuthDomainFilter) Source #
Wrap the callback into a GClosure
.
mk_AuthDomainFilter :: C_AuthDomainFilter -> IO (FunPtr C_AuthDomainFilter) Source #
Generate a function pointer callable from C code, from a C_AuthDomainFilter
.
noAuthDomainFilter :: Maybe AuthDomainFilter Source #
A convenience synonym for
.Nothing
:: Maybe
AuthDomainFilter
noAuthDomainFilter_WithClosures :: Maybe AuthDomainFilter_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
AuthDomainFilter_WithClosures
wrap_AuthDomainFilter :: Maybe (Ptr (FunPtr C_AuthDomainFilter)) -> AuthDomainFilter_WithClosures -> C_AuthDomainFilter Source #
Wrap a AuthDomainFilter
into a C_AuthDomainFilter
.
AuthDomainGenericAuthCallback
type AuthDomainGenericAuthCallback Source #
= AuthDomain |
|
-> Message |
|
-> Text |
|
-> IO Bool |
The prototype for a AuthDomain
generic authentication callback.
The callback should look up the user's password, call
authDomainCheckPassword
, and use the return value from
that method as its own return value.
In general, for security reasons, it is preferable to use the
auth-domain-specific auth callbacks (eg,
AuthDomainBasicAuthCallback
and
AuthDomainDigestAuthCallback
), because they don't require
keeping a cleartext password database. Most users will use the same
password for many different sites, meaning if any site with a
cleartext password database is compromised, accounts on other
servers might be compromised as well. For many of the cases where
Server
is used, this is not really relevant, but it may still
be worth considering.
type AuthDomainGenericAuthCallback_WithClosures Source #
= AuthDomain |
|
-> Message |
|
-> Text |
|
-> Ptr () |
|
-> IO Bool |
The prototype for a AuthDomain
generic authentication callback.
The callback should look up the user's password, call
authDomainCheckPassword
, and use the return value from
that method as its own return value.
In general, for security reasons, it is preferable to use the
auth-domain-specific auth callbacks (eg,
AuthDomainBasicAuthCallback
and
AuthDomainDigestAuthCallback
), because they don't require
keeping a cleartext password database. Most users will use the same
password for many different sites, meaning if any site with a
cleartext password database is compromised, accounts on other
servers might be compromised as well. For many of the cases where
Server
is used, this is not really relevant, but it may still
be worth considering.
type C_AuthDomainGenericAuthCallback = Ptr AuthDomain -> Ptr Message -> CString -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
drop_closures_AuthDomainGenericAuthCallback :: AuthDomainGenericAuthCallback -> AuthDomainGenericAuthCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_AuthDomainGenericAuthCallback Source #
:: (HasCallStack, MonadIO m, IsAuthDomain a, IsMessage b) | |
=> FunPtr C_AuthDomainGenericAuthCallback | |
-> a |
|
-> b |
|
-> Text |
|
-> Ptr () |
|
-> m Bool |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_AuthDomainGenericAuthCallback :: MonadIO m => AuthDomainGenericAuthCallback -> m (GClosure C_AuthDomainGenericAuthCallback) Source #
Wrap the callback into a GClosure
.
mk_AuthDomainGenericAuthCallback :: C_AuthDomainGenericAuthCallback -> IO (FunPtr C_AuthDomainGenericAuthCallback) Source #
Generate a function pointer callable from C code, from a C_AuthDomainGenericAuthCallback
.
noAuthDomainGenericAuthCallback :: Maybe AuthDomainGenericAuthCallback Source #
A convenience synonym for
.Nothing
:: Maybe
AuthDomainGenericAuthCallback
noAuthDomainGenericAuthCallback_WithClosures :: Maybe AuthDomainGenericAuthCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
AuthDomainGenericAuthCallback_WithClosures
wrap_AuthDomainGenericAuthCallback :: Maybe (Ptr (FunPtr C_AuthDomainGenericAuthCallback)) -> AuthDomainGenericAuthCallback_WithClosures -> C_AuthDomainGenericAuthCallback Source #
Wrap a AuthDomainGenericAuthCallback
into a C_AuthDomainGenericAuthCallback
.
ChunkAllocator
type C_ChunkAllocator = Ptr Message -> Word64 -> Ptr () -> IO (Ptr Buffer) Source #
Type for the callback on the (unwrapped) C side.
type ChunkAllocator Source #
= Message |
|
-> Word64 |
|
-> IO (Maybe Buffer) | Returns: the new buffer (or |
Deprecated: Use Request
if you want to read into yourown buffers.
The prototype for a chunk allocation callback. This should allocate
a new Buffer
and return it for the I/O layer to read message
body data off the network into.
If maxLen
is non-0, it indicates the maximum number of bytes that
could be read, based on what is known about the message size. Note
that this might be a very large number, and you should not simply
try to allocate that many bytes blindly. If maxLen
is 0, that
means that libsoup does not know how many bytes remain to be read,
and the allocator should return a buffer of a size that it finds
convenient.
If the allocator returns Nothing
, the message will be paused. It is
up to the application to make sure that it gets unpaused when it
becomes possible to allocate a new buffer.
type ChunkAllocator_WithClosures Source #
= Message |
|
-> Word64 |
|
-> Ptr () |
|
-> IO (Maybe Buffer) | Returns: the new buffer (or |
The prototype for a chunk allocation callback. This should allocate
a new Buffer
and return it for the I/O layer to read message
body data off the network into.
If maxLen
is non-0, it indicates the maximum number of bytes that
could be read, based on what is known about the message size. Note
that this might be a very large number, and you should not simply
try to allocate that many bytes blindly. If maxLen
is 0, that
means that libsoup does not know how many bytes remain to be read,
and the allocator should return a buffer of a size that it finds
convenient.
If the allocator returns Nothing
, the message will be paused. It is
up to the application to make sure that it gets unpaused when it
becomes possible to allocate a new buffer.
drop_closures_ChunkAllocator :: ChunkAllocator -> ChunkAllocator_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_ChunkAllocator Source #
:: (HasCallStack, MonadIO m, IsMessage a) | |
=> FunPtr C_ChunkAllocator | |
-> a |
|
-> Word64 |
|
-> Ptr () |
|
-> m (Maybe Buffer) | Returns: the new buffer (or |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_ChunkAllocator :: MonadIO m => ChunkAllocator -> m (GClosure C_ChunkAllocator) Source #
Wrap the callback into a GClosure
.
mk_ChunkAllocator :: C_ChunkAllocator -> IO (FunPtr C_ChunkAllocator) Source #
Generate a function pointer callable from C code, from a C_ChunkAllocator
.
noChunkAllocator :: Maybe ChunkAllocator Source #
A convenience synonym for
.Nothing
:: Maybe
ChunkAllocator
noChunkAllocator_WithClosures :: Maybe ChunkAllocator_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
ChunkAllocator_WithClosures
wrap_ChunkAllocator :: Maybe (Ptr (FunPtr C_ChunkAllocator)) -> ChunkAllocator_WithClosures -> C_ChunkAllocator Source #
Wrap a ChunkAllocator
into a C_ChunkAllocator
.
LoggerFilter
type C_LoggerFilter = Ptr Logger -> Ptr Message -> Ptr () -> IO CUInt Source #
Type for the callback on the (unwrapped) C side.
type LoggerFilter Source #
= Logger |
|
-> Message |
|
-> IO LoggerLogLevel | Returns: a |
The prototype for a logging filter. The filter callback will be
invoked for each request or response, and should analyze it and
return a LoggerLogLevel
value indicating how much of the
message to log. Eg, it might choose between LoggerLogLevelBody
and LoggerLogLevelHeaders
depending on the Content-Type.
type LoggerFilter_WithClosures Source #
= Logger |
|
-> Message |
|
-> Ptr () |
|
-> IO LoggerLogLevel | Returns: a |
The prototype for a logging filter. The filter callback will be
invoked for each request or response, and should analyze it and
return a LoggerLogLevel
value indicating how much of the
message to log. Eg, it might choose between LoggerLogLevelBody
and LoggerLogLevelHeaders
depending on the Content-Type.
drop_closures_LoggerFilter :: LoggerFilter -> LoggerFilter_WithClosures Source #
A simple wrapper that ignores the closure arguments.
:: (HasCallStack, MonadIO m, IsLogger a, IsMessage b) | |
=> FunPtr C_LoggerFilter | |
-> a |
|
-> b |
|
-> Ptr () |
|
-> m LoggerLogLevel | Returns: a |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_LoggerFilter :: MonadIO m => LoggerFilter -> m (GClosure C_LoggerFilter) Source #
Wrap the callback into a GClosure
.
mk_LoggerFilter :: C_LoggerFilter -> IO (FunPtr C_LoggerFilter) Source #
Generate a function pointer callable from C code, from a C_LoggerFilter
.
noLoggerFilter :: Maybe LoggerFilter Source #
A convenience synonym for
.Nothing
:: Maybe
LoggerFilter
noLoggerFilter_WithClosures :: Maybe LoggerFilter_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
LoggerFilter_WithClosures
wrap_LoggerFilter :: Maybe (Ptr (FunPtr C_LoggerFilter)) -> LoggerFilter_WithClosures -> C_LoggerFilter Source #
Wrap a LoggerFilter
into a C_LoggerFilter
.
LoggerPrinter
type C_LoggerPrinter = Ptr Logger -> CUInt -> Int8 -> CString -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type LoggerPrinter Source #
= Logger |
|
-> LoggerLogLevel |
|
-> Int8 |
|
-> Text |
|
-> IO () |
The prototype for a custom printing callback.
level
indicates what kind of information is being printed. Eg, it
will be LoggerLogLevelHeaders
if data
is header data.
direction
is either '<', '>', or ' ', and data
is the single line
to print; the printer is expected to add a terminating newline.
To get the effect of the default printer, you would do:
<informalexample><programlisting>
printf ("c
s
\n", direction, data);
</programlisting></informalexample>
type LoggerPrinter_WithClosures Source #
= Logger |
|
-> LoggerLogLevel |
|
-> Int8 |
|
-> Text |
|
-> Ptr () |
|
-> IO () |
The prototype for a custom printing callback.
level
indicates what kind of information is being printed. Eg, it
will be LoggerLogLevelHeaders
if data
is header data.
direction
is either '<', '>', or ' ', and data
is the single line
to print; the printer is expected to add a terminating newline.
To get the effect of the default printer, you would do:
<informalexample><programlisting>
printf ("c
s
\n", direction, data);
</programlisting></informalexample>
drop_closures_LoggerPrinter :: LoggerPrinter -> LoggerPrinter_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_LoggerPrinter Source #
:: (HasCallStack, MonadIO m, IsLogger a) | |
=> FunPtr C_LoggerPrinter | |
-> a |
|
-> LoggerLogLevel |
|
-> Int8 |
|
-> Text |
|
-> Ptr () |
|
-> m () |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_LoggerPrinter :: MonadIO m => LoggerPrinter -> m (GClosure C_LoggerPrinter) Source #
Wrap the callback into a GClosure
.
mk_LoggerPrinter :: C_LoggerPrinter -> IO (FunPtr C_LoggerPrinter) Source #
Generate a function pointer callable from C code, from a C_LoggerPrinter
.
noLoggerPrinter :: Maybe LoggerPrinter Source #
A convenience synonym for
.Nothing
:: Maybe
LoggerPrinter
noLoggerPrinter_WithClosures :: Maybe LoggerPrinter_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
LoggerPrinter_WithClosures
wrap_LoggerPrinter :: Maybe (Ptr (FunPtr C_LoggerPrinter)) -> LoggerPrinter_WithClosures -> C_LoggerPrinter Source #
Wrap a LoggerPrinter
into a C_LoggerPrinter
.
MessageHeadersForeachFunc
type C_MessageHeadersForeachFunc = CString -> CString -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type MessageHeadersForeachFunc Source #
The callback passed to messageHeadersForeach
.
type MessageHeadersForeachFunc_WithClosures Source #
= Text |
|
-> Text |
|
-> Ptr () |
|
-> IO () |
The callback passed to messageHeadersForeach
.
drop_closures_MessageHeadersForeachFunc :: MessageHeadersForeachFunc -> MessageHeadersForeachFunc_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_MessageHeadersForeachFunc Source #
:: (HasCallStack, MonadIO m) | |
=> FunPtr C_MessageHeadersForeachFunc | |
-> Text |
|
-> Text |
|
-> Ptr () |
|
-> m () |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_MessageHeadersForeachFunc :: MonadIO m => MessageHeadersForeachFunc -> m (GClosure C_MessageHeadersForeachFunc) Source #
Wrap the callback into a GClosure
.
mk_MessageHeadersForeachFunc :: C_MessageHeadersForeachFunc -> IO (FunPtr C_MessageHeadersForeachFunc) Source #
Generate a function pointer callable from C code, from a C_MessageHeadersForeachFunc
.
noMessageHeadersForeachFunc :: Maybe MessageHeadersForeachFunc Source #
A convenience synonym for
.Nothing
:: Maybe
MessageHeadersForeachFunc
noMessageHeadersForeachFunc_WithClosures :: Maybe MessageHeadersForeachFunc_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
MessageHeadersForeachFunc_WithClosures
wrap_MessageHeadersForeachFunc :: Maybe (Ptr (FunPtr C_MessageHeadersForeachFunc)) -> MessageHeadersForeachFunc_WithClosures -> C_MessageHeadersForeachFunc Source #
Wrap a MessageHeadersForeachFunc
into a C_MessageHeadersForeachFunc
.
PasswordManagerCallback
type C_PasswordManagerCallback = Ptr PasswordManager -> Ptr Message -> Ptr Auth -> CInt -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type PasswordManagerCallback = PasswordManager -> Message -> Auth -> Bool -> IO () Source #
No description available in the introspection data.
type PasswordManagerCallback_WithClosures = PasswordManager -> Message -> Auth -> Bool -> Ptr () -> IO () Source #
No description available in the introspection data.
drop_closures_PasswordManagerCallback :: PasswordManagerCallback -> PasswordManagerCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_PasswordManagerCallback :: (HasCallStack, MonadIO m, IsPasswordManager a, IsMessage b, IsAuth c) => FunPtr C_PasswordManagerCallback -> a -> b -> c -> Bool -> Ptr () -> m () Source #
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_PasswordManagerCallback :: MonadIO m => PasswordManagerCallback -> m (GClosure C_PasswordManagerCallback) Source #
Wrap the callback into a GClosure
.
mk_PasswordManagerCallback :: C_PasswordManagerCallback -> IO (FunPtr C_PasswordManagerCallback) Source #
Generate a function pointer callable from C code, from a C_PasswordManagerCallback
.
noPasswordManagerCallback :: Maybe PasswordManagerCallback Source #
A convenience synonym for
.Nothing
:: Maybe
PasswordManagerCallback
noPasswordManagerCallback_WithClosures :: Maybe PasswordManagerCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
PasswordManagerCallback_WithClosures
wrap_PasswordManagerCallback :: Maybe (Ptr (FunPtr C_PasswordManagerCallback)) -> PasswordManagerCallback_WithClosures -> C_PasswordManagerCallback Source #
Wrap a PasswordManagerCallback
into a C_PasswordManagerCallback
.
ProxyResolverCallback
type C_ProxyResolverCallback = Ptr ProxyResolver -> Ptr Message -> Word32 -> Ptr Address -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ProxyResolverCallback = ProxyResolver -> Message -> Word32 -> Address -> IO () Source #
Deprecated: (Since version 2.28)Use SoupProxyURIResolver instead
No description available in the introspection data.
type ProxyResolverCallback_WithClosures = ProxyResolver -> Message -> Word32 -> Address -> Ptr () -> IO () Source #
No description available in the introspection data.
drop_closures_ProxyResolverCallback :: ProxyResolverCallback -> ProxyResolverCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_ProxyResolverCallback :: (HasCallStack, MonadIO m, IsProxyResolver a, IsMessage b, IsAddress c) => FunPtr C_ProxyResolverCallback -> a -> b -> Word32 -> c -> Ptr () -> m () Source #
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_ProxyResolverCallback :: MonadIO m => ProxyResolverCallback -> m (GClosure C_ProxyResolverCallback) Source #
Wrap the callback into a GClosure
.
mk_ProxyResolverCallback :: C_ProxyResolverCallback -> IO (FunPtr C_ProxyResolverCallback) Source #
Generate a function pointer callable from C code, from a C_ProxyResolverCallback
.
noProxyResolverCallback :: Maybe ProxyResolverCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ProxyResolverCallback
noProxyResolverCallback_WithClosures :: Maybe ProxyResolverCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
ProxyResolverCallback_WithClosures
wrap_ProxyResolverCallback :: Maybe (Ptr (FunPtr C_ProxyResolverCallback)) -> ProxyResolverCallback_WithClosures -> C_ProxyResolverCallback Source #
Wrap a ProxyResolverCallback
into a C_ProxyResolverCallback
.
ProxyURIResolverCallback
type C_ProxyURIResolverCallback = Ptr ProxyURIResolver -> Word32 -> Ptr URI -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ProxyURIResolverCallback Source #
= ProxyURIResolver |
|
-> Word32 |
|
-> URI |
|
-> IO () |
Callback for proxyURIResolverGetProxyUriAsync
type ProxyURIResolverCallback_WithClosures Source #
= ProxyURIResolver |
|
-> Word32 |
|
-> URI |
|
-> Ptr () |
|
-> IO () |
Callback for proxyURIResolverGetProxyUriAsync
drop_closures_ProxyURIResolverCallback :: ProxyURIResolverCallback -> ProxyURIResolverCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_ProxyURIResolverCallback Source #
:: (HasCallStack, MonadIO m, IsProxyURIResolver a) | |
=> FunPtr C_ProxyURIResolverCallback | |
-> a |
|
-> Word32 |
|
-> URI |
|
-> Ptr () |
|
-> m () |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_ProxyURIResolverCallback :: MonadIO m => ProxyURIResolverCallback -> m (GClosure C_ProxyURIResolverCallback) Source #
Wrap the callback into a GClosure
.
mk_ProxyURIResolverCallback :: C_ProxyURIResolverCallback -> IO (FunPtr C_ProxyURIResolverCallback) Source #
Generate a function pointer callable from C code, from a C_ProxyURIResolverCallback
.
noProxyURIResolverCallback :: Maybe ProxyURIResolverCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ProxyURIResolverCallback
noProxyURIResolverCallback_WithClosures :: Maybe ProxyURIResolverCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
ProxyURIResolverCallback_WithClosures
wrap_ProxyURIResolverCallback :: Maybe (Ptr (FunPtr C_ProxyURIResolverCallback)) -> ProxyURIResolverCallback_WithClosures -> C_ProxyURIResolverCallback Source #
Wrap a ProxyURIResolverCallback
into a C_ProxyURIResolverCallback
.
ServerCallback
type C_ServerCallback = Ptr Server -> Ptr Message -> CString -> Ptr (GHashTable CString CString) -> Ptr ClientContext -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ServerCallback Source #
= Server |
|
-> Message |
|
-> Text |
|
-> Maybe (Map Text Text) |
|
-> ClientContext |
|
-> IO () |
A callback used to handle requests to a Server
.
path
and query
contain the likewise-named components of the
Request-URI, subject to certain assumptions. By default,
Server
decodes all percent-encoding in the URI path, such that
"/foo%<!-- -->2Fbar" is treated the same as "/foo/bar". If your
server is serving resources in some non-POSIX-filesystem namespace,
you may want to distinguish those as two distinct paths. In that
case, you can set the SERVER_RAW_PATHS
property when creating
the Server
, and it will leave those characters undecoded. (You
may want to call uriNormalize
to decode any percent-encoded
characters that you aren't handling specially.)
query
contains the query component of the Request-URI parsed
according to the rules for HTML form handling. Although this is the
only commonly-used query string format in HTTP, there is nothing
that actually requires that HTTP URIs use that format; if your
server needs to use some other format, you can just ignore query
,
and call messageGetUri
and parse the URI's query field
yourself.
See serverAddHandler
and serverAddEarlyHandler
for details of what handlers can/should do.
type ServerCallback_WithClosures Source #
= Server |
|
-> Message |
|
-> Text |
|
-> Maybe (Map Text Text) |
|
-> ClientContext |
|
-> Ptr () |
|
-> IO () |
A callback used to handle requests to a Server
.
path
and query
contain the likewise-named components of the
Request-URI, subject to certain assumptions. By default,
Server
decodes all percent-encoding in the URI path, such that
"/foo%<!-- -->2Fbar" is treated the same as "/foo/bar". If your
server is serving resources in some non-POSIX-filesystem namespace,
you may want to distinguish those as two distinct paths. In that
case, you can set the SERVER_RAW_PATHS
property when creating
the Server
, and it will leave those characters undecoded. (You
may want to call uriNormalize
to decode any percent-encoded
characters that you aren't handling specially.)
query
contains the query component of the Request-URI parsed
according to the rules for HTML form handling. Although this is the
only commonly-used query string format in HTTP, there is nothing
that actually requires that HTTP URIs use that format; if your
server needs to use some other format, you can just ignore query
,
and call messageGetUri
and parse the URI's query field
yourself.
See serverAddHandler
and serverAddEarlyHandler
for details of what handlers can/should do.
drop_closures_ServerCallback :: ServerCallback -> ServerCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_ServerCallback Source #
:: (HasCallStack, MonadIO m, IsServer a, IsMessage b) | |
=> FunPtr C_ServerCallback | |
-> a |
|
-> b |
|
-> Text |
|
-> Maybe (Map Text Text) |
|
-> ClientContext |
|
-> Ptr () |
|
-> m () |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_ServerCallback :: MonadIO m => ServerCallback -> m (GClosure C_ServerCallback) Source #
Wrap the callback into a GClosure
.
mk_ServerCallback :: C_ServerCallback -> IO (FunPtr C_ServerCallback) Source #
Generate a function pointer callable from C code, from a C_ServerCallback
.
noServerCallback :: Maybe ServerCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ServerCallback
noServerCallback_WithClosures :: Maybe ServerCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
ServerCallback_WithClosures
wrap_ServerCallback :: Maybe (Ptr (FunPtr C_ServerCallback)) -> ServerCallback_WithClosures -> C_ServerCallback Source #
Wrap a ServerCallback
into a C_ServerCallback
.
ServerWebsocketCallback
type C_ServerWebsocketCallback = Ptr Server -> Ptr WebsocketConnection -> CString -> Ptr ClientContext -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ServerWebsocketCallback Source #
= Server |
|
-> WebsocketConnection |
|
-> Text |
|
-> ClientContext |
|
-> IO () |
A callback used to handle WebSocket requests to a Server
. The
callback will be invoked after sending the handshake response back
to the client (and is only invoked if the handshake was
successful).
path
contains the path of the Request-URI, subject to the same
rules as ServerCallback
(qv).
type ServerWebsocketCallback_WithClosures Source #
= Server |
|
-> WebsocketConnection |
|
-> Text |
|
-> ClientContext |
|
-> Ptr () |
|
-> IO () |
A callback used to handle WebSocket requests to a Server
. The
callback will be invoked after sending the handshake response back
to the client (and is only invoked if the handshake was
successful).
path
contains the path of the Request-URI, subject to the same
rules as ServerCallback
(qv).
drop_closures_ServerWebsocketCallback :: ServerWebsocketCallback -> ServerWebsocketCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_ServerWebsocketCallback Source #
:: (HasCallStack, MonadIO m, IsServer a, IsWebsocketConnection b) | |
=> FunPtr C_ServerWebsocketCallback | |
-> a |
|
-> b |
|
-> Text |
|
-> ClientContext |
|
-> Ptr () |
|
-> m () |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_ServerWebsocketCallback :: MonadIO m => ServerWebsocketCallback -> m (GClosure C_ServerWebsocketCallback) Source #
Wrap the callback into a GClosure
.
mk_ServerWebsocketCallback :: C_ServerWebsocketCallback -> IO (FunPtr C_ServerWebsocketCallback) Source #
Generate a function pointer callable from C code, from a C_ServerWebsocketCallback
.
noServerWebsocketCallback :: Maybe ServerWebsocketCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ServerWebsocketCallback
noServerWebsocketCallback_WithClosures :: Maybe ServerWebsocketCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
ServerWebsocketCallback_WithClosures
wrap_ServerWebsocketCallback :: Maybe (Ptr (FunPtr C_ServerWebsocketCallback)) -> ServerWebsocketCallback_WithClosures -> C_ServerWebsocketCallback Source #
Wrap a ServerWebsocketCallback
into a C_ServerWebsocketCallback
.
SessionCallback
type C_SessionCallback = Ptr Session -> Ptr Message -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SessionCallback Source #
Prototype for the callback passed to sessionQueueMessage
,
qv.
type SessionCallback_WithClosures Source #
= Session |
|
-> Message |
|
-> Ptr () |
|
-> IO () |
Prototype for the callback passed to sessionQueueMessage
,
qv.
drop_closures_SessionCallback :: SessionCallback -> SessionCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_SessionCallback Source #
:: (HasCallStack, MonadIO m, IsSession a, IsMessage b) | |
=> FunPtr C_SessionCallback | |
-> a |
|
-> b |
|
-> Ptr () |
|
-> m () |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_SessionCallback :: MonadIO m => SessionCallback -> m (GClosure C_SessionCallback) Source #
Wrap the callback into a GClosure
.
mk_SessionCallback :: C_SessionCallback -> IO (FunPtr C_SessionCallback) Source #
Generate a function pointer callable from C code, from a C_SessionCallback
.
noSessionCallback :: Maybe SessionCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SessionCallback
noSessionCallback_WithClosures :: Maybe SessionCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
SessionCallback_WithClosures
wrap_SessionCallback :: Maybe (Ptr (FunPtr C_SessionCallback)) -> SessionCallback_WithClosures -> C_SessionCallback Source #
Wrap a SessionCallback
into a C_SessionCallback
.
SessionConnectProgressCallback
type C_SessionConnectProgressCallback = Ptr Session -> CUInt -> Ptr IOStream -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SessionConnectProgressCallback Source #
= Session |
|
-> SocketClientEvent |
|
-> IOStream |
|
-> IO () |
Prototype for the progress callback passed to sessionConnectAsync
.
Since: 2.62
type SessionConnectProgressCallback_WithClosures Source #
= Session |
|
-> SocketClientEvent |
|
-> IOStream |
|
-> Ptr () |
|
-> IO () |
Prototype for the progress callback passed to sessionConnectAsync
.
Since: 2.62
drop_closures_SessionConnectProgressCallback :: SessionConnectProgressCallback -> SessionConnectProgressCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_SessionConnectProgressCallback Source #
:: (HasCallStack, MonadIO m, IsSession a, IsIOStream b) | |
=> FunPtr C_SessionConnectProgressCallback | |
-> a |
|
-> SocketClientEvent |
|
-> b |
|
-> Ptr () |
|
-> m () |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_SessionConnectProgressCallback :: MonadIO m => SessionConnectProgressCallback -> m (GClosure C_SessionConnectProgressCallback) Source #
Wrap the callback into a GClosure
.
mk_SessionConnectProgressCallback :: C_SessionConnectProgressCallback -> IO (FunPtr C_SessionConnectProgressCallback) Source #
Generate a function pointer callable from C code, from a C_SessionConnectProgressCallback
.
noSessionConnectProgressCallback :: Maybe SessionConnectProgressCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SessionConnectProgressCallback
noSessionConnectProgressCallback_WithClosures :: Maybe SessionConnectProgressCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
SessionConnectProgressCallback_WithClosures
wrap_SessionConnectProgressCallback :: Maybe (Ptr (FunPtr C_SessionConnectProgressCallback)) -> SessionConnectProgressCallback_WithClosures -> C_SessionConnectProgressCallback Source #
Wrap a SessionConnectProgressCallback
into a C_SessionConnectProgressCallback
.
SocketCallback
type C_SocketCallback = Ptr Socket -> Word32 -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SocketCallback Source #
The callback function passed to socketConnectAsync
.
type SocketCallback_WithClosures Source #
= Socket |
|
-> Word32 |
|
-> Ptr () |
|
-> IO () |
The callback function passed to socketConnectAsync
.
drop_closures_SocketCallback :: SocketCallback -> SocketCallback_WithClosures Source #
A simple wrapper that ignores the closure arguments.
dynamic_SocketCallback Source #
:: (HasCallStack, MonadIO m, IsSocket a) | |
=> FunPtr C_SocketCallback | |
-> a |
|
-> Word32 |
|
-> Ptr () |
|
-> m () |
Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
genClosure_SocketCallback :: MonadIO m => SocketCallback -> m (GClosure C_SocketCallback) Source #
Wrap the callback into a GClosure
.
mk_SocketCallback :: C_SocketCallback -> IO (FunPtr C_SocketCallback) Source #
Generate a function pointer callable from C code, from a C_SocketCallback
.
noSocketCallback :: Maybe SocketCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SocketCallback
noSocketCallback_WithClosures :: Maybe SocketCallback_WithClosures Source #
A convenience synonym for
.Nothing
:: Maybe
SocketCallback_WithClosures
wrap_SocketCallback :: Maybe (Ptr (FunPtr C_SocketCallback)) -> SocketCallback_WithClosures -> C_SocketCallback Source #
Wrap a SocketCallback
into a C_SocketCallback
.