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

/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.AuthBasic
    (

-- * Exported types
    AuthBasic(..)                           ,
    IsAuthBasic                             ,
    toAuthBasic                             ,
    noAuthBasic                             ,


    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

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

-- | Memory-managed wrapper type.
newtype AuthBasic = AuthBasic (ManagedPtr AuthBasic)
foreign import ccall "soup_auth_basic_get_type"
    c_soup_auth_basic_get_type :: IO GType

instance GObject AuthBasic where
    gobjectType = c_soup_auth_basic_get_type


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

instance O.HasParentTypes AuthBasic
type instance O.ParentTypes AuthBasic = '[Soup.Auth.Auth, GObject.Object.Object]

-- | Cast to `AuthBasic`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toAuthBasic :: (MonadIO m, IsAuthBasic o) => o -> m AuthBasic
toAuthBasic = liftIO . unsafeCastTo AuthBasic

-- | A convenience alias for `Nothing` :: `Maybe` `AuthBasic`.
noAuthBasic :: Maybe AuthBasic
noAuthBasic = Nothing

#if ENABLE_OVERLOADING
type family ResolveAuthBasicMethod (t :: Symbol) (o :: *) :: * where
    ResolveAuthBasicMethod "authenticate" o = Soup.Auth.AuthAuthenticateMethodInfo
    ResolveAuthBasicMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveAuthBasicMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveAuthBasicMethod "canAuthenticate" o = Soup.Auth.AuthCanAuthenticateMethodInfo
    ResolveAuthBasicMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveAuthBasicMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveAuthBasicMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveAuthBasicMethod "hasSavedPassword" o = Soup.Auth.AuthHasSavedPasswordMethodInfo
    ResolveAuthBasicMethod "isAuthenticated" o = Soup.Auth.AuthIsAuthenticatedMethodInfo
    ResolveAuthBasicMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveAuthBasicMethod "isForProxy" o = Soup.Auth.AuthIsForProxyMethodInfo
    ResolveAuthBasicMethod "isReady" o = Soup.Auth.AuthIsReadyMethodInfo
    ResolveAuthBasicMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveAuthBasicMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveAuthBasicMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveAuthBasicMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveAuthBasicMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveAuthBasicMethod "savePassword" o = Soup.Auth.AuthSavePasswordMethodInfo
    ResolveAuthBasicMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveAuthBasicMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveAuthBasicMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveAuthBasicMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveAuthBasicMethod "update" o = Soup.Auth.AuthUpdateMethodInfo
    ResolveAuthBasicMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveAuthBasicMethod "getAuthorization" o = Soup.Auth.AuthGetAuthorizationMethodInfo
    ResolveAuthBasicMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveAuthBasicMethod "getHost" o = Soup.Auth.AuthGetHostMethodInfo
    ResolveAuthBasicMethod "getInfo" o = Soup.Auth.AuthGetInfoMethodInfo
    ResolveAuthBasicMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveAuthBasicMethod "getProtectionSpace" o = Soup.Auth.AuthGetProtectionSpaceMethodInfo
    ResolveAuthBasicMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveAuthBasicMethod "getRealm" o = Soup.Auth.AuthGetRealmMethodInfo
    ResolveAuthBasicMethod "getSavedPassword" o = Soup.Auth.AuthGetSavedPasswordMethodInfo
    ResolveAuthBasicMethod "getSavedUsers" o = Soup.Auth.AuthGetSavedUsersMethodInfo
    ResolveAuthBasicMethod "getSchemeName" o = Soup.Auth.AuthGetSchemeNameMethodInfo
    ResolveAuthBasicMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveAuthBasicMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveAuthBasicMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveAuthBasicMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveAuthBasicMethod t AuthBasic, O.MethodInfo info AuthBasic p) => OL.IsLabel t (AuthBasic -> 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

#if ENABLE_OVERLOADING
instance O.HasAttributeList AuthBasic
type instance O.AttributeList AuthBasic = AuthBasicAttributeList
type AuthBasicAttributeList = ('[ '("host", Soup.Auth.AuthHostPropertyInfo), '("isAuthenticated", Soup.Auth.AuthIsAuthenticatedPropertyInfo), '("isForProxy", Soup.Auth.AuthIsForProxyPropertyInfo), '("realm", Soup.Auth.AuthRealmPropertyInfo), '("schemeName", Soup.Auth.AuthSchemeNamePropertyInfo)] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
#endif

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

#endif