#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Soup.Objects.AuthDomain
(
AuthDomain(..) ,
IsAuthDomain ,
toAuthDomain ,
noAuthDomain ,
#if ENABLE_OVERLOADING
AuthDomainAcceptsMethodInfo ,
#endif
authDomainAccepts ,
#if ENABLE_OVERLOADING
AuthDomainAddPathMethodInfo ,
#endif
authDomainAddPath ,
#if ENABLE_OVERLOADING
AuthDomainChallengeMethodInfo ,
#endif
authDomainChallenge ,
#if ENABLE_OVERLOADING
AuthDomainCheckPasswordMethodInfo ,
#endif
authDomainCheckPassword ,
#if ENABLE_OVERLOADING
AuthDomainCoversMethodInfo ,
#endif
authDomainCovers ,
#if ENABLE_OVERLOADING
AuthDomainGetRealmMethodInfo ,
#endif
authDomainGetRealm ,
#if ENABLE_OVERLOADING
AuthDomainRemovePathMethodInfo ,
#endif
authDomainRemovePath ,
#if ENABLE_OVERLOADING
AuthDomainSetFilterMethodInfo ,
#endif
authDomainSetFilter ,
#if ENABLE_OVERLOADING
AuthDomainSetGenericAuthCallbackMethodInfo,
#endif
authDomainSetGenericAuthCallback ,
#if ENABLE_OVERLOADING
AuthDomainTryGenericAuthCallbackMethodInfo,
#endif
authDomainTryGenericAuthCallback ,
#if ENABLE_OVERLOADING
AuthDomainAddPathPropertyInfo ,
#endif
clearAuthDomainAddPath ,
constructAuthDomainAddPath ,
setAuthDomainAddPath ,
#if ENABLE_OVERLOADING
AuthDomainFilterPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
authDomainFilter ,
#endif
clearAuthDomainFilter ,
constructAuthDomainFilter ,
getAuthDomainFilter ,
setAuthDomainFilter ,
#if ENABLE_OVERLOADING
AuthDomainFilterDataPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
authDomainFilterData ,
#endif
constructAuthDomainFilterData ,
getAuthDomainFilterData ,
setAuthDomainFilterData ,
#if ENABLE_OVERLOADING
AuthDomainGenericAuthCallbackPropertyInfo,
#endif
#if ENABLE_OVERLOADING
authDomainGenericAuthCallback ,
#endif
clearAuthDomainGenericAuthCallback ,
constructAuthDomainGenericAuthCallback ,
getAuthDomainGenericAuthCallback ,
setAuthDomainGenericAuthCallback ,
#if ENABLE_OVERLOADING
AuthDomainGenericAuthDataPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
authDomainGenericAuthData ,
#endif
constructAuthDomainGenericAuthData ,
getAuthDomainGenericAuthData ,
setAuthDomainGenericAuthData ,
#if ENABLE_OVERLOADING
AuthDomainProxyPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
authDomainProxy ,
#endif
constructAuthDomainProxy ,
getAuthDomainProxy ,
#if ENABLE_OVERLOADING
AuthDomainRealmPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
authDomainRealm ,
#endif
constructAuthDomainRealm ,
getAuthDomainRealm ,
#if ENABLE_OVERLOADING
AuthDomainRemovePathPropertyInfo ,
#endif
clearAuthDomainRemovePath ,
constructAuthDomainRemovePath ,
setAuthDomainRemovePath ,
) 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.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Soup.Callbacks as Soup.Callbacks
import {-# SOURCE #-} qualified GI.Soup.Objects.Message as Soup.Message
newtype AuthDomain = AuthDomain (ManagedPtr AuthDomain)
foreign import ccall "soup_auth_domain_get_type"
c_soup_auth_domain_get_type :: IO GType
instance GObject AuthDomain where
gobjectType = c_soup_auth_domain_get_type
class (GObject o, O.IsDescendantOf AuthDomain o) => IsAuthDomain o
instance (GObject o, O.IsDescendantOf AuthDomain o) => IsAuthDomain o
instance O.HasParentTypes AuthDomain
type instance O.ParentTypes AuthDomain = '[GObject.Object.Object]
toAuthDomain :: (MonadIO m, IsAuthDomain o) => o -> m AuthDomain
toAuthDomain = liftIO . unsafeCastTo AuthDomain
noAuthDomain :: Maybe AuthDomain
noAuthDomain = Nothing
#if ENABLE_OVERLOADING
type family ResolveAuthDomainMethod (t :: Symbol) (o :: *) :: * where
ResolveAuthDomainMethod "accepts" o = AuthDomainAcceptsMethodInfo
ResolveAuthDomainMethod "addPath" o = AuthDomainAddPathMethodInfo
ResolveAuthDomainMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAuthDomainMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAuthDomainMethod "challenge" o = AuthDomainChallengeMethodInfo
ResolveAuthDomainMethod "checkPassword" o = AuthDomainCheckPasswordMethodInfo
ResolveAuthDomainMethod "covers" o = AuthDomainCoversMethodInfo
ResolveAuthDomainMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAuthDomainMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAuthDomainMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAuthDomainMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveAuthDomainMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAuthDomainMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAuthDomainMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveAuthDomainMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAuthDomainMethod "removePath" o = AuthDomainRemovePathMethodInfo
ResolveAuthDomainMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAuthDomainMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAuthDomainMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveAuthDomainMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveAuthDomainMethod "tryGenericAuthCallback" o = AuthDomainTryGenericAuthCallbackMethodInfo
ResolveAuthDomainMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveAuthDomainMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAuthDomainMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAuthDomainMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveAuthDomainMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveAuthDomainMethod "getRealm" o = AuthDomainGetRealmMethodInfo
ResolveAuthDomainMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAuthDomainMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAuthDomainMethod "setFilter" o = AuthDomainSetFilterMethodInfo
ResolveAuthDomainMethod "setGenericAuthCallback" o = AuthDomainSetGenericAuthCallbackMethodInfo
ResolveAuthDomainMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAuthDomainMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAuthDomainMethod t AuthDomain, O.MethodInfo info AuthDomain p) => OL.IsLabel t (AuthDomain -> 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
setAuthDomainAddPath :: (MonadIO m, IsAuthDomain o) => o -> T.Text -> m ()
setAuthDomainAddPath obj val = liftIO $ B.Properties.setObjectPropertyString obj "add-path" (Just val)
constructAuthDomainAddPath :: (IsAuthDomain o) => T.Text -> IO (GValueConstruct o)
constructAuthDomainAddPath val = B.Properties.constructObjectPropertyString "add-path" (Just val)
clearAuthDomainAddPath :: (MonadIO m, IsAuthDomain o) => o -> m ()
clearAuthDomainAddPath obj = liftIO $ B.Properties.setObjectPropertyString obj "add-path" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data AuthDomainAddPathPropertyInfo
instance AttrInfo AuthDomainAddPathPropertyInfo where
type AttrAllowedOps AuthDomainAddPathPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrClear]
type AttrSetTypeConstraint AuthDomainAddPathPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint AuthDomainAddPathPropertyInfo = IsAuthDomain
type AttrGetType AuthDomainAddPathPropertyInfo = ()
type AttrLabel AuthDomainAddPathPropertyInfo = "add-path"
type AttrOrigin AuthDomainAddPathPropertyInfo = AuthDomain
attrGet _ = undefined
attrSet _ = setAuthDomainAddPath
attrConstruct _ = constructAuthDomainAddPath
attrClear _ = clearAuthDomainAddPath
#endif
getAuthDomainFilter :: (MonadIO m, IsAuthDomain o) => o -> m (Maybe Soup.Callbacks.AuthDomainFilter_WithClosures)
getAuthDomainFilter obj = liftIO $ B.Properties.getObjectPropertyCallback obj "filter" Soup.Callbacks.dynamic_AuthDomainFilter
setAuthDomainFilter :: (MonadIO m, IsAuthDomain o) => o -> FunPtr Soup.Callbacks.C_AuthDomainFilter -> m ()
setAuthDomainFilter obj val = liftIO $ B.Properties.setObjectPropertyCallback obj "filter" val
constructAuthDomainFilter :: (IsAuthDomain o) => FunPtr Soup.Callbacks.C_AuthDomainFilter -> IO (GValueConstruct o)
constructAuthDomainFilter val = B.Properties.constructObjectPropertyCallback "filter" val
clearAuthDomainFilter :: (MonadIO m, IsAuthDomain o) => o -> m ()
clearAuthDomainFilter obj = liftIO $ B.Properties.setObjectPropertyCallback obj "filter" FP.nullFunPtr
#if ENABLE_OVERLOADING
data AuthDomainFilterPropertyInfo
instance AttrInfo AuthDomainFilterPropertyInfo where
type AttrAllowedOps AuthDomainFilterPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint AuthDomainFilterPropertyInfo = (~) (FunPtr Soup.Callbacks.C_AuthDomainFilter)
type AttrBaseTypeConstraint AuthDomainFilterPropertyInfo = IsAuthDomain
type AttrGetType AuthDomainFilterPropertyInfo = (Maybe Soup.Callbacks.AuthDomainFilter_WithClosures)
type AttrLabel AuthDomainFilterPropertyInfo = "filter"
type AttrOrigin AuthDomainFilterPropertyInfo = AuthDomain
attrGet _ = getAuthDomainFilter
attrSet _ = setAuthDomainFilter
attrConstruct _ = constructAuthDomainFilter
attrClear _ = clearAuthDomainFilter
#endif
getAuthDomainFilterData :: (MonadIO m, IsAuthDomain o) => o -> m (Ptr ())
getAuthDomainFilterData obj = liftIO $ B.Properties.getObjectPropertyPtr obj "filter-data"
setAuthDomainFilterData :: (MonadIO m, IsAuthDomain o) => o -> Ptr () -> m ()
setAuthDomainFilterData obj val = liftIO $ B.Properties.setObjectPropertyPtr obj "filter-data" val
constructAuthDomainFilterData :: (IsAuthDomain o) => Ptr () -> IO (GValueConstruct o)
constructAuthDomainFilterData val = B.Properties.constructObjectPropertyPtr "filter-data" val
#if ENABLE_OVERLOADING
data AuthDomainFilterDataPropertyInfo
instance AttrInfo AuthDomainFilterDataPropertyInfo where
type AttrAllowedOps AuthDomainFilterDataPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint AuthDomainFilterDataPropertyInfo = (~) (Ptr ())
type AttrBaseTypeConstraint AuthDomainFilterDataPropertyInfo = IsAuthDomain
type AttrGetType AuthDomainFilterDataPropertyInfo = (Ptr ())
type AttrLabel AuthDomainFilterDataPropertyInfo = "filter-data"
type AttrOrigin AuthDomainFilterDataPropertyInfo = AuthDomain
attrGet _ = getAuthDomainFilterData
attrSet _ = setAuthDomainFilterData
attrConstruct _ = constructAuthDomainFilterData
attrClear _ = undefined
#endif
getAuthDomainGenericAuthCallback :: (MonadIO m, IsAuthDomain o) => o -> m (Maybe Soup.Callbacks.AuthDomainGenericAuthCallback_WithClosures)
getAuthDomainGenericAuthCallback obj = liftIO $ B.Properties.getObjectPropertyCallback obj "generic-auth-callback" Soup.Callbacks.dynamic_AuthDomainGenericAuthCallback
setAuthDomainGenericAuthCallback :: (MonadIO m, IsAuthDomain o) => o -> FunPtr Soup.Callbacks.C_AuthDomainGenericAuthCallback -> m ()
setAuthDomainGenericAuthCallback obj val = liftIO $ B.Properties.setObjectPropertyCallback obj "generic-auth-callback" val
constructAuthDomainGenericAuthCallback :: (IsAuthDomain o) => FunPtr Soup.Callbacks.C_AuthDomainGenericAuthCallback -> IO (GValueConstruct o)
constructAuthDomainGenericAuthCallback val = B.Properties.constructObjectPropertyCallback "generic-auth-callback" val
clearAuthDomainGenericAuthCallback :: (MonadIO m, IsAuthDomain o) => o -> m ()
clearAuthDomainGenericAuthCallback obj = liftIO $ B.Properties.setObjectPropertyCallback obj "generic-auth-callback" FP.nullFunPtr
#if ENABLE_OVERLOADING
data AuthDomainGenericAuthCallbackPropertyInfo
instance AttrInfo AuthDomainGenericAuthCallbackPropertyInfo where
type AttrAllowedOps AuthDomainGenericAuthCallbackPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint AuthDomainGenericAuthCallbackPropertyInfo = (~) (FunPtr Soup.Callbacks.C_AuthDomainGenericAuthCallback)
type AttrBaseTypeConstraint AuthDomainGenericAuthCallbackPropertyInfo = IsAuthDomain
type AttrGetType AuthDomainGenericAuthCallbackPropertyInfo = (Maybe Soup.Callbacks.AuthDomainGenericAuthCallback_WithClosures)
type AttrLabel AuthDomainGenericAuthCallbackPropertyInfo = "generic-auth-callback"
type AttrOrigin AuthDomainGenericAuthCallbackPropertyInfo = AuthDomain
attrGet _ = getAuthDomainGenericAuthCallback
attrSet _ = setAuthDomainGenericAuthCallback
attrConstruct _ = constructAuthDomainGenericAuthCallback
attrClear _ = clearAuthDomainGenericAuthCallback
#endif
getAuthDomainGenericAuthData :: (MonadIO m, IsAuthDomain o) => o -> m (Ptr ())
getAuthDomainGenericAuthData obj = liftIO $ B.Properties.getObjectPropertyPtr obj "generic-auth-data"
setAuthDomainGenericAuthData :: (MonadIO m, IsAuthDomain o) => o -> Ptr () -> m ()
setAuthDomainGenericAuthData obj val = liftIO $ B.Properties.setObjectPropertyPtr obj "generic-auth-data" val
constructAuthDomainGenericAuthData :: (IsAuthDomain o) => Ptr () -> IO (GValueConstruct o)
constructAuthDomainGenericAuthData val = B.Properties.constructObjectPropertyPtr "generic-auth-data" val
#if ENABLE_OVERLOADING
data AuthDomainGenericAuthDataPropertyInfo
instance AttrInfo AuthDomainGenericAuthDataPropertyInfo where
type AttrAllowedOps AuthDomainGenericAuthDataPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint AuthDomainGenericAuthDataPropertyInfo = (~) (Ptr ())
type AttrBaseTypeConstraint AuthDomainGenericAuthDataPropertyInfo = IsAuthDomain
type AttrGetType AuthDomainGenericAuthDataPropertyInfo = (Ptr ())
type AttrLabel AuthDomainGenericAuthDataPropertyInfo = "generic-auth-data"
type AttrOrigin AuthDomainGenericAuthDataPropertyInfo = AuthDomain
attrGet _ = getAuthDomainGenericAuthData
attrSet _ = setAuthDomainGenericAuthData
attrConstruct _ = constructAuthDomainGenericAuthData
attrClear _ = undefined
#endif
getAuthDomainProxy :: (MonadIO m, IsAuthDomain o) => o -> m Bool
getAuthDomainProxy obj = liftIO $ B.Properties.getObjectPropertyBool obj "proxy"
constructAuthDomainProxy :: (IsAuthDomain o) => Bool -> IO (GValueConstruct o)
constructAuthDomainProxy val = B.Properties.constructObjectPropertyBool "proxy" val
#if ENABLE_OVERLOADING
data AuthDomainProxyPropertyInfo
instance AttrInfo AuthDomainProxyPropertyInfo where
type AttrAllowedOps AuthDomainProxyPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint AuthDomainProxyPropertyInfo = (~) Bool
type AttrBaseTypeConstraint AuthDomainProxyPropertyInfo = IsAuthDomain
type AttrGetType AuthDomainProxyPropertyInfo = Bool
type AttrLabel AuthDomainProxyPropertyInfo = "proxy"
type AttrOrigin AuthDomainProxyPropertyInfo = AuthDomain
attrGet _ = getAuthDomainProxy
attrSet _ = undefined
attrConstruct _ = constructAuthDomainProxy
attrClear _ = undefined
#endif
getAuthDomainRealm :: (MonadIO m, IsAuthDomain o) => o -> m T.Text
getAuthDomainRealm obj = liftIO $ checkUnexpectedNothing "getAuthDomainRealm" $ B.Properties.getObjectPropertyString obj "realm"
constructAuthDomainRealm :: (IsAuthDomain o) => T.Text -> IO (GValueConstruct o)
constructAuthDomainRealm val = B.Properties.constructObjectPropertyString "realm" (Just val)
#if ENABLE_OVERLOADING
data AuthDomainRealmPropertyInfo
instance AttrInfo AuthDomainRealmPropertyInfo where
type AttrAllowedOps AuthDomainRealmPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint AuthDomainRealmPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint AuthDomainRealmPropertyInfo = IsAuthDomain
type AttrGetType AuthDomainRealmPropertyInfo = T.Text
type AttrLabel AuthDomainRealmPropertyInfo = "realm"
type AttrOrigin AuthDomainRealmPropertyInfo = AuthDomain
attrGet _ = getAuthDomainRealm
attrSet _ = undefined
attrConstruct _ = constructAuthDomainRealm
attrClear _ = undefined
#endif
setAuthDomainRemovePath :: (MonadIO m, IsAuthDomain o) => o -> T.Text -> m ()
setAuthDomainRemovePath obj val = liftIO $ B.Properties.setObjectPropertyString obj "remove-path" (Just val)
constructAuthDomainRemovePath :: (IsAuthDomain o) => T.Text -> IO (GValueConstruct o)
constructAuthDomainRemovePath val = B.Properties.constructObjectPropertyString "remove-path" (Just val)
clearAuthDomainRemovePath :: (MonadIO m, IsAuthDomain o) => o -> m ()
clearAuthDomainRemovePath obj = liftIO $ B.Properties.setObjectPropertyString obj "remove-path" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data AuthDomainRemovePathPropertyInfo
instance AttrInfo AuthDomainRemovePathPropertyInfo where
type AttrAllowedOps AuthDomainRemovePathPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrClear]
type AttrSetTypeConstraint AuthDomainRemovePathPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint AuthDomainRemovePathPropertyInfo = IsAuthDomain
type AttrGetType AuthDomainRemovePathPropertyInfo = ()
type AttrLabel AuthDomainRemovePathPropertyInfo = "remove-path"
type AttrOrigin AuthDomainRemovePathPropertyInfo = AuthDomain
attrGet _ = undefined
attrSet _ = setAuthDomainRemovePath
attrConstruct _ = constructAuthDomainRemovePath
attrClear _ = clearAuthDomainRemovePath
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList AuthDomain
type instance O.AttributeList AuthDomain = AuthDomainAttributeList
type AuthDomainAttributeList = ('[ '("addPath", AuthDomainAddPathPropertyInfo), '("filter", AuthDomainFilterPropertyInfo), '("filterData", AuthDomainFilterDataPropertyInfo), '("genericAuthCallback", AuthDomainGenericAuthCallbackPropertyInfo), '("genericAuthData", AuthDomainGenericAuthDataPropertyInfo), '("proxy", AuthDomainProxyPropertyInfo), '("realm", AuthDomainRealmPropertyInfo), '("removePath", AuthDomainRemovePathPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
authDomainFilter :: AttrLabelProxy "filter"
authDomainFilter = AttrLabelProxy
authDomainFilterData :: AttrLabelProxy "filterData"
authDomainFilterData = AttrLabelProxy
authDomainGenericAuthCallback :: AttrLabelProxy "genericAuthCallback"
authDomainGenericAuthCallback = AttrLabelProxy
authDomainGenericAuthData :: AttrLabelProxy "genericAuthData"
authDomainGenericAuthData = AttrLabelProxy
authDomainProxy :: AttrLabelProxy "proxy"
authDomainProxy = AttrLabelProxy
authDomainRealm :: AttrLabelProxy "realm"
authDomainRealm = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList AuthDomain = AuthDomainSignalList
type AuthDomainSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "soup_auth_domain_accepts" soup_auth_domain_accepts ::
Ptr AuthDomain ->
Ptr Soup.Message.Message ->
IO CString
authDomainAccepts ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a, Soup.Message.IsMessage b) =>
a
-> b
-> m (Maybe T.Text)
authDomainAccepts domain msg = liftIO $ do
domain' <- unsafeManagedPtrCastPtr domain
msg' <- unsafeManagedPtrCastPtr msg
result <- soup_auth_domain_accepts domain' msg'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
freeMem result'
return result''
touchManagedPtr domain
touchManagedPtr msg
return maybeResult
#if ENABLE_OVERLOADING
data AuthDomainAcceptsMethodInfo
instance (signature ~ (b -> m (Maybe T.Text)), MonadIO m, IsAuthDomain a, Soup.Message.IsMessage b) => O.MethodInfo AuthDomainAcceptsMethodInfo a signature where
overloadedMethod _ = authDomainAccepts
#endif
foreign import ccall "soup_auth_domain_add_path" soup_auth_domain_add_path ::
Ptr AuthDomain ->
CString ->
IO ()
authDomainAddPath ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a) =>
a
-> T.Text
-> m ()
authDomainAddPath domain path = liftIO $ do
domain' <- unsafeManagedPtrCastPtr domain
path' <- textToCString path
soup_auth_domain_add_path domain' path'
touchManagedPtr domain
freeMem path'
return ()
#if ENABLE_OVERLOADING
data AuthDomainAddPathMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsAuthDomain a) => O.MethodInfo AuthDomainAddPathMethodInfo a signature where
overloadedMethod _ = authDomainAddPath
#endif
foreign import ccall "soup_auth_domain_challenge" soup_auth_domain_challenge ::
Ptr AuthDomain ->
Ptr Soup.Message.Message ->
IO ()
authDomainChallenge ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a, Soup.Message.IsMessage b) =>
a
-> b
-> m ()
authDomainChallenge domain msg = liftIO $ do
domain' <- unsafeManagedPtrCastPtr domain
msg' <- unsafeManagedPtrCastPtr msg
soup_auth_domain_challenge domain' msg'
touchManagedPtr domain
touchManagedPtr msg
return ()
#if ENABLE_OVERLOADING
data AuthDomainChallengeMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsAuthDomain a, Soup.Message.IsMessage b) => O.MethodInfo AuthDomainChallengeMethodInfo a signature where
overloadedMethod _ = authDomainChallenge
#endif
foreign import ccall "soup_auth_domain_check_password" soup_auth_domain_check_password ::
Ptr AuthDomain ->
Ptr Soup.Message.Message ->
CString ->
CString ->
IO CInt
authDomainCheckPassword ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a, Soup.Message.IsMessage b) =>
a
-> b
-> T.Text
-> T.Text
-> m Bool
authDomainCheckPassword domain msg username password = liftIO $ do
domain' <- unsafeManagedPtrCastPtr domain
msg' <- unsafeManagedPtrCastPtr msg
username' <- textToCString username
password' <- textToCString password
result <- soup_auth_domain_check_password domain' msg' username' password'
let result' = (/= 0) result
touchManagedPtr domain
touchManagedPtr msg
freeMem username'
freeMem password'
return result'
#if ENABLE_OVERLOADING
data AuthDomainCheckPasswordMethodInfo
instance (signature ~ (b -> T.Text -> T.Text -> m Bool), MonadIO m, IsAuthDomain a, Soup.Message.IsMessage b) => O.MethodInfo AuthDomainCheckPasswordMethodInfo a signature where
overloadedMethod _ = authDomainCheckPassword
#endif
foreign import ccall "soup_auth_domain_covers" soup_auth_domain_covers ::
Ptr AuthDomain ->
Ptr Soup.Message.Message ->
IO CInt
authDomainCovers ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a, Soup.Message.IsMessage b) =>
a
-> b
-> m Bool
authDomainCovers domain msg = liftIO $ do
domain' <- unsafeManagedPtrCastPtr domain
msg' <- unsafeManagedPtrCastPtr msg
result <- soup_auth_domain_covers domain' msg'
let result' = (/= 0) result
touchManagedPtr domain
touchManagedPtr msg
return result'
#if ENABLE_OVERLOADING
data AuthDomainCoversMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsAuthDomain a, Soup.Message.IsMessage b) => O.MethodInfo AuthDomainCoversMethodInfo a signature where
overloadedMethod _ = authDomainCovers
#endif
foreign import ccall "soup_auth_domain_get_realm" soup_auth_domain_get_realm ::
Ptr AuthDomain ->
IO CString
authDomainGetRealm ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a) =>
a
-> m T.Text
authDomainGetRealm domain = liftIO $ do
domain' <- unsafeManagedPtrCastPtr domain
result <- soup_auth_domain_get_realm domain'
checkUnexpectedReturnNULL "authDomainGetRealm" result
result' <- cstringToText result
touchManagedPtr domain
return result'
#if ENABLE_OVERLOADING
data AuthDomainGetRealmMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsAuthDomain a) => O.MethodInfo AuthDomainGetRealmMethodInfo a signature where
overloadedMethod _ = authDomainGetRealm
#endif
foreign import ccall "soup_auth_domain_remove_path" soup_auth_domain_remove_path ::
Ptr AuthDomain ->
CString ->
IO ()
authDomainRemovePath ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a) =>
a
-> T.Text
-> m ()
authDomainRemovePath domain path = liftIO $ do
domain' <- unsafeManagedPtrCastPtr domain
path' <- textToCString path
soup_auth_domain_remove_path domain' path'
touchManagedPtr domain
freeMem path'
return ()
#if ENABLE_OVERLOADING
data AuthDomainRemovePathMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsAuthDomain a) => O.MethodInfo AuthDomainRemovePathMethodInfo a signature where
overloadedMethod _ = authDomainRemovePath
#endif
foreign import ccall "soup_auth_domain_set_filter" soup_auth_domain_set_filter ::
Ptr AuthDomain ->
FunPtr Soup.Callbacks.C_AuthDomainFilter ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
authDomainSetFilter ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a) =>
a
-> Soup.Callbacks.AuthDomainFilter
-> m ()
authDomainSetFilter domain filter = liftIO $ do
domain' <- unsafeManagedPtrCastPtr domain
filter' <- Soup.Callbacks.mk_AuthDomainFilter (Soup.Callbacks.wrap_AuthDomainFilter Nothing (Soup.Callbacks.drop_closures_AuthDomainFilter filter))
let filterData = castFunPtrToPtr filter'
let dnotify = safeFreeFunPtrPtr
soup_auth_domain_set_filter domain' filter' filterData dnotify
touchManagedPtr domain
return ()
#if ENABLE_OVERLOADING
data AuthDomainSetFilterMethodInfo
instance (signature ~ (Soup.Callbacks.AuthDomainFilter -> m ()), MonadIO m, IsAuthDomain a) => O.MethodInfo AuthDomainSetFilterMethodInfo a signature where
overloadedMethod _ = authDomainSetFilter
#endif
foreign import ccall "soup_auth_domain_set_generic_auth_callback" soup_auth_domain_set_generic_auth_callback ::
Ptr AuthDomain ->
FunPtr Soup.Callbacks.C_AuthDomainGenericAuthCallback ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
authDomainSetGenericAuthCallback ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a) =>
a
-> Soup.Callbacks.AuthDomainGenericAuthCallback
-> m ()
authDomainSetGenericAuthCallback domain authCallback = liftIO $ do
domain' <- unsafeManagedPtrCastPtr domain
authCallback' <- Soup.Callbacks.mk_AuthDomainGenericAuthCallback (Soup.Callbacks.wrap_AuthDomainGenericAuthCallback Nothing (Soup.Callbacks.drop_closures_AuthDomainGenericAuthCallback authCallback))
let authData = castFunPtrToPtr authCallback'
let dnotify = safeFreeFunPtrPtr
soup_auth_domain_set_generic_auth_callback domain' authCallback' authData dnotify
touchManagedPtr domain
return ()
#if ENABLE_OVERLOADING
data AuthDomainSetGenericAuthCallbackMethodInfo
instance (signature ~ (Soup.Callbacks.AuthDomainGenericAuthCallback -> m ()), MonadIO m, IsAuthDomain a) => O.MethodInfo AuthDomainSetGenericAuthCallbackMethodInfo a signature where
overloadedMethod _ = authDomainSetGenericAuthCallback
#endif
foreign import ccall "soup_auth_domain_try_generic_auth_callback" soup_auth_domain_try_generic_auth_callback ::
Ptr AuthDomain ->
Ptr Soup.Message.Message ->
CString ->
IO CInt
authDomainTryGenericAuthCallback ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a, Soup.Message.IsMessage b) =>
a
-> b
-> T.Text
-> m Bool
authDomainTryGenericAuthCallback domain msg username = liftIO $ do
domain' <- unsafeManagedPtrCastPtr domain
msg' <- unsafeManagedPtrCastPtr msg
username' <- textToCString username
result <- soup_auth_domain_try_generic_auth_callback domain' msg' username'
let result' = (/= 0) result
touchManagedPtr domain
touchManagedPtr msg
freeMem username'
return result'
#if ENABLE_OVERLOADING
data AuthDomainTryGenericAuthCallbackMethodInfo
instance (signature ~ (b -> T.Text -> m Bool), MonadIO m, IsAuthDomain a, Soup.Message.IsMessage b) => O.MethodInfo AuthDomainTryGenericAuthCallbackMethodInfo a signature where
overloadedMethod _ = authDomainTryGenericAuthCallback
#endif