{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

/No description available in the introspection data./
-}

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

module GI.Soup.Objects.AuthDomainBasic
    (

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


 -- * Properties
-- ** authCallback #attr:authCallback#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    AuthDomainBasicAuthCallbackPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
    authDomainBasicAuthCallback             ,
#endif
    constructAuthDomainBasicAuthCallback    ,
    getAuthDomainBasicAuthCallback          ,
    setAuthDomainBasicAuthCallback          ,


-- ** authData #attr:authData#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    AuthDomainBasicAuthDataPropertyInfo     ,
#endif
#if 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.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Soup.Objects.AuthDomain as Soup.AuthDomain

-- | Memory-managed wrapper type.
newtype AuthDomainBasic = AuthDomainBasic (ManagedPtr AuthDomainBasic)
foreign import ccall "soup_auth_domain_basic_get_type"
    c_soup_auth_domain_basic_get_type :: IO GType

instance GObject AuthDomainBasic where
    gobjectType _ = c_soup_auth_domain_basic_get_type


-- | Type class for types which can be safely cast to `AuthDomainBasic`, for instance with `toAuthDomainBasic`.
class GObject o => IsAuthDomainBasic o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError AuthDomainBasic a) =>
    IsAuthDomainBasic a
#endif
instance IsAuthDomainBasic AuthDomainBasic
instance Soup.AuthDomain.IsAuthDomain AuthDomainBasic
instance GObject.Object.IsObject AuthDomainBasic

-- | 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 = liftIO . unsafeCastTo AuthDomainBasic

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

#if ENABLE_OVERLOADING
type family ResolveAuthDomainBasicMethod (t :: Symbol) (o :: *) :: * where
    ResolveAuthDomainBasicMethod "accepts" o = Soup.AuthDomain.AuthDomainAcceptsMethodInfo
    ResolveAuthDomainBasicMethod "addPath" o = Soup.AuthDomain.AuthDomainAddPathMethodInfo
    ResolveAuthDomainBasicMethod "basicSetAuthCallback" o = Soup.AuthDomain.AuthDomainBasicSetAuthCallbackMethodInfo
    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 "digestSetAuthCallback" o = Soup.AuthDomain.AuthDomainDigestSetAuthCallbackMethodInfo
    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 "setData" o = GObject.Object.ObjectSetDataMethodInfo
    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) => O.IsLabelProxy t (AuthDomainBasic -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

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

#endif

-- VVV Prop "auth-callback"
   -- Type: TBasicType TPtr
   -- 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 (Ptr ())
getAuthDomainBasicAuthCallback obj = liftIO $ getObjectPropertyPtr obj "auth-callback"

{- |
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 -> Ptr () -> m ()
setAuthDomainBasicAuthCallback obj val = liftIO $ setObjectPropertyPtr obj "auth-callback" 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) => Ptr () -> IO (GValueConstruct o)
constructAuthDomainBasicAuthCallback val = constructObjectPropertyPtr "auth-callback" val

#if ENABLE_OVERLOADING
data AuthDomainBasicAuthCallbackPropertyInfo
instance AttrInfo AuthDomainBasicAuthCallbackPropertyInfo where
    type AttrAllowedOps AuthDomainBasicAuthCallbackPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint AuthDomainBasicAuthCallbackPropertyInfo = (~) (Ptr ())
    type AttrBaseTypeConstraint AuthDomainBasicAuthCallbackPropertyInfo = IsAuthDomainBasic
    type AttrGetType AuthDomainBasicAuthCallbackPropertyInfo = (Ptr ())
    type AttrLabel AuthDomainBasicAuthCallbackPropertyInfo = "auth-callback"
    type AttrOrigin AuthDomainBasicAuthCallbackPropertyInfo = AuthDomainBasic
    attrGet _ = getAuthDomainBasicAuthCallback
    attrSet _ = setAuthDomainBasicAuthCallback
    attrConstruct _ = constructAuthDomainBasicAuthCallback
    attrClear _ = undefined
#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 obj = liftIO $ getObjectPropertyPtr 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 obj val = liftIO $ setObjectPropertyPtr obj "auth-data" 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 val = constructObjectPropertyPtr "auth-data" val

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

#if 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 ENABLE_OVERLOADING
authDomainBasicAuthCallback :: AttrLabelProxy "authCallback"
authDomainBasicAuthCallback = AttrLabelProxy

authDomainBasicAuthData :: AttrLabelProxy "authData"
authDomainBasicAuthData = AttrLabelProxy

#endif

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

#endif