module GI.Soup.Objects.AuthDomainDigest
(
AuthDomainDigest(..) ,
AuthDomainDigestK ,
toAuthDomainDigest ,
noAuthDomainDigest ,
authDomainDigestEncodePassword ,
AuthDomainDigestAuthCallbackPropertyInfo,
constructAuthDomainDigestAuthCallback ,
getAuthDomainDigestAuthCallback ,
setAuthDomainDigestAuthCallback ,
AuthDomainDigestAuthDataPropertyInfo ,
constructAuthDomainDigestAuthData ,
getAuthDomainDigestAuthData ,
setAuthDomainDigestAuthData ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Soup.Types
import GI.Soup.Callbacks
import qualified GI.GObject as GObject
newtype AuthDomainDigest = AuthDomainDigest (ForeignPtr AuthDomainDigest)
foreign import ccall "soup_auth_domain_digest_get_type"
c_soup_auth_domain_digest_get_type :: IO GType
type instance ParentTypes AuthDomainDigest = AuthDomainDigestParentTypes
type AuthDomainDigestParentTypes = '[AuthDomain, GObject.Object]
instance GObject AuthDomainDigest where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_soup_auth_domain_digest_get_type
class GObject o => AuthDomainDigestK o
instance (GObject o, IsDescendantOf AuthDomainDigest o) => AuthDomainDigestK o
toAuthDomainDigest :: AuthDomainDigestK o => o -> IO AuthDomainDigest
toAuthDomainDigest = unsafeCastTo AuthDomainDigest
noAuthDomainDigest :: Maybe AuthDomainDigest
noAuthDomainDigest = Nothing
getAuthDomainDigestAuthCallback :: (MonadIO m, AuthDomainDigestK o) => o -> m (Ptr ())
getAuthDomainDigestAuthCallback obj = liftIO $ getObjectPropertyPtr obj "auth-callback"
setAuthDomainDigestAuthCallback :: (MonadIO m, AuthDomainDigestK o) => o -> (Ptr ()) -> m ()
setAuthDomainDigestAuthCallback obj val = liftIO $ setObjectPropertyPtr obj "auth-callback" val
constructAuthDomainDigestAuthCallback :: (Ptr ()) -> IO ([Char], GValue)
constructAuthDomainDigestAuthCallback val = constructObjectPropertyPtr "auth-callback" val
data AuthDomainDigestAuthCallbackPropertyInfo
instance AttrInfo AuthDomainDigestAuthCallbackPropertyInfo where
type AttrAllowedOps AuthDomainDigestAuthCallbackPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint AuthDomainDigestAuthCallbackPropertyInfo = (~) (Ptr ())
type AttrBaseTypeConstraint AuthDomainDigestAuthCallbackPropertyInfo = AuthDomainDigestK
type AttrGetType AuthDomainDigestAuthCallbackPropertyInfo = (Ptr ())
type AttrLabel AuthDomainDigestAuthCallbackPropertyInfo = "AuthDomainDigest::auth-callback"
attrGet _ = getAuthDomainDigestAuthCallback
attrSet _ = setAuthDomainDigestAuthCallback
attrConstruct _ = constructAuthDomainDigestAuthCallback
getAuthDomainDigestAuthData :: (MonadIO m, AuthDomainDigestK o) => o -> m (Ptr ())
getAuthDomainDigestAuthData obj = liftIO $ getObjectPropertyPtr obj "auth-data"
setAuthDomainDigestAuthData :: (MonadIO m, AuthDomainDigestK o) => o -> (Ptr ()) -> m ()
setAuthDomainDigestAuthData obj val = liftIO $ setObjectPropertyPtr obj "auth-data" val
constructAuthDomainDigestAuthData :: (Ptr ()) -> IO ([Char], GValue)
constructAuthDomainDigestAuthData val = constructObjectPropertyPtr "auth-data" val
data AuthDomainDigestAuthDataPropertyInfo
instance AttrInfo AuthDomainDigestAuthDataPropertyInfo where
type AttrAllowedOps AuthDomainDigestAuthDataPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint AuthDomainDigestAuthDataPropertyInfo = (~) (Ptr ())
type AttrBaseTypeConstraint AuthDomainDigestAuthDataPropertyInfo = AuthDomainDigestK
type AttrGetType AuthDomainDigestAuthDataPropertyInfo = (Ptr ())
type AttrLabel AuthDomainDigestAuthDataPropertyInfo = "AuthDomainDigest::auth-data"
attrGet _ = getAuthDomainDigestAuthData
attrSet _ = setAuthDomainDigestAuthData
attrConstruct _ = constructAuthDomainDigestAuthData
type instance AttributeList AuthDomainDigest = AuthDomainDigestAttributeList
type AuthDomainDigestAttributeList = ('[ '("add-path", AuthDomainAddPathPropertyInfo), '("auth-callback", AuthDomainDigestAuthCallbackPropertyInfo), '("auth-data", AuthDomainDigestAuthDataPropertyInfo), '("filter", AuthDomainFilterPropertyInfo), '("filter-data", AuthDomainFilterDataPropertyInfo), '("generic-auth-callback", AuthDomainGenericAuthCallbackPropertyInfo), '("generic-auth-data", AuthDomainGenericAuthDataPropertyInfo), '("proxy", AuthDomainProxyPropertyInfo), '("realm", AuthDomainRealmPropertyInfo), '("remove-path", AuthDomainRemovePathPropertyInfo)] :: [(Symbol, *)])
type instance SignalList AuthDomainDigest = AuthDomainDigestSignalList
type AuthDomainDigestSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "soup_auth_domain_digest_encode_password" soup_auth_domain_digest_encode_password ::
CString ->
CString ->
CString ->
IO CString
authDomainDigestEncodePassword ::
(MonadIO m) =>
T.Text ->
T.Text ->
T.Text ->
m T.Text
authDomainDigestEncodePassword username realm password = liftIO $ do
username' <- textToCString username
realm' <- textToCString realm
password' <- textToCString password
result <- soup_auth_domain_digest_encode_password username' realm' password'
checkUnexpectedReturnNULL "soup_auth_domain_digest_encode_password" result
result' <- cstringToText result
freeMem result
freeMem username'
freeMem realm'
freeMem password'
return result'