gi-soup-2.4.11: Libsoup bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Soup.Callbacks

Contents

Description

 

Synopsis

Signals

AddressCallback

dynamic_AddressCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsAddress a) 
=> FunPtr C_AddressCallback 
-> a

addr: the Address that was resolved

-> Word32

status: StatusOk, StatusCantResolve, or StatusCancelled

-> Ptr ()

userData: the user data that was passed to addressResolveAsync

-> m () 

AuthDomainBasicAuthCallback

dynamic_AuthDomainBasicAuthCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsAuthDomain a, IsMessage b) 
=> FunPtr C_AuthDomainBasicAuthCallback 
-> a

domain: the domain

-> b

msg: the message being authenticated

-> Text

username: the username provided by the client

-> Text

password: the password provided by the client

-> Ptr ()

userData: the data passed to authDomainBasicSetAuthCallback

-> m Bool

Returns: True if username and password are valid

AuthDomainDigestAuthCallback

dynamic_AuthDomainDigestAuthCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsAuthDomain a, IsMessage b) 
=> FunPtr C_AuthDomainDigestAuthCallback 
-> a

domain: the domain

-> b

msg: the message being authenticated

-> Text

username: the username provided by the client

-> Ptr ()

userData: the data passed to authDomainDigestSetAuthCallback

-> m (Maybe Text)

Returns: the encoded password, or Nothing if username is not a valid user. domain will free the password when it is done with it.

AuthDomainFilter

dynamic_AuthDomainFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsAuthDomain a, IsMessage b) 
=> FunPtr C_AuthDomainFilter 
-> a

domain: a AuthDomain

-> b

msg: a Message

-> Ptr ()

userData: the data passed to authDomainSetFilter

-> m Bool

Returns: True if msg requires authentication, False if not.

AuthDomainGenericAuthCallback

dynamic_AuthDomainGenericAuthCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsAuthDomain a, IsMessage b) 
=> FunPtr C_AuthDomainGenericAuthCallback 
-> a

domain: a AuthDomain

-> b

msg: the Message being authenticated

-> Text

username: the username from msg

-> Ptr ()

userData: the data passed to authDomainSetGenericAuthCallback

-> m Bool

Returns: True if msg is authenticated, False if not.

ChunkAllocator

type ChunkAllocator = Message -> Word64 -> IO (Maybe Buffer) Source #

Deprecated: Use Request if you want to read into yourown buffers.

dynamic_ChunkAllocator Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessage a) 
=> FunPtr C_ChunkAllocator 
-> a

msg: the Message the chunk is being allocated for

-> Word64

maxLen: the maximum length that will be read, or 0.

-> Ptr ()

userData: the data passed to messageSetChunkAllocator

-> m (Maybe Buffer)

Returns: the new buffer (or Nothing)

LoggerFilter

dynamic_LoggerFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsLogger a, IsMessage b) 
=> FunPtr C_LoggerFilter 
-> a

logger: the Logger

-> b

msg: the message being logged

-> Ptr ()

userData: the data passed to loggerSetRequestFilter or loggerSetResponseFilter

-> m LoggerLogLevel

Returns: a LoggerLogLevel value indicating how much of the message to log

LoggerPrinter

type C_LoggerPrinter = Ptr Logger -> CUInt -> Int8 -> CString -> Ptr () -> IO () Source #

dynamic_LoggerPrinter Source #

Arguments

:: (HasCallStack, MonadIO m, IsLogger a) 
=> FunPtr C_LoggerPrinter 
-> a

logger: the Logger

-> LoggerLogLevel

level: the level of the information being printed.

-> Int8

direction: a single-character prefix to data

-> Text

data: data to print

-> Ptr ()

userData: the data passed to loggerSetPrinter

-> m () 

MessageHeadersForeachFunc

dynamic_MessageHeadersForeachFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_MessageHeadersForeachFunc 
-> Text

name: the header name

-> Text

value: the header value

-> Ptr ()

userData: the data passed to messageHeadersForeach

-> m () 

PasswordManagerCallback

ProxyURIResolverCallback

dynamic_ProxyURIResolverCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsProxyURIResolver a) 
=> FunPtr C_ProxyURIResolverCallback 
-> a

resolver: the ProxyURIResolver

-> Word32

status: a Status

-> URI

proxyUri: the resolved proxy URI, or Nothing

-> Ptr ()

userData: data passed to proxyURIResolverGetProxyUriAsync

-> m () 

ServerCallback

dynamic_ServerCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsServer a, IsMessage b) 
=> FunPtr C_ServerCallback 
-> a

server: the Server

-> b

msg: the message being processed

-> Text

path: the path component of msg's Request-URI

-> Maybe (Map Text Text)

query: the parsed query component of msg's Request-URI

-> ClientContext

client: additional contextual information about the client

-> Ptr ()

userData: the data passed to serverAddHandler or serverAddEarlyHandler.

-> m () 

ServerWebsocketCallback

dynamic_ServerWebsocketCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsServer a, IsWebsocketConnection b) 
=> FunPtr C_ServerWebsocketCallback 
-> a

server: the Server

-> b

connection: the newly created WebSocket connection

-> Text

path: the path component of msg's Request-URI

-> ClientContext

client: additional contextual information about the client

-> Ptr ()

userData: the data passed to soupServerAddHandler

-> m () 

SessionCallback

dynamic_SessionCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsSession a, IsMessage b) 
=> FunPtr C_SessionCallback 
-> a

session: the session

-> b

msg: the message that has finished

-> Ptr ()

userData: the data passed to soup_session_queue_message

-> m () 

SocketCallback

type C_SocketCallback = Ptr Socket -> Word32 -> Ptr () -> IO () Source #

dynamic_SocketCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsSocket a) 
=> FunPtr C_SocketCallback 
-> a

sock: the Socket

-> Word32

status: an HTTP status code indicating success or failure

-> Ptr ()

userData: the data passed to socketConnectAsync

-> m ()