{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Soup.Objects.Message
(
Message(..) ,
IsMessage ,
toMessage ,
#if defined(ENABLE_OVERLOADING)
ResolveMessageMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
MessageContentSniffedMethodInfo ,
#endif
messageContentSniffed ,
#if defined(ENABLE_OVERLOADING)
MessageDisableFeatureMethodInfo ,
#endif
messageDisableFeature ,
#if defined(ENABLE_OVERLOADING)
MessageFinishedMethodInfo ,
#endif
messageFinished ,
#if defined(ENABLE_OVERLOADING)
MessageGetAddressMethodInfo ,
#endif
messageGetAddress ,
#if defined(ENABLE_OVERLOADING)
MessageGetFirstPartyMethodInfo ,
#endif
messageGetFirstParty ,
#if defined(ENABLE_OVERLOADING)
MessageGetFlagsMethodInfo ,
#endif
messageGetFlags ,
#if defined(ENABLE_OVERLOADING)
MessageGetHttpVersionMethodInfo ,
#endif
messageGetHttpVersion ,
#if defined(ENABLE_OVERLOADING)
MessageGetHttpsStatusMethodInfo ,
#endif
messageGetHttpsStatus ,
#if defined(ENABLE_OVERLOADING)
MessageGetIsTopLevelNavigationMethodInfo,
#endif
messageGetIsTopLevelNavigation ,
#if defined(ENABLE_OVERLOADING)
MessageGetPriorityMethodInfo ,
#endif
messageGetPriority ,
#if defined(ENABLE_OVERLOADING)
MessageGetSiteForCookiesMethodInfo ,
#endif
messageGetSiteForCookies ,
#if defined(ENABLE_OVERLOADING)
MessageGetSoupRequestMethodInfo ,
#endif
messageGetSoupRequest ,
#if defined(ENABLE_OVERLOADING)
MessageGetUriMethodInfo ,
#endif
messageGetUri ,
#if defined(ENABLE_OVERLOADING)
MessageGotBodyMethodInfo ,
#endif
messageGotBody ,
#if defined(ENABLE_OVERLOADING)
MessageGotChunkMethodInfo ,
#endif
messageGotChunk ,
#if defined(ENABLE_OVERLOADING)
MessageGotHeadersMethodInfo ,
#endif
messageGotHeaders ,
#if defined(ENABLE_OVERLOADING)
MessageGotInformationalMethodInfo ,
#endif
messageGotInformational ,
#if defined(ENABLE_OVERLOADING)
MessageIsKeepaliveMethodInfo ,
#endif
messageIsKeepalive ,
messageNew ,
messageNewFromUri ,
#if defined(ENABLE_OVERLOADING)
MessageRestartedMethodInfo ,
#endif
messageRestarted ,
#if defined(ENABLE_OVERLOADING)
MessageSetChunkAllocatorMethodInfo ,
#endif
messageSetChunkAllocator ,
#if defined(ENABLE_OVERLOADING)
MessageSetFirstPartyMethodInfo ,
#endif
messageSetFirstParty ,
#if defined(ENABLE_OVERLOADING)
MessageSetFlagsMethodInfo ,
#endif
messageSetFlags ,
#if defined(ENABLE_OVERLOADING)
MessageSetHttpVersionMethodInfo ,
#endif
messageSetHttpVersion ,
#if defined(ENABLE_OVERLOADING)
MessageSetIsTopLevelNavigationMethodInfo,
#endif
messageSetIsTopLevelNavigation ,
#if defined(ENABLE_OVERLOADING)
MessageSetPriorityMethodInfo ,
#endif
messageSetPriority ,
#if defined(ENABLE_OVERLOADING)
MessageSetRedirectMethodInfo ,
#endif
messageSetRedirect ,
#if defined(ENABLE_OVERLOADING)
MessageSetRequestMethodInfo ,
#endif
messageSetRequest ,
#if defined(ENABLE_OVERLOADING)
MessageSetResponseMethodInfo ,
#endif
messageSetResponse ,
#if defined(ENABLE_OVERLOADING)
MessageSetSiteForCookiesMethodInfo ,
#endif
messageSetSiteForCookies ,
#if defined(ENABLE_OVERLOADING)
MessageSetStatusMethodInfo ,
#endif
messageSetStatus ,
#if defined(ENABLE_OVERLOADING)
MessageSetStatusFullMethodInfo ,
#endif
messageSetStatusFull ,
#if defined(ENABLE_OVERLOADING)
MessageSetUriMethodInfo ,
#endif
messageSetUri ,
#if defined(ENABLE_OVERLOADING)
MessageStartingMethodInfo ,
#endif
messageStarting ,
#if defined(ENABLE_OVERLOADING)
MessageWroteBodyMethodInfo ,
#endif
messageWroteBody ,
#if defined(ENABLE_OVERLOADING)
MessageWroteBodyDataMethodInfo ,
#endif
messageWroteBodyData ,
#if defined(ENABLE_OVERLOADING)
MessageWroteChunkMethodInfo ,
#endif
messageWroteChunk ,
#if defined(ENABLE_OVERLOADING)
MessageWroteHeadersMethodInfo ,
#endif
messageWroteHeaders ,
#if defined(ENABLE_OVERLOADING)
MessageWroteInformationalMethodInfo ,
#endif
messageWroteInformational ,
#if defined(ENABLE_OVERLOADING)
MessageFirstPartyPropertyInfo ,
#endif
constructMessageFirstParty ,
getMessageFirstParty ,
#if defined(ENABLE_OVERLOADING)
messageFirstParty ,
#endif
setMessageFirstParty ,
#if defined(ENABLE_OVERLOADING)
MessageFlagsPropertyInfo ,
#endif
constructMessageFlags ,
getMessageFlags ,
#if defined(ENABLE_OVERLOADING)
messageFlags ,
#endif
setMessageFlags ,
#if defined(ENABLE_OVERLOADING)
MessageHttpVersionPropertyInfo ,
#endif
constructMessageHttpVersion ,
getMessageHttpVersion ,
#if defined(ENABLE_OVERLOADING)
messageHttpVersion ,
#endif
setMessageHttpVersion ,
#if defined(ENABLE_OVERLOADING)
MessageIsTopLevelNavigationPropertyInfo ,
#endif
constructMessageIsTopLevelNavigation ,
getMessageIsTopLevelNavigation ,
#if defined(ENABLE_OVERLOADING)
messageIsTopLevelNavigation ,
#endif
setMessageIsTopLevelNavigation ,
#if defined(ENABLE_OVERLOADING)
MessageMethodPropertyInfo ,
#endif
clearMessageMethod ,
constructMessageMethod ,
getMessageMethod ,
#if defined(ENABLE_OVERLOADING)
messageMethod ,
#endif
setMessageMethod ,
#if defined(ENABLE_OVERLOADING)
MessagePriorityPropertyInfo ,
#endif
constructMessagePriority ,
getMessagePriority ,
#if defined(ENABLE_OVERLOADING)
messagePriority ,
#endif
setMessagePriority ,
#if defined(ENABLE_OVERLOADING)
MessageReasonPhrasePropertyInfo ,
#endif
clearMessageReasonPhrase ,
constructMessageReasonPhrase ,
getMessageReasonPhrase ,
#if defined(ENABLE_OVERLOADING)
messageReasonPhrase ,
#endif
setMessageReasonPhrase ,
#if defined(ENABLE_OVERLOADING)
MessageRequestBodyPropertyInfo ,
#endif
getMessageRequestBody ,
#if defined(ENABLE_OVERLOADING)
messageRequestBody ,
#endif
#if defined(ENABLE_OVERLOADING)
MessageRequestBodyDataPropertyInfo ,
#endif
getMessageRequestBodyData ,
#if defined(ENABLE_OVERLOADING)
messageRequestBodyData ,
#endif
#if defined(ENABLE_OVERLOADING)
MessageRequestHeadersPropertyInfo ,
#endif
getMessageRequestHeaders ,
#if defined(ENABLE_OVERLOADING)
messageRequestHeaders ,
#endif
#if defined(ENABLE_OVERLOADING)
MessageResponseBodyPropertyInfo ,
#endif
getMessageResponseBody ,
#if defined(ENABLE_OVERLOADING)
messageResponseBody ,
#endif
#if defined(ENABLE_OVERLOADING)
MessageResponseBodyDataPropertyInfo ,
#endif
getMessageResponseBodyData ,
#if defined(ENABLE_OVERLOADING)
messageResponseBodyData ,
#endif
#if defined(ENABLE_OVERLOADING)
MessageResponseHeadersPropertyInfo ,
#endif
getMessageResponseHeaders ,
#if defined(ENABLE_OVERLOADING)
messageResponseHeaders ,
#endif
#if defined(ENABLE_OVERLOADING)
MessageServerSidePropertyInfo ,
#endif
constructMessageServerSide ,
getMessageServerSide ,
#if defined(ENABLE_OVERLOADING)
messageServerSide ,
#endif
#if defined(ENABLE_OVERLOADING)
MessageSiteForCookiesPropertyInfo ,
#endif
clearMessageSiteForCookies ,
constructMessageSiteForCookies ,
getMessageSiteForCookies ,
#if defined(ENABLE_OVERLOADING)
messageSiteForCookies ,
#endif
setMessageSiteForCookies ,
#if defined(ENABLE_OVERLOADING)
MessageStatusCodePropertyInfo ,
#endif
constructMessageStatusCode ,
getMessageStatusCode ,
#if defined(ENABLE_OVERLOADING)
messageStatusCode ,
#endif
setMessageStatusCode ,
#if defined(ENABLE_OVERLOADING)
MessageTlsCertificatePropertyInfo ,
#endif
clearMessageTlsCertificate ,
constructMessageTlsCertificate ,
getMessageTlsCertificate ,
#if defined(ENABLE_OVERLOADING)
messageTlsCertificate ,
#endif
setMessageTlsCertificate ,
#if defined(ENABLE_OVERLOADING)
MessageTlsErrorsPropertyInfo ,
#endif
constructMessageTlsErrors ,
getMessageTlsErrors ,
#if defined(ENABLE_OVERLOADING)
messageTlsErrors ,
#endif
setMessageTlsErrors ,
#if defined(ENABLE_OVERLOADING)
MessageUriPropertyInfo ,
#endif
constructMessageUri ,
getMessageUri ,
#if defined(ENABLE_OVERLOADING)
messageUri ,
#endif
setMessageUri ,
C_MessageContentSniffedCallback ,
MessageContentSniffedCallback ,
#if defined(ENABLE_OVERLOADING)
MessageContentSniffedSignalInfo ,
#endif
afterMessageContentSniffed ,
genClosure_MessageContentSniffed ,
mk_MessageContentSniffedCallback ,
noMessageContentSniffedCallback ,
onMessageContentSniffed ,
wrap_MessageContentSniffedCallback ,
C_MessageFinishedCallback ,
MessageFinishedCallback ,
#if defined(ENABLE_OVERLOADING)
MessageFinishedSignalInfo ,
#endif
afterMessageFinished ,
genClosure_MessageFinished ,
mk_MessageFinishedCallback ,
noMessageFinishedCallback ,
onMessageFinished ,
wrap_MessageFinishedCallback ,
C_MessageGotBodyCallback ,
MessageGotBodyCallback ,
#if defined(ENABLE_OVERLOADING)
MessageGotBodySignalInfo ,
#endif
afterMessageGotBody ,
genClosure_MessageGotBody ,
mk_MessageGotBodyCallback ,
noMessageGotBodyCallback ,
onMessageGotBody ,
wrap_MessageGotBodyCallback ,
C_MessageGotChunkCallback ,
MessageGotChunkCallback ,
#if defined(ENABLE_OVERLOADING)
MessageGotChunkSignalInfo ,
#endif
afterMessageGotChunk ,
genClosure_MessageGotChunk ,
mk_MessageGotChunkCallback ,
noMessageGotChunkCallback ,
onMessageGotChunk ,
wrap_MessageGotChunkCallback ,
C_MessageGotHeadersCallback ,
MessageGotHeadersCallback ,
#if defined(ENABLE_OVERLOADING)
MessageGotHeadersSignalInfo ,
#endif
afterMessageGotHeaders ,
genClosure_MessageGotHeaders ,
mk_MessageGotHeadersCallback ,
noMessageGotHeadersCallback ,
onMessageGotHeaders ,
wrap_MessageGotHeadersCallback ,
C_MessageGotInformationalCallback ,
MessageGotInformationalCallback ,
#if defined(ENABLE_OVERLOADING)
MessageGotInformationalSignalInfo ,
#endif
afterMessageGotInformational ,
genClosure_MessageGotInformational ,
mk_MessageGotInformationalCallback ,
noMessageGotInformationalCallback ,
onMessageGotInformational ,
wrap_MessageGotInformationalCallback ,
C_MessageNetworkEventCallback ,
MessageNetworkEventCallback ,
#if defined(ENABLE_OVERLOADING)
MessageNetworkEventSignalInfo ,
#endif
afterMessageNetworkEvent ,
genClosure_MessageNetworkEvent ,
mk_MessageNetworkEventCallback ,
noMessageNetworkEventCallback ,
onMessageNetworkEvent ,
wrap_MessageNetworkEventCallback ,
C_MessageRestartedCallback ,
MessageRestartedCallback ,
#if defined(ENABLE_OVERLOADING)
MessageRestartedSignalInfo ,
#endif
afterMessageRestarted ,
genClosure_MessageRestarted ,
mk_MessageRestartedCallback ,
noMessageRestartedCallback ,
onMessageRestarted ,
wrap_MessageRestartedCallback ,
C_MessageStartingCallback ,
MessageStartingCallback ,
#if defined(ENABLE_OVERLOADING)
MessageStartingSignalInfo ,
#endif
afterMessageStarting ,
genClosure_MessageStarting ,
mk_MessageStartingCallback ,
noMessageStartingCallback ,
onMessageStarting ,
wrap_MessageStartingCallback ,
C_MessageWroteBodyCallback ,
MessageWroteBodyCallback ,
#if defined(ENABLE_OVERLOADING)
MessageWroteBodySignalInfo ,
#endif
afterMessageWroteBody ,
genClosure_MessageWroteBody ,
mk_MessageWroteBodyCallback ,
noMessageWroteBodyCallback ,
onMessageWroteBody ,
wrap_MessageWroteBodyCallback ,
C_MessageWroteBodyDataCallback ,
MessageWroteBodyDataCallback ,
#if defined(ENABLE_OVERLOADING)
MessageWroteBodyDataSignalInfo ,
#endif
afterMessageWroteBodyData ,
genClosure_MessageWroteBodyData ,
mk_MessageWroteBodyDataCallback ,
noMessageWroteBodyDataCallback ,
onMessageWroteBodyData ,
wrap_MessageWroteBodyDataCallback ,
C_MessageWroteChunkCallback ,
MessageWroteChunkCallback ,
#if defined(ENABLE_OVERLOADING)
MessageWroteChunkSignalInfo ,
#endif
afterMessageWroteChunk ,
genClosure_MessageWroteChunk ,
mk_MessageWroteChunkCallback ,
noMessageWroteChunkCallback ,
onMessageWroteChunk ,
wrap_MessageWroteChunkCallback ,
C_MessageWroteHeadersCallback ,
MessageWroteHeadersCallback ,
#if defined(ENABLE_OVERLOADING)
MessageWroteHeadersSignalInfo ,
#endif
afterMessageWroteHeaders ,
genClosure_MessageWroteHeaders ,
mk_MessageWroteHeadersCallback ,
noMessageWroteHeadersCallback ,
onMessageWroteHeaders ,
wrap_MessageWroteHeadersCallback ,
C_MessageWroteInformationalCallback ,
MessageWroteInformationalCallback ,
#if defined(ENABLE_OVERLOADING)
MessageWroteInformationalSignalInfo ,
#endif
afterMessageWroteInformational ,
genClosure_MessageWroteInformational ,
mk_MessageWroteInformationalCallback ,
noMessageWroteInformationalCallback ,
onMessageWroteInformational ,
wrap_MessageWroteInformationalCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Enums as Gio.Enums
import qualified GI.Gio.Flags as Gio.Flags
import qualified GI.Gio.Objects.IOStream as Gio.IOStream
import qualified GI.Gio.Objects.TlsCertificate as Gio.TlsCertificate
import qualified GI.Soup.Callbacks as Soup.Callbacks
import {-# SOURCE #-} qualified GI.Soup.Enums as Soup.Enums
import {-# SOURCE #-} qualified GI.Soup.Flags as Soup.Flags
import {-# SOURCE #-} qualified GI.Soup.Objects.Address as Soup.Address
import {-# SOURCE #-} qualified GI.Soup.Objects.Request as Soup.Request
import {-# SOURCE #-} qualified GI.Soup.Structs.Buffer as Soup.Buffer
import {-# SOURCE #-} qualified GI.Soup.Structs.MessageBody as Soup.MessageBody
import {-# SOURCE #-} qualified GI.Soup.Structs.MessageHeaders as Soup.MessageHeaders
import {-# SOURCE #-} qualified GI.Soup.Structs.URI as Soup.URI
newtype Message = Message (SP.ManagedPtr Message)
deriving (Message -> Message -> Bool
(Message -> Message -> Bool)
-> (Message -> Message -> Bool) -> Eq Message
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Message -> Message -> Bool
$c/= :: Message -> Message -> Bool
== :: Message -> Message -> Bool
$c== :: Message -> Message -> Bool
Eq)
instance SP.ManagedPtrNewtype Message where
toManagedPtr :: Message -> ManagedPtr Message
toManagedPtr (Message ManagedPtr Message
p) = ManagedPtr Message
p
foreign import ccall "soup_message_get_type"
c_soup_message_get_type :: IO B.Types.GType
instance B.Types.TypedObject Message where
glibType :: IO GType
glibType = IO GType
c_soup_message_get_type
instance B.Types.GObject Message
instance B.GValue.IsGValue Message where
toGValue :: Message -> IO GValue
toGValue Message
o = do
GType
gtype <- IO GType
c_soup_message_get_type
Message -> (Ptr Message -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Message
o (GType
-> (GValue -> Ptr Message -> IO ()) -> Ptr Message -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Message -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Message
fromGValue GValue
gv = do
Ptr Message
ptr <- GValue -> IO (Ptr Message)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Message)
(ManagedPtr Message -> Message) -> Ptr Message -> IO Message
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Message -> Message
Message Ptr Message
ptr
class (SP.GObject o, O.IsDescendantOf Message o) => IsMessage o
instance (SP.GObject o, O.IsDescendantOf Message o) => IsMessage o
instance O.HasParentTypes Message
type instance O.ParentTypes Message = '[GObject.Object.Object]
toMessage :: (MonadIO m, IsMessage o) => o -> m Message
toMessage :: o -> m Message
toMessage = IO Message -> m Message
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Message -> m Message) -> (o -> IO Message) -> o -> m Message
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Message -> Message) -> o -> IO Message
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Message -> Message
Message
#if defined(ENABLE_OVERLOADING)
type family ResolveMessageMethod (t :: Symbol) (o :: *) :: * where
ResolveMessageMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveMessageMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveMessageMethod "contentSniffed" o = MessageContentSniffedMethodInfo
ResolveMessageMethod "disableFeature" o = MessageDisableFeatureMethodInfo
ResolveMessageMethod "finished" o = MessageFinishedMethodInfo
ResolveMessageMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveMessageMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveMessageMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveMessageMethod "gotBody" o = MessageGotBodyMethodInfo
ResolveMessageMethod "gotChunk" o = MessageGotChunkMethodInfo
ResolveMessageMethod "gotHeaders" o = MessageGotHeadersMethodInfo
ResolveMessageMethod "gotInformational" o = MessageGotInformationalMethodInfo
ResolveMessageMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveMessageMethod "isKeepalive" o = MessageIsKeepaliveMethodInfo
ResolveMessageMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveMessageMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveMessageMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveMessageMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveMessageMethod "restarted" o = MessageRestartedMethodInfo
ResolveMessageMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveMessageMethod "starting" o = MessageStartingMethodInfo
ResolveMessageMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveMessageMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveMessageMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveMessageMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveMessageMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveMessageMethod "wroteBody" o = MessageWroteBodyMethodInfo
ResolveMessageMethod "wroteBodyData" o = MessageWroteBodyDataMethodInfo
ResolveMessageMethod "wroteChunk" o = MessageWroteChunkMethodInfo
ResolveMessageMethod "wroteHeaders" o = MessageWroteHeadersMethodInfo
ResolveMessageMethod "wroteInformational" o = MessageWroteInformationalMethodInfo
ResolveMessageMethod "getAddress" o = MessageGetAddressMethodInfo
ResolveMessageMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveMessageMethod "getFirstParty" o = MessageGetFirstPartyMethodInfo
ResolveMessageMethod "getFlags" o = MessageGetFlagsMethodInfo
ResolveMessageMethod "getHttpVersion" o = MessageGetHttpVersionMethodInfo
ResolveMessageMethod "getHttpsStatus" o = MessageGetHttpsStatusMethodInfo
ResolveMessageMethod "getIsTopLevelNavigation" o = MessageGetIsTopLevelNavigationMethodInfo
ResolveMessageMethod "getPriority" o = MessageGetPriorityMethodInfo
ResolveMessageMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveMessageMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveMessageMethod "getSiteForCookies" o = MessageGetSiteForCookiesMethodInfo
ResolveMessageMethod "getSoupRequest" o = MessageGetSoupRequestMethodInfo
ResolveMessageMethod "getUri" o = MessageGetUriMethodInfo
ResolveMessageMethod "setChunkAllocator" o = MessageSetChunkAllocatorMethodInfo
ResolveMessageMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveMessageMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveMessageMethod "setFirstParty" o = MessageSetFirstPartyMethodInfo
ResolveMessageMethod "setFlags" o = MessageSetFlagsMethodInfo
ResolveMessageMethod "setHttpVersion" o = MessageSetHttpVersionMethodInfo
ResolveMessageMethod "setIsTopLevelNavigation" o = MessageSetIsTopLevelNavigationMethodInfo
ResolveMessageMethod "setPriority" o = MessageSetPriorityMethodInfo
ResolveMessageMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveMessageMethod "setRedirect" o = MessageSetRedirectMethodInfo
ResolveMessageMethod "setRequest" o = MessageSetRequestMethodInfo
ResolveMessageMethod "setResponse" o = MessageSetResponseMethodInfo
ResolveMessageMethod "setSiteForCookies" o = MessageSetSiteForCookiesMethodInfo
ResolveMessageMethod "setStatus" o = MessageSetStatusMethodInfo
ResolveMessageMethod "setStatusFull" o = MessageSetStatusFullMethodInfo
ResolveMessageMethod "setUri" o = MessageSetUriMethodInfo
ResolveMessageMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveMessageMethod t Message, O.MethodInfo info Message p) => OL.IsLabel t (Message -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
type MessageContentSniffedCallback =
T.Text
-> Map.Map T.Text T.Text
-> IO ()
noMessageContentSniffedCallback :: Maybe MessageContentSniffedCallback
noMessageContentSniffedCallback :: Maybe MessageContentSniffedCallback
noMessageContentSniffedCallback = Maybe MessageContentSniffedCallback
forall a. Maybe a
Nothing
type C_MessageContentSniffedCallback =
Ptr () ->
CString ->
Ptr (GHashTable CString CString) ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageContentSniffedCallback :: C_MessageContentSniffedCallback -> IO (FunPtr C_MessageContentSniffedCallback)
genClosure_MessageContentSniffed :: MonadIO m => MessageContentSniffedCallback -> m (GClosure C_MessageContentSniffedCallback)
genClosure_MessageContentSniffed :: MessageContentSniffedCallback
-> m (GClosure C_MessageContentSniffedCallback)
genClosure_MessageContentSniffed MessageContentSniffedCallback
cb = IO (GClosure C_MessageContentSniffedCallback)
-> m (GClosure C_MessageContentSniffedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageContentSniffedCallback)
-> m (GClosure C_MessageContentSniffedCallback))
-> IO (GClosure C_MessageContentSniffedCallback)
-> m (GClosure C_MessageContentSniffedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageContentSniffedCallback
cb' = MessageContentSniffedCallback -> C_MessageContentSniffedCallback
wrap_MessageContentSniffedCallback MessageContentSniffedCallback
cb
C_MessageContentSniffedCallback
-> IO (FunPtr C_MessageContentSniffedCallback)
mk_MessageContentSniffedCallback C_MessageContentSniffedCallback
cb' IO (FunPtr C_MessageContentSniffedCallback)
-> (FunPtr C_MessageContentSniffedCallback
-> IO (GClosure C_MessageContentSniffedCallback))
-> IO (GClosure C_MessageContentSniffedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageContentSniffedCallback
-> IO (GClosure C_MessageContentSniffedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageContentSniffedCallback ::
MessageContentSniffedCallback ->
C_MessageContentSniffedCallback
wrap_MessageContentSniffedCallback :: MessageContentSniffedCallback -> C_MessageContentSniffedCallback
wrap_MessageContentSniffedCallback MessageContentSniffedCallback
_cb Ptr ()
_ CString
type_ Ptr (GHashTable CString CString)
params Ptr ()
_ = do
Text
type_' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
type_
[(PtrWrapped CString, PtrWrapped CString)]
params' <- Ptr (GHashTable CString CString)
-> IO [(PtrWrapped CString, PtrWrapped CString)]
forall a b.
Ptr (GHashTable a b) -> IO [(PtrWrapped a, PtrWrapped b)]
unpackGHashTable Ptr (GHashTable CString CString)
params
let params'' :: [(CString, PtrWrapped CString)]
params'' = (PtrWrapped CString -> CString)
-> [(PtrWrapped CString, PtrWrapped CString)]
-> [(CString, PtrWrapped CString)]
forall a c b. (a -> c) -> [(a, b)] -> [(c, b)]
mapFirst PtrWrapped CString -> CString
cstringUnpackPtr [(PtrWrapped CString, PtrWrapped CString)]
params'
[(Text, PtrWrapped CString)]
params''' <- (CString -> IO Text)
-> [(CString, PtrWrapped CString)]
-> IO [(Text, PtrWrapped CString)]
forall (f :: * -> *) a c b.
Applicative f =>
(a -> f c) -> [(a, b)] -> f [(c, b)]
mapFirstA HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [(CString, PtrWrapped CString)]
params''
let params'''' :: [(Text, CString)]
params'''' = (PtrWrapped CString -> CString)
-> [(Text, PtrWrapped CString)] -> [(Text, CString)]
forall b c a. (b -> c) -> [(a, b)] -> [(a, c)]
mapSecond PtrWrapped CString -> CString
cstringUnpackPtr [(Text, PtrWrapped CString)]
params'''
[(Text, Text)]
params''''' <- (CString -> IO Text) -> [(Text, CString)] -> IO [(Text, Text)]
forall (f :: * -> *) b c a.
Applicative f =>
(b -> f c) -> [(a, b)] -> f [(a, c)]
mapSecondA HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [(Text, CString)]
params''''
let params'''''' :: Map Text Text
params'''''' = [(Text, Text)] -> Map Text Text
forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList [(Text, Text)]
params'''''
MessageContentSniffedCallback
_cb Text
type_' Map Text Text
params''''''
onMessageContentSniffed :: (IsMessage a, MonadIO m) => a -> MessageContentSniffedCallback -> m SignalHandlerId
onMessageContentSniffed :: a -> MessageContentSniffedCallback -> m SignalHandlerId
onMessageContentSniffed a
obj MessageContentSniffedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageContentSniffedCallback
cb' = MessageContentSniffedCallback -> C_MessageContentSniffedCallback
wrap_MessageContentSniffedCallback MessageContentSniffedCallback
cb
FunPtr C_MessageContentSniffedCallback
cb'' <- C_MessageContentSniffedCallback
-> IO (FunPtr C_MessageContentSniffedCallback)
mk_MessageContentSniffedCallback C_MessageContentSniffedCallback
cb'
a
-> Text
-> FunPtr C_MessageContentSniffedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"content-sniffed" FunPtr C_MessageContentSniffedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageContentSniffed :: (IsMessage a, MonadIO m) => a -> MessageContentSniffedCallback -> m SignalHandlerId
afterMessageContentSniffed :: a -> MessageContentSniffedCallback -> m SignalHandlerId
afterMessageContentSniffed a
obj MessageContentSniffedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageContentSniffedCallback
cb' = MessageContentSniffedCallback -> C_MessageContentSniffedCallback
wrap_MessageContentSniffedCallback MessageContentSniffedCallback
cb
FunPtr C_MessageContentSniffedCallback
cb'' <- C_MessageContentSniffedCallback
-> IO (FunPtr C_MessageContentSniffedCallback)
mk_MessageContentSniffedCallback C_MessageContentSniffedCallback
cb'
a
-> Text
-> FunPtr C_MessageContentSniffedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"content-sniffed" FunPtr C_MessageContentSniffedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageContentSniffedSignalInfo
instance SignalInfo MessageContentSniffedSignalInfo where
type HaskellCallbackType MessageContentSniffedSignalInfo = MessageContentSniffedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageContentSniffedCallback cb
cb'' <- mk_MessageContentSniffedCallback cb'
connectSignalFunPtr obj "content-sniffed" cb'' connectMode detail
#endif
type MessageFinishedCallback =
IO ()
noMessageFinishedCallback :: Maybe MessageFinishedCallback
noMessageFinishedCallback :: Maybe (IO ())
noMessageFinishedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_MessageFinishedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageFinishedCallback :: C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
genClosure_MessageFinished :: MonadIO m => MessageFinishedCallback -> m (GClosure C_MessageFinishedCallback)
genClosure_MessageFinished :: IO () -> m (GClosure C_MessageFinishedCallback)
genClosure_MessageFinished IO ()
cb = IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageFinishedCallback IO ()
cb
C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageFinishedCallback C_MessageFinishedCallback
cb' IO (FunPtr C_MessageFinishedCallback)
-> (FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageFinishedCallback ::
MessageFinishedCallback ->
C_MessageFinishedCallback
wrap_MessageFinishedCallback :: IO () -> C_MessageFinishedCallback
wrap_MessageFinishedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onMessageFinished :: (IsMessage a, MonadIO m) => a -> MessageFinishedCallback -> m SignalHandlerId
onMessageFinished :: a -> IO () -> m SignalHandlerId
onMessageFinished a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageFinishedCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageFinishedCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"finished" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageFinished :: (IsMessage a, MonadIO m) => a -> MessageFinishedCallback -> m SignalHandlerId
afterMessageFinished :: a -> IO () -> m SignalHandlerId
afterMessageFinished a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageFinishedCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageFinishedCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"finished" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageFinishedSignalInfo
instance SignalInfo MessageFinishedSignalInfo where
type HaskellCallbackType MessageFinishedSignalInfo = MessageFinishedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageFinishedCallback cb
cb'' <- mk_MessageFinishedCallback cb'
connectSignalFunPtr obj "finished" cb'' connectMode detail
#endif
type MessageGotBodyCallback =
IO ()
noMessageGotBodyCallback :: Maybe MessageGotBodyCallback
noMessageGotBodyCallback :: Maybe (IO ())
noMessageGotBodyCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_MessageGotBodyCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageGotBodyCallback :: C_MessageGotBodyCallback -> IO (FunPtr C_MessageGotBodyCallback)
genClosure_MessageGotBody :: MonadIO m => MessageGotBodyCallback -> m (GClosure C_MessageGotBodyCallback)
genClosure_MessageGotBody :: IO () -> m (GClosure C_MessageFinishedCallback)
genClosure_MessageGotBody IO ()
cb = IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageGotBodyCallback IO ()
cb
C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageGotBodyCallback C_MessageFinishedCallback
cb' IO (FunPtr C_MessageFinishedCallback)
-> (FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageGotBodyCallback ::
MessageGotBodyCallback ->
C_MessageGotBodyCallback
wrap_MessageGotBodyCallback :: IO () -> C_MessageFinishedCallback
wrap_MessageGotBodyCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onMessageGotBody :: (IsMessage a, MonadIO m) => a -> MessageGotBodyCallback -> m SignalHandlerId
onMessageGotBody :: a -> IO () -> m SignalHandlerId
onMessageGotBody a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageGotBodyCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageGotBodyCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"got-body" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageGotBody :: (IsMessage a, MonadIO m) => a -> MessageGotBodyCallback -> m SignalHandlerId
afterMessageGotBody :: a -> IO () -> m SignalHandlerId
afterMessageGotBody a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageGotBodyCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageGotBodyCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"got-body" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageGotBodySignalInfo
instance SignalInfo MessageGotBodySignalInfo where
type HaskellCallbackType MessageGotBodySignalInfo = MessageGotBodyCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageGotBodyCallback cb
cb'' <- mk_MessageGotBodyCallback cb'
connectSignalFunPtr obj "got-body" cb'' connectMode detail
#endif
type MessageGotChunkCallback =
Soup.Buffer.Buffer
-> IO ()
noMessageGotChunkCallback :: Maybe MessageGotChunkCallback
noMessageGotChunkCallback :: Maybe MessageGotChunkCallback
noMessageGotChunkCallback = Maybe MessageGotChunkCallback
forall a. Maybe a
Nothing
type C_MessageGotChunkCallback =
Ptr () ->
Ptr Soup.Buffer.Buffer ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageGotChunkCallback :: C_MessageGotChunkCallback -> IO (FunPtr C_MessageGotChunkCallback)
genClosure_MessageGotChunk :: MonadIO m => MessageGotChunkCallback -> m (GClosure C_MessageGotChunkCallback)
genClosure_MessageGotChunk :: MessageGotChunkCallback -> m (GClosure C_MessageGotChunkCallback)
genClosure_MessageGotChunk MessageGotChunkCallback
cb = IO (GClosure C_MessageGotChunkCallback)
-> m (GClosure C_MessageGotChunkCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageGotChunkCallback)
-> m (GClosure C_MessageGotChunkCallback))
-> IO (GClosure C_MessageGotChunkCallback)
-> m (GClosure C_MessageGotChunkCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageGotChunkCallback
cb' = MessageGotChunkCallback -> C_MessageGotChunkCallback
wrap_MessageGotChunkCallback MessageGotChunkCallback
cb
C_MessageGotChunkCallback -> IO (FunPtr C_MessageGotChunkCallback)
mk_MessageGotChunkCallback C_MessageGotChunkCallback
cb' IO (FunPtr C_MessageGotChunkCallback)
-> (FunPtr C_MessageGotChunkCallback
-> IO (GClosure C_MessageGotChunkCallback))
-> IO (GClosure C_MessageGotChunkCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageGotChunkCallback
-> IO (GClosure C_MessageGotChunkCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageGotChunkCallback ::
MessageGotChunkCallback ->
C_MessageGotChunkCallback
wrap_MessageGotChunkCallback :: MessageGotChunkCallback -> C_MessageGotChunkCallback
wrap_MessageGotChunkCallback MessageGotChunkCallback
_cb Ptr ()
_ Ptr Buffer
chunk Ptr ()
_ = do
(ManagedPtr Buffer -> Buffer)
-> Ptr Buffer -> MessageGotChunkCallback -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr Buffer -> Buffer
Soup.Buffer.Buffer Ptr Buffer
chunk (MessageGotChunkCallback -> IO ())
-> MessageGotChunkCallback -> IO ()
forall a b. (a -> b) -> a -> b
$ \Buffer
chunk' -> do
MessageGotChunkCallback
_cb Buffer
chunk'
onMessageGotChunk :: (IsMessage a, MonadIO m) => a -> MessageGotChunkCallback -> m SignalHandlerId
onMessageGotChunk :: a -> MessageGotChunkCallback -> m SignalHandlerId
onMessageGotChunk a
obj MessageGotChunkCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageGotChunkCallback
cb' = MessageGotChunkCallback -> C_MessageGotChunkCallback
wrap_MessageGotChunkCallback MessageGotChunkCallback
cb
FunPtr C_MessageGotChunkCallback
cb'' <- C_MessageGotChunkCallback -> IO (FunPtr C_MessageGotChunkCallback)
mk_MessageGotChunkCallback C_MessageGotChunkCallback
cb'
a
-> Text
-> FunPtr C_MessageGotChunkCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"got-chunk" FunPtr C_MessageGotChunkCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageGotChunk :: (IsMessage a, MonadIO m) => a -> MessageGotChunkCallback -> m SignalHandlerId
afterMessageGotChunk :: a -> MessageGotChunkCallback -> m SignalHandlerId
afterMessageGotChunk a
obj MessageGotChunkCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageGotChunkCallback
cb' = MessageGotChunkCallback -> C_MessageGotChunkCallback
wrap_MessageGotChunkCallback MessageGotChunkCallback
cb
FunPtr C_MessageGotChunkCallback
cb'' <- C_MessageGotChunkCallback -> IO (FunPtr C_MessageGotChunkCallback)
mk_MessageGotChunkCallback C_MessageGotChunkCallback
cb'
a
-> Text
-> FunPtr C_MessageGotChunkCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"got-chunk" FunPtr C_MessageGotChunkCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageGotChunkSignalInfo
instance SignalInfo MessageGotChunkSignalInfo where
type HaskellCallbackType MessageGotChunkSignalInfo = MessageGotChunkCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageGotChunkCallback cb
cb'' <- mk_MessageGotChunkCallback cb'
connectSignalFunPtr obj "got-chunk" cb'' connectMode detail
#endif
type =
IO ()
noMessageGotHeadersCallback :: Maybe MessageGotHeadersCallback
= Maybe (IO ())
forall a. Maybe a
Nothing
type =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
:: C_MessageGotHeadersCallback -> IO (FunPtr C_MessageGotHeadersCallback)
genClosure_MessageGotHeaders :: MonadIO m => MessageGotHeadersCallback -> m (GClosure C_MessageGotHeadersCallback)
IO ()
cb = IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageGotHeadersCallback IO ()
cb
C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageGotHeadersCallback C_MessageFinishedCallback
cb' IO (FunPtr C_MessageFinishedCallback)
-> (FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageGotHeadersCallback ::
MessageGotHeadersCallback ->
C_MessageGotHeadersCallback
IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onMessageGotHeaders :: (IsMessage a, MonadIO m) => a -> MessageGotHeadersCallback -> m SignalHandlerId
a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageGotHeadersCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageGotHeadersCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"got-headers" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageGotHeaders :: (IsMessage a, MonadIO m) => a -> MessageGotHeadersCallback -> m SignalHandlerId
a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageGotHeadersCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageGotHeadersCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"got-headers" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageGotHeadersSignalInfo
instance SignalInfo MessageGotHeadersSignalInfo where
type HaskellCallbackType MessageGotHeadersSignalInfo = MessageGotHeadersCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageGotHeadersCallback cb
cb'' <- mk_MessageGotHeadersCallback cb'
connectSignalFunPtr obj "got-headers" cb'' connectMode detail
#endif
type MessageGotInformationalCallback =
IO ()
noMessageGotInformationalCallback :: Maybe MessageGotInformationalCallback
noMessageGotInformationalCallback :: Maybe (IO ())
noMessageGotInformationalCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_MessageGotInformationalCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageGotInformationalCallback :: C_MessageGotInformationalCallback -> IO (FunPtr C_MessageGotInformationalCallback)
genClosure_MessageGotInformational :: MonadIO m => MessageGotInformationalCallback -> m (GClosure C_MessageGotInformationalCallback)
genClosure_MessageGotInformational :: IO () -> m (GClosure C_MessageFinishedCallback)
genClosure_MessageGotInformational IO ()
cb = IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageGotInformationalCallback IO ()
cb
C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageGotInformationalCallback C_MessageFinishedCallback
cb' IO (FunPtr C_MessageFinishedCallback)
-> (FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageGotInformationalCallback ::
MessageGotInformationalCallback ->
C_MessageGotInformationalCallback
wrap_MessageGotInformationalCallback :: IO () -> C_MessageFinishedCallback
wrap_MessageGotInformationalCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onMessageGotInformational :: (IsMessage a, MonadIO m) => a -> MessageGotInformationalCallback -> m SignalHandlerId
onMessageGotInformational :: a -> IO () -> m SignalHandlerId
onMessageGotInformational a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageGotInformationalCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageGotInformationalCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"got-informational" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageGotInformational :: (IsMessage a, MonadIO m) => a -> MessageGotInformationalCallback -> m SignalHandlerId
afterMessageGotInformational :: a -> IO () -> m SignalHandlerId
afterMessageGotInformational a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageGotInformationalCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageGotInformationalCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"got-informational" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageGotInformationalSignalInfo
instance SignalInfo MessageGotInformationalSignalInfo where
type HaskellCallbackType MessageGotInformationalSignalInfo = MessageGotInformationalCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageGotInformationalCallback cb
cb'' <- mk_MessageGotInformationalCallback cb'
connectSignalFunPtr obj "got-informational" cb'' connectMode detail
#endif
type MessageNetworkEventCallback =
Gio.Enums.SocketClientEvent
-> Gio.IOStream.IOStream
-> IO ()
noMessageNetworkEventCallback :: Maybe MessageNetworkEventCallback
noMessageNetworkEventCallback :: Maybe MessageNetworkEventCallback
noMessageNetworkEventCallback = Maybe MessageNetworkEventCallback
forall a. Maybe a
Nothing
type C_MessageNetworkEventCallback =
Ptr () ->
CUInt ->
Ptr Gio.IOStream.IOStream ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageNetworkEventCallback :: C_MessageNetworkEventCallback -> IO (FunPtr C_MessageNetworkEventCallback)
genClosure_MessageNetworkEvent :: MonadIO m => MessageNetworkEventCallback -> m (GClosure C_MessageNetworkEventCallback)
genClosure_MessageNetworkEvent :: MessageNetworkEventCallback
-> m (GClosure C_MessageNetworkEventCallback)
genClosure_MessageNetworkEvent MessageNetworkEventCallback
cb = IO (GClosure C_MessageNetworkEventCallback)
-> m (GClosure C_MessageNetworkEventCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageNetworkEventCallback)
-> m (GClosure C_MessageNetworkEventCallback))
-> IO (GClosure C_MessageNetworkEventCallback)
-> m (GClosure C_MessageNetworkEventCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageNetworkEventCallback
cb' = MessageNetworkEventCallback -> C_MessageNetworkEventCallback
wrap_MessageNetworkEventCallback MessageNetworkEventCallback
cb
C_MessageNetworkEventCallback
-> IO (FunPtr C_MessageNetworkEventCallback)
mk_MessageNetworkEventCallback C_MessageNetworkEventCallback
cb' IO (FunPtr C_MessageNetworkEventCallback)
-> (FunPtr C_MessageNetworkEventCallback
-> IO (GClosure C_MessageNetworkEventCallback))
-> IO (GClosure C_MessageNetworkEventCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageNetworkEventCallback
-> IO (GClosure C_MessageNetworkEventCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageNetworkEventCallback ::
MessageNetworkEventCallback ->
C_MessageNetworkEventCallback
wrap_MessageNetworkEventCallback :: MessageNetworkEventCallback -> C_MessageNetworkEventCallback
wrap_MessageNetworkEventCallback MessageNetworkEventCallback
_cb Ptr ()
_ CUInt
event Ptr IOStream
connection Ptr ()
_ = do
let event' :: SocketClientEvent
event' = (Int -> SocketClientEvent
forall a. Enum a => Int -> a
toEnum (Int -> SocketClientEvent)
-> (CUInt -> Int) -> CUInt -> SocketClientEvent
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
event
IOStream
connection' <- ((ManagedPtr IOStream -> IOStream) -> Ptr IOStream -> IO IOStream
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr IOStream -> IOStream
Gio.IOStream.IOStream) Ptr IOStream
connection
MessageNetworkEventCallback
_cb SocketClientEvent
event' IOStream
connection'
onMessageNetworkEvent :: (IsMessage a, MonadIO m) => a -> MessageNetworkEventCallback -> m SignalHandlerId
onMessageNetworkEvent :: a -> MessageNetworkEventCallback -> m SignalHandlerId
onMessageNetworkEvent a
obj MessageNetworkEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageNetworkEventCallback
cb' = MessageNetworkEventCallback -> C_MessageNetworkEventCallback
wrap_MessageNetworkEventCallback MessageNetworkEventCallback
cb
FunPtr C_MessageNetworkEventCallback
cb'' <- C_MessageNetworkEventCallback
-> IO (FunPtr C_MessageNetworkEventCallback)
mk_MessageNetworkEventCallback C_MessageNetworkEventCallback
cb'
a
-> Text
-> FunPtr C_MessageNetworkEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"network-event" FunPtr C_MessageNetworkEventCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageNetworkEvent :: (IsMessage a, MonadIO m) => a -> MessageNetworkEventCallback -> m SignalHandlerId
afterMessageNetworkEvent :: a -> MessageNetworkEventCallback -> m SignalHandlerId
afterMessageNetworkEvent a
obj MessageNetworkEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageNetworkEventCallback
cb' = MessageNetworkEventCallback -> C_MessageNetworkEventCallback
wrap_MessageNetworkEventCallback MessageNetworkEventCallback
cb
FunPtr C_MessageNetworkEventCallback
cb'' <- C_MessageNetworkEventCallback
-> IO (FunPtr C_MessageNetworkEventCallback)
mk_MessageNetworkEventCallback C_MessageNetworkEventCallback
cb'
a
-> Text
-> FunPtr C_MessageNetworkEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"network-event" FunPtr C_MessageNetworkEventCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageNetworkEventSignalInfo
instance SignalInfo MessageNetworkEventSignalInfo where
type HaskellCallbackType MessageNetworkEventSignalInfo = MessageNetworkEventCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageNetworkEventCallback cb
cb'' <- mk_MessageNetworkEventCallback cb'
connectSignalFunPtr obj "network-event" cb'' connectMode detail
#endif
type MessageRestartedCallback =
IO ()
noMessageRestartedCallback :: Maybe MessageRestartedCallback
noMessageRestartedCallback :: Maybe (IO ())
noMessageRestartedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_MessageRestartedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageRestartedCallback :: C_MessageRestartedCallback -> IO (FunPtr C_MessageRestartedCallback)
genClosure_MessageRestarted :: MonadIO m => MessageRestartedCallback -> m (GClosure C_MessageRestartedCallback)
genClosure_MessageRestarted :: IO () -> m (GClosure C_MessageFinishedCallback)
genClosure_MessageRestarted IO ()
cb = IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageRestartedCallback IO ()
cb
C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageRestartedCallback C_MessageFinishedCallback
cb' IO (FunPtr C_MessageFinishedCallback)
-> (FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageRestartedCallback ::
MessageRestartedCallback ->
C_MessageRestartedCallback
wrap_MessageRestartedCallback :: IO () -> C_MessageFinishedCallback
wrap_MessageRestartedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onMessageRestarted :: (IsMessage a, MonadIO m) => a -> MessageRestartedCallback -> m SignalHandlerId
onMessageRestarted :: a -> IO () -> m SignalHandlerId
onMessageRestarted a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageRestartedCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageRestartedCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"restarted" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageRestarted :: (IsMessage a, MonadIO m) => a -> MessageRestartedCallback -> m SignalHandlerId
afterMessageRestarted :: a -> IO () -> m SignalHandlerId
afterMessageRestarted a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageRestartedCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageRestartedCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"restarted" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageRestartedSignalInfo
instance SignalInfo MessageRestartedSignalInfo where
type HaskellCallbackType MessageRestartedSignalInfo = MessageRestartedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageRestartedCallback cb
cb'' <- mk_MessageRestartedCallback cb'
connectSignalFunPtr obj "restarted" cb'' connectMode detail
#endif
type MessageStartingCallback =
IO ()
noMessageStartingCallback :: Maybe MessageStartingCallback
noMessageStartingCallback :: Maybe (IO ())
noMessageStartingCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_MessageStartingCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageStartingCallback :: C_MessageStartingCallback -> IO (FunPtr C_MessageStartingCallback)
genClosure_MessageStarting :: MonadIO m => MessageStartingCallback -> m (GClosure C_MessageStartingCallback)
genClosure_MessageStarting :: IO () -> m (GClosure C_MessageFinishedCallback)
genClosure_MessageStarting IO ()
cb = IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageStartingCallback IO ()
cb
C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageStartingCallback C_MessageFinishedCallback
cb' IO (FunPtr C_MessageFinishedCallback)
-> (FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageStartingCallback ::
MessageStartingCallback ->
C_MessageStartingCallback
wrap_MessageStartingCallback :: IO () -> C_MessageFinishedCallback
wrap_MessageStartingCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onMessageStarting :: (IsMessage a, MonadIO m) => a -> MessageStartingCallback -> m SignalHandlerId
onMessageStarting :: a -> IO () -> m SignalHandlerId
onMessageStarting a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageStartingCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageStartingCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"starting" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageStarting :: (IsMessage a, MonadIO m) => a -> MessageStartingCallback -> m SignalHandlerId
afterMessageStarting :: a -> IO () -> m SignalHandlerId
afterMessageStarting a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageStartingCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageStartingCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"starting" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageStartingSignalInfo
instance SignalInfo MessageStartingSignalInfo where
type HaskellCallbackType MessageStartingSignalInfo = MessageStartingCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageStartingCallback cb
cb'' <- mk_MessageStartingCallback cb'
connectSignalFunPtr obj "starting" cb'' connectMode detail
#endif
type MessageWroteBodyCallback =
IO ()
noMessageWroteBodyCallback :: Maybe MessageWroteBodyCallback
noMessageWroteBodyCallback :: Maybe (IO ())
noMessageWroteBodyCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_MessageWroteBodyCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageWroteBodyCallback :: C_MessageWroteBodyCallback -> IO (FunPtr C_MessageWroteBodyCallback)
genClosure_MessageWroteBody :: MonadIO m => MessageWroteBodyCallback -> m (GClosure C_MessageWroteBodyCallback)
genClosure_MessageWroteBody :: IO () -> m (GClosure C_MessageFinishedCallback)
genClosure_MessageWroteBody IO ()
cb = IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteBodyCallback IO ()
cb
C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteBodyCallback C_MessageFinishedCallback
cb' IO (FunPtr C_MessageFinishedCallback)
-> (FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageWroteBodyCallback ::
MessageWroteBodyCallback ->
C_MessageWroteBodyCallback
wrap_MessageWroteBodyCallback :: IO () -> C_MessageFinishedCallback
wrap_MessageWroteBodyCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onMessageWroteBody :: (IsMessage a, MonadIO m) => a -> MessageWroteBodyCallback -> m SignalHandlerId
onMessageWroteBody :: a -> IO () -> m SignalHandlerId
onMessageWroteBody a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteBodyCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteBodyCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"wrote-body" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageWroteBody :: (IsMessage a, MonadIO m) => a -> MessageWroteBodyCallback -> m SignalHandlerId
afterMessageWroteBody :: a -> IO () -> m SignalHandlerId
afterMessageWroteBody a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteBodyCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteBodyCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"wrote-body" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageWroteBodySignalInfo
instance SignalInfo MessageWroteBodySignalInfo where
type HaskellCallbackType MessageWroteBodySignalInfo = MessageWroteBodyCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageWroteBodyCallback cb
cb'' <- mk_MessageWroteBodyCallback cb'
connectSignalFunPtr obj "wrote-body" cb'' connectMode detail
#endif
type MessageWroteBodyDataCallback =
Soup.Buffer.Buffer
-> IO ()
noMessageWroteBodyDataCallback :: Maybe MessageWroteBodyDataCallback
noMessageWroteBodyDataCallback :: Maybe MessageGotChunkCallback
noMessageWroteBodyDataCallback = Maybe MessageGotChunkCallback
forall a. Maybe a
Nothing
type C_MessageWroteBodyDataCallback =
Ptr () ->
Ptr Soup.Buffer.Buffer ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageWroteBodyDataCallback :: C_MessageWroteBodyDataCallback -> IO (FunPtr C_MessageWroteBodyDataCallback)
genClosure_MessageWroteBodyData :: MonadIO m => MessageWroteBodyDataCallback -> m (GClosure C_MessageWroteBodyDataCallback)
genClosure_MessageWroteBodyData :: MessageGotChunkCallback -> m (GClosure C_MessageGotChunkCallback)
genClosure_MessageWroteBodyData MessageGotChunkCallback
cb = IO (GClosure C_MessageGotChunkCallback)
-> m (GClosure C_MessageGotChunkCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageGotChunkCallback)
-> m (GClosure C_MessageGotChunkCallback))
-> IO (GClosure C_MessageGotChunkCallback)
-> m (GClosure C_MessageGotChunkCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageGotChunkCallback
cb' = MessageGotChunkCallback -> C_MessageGotChunkCallback
wrap_MessageWroteBodyDataCallback MessageGotChunkCallback
cb
C_MessageGotChunkCallback -> IO (FunPtr C_MessageGotChunkCallback)
mk_MessageWroteBodyDataCallback C_MessageGotChunkCallback
cb' IO (FunPtr C_MessageGotChunkCallback)
-> (FunPtr C_MessageGotChunkCallback
-> IO (GClosure C_MessageGotChunkCallback))
-> IO (GClosure C_MessageGotChunkCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageGotChunkCallback
-> IO (GClosure C_MessageGotChunkCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageWroteBodyDataCallback ::
MessageWroteBodyDataCallback ->
C_MessageWroteBodyDataCallback
wrap_MessageWroteBodyDataCallback :: MessageGotChunkCallback -> C_MessageGotChunkCallback
wrap_MessageWroteBodyDataCallback MessageGotChunkCallback
_cb Ptr ()
_ Ptr Buffer
chunk Ptr ()
_ = do
(ManagedPtr Buffer -> Buffer)
-> Ptr Buffer -> MessageGotChunkCallback -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr Buffer -> Buffer
Soup.Buffer.Buffer Ptr Buffer
chunk (MessageGotChunkCallback -> IO ())
-> MessageGotChunkCallback -> IO ()
forall a b. (a -> b) -> a -> b
$ \Buffer
chunk' -> do
MessageGotChunkCallback
_cb Buffer
chunk'
onMessageWroteBodyData :: (IsMessage a, MonadIO m) => a -> MessageWroteBodyDataCallback -> m SignalHandlerId
onMessageWroteBodyData :: a -> MessageGotChunkCallback -> m SignalHandlerId
onMessageWroteBodyData a
obj MessageGotChunkCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageGotChunkCallback
cb' = MessageGotChunkCallback -> C_MessageGotChunkCallback
wrap_MessageWroteBodyDataCallback MessageGotChunkCallback
cb
FunPtr C_MessageGotChunkCallback
cb'' <- C_MessageGotChunkCallback -> IO (FunPtr C_MessageGotChunkCallback)
mk_MessageWroteBodyDataCallback C_MessageGotChunkCallback
cb'
a
-> Text
-> FunPtr C_MessageGotChunkCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"wrote-body-data" FunPtr C_MessageGotChunkCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageWroteBodyData :: (IsMessage a, MonadIO m) => a -> MessageWroteBodyDataCallback -> m SignalHandlerId
afterMessageWroteBodyData :: a -> MessageGotChunkCallback -> m SignalHandlerId
afterMessageWroteBodyData a
obj MessageGotChunkCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageGotChunkCallback
cb' = MessageGotChunkCallback -> C_MessageGotChunkCallback
wrap_MessageWroteBodyDataCallback MessageGotChunkCallback
cb
FunPtr C_MessageGotChunkCallback
cb'' <- C_MessageGotChunkCallback -> IO (FunPtr C_MessageGotChunkCallback)
mk_MessageWroteBodyDataCallback C_MessageGotChunkCallback
cb'
a
-> Text
-> FunPtr C_MessageGotChunkCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"wrote-body-data" FunPtr C_MessageGotChunkCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageWroteBodyDataSignalInfo
instance SignalInfo MessageWroteBodyDataSignalInfo where
type HaskellCallbackType MessageWroteBodyDataSignalInfo = MessageWroteBodyDataCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageWroteBodyDataCallback cb
cb'' <- mk_MessageWroteBodyDataCallback cb'
connectSignalFunPtr obj "wrote-body-data" cb'' connectMode detail
#endif
type MessageWroteChunkCallback =
IO ()
noMessageWroteChunkCallback :: Maybe MessageWroteChunkCallback
noMessageWroteChunkCallback :: Maybe (IO ())
noMessageWroteChunkCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_MessageWroteChunkCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageWroteChunkCallback :: C_MessageWroteChunkCallback -> IO (FunPtr C_MessageWroteChunkCallback)
genClosure_MessageWroteChunk :: MonadIO m => MessageWroteChunkCallback -> m (GClosure C_MessageWroteChunkCallback)
genClosure_MessageWroteChunk :: IO () -> m (GClosure C_MessageFinishedCallback)
genClosure_MessageWroteChunk IO ()
cb = IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteChunkCallback IO ()
cb
C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteChunkCallback C_MessageFinishedCallback
cb' IO (FunPtr C_MessageFinishedCallback)
-> (FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageWroteChunkCallback ::
MessageWroteChunkCallback ->
C_MessageWroteChunkCallback
wrap_MessageWroteChunkCallback :: IO () -> C_MessageFinishedCallback
wrap_MessageWroteChunkCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onMessageWroteChunk :: (IsMessage a, MonadIO m) => a -> MessageWroteChunkCallback -> m SignalHandlerId
onMessageWroteChunk :: a -> IO () -> m SignalHandlerId
onMessageWroteChunk a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteChunkCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteChunkCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"wrote-chunk" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageWroteChunk :: (IsMessage a, MonadIO m) => a -> MessageWroteChunkCallback -> m SignalHandlerId
afterMessageWroteChunk :: a -> IO () -> m SignalHandlerId
afterMessageWroteChunk a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteChunkCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteChunkCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"wrote-chunk" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageWroteChunkSignalInfo
instance SignalInfo MessageWroteChunkSignalInfo where
type HaskellCallbackType MessageWroteChunkSignalInfo = MessageWroteChunkCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageWroteChunkCallback cb
cb'' <- mk_MessageWroteChunkCallback cb'
connectSignalFunPtr obj "wrote-chunk" cb'' connectMode detail
#endif
type =
IO ()
noMessageWroteHeadersCallback :: Maybe MessageWroteHeadersCallback
= Maybe (IO ())
forall a. Maybe a
Nothing
type =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
:: C_MessageWroteHeadersCallback -> IO (FunPtr C_MessageWroteHeadersCallback)
genClosure_MessageWroteHeaders :: MonadIO m => MessageWroteHeadersCallback -> m (GClosure C_MessageWroteHeadersCallback)
IO ()
cb = IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteHeadersCallback IO ()
cb
C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteHeadersCallback C_MessageFinishedCallback
cb' IO (FunPtr C_MessageFinishedCallback)
-> (FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageWroteHeadersCallback ::
MessageWroteHeadersCallback ->
C_MessageWroteHeadersCallback
IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onMessageWroteHeaders :: (IsMessage a, MonadIO m) => a -> MessageWroteHeadersCallback -> m SignalHandlerId
a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteHeadersCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteHeadersCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"wrote-headers" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageWroteHeaders :: (IsMessage a, MonadIO m) => a -> MessageWroteHeadersCallback -> m SignalHandlerId
a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteHeadersCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteHeadersCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"wrote-headers" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageWroteHeadersSignalInfo
instance SignalInfo MessageWroteHeadersSignalInfo where
type HaskellCallbackType MessageWroteHeadersSignalInfo = MessageWroteHeadersCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageWroteHeadersCallback cb
cb'' <- mk_MessageWroteHeadersCallback cb'
connectSignalFunPtr obj "wrote-headers" cb'' connectMode detail
#endif
type MessageWroteInformationalCallback =
IO ()
noMessageWroteInformationalCallback :: Maybe MessageWroteInformationalCallback
noMessageWroteInformationalCallback :: Maybe (IO ())
noMessageWroteInformationalCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_MessageWroteInformationalCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MessageWroteInformationalCallback :: C_MessageWroteInformationalCallback -> IO (FunPtr C_MessageWroteInformationalCallback)
genClosure_MessageWroteInformational :: MonadIO m => MessageWroteInformationalCallback -> m (GClosure C_MessageWroteInformationalCallback)
genClosure_MessageWroteInformational :: IO () -> m (GClosure C_MessageFinishedCallback)
genClosure_MessageWroteInformational IO ()
cb = IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
-> m (GClosure C_MessageFinishedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteInformationalCallback IO ()
cb
C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteInformationalCallback C_MessageFinishedCallback
cb' IO (FunPtr C_MessageFinishedCallback)
-> (FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback))
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MessageFinishedCallback
-> IO (GClosure C_MessageFinishedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MessageWroteInformationalCallback ::
MessageWroteInformationalCallback ->
C_MessageWroteInformationalCallback
wrap_MessageWroteInformationalCallback :: IO () -> C_MessageFinishedCallback
wrap_MessageWroteInformationalCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onMessageWroteInformational :: (IsMessage a, MonadIO m) => a -> MessageWroteInformationalCallback -> m SignalHandlerId
onMessageWroteInformational :: a -> IO () -> m SignalHandlerId
onMessageWroteInformational a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteInformationalCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteInformationalCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"wrote-informational" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterMessageWroteInformational :: (IsMessage a, MonadIO m) => a -> MessageWroteInformationalCallback -> m SignalHandlerId
afterMessageWroteInformational :: a -> IO () -> m SignalHandlerId
afterMessageWroteInformational a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MessageFinishedCallback
cb' = IO () -> C_MessageFinishedCallback
wrap_MessageWroteInformationalCallback IO ()
cb
FunPtr C_MessageFinishedCallback
cb'' <- C_MessageFinishedCallback -> IO (FunPtr C_MessageFinishedCallback)
mk_MessageWroteInformationalCallback C_MessageFinishedCallback
cb'
a
-> Text
-> FunPtr C_MessageFinishedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"wrote-informational" FunPtr C_MessageFinishedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data MessageWroteInformationalSignalInfo
instance SignalInfo MessageWroteInformationalSignalInfo where
type HaskellCallbackType MessageWroteInformationalSignalInfo = MessageWroteInformationalCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_MessageWroteInformationalCallback cb
cb'' <- mk_MessageWroteInformationalCallback cb'
connectSignalFunPtr obj "wrote-informational" cb'' connectMode detail
#endif
getMessageFirstParty :: (MonadIO m, IsMessage o) => o -> m Soup.URI.URI
getMessageFirstParty :: o -> m URI
getMessageFirstParty o
obj = IO URI -> m URI
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO URI -> m URI) -> IO URI -> m URI
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe URI) -> IO URI
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getMessageFirstParty" (IO (Maybe URI) -> IO URI) -> IO (Maybe URI) -> IO URI
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr URI -> URI) -> IO (Maybe URI)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"first-party" ManagedPtr URI -> URI
Soup.URI.URI
setMessageFirstParty :: (MonadIO m, IsMessage o) => o -> Soup.URI.URI -> m ()
setMessageFirstParty :: o -> URI -> m ()
setMessageFirstParty o
obj URI
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe URI -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"first-party" (URI -> Maybe URI
forall a. a -> Maybe a
Just URI
val)
constructMessageFirstParty :: (IsMessage o, MIO.MonadIO m) => Soup.URI.URI -> m (GValueConstruct o)
constructMessageFirstParty :: URI -> m (GValueConstruct o)
constructMessageFirstParty URI
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe URI -> IO (GValueConstruct o)
forall a o. GBoxed a => String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed String
"first-party" (URI -> Maybe URI
forall a. a -> Maybe a
P.Just URI
val)
#if defined(ENABLE_OVERLOADING)
data MessageFirstPartyPropertyInfo
instance AttrInfo MessageFirstPartyPropertyInfo where
type AttrAllowedOps MessageFirstPartyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MessageFirstPartyPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageFirstPartyPropertyInfo = (~) Soup.URI.URI
type AttrTransferTypeConstraint MessageFirstPartyPropertyInfo = (~) Soup.URI.URI
type AttrTransferType MessageFirstPartyPropertyInfo = Soup.URI.URI
type AttrGetType MessageFirstPartyPropertyInfo = Soup.URI.URI
type AttrLabel MessageFirstPartyPropertyInfo = "first-party"
type AttrOrigin MessageFirstPartyPropertyInfo = Message
attrGet = getMessageFirstParty
attrSet = setMessageFirstParty
attrTransfer _ v = do
return v
attrConstruct = constructMessageFirstParty
attrClear = undefined
#endif
getMessageFlags :: (MonadIO m, IsMessage o) => o -> m [Soup.Flags.MessageFlags]
getMessageFlags :: o -> m [MessageFlags]
getMessageFlags o
obj = IO [MessageFlags] -> m [MessageFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [MessageFlags] -> m [MessageFlags])
-> IO [MessageFlags] -> m [MessageFlags]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [MessageFlags]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"flags"
setMessageFlags :: (MonadIO m, IsMessage o) => o -> [Soup.Flags.MessageFlags] -> m ()
setMessageFlags :: o -> [MessageFlags] -> m ()
setMessageFlags o
obj [MessageFlags]
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> [MessageFlags] -> IO ()
forall a b.
(IsGFlag b, BoxedFlags b, GObject a) =>
a -> String -> [b] -> IO ()
B.Properties.setObjectPropertyFlags o
obj String
"flags" [MessageFlags]
val
constructMessageFlags :: (IsMessage o, MIO.MonadIO m) => [Soup.Flags.MessageFlags] -> m (GValueConstruct o)
constructMessageFlags :: [MessageFlags] -> m (GValueConstruct o)
constructMessageFlags [MessageFlags]
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> [MessageFlags] -> IO (GValueConstruct o)
forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags String
"flags" [MessageFlags]
val
#if defined(ENABLE_OVERLOADING)
data MessageFlagsPropertyInfo
instance AttrInfo MessageFlagsPropertyInfo where
type AttrAllowedOps MessageFlagsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MessageFlagsPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageFlagsPropertyInfo = (~) [Soup.Flags.MessageFlags]
type AttrTransferTypeConstraint MessageFlagsPropertyInfo = (~) [Soup.Flags.MessageFlags]
type AttrTransferType MessageFlagsPropertyInfo = [Soup.Flags.MessageFlags]
type AttrGetType MessageFlagsPropertyInfo = [Soup.Flags.MessageFlags]
type AttrLabel MessageFlagsPropertyInfo = "flags"
type AttrOrigin MessageFlagsPropertyInfo = Message
attrGet = getMessageFlags
attrSet = setMessageFlags
attrTransfer _ v = do
return v
attrConstruct = constructMessageFlags
attrClear = undefined
#endif
getMessageHttpVersion :: (MonadIO m, IsMessage o) => o -> m Soup.Enums.HTTPVersion
getMessageHttpVersion :: o -> m HTTPVersion
getMessageHttpVersion o
obj = IO HTTPVersion -> m HTTPVersion
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO HTTPVersion -> m HTTPVersion)
-> IO HTTPVersion -> m HTTPVersion
forall a b. (a -> b) -> a -> b
$ o -> String -> IO HTTPVersion
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"http-version"
setMessageHttpVersion :: (MonadIO m, IsMessage o) => o -> Soup.Enums.HTTPVersion -> m ()
setMessageHttpVersion :: o -> HTTPVersion -> m ()
setMessageHttpVersion o
obj HTTPVersion
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> HTTPVersion -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"http-version" HTTPVersion
val
constructMessageHttpVersion :: (IsMessage o, MIO.MonadIO m) => Soup.Enums.HTTPVersion -> m (GValueConstruct o)
constructMessageHttpVersion :: HTTPVersion -> m (GValueConstruct o)
constructMessageHttpVersion HTTPVersion
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> HTTPVersion -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"http-version" HTTPVersion
val
#if defined(ENABLE_OVERLOADING)
data MessageHttpVersionPropertyInfo
instance AttrInfo MessageHttpVersionPropertyInfo where
type AttrAllowedOps MessageHttpVersionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MessageHttpVersionPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageHttpVersionPropertyInfo = (~) Soup.Enums.HTTPVersion
type AttrTransferTypeConstraint MessageHttpVersionPropertyInfo = (~) Soup.Enums.HTTPVersion
type AttrTransferType MessageHttpVersionPropertyInfo = Soup.Enums.HTTPVersion
type AttrGetType MessageHttpVersionPropertyInfo = Soup.Enums.HTTPVersion
type AttrLabel MessageHttpVersionPropertyInfo = "http-version"
type AttrOrigin MessageHttpVersionPropertyInfo = Message
attrGet = getMessageHttpVersion
attrSet = setMessageHttpVersion
attrTransfer _ v = do
return v
attrConstruct = constructMessageHttpVersion
attrClear = undefined
#endif
getMessageIsTopLevelNavigation :: (MonadIO m, IsMessage o) => o -> m Bool
getMessageIsTopLevelNavigation :: o -> m Bool
getMessageIsTopLevelNavigation o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"is-top-level-navigation"
setMessageIsTopLevelNavigation :: (MonadIO m, IsMessage o) => o -> Bool -> m ()
setMessageIsTopLevelNavigation :: o -> Bool -> m ()
setMessageIsTopLevelNavigation o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"is-top-level-navigation" Bool
val
constructMessageIsTopLevelNavigation :: (IsMessage o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructMessageIsTopLevelNavigation :: Bool -> m (GValueConstruct o)
constructMessageIsTopLevelNavigation Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"is-top-level-navigation" Bool
val
#if defined(ENABLE_OVERLOADING)
data MessageIsTopLevelNavigationPropertyInfo
instance AttrInfo MessageIsTopLevelNavigationPropertyInfo where
type AttrAllowedOps MessageIsTopLevelNavigationPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MessageIsTopLevelNavigationPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageIsTopLevelNavigationPropertyInfo = (~) Bool
type AttrTransferTypeConstraint MessageIsTopLevelNavigationPropertyInfo = (~) Bool
type AttrTransferType MessageIsTopLevelNavigationPropertyInfo = Bool
type AttrGetType MessageIsTopLevelNavigationPropertyInfo = Bool
type AttrLabel MessageIsTopLevelNavigationPropertyInfo = "is-top-level-navigation"
type AttrOrigin MessageIsTopLevelNavigationPropertyInfo = Message
attrGet = getMessageIsTopLevelNavigation
attrSet = setMessageIsTopLevelNavigation
attrTransfer _ v = do
return v
attrConstruct = constructMessageIsTopLevelNavigation
attrClear = undefined
#endif
getMessageMethod :: (MonadIO m, IsMessage o) => o -> m (Maybe T.Text)
getMessageMethod :: o -> m (Maybe Text)
getMessageMethod o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"method"
setMessageMethod :: (MonadIO m, IsMessage o) => o -> T.Text -> m ()
setMessageMethod :: o -> Text -> m ()
setMessageMethod o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"method" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructMessageMethod :: (IsMessage o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructMessageMethod :: Text -> m (GValueConstruct o)
constructMessageMethod Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"method" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearMessageMethod :: (MonadIO m, IsMessage o) => o -> m ()
clearMessageMethod :: o -> m ()
clearMessageMethod o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"method" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data MessageMethodPropertyInfo
instance AttrInfo MessageMethodPropertyInfo where
type AttrAllowedOps MessageMethodPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MessageMethodPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageMethodPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint MessageMethodPropertyInfo = (~) T.Text
type AttrTransferType MessageMethodPropertyInfo = T.Text
type AttrGetType MessageMethodPropertyInfo = (Maybe T.Text)
type AttrLabel MessageMethodPropertyInfo = "method"
type AttrOrigin MessageMethodPropertyInfo = Message
attrGet = getMessageMethod
attrSet = setMessageMethod
attrTransfer _ v = do
return v
attrConstruct = constructMessageMethod
attrClear = clearMessageMethod
#endif
getMessagePriority :: (MonadIO m, IsMessage o) => o -> m Soup.Enums.MessagePriority
getMessagePriority :: o -> m MessagePriority
getMessagePriority o
obj = IO MessagePriority -> m MessagePriority
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MessagePriority -> m MessagePriority)
-> IO MessagePriority -> m MessagePriority
forall a b. (a -> b) -> a -> b
$ o -> String -> IO MessagePriority
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"priority"
setMessagePriority :: (MonadIO m, IsMessage o) => o -> Soup.Enums.MessagePriority -> m ()
setMessagePriority :: o -> MessagePriority -> m ()
setMessagePriority o
obj MessagePriority
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> MessagePriority -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"priority" MessagePriority
val
constructMessagePriority :: (IsMessage o, MIO.MonadIO m) => Soup.Enums.MessagePriority -> m (GValueConstruct o)
constructMessagePriority :: MessagePriority -> m (GValueConstruct o)
constructMessagePriority MessagePriority
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> MessagePriority -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"priority" MessagePriority
val
#if defined(ENABLE_OVERLOADING)
data MessagePriorityPropertyInfo
instance AttrInfo MessagePriorityPropertyInfo where
type AttrAllowedOps MessagePriorityPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MessagePriorityPropertyInfo = IsMessage
type AttrSetTypeConstraint MessagePriorityPropertyInfo = (~) Soup.Enums.MessagePriority
type AttrTransferTypeConstraint MessagePriorityPropertyInfo = (~) Soup.Enums.MessagePriority
type AttrTransferType MessagePriorityPropertyInfo = Soup.Enums.MessagePriority
type AttrGetType MessagePriorityPropertyInfo = Soup.Enums.MessagePriority
type AttrLabel MessagePriorityPropertyInfo = "priority"
type AttrOrigin MessagePriorityPropertyInfo = Message
attrGet = getMessagePriority
attrSet = setMessagePriority
attrTransfer _ v = do
return v
attrConstruct = constructMessagePriority
attrClear = undefined
#endif
getMessageReasonPhrase :: (MonadIO m, IsMessage o) => o -> m (Maybe T.Text)
getMessageReasonPhrase :: o -> m (Maybe Text)
getMessageReasonPhrase o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"reason-phrase"
setMessageReasonPhrase :: (MonadIO m, IsMessage o) => o -> T.Text -> m ()
setMessageReasonPhrase :: o -> Text -> m ()
setMessageReasonPhrase o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"reason-phrase" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructMessageReasonPhrase :: (IsMessage o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructMessageReasonPhrase :: Text -> m (GValueConstruct o)
constructMessageReasonPhrase Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"reason-phrase" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearMessageReasonPhrase :: (MonadIO m, IsMessage o) => o -> m ()
clearMessageReasonPhrase :: o -> m ()
clearMessageReasonPhrase o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"reason-phrase" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data MessageReasonPhrasePropertyInfo
instance AttrInfo MessageReasonPhrasePropertyInfo where
type AttrAllowedOps MessageReasonPhrasePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MessageReasonPhrasePropertyInfo = IsMessage
type AttrSetTypeConstraint MessageReasonPhrasePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint MessageReasonPhrasePropertyInfo = (~) T.Text
type AttrTransferType MessageReasonPhrasePropertyInfo = T.Text
type AttrGetType MessageReasonPhrasePropertyInfo = (Maybe T.Text)
type AttrLabel MessageReasonPhrasePropertyInfo = "reason-phrase"
type AttrOrigin MessageReasonPhrasePropertyInfo = Message
attrGet = getMessageReasonPhrase
attrSet = setMessageReasonPhrase
attrTransfer _ v = do
return v
attrConstruct = constructMessageReasonPhrase
attrClear = clearMessageReasonPhrase
#endif
getMessageRequestBody :: (MonadIO m, IsMessage o) => o -> m (Maybe Soup.MessageBody.MessageBody)
getMessageRequestBody :: o -> m (Maybe MessageBody)
getMessageRequestBody o
obj = IO (Maybe MessageBody) -> m (Maybe MessageBody)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MessageBody) -> m (Maybe MessageBody))
-> IO (Maybe MessageBody) -> m (Maybe MessageBody)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr MessageBody -> MessageBody)
-> IO (Maybe MessageBody)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"request-body" ManagedPtr MessageBody -> MessageBody
Soup.MessageBody.MessageBody
#if defined(ENABLE_OVERLOADING)
data MessageRequestBodyPropertyInfo
instance AttrInfo MessageRequestBodyPropertyInfo where
type AttrAllowedOps MessageRequestBodyPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MessageRequestBodyPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageRequestBodyPropertyInfo = (~) ()
type AttrTransferTypeConstraint MessageRequestBodyPropertyInfo = (~) ()
type AttrTransferType MessageRequestBodyPropertyInfo = ()
type AttrGetType MessageRequestBodyPropertyInfo = (Maybe Soup.MessageBody.MessageBody)
type AttrLabel MessageRequestBodyPropertyInfo = "request-body"
type AttrOrigin MessageRequestBodyPropertyInfo = Message
attrGet = getMessageRequestBody
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getMessageRequestBodyData :: (MonadIO m, IsMessage o) => o -> m (Maybe GLib.Bytes.Bytes)
getMessageRequestBodyData :: o -> m (Maybe Bytes)
getMessageRequestBodyData o
obj = IO (Maybe Bytes) -> m (Maybe Bytes)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Bytes) -> m (Maybe Bytes))
-> IO (Maybe Bytes) -> m (Maybe Bytes)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Bytes -> Bytes) -> IO (Maybe Bytes)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"request-body-data" ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes
#if defined(ENABLE_OVERLOADING)
data MessageRequestBodyDataPropertyInfo
instance AttrInfo MessageRequestBodyDataPropertyInfo where
type AttrAllowedOps MessageRequestBodyDataPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MessageRequestBodyDataPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageRequestBodyDataPropertyInfo = (~) ()
type AttrTransferTypeConstraint MessageRequestBodyDataPropertyInfo = (~) ()
type AttrTransferType MessageRequestBodyDataPropertyInfo = ()
type AttrGetType MessageRequestBodyDataPropertyInfo = (Maybe GLib.Bytes.Bytes)
type AttrLabel MessageRequestBodyDataPropertyInfo = "request-body-data"
type AttrOrigin MessageRequestBodyDataPropertyInfo = Message
attrGet = getMessageRequestBodyData
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getMessageRequestHeaders :: (MonadIO m, IsMessage o) => o -> m (Maybe Soup.MessageHeaders.MessageHeaders)
o
obj = IO (Maybe MessageHeaders) -> m (Maybe MessageHeaders)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MessageHeaders) -> m (Maybe MessageHeaders))
-> IO (Maybe MessageHeaders) -> m (Maybe MessageHeaders)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr MessageHeaders -> MessageHeaders)
-> IO (Maybe MessageHeaders)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"request-headers" ManagedPtr MessageHeaders -> MessageHeaders
Soup.MessageHeaders.MessageHeaders
#if defined(ENABLE_OVERLOADING)
data MessageRequestHeadersPropertyInfo
instance AttrInfo MessageRequestHeadersPropertyInfo where
type AttrAllowedOps MessageRequestHeadersPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MessageRequestHeadersPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageRequestHeadersPropertyInfo = (~) ()
type AttrTransferTypeConstraint MessageRequestHeadersPropertyInfo = (~) ()
type AttrTransferType MessageRequestHeadersPropertyInfo = ()
type AttrGetType MessageRequestHeadersPropertyInfo = (Maybe Soup.MessageHeaders.MessageHeaders)
type AttrLabel MessageRequestHeadersPropertyInfo = "request-headers"
type AttrOrigin MessageRequestHeadersPropertyInfo = Message
attrGet = getMessageRequestHeaders
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getMessageResponseBody :: (MonadIO m, IsMessage o) => o -> m (Maybe Soup.MessageBody.MessageBody)
getMessageResponseBody :: o -> m (Maybe MessageBody)
getMessageResponseBody o
obj = IO (Maybe MessageBody) -> m (Maybe MessageBody)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MessageBody) -> m (Maybe MessageBody))
-> IO (Maybe MessageBody) -> m (Maybe MessageBody)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr MessageBody -> MessageBody)
-> IO (Maybe MessageBody)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"response-body" ManagedPtr MessageBody -> MessageBody
Soup.MessageBody.MessageBody
#if defined(ENABLE_OVERLOADING)
data MessageResponseBodyPropertyInfo
instance AttrInfo MessageResponseBodyPropertyInfo where
type AttrAllowedOps MessageResponseBodyPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MessageResponseBodyPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageResponseBodyPropertyInfo = (~) ()
type AttrTransferTypeConstraint MessageResponseBodyPropertyInfo = (~) ()
type AttrTransferType MessageResponseBodyPropertyInfo = ()
type AttrGetType MessageResponseBodyPropertyInfo = (Maybe Soup.MessageBody.MessageBody)
type AttrLabel MessageResponseBodyPropertyInfo = "response-body"
type AttrOrigin MessageResponseBodyPropertyInfo = Message
attrGet = getMessageResponseBody
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getMessageResponseBodyData :: (MonadIO m, IsMessage o) => o -> m (Maybe GLib.Bytes.Bytes)
getMessageResponseBodyData :: o -> m (Maybe Bytes)
getMessageResponseBodyData o
obj = IO (Maybe Bytes) -> m (Maybe Bytes)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Bytes) -> m (Maybe Bytes))
-> IO (Maybe Bytes) -> m (Maybe Bytes)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Bytes -> Bytes) -> IO (Maybe Bytes)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"response-body-data" ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes
#if defined(ENABLE_OVERLOADING)
data MessageResponseBodyDataPropertyInfo
instance AttrInfo MessageResponseBodyDataPropertyInfo where
type AttrAllowedOps MessageResponseBodyDataPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MessageResponseBodyDataPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageResponseBodyDataPropertyInfo = (~) ()
type AttrTransferTypeConstraint MessageResponseBodyDataPropertyInfo = (~) ()
type AttrTransferType MessageResponseBodyDataPropertyInfo = ()
type AttrGetType MessageResponseBodyDataPropertyInfo = (Maybe GLib.Bytes.Bytes)
type AttrLabel MessageResponseBodyDataPropertyInfo = "response-body-data"
type AttrOrigin MessageResponseBodyDataPropertyInfo = Message
attrGet = getMessageResponseBodyData
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getMessageResponseHeaders :: (MonadIO m, IsMessage o) => o -> m (Maybe Soup.MessageHeaders.MessageHeaders)
o
obj = IO (Maybe MessageHeaders) -> m (Maybe MessageHeaders)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MessageHeaders) -> m (Maybe MessageHeaders))
-> IO (Maybe MessageHeaders) -> m (Maybe MessageHeaders)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr MessageHeaders -> MessageHeaders)
-> IO (Maybe MessageHeaders)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"response-headers" ManagedPtr MessageHeaders -> MessageHeaders
Soup.MessageHeaders.MessageHeaders
#if defined(ENABLE_OVERLOADING)
data MessageResponseHeadersPropertyInfo
instance AttrInfo MessageResponseHeadersPropertyInfo where
type AttrAllowedOps MessageResponseHeadersPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MessageResponseHeadersPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageResponseHeadersPropertyInfo = (~) ()
type AttrTransferTypeConstraint MessageResponseHeadersPropertyInfo = (~) ()
type AttrTransferType MessageResponseHeadersPropertyInfo = ()
type AttrGetType MessageResponseHeadersPropertyInfo = (Maybe Soup.MessageHeaders.MessageHeaders)
type AttrLabel MessageResponseHeadersPropertyInfo = "response-headers"
type AttrOrigin MessageResponseHeadersPropertyInfo = Message
attrGet = getMessageResponseHeaders
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getMessageServerSide :: (MonadIO m, IsMessage o) => o -> m Bool
getMessageServerSide :: o -> m Bool
getMessageServerSide o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"server-side"
constructMessageServerSide :: (IsMessage o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructMessageServerSide :: Bool -> m (GValueConstruct o)
constructMessageServerSide Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"server-side" Bool
val
#if defined(ENABLE_OVERLOADING)
data MessageServerSidePropertyInfo
instance AttrInfo MessageServerSidePropertyInfo where
type AttrAllowedOps MessageServerSidePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MessageServerSidePropertyInfo = IsMessage
type AttrSetTypeConstraint MessageServerSidePropertyInfo = (~) Bool
type AttrTransferTypeConstraint MessageServerSidePropertyInfo = (~) Bool
type AttrTransferType MessageServerSidePropertyInfo = Bool
type AttrGetType MessageServerSidePropertyInfo = Bool
type AttrLabel MessageServerSidePropertyInfo = "server-side"
type AttrOrigin MessageServerSidePropertyInfo = Message
attrGet = getMessageServerSide
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructMessageServerSide
attrClear = undefined
#endif
getMessageSiteForCookies :: (MonadIO m, IsMessage o) => o -> m Soup.URI.URI
getMessageSiteForCookies :: o -> m URI
getMessageSiteForCookies o
obj = IO URI -> m URI
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO URI -> m URI) -> IO URI -> m URI
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe URI) -> IO URI
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getMessageSiteForCookies" (IO (Maybe URI) -> IO URI) -> IO (Maybe URI) -> IO URI
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr URI -> URI) -> IO (Maybe URI)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"site-for-cookies" ManagedPtr URI -> URI
Soup.URI.URI
setMessageSiteForCookies :: (MonadIO m, IsMessage o) => o -> Soup.URI.URI -> m ()
setMessageSiteForCookies :: o -> URI -> m ()
setMessageSiteForCookies o
obj URI
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe URI -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"site-for-cookies" (URI -> Maybe URI
forall a. a -> Maybe a
Just URI
val)
constructMessageSiteForCookies :: (IsMessage o, MIO.MonadIO m) => Soup.URI.URI -> m (GValueConstruct o)
constructMessageSiteForCookies :: URI -> m (GValueConstruct o)
constructMessageSiteForCookies URI
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe URI -> IO (GValueConstruct o)
forall a o. GBoxed a => String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed String
"site-for-cookies" (URI -> Maybe URI
forall a. a -> Maybe a
P.Just URI
val)
clearMessageSiteForCookies :: (MonadIO m, IsMessage o) => o -> m ()
clearMessageSiteForCookies :: o -> m ()
clearMessageSiteForCookies o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe URI -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"site-for-cookies" (Maybe URI
forall a. Maybe a
Nothing :: Maybe Soup.URI.URI)
#if defined(ENABLE_OVERLOADING)
data MessageSiteForCookiesPropertyInfo
instance AttrInfo MessageSiteForCookiesPropertyInfo where
type AttrAllowedOps MessageSiteForCookiesPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MessageSiteForCookiesPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageSiteForCookiesPropertyInfo = (~) Soup.URI.URI
type AttrTransferTypeConstraint MessageSiteForCookiesPropertyInfo = (~) Soup.URI.URI
type AttrTransferType MessageSiteForCookiesPropertyInfo = Soup.URI.URI
type AttrGetType MessageSiteForCookiesPropertyInfo = Soup.URI.URI
type AttrLabel MessageSiteForCookiesPropertyInfo = "site-for-cookies"
type AttrOrigin MessageSiteForCookiesPropertyInfo = Message
attrGet = getMessageSiteForCookies
attrSet = setMessageSiteForCookies
attrTransfer _ v = do
return v
attrConstruct = constructMessageSiteForCookies
attrClear = clearMessageSiteForCookies
#endif
getMessageStatusCode :: (MonadIO m, IsMessage o) => o -> m Word32
getMessageStatusCode :: o -> m Word32
getMessageStatusCode o
obj = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"status-code"
setMessageStatusCode :: (MonadIO m, IsMessage o) => o -> Word32 -> m ()
setMessageStatusCode :: o -> Word32 -> m ()
setMessageStatusCode o
obj Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj String
"status-code" Word32
val
constructMessageStatusCode :: (IsMessage o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructMessageStatusCode :: Word32 -> m (GValueConstruct o)
constructMessageStatusCode Word32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"status-code" Word32
val
#if defined(ENABLE_OVERLOADING)
data MessageStatusCodePropertyInfo
instance AttrInfo MessageStatusCodePropertyInfo where
type AttrAllowedOps MessageStatusCodePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MessageStatusCodePropertyInfo = IsMessage
type AttrSetTypeConstraint MessageStatusCodePropertyInfo = (~) Word32
type AttrTransferTypeConstraint MessageStatusCodePropertyInfo = (~) Word32
type AttrTransferType MessageStatusCodePropertyInfo = Word32
type AttrGetType MessageStatusCodePropertyInfo = Word32
type AttrLabel MessageStatusCodePropertyInfo = "status-code"
type AttrOrigin MessageStatusCodePropertyInfo = Message
attrGet = getMessageStatusCode
attrSet = setMessageStatusCode
attrTransfer _ v = do
return v
attrConstruct = constructMessageStatusCode
attrClear = undefined
#endif
getMessageTlsCertificate :: (MonadIO m, IsMessage o) => o -> m (Maybe Gio.TlsCertificate.TlsCertificate)
getMessageTlsCertificate :: o -> m (Maybe TlsCertificate)
getMessageTlsCertificate o
obj = IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate))
-> IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr TlsCertificate -> TlsCertificate)
-> IO (Maybe TlsCertificate)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"tls-certificate" ManagedPtr TlsCertificate -> TlsCertificate
Gio.TlsCertificate.TlsCertificate
setMessageTlsCertificate :: (MonadIO m, IsMessage o, Gio.TlsCertificate.IsTlsCertificate a) => o -> a -> m ()
setMessageTlsCertificate :: o -> a -> m ()
setMessageTlsCertificate o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"tls-certificate" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructMessageTlsCertificate :: (IsMessage o, MIO.MonadIO m, Gio.TlsCertificate.IsTlsCertificate a) => a -> m (GValueConstruct o)
constructMessageTlsCertificate :: a -> m (GValueConstruct o)
constructMessageTlsCertificate a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"tls-certificate" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearMessageTlsCertificate :: (MonadIO m, IsMessage o) => o -> m ()
clearMessageTlsCertificate :: o -> m ()
clearMessageTlsCertificate o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe TlsCertificate -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"tls-certificate" (Maybe TlsCertificate
forall a. Maybe a
Nothing :: Maybe Gio.TlsCertificate.TlsCertificate)
#if defined(ENABLE_OVERLOADING)
data MessageTlsCertificatePropertyInfo
instance AttrInfo MessageTlsCertificatePropertyInfo where
type AttrAllowedOps MessageTlsCertificatePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MessageTlsCertificatePropertyInfo = IsMessage
type AttrSetTypeConstraint MessageTlsCertificatePropertyInfo = Gio.TlsCertificate.IsTlsCertificate
type AttrTransferTypeConstraint MessageTlsCertificatePropertyInfo = Gio.TlsCertificate.IsTlsCertificate
type AttrTransferType MessageTlsCertificatePropertyInfo = Gio.TlsCertificate.TlsCertificate
type AttrGetType MessageTlsCertificatePropertyInfo = (Maybe Gio.TlsCertificate.TlsCertificate)
type AttrLabel MessageTlsCertificatePropertyInfo = "tls-certificate"
type AttrOrigin MessageTlsCertificatePropertyInfo = Message
attrGet = getMessageTlsCertificate
attrSet = setMessageTlsCertificate
attrTransfer _ v = do
unsafeCastTo Gio.TlsCertificate.TlsCertificate v
attrConstruct = constructMessageTlsCertificate
attrClear = clearMessageTlsCertificate
#endif
getMessageTlsErrors :: (MonadIO m, IsMessage o) => o -> m [Gio.Flags.TlsCertificateFlags]
getMessageTlsErrors :: o -> m [TlsCertificateFlags]
getMessageTlsErrors o
obj = IO [TlsCertificateFlags] -> m [TlsCertificateFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [TlsCertificateFlags] -> m [TlsCertificateFlags])
-> IO [TlsCertificateFlags] -> m [TlsCertificateFlags]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [TlsCertificateFlags]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"tls-errors"
setMessageTlsErrors :: (MonadIO m, IsMessage o) => o -> [Gio.Flags.TlsCertificateFlags] -> m ()
setMessageTlsErrors :: o -> [TlsCertificateFlags] -> m ()
setMessageTlsErrors o
obj [TlsCertificateFlags]
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> [TlsCertificateFlags] -> IO ()
forall a b.
(IsGFlag b, BoxedFlags b, GObject a) =>
a -> String -> [b] -> IO ()
B.Properties.setObjectPropertyFlags o
obj String
"tls-errors" [TlsCertificateFlags]
val
constructMessageTlsErrors :: (IsMessage o, MIO.MonadIO m) => [Gio.Flags.TlsCertificateFlags] -> m (GValueConstruct o)
constructMessageTlsErrors :: [TlsCertificateFlags] -> m (GValueConstruct o)
constructMessageTlsErrors [TlsCertificateFlags]
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> [TlsCertificateFlags] -> IO (GValueConstruct o)
forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags String
"tls-errors" [TlsCertificateFlags]
val
#if defined(ENABLE_OVERLOADING)
data MessageTlsErrorsPropertyInfo
instance AttrInfo MessageTlsErrorsPropertyInfo where
type AttrAllowedOps MessageTlsErrorsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MessageTlsErrorsPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageTlsErrorsPropertyInfo = (~) [Gio.Flags.TlsCertificateFlags]
type AttrTransferTypeConstraint MessageTlsErrorsPropertyInfo = (~) [Gio.Flags.TlsCertificateFlags]
type AttrTransferType MessageTlsErrorsPropertyInfo = [Gio.Flags.TlsCertificateFlags]
type AttrGetType MessageTlsErrorsPropertyInfo = [Gio.Flags.TlsCertificateFlags]
type AttrLabel MessageTlsErrorsPropertyInfo = "tls-errors"
type AttrOrigin MessageTlsErrorsPropertyInfo = Message
attrGet = getMessageTlsErrors
attrSet = setMessageTlsErrors
attrTransfer _ v = do
return v
attrConstruct = constructMessageTlsErrors
attrClear = undefined
#endif
getMessageUri :: (MonadIO m, IsMessage o) => o -> m Soup.URI.URI
getMessageUri :: o -> m URI
getMessageUri o
obj = IO URI -> m URI
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO URI -> m URI) -> IO URI -> m URI
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe URI) -> IO URI
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getMessageUri" (IO (Maybe URI) -> IO URI) -> IO (Maybe URI) -> IO URI
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr URI -> URI) -> IO (Maybe URI)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"uri" ManagedPtr URI -> URI
Soup.URI.URI
setMessageUri :: (MonadIO m, IsMessage o) => o -> Soup.URI.URI -> m ()
setMessageUri :: o -> URI -> m ()
setMessageUri o
obj URI
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe URI -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"uri" (URI -> Maybe URI
forall a. a -> Maybe a
Just URI
val)
constructMessageUri :: (IsMessage o, MIO.MonadIO m) => Soup.URI.URI -> m (GValueConstruct o)
constructMessageUri :: URI -> m (GValueConstruct o)
constructMessageUri URI
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe URI -> IO (GValueConstruct o)
forall a o. GBoxed a => String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed String
"uri" (URI -> Maybe URI
forall a. a -> Maybe a
P.Just URI
val)
#if defined(ENABLE_OVERLOADING)
data MessageUriPropertyInfo
instance AttrInfo MessageUriPropertyInfo where
type AttrAllowedOps MessageUriPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MessageUriPropertyInfo = IsMessage
type AttrSetTypeConstraint MessageUriPropertyInfo = (~) Soup.URI.URI
type AttrTransferTypeConstraint MessageUriPropertyInfo = (~) Soup.URI.URI
type AttrTransferType MessageUriPropertyInfo = Soup.URI.URI
type AttrGetType MessageUriPropertyInfo = Soup.URI.URI
type AttrLabel MessageUriPropertyInfo = "uri"
type AttrOrigin MessageUriPropertyInfo = Message
attrGet = getMessageUri
attrSet = setMessageUri
attrTransfer _ v = do
return v
attrConstruct = constructMessageUri
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Message
type instance O.AttributeList Message = MessageAttributeList
type MessageAttributeList = ('[ '("firstParty", MessageFirstPartyPropertyInfo), '("flags", MessageFlagsPropertyInfo), '("httpVersion", MessageHttpVersionPropertyInfo), '("isTopLevelNavigation", MessageIsTopLevelNavigationPropertyInfo), '("method", MessageMethodPropertyInfo), '("priority", MessagePriorityPropertyInfo), '("reasonPhrase", MessageReasonPhrasePropertyInfo), '("requestBody", MessageRequestBodyPropertyInfo), '("requestBodyData", MessageRequestBodyDataPropertyInfo), '("requestHeaders", MessageRequestHeadersPropertyInfo), '("responseBody", MessageResponseBodyPropertyInfo), '("responseBodyData", MessageResponseBodyDataPropertyInfo), '("responseHeaders", MessageResponseHeadersPropertyInfo), '("serverSide", MessageServerSidePropertyInfo), '("siteForCookies", MessageSiteForCookiesPropertyInfo), '("statusCode", MessageStatusCodePropertyInfo), '("tlsCertificate", MessageTlsCertificatePropertyInfo), '("tlsErrors", MessageTlsErrorsPropertyInfo), '("uri", MessageUriPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
messageFirstParty :: AttrLabelProxy "firstParty"
messageFirstParty = AttrLabelProxy
messageFlags :: AttrLabelProxy "flags"
messageFlags = AttrLabelProxy
messageHttpVersion :: AttrLabelProxy "httpVersion"
messageHttpVersion = AttrLabelProxy
messageIsTopLevelNavigation :: AttrLabelProxy "isTopLevelNavigation"
messageIsTopLevelNavigation = AttrLabelProxy
messageMethod :: AttrLabelProxy "method"
messageMethod = AttrLabelProxy
messagePriority :: AttrLabelProxy "priority"
messagePriority = AttrLabelProxy
messageReasonPhrase :: AttrLabelProxy "reasonPhrase"
messageReasonPhrase = AttrLabelProxy
messageRequestBody :: AttrLabelProxy "requestBody"
messageRequestBody = AttrLabelProxy
messageRequestBodyData :: AttrLabelProxy "requestBodyData"
messageRequestBodyData = AttrLabelProxy
messageRequestHeaders :: AttrLabelProxy "requestHeaders"
messageRequestHeaders = AttrLabelProxy
messageResponseBody :: AttrLabelProxy "responseBody"
messageResponseBody = AttrLabelProxy
messageResponseBodyData :: AttrLabelProxy "responseBodyData"
messageResponseBodyData = AttrLabelProxy
messageResponseHeaders :: AttrLabelProxy "responseHeaders"
messageResponseHeaders = AttrLabelProxy
messageServerSide :: AttrLabelProxy "serverSide"
messageServerSide = AttrLabelProxy
messageSiteForCookies :: AttrLabelProxy "siteForCookies"
messageSiteForCookies = AttrLabelProxy
messageStatusCode :: AttrLabelProxy "statusCode"
messageStatusCode = AttrLabelProxy
messageTlsCertificate :: AttrLabelProxy "tlsCertificate"
messageTlsCertificate = AttrLabelProxy
messageTlsErrors :: AttrLabelProxy "tlsErrors"
messageTlsErrors = AttrLabelProxy
messageUri :: AttrLabelProxy "uri"
messageUri = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Message = MessageSignalList
type MessageSignalList = ('[ '("contentSniffed", MessageContentSniffedSignalInfo), '("finished", MessageFinishedSignalInfo), '("gotBody", MessageGotBodySignalInfo), '("gotChunk", MessageGotChunkSignalInfo), '("gotHeaders", MessageGotHeadersSignalInfo), '("gotInformational", MessageGotInformationalSignalInfo), '("networkEvent", MessageNetworkEventSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("restarted", MessageRestartedSignalInfo), '("starting", MessageStartingSignalInfo), '("wroteBody", MessageWroteBodySignalInfo), '("wroteBodyData", MessageWroteBodyDataSignalInfo), '("wroteChunk", MessageWroteChunkSignalInfo), '("wroteHeaders", MessageWroteHeadersSignalInfo), '("wroteInformational", MessageWroteInformationalSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "soup_message_new" soup_message_new ::
CString ->
CString ->
IO (Ptr Message)
messageNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> T.Text
-> m (Maybe Message)
messageNew :: Text -> Text -> m (Maybe Message)
messageNew Text
method Text
uriString = IO (Maybe Message) -> m (Maybe Message)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Message) -> m (Maybe Message))
-> IO (Maybe Message) -> m (Maybe Message)
forall a b. (a -> b) -> a -> b
$ do
CString
method' <- Text -> IO CString
textToCString Text
method
CString
uriString' <- Text -> IO CString
textToCString Text
uriString
Ptr Message
result <- CString -> CString -> IO (Ptr Message)
soup_message_new CString
method' CString
uriString'
Maybe Message
maybeResult <- Ptr Message -> (Ptr Message -> IO Message) -> IO (Maybe Message)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Message
result ((Ptr Message -> IO Message) -> IO (Maybe Message))
-> (Ptr Message -> IO Message) -> IO (Maybe Message)
forall a b. (a -> b) -> a -> b
$ \Ptr Message
result' -> do
Message
result'' <- ((ManagedPtr Message -> Message) -> Ptr Message -> IO Message
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Message -> Message
Message) Ptr Message
result'
Message -> IO Message
forall (m :: * -> *) a. Monad m => a -> m a
return Message
result''
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
method'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uriString'
Maybe Message -> IO (Maybe Message)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Message
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "soup_message_new_from_uri" soup_message_new_from_uri ::
CString ->
Ptr Soup.URI.URI ->
IO (Ptr Message)
messageNewFromUri ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> Soup.URI.URI
-> m Message
messageNewFromUri :: Text -> URI -> m Message
messageNewFromUri Text
method URI
uri = IO Message -> m Message
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Message -> m Message) -> IO Message -> m Message
forall a b. (a -> b) -> a -> b
$ do
CString
method' <- Text -> IO CString
textToCString Text
method
Ptr URI
uri' <- URI -> IO (Ptr URI)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr URI
uri
Ptr Message
result <- CString -> Ptr URI -> IO (Ptr Message)
soup_message_new_from_uri CString
method' Ptr URI
uri'
Text -> Ptr Message -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"messageNewFromUri" Ptr Message
result
Message
result' <- ((ManagedPtr Message -> Message) -> Ptr Message -> IO Message
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Message -> Message
Message) Ptr Message
result
URI -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr URI
uri
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
method'
Message -> IO Message
forall (m :: * -> *) a. Monad m => a -> m a
return Message
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "soup_message_content_sniffed" soup_message_content_sniffed ::
Ptr Message ->
CString ->
Ptr (GHashTable (Ptr ()) (Ptr ())) ->
IO ()
messageContentSniffed ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> T.Text
-> Map.Map (Ptr ()) (Ptr ())
-> m ()
messageContentSniffed :: a -> Text -> Map (Ptr ()) (Ptr ()) -> m ()
messageContentSniffed a
msg Text
contentType Map (Ptr ()) (Ptr ())
params = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
CString
contentType' <- Text -> IO CString
textToCString Text
contentType
let params' :: [(Ptr (), Ptr ())]
params' = Map (Ptr ()) (Ptr ()) -> [(Ptr (), Ptr ())]
forall k a. Map k a -> [(k, a)]
Map.toList Map (Ptr ()) (Ptr ())
params
let params'' :: [(PtrWrapped (Ptr ()), Ptr ())]
params'' = (Ptr () -> PtrWrapped (Ptr ()))
-> [(Ptr (), Ptr ())] -> [(PtrWrapped (Ptr ()), Ptr ())]
forall a c b. (a -> c) -> [(a, b)] -> [(c, b)]
mapFirst Ptr () -> PtrWrapped (Ptr ())
forall a. Ptr a -> PtrWrapped (Ptr a)
ptrPackPtr [(Ptr (), Ptr ())]
params'
let params''' :: [(PtrWrapped (Ptr ()), PtrWrapped (Ptr ()))]
params''' = (Ptr () -> PtrWrapped (Ptr ()))
-> [(PtrWrapped (Ptr ()), Ptr ())]
-> [(PtrWrapped (Ptr ()), PtrWrapped (Ptr ()))]
forall b c a. (b -> c) -> [(a, b)] -> [(a, c)]
mapSecond Ptr () -> PtrWrapped (Ptr ())
forall a. Ptr a -> PtrWrapped (Ptr a)
ptrPackPtr [(PtrWrapped (Ptr ()), Ptr ())]
params''
Ptr (GHashTable (Ptr ()) (Ptr ()))
params'''' <- GHashFunc (Ptr ())
-> GEqualFunc (Ptr ())
-> Maybe (GDestroyNotify (Ptr ()))
-> Maybe (GDestroyNotify (Ptr ()))
-> [(PtrWrapped (Ptr ()), PtrWrapped (Ptr ()))]
-> IO (Ptr (GHashTable (Ptr ()) (Ptr ())))
forall a b.
GHashFunc a
-> GEqualFunc a
-> Maybe (GDestroyNotify a)
-> Maybe (GDestroyNotify b)
-> [(PtrWrapped a, PtrWrapped b)]
-> IO (Ptr (GHashTable a b))
packGHashTable GHashFunc (Ptr ())
forall a. GHashFunc (Ptr a)
gDirectHash GEqualFunc (Ptr ())
forall a. GEqualFunc (Ptr a)
gDirectEqual Maybe (GDestroyNotify (Ptr ()))
forall a. Maybe a
Nothing Maybe (GDestroyNotify (Ptr ()))
forall a. Maybe a
Nothing [(PtrWrapped (Ptr ()), PtrWrapped (Ptr ()))]
params'''
Ptr Message
-> CString -> Ptr (GHashTable (Ptr ()) (Ptr ())) -> IO ()
soup_message_content_sniffed Ptr Message
msg' CString
contentType' Ptr (GHashTable (Ptr ()) (Ptr ()))
params''''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
contentType'
Ptr (GHashTable (Ptr ()) (Ptr ())) -> IO ()
forall a b. Ptr (GHashTable a b) -> IO ()
unrefGHashTable Ptr (GHashTable (Ptr ()) (Ptr ()))
params''''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageContentSniffedMethodInfo
instance (signature ~ (T.Text -> Map.Map (Ptr ()) (Ptr ()) -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageContentSniffedMethodInfo a signature where
overloadedMethod = messageContentSniffed
#endif
foreign import ccall "soup_message_disable_feature" soup_message_disable_feature ::
Ptr Message ->
CGType ->
IO ()
messageDisableFeature ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> GType
-> m ()
messageDisableFeature :: a -> GType -> m ()
messageDisableFeature a
msg GType
featureType = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
let featureType' :: CGType
featureType' = GType -> CGType
gtypeToCGType GType
featureType
Ptr Message -> CGType -> IO ()
soup_message_disable_feature Ptr Message
msg' CGType
featureType'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageDisableFeatureMethodInfo
instance (signature ~ (GType -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageDisableFeatureMethodInfo a signature where
overloadedMethod = messageDisableFeature
#endif
foreign import ccall "soup_message_finished" soup_message_finished ::
Ptr Message ->
IO ()
messageFinished ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m ()
messageFinished :: a -> m ()
messageFinished a
msg = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Message -> IO ()
soup_message_finished Ptr Message
msg'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageFinishedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageFinishedMethodInfo a signature where
overloadedMethod = messageFinished
#endif
foreign import ccall "soup_message_get_address" soup_message_get_address ::
Ptr Message ->
IO (Ptr Soup.Address.Address)
messageGetAddress ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m Soup.Address.Address
messageGetAddress :: a -> m Address
messageGetAddress a
msg = IO Address -> m Address
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Address -> m Address) -> IO Address -> m Address
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Address
result <- Ptr Message -> IO (Ptr Address)
soup_message_get_address Ptr Message
msg'
Text -> Ptr Address -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"messageGetAddress" Ptr Address
result
Address
result' <- ((ManagedPtr Address -> Address) -> Ptr Address -> IO Address
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Address -> Address
Soup.Address.Address) Ptr Address
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
Address -> IO Address
forall (m :: * -> *) a. Monad m => a -> m a
return Address
result'
#if defined(ENABLE_OVERLOADING)
data MessageGetAddressMethodInfo
instance (signature ~ (m Soup.Address.Address), MonadIO m, IsMessage a) => O.MethodInfo MessageGetAddressMethodInfo a signature where
overloadedMethod = messageGetAddress
#endif
foreign import ccall "soup_message_get_first_party" soup_message_get_first_party ::
Ptr Message ->
IO (Ptr Soup.URI.URI)
messageGetFirstParty ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m Soup.URI.URI
messageGetFirstParty :: a -> m URI
messageGetFirstParty a
msg = IO URI -> m URI
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO URI -> m URI) -> IO URI -> m URI
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr URI
result <- Ptr Message -> IO (Ptr URI)
soup_message_get_first_party Ptr Message
msg'
Text -> Ptr URI -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"messageGetFirstParty" Ptr URI
result
URI
result' <- ((ManagedPtr URI -> URI) -> Ptr URI -> IO URI
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr URI -> URI
Soup.URI.URI) Ptr URI
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
URI -> IO URI
forall (m :: * -> *) a. Monad m => a -> m a
return URI
result'
#if defined(ENABLE_OVERLOADING)
data MessageGetFirstPartyMethodInfo
instance (signature ~ (m Soup.URI.URI), MonadIO m, IsMessage a) => O.MethodInfo MessageGetFirstPartyMethodInfo a signature where
overloadedMethod = messageGetFirstParty
#endif
foreign import ccall "soup_message_get_flags" soup_message_get_flags ::
Ptr Message ->
IO CUInt
messageGetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m [Soup.Flags.MessageFlags]
messageGetFlags :: a -> m [MessageFlags]
messageGetFlags a
msg = IO [MessageFlags] -> m [MessageFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [MessageFlags] -> m [MessageFlags])
-> IO [MessageFlags] -> m [MessageFlags]
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
CUInt
result <- Ptr Message -> IO CUInt
soup_message_get_flags Ptr Message
msg'
let result' :: [MessageFlags]
result' = CUInt -> [MessageFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
[MessageFlags] -> IO [MessageFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [MessageFlags]
result'
#if defined(ENABLE_OVERLOADING)
data MessageGetFlagsMethodInfo
instance (signature ~ (m [Soup.Flags.MessageFlags]), MonadIO m, IsMessage a) => O.MethodInfo MessageGetFlagsMethodInfo a signature where
overloadedMethod = messageGetFlags
#endif
foreign import ccall "soup_message_get_http_version" soup_message_get_http_version ::
Ptr Message ->
IO CUInt
messageGetHttpVersion ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m Soup.Enums.HTTPVersion
messageGetHttpVersion :: a -> m HTTPVersion
messageGetHttpVersion a
msg = IO HTTPVersion -> m HTTPVersion
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO HTTPVersion -> m HTTPVersion)
-> IO HTTPVersion -> m HTTPVersion
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
CUInt
result <- Ptr Message -> IO CUInt
soup_message_get_http_version Ptr Message
msg'
let result' :: HTTPVersion
result' = (Int -> HTTPVersion
forall a. Enum a => Int -> a
toEnum (Int -> HTTPVersion) -> (CUInt -> Int) -> CUInt -> HTTPVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
HTTPVersion -> IO HTTPVersion
forall (m :: * -> *) a. Monad m => a -> m a
return HTTPVersion
result'
#if defined(ENABLE_OVERLOADING)
data MessageGetHttpVersionMethodInfo
instance (signature ~ (m Soup.Enums.HTTPVersion), MonadIO m, IsMessage a) => O.MethodInfo MessageGetHttpVersionMethodInfo a signature where
overloadedMethod = messageGetHttpVersion
#endif
foreign import ccall "soup_message_get_https_status" soup_message_get_https_status ::
Ptr Message ->
Ptr (Ptr Gio.TlsCertificate.TlsCertificate) ->
Ptr CUInt ->
IO CInt
messageGetHttpsStatus ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m ((Bool, Gio.TlsCertificate.TlsCertificate, [Gio.Flags.TlsCertificateFlags]))
messageGetHttpsStatus :: a -> m (Bool, TlsCertificate, [TlsCertificateFlags])
messageGetHttpsStatus a
msg = IO (Bool, TlsCertificate, [TlsCertificateFlags])
-> m (Bool, TlsCertificate, [TlsCertificateFlags])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TlsCertificate, [TlsCertificateFlags])
-> m (Bool, TlsCertificate, [TlsCertificateFlags]))
-> IO (Bool, TlsCertificate, [TlsCertificateFlags])
-> m (Bool, TlsCertificate, [TlsCertificateFlags])
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr (Ptr TlsCertificate)
certificate <- IO (Ptr (Ptr TlsCertificate))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gio.TlsCertificate.TlsCertificate))
Ptr CUInt
errors <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
CInt
result <- Ptr Message -> Ptr (Ptr TlsCertificate) -> Ptr CUInt -> IO CInt
soup_message_get_https_status Ptr Message
msg' Ptr (Ptr TlsCertificate)
certificate Ptr CUInt
errors
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr TlsCertificate
certificate' <- Ptr (Ptr TlsCertificate) -> IO (Ptr TlsCertificate)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr TlsCertificate)
certificate
TlsCertificate
certificate'' <- ((ManagedPtr TlsCertificate -> TlsCertificate)
-> Ptr TlsCertificate -> IO TlsCertificate
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TlsCertificate -> TlsCertificate
Gio.TlsCertificate.TlsCertificate) Ptr TlsCertificate
certificate'
CUInt
errors' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
errors
let errors'' :: [TlsCertificateFlags]
errors'' = CUInt -> [TlsCertificateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
errors'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
Ptr (Ptr TlsCertificate) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr TlsCertificate)
certificate
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
errors
(Bool, TlsCertificate, [TlsCertificateFlags])
-> IO (Bool, TlsCertificate, [TlsCertificateFlags])
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', TlsCertificate
certificate'', [TlsCertificateFlags]
errors'')
#if defined(ENABLE_OVERLOADING)
data MessageGetHttpsStatusMethodInfo
instance (signature ~ (m ((Bool, Gio.TlsCertificate.TlsCertificate, [Gio.Flags.TlsCertificateFlags]))), MonadIO m, IsMessage a) => O.MethodInfo MessageGetHttpsStatusMethodInfo a signature where
overloadedMethod = messageGetHttpsStatus
#endif
foreign import ccall "soup_message_get_is_top_level_navigation" soup_message_get_is_top_level_navigation ::
Ptr Message ->
IO CInt
messageGetIsTopLevelNavigation ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m Bool
messageGetIsTopLevelNavigation :: a -> m Bool
messageGetIsTopLevelNavigation a
msg = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
CInt
result <- Ptr Message -> IO CInt
soup_message_get_is_top_level_navigation Ptr Message
msg'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data MessageGetIsTopLevelNavigationMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsMessage a) => O.MethodInfo MessageGetIsTopLevelNavigationMethodInfo a signature where
overloadedMethod = messageGetIsTopLevelNavigation
#endif
foreign import ccall "soup_message_get_priority" soup_message_get_priority ::
Ptr Message ->
IO CUInt
messageGetPriority ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m Soup.Enums.MessagePriority
messageGetPriority :: a -> m MessagePriority
messageGetPriority a
msg = IO MessagePriority -> m MessagePriority
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MessagePriority -> m MessagePriority)
-> IO MessagePriority -> m MessagePriority
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
CUInt
result <- Ptr Message -> IO CUInt
soup_message_get_priority Ptr Message
msg'
let result' :: MessagePriority
result' = (Int -> MessagePriority
forall a. Enum a => Int -> a
toEnum (Int -> MessagePriority)
-> (CUInt -> Int) -> CUInt -> MessagePriority
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
MessagePriority -> IO MessagePriority
forall (m :: * -> *) a. Monad m => a -> m a
return MessagePriority
result'
#if defined(ENABLE_OVERLOADING)
data MessageGetPriorityMethodInfo
instance (signature ~ (m Soup.Enums.MessagePriority), MonadIO m, IsMessage a) => O.MethodInfo MessageGetPriorityMethodInfo a signature where
overloadedMethod = messageGetPriority
#endif
foreign import ccall "soup_message_get_site_for_cookies" soup_message_get_site_for_cookies ::
Ptr Message ->
IO (Ptr Soup.URI.URI)
messageGetSiteForCookies ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m Soup.URI.URI
messageGetSiteForCookies :: a -> m URI
messageGetSiteForCookies a
msg = IO URI -> m URI
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO URI -> m URI) -> IO URI -> m URI
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr URI
result <- Ptr Message -> IO (Ptr URI)
soup_message_get_site_for_cookies Ptr Message
msg'
Text -> Ptr URI -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"messageGetSiteForCookies" Ptr URI
result
URI
result' <- ((ManagedPtr URI -> URI) -> Ptr URI -> IO URI
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr URI -> URI
Soup.URI.URI) Ptr URI
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
URI -> IO URI
forall (m :: * -> *) a. Monad m => a -> m a
return URI
result'
#if defined(ENABLE_OVERLOADING)
data MessageGetSiteForCookiesMethodInfo
instance (signature ~ (m Soup.URI.URI), MonadIO m, IsMessage a) => O.MethodInfo MessageGetSiteForCookiesMethodInfo a signature where
overloadedMethod = messageGetSiteForCookies
#endif
foreign import ccall "soup_message_get_soup_request" soup_message_get_soup_request ::
Ptr Message ->
IO (Ptr Soup.Request.Request)
messageGetSoupRequest ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m Soup.Request.Request
messageGetSoupRequest :: a -> m Request
messageGetSoupRequest a
msg = IO Request -> m Request
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Request -> m Request) -> IO Request -> m Request
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Request
result <- Ptr Message -> IO (Ptr Request)
soup_message_get_soup_request Ptr Message
msg'
Text -> Ptr Request -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"messageGetSoupRequest" Ptr Request
result
Request
result' <- ((ManagedPtr Request -> Request) -> Ptr Request -> IO Request
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Request -> Request
Soup.Request.Request) Ptr Request
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
Request -> IO Request
forall (m :: * -> *) a. Monad m => a -> m a
return Request
result'
#if defined(ENABLE_OVERLOADING)
data MessageGetSoupRequestMethodInfo
instance (signature ~ (m Soup.Request.Request), MonadIO m, IsMessage a) => O.MethodInfo MessageGetSoupRequestMethodInfo a signature where
overloadedMethod = messageGetSoupRequest
#endif
foreign import ccall "soup_message_get_uri" soup_message_get_uri ::
Ptr Message ->
IO (Ptr Soup.URI.URI)
messageGetUri ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m Soup.URI.URI
messageGetUri :: a -> m URI
messageGetUri a
msg = IO URI -> m URI
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO URI -> m URI) -> IO URI -> m URI
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr URI
result <- Ptr Message -> IO (Ptr URI)
soup_message_get_uri Ptr Message
msg'
Text -> Ptr URI -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"messageGetUri" Ptr URI
result
URI
result' <- ((ManagedPtr URI -> URI) -> Ptr URI -> IO URI
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr URI -> URI
Soup.URI.URI) Ptr URI
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
URI -> IO URI
forall (m :: * -> *) a. Monad m => a -> m a
return URI
result'
#if defined(ENABLE_OVERLOADING)
data MessageGetUriMethodInfo
instance (signature ~ (m Soup.URI.URI), MonadIO m, IsMessage a) => O.MethodInfo MessageGetUriMethodInfo a signature where
overloadedMethod = messageGetUri
#endif
foreign import ccall "soup_message_got_body" soup_message_got_body ::
Ptr Message ->
IO ()
messageGotBody ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m ()
messageGotBody :: a -> m ()
messageGotBody a
msg = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Message -> IO ()
soup_message_got_body Ptr Message
msg'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageGotBodyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageGotBodyMethodInfo a signature where
overloadedMethod = messageGotBody
#endif
foreign import ccall "soup_message_got_chunk" soup_message_got_chunk ::
Ptr Message ->
Ptr Soup.Buffer.Buffer ->
IO ()
messageGotChunk ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Soup.Buffer.Buffer
-> m ()
messageGotChunk :: a -> Buffer -> m ()
messageGotChunk a
msg Buffer
chunk = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Buffer
chunk' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
chunk
Ptr Message -> Ptr Buffer -> IO ()
soup_message_got_chunk Ptr Message
msg' Ptr Buffer
chunk'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
MessageGotChunkCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
chunk
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageGotChunkMethodInfo
instance (signature ~ (Soup.Buffer.Buffer -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageGotChunkMethodInfo a signature where
overloadedMethod = messageGotChunk
#endif
foreign import ccall "soup_message_got_headers" ::
Ptr Message ->
IO ()
messageGotHeaders ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m ()
a
msg = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Message -> IO ()
soup_message_got_headers Ptr Message
msg'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageGotHeadersMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageGotHeadersMethodInfo a signature where
overloadedMethod = messageGotHeaders
#endif
foreign import ccall "soup_message_got_informational" soup_message_got_informational ::
Ptr Message ->
IO ()
messageGotInformational ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m ()
messageGotInformational :: a -> m ()
messageGotInformational a
msg = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Message -> IO ()
soup_message_got_informational Ptr Message
msg'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageGotInformationalMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageGotInformationalMethodInfo a signature where
overloadedMethod = messageGotInformational
#endif
foreign import ccall "soup_message_is_keepalive" soup_message_is_keepalive ::
Ptr Message ->
IO CInt
messageIsKeepalive ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m Bool
messageIsKeepalive :: a -> m Bool
messageIsKeepalive a
msg = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
CInt
result <- Ptr Message -> IO CInt
soup_message_is_keepalive Ptr Message
msg'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data MessageIsKeepaliveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsMessage a) => O.MethodInfo MessageIsKeepaliveMethodInfo a signature where
overloadedMethod = messageIsKeepalive
#endif
foreign import ccall "soup_message_restarted" soup_message_restarted ::
Ptr Message ->
IO ()
messageRestarted ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m ()
messageRestarted :: a -> m ()
messageRestarted a
msg = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Message -> IO ()
soup_message_restarted Ptr Message
msg'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageRestartedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageRestartedMethodInfo a signature where
overloadedMethod = messageRestarted
#endif
foreign import ccall "soup_message_set_chunk_allocator" soup_message_set_chunk_allocator ::
Ptr Message ->
FunPtr Soup.Callbacks.C_ChunkAllocator ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
{-# DEPRECATED messageSetChunkAllocator ["t'GI.Soup.Objects.Request.Request' provides a much simpler API that lets you","read the response directly into your own buffers without needing to","mess with callbacks, pausing\\/unpausing, etc."] #-}
messageSetChunkAllocator ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Soup.Callbacks.ChunkAllocator
-> m ()
messageSetChunkAllocator :: a -> ChunkAllocator -> m ()
messageSetChunkAllocator a
msg ChunkAllocator
allocator = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
FunPtr C_ChunkAllocator
allocator' <- C_ChunkAllocator -> IO (FunPtr C_ChunkAllocator)
Soup.Callbacks.mk_ChunkAllocator (Maybe (Ptr (FunPtr C_ChunkAllocator))
-> ChunkAllocator_WithClosures -> C_ChunkAllocator
Soup.Callbacks.wrap_ChunkAllocator Maybe (Ptr (FunPtr C_ChunkAllocator))
forall a. Maybe a
Nothing (ChunkAllocator -> ChunkAllocator_WithClosures
Soup.Callbacks.drop_closures_ChunkAllocator ChunkAllocator
allocator))
let userData :: Ptr ()
userData = FunPtr C_ChunkAllocator -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ChunkAllocator
allocator'
let destroyNotify :: FunPtr (Ptr a -> IO ())
destroyNotify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
Ptr Message
-> FunPtr C_ChunkAllocator
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO ()
soup_message_set_chunk_allocator Ptr Message
msg' FunPtr C_ChunkAllocator
allocator' Ptr ()
userData FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
destroyNotify
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetChunkAllocatorMethodInfo
instance (signature ~ (Soup.Callbacks.ChunkAllocator -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetChunkAllocatorMethodInfo a signature where
overloadedMethod = messageSetChunkAllocator
#endif
foreign import ccall "soup_message_set_first_party" soup_message_set_first_party ::
Ptr Message ->
Ptr Soup.URI.URI ->
IO ()
messageSetFirstParty ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Soup.URI.URI
-> m ()
messageSetFirstParty :: a -> URI -> m ()
messageSetFirstParty a
msg URI
firstParty = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr URI
firstParty' <- URI -> IO (Ptr URI)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr URI
firstParty
Ptr Message -> Ptr URI -> IO ()
soup_message_set_first_party Ptr Message
msg' Ptr URI
firstParty'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
URI -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr URI
firstParty
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetFirstPartyMethodInfo
instance (signature ~ (Soup.URI.URI -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetFirstPartyMethodInfo a signature where
overloadedMethod = messageSetFirstParty
#endif
foreign import ccall "soup_message_set_flags" soup_message_set_flags ::
Ptr Message ->
CUInt ->
IO ()
messageSetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> [Soup.Flags.MessageFlags]
-> m ()
messageSetFlags :: a -> [MessageFlags] -> m ()
messageSetFlags a
msg [MessageFlags]
flags = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
let flags' :: CUInt
flags' = [MessageFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [MessageFlags]
flags
Ptr Message -> CUInt -> IO ()
soup_message_set_flags Ptr Message
msg' CUInt
flags'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetFlagsMethodInfo
instance (signature ~ ([Soup.Flags.MessageFlags] -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetFlagsMethodInfo a signature where
overloadedMethod = messageSetFlags
#endif
foreign import ccall "soup_message_set_http_version" soup_message_set_http_version ::
Ptr Message ->
CUInt ->
IO ()
messageSetHttpVersion ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Soup.Enums.HTTPVersion
-> m ()
messageSetHttpVersion :: a -> HTTPVersion -> m ()
messageSetHttpVersion a
msg HTTPVersion
version = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
let version' :: CUInt
version' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (HTTPVersion -> Int) -> HTTPVersion -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. HTTPVersion -> Int
forall a. Enum a => a -> Int
fromEnum) HTTPVersion
version
Ptr Message -> CUInt -> IO ()
soup_message_set_http_version Ptr Message
msg' CUInt
version'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetHttpVersionMethodInfo
instance (signature ~ (Soup.Enums.HTTPVersion -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetHttpVersionMethodInfo a signature where
overloadedMethod = messageSetHttpVersion
#endif
foreign import ccall "soup_message_set_is_top_level_navigation" soup_message_set_is_top_level_navigation ::
Ptr Message ->
CInt ->
IO ()
messageSetIsTopLevelNavigation ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Bool
-> m ()
messageSetIsTopLevelNavigation :: a -> Bool -> m ()
messageSetIsTopLevelNavigation a
msg Bool
isTopLevelNavigation = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
let isTopLevelNavigation' :: CInt
isTopLevelNavigation' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
isTopLevelNavigation
Ptr Message -> CInt -> IO ()
soup_message_set_is_top_level_navigation Ptr Message
msg' CInt
isTopLevelNavigation'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetIsTopLevelNavigationMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetIsTopLevelNavigationMethodInfo a signature where
overloadedMethod = messageSetIsTopLevelNavigation
#endif
foreign import ccall "soup_message_set_priority" soup_message_set_priority ::
Ptr Message ->
CUInt ->
IO ()
messageSetPriority ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Soup.Enums.MessagePriority
-> m ()
messageSetPriority :: a -> MessagePriority -> m ()
messageSetPriority a
msg MessagePriority
priority = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
let priority' :: CUInt
priority' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (MessagePriority -> Int) -> MessagePriority -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. MessagePriority -> Int
forall a. Enum a => a -> Int
fromEnum) MessagePriority
priority
Ptr Message -> CUInt -> IO ()
soup_message_set_priority Ptr Message
msg' CUInt
priority'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetPriorityMethodInfo
instance (signature ~ (Soup.Enums.MessagePriority -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetPriorityMethodInfo a signature where
overloadedMethod = messageSetPriority
#endif
foreign import ccall "soup_message_set_redirect" soup_message_set_redirect ::
Ptr Message ->
Word32 ->
CString ->
IO ()
messageSetRedirect ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Word32
-> T.Text
-> m ()
messageSetRedirect :: a -> Word32 -> Text -> m ()
messageSetRedirect a
msg Word32
statusCode Text
redirectUri = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
CString
redirectUri' <- Text -> IO CString
textToCString Text
redirectUri
Ptr Message -> Word32 -> CString -> IO ()
soup_message_set_redirect Ptr Message
msg' Word32
statusCode CString
redirectUri'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
redirectUri'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetRedirectMethodInfo
instance (signature ~ (Word32 -> T.Text -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetRedirectMethodInfo a signature where
overloadedMethod = messageSetRedirect
#endif
foreign import ccall "soup_message_set_request" soup_message_set_request ::
Ptr Message ->
CString ->
CUInt ->
Ptr Word8 ->
Word64 ->
IO ()
messageSetRequest ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Maybe (T.Text)
-> Soup.Enums.MemoryUse
-> Maybe (ByteString)
-> m ()
messageSetRequest :: a -> Maybe Text -> MemoryUse -> Maybe ByteString -> m ()
messageSetRequest a
msg Maybe Text
contentType MemoryUse
reqUse Maybe ByteString
reqBody = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let reqLength :: CGType
reqLength = case Maybe ByteString
reqBody of
Maybe ByteString
Nothing -> CGType
0
Just ByteString
jReqBody -> Int -> CGType
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CGType) -> Int -> CGType
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
jReqBody
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
CString
maybeContentType <- case Maybe Text
contentType of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jContentType -> do
CString
jContentType' <- Text -> IO CString
textToCString Text
jContentType
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jContentType'
let reqUse' :: CUInt
reqUse' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (MemoryUse -> Int) -> MemoryUse -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. MemoryUse -> Int
forall a. Enum a => a -> Int
fromEnum) MemoryUse
reqUse
Ptr Word8
maybeReqBody <- case Maybe ByteString
reqBody of
Maybe ByteString
Nothing -> Ptr Word8 -> IO (Ptr Word8)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Word8
forall a. Ptr a
nullPtr
Just ByteString
jReqBody -> do
Ptr Word8
jReqBody' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
jReqBody
Ptr Word8 -> IO (Ptr Word8)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Word8
jReqBody'
Ptr Message -> CString -> CUInt -> Ptr Word8 -> CGType -> IO ()
soup_message_set_request Ptr Message
msg' CString
maybeContentType CUInt
reqUse' Ptr Word8
maybeReqBody CGType
reqLength
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeContentType
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
maybeReqBody
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetRequestMethodInfo
instance (signature ~ (Maybe (T.Text) -> Soup.Enums.MemoryUse -> Maybe (ByteString) -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetRequestMethodInfo a signature where
overloadedMethod = messageSetRequest
#endif
foreign import ccall "soup_message_set_response" soup_message_set_response ::
Ptr Message ->
CString ->
CUInt ->
Ptr Word8 ->
Word64 ->
IO ()
messageSetResponse ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Maybe (T.Text)
-> Soup.Enums.MemoryUse
-> Maybe (ByteString)
-> m ()
messageSetResponse :: a -> Maybe Text -> MemoryUse -> Maybe ByteString -> m ()
messageSetResponse a
msg Maybe Text
contentType MemoryUse
respUse Maybe ByteString
respBody = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let respLength :: CGType
respLength = case Maybe ByteString
respBody of
Maybe ByteString
Nothing -> CGType
0
Just ByteString
jRespBody -> Int -> CGType
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CGType) -> Int -> CGType
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
jRespBody
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
CString
maybeContentType <- case Maybe Text
contentType of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jContentType -> do
CString
jContentType' <- Text -> IO CString
textToCString Text
jContentType
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jContentType'
let respUse' :: CUInt
respUse' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (MemoryUse -> Int) -> MemoryUse -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. MemoryUse -> Int
forall a. Enum a => a -> Int
fromEnum) MemoryUse
respUse
Ptr Word8
maybeRespBody <- case Maybe ByteString
respBody of
Maybe ByteString
Nothing -> Ptr Word8 -> IO (Ptr Word8)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Word8
forall a. Ptr a
nullPtr
Just ByteString
jRespBody -> do
Ptr Word8
jRespBody' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
jRespBody
Ptr Word8 -> IO (Ptr Word8)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Word8
jRespBody'
Ptr Message -> CString -> CUInt -> Ptr Word8 -> CGType -> IO ()
soup_message_set_response Ptr Message
msg' CString
maybeContentType CUInt
respUse' Ptr Word8
maybeRespBody CGType
respLength
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeContentType
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
maybeRespBody
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetResponseMethodInfo
instance (signature ~ (Maybe (T.Text) -> Soup.Enums.MemoryUse -> Maybe (ByteString) -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetResponseMethodInfo a signature where
overloadedMethod = messageSetResponse
#endif
foreign import ccall "soup_message_set_site_for_cookies" soup_message_set_site_for_cookies ::
Ptr Message ->
Ptr Soup.URI.URI ->
IO ()
messageSetSiteForCookies ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Maybe (Soup.URI.URI)
-> m ()
messageSetSiteForCookies :: a -> Maybe URI -> m ()
messageSetSiteForCookies a
msg Maybe URI
siteForCookies = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr URI
maybeSiteForCookies <- case Maybe URI
siteForCookies of
Maybe URI
Nothing -> Ptr URI -> IO (Ptr URI)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr URI
forall a. Ptr a
nullPtr
Just URI
jSiteForCookies -> do
Ptr URI
jSiteForCookies' <- URI -> IO (Ptr URI)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr URI
jSiteForCookies
Ptr URI -> IO (Ptr URI)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr URI
jSiteForCookies'
Ptr Message -> Ptr URI -> IO ()
soup_message_set_site_for_cookies Ptr Message
msg' Ptr URI
maybeSiteForCookies
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
Maybe URI -> (URI -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe URI
siteForCookies URI -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetSiteForCookiesMethodInfo
instance (signature ~ (Maybe (Soup.URI.URI) -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetSiteForCookiesMethodInfo a signature where
overloadedMethod = messageSetSiteForCookies
#endif
foreign import ccall "soup_message_set_status" soup_message_set_status ::
Ptr Message ->
Word32 ->
IO ()
messageSetStatus ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Word32
-> m ()
messageSetStatus :: a -> Word32 -> m ()
messageSetStatus a
msg Word32
statusCode = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Message -> Word32 -> IO ()
soup_message_set_status Ptr Message
msg' Word32
statusCode
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetStatusMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetStatusMethodInfo a signature where
overloadedMethod = messageSetStatus
#endif
foreign import ccall "soup_message_set_status_full" soup_message_set_status_full ::
Ptr Message ->
Word32 ->
CString ->
IO ()
messageSetStatusFull ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Word32
-> T.Text
-> m ()
messageSetStatusFull :: a -> Word32 -> Text -> m ()
messageSetStatusFull a
msg Word32
statusCode Text
reasonPhrase = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
CString
reasonPhrase' <- Text -> IO CString
textToCString Text
reasonPhrase
Ptr Message -> Word32 -> CString -> IO ()
soup_message_set_status_full Ptr Message
msg' Word32
statusCode CString
reasonPhrase'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
reasonPhrase'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetStatusFullMethodInfo
instance (signature ~ (Word32 -> T.Text -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetStatusFullMethodInfo a signature where
overloadedMethod = messageSetStatusFull
#endif
foreign import ccall "soup_message_set_uri" soup_message_set_uri ::
Ptr Message ->
Ptr Soup.URI.URI ->
IO ()
messageSetUri ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Soup.URI.URI
-> m ()
messageSetUri :: a -> URI -> m ()
messageSetUri a
msg URI
uri = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr URI
uri' <- URI -> IO (Ptr URI)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr URI
uri
Ptr Message -> Ptr URI -> IO ()
soup_message_set_uri Ptr Message
msg' Ptr URI
uri'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
URI -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr URI
uri
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageSetUriMethodInfo
instance (signature ~ (Soup.URI.URI -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageSetUriMethodInfo a signature where
overloadedMethod = messageSetUri
#endif
foreign import ccall "soup_message_starting" soup_message_starting ::
Ptr Message ->
IO ()
messageStarting ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m ()
messageStarting :: a -> m ()
messageStarting a
msg = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Message -> IO ()
soup_message_starting Ptr Message
msg'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageStartingMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageStartingMethodInfo a signature where
overloadedMethod = messageStarting
#endif
foreign import ccall "soup_message_wrote_body" soup_message_wrote_body ::
Ptr Message ->
IO ()
messageWroteBody ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m ()
messageWroteBody :: a -> m ()
messageWroteBody a
msg = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Message -> IO ()
soup_message_wrote_body Ptr Message
msg'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageWroteBodyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageWroteBodyMethodInfo a signature where
overloadedMethod = messageWroteBody
#endif
foreign import ccall "soup_message_wrote_body_data" soup_message_wrote_body_data ::
Ptr Message ->
Ptr Soup.Buffer.Buffer ->
IO ()
messageWroteBodyData ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> Soup.Buffer.Buffer
-> m ()
messageWroteBodyData :: a -> Buffer -> m ()
messageWroteBodyData a
msg Buffer
chunk = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Buffer
chunk' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
chunk
Ptr Message -> Ptr Buffer -> IO ()
soup_message_wrote_body_data Ptr Message
msg' Ptr Buffer
chunk'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
MessageGotChunkCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
chunk
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageWroteBodyDataMethodInfo
instance (signature ~ (Soup.Buffer.Buffer -> m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageWroteBodyDataMethodInfo a signature where
overloadedMethod = messageWroteBodyData
#endif
foreign import ccall "soup_message_wrote_chunk" soup_message_wrote_chunk ::
Ptr Message ->
IO ()
messageWroteChunk ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m ()
messageWroteChunk :: a -> m ()
messageWroteChunk a
msg = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Message -> IO ()
soup_message_wrote_chunk Ptr Message
msg'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageWroteChunkMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageWroteChunkMethodInfo a signature where
overloadedMethod = messageWroteChunk
#endif
foreign import ccall "soup_message_wrote_headers" ::
Ptr Message ->
IO ()
messageWroteHeaders ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m ()
a
msg = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Message -> IO ()
soup_message_wrote_headers Ptr Message
msg'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageWroteHeadersMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageWroteHeadersMethodInfo a signature where
overloadedMethod = messageWroteHeaders
#endif
foreign import ccall "soup_message_wrote_informational" soup_message_wrote_informational ::
Ptr Message ->
IO ()
messageWroteInformational ::
(B.CallStack.HasCallStack, MonadIO m, IsMessage a) =>
a
-> m ()
messageWroteInformational :: a -> m ()
messageWroteInformational a
msg = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Message
msg' <- a -> IO (Ptr Message)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
msg
Ptr Message -> IO ()
soup_message_wrote_informational Ptr Message
msg'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
msg
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MessageWroteInformationalMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMessage a) => O.MethodInfo MessageWroteInformationalMethodInfo a signature where
overloadedMethod = messageWroteInformational
#endif