{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Soup.Objects.AuthDomainBasic
    ( 

-- * Exported types
    AuthDomainBasic(..)                     ,
    IsAuthDomainBasic                       ,
    toAuthDomainBasic                       ,
    noAuthDomainBasic                       ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveAuthDomainBasicMethod            ,
#endif


-- ** setAuthCallback #method:setAuthCallback#

#if defined(ENABLE_OVERLOADING)
    AuthDomainBasicSetAuthCallbackMethodInfo,
#endif
    authDomainBasicSetAuthCallback          ,




 -- * Properties
-- ** authCallback #attr:authCallback#
-- | The t'GI.Soup.Callbacks.AuthDomainBasicAuthCallback'

#if defined(ENABLE_OVERLOADING)
    AuthDomainBasicAuthCallbackPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
    authDomainBasicAuthCallback             ,
#endif
    clearAuthDomainBasicAuthCallback        ,
    constructAuthDomainBasicAuthCallback    ,
    getAuthDomainBasicAuthCallback          ,
    setAuthDomainBasicAuthCallback          ,


-- ** authData #attr:authData#
-- | The data to pass to the t'GI.Soup.Callbacks.AuthDomainBasicAuthCallback'

#if defined(ENABLE_OVERLOADING)
    AuthDomainBasicAuthDataPropertyInfo     ,
#endif
#if defined(ENABLE_OVERLOADING)
    authDomainBasicAuthData                 ,
#endif
    constructAuthDomainBasicAuthData        ,
    getAuthDomainBasicAuthData              ,
    setAuthDomainBasicAuthData              ,




    ) 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.GI.Base.Signals as B.Signals
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.AuthDomain as Soup.AuthDomain

-- | Memory-managed wrapper type.
newtype AuthDomainBasic = AuthDomainBasic (ManagedPtr AuthDomainBasic)
    deriving (AuthDomainBasic -> AuthDomainBasic -> Bool
(AuthDomainBasic -> AuthDomainBasic -> Bool)
-> (AuthDomainBasic -> AuthDomainBasic -> Bool)
-> Eq AuthDomainBasic
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthDomainBasic -> AuthDomainBasic -> Bool
$c/= :: AuthDomainBasic -> AuthDomainBasic -> Bool
== :: AuthDomainBasic -> AuthDomainBasic -> Bool
$c== :: AuthDomainBasic -> AuthDomainBasic -> Bool
Eq)
foreign import ccall "soup_auth_domain_basic_get_type"
    c_soup_auth_domain_basic_get_type :: IO GType

instance GObject AuthDomainBasic where
    gobjectType :: IO GType
gobjectType = IO GType
c_soup_auth_domain_basic_get_type
    

-- | Convert 'AuthDomainBasic' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue AuthDomainBasic where
    toGValue :: AuthDomainBasic -> IO GValue
toGValue o :: AuthDomainBasic
o = do
        GType
gtype <- IO GType
c_soup_auth_domain_basic_get_type
        AuthDomainBasic -> (Ptr AuthDomainBasic -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr AuthDomainBasic
o (GType
-> (GValue -> Ptr AuthDomainBasic -> IO ())
-> Ptr AuthDomainBasic
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr AuthDomainBasic -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO AuthDomainBasic
fromGValue gv :: GValue
gv = do
        Ptr AuthDomainBasic
ptr <- GValue -> IO (Ptr AuthDomainBasic)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr AuthDomainBasic)
        (ManagedPtr AuthDomainBasic -> AuthDomainBasic)
-> Ptr AuthDomainBasic -> IO AuthDomainBasic
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr AuthDomainBasic -> AuthDomainBasic
AuthDomainBasic Ptr AuthDomainBasic
ptr
        
    

-- | Type class for types which can be safely cast to `AuthDomainBasic`, for instance with `toAuthDomainBasic`.
class (GObject o, O.IsDescendantOf AuthDomainBasic o) => IsAuthDomainBasic o
instance (GObject o, O.IsDescendantOf AuthDomainBasic o) => IsAuthDomainBasic o

instance O.HasParentTypes AuthDomainBasic
type instance O.ParentTypes AuthDomainBasic = '[Soup.AuthDomain.AuthDomain, GObject.Object.Object]

-- | Cast to `AuthDomainBasic`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toAuthDomainBasic :: (MonadIO m, IsAuthDomainBasic o) => o -> m AuthDomainBasic
toAuthDomainBasic :: o -> m AuthDomainBasic
toAuthDomainBasic = IO AuthDomainBasic -> m AuthDomainBasic
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AuthDomainBasic -> m AuthDomainBasic)
-> (o -> IO AuthDomainBasic) -> o -> m AuthDomainBasic
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr AuthDomainBasic -> AuthDomainBasic)
-> o -> IO AuthDomainBasic
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr AuthDomainBasic -> AuthDomainBasic
AuthDomainBasic

-- | A convenience alias for `Nothing` :: `Maybe` `AuthDomainBasic`.
noAuthDomainBasic :: Maybe AuthDomainBasic
noAuthDomainBasic :: Maybe AuthDomainBasic
noAuthDomainBasic = Maybe AuthDomainBasic
forall a. Maybe a
Nothing

#if defined(ENABLE_OVERLOADING)
type family ResolveAuthDomainBasicMethod (t :: Symbol) (o :: *) :: * where
    ResolveAuthDomainBasicMethod "accepts" o = Soup.AuthDomain.AuthDomainAcceptsMethodInfo
    ResolveAuthDomainBasicMethod "addPath" o = Soup.AuthDomain.AuthDomainAddPathMethodInfo
    ResolveAuthDomainBasicMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveAuthDomainBasicMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveAuthDomainBasicMethod "challenge" o = Soup.AuthDomain.AuthDomainChallengeMethodInfo
    ResolveAuthDomainBasicMethod "checkPassword" o = Soup.AuthDomain.AuthDomainCheckPasswordMethodInfo
    ResolveAuthDomainBasicMethod "covers" o = Soup.AuthDomain.AuthDomainCoversMethodInfo
    ResolveAuthDomainBasicMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveAuthDomainBasicMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveAuthDomainBasicMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveAuthDomainBasicMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveAuthDomainBasicMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveAuthDomainBasicMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveAuthDomainBasicMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveAuthDomainBasicMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveAuthDomainBasicMethod "removePath" o = Soup.AuthDomain.AuthDomainRemovePathMethodInfo
    ResolveAuthDomainBasicMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveAuthDomainBasicMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveAuthDomainBasicMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveAuthDomainBasicMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveAuthDomainBasicMethod "tryGenericAuthCallback" o = Soup.AuthDomain.AuthDomainTryGenericAuthCallbackMethodInfo
    ResolveAuthDomainBasicMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveAuthDomainBasicMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveAuthDomainBasicMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveAuthDomainBasicMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveAuthDomainBasicMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveAuthDomainBasicMethod "getRealm" o = Soup.AuthDomain.AuthDomainGetRealmMethodInfo
    ResolveAuthDomainBasicMethod "setAuthCallback" o = AuthDomainBasicSetAuthCallbackMethodInfo
    ResolveAuthDomainBasicMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveAuthDomainBasicMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveAuthDomainBasicMethod "setFilter" o = Soup.AuthDomain.AuthDomainSetFilterMethodInfo
    ResolveAuthDomainBasicMethod "setGenericAuthCallback" o = Soup.AuthDomain.AuthDomainSetGenericAuthCallbackMethodInfo
    ResolveAuthDomainBasicMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveAuthDomainBasicMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveAuthDomainBasicMethod t AuthDomainBasic, O.MethodInfo info AuthDomainBasic p) => OL.IsLabel t (AuthDomainBasic -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

-- VVV Prop "auth-callback"
   -- Type: TInterface (Name {namespace = "Soup", name = "AuthDomainBasicAuthCallback"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@auth-callback@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' authDomainBasic #authCallback
-- @
getAuthDomainBasicAuthCallback :: (MonadIO m, IsAuthDomainBasic o) => o -> m (Maybe Soup.Callbacks.AuthDomainBasicAuthCallback_WithClosures)
getAuthDomainBasicAuthCallback :: o -> m (Maybe AuthDomainBasicAuthCallback_WithClosures)
getAuthDomainBasicAuthCallback obj :: o
obj = IO (Maybe AuthDomainBasicAuthCallback_WithClosures)
-> m (Maybe AuthDomainBasicAuthCallback_WithClosures)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe AuthDomainBasicAuthCallback_WithClosures)
 -> m (Maybe AuthDomainBasicAuthCallback_WithClosures))
-> IO (Maybe AuthDomainBasicAuthCallback_WithClosures)
-> m (Maybe AuthDomainBasicAuthCallback_WithClosures)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (FunPtr C_AuthDomainBasicAuthCallback
    -> AuthDomainBasicAuthCallback_WithClosures)
-> IO (Maybe AuthDomainBasicAuthCallback_WithClosures)
forall a b c.
GObject a =>
a -> String -> (FunPtr b -> c) -> IO (Maybe c)
B.Properties.getObjectPropertyCallback o
obj "auth-callback" FunPtr C_AuthDomainBasicAuthCallback
-> AuthDomainBasicAuthCallback_WithClosures
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAuthDomainBasic a, IsMessage b) =>
FunPtr C_AuthDomainBasicAuthCallback
-> a -> b -> Text -> Text -> Ptr () -> m Bool
Soup.Callbacks.dynamic_AuthDomainBasicAuthCallback

-- | Set the value of the “@auth-callback@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' authDomainBasic [ #authCallback 'Data.GI.Base.Attributes.:=' value ]
-- @
setAuthDomainBasicAuthCallback :: (MonadIO m, IsAuthDomainBasic o) => o -> FunPtr Soup.Callbacks.C_AuthDomainBasicAuthCallback -> m ()
setAuthDomainBasicAuthCallback :: o -> FunPtr C_AuthDomainBasicAuthCallback -> m ()
setAuthDomainBasicAuthCallback obj :: o
obj val :: FunPtr C_AuthDomainBasicAuthCallback
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> FunPtr C_AuthDomainBasicAuthCallback -> IO ()
forall a b. GObject a => a -> String -> FunPtr b -> IO ()
B.Properties.setObjectPropertyCallback o
obj "auth-callback" FunPtr C_AuthDomainBasicAuthCallback
val

-- | Construct a `GValueConstruct` with valid value for the “@auth-callback@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructAuthDomainBasicAuthCallback :: (IsAuthDomainBasic o) => FunPtr Soup.Callbacks.C_AuthDomainBasicAuthCallback -> IO (GValueConstruct o)
constructAuthDomainBasicAuthCallback :: FunPtr C_AuthDomainBasicAuthCallback -> IO (GValueConstruct o)
constructAuthDomainBasicAuthCallback val :: FunPtr C_AuthDomainBasicAuthCallback
val = String
-> FunPtr C_AuthDomainBasicAuthCallback -> IO (GValueConstruct o)
forall b o. String -> FunPtr b -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyCallback "auth-callback" FunPtr C_AuthDomainBasicAuthCallback
val

-- | Set the value of the “@auth-callback@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #authCallback
-- @
clearAuthDomainBasicAuthCallback :: (MonadIO m, IsAuthDomainBasic o) => o -> m ()
clearAuthDomainBasicAuthCallback :: o -> m ()
clearAuthDomainBasicAuthCallback obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> FunPtr Any -> IO ()
forall a b. GObject a => a -> String -> FunPtr b -> IO ()
B.Properties.setObjectPropertyCallback o
obj "auth-callback" FunPtr Any
forall a. FunPtr a
FP.nullFunPtr

#if defined(ENABLE_OVERLOADING)
data AuthDomainBasicAuthCallbackPropertyInfo
instance AttrInfo AuthDomainBasicAuthCallbackPropertyInfo where
    type AttrAllowedOps AuthDomainBasicAuthCallbackPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint AuthDomainBasicAuthCallbackPropertyInfo = IsAuthDomainBasic
    type AttrSetTypeConstraint AuthDomainBasicAuthCallbackPropertyInfo = (~) (FunPtr Soup.Callbacks.C_AuthDomainBasicAuthCallback)
    type AttrTransferTypeConstraint AuthDomainBasicAuthCallbackPropertyInfo = (~) Soup.Callbacks.AuthDomainBasicAuthCallback_WithClosures
    type AttrTransferType AuthDomainBasicAuthCallbackPropertyInfo = FunPtr Soup.Callbacks.C_AuthDomainBasicAuthCallback
    type AttrGetType AuthDomainBasicAuthCallbackPropertyInfo = (Maybe Soup.Callbacks.AuthDomainBasicAuthCallback_WithClosures)
    type AttrLabel AuthDomainBasicAuthCallbackPropertyInfo = "auth-callback"
    type AttrOrigin AuthDomainBasicAuthCallbackPropertyInfo = AuthDomainBasic
    attrGet = getAuthDomainBasicAuthCallback
    attrSet = setAuthDomainBasicAuthCallback
    attrTransfer _ v = do
        Soup.Callbacks.mk_AuthDomainBasicAuthCallback (Soup.Callbacks.wrap_AuthDomainBasicAuthCallback Nothing v)
    attrConstruct = constructAuthDomainBasicAuthCallback
    attrClear = clearAuthDomainBasicAuthCallback
#endif

-- VVV Prop "auth-data"
   -- Type: TBasicType TPtr
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@auth-data@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' authDomainBasic #authData
-- @
getAuthDomainBasicAuthData :: (MonadIO m, IsAuthDomainBasic o) => o -> m (Ptr ())
getAuthDomainBasicAuthData :: o -> m (Ptr ())
getAuthDomainBasicAuthData obj :: o
obj = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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 "auth-data"

-- | Set the value of the “@auth-data@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' authDomainBasic [ #authData 'Data.GI.Base.Attributes.:=' value ]
-- @
setAuthDomainBasicAuthData :: (MonadIO m, IsAuthDomainBasic o) => o -> Ptr () -> m ()
setAuthDomainBasicAuthData :: o -> Ptr () -> m ()
setAuthDomainBasicAuthData obj :: o
obj val :: Ptr ()
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Ptr () -> IO ()
forall a b. GObject a => a -> String -> Ptr b -> IO ()
B.Properties.setObjectPropertyPtr o
obj "auth-data" Ptr ()
val

-- | Construct a `GValueConstruct` with valid value for the “@auth-data@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructAuthDomainBasicAuthData :: (IsAuthDomainBasic o) => Ptr () -> IO (GValueConstruct o)
constructAuthDomainBasicAuthData :: Ptr () -> IO (GValueConstruct o)
constructAuthDomainBasicAuthData val :: Ptr ()
val = String -> Ptr () -> IO (GValueConstruct o)
forall b o. String -> Ptr b -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyPtr "auth-data" Ptr ()
val

#if defined(ENABLE_OVERLOADING)
data AuthDomainBasicAuthDataPropertyInfo
instance AttrInfo AuthDomainBasicAuthDataPropertyInfo where
    type AttrAllowedOps AuthDomainBasicAuthDataPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint AuthDomainBasicAuthDataPropertyInfo = IsAuthDomainBasic
    type AttrSetTypeConstraint AuthDomainBasicAuthDataPropertyInfo = (~) (Ptr ())
    type AttrTransferTypeConstraint AuthDomainBasicAuthDataPropertyInfo = (~) (Ptr ())
    type AttrTransferType AuthDomainBasicAuthDataPropertyInfo = Ptr ()
    type AttrGetType AuthDomainBasicAuthDataPropertyInfo = (Ptr ())
    type AttrLabel AuthDomainBasicAuthDataPropertyInfo = "auth-data"
    type AttrOrigin AuthDomainBasicAuthDataPropertyInfo = AuthDomainBasic
    attrGet = getAuthDomainBasicAuthData
    attrSet = setAuthDomainBasicAuthData
    attrTransfer _ v = do
        return v
    attrConstruct = constructAuthDomainBasicAuthData
    attrClear = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AuthDomainBasic
type instance O.AttributeList AuthDomainBasic = AuthDomainBasicAttributeList
type AuthDomainBasicAttributeList = ('[ '("addPath", Soup.AuthDomain.AuthDomainAddPathPropertyInfo), '("authCallback", AuthDomainBasicAuthCallbackPropertyInfo), '("authData", AuthDomainBasicAuthDataPropertyInfo), '("filter", Soup.AuthDomain.AuthDomainFilterPropertyInfo), '("filterData", Soup.AuthDomain.AuthDomainFilterDataPropertyInfo), '("genericAuthCallback", Soup.AuthDomain.AuthDomainGenericAuthCallbackPropertyInfo), '("genericAuthData", Soup.AuthDomain.AuthDomainGenericAuthDataPropertyInfo), '("proxy", Soup.AuthDomain.AuthDomainProxyPropertyInfo), '("realm", Soup.AuthDomain.AuthDomainRealmPropertyInfo), '("removePath", Soup.AuthDomain.AuthDomainRemovePathPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
authDomainBasicAuthCallback :: AttrLabelProxy "authCallback"
authDomainBasicAuthCallback = AttrLabelProxy

authDomainBasicAuthData :: AttrLabelProxy "authData"
authDomainBasicAuthData = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList AuthDomainBasic = AuthDomainBasicSignalList
type AuthDomainBasicSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method AuthDomainBasic::set_auth_callback
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "domain"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "AuthDomainBasic" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the domain" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface
--                 Name { namespace = "Soup" , name = "AuthDomainBasicAuthCallback" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the callback" , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "data to pass to @auth_callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dnotify"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "destroy notifier to free @user_data when @domain\nis destroyed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "soup_auth_domain_basic_set_auth_callback" soup_auth_domain_basic_set_auth_callback :: 
    Ptr AuthDomainBasic ->                  -- domain : TInterface (Name {namespace = "Soup", name = "AuthDomainBasic"})
    FunPtr Soup.Callbacks.C_AuthDomainBasicAuthCallback -> -- callback : TInterface (Name {namespace = "Soup", name = "AuthDomainBasicAuthCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- dnotify : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    IO ()

-- | Sets the callback that /@domain@/ will use to authenticate incoming
-- requests. For each request containing authorization, /@domain@/ will
-- invoke the callback, and then either accept or reject the request
-- based on /@callback@/\'s return value.
-- 
-- You can also set the auth callback by setting the
-- 'GI.Soup.Constants.AUTH_DOMAIN_BASIC_AUTH_CALLBACK' and
-- 'GI.Soup.Constants.AUTH_DOMAIN_BASIC_AUTH_DATA' properties, which can also be
-- used to set the callback at construct time.
authDomainBasicSetAuthCallback ::
    (B.CallStack.HasCallStack, MonadIO m, IsAuthDomainBasic a) =>
    a
    -- ^ /@domain@/: the domain
    -> Soup.Callbacks.AuthDomainBasicAuthCallback
    -- ^ /@callback@/: the callback
    -> m ()
authDomainBasicSetAuthCallback :: a -> AuthDomainBasicAuthCallback -> m ()
authDomainBasicSetAuthCallback domain :: a
domain callback :: AuthDomainBasicAuthCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr AuthDomainBasic
domain' <- a -> IO (Ptr AuthDomainBasic)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
domain
    FunPtr C_AuthDomainBasicAuthCallback
callback' <- C_AuthDomainBasicAuthCallback
-> IO (FunPtr C_AuthDomainBasicAuthCallback)
Soup.Callbacks.mk_AuthDomainBasicAuthCallback (Maybe (Ptr (FunPtr C_AuthDomainBasicAuthCallback))
-> AuthDomainBasicAuthCallback_WithClosures
-> C_AuthDomainBasicAuthCallback
Soup.Callbacks.wrap_AuthDomainBasicAuthCallback Maybe (Ptr (FunPtr C_AuthDomainBasicAuthCallback))
forall a. Maybe a
Nothing (AuthDomainBasicAuthCallback
-> AuthDomainBasicAuthCallback_WithClosures
Soup.Callbacks.drop_closures_AuthDomainBasicAuthCallback AuthDomainBasicAuthCallback
callback))
    let userData :: Ptr ()
userData = FunPtr C_AuthDomainBasicAuthCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_AuthDomainBasicAuthCallback
callback'
    let dnotify :: FunPtr (Ptr a -> IO ())
dnotify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Ptr AuthDomainBasic
-> FunPtr C_AuthDomainBasicAuthCallback
-> Ptr ()
-> FunPtr (Ptr () -> IO ())
-> IO ()
soup_auth_domain_basic_set_auth_callback Ptr AuthDomainBasic
domain' FunPtr C_AuthDomainBasicAuthCallback
callback' Ptr ()
userData FunPtr (Ptr () -> IO ())
forall a. FunPtr (Ptr a -> IO ())
dnotify
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
domain
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AuthDomainBasicSetAuthCallbackMethodInfo
instance (signature ~ (Soup.Callbacks.AuthDomainBasicAuthCallback -> m ()), MonadIO m, IsAuthDomainBasic a) => O.MethodInfo AuthDomainBasicSetAuthCallbackMethodInfo a signature where
    overloadedMethod = authDomainBasicSetAuthCallback

#endif