#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.TlsConnection
(
TlsConnection(..) ,
IsTlsConnection ,
toTlsConnection ,
noTlsConnection ,
#if ENABLE_OVERLOADING
TlsConnectionEmitAcceptCertificateMethodInfo,
#endif
tlsConnectionEmitAcceptCertificate ,
#if ENABLE_OVERLOADING
TlsConnectionGetCertificateMethodInfo ,
#endif
tlsConnectionGetCertificate ,
#if ENABLE_OVERLOADING
TlsConnectionGetDatabaseMethodInfo ,
#endif
tlsConnectionGetDatabase ,
#if ENABLE_OVERLOADING
TlsConnectionGetInteractionMethodInfo ,
#endif
tlsConnectionGetInteraction ,
#if ENABLE_OVERLOADING
TlsConnectionGetPeerCertificateMethodInfo,
#endif
tlsConnectionGetPeerCertificate ,
#if ENABLE_OVERLOADING
TlsConnectionGetPeerCertificateErrorsMethodInfo,
#endif
tlsConnectionGetPeerCertificateErrors ,
#if ENABLE_OVERLOADING
TlsConnectionGetRehandshakeModeMethodInfo,
#endif
tlsConnectionGetRehandshakeMode ,
#if ENABLE_OVERLOADING
TlsConnectionGetRequireCloseNotifyMethodInfo,
#endif
tlsConnectionGetRequireCloseNotify ,
#if ENABLE_OVERLOADING
TlsConnectionGetUseSystemCertdbMethodInfo,
#endif
tlsConnectionGetUseSystemCertdb ,
#if ENABLE_OVERLOADING
TlsConnectionHandshakeMethodInfo ,
#endif
tlsConnectionHandshake ,
#if ENABLE_OVERLOADING
TlsConnectionHandshakeAsyncMethodInfo ,
#endif
tlsConnectionHandshakeAsync ,
#if ENABLE_OVERLOADING
TlsConnectionHandshakeFinishMethodInfo ,
#endif
tlsConnectionHandshakeFinish ,
#if ENABLE_OVERLOADING
TlsConnectionSetCertificateMethodInfo ,
#endif
tlsConnectionSetCertificate ,
#if ENABLE_OVERLOADING
TlsConnectionSetDatabaseMethodInfo ,
#endif
tlsConnectionSetDatabase ,
#if ENABLE_OVERLOADING
TlsConnectionSetInteractionMethodInfo ,
#endif
tlsConnectionSetInteraction ,
#if ENABLE_OVERLOADING
TlsConnectionSetRehandshakeModeMethodInfo,
#endif
tlsConnectionSetRehandshakeMode ,
#if ENABLE_OVERLOADING
TlsConnectionSetRequireCloseNotifyMethodInfo,
#endif
tlsConnectionSetRequireCloseNotify ,
#if ENABLE_OVERLOADING
TlsConnectionSetUseSystemCertdbMethodInfo,
#endif
tlsConnectionSetUseSystemCertdb ,
#if ENABLE_OVERLOADING
TlsConnectionBaseIoStreamPropertyInfo ,
#endif
constructTlsConnectionBaseIoStream ,
getTlsConnectionBaseIoStream ,
#if ENABLE_OVERLOADING
tlsConnectionBaseIoStream ,
#endif
#if ENABLE_OVERLOADING
TlsConnectionCertificatePropertyInfo ,
#endif
constructTlsConnectionCertificate ,
getTlsConnectionCertificate ,
setTlsConnectionCertificate ,
#if ENABLE_OVERLOADING
tlsConnectionCertificate ,
#endif
#if ENABLE_OVERLOADING
TlsConnectionDatabasePropertyInfo ,
#endif
constructTlsConnectionDatabase ,
getTlsConnectionDatabase ,
setTlsConnectionDatabase ,
#if ENABLE_OVERLOADING
tlsConnectionDatabase ,
#endif
#if ENABLE_OVERLOADING
TlsConnectionInteractionPropertyInfo ,
#endif
clearTlsConnectionInteraction ,
constructTlsConnectionInteraction ,
getTlsConnectionInteraction ,
setTlsConnectionInteraction ,
#if ENABLE_OVERLOADING
tlsConnectionInteraction ,
#endif
#if ENABLE_OVERLOADING
TlsConnectionPeerCertificatePropertyInfo,
#endif
getTlsConnectionPeerCertificate ,
#if ENABLE_OVERLOADING
tlsConnectionPeerCertificate ,
#endif
#if ENABLE_OVERLOADING
TlsConnectionPeerCertificateErrorsPropertyInfo,
#endif
getTlsConnectionPeerCertificateErrors ,
#if ENABLE_OVERLOADING
tlsConnectionPeerCertificateErrors ,
#endif
#if ENABLE_OVERLOADING
TlsConnectionRehandshakeModePropertyInfo,
#endif
constructTlsConnectionRehandshakeMode ,
getTlsConnectionRehandshakeMode ,
setTlsConnectionRehandshakeMode ,
#if ENABLE_OVERLOADING
tlsConnectionRehandshakeMode ,
#endif
#if ENABLE_OVERLOADING
TlsConnectionRequireCloseNotifyPropertyInfo,
#endif
constructTlsConnectionRequireCloseNotify,
getTlsConnectionRequireCloseNotify ,
setTlsConnectionRequireCloseNotify ,
#if ENABLE_OVERLOADING
tlsConnectionRequireCloseNotify ,
#endif
#if ENABLE_OVERLOADING
TlsConnectionUseSystemCertdbPropertyInfo,
#endif
constructTlsConnectionUseSystemCertdb ,
getTlsConnectionUseSystemCertdb ,
setTlsConnectionUseSystemCertdb ,
#if ENABLE_OVERLOADING
tlsConnectionUseSystemCertdb ,
#endif
C_TlsConnectionAcceptCertificateCallback,
TlsConnectionAcceptCertificateCallback ,
#if ENABLE_OVERLOADING
TlsConnectionAcceptCertificateSignalInfo,
#endif
afterTlsConnectionAcceptCertificate ,
genClosure_TlsConnectionAcceptCertificate,
mk_TlsConnectionAcceptCertificateCallback,
noTlsConnectionAcceptCertificateCallback,
onTlsConnectionAcceptCertificate ,
wrap_TlsConnectionAcceptCertificateCallback,
) 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 qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Enums as Gio.Enums
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.IOStream as Gio.IOStream
import {-# SOURCE #-} qualified GI.Gio.Objects.TlsCertificate as Gio.TlsCertificate
import {-# SOURCE #-} qualified GI.Gio.Objects.TlsDatabase as Gio.TlsDatabase
import {-# SOURCE #-} qualified GI.Gio.Objects.TlsInteraction as Gio.TlsInteraction
newtype TlsConnection = TlsConnection (ManagedPtr TlsConnection)
foreign import ccall "g_tls_connection_get_type"
c_g_tls_connection_get_type :: IO GType
instance GObject TlsConnection where
gobjectType _ = c_g_tls_connection_get_type
class GObject o => IsTlsConnection o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError TlsConnection a) =>
IsTlsConnection a
#endif
instance IsTlsConnection TlsConnection
instance Gio.IOStream.IsIOStream TlsConnection
instance GObject.Object.IsObject TlsConnection
toTlsConnection :: (MonadIO m, IsTlsConnection o) => o -> m TlsConnection
toTlsConnection = liftIO . unsafeCastTo TlsConnection
noTlsConnection :: Maybe TlsConnection
noTlsConnection = Nothing
#if ENABLE_OVERLOADING
type family ResolveTlsConnectionMethod (t :: Symbol) (o :: *) :: * where
ResolveTlsConnectionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTlsConnectionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTlsConnectionMethod "clearPending" o = Gio.IOStream.IOStreamClearPendingMethodInfo
ResolveTlsConnectionMethod "close" o = Gio.IOStream.IOStreamCloseMethodInfo
ResolveTlsConnectionMethod "closeAsync" o = Gio.IOStream.IOStreamCloseAsyncMethodInfo
ResolveTlsConnectionMethod "closeFinish" o = Gio.IOStream.IOStreamCloseFinishMethodInfo
ResolveTlsConnectionMethod "emitAcceptCertificate" o = TlsConnectionEmitAcceptCertificateMethodInfo
ResolveTlsConnectionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTlsConnectionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTlsConnectionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTlsConnectionMethod "handshake" o = TlsConnectionHandshakeMethodInfo
ResolveTlsConnectionMethod "handshakeAsync" o = TlsConnectionHandshakeAsyncMethodInfo
ResolveTlsConnectionMethod "handshakeFinish" o = TlsConnectionHandshakeFinishMethodInfo
ResolveTlsConnectionMethod "hasPending" o = Gio.IOStream.IOStreamHasPendingMethodInfo
ResolveTlsConnectionMethod "isClosed" o = Gio.IOStream.IOStreamIsClosedMethodInfo
ResolveTlsConnectionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTlsConnectionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTlsConnectionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTlsConnectionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTlsConnectionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTlsConnectionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTlsConnectionMethod "spliceAsync" o = Gio.IOStream.IOStreamSpliceAsyncMethodInfo
ResolveTlsConnectionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTlsConnectionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTlsConnectionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTlsConnectionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTlsConnectionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTlsConnectionMethod "getCertificate" o = TlsConnectionGetCertificateMethodInfo
ResolveTlsConnectionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTlsConnectionMethod "getDatabase" o = TlsConnectionGetDatabaseMethodInfo
ResolveTlsConnectionMethod "getInputStream" o = Gio.IOStream.IOStreamGetInputStreamMethodInfo
ResolveTlsConnectionMethod "getInteraction" o = TlsConnectionGetInteractionMethodInfo
ResolveTlsConnectionMethod "getOutputStream" o = Gio.IOStream.IOStreamGetOutputStreamMethodInfo
ResolveTlsConnectionMethod "getPeerCertificate" o = TlsConnectionGetPeerCertificateMethodInfo
ResolveTlsConnectionMethod "getPeerCertificateErrors" o = TlsConnectionGetPeerCertificateErrorsMethodInfo
ResolveTlsConnectionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTlsConnectionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTlsConnectionMethod "getRehandshakeMode" o = TlsConnectionGetRehandshakeModeMethodInfo
ResolveTlsConnectionMethod "getRequireCloseNotify" o = TlsConnectionGetRequireCloseNotifyMethodInfo
ResolveTlsConnectionMethod "getUseSystemCertdb" o = TlsConnectionGetUseSystemCertdbMethodInfo
ResolveTlsConnectionMethod "setCertificate" o = TlsConnectionSetCertificateMethodInfo
ResolveTlsConnectionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTlsConnectionMethod "setDatabase" o = TlsConnectionSetDatabaseMethodInfo
ResolveTlsConnectionMethod "setInteraction" o = TlsConnectionSetInteractionMethodInfo
ResolveTlsConnectionMethod "setPending" o = Gio.IOStream.IOStreamSetPendingMethodInfo
ResolveTlsConnectionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTlsConnectionMethod "setRehandshakeMode" o = TlsConnectionSetRehandshakeModeMethodInfo
ResolveTlsConnectionMethod "setRequireCloseNotify" o = TlsConnectionSetRequireCloseNotifyMethodInfo
ResolveTlsConnectionMethod "setUseSystemCertdb" o = TlsConnectionSetUseSystemCertdbMethodInfo
ResolveTlsConnectionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTlsConnectionMethod t TlsConnection, O.MethodInfo info TlsConnection p) => O.IsLabelProxy t (TlsConnection -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveTlsConnectionMethod t TlsConnection, O.MethodInfo info TlsConnection p) => O.IsLabel t (TlsConnection -> 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
type TlsConnectionAcceptCertificateCallback =
Gio.TlsCertificate.TlsCertificate
-> [Gio.Flags.TlsCertificateFlags]
-> IO Bool
noTlsConnectionAcceptCertificateCallback :: Maybe TlsConnectionAcceptCertificateCallback
noTlsConnectionAcceptCertificateCallback = Nothing
type C_TlsConnectionAcceptCertificateCallback =
Ptr () ->
Ptr Gio.TlsCertificate.TlsCertificate ->
CUInt ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_TlsConnectionAcceptCertificateCallback :: C_TlsConnectionAcceptCertificateCallback -> IO (FunPtr C_TlsConnectionAcceptCertificateCallback)
genClosure_TlsConnectionAcceptCertificate :: TlsConnectionAcceptCertificateCallback -> IO Closure
genClosure_TlsConnectionAcceptCertificate cb = do
let cb' = wrap_TlsConnectionAcceptCertificateCallback cb
mk_TlsConnectionAcceptCertificateCallback cb' >>= newCClosure
wrap_TlsConnectionAcceptCertificateCallback ::
TlsConnectionAcceptCertificateCallback ->
C_TlsConnectionAcceptCertificateCallback
wrap_TlsConnectionAcceptCertificateCallback _cb _ peerCert errors _ = do
peerCert' <- (newObject Gio.TlsCertificate.TlsCertificate) peerCert
let errors' = wordToGFlags errors
result <- _cb peerCert' errors'
let result' = (fromIntegral . fromEnum) result
return result'
onTlsConnectionAcceptCertificate :: (IsTlsConnection a, MonadIO m) => a -> TlsConnectionAcceptCertificateCallback -> m SignalHandlerId
onTlsConnectionAcceptCertificate obj cb = liftIO $ do
let cb' = wrap_TlsConnectionAcceptCertificateCallback cb
cb'' <- mk_TlsConnectionAcceptCertificateCallback cb'
connectSignalFunPtr obj "accept-certificate" cb'' SignalConnectBefore
afterTlsConnectionAcceptCertificate :: (IsTlsConnection a, MonadIO m) => a -> TlsConnectionAcceptCertificateCallback -> m SignalHandlerId
afterTlsConnectionAcceptCertificate obj cb = liftIO $ do
let cb' = wrap_TlsConnectionAcceptCertificateCallback cb
cb'' <- mk_TlsConnectionAcceptCertificateCallback cb'
connectSignalFunPtr obj "accept-certificate" cb'' SignalConnectAfter
getTlsConnectionBaseIoStream :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe Gio.IOStream.IOStream)
getTlsConnectionBaseIoStream obj = liftIO $ getObjectPropertyObject obj "base-io-stream" Gio.IOStream.IOStream
constructTlsConnectionBaseIoStream :: (IsTlsConnection o, Gio.IOStream.IsIOStream a) => a -> IO (GValueConstruct o)
constructTlsConnectionBaseIoStream val = constructObjectPropertyObject "base-io-stream" (Just val)
#if ENABLE_OVERLOADING
data TlsConnectionBaseIoStreamPropertyInfo
instance AttrInfo TlsConnectionBaseIoStreamPropertyInfo where
type AttrAllowedOps TlsConnectionBaseIoStreamPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TlsConnectionBaseIoStreamPropertyInfo = Gio.IOStream.IsIOStream
type AttrBaseTypeConstraint TlsConnectionBaseIoStreamPropertyInfo = IsTlsConnection
type AttrGetType TlsConnectionBaseIoStreamPropertyInfo = (Maybe Gio.IOStream.IOStream)
type AttrLabel TlsConnectionBaseIoStreamPropertyInfo = "base-io-stream"
type AttrOrigin TlsConnectionBaseIoStreamPropertyInfo = TlsConnection
attrGet _ = getTlsConnectionBaseIoStream
attrSet _ = undefined
attrConstruct _ = constructTlsConnectionBaseIoStream
attrClear _ = undefined
#endif
getTlsConnectionCertificate :: (MonadIO m, IsTlsConnection o) => o -> m Gio.TlsCertificate.TlsCertificate
getTlsConnectionCertificate obj = liftIO $ checkUnexpectedNothing "getTlsConnectionCertificate" $ getObjectPropertyObject obj "certificate" Gio.TlsCertificate.TlsCertificate
setTlsConnectionCertificate :: (MonadIO m, IsTlsConnection o, Gio.TlsCertificate.IsTlsCertificate a) => o -> a -> m ()
setTlsConnectionCertificate obj val = liftIO $ setObjectPropertyObject obj "certificate" (Just val)
constructTlsConnectionCertificate :: (IsTlsConnection o, Gio.TlsCertificate.IsTlsCertificate a) => a -> IO (GValueConstruct o)
constructTlsConnectionCertificate val = constructObjectPropertyObject "certificate" (Just val)
#if ENABLE_OVERLOADING
data TlsConnectionCertificatePropertyInfo
instance AttrInfo TlsConnectionCertificatePropertyInfo where
type AttrAllowedOps TlsConnectionCertificatePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint TlsConnectionCertificatePropertyInfo = Gio.TlsCertificate.IsTlsCertificate
type AttrBaseTypeConstraint TlsConnectionCertificatePropertyInfo = IsTlsConnection
type AttrGetType TlsConnectionCertificatePropertyInfo = Gio.TlsCertificate.TlsCertificate
type AttrLabel TlsConnectionCertificatePropertyInfo = "certificate"
type AttrOrigin TlsConnectionCertificatePropertyInfo = TlsConnection
attrGet _ = getTlsConnectionCertificate
attrSet _ = setTlsConnectionCertificate
attrConstruct _ = constructTlsConnectionCertificate
attrClear _ = undefined
#endif
getTlsConnectionDatabase :: (MonadIO m, IsTlsConnection o) => o -> m Gio.TlsDatabase.TlsDatabase
getTlsConnectionDatabase obj = liftIO $ checkUnexpectedNothing "getTlsConnectionDatabase" $ getObjectPropertyObject obj "database" Gio.TlsDatabase.TlsDatabase
setTlsConnectionDatabase :: (MonadIO m, IsTlsConnection o, Gio.TlsDatabase.IsTlsDatabase a) => o -> a -> m ()
setTlsConnectionDatabase obj val = liftIO $ setObjectPropertyObject obj "database" (Just val)
constructTlsConnectionDatabase :: (IsTlsConnection o, Gio.TlsDatabase.IsTlsDatabase a) => a -> IO (GValueConstruct o)
constructTlsConnectionDatabase val = constructObjectPropertyObject "database" (Just val)
#if ENABLE_OVERLOADING
data TlsConnectionDatabasePropertyInfo
instance AttrInfo TlsConnectionDatabasePropertyInfo where
type AttrAllowedOps TlsConnectionDatabasePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint TlsConnectionDatabasePropertyInfo = Gio.TlsDatabase.IsTlsDatabase
type AttrBaseTypeConstraint TlsConnectionDatabasePropertyInfo = IsTlsConnection
type AttrGetType TlsConnectionDatabasePropertyInfo = Gio.TlsDatabase.TlsDatabase
type AttrLabel TlsConnectionDatabasePropertyInfo = "database"
type AttrOrigin TlsConnectionDatabasePropertyInfo = TlsConnection
attrGet _ = getTlsConnectionDatabase
attrSet _ = setTlsConnectionDatabase
attrConstruct _ = constructTlsConnectionDatabase
attrClear _ = undefined
#endif
getTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o) => o -> m Gio.TlsInteraction.TlsInteraction
getTlsConnectionInteraction obj = liftIO $ checkUnexpectedNothing "getTlsConnectionInteraction" $ getObjectPropertyObject obj "interaction" Gio.TlsInteraction.TlsInteraction
setTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o, Gio.TlsInteraction.IsTlsInteraction a) => o -> a -> m ()
setTlsConnectionInteraction obj val = liftIO $ setObjectPropertyObject obj "interaction" (Just val)
constructTlsConnectionInteraction :: (IsTlsConnection o, Gio.TlsInteraction.IsTlsInteraction a) => a -> IO (GValueConstruct o)
constructTlsConnectionInteraction val = constructObjectPropertyObject "interaction" (Just val)
clearTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o) => o -> m ()
clearTlsConnectionInteraction obj = liftIO $ setObjectPropertyObject obj "interaction" (Nothing :: Maybe Gio.TlsInteraction.TlsInteraction)
#if ENABLE_OVERLOADING
data TlsConnectionInteractionPropertyInfo
instance AttrInfo TlsConnectionInteractionPropertyInfo where
type AttrAllowedOps TlsConnectionInteractionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TlsConnectionInteractionPropertyInfo = Gio.TlsInteraction.IsTlsInteraction
type AttrBaseTypeConstraint TlsConnectionInteractionPropertyInfo = IsTlsConnection
type AttrGetType TlsConnectionInteractionPropertyInfo = Gio.TlsInteraction.TlsInteraction
type AttrLabel TlsConnectionInteractionPropertyInfo = "interaction"
type AttrOrigin TlsConnectionInteractionPropertyInfo = TlsConnection
attrGet _ = getTlsConnectionInteraction
attrSet _ = setTlsConnectionInteraction
attrConstruct _ = constructTlsConnectionInteraction
attrClear _ = clearTlsConnectionInteraction
#endif
getTlsConnectionPeerCertificate :: (MonadIO m, IsTlsConnection o) => o -> m Gio.TlsCertificate.TlsCertificate
getTlsConnectionPeerCertificate obj = liftIO $ checkUnexpectedNothing "getTlsConnectionPeerCertificate" $ getObjectPropertyObject obj "peer-certificate" Gio.TlsCertificate.TlsCertificate
#if ENABLE_OVERLOADING
data TlsConnectionPeerCertificatePropertyInfo
instance AttrInfo TlsConnectionPeerCertificatePropertyInfo where
type AttrAllowedOps TlsConnectionPeerCertificatePropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TlsConnectionPeerCertificatePropertyInfo = (~) ()
type AttrBaseTypeConstraint TlsConnectionPeerCertificatePropertyInfo = IsTlsConnection
type AttrGetType TlsConnectionPeerCertificatePropertyInfo = Gio.TlsCertificate.TlsCertificate
type AttrLabel TlsConnectionPeerCertificatePropertyInfo = "peer-certificate"
type AttrOrigin TlsConnectionPeerCertificatePropertyInfo = TlsConnection
attrGet _ = getTlsConnectionPeerCertificate
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getTlsConnectionPeerCertificateErrors :: (MonadIO m, IsTlsConnection o) => o -> m [Gio.Flags.TlsCertificateFlags]
getTlsConnectionPeerCertificateErrors obj = liftIO $ getObjectPropertyFlags obj "peer-certificate-errors"
#if ENABLE_OVERLOADING
data TlsConnectionPeerCertificateErrorsPropertyInfo
instance AttrInfo TlsConnectionPeerCertificateErrorsPropertyInfo where
type AttrAllowedOps TlsConnectionPeerCertificateErrorsPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint TlsConnectionPeerCertificateErrorsPropertyInfo = (~) ()
type AttrBaseTypeConstraint TlsConnectionPeerCertificateErrorsPropertyInfo = IsTlsConnection
type AttrGetType TlsConnectionPeerCertificateErrorsPropertyInfo = [Gio.Flags.TlsCertificateFlags]
type AttrLabel TlsConnectionPeerCertificateErrorsPropertyInfo = "peer-certificate-errors"
type AttrOrigin TlsConnectionPeerCertificateErrorsPropertyInfo = TlsConnection
attrGet _ = getTlsConnectionPeerCertificateErrors
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getTlsConnectionRehandshakeMode :: (MonadIO m, IsTlsConnection o) => o -> m Gio.Enums.TlsRehandshakeMode
getTlsConnectionRehandshakeMode obj = liftIO $ getObjectPropertyEnum obj "rehandshake-mode"
setTlsConnectionRehandshakeMode :: (MonadIO m, IsTlsConnection o) => o -> Gio.Enums.TlsRehandshakeMode -> m ()
setTlsConnectionRehandshakeMode obj val = liftIO $ setObjectPropertyEnum obj "rehandshake-mode" val
constructTlsConnectionRehandshakeMode :: (IsTlsConnection o) => Gio.Enums.TlsRehandshakeMode -> IO (GValueConstruct o)
constructTlsConnectionRehandshakeMode val = constructObjectPropertyEnum "rehandshake-mode" val
#if ENABLE_OVERLOADING
data TlsConnectionRehandshakeModePropertyInfo
instance AttrInfo TlsConnectionRehandshakeModePropertyInfo where
type AttrAllowedOps TlsConnectionRehandshakeModePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint TlsConnectionRehandshakeModePropertyInfo = (~) Gio.Enums.TlsRehandshakeMode
type AttrBaseTypeConstraint TlsConnectionRehandshakeModePropertyInfo = IsTlsConnection
type AttrGetType TlsConnectionRehandshakeModePropertyInfo = Gio.Enums.TlsRehandshakeMode
type AttrLabel TlsConnectionRehandshakeModePropertyInfo = "rehandshake-mode"
type AttrOrigin TlsConnectionRehandshakeModePropertyInfo = TlsConnection
attrGet _ = getTlsConnectionRehandshakeMode
attrSet _ = setTlsConnectionRehandshakeMode
attrConstruct _ = constructTlsConnectionRehandshakeMode
attrClear _ = undefined
#endif
getTlsConnectionRequireCloseNotify :: (MonadIO m, IsTlsConnection o) => o -> m Bool
getTlsConnectionRequireCloseNotify obj = liftIO $ getObjectPropertyBool obj "require-close-notify"
setTlsConnectionRequireCloseNotify :: (MonadIO m, IsTlsConnection o) => o -> Bool -> m ()
setTlsConnectionRequireCloseNotify obj val = liftIO $ setObjectPropertyBool obj "require-close-notify" val
constructTlsConnectionRequireCloseNotify :: (IsTlsConnection o) => Bool -> IO (GValueConstruct o)
constructTlsConnectionRequireCloseNotify val = constructObjectPropertyBool "require-close-notify" val
#if ENABLE_OVERLOADING
data TlsConnectionRequireCloseNotifyPropertyInfo
instance AttrInfo TlsConnectionRequireCloseNotifyPropertyInfo where
type AttrAllowedOps TlsConnectionRequireCloseNotifyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint TlsConnectionRequireCloseNotifyPropertyInfo = (~) Bool
type AttrBaseTypeConstraint TlsConnectionRequireCloseNotifyPropertyInfo = IsTlsConnection
type AttrGetType TlsConnectionRequireCloseNotifyPropertyInfo = Bool
type AttrLabel TlsConnectionRequireCloseNotifyPropertyInfo = "require-close-notify"
type AttrOrigin TlsConnectionRequireCloseNotifyPropertyInfo = TlsConnection
attrGet _ = getTlsConnectionRequireCloseNotify
attrSet _ = setTlsConnectionRequireCloseNotify
attrConstruct _ = constructTlsConnectionRequireCloseNotify
attrClear _ = undefined
#endif
getTlsConnectionUseSystemCertdb :: (MonadIO m, IsTlsConnection o) => o -> m Bool
getTlsConnectionUseSystemCertdb obj = liftIO $ getObjectPropertyBool obj "use-system-certdb"
setTlsConnectionUseSystemCertdb :: (MonadIO m, IsTlsConnection o) => o -> Bool -> m ()
setTlsConnectionUseSystemCertdb obj val = liftIO $ setObjectPropertyBool obj "use-system-certdb" val
constructTlsConnectionUseSystemCertdb :: (IsTlsConnection o) => Bool -> IO (GValueConstruct o)
constructTlsConnectionUseSystemCertdb val = constructObjectPropertyBool "use-system-certdb" val
#if ENABLE_OVERLOADING
data TlsConnectionUseSystemCertdbPropertyInfo
instance AttrInfo TlsConnectionUseSystemCertdbPropertyInfo where
type AttrAllowedOps TlsConnectionUseSystemCertdbPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint TlsConnectionUseSystemCertdbPropertyInfo = (~) Bool
type AttrBaseTypeConstraint TlsConnectionUseSystemCertdbPropertyInfo = IsTlsConnection
type AttrGetType TlsConnectionUseSystemCertdbPropertyInfo = Bool
type AttrLabel TlsConnectionUseSystemCertdbPropertyInfo = "use-system-certdb"
type AttrOrigin TlsConnectionUseSystemCertdbPropertyInfo = TlsConnection
attrGet _ = getTlsConnectionUseSystemCertdb
attrSet _ = setTlsConnectionUseSystemCertdb
attrConstruct _ = constructTlsConnectionUseSystemCertdb
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList TlsConnection
type instance O.AttributeList TlsConnection = TlsConnectionAttributeList
type TlsConnectionAttributeList = ('[ '("baseIoStream", TlsConnectionBaseIoStreamPropertyInfo), '("certificate", TlsConnectionCertificatePropertyInfo), '("closed", Gio.IOStream.IOStreamClosedPropertyInfo), '("database", TlsConnectionDatabasePropertyInfo), '("inputStream", Gio.IOStream.IOStreamInputStreamPropertyInfo), '("interaction", TlsConnectionInteractionPropertyInfo), '("outputStream", Gio.IOStream.IOStreamOutputStreamPropertyInfo), '("peerCertificate", TlsConnectionPeerCertificatePropertyInfo), '("peerCertificateErrors", TlsConnectionPeerCertificateErrorsPropertyInfo), '("rehandshakeMode", TlsConnectionRehandshakeModePropertyInfo), '("requireCloseNotify", TlsConnectionRequireCloseNotifyPropertyInfo), '("useSystemCertdb", TlsConnectionUseSystemCertdbPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
tlsConnectionBaseIoStream :: AttrLabelProxy "baseIoStream"
tlsConnectionBaseIoStream = AttrLabelProxy
tlsConnectionCertificate :: AttrLabelProxy "certificate"
tlsConnectionCertificate = AttrLabelProxy
tlsConnectionDatabase :: AttrLabelProxy "database"
tlsConnectionDatabase = AttrLabelProxy
tlsConnectionInteraction :: AttrLabelProxy "interaction"
tlsConnectionInteraction = AttrLabelProxy
tlsConnectionPeerCertificate :: AttrLabelProxy "peerCertificate"
tlsConnectionPeerCertificate = AttrLabelProxy
tlsConnectionPeerCertificateErrors :: AttrLabelProxy "peerCertificateErrors"
tlsConnectionPeerCertificateErrors = AttrLabelProxy
tlsConnectionRehandshakeMode :: AttrLabelProxy "rehandshakeMode"
tlsConnectionRehandshakeMode = AttrLabelProxy
tlsConnectionRequireCloseNotify :: AttrLabelProxy "requireCloseNotify"
tlsConnectionRequireCloseNotify = AttrLabelProxy
tlsConnectionUseSystemCertdb :: AttrLabelProxy "useSystemCertdb"
tlsConnectionUseSystemCertdb = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
data TlsConnectionAcceptCertificateSignalInfo
instance SignalInfo TlsConnectionAcceptCertificateSignalInfo where
type HaskellCallbackType TlsConnectionAcceptCertificateSignalInfo = TlsConnectionAcceptCertificateCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_TlsConnectionAcceptCertificateCallback cb
cb'' <- mk_TlsConnectionAcceptCertificateCallback cb'
connectSignalFunPtr obj "accept-certificate" cb'' connectMode
type instance O.SignalList TlsConnection = TlsConnectionSignalList
type TlsConnectionSignalList = ('[ '("acceptCertificate", TlsConnectionAcceptCertificateSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_tls_connection_emit_accept_certificate" g_tls_connection_emit_accept_certificate ::
Ptr TlsConnection ->
Ptr Gio.TlsCertificate.TlsCertificate ->
CUInt ->
IO CInt
tlsConnectionEmitAcceptCertificate ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a, Gio.TlsCertificate.IsTlsCertificate b) =>
a
-> b
-> [Gio.Flags.TlsCertificateFlags]
-> m Bool
tlsConnectionEmitAcceptCertificate conn peerCert errors = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
peerCert' <- unsafeManagedPtrCastPtr peerCert
let errors' = gflagsToWord errors
result <- g_tls_connection_emit_accept_certificate conn' peerCert' errors'
let result' = (/= 0) result
touchManagedPtr conn
touchManagedPtr peerCert
return result'
#if ENABLE_OVERLOADING
data TlsConnectionEmitAcceptCertificateMethodInfo
instance (signature ~ (b -> [Gio.Flags.TlsCertificateFlags] -> m Bool), MonadIO m, IsTlsConnection a, Gio.TlsCertificate.IsTlsCertificate b) => O.MethodInfo TlsConnectionEmitAcceptCertificateMethodInfo a signature where
overloadedMethod _ = tlsConnectionEmitAcceptCertificate
#endif
foreign import ccall "g_tls_connection_get_certificate" g_tls_connection_get_certificate ::
Ptr TlsConnection ->
IO (Ptr Gio.TlsCertificate.TlsCertificate)
tlsConnectionGetCertificate ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m Gio.TlsCertificate.TlsCertificate
tlsConnectionGetCertificate conn = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
result <- g_tls_connection_get_certificate conn'
checkUnexpectedReturnNULL "tlsConnectionGetCertificate" result
result' <- (newObject Gio.TlsCertificate.TlsCertificate) result
touchManagedPtr conn
return result'
#if ENABLE_OVERLOADING
data TlsConnectionGetCertificateMethodInfo
instance (signature ~ (m Gio.TlsCertificate.TlsCertificate), MonadIO m, IsTlsConnection a) => O.MethodInfo TlsConnectionGetCertificateMethodInfo a signature where
overloadedMethod _ = tlsConnectionGetCertificate
#endif
foreign import ccall "g_tls_connection_get_database" g_tls_connection_get_database ::
Ptr TlsConnection ->
IO (Ptr Gio.TlsDatabase.TlsDatabase)
tlsConnectionGetDatabase ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m Gio.TlsDatabase.TlsDatabase
tlsConnectionGetDatabase conn = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
result <- g_tls_connection_get_database conn'
checkUnexpectedReturnNULL "tlsConnectionGetDatabase" result
result' <- (newObject Gio.TlsDatabase.TlsDatabase) result
touchManagedPtr conn
return result'
#if ENABLE_OVERLOADING
data TlsConnectionGetDatabaseMethodInfo
instance (signature ~ (m Gio.TlsDatabase.TlsDatabase), MonadIO m, IsTlsConnection a) => O.MethodInfo TlsConnectionGetDatabaseMethodInfo a signature where
overloadedMethod _ = tlsConnectionGetDatabase
#endif
foreign import ccall "g_tls_connection_get_interaction" g_tls_connection_get_interaction ::
Ptr TlsConnection ->
IO (Ptr Gio.TlsInteraction.TlsInteraction)
tlsConnectionGetInteraction ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m Gio.TlsInteraction.TlsInteraction
tlsConnectionGetInteraction conn = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
result <- g_tls_connection_get_interaction conn'
checkUnexpectedReturnNULL "tlsConnectionGetInteraction" result
result' <- (newObject Gio.TlsInteraction.TlsInteraction) result
touchManagedPtr conn
return result'
#if ENABLE_OVERLOADING
data TlsConnectionGetInteractionMethodInfo
instance (signature ~ (m Gio.TlsInteraction.TlsInteraction), MonadIO m, IsTlsConnection a) => O.MethodInfo TlsConnectionGetInteractionMethodInfo a signature where
overloadedMethod _ = tlsConnectionGetInteraction
#endif
foreign import ccall "g_tls_connection_get_peer_certificate" g_tls_connection_get_peer_certificate ::
Ptr TlsConnection ->
IO (Ptr Gio.TlsCertificate.TlsCertificate)
tlsConnectionGetPeerCertificate ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m Gio.TlsCertificate.TlsCertificate
tlsConnectionGetPeerCertificate conn = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
result <- g_tls_connection_get_peer_certificate conn'
checkUnexpectedReturnNULL "tlsConnectionGetPeerCertificate" result
result' <- (newObject Gio.TlsCertificate.TlsCertificate) result
touchManagedPtr conn
return result'
#if ENABLE_OVERLOADING
data TlsConnectionGetPeerCertificateMethodInfo
instance (signature ~ (m Gio.TlsCertificate.TlsCertificate), MonadIO m, IsTlsConnection a) => O.MethodInfo TlsConnectionGetPeerCertificateMethodInfo a signature where
overloadedMethod _ = tlsConnectionGetPeerCertificate
#endif
foreign import ccall "g_tls_connection_get_peer_certificate_errors" g_tls_connection_get_peer_certificate_errors ::
Ptr TlsConnection ->
IO CUInt
tlsConnectionGetPeerCertificateErrors ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m [Gio.Flags.TlsCertificateFlags]
tlsConnectionGetPeerCertificateErrors conn = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
result <- g_tls_connection_get_peer_certificate_errors conn'
let result' = wordToGFlags result
touchManagedPtr conn
return result'
#if ENABLE_OVERLOADING
data TlsConnectionGetPeerCertificateErrorsMethodInfo
instance (signature ~ (m [Gio.Flags.TlsCertificateFlags]), MonadIO m, IsTlsConnection a) => O.MethodInfo TlsConnectionGetPeerCertificateErrorsMethodInfo a signature where
overloadedMethod _ = tlsConnectionGetPeerCertificateErrors
#endif
foreign import ccall "g_tls_connection_get_rehandshake_mode" g_tls_connection_get_rehandshake_mode ::
Ptr TlsConnection ->
IO CUInt
tlsConnectionGetRehandshakeMode ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m Gio.Enums.TlsRehandshakeMode
tlsConnectionGetRehandshakeMode conn = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
result <- g_tls_connection_get_rehandshake_mode conn'
let result' = (toEnum . fromIntegral) result
touchManagedPtr conn
return result'
#if ENABLE_OVERLOADING
data TlsConnectionGetRehandshakeModeMethodInfo
instance (signature ~ (m Gio.Enums.TlsRehandshakeMode), MonadIO m, IsTlsConnection a) => O.MethodInfo TlsConnectionGetRehandshakeModeMethodInfo a signature where
overloadedMethod _ = tlsConnectionGetRehandshakeMode
#endif
foreign import ccall "g_tls_connection_get_require_close_notify" g_tls_connection_get_require_close_notify ::
Ptr TlsConnection ->
IO CInt
tlsConnectionGetRequireCloseNotify ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m Bool
tlsConnectionGetRequireCloseNotify conn = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
result <- g_tls_connection_get_require_close_notify conn'
let result' = (/= 0) result
touchManagedPtr conn
return result'
#if ENABLE_OVERLOADING
data TlsConnectionGetRequireCloseNotifyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTlsConnection a) => O.MethodInfo TlsConnectionGetRequireCloseNotifyMethodInfo a signature where
overloadedMethod _ = tlsConnectionGetRequireCloseNotify
#endif
foreign import ccall "g_tls_connection_get_use_system_certdb" g_tls_connection_get_use_system_certdb ::
Ptr TlsConnection ->
IO CInt
{-# DEPRECATED tlsConnectionGetUseSystemCertdb ["(Since version 2.30)","Use 'GI.Gio.Objects.TlsConnection.tlsConnectionGetDatabase' instead"] #-}
tlsConnectionGetUseSystemCertdb ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m Bool
tlsConnectionGetUseSystemCertdb conn = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
result <- g_tls_connection_get_use_system_certdb conn'
let result' = (/= 0) result
touchManagedPtr conn
return result'
#if ENABLE_OVERLOADING
data TlsConnectionGetUseSystemCertdbMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTlsConnection a) => O.MethodInfo TlsConnectionGetUseSystemCertdbMethodInfo a signature where
overloadedMethod _ = tlsConnectionGetUseSystemCertdb
#endif
foreign import ccall "g_tls_connection_handshake" g_tls_connection_handshake ::
Ptr TlsConnection ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
tlsConnectionHandshake ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
tlsConnectionHandshake conn cancellable = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ g_tls_connection_handshake conn' maybeCancellable
touchManagedPtr conn
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data TlsConnectionHandshakeMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsTlsConnection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo TlsConnectionHandshakeMethodInfo a signature where
overloadedMethod _ = tlsConnectionHandshake
#endif
foreign import ccall "g_tls_connection_handshake_async" g_tls_connection_handshake_async ::
Ptr TlsConnection ->
Int32 ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
tlsConnectionHandshakeAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a, Gio.Cancellable.IsCancellable b) =>
a
-> Int32
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
tlsConnectionHandshakeAsync conn ioPriority cancellable callback = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))
poke ptrcallback jCallback'
return jCallback'
let userData = nullPtr
g_tls_connection_handshake_async conn' ioPriority maybeCancellable maybeCallback userData
touchManagedPtr conn
whenJust cancellable touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data TlsConnectionHandshakeAsyncMethodInfo
instance (signature ~ (Int32 -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsTlsConnection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo TlsConnectionHandshakeAsyncMethodInfo a signature where
overloadedMethod _ = tlsConnectionHandshakeAsync
#endif
foreign import ccall "g_tls_connection_handshake_finish" g_tls_connection_handshake_finish ::
Ptr TlsConnection ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
tlsConnectionHandshakeFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
tlsConnectionHandshakeFinish conn result_ = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
result_' <- unsafeManagedPtrCastPtr result_
onException (do
_ <- propagateGError $ g_tls_connection_handshake_finish conn' result_'
touchManagedPtr conn
touchManagedPtr result_
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data TlsConnectionHandshakeFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsTlsConnection a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo TlsConnectionHandshakeFinishMethodInfo a signature where
overloadedMethod _ = tlsConnectionHandshakeFinish
#endif
foreign import ccall "g_tls_connection_set_certificate" g_tls_connection_set_certificate ::
Ptr TlsConnection ->
Ptr Gio.TlsCertificate.TlsCertificate ->
IO ()
tlsConnectionSetCertificate ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a, Gio.TlsCertificate.IsTlsCertificate b) =>
a
-> b
-> m ()
tlsConnectionSetCertificate conn certificate = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
certificate' <- unsafeManagedPtrCastPtr certificate
g_tls_connection_set_certificate conn' certificate'
touchManagedPtr conn
touchManagedPtr certificate
return ()
#if ENABLE_OVERLOADING
data TlsConnectionSetCertificateMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsTlsConnection a, Gio.TlsCertificate.IsTlsCertificate b) => O.MethodInfo TlsConnectionSetCertificateMethodInfo a signature where
overloadedMethod _ = tlsConnectionSetCertificate
#endif
foreign import ccall "g_tls_connection_set_database" g_tls_connection_set_database ::
Ptr TlsConnection ->
Ptr Gio.TlsDatabase.TlsDatabase ->
IO ()
tlsConnectionSetDatabase ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a, Gio.TlsDatabase.IsTlsDatabase b) =>
a
-> b
-> m ()
tlsConnectionSetDatabase conn database = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
database' <- unsafeManagedPtrCastPtr database
g_tls_connection_set_database conn' database'
touchManagedPtr conn
touchManagedPtr database
return ()
#if ENABLE_OVERLOADING
data TlsConnectionSetDatabaseMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsTlsConnection a, Gio.TlsDatabase.IsTlsDatabase b) => O.MethodInfo TlsConnectionSetDatabaseMethodInfo a signature where
overloadedMethod _ = tlsConnectionSetDatabase
#endif
foreign import ccall "g_tls_connection_set_interaction" g_tls_connection_set_interaction ::
Ptr TlsConnection ->
Ptr Gio.TlsInteraction.TlsInteraction ->
IO ()
tlsConnectionSetInteraction ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a, Gio.TlsInteraction.IsTlsInteraction b) =>
a
-> Maybe (b)
-> m ()
tlsConnectionSetInteraction conn interaction = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
maybeInteraction <- case interaction of
Nothing -> return nullPtr
Just jInteraction -> do
jInteraction' <- unsafeManagedPtrCastPtr jInteraction
return jInteraction'
g_tls_connection_set_interaction conn' maybeInteraction
touchManagedPtr conn
whenJust interaction touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data TlsConnectionSetInteractionMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsTlsConnection a, Gio.TlsInteraction.IsTlsInteraction b) => O.MethodInfo TlsConnectionSetInteractionMethodInfo a signature where
overloadedMethod _ = tlsConnectionSetInteraction
#endif
foreign import ccall "g_tls_connection_set_rehandshake_mode" g_tls_connection_set_rehandshake_mode ::
Ptr TlsConnection ->
CUInt ->
IO ()
tlsConnectionSetRehandshakeMode ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> Gio.Enums.TlsRehandshakeMode
-> m ()
tlsConnectionSetRehandshakeMode conn mode = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
let mode' = (fromIntegral . fromEnum) mode
g_tls_connection_set_rehandshake_mode conn' mode'
touchManagedPtr conn
return ()
#if ENABLE_OVERLOADING
data TlsConnectionSetRehandshakeModeMethodInfo
instance (signature ~ (Gio.Enums.TlsRehandshakeMode -> m ()), MonadIO m, IsTlsConnection a) => O.MethodInfo TlsConnectionSetRehandshakeModeMethodInfo a signature where
overloadedMethod _ = tlsConnectionSetRehandshakeMode
#endif
foreign import ccall "g_tls_connection_set_require_close_notify" g_tls_connection_set_require_close_notify ::
Ptr TlsConnection ->
CInt ->
IO ()
tlsConnectionSetRequireCloseNotify ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> Bool
-> m ()
tlsConnectionSetRequireCloseNotify conn requireCloseNotify = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
let requireCloseNotify' = (fromIntegral . fromEnum) requireCloseNotify
g_tls_connection_set_require_close_notify conn' requireCloseNotify'
touchManagedPtr conn
return ()
#if ENABLE_OVERLOADING
data TlsConnectionSetRequireCloseNotifyMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsTlsConnection a) => O.MethodInfo TlsConnectionSetRequireCloseNotifyMethodInfo a signature where
overloadedMethod _ = tlsConnectionSetRequireCloseNotify
#endif
foreign import ccall "g_tls_connection_set_use_system_certdb" g_tls_connection_set_use_system_certdb ::
Ptr TlsConnection ->
CInt ->
IO ()
{-# DEPRECATED tlsConnectionSetUseSystemCertdb ["(Since version 2.30)","Use 'GI.Gio.Objects.TlsConnection.tlsConnectionSetDatabase' instead"] #-}
tlsConnectionSetUseSystemCertdb ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> Bool
-> m ()
tlsConnectionSetUseSystemCertdb conn useSystemCertdb = liftIO $ do
conn' <- unsafeManagedPtrCastPtr conn
let useSystemCertdb' = (fromIntegral . fromEnum) useSystemCertdb
g_tls_connection_set_use_system_certdb conn' useSystemCertdb'
touchManagedPtr conn
return ()
#if ENABLE_OVERLOADING
data TlsConnectionSetUseSystemCertdbMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsTlsConnection a) => O.MethodInfo TlsConnectionSetUseSystemCertdbMethodInfo a signature where
overloadedMethod _ = tlsConnectionSetUseSystemCertdb
#endif