#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Soup.Objects.SessionAsync
(
SessionAsync(..) ,
IsSessionAsync ,
toSessionAsync ,
noSessionAsync ,
sessionAsyncNew ,
) 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.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.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.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Soup.Objects.Session as Soup.Session
newtype SessionAsync = SessionAsync (ManagedPtr SessionAsync)
foreign import ccall "soup_session_async_get_type"
c_soup_session_async_get_type :: IO GType
instance GObject SessionAsync where
gobjectType = c_soup_session_async_get_type
class (GObject o, O.IsDescendantOf SessionAsync o) => IsSessionAsync o
instance (GObject o, O.IsDescendantOf SessionAsync o) => IsSessionAsync o
instance O.HasParentTypes SessionAsync
type instance O.ParentTypes SessionAsync = '[Soup.Session.Session, GObject.Object.Object]
toSessionAsync :: (MonadIO m, IsSessionAsync o) => o -> m SessionAsync
toSessionAsync = liftIO . unsafeCastTo SessionAsync
noSessionAsync :: Maybe SessionAsync
noSessionAsync = Nothing
#if ENABLE_OVERLOADING
type family ResolveSessionAsyncMethod (t :: Symbol) (o :: *) :: * where
ResolveSessionAsyncMethod "abort" o = Soup.Session.SessionAbortMethodInfo
ResolveSessionAsyncMethod "addFeature" o = Soup.Session.SessionAddFeatureMethodInfo
ResolveSessionAsyncMethod "addFeatureByType" o = Soup.Session.SessionAddFeatureByTypeMethodInfo
ResolveSessionAsyncMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSessionAsyncMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSessionAsyncMethod "cancelMessage" o = Soup.Session.SessionCancelMessageMethodInfo
ResolveSessionAsyncMethod "connectAsync" o = Soup.Session.SessionConnectAsyncMethodInfo
ResolveSessionAsyncMethod "connectFinish" o = Soup.Session.SessionConnectFinishMethodInfo
ResolveSessionAsyncMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSessionAsyncMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSessionAsyncMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSessionAsyncMethod "hasFeature" o = Soup.Session.SessionHasFeatureMethodInfo
ResolveSessionAsyncMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSessionAsyncMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSessionAsyncMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSessionAsyncMethod "pauseMessage" o = Soup.Session.SessionPauseMessageMethodInfo
ResolveSessionAsyncMethod "prefetchDns" o = Soup.Session.SessionPrefetchDnsMethodInfo
ResolveSessionAsyncMethod "prepareForUri" o = Soup.Session.SessionPrepareForUriMethodInfo
ResolveSessionAsyncMethod "queueMessage" o = Soup.Session.SessionQueueMessageMethodInfo
ResolveSessionAsyncMethod "redirectMessage" o = Soup.Session.SessionRedirectMessageMethodInfo
ResolveSessionAsyncMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSessionAsyncMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSessionAsyncMethod "removeFeature" o = Soup.Session.SessionRemoveFeatureMethodInfo
ResolveSessionAsyncMethod "removeFeatureByType" o = Soup.Session.SessionRemoveFeatureByTypeMethodInfo
ResolveSessionAsyncMethod "request" o = Soup.Session.SessionRequestMethodInfo
ResolveSessionAsyncMethod "requestHttp" o = Soup.Session.SessionRequestHttpMethodInfo
ResolveSessionAsyncMethod "requestHttpUri" o = Soup.Session.SessionRequestHttpUriMethodInfo
ResolveSessionAsyncMethod "requestUri" o = Soup.Session.SessionRequestUriMethodInfo
ResolveSessionAsyncMethod "requeueMessage" o = Soup.Session.SessionRequeueMessageMethodInfo
ResolveSessionAsyncMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSessionAsyncMethod "send" o = Soup.Session.SessionSendMethodInfo
ResolveSessionAsyncMethod "sendAsync" o = Soup.Session.SessionSendAsyncMethodInfo
ResolveSessionAsyncMethod "sendFinish" o = Soup.Session.SessionSendFinishMethodInfo
ResolveSessionAsyncMethod "sendMessage" o = Soup.Session.SessionSendMessageMethodInfo
ResolveSessionAsyncMethod "stealConnection" o = Soup.Session.SessionStealConnectionMethodInfo
ResolveSessionAsyncMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSessionAsyncMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSessionAsyncMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSessionAsyncMethod "unpauseMessage" o = Soup.Session.SessionUnpauseMessageMethodInfo
ResolveSessionAsyncMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSessionAsyncMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSessionAsyncMethod "websocketConnectAsync" o = Soup.Session.SessionWebsocketConnectAsyncMethodInfo
ResolveSessionAsyncMethod "websocketConnectFinish" o = Soup.Session.SessionWebsocketConnectFinishMethodInfo
ResolveSessionAsyncMethod "wouldRedirect" o = Soup.Session.SessionWouldRedirectMethodInfo
ResolveSessionAsyncMethod "getAsyncContext" o = Soup.Session.SessionGetAsyncContextMethodInfo
ResolveSessionAsyncMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSessionAsyncMethod "getFeature" o = Soup.Session.SessionGetFeatureMethodInfo
ResolveSessionAsyncMethod "getFeatureForMessage" o = Soup.Session.SessionGetFeatureForMessageMethodInfo
ResolveSessionAsyncMethod "getFeatures" o = Soup.Session.SessionGetFeaturesMethodInfo
ResolveSessionAsyncMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSessionAsyncMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSessionAsyncMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSessionAsyncMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSessionAsyncMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSessionAsyncMethod t SessionAsync, O.MethodInfo info SessionAsync p) => OL.IsLabel t (SessionAsync -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList SessionAsync
type instance O.AttributeList SessionAsync = SessionAsyncAttributeList
type SessionAsyncAttributeList = ('[ '("acceptLanguage", Soup.Session.SessionAcceptLanguagePropertyInfo), '("acceptLanguageAuto", Soup.Session.SessionAcceptLanguageAutoPropertyInfo), '("asyncContext", Soup.Session.SessionAsyncContextPropertyInfo), '("httpAliases", Soup.Session.SessionHttpAliasesPropertyInfo), '("httpsAliases", Soup.Session.SessionHttpsAliasesPropertyInfo), '("idleTimeout", Soup.Session.SessionIdleTimeoutPropertyInfo), '("localAddress", Soup.Session.SessionLocalAddressPropertyInfo), '("maxConns", Soup.Session.SessionMaxConnsPropertyInfo), '("maxConnsPerHost", Soup.Session.SessionMaxConnsPerHostPropertyInfo), '("proxyResolver", Soup.Session.SessionProxyResolverPropertyInfo), '("proxyUri", Soup.Session.SessionProxyUriPropertyInfo), '("sslCaFile", Soup.Session.SessionSslCaFilePropertyInfo), '("sslStrict", Soup.Session.SessionSslStrictPropertyInfo), '("sslUseSystemCaFile", Soup.Session.SessionSslUseSystemCaFilePropertyInfo), '("timeout", Soup.Session.SessionTimeoutPropertyInfo), '("tlsDatabase", Soup.Session.SessionTlsDatabasePropertyInfo), '("tlsInteraction", Soup.Session.SessionTlsInteractionPropertyInfo), '("useNtlm", Soup.Session.SessionUseNtlmPropertyInfo), '("useThreadContext", Soup.Session.SessionUseThreadContextPropertyInfo), '("userAgent", Soup.Session.SessionUserAgentPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList SessionAsync = SessionAsyncSignalList
type SessionAsyncSignalList = ('[ '("authenticate", Soup.Session.SessionAuthenticateSignalInfo), '("connectionCreated", Soup.Session.SessionConnectionCreatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("requestQueued", Soup.Session.SessionRequestQueuedSignalInfo), '("requestStarted", Soup.Session.SessionRequestStartedSignalInfo), '("requestUnqueued", Soup.Session.SessionRequestUnqueuedSignalInfo), '("tunneling", Soup.Session.SessionTunnelingSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "soup_session_async_new" soup_session_async_new ::
IO (Ptr SessionAsync)
{-# DEPRECATED sessionAsyncNew ["'GI.Soup.Objects.SessionAsync.SessionAsync' is deprecated; use a plain","'GI.Soup.Objects.Session.Session', created with 'GI.Soup.Objects.Session.sessionNew'. See the \\<link","linkend=\\\"libsoup-session-porting\\\">porting guide\\<\\/link>."] #-}
sessionAsyncNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m SessionAsync
sessionAsyncNew = liftIO $ do
result <- soup_session_async_new
checkUnexpectedReturnNULL "sessionAsyncNew" result
result' <- (wrapObject SessionAsync) result
return result'
#if ENABLE_OVERLOADING
#endif