{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Soup.Objects.AuthDomain
(
AuthDomain(..) ,
IsAuthDomain ,
toAuthDomain ,
#if defined(ENABLE_OVERLOADING)
ResolveAuthDomainMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
AuthDomainAcceptsMethodInfo ,
#endif
authDomainAccepts ,
#if defined(ENABLE_OVERLOADING)
AuthDomainAddPathMethodInfo ,
#endif
authDomainAddPath ,
#if defined(ENABLE_OVERLOADING)
AuthDomainChallengeMethodInfo ,
#endif
authDomainChallenge ,
#if defined(ENABLE_OVERLOADING)
AuthDomainCheckPasswordMethodInfo ,
#endif
authDomainCheckPassword ,
#if defined(ENABLE_OVERLOADING)
AuthDomainCoversMethodInfo ,
#endif
authDomainCovers ,
#if defined(ENABLE_OVERLOADING)
AuthDomainGetRealmMethodInfo ,
#endif
authDomainGetRealm ,
#if defined(ENABLE_OVERLOADING)
AuthDomainRemovePathMethodInfo ,
#endif
authDomainRemovePath ,
#if defined(ENABLE_OVERLOADING)
AuthDomainSetFilterMethodInfo ,
#endif
authDomainSetFilter ,
#if defined(ENABLE_OVERLOADING)
AuthDomainSetGenericAuthCallbackMethodInfo,
#endif
authDomainSetGenericAuthCallback ,
#if defined(ENABLE_OVERLOADING)
AuthDomainFilterPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
authDomainFilter ,
#endif
clearAuthDomainFilter ,
constructAuthDomainFilter ,
getAuthDomainFilter ,
setAuthDomainFilter ,
#if defined(ENABLE_OVERLOADING)
AuthDomainFilterDataPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
authDomainFilterData ,
#endif
constructAuthDomainFilterData ,
getAuthDomainFilterData ,
setAuthDomainFilterData ,
#if defined(ENABLE_OVERLOADING)
AuthDomainGenericAuthCallbackPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING)
authDomainGenericAuthCallback ,
#endif
clearAuthDomainGenericAuthCallback ,
constructAuthDomainGenericAuthCallback ,
getAuthDomainGenericAuthCallback ,
setAuthDomainGenericAuthCallback ,
#if defined(ENABLE_OVERLOADING)
AuthDomainGenericAuthDataPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
authDomainGenericAuthData ,
#endif
constructAuthDomainGenericAuthData ,
getAuthDomainGenericAuthData ,
setAuthDomainGenericAuthData ,
#if defined(ENABLE_OVERLOADING)
AuthDomainProxyPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
authDomainProxy ,
#endif
constructAuthDomainProxy ,
getAuthDomainProxy ,
#if defined(ENABLE_OVERLOADING)
AuthDomainRealmPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
authDomainRealm ,
#endif
constructAuthDomainRealm ,
getAuthDomainRealm ,
) 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.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
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.ServerMessage as Soup.ServerMessage
newtype AuthDomain = AuthDomain (SP.ManagedPtr AuthDomain)
deriving (AuthDomain -> AuthDomain -> Bool
(AuthDomain -> AuthDomain -> Bool)
-> (AuthDomain -> AuthDomain -> Bool) -> Eq AuthDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AuthDomain -> AuthDomain -> Bool
== :: AuthDomain -> AuthDomain -> Bool
$c/= :: AuthDomain -> AuthDomain -> Bool
/= :: AuthDomain -> AuthDomain -> Bool
Eq)
instance SP.ManagedPtrNewtype AuthDomain where
toManagedPtr :: AuthDomain -> ManagedPtr AuthDomain
toManagedPtr (AuthDomain ManagedPtr AuthDomain
p) = ManagedPtr AuthDomain
p
foreign import ccall "soup_auth_domain_get_type"
c_soup_auth_domain_get_type :: IO B.Types.GType
instance B.Types.TypedObject AuthDomain where
glibType :: IO GType
glibType = IO GType
c_soup_auth_domain_get_type
instance B.Types.GObject AuthDomain
class (SP.GObject o, O.IsDescendantOf AuthDomain o) => IsAuthDomain o
instance (SP.GObject o, O.IsDescendantOf AuthDomain o) => IsAuthDomain o
instance O.HasParentTypes AuthDomain
type instance O.ParentTypes AuthDomain = '[GObject.Object.Object]
toAuthDomain :: (MIO.MonadIO m, IsAuthDomain o) => o -> m AuthDomain
toAuthDomain :: forall (m :: * -> *) o.
(MonadIO m, IsAuthDomain o) =>
o -> m AuthDomain
toAuthDomain = IO AuthDomain -> m AuthDomain
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO AuthDomain -> m AuthDomain)
-> (o -> IO AuthDomain) -> o -> m AuthDomain
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr AuthDomain -> AuthDomain) -> o -> IO AuthDomain
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr AuthDomain -> AuthDomain
AuthDomain
instance B.GValue.IsGValue (Maybe AuthDomain) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_soup_auth_domain_get_type
gvalueSet_ :: Ptr GValue -> Maybe AuthDomain -> IO ()
gvalueSet_ Ptr GValue
gv Maybe AuthDomain
P.Nothing = Ptr GValue -> Ptr AuthDomain -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr AuthDomain
forall a. Ptr a
FP.nullPtr :: FP.Ptr AuthDomain)
gvalueSet_ Ptr GValue
gv (P.Just AuthDomain
obj) = AuthDomain -> (Ptr AuthDomain -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr AuthDomain
obj (Ptr GValue -> Ptr AuthDomain -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe AuthDomain)
gvalueGet_ Ptr GValue
gv = do
Ptr AuthDomain
ptr <- Ptr GValue -> IO (Ptr AuthDomain)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr AuthDomain)
if Ptr AuthDomain
ptr Ptr AuthDomain -> Ptr AuthDomain -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr AuthDomain
forall a. Ptr a
FP.nullPtr
then AuthDomain -> Maybe AuthDomain
forall a. a -> Maybe a
P.Just (AuthDomain -> Maybe AuthDomain)
-> IO AuthDomain -> IO (Maybe AuthDomain)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr AuthDomain -> AuthDomain)
-> Ptr AuthDomain -> IO AuthDomain
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr AuthDomain -> AuthDomain
AuthDomain Ptr AuthDomain
ptr
else Maybe AuthDomain -> IO (Maybe AuthDomain)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe AuthDomain
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveAuthDomainMethod (t :: Symbol) (o :: DK.Type) :: DK.Type 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 "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.OverloadedMethod info AuthDomain p) => OL.IsLabel t (AuthDomain -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveAuthDomainMethod t AuthDomain, O.OverloadedMethod info AuthDomain p, R.HasField t AuthDomain p) => R.HasField t AuthDomain p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveAuthDomainMethod t AuthDomain, O.OverloadedMethodInfo info AuthDomain) => OL.IsLabel t (O.MethodProxy info AuthDomain) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getAuthDomainFilter :: (MonadIO m, IsAuthDomain o) => o -> m (Maybe Soup.Callbacks.AuthDomainFilter_WithClosures)
getAuthDomainFilter :: forall (m :: * -> *) o.
(MonadIO m, IsAuthDomain o) =>
o -> m (Maybe AuthDomainFilter_WithClosures)
getAuthDomainFilter o
obj = IO (Maybe AuthDomainFilter_WithClosures)
-> m (Maybe AuthDomainFilter_WithClosures)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe AuthDomainFilter_WithClosures)
-> m (Maybe AuthDomainFilter_WithClosures))
-> IO (Maybe AuthDomainFilter_WithClosures)
-> m (Maybe AuthDomainFilter_WithClosures)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (FunPtr C_AuthDomainFilter -> AuthDomainFilter_WithClosures)
-> IO (Maybe AuthDomainFilter_WithClosures)
forall a b c.
GObject a =>
a -> String -> (FunPtr b -> c) -> IO (Maybe c)
B.Properties.getObjectPropertyCallback o
obj String
"filter" FunPtr C_AuthDomainFilter -> AuthDomainFilter_WithClosures
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAuthDomain a, IsServerMessage b) =>
FunPtr C_AuthDomainFilter -> a -> b -> Ptr () -> m Bool
Soup.Callbacks.dynamic_AuthDomainFilter
setAuthDomainFilter :: (MonadIO m, IsAuthDomain o) => o -> FunPtr Soup.Callbacks.C_AuthDomainFilter -> m ()
setAuthDomainFilter :: forall (m :: * -> *) o.
(MonadIO m, IsAuthDomain o) =>
o -> FunPtr C_AuthDomainFilter -> m ()
setAuthDomainFilter o
obj FunPtr C_AuthDomainFilter
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> FunPtr C_AuthDomainFilter -> IO ()
forall a b. GObject a => a -> String -> FunPtr b -> IO ()
B.Properties.setObjectPropertyCallback o
obj String
"filter" FunPtr C_AuthDomainFilter
val
constructAuthDomainFilter :: (IsAuthDomain o, MIO.MonadIO m) => FunPtr Soup.Callbacks.C_AuthDomainFilter -> m (GValueConstruct o)
constructAuthDomainFilter :: forall o (m :: * -> *).
(IsAuthDomain o, MonadIO m) =>
FunPtr C_AuthDomainFilter -> m (GValueConstruct o)
constructAuthDomainFilter FunPtr C_AuthDomainFilter
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> FunPtr C_AuthDomainFilter -> IO (GValueConstruct o)
forall b o. String -> FunPtr b -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyCallback String
"filter" FunPtr C_AuthDomainFilter
val
clearAuthDomainFilter :: (MonadIO m, IsAuthDomain o) => o -> m ()
clearAuthDomainFilter :: forall (m :: * -> *) o. (MonadIO m, IsAuthDomain o) => o -> m ()
clearAuthDomainFilter o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> FunPtr Any -> IO ()
forall a b. GObject a => a -> String -> FunPtr b -> IO ()
B.Properties.setObjectPropertyCallback o
obj String
"filter" FunPtr Any
forall a. FunPtr a
FP.nullFunPtr
#if defined(ENABLE_OVERLOADING)
data AuthDomainFilterPropertyInfo
instance AttrInfo AuthDomainFilterPropertyInfo where
type AttrAllowedOps AuthDomainFilterPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint AuthDomainFilterPropertyInfo = IsAuthDomain
type AttrSetTypeConstraint AuthDomainFilterPropertyInfo = (~) (FunPtr Soup.Callbacks.C_AuthDomainFilter)
type AttrTransferTypeConstraint AuthDomainFilterPropertyInfo = (~) Soup.Callbacks.AuthDomainFilter_WithClosures
type AttrTransferType AuthDomainFilterPropertyInfo = FunPtr Soup.Callbacks.C_AuthDomainFilter
type AttrGetType AuthDomainFilterPropertyInfo = (Maybe Soup.Callbacks.AuthDomainFilter_WithClosures)
type AttrLabel AuthDomainFilterPropertyInfo = "filter"
type AttrOrigin AuthDomainFilterPropertyInfo = AuthDomain
attrGet = getAuthDomainFilter
attrSet = setAuthDomainFilter
attrTransfer _ v = do
Soup.Callbacks.mk_AuthDomainFilter (Soup.Callbacks.wrap_AuthDomainFilter Nothing v)
attrConstruct = constructAuthDomainFilter
attrClear = clearAuthDomainFilter
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.filter"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#g:attr:filter"
})
#endif
getAuthDomainFilterData :: (MonadIO m, IsAuthDomain o) => o -> m (Ptr ())
getAuthDomainFilterData :: forall (m :: * -> *) o.
(MonadIO m, IsAuthDomain o) =>
o -> m (Ptr ())
getAuthDomainFilterData o
obj = IO (Ptr ()) -> m (Ptr ())
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Ptr ())
forall a b. GObject a => a -> String -> IO (Ptr b)
B.Properties.getObjectPropertyPtr o
obj String
"filter-data"
setAuthDomainFilterData :: (MonadIO m, IsAuthDomain o) => o -> Ptr () -> m ()
setAuthDomainFilterData :: forall (m :: * -> *) o.
(MonadIO m, IsAuthDomain o) =>
o -> Ptr () -> m ()
setAuthDomainFilterData o
obj Ptr ()
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Ptr () -> IO ()
forall a b. GObject a => a -> String -> Ptr b -> IO ()
B.Properties.setObjectPropertyPtr o
obj String
"filter-data" Ptr ()
val
constructAuthDomainFilterData :: (IsAuthDomain o, MIO.MonadIO m) => Ptr () -> m (GValueConstruct o)
constructAuthDomainFilterData :: forall o (m :: * -> *).
(IsAuthDomain o, MonadIO m) =>
Ptr () -> m (GValueConstruct o)
constructAuthDomainFilterData Ptr ()
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Ptr () -> IO (GValueConstruct o)
forall b o. String -> Ptr b -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyPtr String
"filter-data" Ptr ()
val
#if defined(ENABLE_OVERLOADING)
data AuthDomainFilterDataPropertyInfo
instance AttrInfo AuthDomainFilterDataPropertyInfo where
type AttrAllowedOps AuthDomainFilterDataPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AuthDomainFilterDataPropertyInfo = IsAuthDomain
type AttrSetTypeConstraint AuthDomainFilterDataPropertyInfo = (~) (Ptr ())
type AttrTransferTypeConstraint AuthDomainFilterDataPropertyInfo = (~) (Ptr ())
type AttrTransferType AuthDomainFilterDataPropertyInfo = Ptr ()
type AttrGetType AuthDomainFilterDataPropertyInfo = (Ptr ())
type AttrLabel AuthDomainFilterDataPropertyInfo = "filter-data"
type AttrOrigin AuthDomainFilterDataPropertyInfo = AuthDomain
attrGet = getAuthDomainFilterData
attrSet = setAuthDomainFilterData
attrTransfer _ v = do
return v
attrConstruct = constructAuthDomainFilterData
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.filterData"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#g:attr:filterData"
})
#endif
getAuthDomainGenericAuthCallback :: (MonadIO m, IsAuthDomain o) => o -> m (Maybe Soup.Callbacks.AuthDomainGenericAuthCallback_WithClosures)
getAuthDomainGenericAuthCallback :: forall (m :: * -> *) o.
(MonadIO m, IsAuthDomain o) =>
o -> m (Maybe AuthDomainGenericAuthCallback_WithClosures)
getAuthDomainGenericAuthCallback o
obj = IO (Maybe AuthDomainGenericAuthCallback_WithClosures)
-> m (Maybe AuthDomainGenericAuthCallback_WithClosures)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe AuthDomainGenericAuthCallback_WithClosures)
-> m (Maybe AuthDomainGenericAuthCallback_WithClosures))
-> IO (Maybe AuthDomainGenericAuthCallback_WithClosures)
-> m (Maybe AuthDomainGenericAuthCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (FunPtr C_AuthDomainGenericAuthCallback
-> AuthDomainGenericAuthCallback_WithClosures)
-> IO (Maybe AuthDomainGenericAuthCallback_WithClosures)
forall a b c.
GObject a =>
a -> String -> (FunPtr b -> c) -> IO (Maybe c)
B.Properties.getObjectPropertyCallback o
obj String
"generic-auth-callback" FunPtr C_AuthDomainGenericAuthCallback
-> AuthDomainGenericAuthCallback_WithClosures
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAuthDomain a, IsServerMessage b) =>
FunPtr C_AuthDomainGenericAuthCallback
-> a -> b -> Text -> Ptr () -> m Bool
Soup.Callbacks.dynamic_AuthDomainGenericAuthCallback
setAuthDomainGenericAuthCallback :: (MonadIO m, IsAuthDomain o) => o -> FunPtr Soup.Callbacks.C_AuthDomainGenericAuthCallback -> m ()
setAuthDomainGenericAuthCallback :: forall (m :: * -> *) o.
(MonadIO m, IsAuthDomain o) =>
o -> FunPtr C_AuthDomainGenericAuthCallback -> m ()
setAuthDomainGenericAuthCallback o
obj FunPtr C_AuthDomainGenericAuthCallback
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> FunPtr C_AuthDomainGenericAuthCallback -> IO ()
forall a b. GObject a => a -> String -> FunPtr b -> IO ()
B.Properties.setObjectPropertyCallback o
obj String
"generic-auth-callback" FunPtr C_AuthDomainGenericAuthCallback
val
constructAuthDomainGenericAuthCallback :: (IsAuthDomain o, MIO.MonadIO m) => FunPtr Soup.Callbacks.C_AuthDomainGenericAuthCallback -> m (GValueConstruct o)
constructAuthDomainGenericAuthCallback :: forall o (m :: * -> *).
(IsAuthDomain o, MonadIO m) =>
FunPtr C_AuthDomainGenericAuthCallback -> m (GValueConstruct o)
constructAuthDomainGenericAuthCallback FunPtr C_AuthDomainGenericAuthCallback
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String
-> FunPtr C_AuthDomainGenericAuthCallback -> IO (GValueConstruct o)
forall b o. String -> FunPtr b -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyCallback String
"generic-auth-callback" FunPtr C_AuthDomainGenericAuthCallback
val
clearAuthDomainGenericAuthCallback :: (MonadIO m, IsAuthDomain o) => o -> m ()
clearAuthDomainGenericAuthCallback :: forall (m :: * -> *) o. (MonadIO m, IsAuthDomain o) => o -> m ()
clearAuthDomainGenericAuthCallback o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> FunPtr Any -> IO ()
forall a b. GObject a => a -> String -> FunPtr b -> IO ()
B.Properties.setObjectPropertyCallback o
obj String
"generic-auth-callback" FunPtr Any
forall a. FunPtr a
FP.nullFunPtr
#if defined(ENABLE_OVERLOADING)
data AuthDomainGenericAuthCallbackPropertyInfo
instance AttrInfo AuthDomainGenericAuthCallbackPropertyInfo where
type AttrAllowedOps AuthDomainGenericAuthCallbackPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint AuthDomainGenericAuthCallbackPropertyInfo = IsAuthDomain
type AttrSetTypeConstraint AuthDomainGenericAuthCallbackPropertyInfo = (~) (FunPtr Soup.Callbacks.C_AuthDomainGenericAuthCallback)
type AttrTransferTypeConstraint AuthDomainGenericAuthCallbackPropertyInfo = (~) Soup.Callbacks.AuthDomainGenericAuthCallback_WithClosures
type AttrTransferType AuthDomainGenericAuthCallbackPropertyInfo = FunPtr Soup.Callbacks.C_AuthDomainGenericAuthCallback
type AttrGetType AuthDomainGenericAuthCallbackPropertyInfo = (Maybe Soup.Callbacks.AuthDomainGenericAuthCallback_WithClosures)
type AttrLabel AuthDomainGenericAuthCallbackPropertyInfo = "generic-auth-callback"
type AttrOrigin AuthDomainGenericAuthCallbackPropertyInfo = AuthDomain
attrGet = getAuthDomainGenericAuthCallback
attrSet = setAuthDomainGenericAuthCallback
attrTransfer _ v = do
Soup.Callbacks.mk_AuthDomainGenericAuthCallback (Soup.Callbacks.wrap_AuthDomainGenericAuthCallback Nothing v)
attrConstruct = constructAuthDomainGenericAuthCallback
attrClear = clearAuthDomainGenericAuthCallback
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.genericAuthCallback"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#g:attr:genericAuthCallback"
})
#endif
getAuthDomainGenericAuthData :: (MonadIO m, IsAuthDomain o) => o -> m (Ptr ())
getAuthDomainGenericAuthData :: forall (m :: * -> *) o.
(MonadIO m, IsAuthDomain o) =>
o -> m (Ptr ())
getAuthDomainGenericAuthData o
obj = IO (Ptr ()) -> m (Ptr ())
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Ptr ())
forall a b. GObject a => a -> String -> IO (Ptr b)
B.Properties.getObjectPropertyPtr o
obj String
"generic-auth-data"
setAuthDomainGenericAuthData :: (MonadIO m, IsAuthDomain o) => o -> Ptr () -> m ()
setAuthDomainGenericAuthData :: forall (m :: * -> *) o.
(MonadIO m, IsAuthDomain o) =>
o -> Ptr () -> m ()
setAuthDomainGenericAuthData o
obj Ptr ()
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Ptr () -> IO ()
forall a b. GObject a => a -> String -> Ptr b -> IO ()
B.Properties.setObjectPropertyPtr o
obj String
"generic-auth-data" Ptr ()
val
constructAuthDomainGenericAuthData :: (IsAuthDomain o, MIO.MonadIO m) => Ptr () -> m (GValueConstruct o)
constructAuthDomainGenericAuthData :: forall o (m :: * -> *).
(IsAuthDomain o, MonadIO m) =>
Ptr () -> m (GValueConstruct o)
constructAuthDomainGenericAuthData Ptr ()
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Ptr () -> IO (GValueConstruct o)
forall b o. String -> Ptr b -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyPtr String
"generic-auth-data" Ptr ()
val
#if defined(ENABLE_OVERLOADING)
data AuthDomainGenericAuthDataPropertyInfo
instance AttrInfo AuthDomainGenericAuthDataPropertyInfo where
type AttrAllowedOps AuthDomainGenericAuthDataPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AuthDomainGenericAuthDataPropertyInfo = IsAuthDomain
type AttrSetTypeConstraint AuthDomainGenericAuthDataPropertyInfo = (~) (Ptr ())
type AttrTransferTypeConstraint AuthDomainGenericAuthDataPropertyInfo = (~) (Ptr ())
type AttrTransferType AuthDomainGenericAuthDataPropertyInfo = Ptr ()
type AttrGetType AuthDomainGenericAuthDataPropertyInfo = (Ptr ())
type AttrLabel AuthDomainGenericAuthDataPropertyInfo = "generic-auth-data"
type AttrOrigin AuthDomainGenericAuthDataPropertyInfo = AuthDomain
attrGet = getAuthDomainGenericAuthData
attrSet = setAuthDomainGenericAuthData
attrTransfer _ v = do
return v
attrConstruct = constructAuthDomainGenericAuthData
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.genericAuthData"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#g:attr:genericAuthData"
})
#endif
getAuthDomainProxy :: (MonadIO m, IsAuthDomain o) => o -> m Bool
getAuthDomainProxy :: forall (m :: * -> *) o. (MonadIO m, IsAuthDomain o) => o -> m Bool
getAuthDomainProxy o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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
"proxy"
constructAuthDomainProxy :: (IsAuthDomain o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructAuthDomainProxy :: forall o (m :: * -> *).
(IsAuthDomain o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructAuthDomainProxy Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (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
"proxy" Bool
val
#if defined(ENABLE_OVERLOADING)
data AuthDomainProxyPropertyInfo
instance AttrInfo AuthDomainProxyPropertyInfo where
type AttrAllowedOps AuthDomainProxyPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AuthDomainProxyPropertyInfo = IsAuthDomain
type AttrSetTypeConstraint AuthDomainProxyPropertyInfo = (~) Bool
type AttrTransferTypeConstraint AuthDomainProxyPropertyInfo = (~) Bool
type AttrTransferType AuthDomainProxyPropertyInfo = Bool
type AttrGetType AuthDomainProxyPropertyInfo = Bool
type AttrLabel AuthDomainProxyPropertyInfo = "proxy"
type AttrOrigin AuthDomainProxyPropertyInfo = AuthDomain
attrGet = getAuthDomainProxy
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructAuthDomainProxy
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.proxy"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#g:attr:proxy"
})
#endif
getAuthDomainRealm :: (MonadIO m, IsAuthDomain o) => o -> m T.Text
getAuthDomainRealm :: forall (m :: * -> *) o. (MonadIO m, IsAuthDomain o) => o -> m Text
getAuthDomainRealm o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getAuthDomainRealm" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO 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
"realm"
constructAuthDomainRealm :: (IsAuthDomain o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructAuthDomainRealm :: forall o (m :: * -> *).
(IsAuthDomain o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructAuthDomainRealm Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (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
"realm" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data AuthDomainRealmPropertyInfo
instance AttrInfo AuthDomainRealmPropertyInfo where
type AttrAllowedOps AuthDomainRealmPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint AuthDomainRealmPropertyInfo = IsAuthDomain
type AttrSetTypeConstraint AuthDomainRealmPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint AuthDomainRealmPropertyInfo = (~) T.Text
type AttrTransferType AuthDomainRealmPropertyInfo = T.Text
type AttrGetType AuthDomainRealmPropertyInfo = T.Text
type AttrLabel AuthDomainRealmPropertyInfo = "realm"
type AttrOrigin AuthDomainRealmPropertyInfo = AuthDomain
attrGet = getAuthDomainRealm
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructAuthDomainRealm
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.realm"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#g:attr:realm"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AuthDomain
type instance O.AttributeList AuthDomain = AuthDomainAttributeList
type AuthDomainAttributeList = ('[ '("filter", AuthDomainFilterPropertyInfo), '("filterData", AuthDomainFilterDataPropertyInfo), '("genericAuthCallback", AuthDomainGenericAuthCallbackPropertyInfo), '("genericAuthData", AuthDomainGenericAuthDataPropertyInfo), '("proxy", AuthDomainProxyPropertyInfo), '("realm", AuthDomainRealmPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(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 defined(ENABLE_OVERLOADING)
type instance O.SignalList AuthDomain = AuthDomainSignalList
type AuthDomainSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "soup_auth_domain_accepts" soup_auth_domain_accepts ::
Ptr AuthDomain ->
Ptr Soup.ServerMessage.ServerMessage ->
IO CString
authDomainAccepts ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a, Soup.ServerMessage.IsServerMessage b) =>
a
-> b
-> m (Maybe T.Text)
authDomainAccepts :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAuthDomain a, IsServerMessage b) =>
a -> b -> m (Maybe Text)
authDomainAccepts a
domain b
msg = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
$ do
Ptr AuthDomain
domain' <- a -> IO (Ptr AuthDomain)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
domain
Ptr ServerMessage
msg' <- b -> IO (Ptr ServerMessage)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
msg
CString
result <- Ptr AuthDomain -> Ptr ServerMessage -> IO CString
soup_auth_domain_accepts Ptr AuthDomain
domain' Ptr ServerMessage
msg'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
domain
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
msg
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data AuthDomainAcceptsMethodInfo
instance (signature ~ (b -> m (Maybe T.Text)), MonadIO m, IsAuthDomain a, Soup.ServerMessage.IsServerMessage b) => O.OverloadedMethod AuthDomainAcceptsMethodInfo a signature where
overloadedMethod = authDomainAccepts
instance O.OverloadedMethodInfo AuthDomainAcceptsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.authDomainAccepts",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAuthDomain a) =>
a -> Text -> m ()
authDomainAddPath a
domain Text
path = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AuthDomain
domain' <- a -> IO (Ptr AuthDomain)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
domain
CString
path' <- Text -> IO CString
textToCString Text
path
Ptr AuthDomain -> CString -> IO ()
soup_auth_domain_add_path Ptr AuthDomain
domain' CString
path'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
domain
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AuthDomainAddPathMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsAuthDomain a) => O.OverloadedMethod AuthDomainAddPathMethodInfo a signature where
overloadedMethod = authDomainAddPath
instance O.OverloadedMethodInfo AuthDomainAddPathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.authDomainAddPath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#v:authDomainAddPath"
})
#endif
foreign import ccall "soup_auth_domain_challenge" soup_auth_domain_challenge ::
Ptr AuthDomain ->
Ptr Soup.ServerMessage.ServerMessage ->
IO ()
authDomainChallenge ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a, Soup.ServerMessage.IsServerMessage b) =>
a
-> b
-> m ()
authDomainChallenge :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAuthDomain a, IsServerMessage b) =>
a -> b -> m ()
authDomainChallenge a
domain b
msg = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AuthDomain
domain' <- a -> IO (Ptr AuthDomain)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
domain
Ptr ServerMessage
msg' <- b -> IO (Ptr ServerMessage)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
msg
Ptr AuthDomain -> Ptr ServerMessage -> IO ()
soup_auth_domain_challenge Ptr AuthDomain
domain' Ptr ServerMessage
msg'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
domain
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
msg
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AuthDomainChallengeMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsAuthDomain a, Soup.ServerMessage.IsServerMessage b) => O.OverloadedMethod AuthDomainChallengeMethodInfo a signature where
overloadedMethod = authDomainChallenge
instance O.OverloadedMethodInfo AuthDomainChallengeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.authDomainChallenge",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#v:authDomainChallenge"
})
#endif
foreign import ccall "soup_auth_domain_check_password" soup_auth_domain_check_password ::
Ptr AuthDomain ->
Ptr Soup.ServerMessage.ServerMessage ->
CString ->
CString ->
IO CInt
authDomainCheckPassword ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a, Soup.ServerMessage.IsServerMessage b) =>
a
-> b
-> T.Text
-> T.Text
-> m Bool
authDomainCheckPassword :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAuthDomain a, IsServerMessage b) =>
a -> b -> Text -> Text -> m Bool
authDomainCheckPassword a
domain b
msg Text
username Text
password = IO Bool -> m Bool
forall a. IO a -> m a
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 AuthDomain
domain' <- a -> IO (Ptr AuthDomain)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
domain
Ptr ServerMessage
msg' <- b -> IO (Ptr ServerMessage)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
msg
CString
username' <- Text -> IO CString
textToCString Text
username
CString
password' <- Text -> IO CString
textToCString Text
password
CInt
result <- Ptr AuthDomain
-> Ptr ServerMessage -> CString -> CString -> IO CInt
soup_auth_domain_check_password Ptr AuthDomain
domain' Ptr ServerMessage
msg' CString
username' CString
password'
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
domain
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
msg
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
username'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
password'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AuthDomainCheckPasswordMethodInfo
instance (signature ~ (b -> T.Text -> T.Text -> m Bool), MonadIO m, IsAuthDomain a, Soup.ServerMessage.IsServerMessage b) => O.OverloadedMethod AuthDomainCheckPasswordMethodInfo a signature where
overloadedMethod = authDomainCheckPassword
instance O.OverloadedMethodInfo AuthDomainCheckPasswordMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.authDomainCheckPassword",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#v:authDomainCheckPassword"
})
#endif
foreign import ccall "soup_auth_domain_covers" soup_auth_domain_covers ::
Ptr AuthDomain ->
Ptr Soup.ServerMessage.ServerMessage ->
IO CInt
authDomainCovers ::
(B.CallStack.HasCallStack, MonadIO m, IsAuthDomain a, Soup.ServerMessage.IsServerMessage b) =>
a
-> b
-> m Bool
authDomainCovers :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAuthDomain a, IsServerMessage b) =>
a -> b -> m Bool
authDomainCovers a
domain b
msg = IO Bool -> m Bool
forall a. IO a -> m a
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 AuthDomain
domain' <- a -> IO (Ptr AuthDomain)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
domain
Ptr ServerMessage
msg' <- b -> IO (Ptr ServerMessage)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
msg
CInt
result <- Ptr AuthDomain -> Ptr ServerMessage -> IO CInt
soup_auth_domain_covers Ptr AuthDomain
domain' Ptr ServerMessage
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
domain
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
msg
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AuthDomainCoversMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsAuthDomain a, Soup.ServerMessage.IsServerMessage b) => O.OverloadedMethod AuthDomainCoversMethodInfo a signature where
overloadedMethod = authDomainCovers
instance O.OverloadedMethodInfo AuthDomainCoversMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.authDomainCovers",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAuthDomain a) =>
a -> m Text
authDomainGetRealm a
domain = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr AuthDomain
domain' <- a -> IO (Ptr AuthDomain)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
domain
CString
result <- Ptr AuthDomain -> IO CString
soup_auth_domain_get_realm Ptr AuthDomain
domain'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"authDomainGetRealm" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
domain
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data AuthDomainGetRealmMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsAuthDomain a) => O.OverloadedMethod AuthDomainGetRealmMethodInfo a signature where
overloadedMethod = authDomainGetRealm
instance O.OverloadedMethodInfo AuthDomainGetRealmMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.authDomainGetRealm",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAuthDomain a) =>
a -> Text -> m ()
authDomainRemovePath a
domain Text
path = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AuthDomain
domain' <- a -> IO (Ptr AuthDomain)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
domain
CString
path' <- Text -> IO CString
textToCString Text
path
Ptr AuthDomain -> CString -> IO ()
soup_auth_domain_remove_path Ptr AuthDomain
domain' CString
path'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
domain
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AuthDomainRemovePathMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsAuthDomain a) => O.OverloadedMethod AuthDomainRemovePathMethodInfo a signature where
overloadedMethod = authDomainRemovePath
instance O.OverloadedMethodInfo AuthDomainRemovePathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.authDomainRemovePath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAuthDomain a) =>
a -> AuthDomainFilter -> m ()
authDomainSetFilter a
domain AuthDomainFilter
filter = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AuthDomain
domain' <- a -> IO (Ptr AuthDomain)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
domain
FunPtr C_AuthDomainFilter
filter' <- C_AuthDomainFilter -> IO (FunPtr C_AuthDomainFilter)
Soup.Callbacks.mk_AuthDomainFilter (Maybe (Ptr (FunPtr C_AuthDomainFilter))
-> AuthDomainFilter_WithClosures -> C_AuthDomainFilter
Soup.Callbacks.wrap_AuthDomainFilter Maybe (Ptr (FunPtr C_AuthDomainFilter))
forall a. Maybe a
Nothing (AuthDomainFilter -> AuthDomainFilter_WithClosures
Soup.Callbacks.drop_closures_AuthDomainFilter AuthDomainFilter
filter))
let filterData :: Ptr ()
filterData = FunPtr C_AuthDomainFilter -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_AuthDomainFilter
filter'
let dnotify :: FunPtr (Ptr a -> IO ())
dnotify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
Ptr AuthDomain
-> FunPtr C_AuthDomainFilter
-> Ptr ()
-> FunPtr (Ptr () -> IO ())
-> IO ()
soup_auth_domain_set_filter Ptr AuthDomain
domain' FunPtr C_AuthDomainFilter
filter' Ptr ()
filterData FunPtr (Ptr () -> IO ())
forall a. FunPtr (Ptr a -> IO ())
dnotify
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
domain
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AuthDomainSetFilterMethodInfo
instance (signature ~ (Soup.Callbacks.AuthDomainFilter -> m ()), MonadIO m, IsAuthDomain a) => O.OverloadedMethod AuthDomainSetFilterMethodInfo a signature where
overloadedMethod = authDomainSetFilter
instance O.OverloadedMethodInfo AuthDomainSetFilterMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.authDomainSetFilter",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAuthDomain a) =>
a -> AuthDomainGenericAuthCallback -> m ()
authDomainSetGenericAuthCallback a
domain AuthDomainGenericAuthCallback
authCallback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AuthDomain
domain' <- a -> IO (Ptr AuthDomain)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
domain
FunPtr C_AuthDomainGenericAuthCallback
authCallback' <- C_AuthDomainGenericAuthCallback
-> IO (FunPtr C_AuthDomainGenericAuthCallback)
Soup.Callbacks.mk_AuthDomainGenericAuthCallback (Maybe (Ptr (FunPtr C_AuthDomainGenericAuthCallback))
-> AuthDomainGenericAuthCallback_WithClosures
-> C_AuthDomainGenericAuthCallback
Soup.Callbacks.wrap_AuthDomainGenericAuthCallback Maybe (Ptr (FunPtr C_AuthDomainGenericAuthCallback))
forall a. Maybe a
Nothing (AuthDomainGenericAuthCallback
-> AuthDomainGenericAuthCallback_WithClosures
Soup.Callbacks.drop_closures_AuthDomainGenericAuthCallback AuthDomainGenericAuthCallback
authCallback))
let authData :: Ptr ()
authData = FunPtr C_AuthDomainGenericAuthCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_AuthDomainGenericAuthCallback
authCallback'
let dnotify :: FunPtr (Ptr a -> IO ())
dnotify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
Ptr AuthDomain
-> FunPtr C_AuthDomainGenericAuthCallback
-> Ptr ()
-> FunPtr (Ptr () -> IO ())
-> IO ()
soup_auth_domain_set_generic_auth_callback Ptr AuthDomain
domain' FunPtr C_AuthDomainGenericAuthCallback
authCallback' Ptr ()
authData FunPtr (Ptr () -> IO ())
forall a. FunPtr (Ptr a -> IO ())
dnotify
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
domain
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AuthDomainSetGenericAuthCallbackMethodInfo
instance (signature ~ (Soup.Callbacks.AuthDomainGenericAuthCallback -> m ()), MonadIO m, IsAuthDomain a) => O.OverloadedMethod AuthDomainSetGenericAuthCallbackMethodInfo a signature where
overloadedMethod = authDomainSetGenericAuthCallback
instance O.OverloadedMethodInfo AuthDomainSetGenericAuthCallbackMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Soup.Objects.AuthDomain.authDomainSetGenericAuthCallback",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Objects-AuthDomain.html#v:authDomainSetGenericAuthCallback"
})
#endif