{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) -} module GI.Soup.Objects.AuthDomain ( -- * Exported types AuthDomain(..) , AuthDomainK , toAuthDomain , noAuthDomain , -- * Methods -- ** authDomainAccepts authDomainAccepts , -- ** authDomainAddPath authDomainAddPath , -- ** authDomainBasicSetAuthCallback authDomainBasicSetAuthCallback , -- ** authDomainChallenge authDomainChallenge , -- ** authDomainCheckPassword authDomainCheckPassword , -- ** authDomainCovers authDomainCovers , -- ** authDomainDigestSetAuthCallback authDomainDigestSetAuthCallback , -- ** authDomainGetRealm authDomainGetRealm , -- ** authDomainRemovePath authDomainRemovePath , -- ** authDomainSetFilter authDomainSetFilter , -- ** authDomainSetGenericAuthCallback authDomainSetGenericAuthCallback , -- ** authDomainTryGenericAuthCallback authDomainTryGenericAuthCallback , -- * Properties -- ** AddPath AuthDomainAddPathPropertyInfo , constructAuthDomainAddPath , setAuthDomainAddPath , -- ** Filter AuthDomainFilterPropertyInfo , constructAuthDomainFilter , getAuthDomainFilter , setAuthDomainFilter , -- ** FilterData AuthDomainFilterDataPropertyInfo , constructAuthDomainFilterData , getAuthDomainFilterData , setAuthDomainFilterData , -- ** GenericAuthCallback AuthDomainGenericAuthCallbackPropertyInfo, constructAuthDomainGenericAuthCallback , getAuthDomainGenericAuthCallback , setAuthDomainGenericAuthCallback , -- ** GenericAuthData AuthDomainGenericAuthDataPropertyInfo , constructAuthDomainGenericAuthData , getAuthDomainGenericAuthData , setAuthDomainGenericAuthData , -- ** Proxy AuthDomainProxyPropertyInfo , constructAuthDomainProxy , getAuthDomainProxy , -- ** Realm AuthDomainRealmPropertyInfo , constructAuthDomainRealm , getAuthDomainRealm , -- ** RemovePath AuthDomainRemovePathPropertyInfo , constructAuthDomainRemovePath , setAuthDomainRemovePath , ) where import Prelude () import Data.GI.Base.ShortPrelude import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import GI.Soup.Types import GI.Soup.Callbacks import qualified GI.GLib as GLib import qualified GI.GObject as GObject newtype AuthDomain = AuthDomain (ForeignPtr AuthDomain) foreign import ccall "soup_auth_domain_get_type" c_soup_auth_domain_get_type :: IO GType type instance ParentTypes AuthDomain = AuthDomainParentTypes type AuthDomainParentTypes = '[GObject.Object] instance GObject AuthDomain where gobjectIsInitiallyUnowned _ = False gobjectType _ = c_soup_auth_domain_get_type class GObject o => AuthDomainK o instance (GObject o, IsDescendantOf AuthDomain o) => AuthDomainK o toAuthDomain :: AuthDomainK o => o -> IO AuthDomain toAuthDomain = unsafeCastTo AuthDomain noAuthDomain :: Maybe AuthDomain noAuthDomain = Nothing -- VVV Prop "add-path" -- Type: TBasicType TUTF8 -- Flags: [PropertyWritable] setAuthDomainAddPath :: (MonadIO m, AuthDomainK o) => o -> T.Text -> m () setAuthDomainAddPath obj val = liftIO $ setObjectPropertyString obj "add-path" val constructAuthDomainAddPath :: T.Text -> IO ([Char], GValue) constructAuthDomainAddPath val = constructObjectPropertyString "add-path" val data AuthDomainAddPathPropertyInfo instance AttrInfo AuthDomainAddPathPropertyInfo where type AttrAllowedOps AuthDomainAddPathPropertyInfo = '[ 'AttrSet, 'AttrConstruct] type AttrSetTypeConstraint AuthDomainAddPathPropertyInfo = (~) T.Text type AttrBaseTypeConstraint AuthDomainAddPathPropertyInfo = AuthDomainK type AttrGetType AuthDomainAddPathPropertyInfo = () type AttrLabel AuthDomainAddPathPropertyInfo = "AuthDomain::add-path" attrGet _ = undefined attrSet _ = setAuthDomainAddPath attrConstruct _ = constructAuthDomainAddPath -- VVV Prop "filter" -- Type: TBasicType TVoid -- Flags: [PropertyReadable,PropertyWritable] getAuthDomainFilter :: (MonadIO m, AuthDomainK o) => o -> m (Ptr ()) getAuthDomainFilter obj = liftIO $ getObjectPropertyPtr obj "filter" setAuthDomainFilter :: (MonadIO m, AuthDomainK o) => o -> (Ptr ()) -> m () setAuthDomainFilter obj val = liftIO $ setObjectPropertyPtr obj "filter" val constructAuthDomainFilter :: (Ptr ()) -> IO ([Char], GValue) constructAuthDomainFilter val = constructObjectPropertyPtr "filter" val data AuthDomainFilterPropertyInfo instance AttrInfo AuthDomainFilterPropertyInfo where type AttrAllowedOps AuthDomainFilterPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint AuthDomainFilterPropertyInfo = (~) (Ptr ()) type AttrBaseTypeConstraint AuthDomainFilterPropertyInfo = AuthDomainK type AttrGetType AuthDomainFilterPropertyInfo = (Ptr ()) type AttrLabel AuthDomainFilterPropertyInfo = "AuthDomain::filter" attrGet _ = getAuthDomainFilter attrSet _ = setAuthDomainFilter attrConstruct _ = constructAuthDomainFilter -- VVV Prop "filter-data" -- Type: TBasicType TVoid -- Flags: [PropertyReadable,PropertyWritable] getAuthDomainFilterData :: (MonadIO m, AuthDomainK o) => o -> m (Ptr ()) getAuthDomainFilterData obj = liftIO $ getObjectPropertyPtr obj "filter-data" setAuthDomainFilterData :: (MonadIO m, AuthDomainK o) => o -> (Ptr ()) -> m () setAuthDomainFilterData obj val = liftIO $ setObjectPropertyPtr obj "filter-data" val constructAuthDomainFilterData :: (Ptr ()) -> IO ([Char], GValue) constructAuthDomainFilterData val = constructObjectPropertyPtr "filter-data" val data AuthDomainFilterDataPropertyInfo instance AttrInfo AuthDomainFilterDataPropertyInfo where type AttrAllowedOps AuthDomainFilterDataPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint AuthDomainFilterDataPropertyInfo = (~) (Ptr ()) type AttrBaseTypeConstraint AuthDomainFilterDataPropertyInfo = AuthDomainK type AttrGetType AuthDomainFilterDataPropertyInfo = (Ptr ()) type AttrLabel AuthDomainFilterDataPropertyInfo = "AuthDomain::filter-data" attrGet _ = getAuthDomainFilterData attrSet _ = setAuthDomainFilterData attrConstruct _ = constructAuthDomainFilterData -- VVV Prop "generic-auth-callback" -- Type: TBasicType TVoid -- Flags: [PropertyReadable,PropertyWritable] getAuthDomainGenericAuthCallback :: (MonadIO m, AuthDomainK o) => o -> m (Ptr ()) getAuthDomainGenericAuthCallback obj = liftIO $ getObjectPropertyPtr obj "generic-auth-callback" setAuthDomainGenericAuthCallback :: (MonadIO m, AuthDomainK o) => o -> (Ptr ()) -> m () setAuthDomainGenericAuthCallback obj val = liftIO $ setObjectPropertyPtr obj "generic-auth-callback" val constructAuthDomainGenericAuthCallback :: (Ptr ()) -> IO ([Char], GValue) constructAuthDomainGenericAuthCallback val = constructObjectPropertyPtr "generic-auth-callback" val data AuthDomainGenericAuthCallbackPropertyInfo instance AttrInfo AuthDomainGenericAuthCallbackPropertyInfo where type AttrAllowedOps AuthDomainGenericAuthCallbackPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint AuthDomainGenericAuthCallbackPropertyInfo = (~) (Ptr ()) type AttrBaseTypeConstraint AuthDomainGenericAuthCallbackPropertyInfo = AuthDomainK type AttrGetType AuthDomainGenericAuthCallbackPropertyInfo = (Ptr ()) type AttrLabel AuthDomainGenericAuthCallbackPropertyInfo = "AuthDomain::generic-auth-callback" attrGet _ = getAuthDomainGenericAuthCallback attrSet _ = setAuthDomainGenericAuthCallback attrConstruct _ = constructAuthDomainGenericAuthCallback -- VVV Prop "generic-auth-data" -- Type: TBasicType TVoid -- Flags: [PropertyReadable,PropertyWritable] getAuthDomainGenericAuthData :: (MonadIO m, AuthDomainK o) => o -> m (Ptr ()) getAuthDomainGenericAuthData obj = liftIO $ getObjectPropertyPtr obj "generic-auth-data" setAuthDomainGenericAuthData :: (MonadIO m, AuthDomainK o) => o -> (Ptr ()) -> m () setAuthDomainGenericAuthData obj val = liftIO $ setObjectPropertyPtr obj "generic-auth-data" val constructAuthDomainGenericAuthData :: (Ptr ()) -> IO ([Char], GValue) constructAuthDomainGenericAuthData val = constructObjectPropertyPtr "generic-auth-data" val data AuthDomainGenericAuthDataPropertyInfo instance AttrInfo AuthDomainGenericAuthDataPropertyInfo where type AttrAllowedOps AuthDomainGenericAuthDataPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint AuthDomainGenericAuthDataPropertyInfo = (~) (Ptr ()) type AttrBaseTypeConstraint AuthDomainGenericAuthDataPropertyInfo = AuthDomainK type AttrGetType AuthDomainGenericAuthDataPropertyInfo = (Ptr ()) type AttrLabel AuthDomainGenericAuthDataPropertyInfo = "AuthDomain::generic-auth-data" attrGet _ = getAuthDomainGenericAuthData attrSet _ = setAuthDomainGenericAuthData attrConstruct _ = constructAuthDomainGenericAuthData -- VVV Prop "proxy" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] getAuthDomainProxy :: (MonadIO m, AuthDomainK o) => o -> m Bool getAuthDomainProxy obj = liftIO $ getObjectPropertyBool obj "proxy" constructAuthDomainProxy :: Bool -> IO ([Char], GValue) constructAuthDomainProxy val = constructObjectPropertyBool "proxy" val data AuthDomainProxyPropertyInfo instance AttrInfo AuthDomainProxyPropertyInfo where type AttrAllowedOps AuthDomainProxyPropertyInfo = '[ 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint AuthDomainProxyPropertyInfo = (~) Bool type AttrBaseTypeConstraint AuthDomainProxyPropertyInfo = AuthDomainK type AttrGetType AuthDomainProxyPropertyInfo = Bool type AttrLabel AuthDomainProxyPropertyInfo = "AuthDomain::proxy" attrGet _ = getAuthDomainProxy attrSet _ = undefined attrConstruct _ = constructAuthDomainProxy -- VVV Prop "realm" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] getAuthDomainRealm :: (MonadIO m, AuthDomainK o) => o -> m T.Text getAuthDomainRealm obj = liftIO $ getObjectPropertyString obj "realm" constructAuthDomainRealm :: T.Text -> IO ([Char], GValue) constructAuthDomainRealm val = constructObjectPropertyString "realm" val data AuthDomainRealmPropertyInfo instance AttrInfo AuthDomainRealmPropertyInfo where type AttrAllowedOps AuthDomainRealmPropertyInfo = '[ 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint AuthDomainRealmPropertyInfo = (~) T.Text type AttrBaseTypeConstraint AuthDomainRealmPropertyInfo = AuthDomainK type AttrGetType AuthDomainRealmPropertyInfo = T.Text type AttrLabel AuthDomainRealmPropertyInfo = "AuthDomain::realm" attrGet _ = getAuthDomainRealm attrSet _ = undefined attrConstruct _ = constructAuthDomainRealm -- VVV Prop "remove-path" -- Type: TBasicType TUTF8 -- Flags: [PropertyWritable] setAuthDomainRemovePath :: (MonadIO m, AuthDomainK o) => o -> T.Text -> m () setAuthDomainRemovePath obj val = liftIO $ setObjectPropertyString obj "remove-path" val constructAuthDomainRemovePath :: T.Text -> IO ([Char], GValue) constructAuthDomainRemovePath val = constructObjectPropertyString "remove-path" val data AuthDomainRemovePathPropertyInfo instance AttrInfo AuthDomainRemovePathPropertyInfo where type AttrAllowedOps AuthDomainRemovePathPropertyInfo = '[ 'AttrSet, 'AttrConstruct] type AttrSetTypeConstraint AuthDomainRemovePathPropertyInfo = (~) T.Text type AttrBaseTypeConstraint AuthDomainRemovePathPropertyInfo = AuthDomainK type AttrGetType AuthDomainRemovePathPropertyInfo = () type AttrLabel AuthDomainRemovePathPropertyInfo = "AuthDomain::remove-path" attrGet _ = undefined attrSet _ = setAuthDomainRemovePath attrConstruct _ = constructAuthDomainRemovePath type instance AttributeList AuthDomain = AuthDomainAttributeList type AuthDomainAttributeList = ('[ '("add-path", AuthDomainAddPathPropertyInfo), '("filter", AuthDomainFilterPropertyInfo), '("filter-data", AuthDomainFilterDataPropertyInfo), '("generic-auth-callback", AuthDomainGenericAuthCallbackPropertyInfo), '("generic-auth-data", AuthDomainGenericAuthDataPropertyInfo), '("proxy", AuthDomainProxyPropertyInfo), '("realm", AuthDomainRealmPropertyInfo), '("remove-path", AuthDomainRemovePathPropertyInfo)] :: [(Symbol, *)]) type instance SignalList AuthDomain = AuthDomainSignalList type AuthDomainSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method AuthDomain::accepts -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "msg", argType = TInterface "Soup" "Message", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "msg", argType = TInterface "Soup" "Message", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_accepts" soup_auth_domain_accepts :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" Ptr Message -> -- msg : TInterface "Soup" "Message" IO CString authDomainAccepts :: (MonadIO m, AuthDomainK a, MessageK b) => a -> -- _obj b -> -- msg m T.Text authDomainAccepts _obj msg = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let msg' = unsafeManagedPtrCastPtr msg result <- soup_auth_domain_accepts _obj' msg' checkUnexpectedReturnNULL "soup_auth_domain_accepts" result result' <- cstringToText result freeMem result touchManagedPtr _obj touchManagedPtr msg return result' -- method AuthDomain::add_path -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_add_path" soup_auth_domain_add_path :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" CString -> -- path : TBasicType TUTF8 IO () authDomainAddPath :: (MonadIO m, AuthDomainK a) => a -> -- _obj T.Text -> -- path m () authDomainAddPath _obj path = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj path' <- textToCString path soup_auth_domain_add_path _obj' path' touchManagedPtr _obj freeMem path' return () -- method AuthDomain::basic_set_auth_callback -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Soup" "AuthDomainBasicAuthCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dnotify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Soup" "AuthDomainBasicAuthCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_basic_set_auth_callback" soup_auth_domain_basic_set_auth_callback :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" FunPtr AuthDomainBasicAuthCallbackC -> -- callback : TInterface "Soup" "AuthDomainBasicAuthCallback" Ptr () -> -- user_data : TBasicType TVoid FunPtr GLib.DestroyNotifyC -> -- dnotify : TInterface "GLib" "DestroyNotify" IO () authDomainBasicSetAuthCallback :: (MonadIO m, AuthDomainK a) => a -> -- _obj AuthDomainBasicAuthCallback -> -- callback m () authDomainBasicSetAuthCallback _obj callback = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj callback' <- mkAuthDomainBasicAuthCallback (authDomainBasicAuthCallbackWrapper Nothing callback) let user_data = castFunPtrToPtr callback' let dnotify = safeFreeFunPtrPtr soup_auth_domain_basic_set_auth_callback _obj' callback' user_data dnotify touchManagedPtr _obj return () -- method AuthDomain::challenge -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "msg", argType = TInterface "Soup" "Message", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "msg", argType = TInterface "Soup" "Message", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_challenge" soup_auth_domain_challenge :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" Ptr Message -> -- msg : TInterface "Soup" "Message" IO () authDomainChallenge :: (MonadIO m, AuthDomainK a, MessageK b) => a -> -- _obj b -> -- msg m () authDomainChallenge _obj msg = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let msg' = unsafeManagedPtrCastPtr msg soup_auth_domain_challenge _obj' msg' touchManagedPtr _obj touchManagedPtr msg return () -- method AuthDomain::check_password -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "msg", argType = TInterface "Soup" "Message", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "username", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "password", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "msg", argType = TInterface "Soup" "Message", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "username", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "password", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_check_password" soup_auth_domain_check_password :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" Ptr Message -> -- msg : TInterface "Soup" "Message" CString -> -- username : TBasicType TUTF8 CString -> -- password : TBasicType TUTF8 IO CInt authDomainCheckPassword :: (MonadIO m, AuthDomainK a, MessageK b) => a -> -- _obj b -> -- msg T.Text -> -- username T.Text -> -- password m Bool authDomainCheckPassword _obj msg username password = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let msg' = unsafeManagedPtrCastPtr msg username' <- textToCString username password' <- textToCString password result <- soup_auth_domain_check_password _obj' msg' username' password' let result' = (/= 0) result touchManagedPtr _obj touchManagedPtr msg freeMem username' freeMem password' return result' -- method AuthDomain::covers -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "msg", argType = TInterface "Soup" "Message", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "msg", argType = TInterface "Soup" "Message", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_covers" soup_auth_domain_covers :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" Ptr Message -> -- msg : TInterface "Soup" "Message" IO CInt authDomainCovers :: (MonadIO m, AuthDomainK a, MessageK b) => a -> -- _obj b -> -- msg m Bool authDomainCovers _obj msg = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let msg' = unsafeManagedPtrCastPtr msg result <- soup_auth_domain_covers _obj' msg' let result' = (/= 0) result touchManagedPtr _obj touchManagedPtr msg return result' -- method AuthDomain::digest_set_auth_callback -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Soup" "AuthDomainDigestAuthCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dnotify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Soup" "AuthDomainDigestAuthCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_digest_set_auth_callback" soup_auth_domain_digest_set_auth_callback :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" FunPtr AuthDomainDigestAuthCallbackC -> -- callback : TInterface "Soup" "AuthDomainDigestAuthCallback" Ptr () -> -- user_data : TBasicType TVoid FunPtr GLib.DestroyNotifyC -> -- dnotify : TInterface "GLib" "DestroyNotify" IO () authDomainDigestSetAuthCallback :: (MonadIO m, AuthDomainK a) => a -> -- _obj AuthDomainDigestAuthCallback -> -- callback m () authDomainDigestSetAuthCallback _obj callback = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj callback' <- mkAuthDomainDigestAuthCallback (authDomainDigestAuthCallbackWrapper Nothing callback) let user_data = castFunPtrToPtr callback' let dnotify = safeFreeFunPtrPtr soup_auth_domain_digest_set_auth_callback _obj' callback' user_data dnotify touchManagedPtr _obj return () -- method AuthDomain::get_realm -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_get_realm" soup_auth_domain_get_realm :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" IO CString authDomainGetRealm :: (MonadIO m, AuthDomainK a) => a -> -- _obj m T.Text authDomainGetRealm _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- soup_auth_domain_get_realm _obj' checkUnexpectedReturnNULL "soup_auth_domain_get_realm" result result' <- cstringToText result touchManagedPtr _obj return result' -- method AuthDomain::remove_path -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_remove_path" soup_auth_domain_remove_path :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" CString -> -- path : TBasicType TUTF8 IO () authDomainRemovePath :: (MonadIO m, AuthDomainK a) => a -> -- _obj T.Text -> -- path m () authDomainRemovePath _obj path = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj path' <- textToCString path soup_auth_domain_remove_path _obj' path' touchManagedPtr _obj freeMem path' return () -- method AuthDomain::set_filter -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Soup" "AuthDomainFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "filter_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dnotify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter", argType = TInterface "Soup" "AuthDomainFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_set_filter" soup_auth_domain_set_filter :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" FunPtr AuthDomainFilterC -> -- filter : TInterface "Soup" "AuthDomainFilter" Ptr () -> -- filter_data : TBasicType TVoid FunPtr GLib.DestroyNotifyC -> -- dnotify : TInterface "GLib" "DestroyNotify" IO () authDomainSetFilter :: (MonadIO m, AuthDomainK a) => a -> -- _obj AuthDomainFilter -> -- filter m () authDomainSetFilter _obj filter = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj filter' <- mkAuthDomainFilter (authDomainFilterWrapper Nothing filter) let filter_data = castFunPtrToPtr filter' let dnotify = safeFreeFunPtrPtr soup_auth_domain_set_filter _obj' filter' filter_data dnotify touchManagedPtr _obj return () -- method AuthDomain::set_generic_auth_callback -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "auth_callback", argType = TInterface "Soup" "AuthDomainGenericAuthCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "auth_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dnotify", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "auth_callback", argType = TInterface "Soup" "AuthDomainGenericAuthCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_set_generic_auth_callback" soup_auth_domain_set_generic_auth_callback :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" FunPtr AuthDomainGenericAuthCallbackC -> -- auth_callback : TInterface "Soup" "AuthDomainGenericAuthCallback" Ptr () -> -- auth_data : TBasicType TVoid FunPtr GLib.DestroyNotifyC -> -- dnotify : TInterface "GLib" "DestroyNotify" IO () authDomainSetGenericAuthCallback :: (MonadIO m, AuthDomainK a) => a -> -- _obj AuthDomainGenericAuthCallback -> -- auth_callback m () authDomainSetGenericAuthCallback _obj auth_callback = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj auth_callback' <- mkAuthDomainGenericAuthCallback (authDomainGenericAuthCallbackWrapper Nothing auth_callback) let auth_data = castFunPtrToPtr auth_callback' let dnotify = safeFreeFunPtrPtr soup_auth_domain_set_generic_auth_callback _obj' auth_callback' auth_data dnotify touchManagedPtr _obj return () -- method AuthDomain::try_generic_auth_callback -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "msg", argType = TInterface "Soup" "Message", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "username", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Soup" "AuthDomain", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "msg", argType = TInterface "Soup" "Message", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "username", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "soup_auth_domain_try_generic_auth_callback" soup_auth_domain_try_generic_auth_callback :: Ptr AuthDomain -> -- _obj : TInterface "Soup" "AuthDomain" Ptr Message -> -- msg : TInterface "Soup" "Message" CString -> -- username : TBasicType TUTF8 IO CInt authDomainTryGenericAuthCallback :: (MonadIO m, AuthDomainK a, MessageK b) => a -> -- _obj b -> -- msg T.Text -> -- username m Bool authDomainTryGenericAuthCallback _obj msg username = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let msg' = unsafeManagedPtrCastPtr msg username' <- textToCString username result <- soup_auth_domain_try_generic_auth_callback _obj' msg' username' let result' = (/= 0) result touchManagedPtr _obj touchManagedPtr msg freeMem username' return result'