{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.TlsConnection
(
TlsConnection(..) ,
IsTlsConnection ,
toTlsConnection ,
#if defined(ENABLE_OVERLOADING)
ResolveTlsConnectionMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionEmitAcceptCertificateMethodInfo,
#endif
tlsConnectionEmitAcceptCertificate ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetCertificateMethodInfo ,
#endif
tlsConnectionGetCertificate ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetChannelBindingDataMethodInfo,
#endif
tlsConnectionGetChannelBindingData ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetCiphersuiteNameMethodInfo,
#endif
tlsConnectionGetCiphersuiteName ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetDatabaseMethodInfo ,
#endif
tlsConnectionGetDatabase ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetInteractionMethodInfo ,
#endif
tlsConnectionGetInteraction ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetNegotiatedProtocolMethodInfo,
#endif
tlsConnectionGetNegotiatedProtocol ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetPeerCertificateMethodInfo,
#endif
tlsConnectionGetPeerCertificate ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetPeerCertificateErrorsMethodInfo,
#endif
tlsConnectionGetPeerCertificateErrors ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetProtocolVersionMethodInfo,
#endif
tlsConnectionGetProtocolVersion ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetRehandshakeModeMethodInfo,
#endif
tlsConnectionGetRehandshakeMode ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetRequireCloseNotifyMethodInfo,
#endif
tlsConnectionGetRequireCloseNotify ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionGetUseSystemCertdbMethodInfo,
#endif
tlsConnectionGetUseSystemCertdb ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionHandshakeMethodInfo ,
#endif
tlsConnectionHandshake ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionHandshakeAsyncMethodInfo ,
#endif
tlsConnectionHandshakeAsync ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionHandshakeFinishMethodInfo ,
#endif
tlsConnectionHandshakeFinish ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionSetAdvertisedProtocolsMethodInfo,
#endif
tlsConnectionSetAdvertisedProtocols ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionSetCertificateMethodInfo ,
#endif
tlsConnectionSetCertificate ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionSetDatabaseMethodInfo ,
#endif
tlsConnectionSetDatabase ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionSetInteractionMethodInfo ,
#endif
tlsConnectionSetInteraction ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionSetRehandshakeModeMethodInfo,
#endif
tlsConnectionSetRehandshakeMode ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionSetRequireCloseNotifyMethodInfo,
#endif
tlsConnectionSetRequireCloseNotify ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionSetUseSystemCertdbMethodInfo,
#endif
tlsConnectionSetUseSystemCertdb ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionAdvertisedProtocolsPropertyInfo,
#endif
clearTlsConnectionAdvertisedProtocols ,
constructTlsConnectionAdvertisedProtocols,
getTlsConnectionAdvertisedProtocols ,
setTlsConnectionAdvertisedProtocols ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionAdvertisedProtocols ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionBaseIoStreamPropertyInfo ,
#endif
constructTlsConnectionBaseIoStream ,
getTlsConnectionBaseIoStream ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionBaseIoStream ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionCertificatePropertyInfo ,
#endif
constructTlsConnectionCertificate ,
getTlsConnectionCertificate ,
setTlsConnectionCertificate ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionCertificate ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionCiphersuiteNamePropertyInfo,
#endif
getTlsConnectionCiphersuiteName ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionCiphersuiteName ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionDatabasePropertyInfo ,
#endif
clearTlsConnectionDatabase ,
constructTlsConnectionDatabase ,
getTlsConnectionDatabase ,
setTlsConnectionDatabase ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionDatabase ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionInteractionPropertyInfo ,
#endif
clearTlsConnectionInteraction ,
constructTlsConnectionInteraction ,
getTlsConnectionInteraction ,
setTlsConnectionInteraction ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionInteraction ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionNegotiatedProtocolPropertyInfo,
#endif
getTlsConnectionNegotiatedProtocol ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionNegotiatedProtocol ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionPeerCertificatePropertyInfo,
#endif
getTlsConnectionPeerCertificate ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionPeerCertificate ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionPeerCertificateErrorsPropertyInfo,
#endif
getTlsConnectionPeerCertificateErrors ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionPeerCertificateErrors ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionProtocolVersionPropertyInfo,
#endif
getTlsConnectionProtocolVersion ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionProtocolVersion ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionRehandshakeModePropertyInfo,
#endif
constructTlsConnectionRehandshakeMode ,
getTlsConnectionRehandshakeMode ,
setTlsConnectionRehandshakeMode ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionRehandshakeMode ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionRequireCloseNotifyPropertyInfo,
#endif
constructTlsConnectionRequireCloseNotify,
getTlsConnectionRequireCloseNotify ,
setTlsConnectionRequireCloseNotify ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionRequireCloseNotify ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsConnectionUseSystemCertdbPropertyInfo,
#endif
constructTlsConnectionUseSystemCertdb ,
getTlsConnectionUseSystemCertdb ,
setTlsConnectionUseSystemCertdb ,
#if defined(ENABLE_OVERLOADING)
tlsConnectionUseSystemCertdb ,
#endif
TlsConnectionAcceptCertificateCallback ,
#if defined(ENABLE_OVERLOADING)
TlsConnectionAcceptCertificateSignalInfo,
#endif
afterTlsConnectionAcceptCertificate ,
onTlsConnectionAcceptCertificate ,
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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 Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.DateTime as GLib.DateTime
import qualified GI.GLib.Structs.PollFD as GLib.PollFD
import qualified GI.GLib.Structs.Source as GLib.Source
import qualified GI.GObject.Callbacks as GObject.Callbacks
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.Interfaces.SocketConnectable as Gio.SocketConnectable
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.InetAddress as Gio.InetAddress
import {-# SOURCE #-} qualified GI.Gio.Objects.InputStream as Gio.InputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.SocketAddress as Gio.SocketAddress
import {-# SOURCE #-} qualified GI.Gio.Objects.SocketAddressEnumerator as Gio.SocketAddressEnumerator
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
import {-# SOURCE #-} qualified GI.Gio.Objects.TlsPassword as Gio.TlsPassword
import {-# SOURCE #-} qualified GI.Gio.Structs.OutputVector as Gio.OutputVector
#else
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
#endif
newtype TlsConnection = TlsConnection (SP.ManagedPtr TlsConnection)
deriving (TlsConnection -> TlsConnection -> Bool
(TlsConnection -> TlsConnection -> Bool)
-> (TlsConnection -> TlsConnection -> Bool) -> Eq TlsConnection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TlsConnection -> TlsConnection -> Bool
== :: TlsConnection -> TlsConnection -> Bool
$c/= :: TlsConnection -> TlsConnection -> Bool
/= :: TlsConnection -> TlsConnection -> Bool
Eq)
instance SP.ManagedPtrNewtype TlsConnection where
toManagedPtr :: TlsConnection -> ManagedPtr TlsConnection
toManagedPtr (TlsConnection ManagedPtr TlsConnection
p) = ManagedPtr TlsConnection
p
foreign import ccall "g_tls_connection_get_type"
c_g_tls_connection_get_type :: IO B.Types.GType
instance B.Types.TypedObject TlsConnection where
glibType :: IO GType
glibType = IO GType
c_g_tls_connection_get_type
instance B.Types.GObject TlsConnection
class (SP.GObject o, O.IsDescendantOf TlsConnection o) => IsTlsConnection o
instance (SP.GObject o, O.IsDescendantOf TlsConnection o) => IsTlsConnection o
instance O.HasParentTypes TlsConnection
type instance O.ParentTypes TlsConnection = '[Gio.IOStream.IOStream, GObject.Object.Object]
toTlsConnection :: (MIO.MonadIO m, IsTlsConnection o) => o -> m TlsConnection
toTlsConnection :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m TlsConnection
toTlsConnection = IO TlsConnection -> m TlsConnection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO TlsConnection -> m TlsConnection)
-> (o -> IO TlsConnection) -> o -> m TlsConnection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr TlsConnection -> TlsConnection)
-> o -> IO TlsConnection
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr TlsConnection -> TlsConnection
TlsConnection
instance B.GValue.IsGValue (Maybe TlsConnection) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_tls_connection_get_type
gvalueSet_ :: Ptr GValue -> Maybe TlsConnection -> IO ()
gvalueSet_ Ptr GValue
gv Maybe TlsConnection
P.Nothing = Ptr GValue -> Ptr TlsConnection -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr TlsConnection
forall a. Ptr a
FP.nullPtr :: FP.Ptr TlsConnection)
gvalueSet_ Ptr GValue
gv (P.Just TlsConnection
obj) = TlsConnection -> (Ptr TlsConnection -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TlsConnection
obj (Ptr GValue -> Ptr TlsConnection -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe TlsConnection)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr TlsConnection)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr TlsConnection)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject TlsConnection ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveTlsConnectionMethod (t :: Symbol) (o :: DK.Type) :: DK.Type 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 "getChannelBindingData" o = TlsConnectionGetChannelBindingDataMethodInfo
ResolveTlsConnectionMethod "getCiphersuiteName" o = TlsConnectionGetCiphersuiteNameMethodInfo
ResolveTlsConnectionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTlsConnectionMethod "getDatabase" o = TlsConnectionGetDatabaseMethodInfo
ResolveTlsConnectionMethod "getInputStream" o = Gio.IOStream.IOStreamGetInputStreamMethodInfo
ResolveTlsConnectionMethod "getInteraction" o = TlsConnectionGetInteractionMethodInfo
ResolveTlsConnectionMethod "getNegotiatedProtocol" o = TlsConnectionGetNegotiatedProtocolMethodInfo
ResolveTlsConnectionMethod "getOutputStream" o = Gio.IOStream.IOStreamGetOutputStreamMethodInfo
ResolveTlsConnectionMethod "getPeerCertificate" o = TlsConnectionGetPeerCertificateMethodInfo
ResolveTlsConnectionMethod "getPeerCertificateErrors" o = TlsConnectionGetPeerCertificateErrorsMethodInfo
ResolveTlsConnectionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTlsConnectionMethod "getProtocolVersion" o = TlsConnectionGetProtocolVersionMethodInfo
ResolveTlsConnectionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTlsConnectionMethod "getRehandshakeMode" o = TlsConnectionGetRehandshakeModeMethodInfo
ResolveTlsConnectionMethod "getRequireCloseNotify" o = TlsConnectionGetRequireCloseNotifyMethodInfo
ResolveTlsConnectionMethod "getUseSystemCertdb" o = TlsConnectionGetUseSystemCertdbMethodInfo
ResolveTlsConnectionMethod "setAdvertisedProtocols" o = TlsConnectionSetAdvertisedProtocolsMethodInfo
ResolveTlsConnectionMethod "setCertificate" o = TlsConnectionSetCertificateMethodInfo
ResolveTlsConnectionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTlsConnectionMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
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.OverloadedMethod info TlsConnection p) => OL.IsLabel t (TlsConnection -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel :: TlsConnection -> p
fromLabel = forall {k} (i :: k) o s. OverloadedMethod i o s => o -> s
forall i o s. OverloadedMethod i o s => o -> s
O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveTlsConnectionMethod t TlsConnection, O.OverloadedMethod info TlsConnection p, R.HasField t TlsConnection p) => R.HasField t TlsConnection p where
getField :: TlsConnection -> p
getField = forall {k} (i :: k) o s. OverloadedMethod i o s => o -> s
forall i o s. OverloadedMethod i o s => o -> s
O.overloadedMethod @info
#endif
instance (info ~ ResolveTlsConnectionMethod t TlsConnection, O.OverloadedMethodInfo info TlsConnection) => OL.IsLabel t (O.MethodProxy info TlsConnection) where
#if MIN_VERSION_base(4,10,0)
fromLabel :: MethodProxy info TlsConnection
fromLabel = MethodProxy info TlsConnection
forall info obj. MethodProxy info obj
O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type TlsConnectionAcceptCertificateCallback =
Gio.TlsCertificate.TlsCertificate
-> [Gio.Flags.TlsCertificateFlags]
-> IO Bool
type C_TlsConnectionAcceptCertificateCallback =
Ptr TlsConnection ->
Ptr Gio.TlsCertificate.TlsCertificate ->
CUInt ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_TlsConnectionAcceptCertificateCallback :: C_TlsConnectionAcceptCertificateCallback -> IO (FunPtr C_TlsConnectionAcceptCertificateCallback)
wrap_TlsConnectionAcceptCertificateCallback ::
GObject a => (a -> TlsConnectionAcceptCertificateCallback) ->
C_TlsConnectionAcceptCertificateCallback
wrap_TlsConnectionAcceptCertificateCallback :: forall a.
GObject a =>
(a -> TlsConnectionAcceptCertificateCallback)
-> C_TlsConnectionAcceptCertificateCallback
wrap_TlsConnectionAcceptCertificateCallback a -> TlsConnectionAcceptCertificateCallback
gi'cb Ptr TlsConnection
gi'selfPtr Ptr TlsCertificate
peerCert CUInt
errors Ptr ()
_ = do
peerCert' <- ((ManagedPtr TlsCertificate -> TlsCertificate)
-> Ptr TlsCertificate -> IO TlsCertificate
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TlsCertificate -> TlsCertificate
Gio.TlsCertificate.TlsCertificate) Ptr TlsCertificate
peerCert
let errors' = CUInt -> [TlsCertificateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
errors
result <- B.ManagedPtr.withNewObject gi'selfPtr $ \TlsConnection
gi'self -> a -> TlsConnectionAcceptCertificateCallback
gi'cb (TlsConnection -> a
forall a b. Coercible a b => a -> b
Coerce.coerce TlsConnection
gi'self) TlsCertificate
peerCert' [TlsCertificateFlags]
errors'
let result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
result
return result'
onTlsConnectionAcceptCertificate :: (IsTlsConnection a, MonadIO m) => a -> ((?self :: a) => TlsConnectionAcceptCertificateCallback) -> m SignalHandlerId
onTlsConnectionAcceptCertificate :: forall a (m :: * -> *).
(IsTlsConnection a, MonadIO m) =>
a
-> ((?self::a) => TlsConnectionAcceptCertificateCallback)
-> m SignalHandlerId
onTlsConnectionAcceptCertificate a
obj (?self::a) => TlsConnectionAcceptCertificateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TlsConnectionAcceptCertificateCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TlsConnectionAcceptCertificateCallback
TlsConnectionAcceptCertificateCallback
cb
let wrapped' :: C_TlsConnectionAcceptCertificateCallback
wrapped' = (a -> TlsConnectionAcceptCertificateCallback)
-> C_TlsConnectionAcceptCertificateCallback
forall a.
GObject a =>
(a -> TlsConnectionAcceptCertificateCallback)
-> C_TlsConnectionAcceptCertificateCallback
wrap_TlsConnectionAcceptCertificateCallback a -> TlsConnectionAcceptCertificateCallback
wrapped
wrapped'' <- C_TlsConnectionAcceptCertificateCallback
-> IO (FunPtr C_TlsConnectionAcceptCertificateCallback)
mk_TlsConnectionAcceptCertificateCallback C_TlsConnectionAcceptCertificateCallback
wrapped'
connectSignalFunPtr obj "accept-certificate" wrapped'' SignalConnectBefore Nothing
afterTlsConnectionAcceptCertificate :: (IsTlsConnection a, MonadIO m) => a -> ((?self :: a) => TlsConnectionAcceptCertificateCallback) -> m SignalHandlerId
afterTlsConnectionAcceptCertificate :: forall a (m :: * -> *).
(IsTlsConnection a, MonadIO m) =>
a
-> ((?self::a) => TlsConnectionAcceptCertificateCallback)
-> m SignalHandlerId
afterTlsConnectionAcceptCertificate a
obj (?self::a) => TlsConnectionAcceptCertificateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> TlsConnectionAcceptCertificateCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => TlsConnectionAcceptCertificateCallback
TlsConnectionAcceptCertificateCallback
cb
let wrapped' :: C_TlsConnectionAcceptCertificateCallback
wrapped' = (a -> TlsConnectionAcceptCertificateCallback)
-> C_TlsConnectionAcceptCertificateCallback
forall a.
GObject a =>
(a -> TlsConnectionAcceptCertificateCallback)
-> C_TlsConnectionAcceptCertificateCallback
wrap_TlsConnectionAcceptCertificateCallback a -> TlsConnectionAcceptCertificateCallback
wrapped
wrapped'' <- C_TlsConnectionAcceptCertificateCallback
-> IO (FunPtr C_TlsConnectionAcceptCertificateCallback)
mk_TlsConnectionAcceptCertificateCallback C_TlsConnectionAcceptCertificateCallback
wrapped'
connectSignalFunPtr obj "accept-certificate" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data TlsConnectionAcceptCertificateSignalInfo
instance SignalInfo TlsConnectionAcceptCertificateSignalInfo where
type HaskellCallbackType TlsConnectionAcceptCertificateSignalInfo = TlsConnectionAcceptCertificateCallback
connectSignal :: forall o.
GObject o =>
o
-> (o
-> HaskellCallbackType TlsConnectionAcceptCertificateSignalInfo)
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignal o
obj o -> HaskellCallbackType TlsConnectionAcceptCertificateSignalInfo
cb SignalConnectMode
connectMode Maybe Text
detail = do
let cb' :: C_TlsConnectionAcceptCertificateCallback
cb' = (o -> TlsConnectionAcceptCertificateCallback)
-> C_TlsConnectionAcceptCertificateCallback
forall a.
GObject a =>
(a -> TlsConnectionAcceptCertificateCallback)
-> C_TlsConnectionAcceptCertificateCallback
wrap_TlsConnectionAcceptCertificateCallback o -> HaskellCallbackType TlsConnectionAcceptCertificateSignalInfo
o -> TlsConnectionAcceptCertificateCallback
cb
cb'' <- C_TlsConnectionAcceptCertificateCallback
-> IO (FunPtr C_TlsConnectionAcceptCertificateCallback)
mk_TlsConnectionAcceptCertificateCallback C_TlsConnectionAcceptCertificateCallback
cb'
connectSignalFunPtr obj "accept-certificate" cb'' connectMode detail
dbgSignalInfo :: Maybe ResolvedSymbolInfo
dbgSignalInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection::accept-certificate"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:signal:acceptCertificate"})
#endif
getTlsConnectionAdvertisedProtocols :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe [T.Text])
getTlsConnectionAdvertisedProtocols :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe [Text])
getTlsConnectionAdvertisedProtocols o
obj = IO (Maybe [Text]) -> m (Maybe [Text])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe [Text]) -> m (Maybe [Text]))
-> IO (Maybe [Text]) -> m (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe [Text])
forall a. GObject a => a -> String -> IO (Maybe [Text])
B.Properties.getObjectPropertyStringArray o
obj String
"advertised-protocols"
setTlsConnectionAdvertisedProtocols :: (MonadIO m, IsTlsConnection o) => o -> [T.Text] -> m ()
setTlsConnectionAdvertisedProtocols :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> [Text] -> m ()
setTlsConnectionAdvertisedProtocols o
obj [Text]
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe [Text] -> IO ()
forall a. GObject a => a -> String -> Maybe [Text] -> IO ()
B.Properties.setObjectPropertyStringArray o
obj String
"advertised-protocols" ([Text] -> Maybe [Text]
forall a. a -> Maybe a
Just [Text]
val)
constructTlsConnectionAdvertisedProtocols :: (IsTlsConnection o, MIO.MonadIO m) => [T.Text] -> m (GValueConstruct o)
constructTlsConnectionAdvertisedProtocols :: forall o (m :: * -> *).
(IsTlsConnection o, MonadIO m) =>
[Text] -> m (GValueConstruct o)
constructTlsConnectionAdvertisedProtocols [Text]
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe [Text] -> IO (GValueConstruct o)
forall o. String -> Maybe [Text] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyStringArray String
"advertised-protocols" ([Text] -> Maybe [Text]
forall a. a -> Maybe a
P.Just [Text]
val)
clearTlsConnectionAdvertisedProtocols :: (MonadIO m, IsTlsConnection o) => o -> m ()
clearTlsConnectionAdvertisedProtocols :: forall (m :: * -> *) o. (MonadIO m, IsTlsConnection o) => o -> m ()
clearTlsConnectionAdvertisedProtocols o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe [Text] -> IO ()
forall a. GObject a => a -> String -> Maybe [Text] -> IO ()
B.Properties.setObjectPropertyStringArray o
obj String
"advertised-protocols" (Maybe [Text]
forall a. Maybe a
Nothing :: Maybe [T.Text])
#if defined(ENABLE_OVERLOADING)
data TlsConnectionAdvertisedProtocolsPropertyInfo
instance AttrInfo TlsConnectionAdvertisedProtocolsPropertyInfo where
type AttrAllowedOps TlsConnectionAdvertisedProtocolsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TlsConnectionAdvertisedProtocolsPropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionAdvertisedProtocolsPropertyInfo = (~) [T.Text]
type AttrTransferTypeConstraint TlsConnectionAdvertisedProtocolsPropertyInfo = (~) [T.Text]
type AttrTransferType TlsConnectionAdvertisedProtocolsPropertyInfo = [T.Text]
type AttrGetType TlsConnectionAdvertisedProtocolsPropertyInfo = (Maybe [T.Text])
type AttrLabel TlsConnectionAdvertisedProtocolsPropertyInfo = "advertised-protocols"
type AttrOrigin TlsConnectionAdvertisedProtocolsPropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint
TlsConnectionAdvertisedProtocolsPropertyInfo o =>
o -> IO (AttrGetType TlsConnectionAdvertisedProtocolsPropertyInfo)
attrGet = o -> IO (Maybe [Text])
o -> IO (AttrGetType TlsConnectionAdvertisedProtocolsPropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe [Text])
getTlsConnectionAdvertisedProtocols
attrSet :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionAdvertisedProtocolsPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionAdvertisedProtocolsPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
o -> [Text] -> IO ()
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> [Text] -> m ()
setTlsConnectionAdvertisedProtocols
attrTransfer :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionAdvertisedProtocolsPropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionAdvertisedProtocolsPropertyInfo b) =>
Proxy o
-> b
-> IO
(AttrTransferType TlsConnectionAdvertisedProtocolsPropertyInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionAdvertisedProtocolsPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionAdvertisedProtocolsPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
[Text] -> IO (GValueConstruct o)
forall o (m :: * -> *).
(IsTlsConnection o, MonadIO m) =>
[Text] -> m (GValueConstruct o)
constructTlsConnectionAdvertisedProtocols
attrClear :: forall o.
AttrBaseTypeConstraint
TlsConnectionAdvertisedProtocolsPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall (m :: * -> *) o. (MonadIO m, IsTlsConnection o) => o -> m ()
clearTlsConnectionAdvertisedProtocols
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.advertisedProtocols"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:advertisedProtocols"
})
#endif
getTlsConnectionBaseIoStream :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe Gio.IOStream.IOStream)
getTlsConnectionBaseIoStream :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe IOStream)
getTlsConnectionBaseIoStream o
obj = IO (Maybe IOStream) -> m (Maybe IOStream)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe IOStream) -> m (Maybe IOStream))
-> IO (Maybe IOStream) -> m (Maybe IOStream)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr IOStream -> IOStream)
-> IO (Maybe IOStream)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"base-io-stream" ManagedPtr IOStream -> IOStream
Gio.IOStream.IOStream
constructTlsConnectionBaseIoStream :: (IsTlsConnection o, MIO.MonadIO m, Gio.IOStream.IsIOStream a) => a -> m (GValueConstruct o)
constructTlsConnectionBaseIoStream :: forall o (m :: * -> *) a.
(IsTlsConnection o, MonadIO m, IsIOStream a) =>
a -> m (GValueConstruct o)
constructTlsConnectionBaseIoStream a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"base-io-stream" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data TlsConnectionBaseIoStreamPropertyInfo
instance AttrInfo TlsConnectionBaseIoStreamPropertyInfo where
type AttrAllowedOps TlsConnectionBaseIoStreamPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TlsConnectionBaseIoStreamPropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionBaseIoStreamPropertyInfo = Gio.IOStream.IsIOStream
type AttrTransferTypeConstraint TlsConnectionBaseIoStreamPropertyInfo = Gio.IOStream.IsIOStream
type AttrTransferType TlsConnectionBaseIoStreamPropertyInfo = Gio.IOStream.IOStream
type AttrGetType TlsConnectionBaseIoStreamPropertyInfo = (Maybe Gio.IOStream.IOStream)
type AttrLabel TlsConnectionBaseIoStreamPropertyInfo = "base-io-stream"
type AttrOrigin TlsConnectionBaseIoStreamPropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint TlsConnectionBaseIoStreamPropertyInfo o =>
o -> IO (AttrGetType TlsConnectionBaseIoStreamPropertyInfo)
attrGet = o -> IO (Maybe IOStream)
o -> IO (AttrGetType TlsConnectionBaseIoStreamPropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe IOStream)
getTlsConnectionBaseIoStream
attrSet :: forall o b.
(AttrBaseTypeConstraint TlsConnectionBaseIoStreamPropertyInfo o,
AttrSetTypeConstraint TlsConnectionBaseIoStreamPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TlsConnectionBaseIoStreamPropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionBaseIoStreamPropertyInfo b) =>
Proxy o
-> b -> IO (AttrTransferType TlsConnectionBaseIoStreamPropertyInfo)
attrTransfer Proxy o
_ b
v = do
(ManagedPtr IOStream -> IOStream) -> b -> IO IOStream
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr IOStream -> IOStream
Gio.IOStream.IOStream b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TlsConnectionBaseIoStreamPropertyInfo o,
AttrSetTypeConstraint TlsConnectionBaseIoStreamPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall o (m :: * -> *) a.
(IsTlsConnection o, MonadIO m, IsIOStream a) =>
a -> m (GValueConstruct o)
constructTlsConnectionBaseIoStream
attrClear :: forall o.
AttrBaseTypeConstraint TlsConnectionBaseIoStreamPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.baseIoStream"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:baseIoStream"
})
#endif
getTlsConnectionCertificate :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe Gio.TlsCertificate.TlsCertificate)
getTlsConnectionCertificate :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe TlsCertificate)
getTlsConnectionCertificate o
obj = IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate))
-> IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr TlsCertificate -> TlsCertificate)
-> IO (Maybe TlsCertificate)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"certificate" ManagedPtr TlsCertificate -> TlsCertificate
Gio.TlsCertificate.TlsCertificate
setTlsConnectionCertificate :: (MonadIO m, IsTlsConnection o, Gio.TlsCertificate.IsTlsCertificate a) => o -> a -> m ()
setTlsConnectionCertificate :: forall (m :: * -> *) o a.
(MonadIO m, IsTlsConnection o, IsTlsCertificate a) =>
o -> a -> m ()
setTlsConnectionCertificate o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"certificate" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructTlsConnectionCertificate :: (IsTlsConnection o, MIO.MonadIO m, Gio.TlsCertificate.IsTlsCertificate a) => a -> m (GValueConstruct o)
constructTlsConnectionCertificate :: forall o (m :: * -> *) a.
(IsTlsConnection o, MonadIO m, IsTlsCertificate a) =>
a -> m (GValueConstruct o)
constructTlsConnectionCertificate a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"certificate" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data TlsConnectionCertificatePropertyInfo
instance AttrInfo TlsConnectionCertificatePropertyInfo where
type AttrAllowedOps TlsConnectionCertificatePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint TlsConnectionCertificatePropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionCertificatePropertyInfo = Gio.TlsCertificate.IsTlsCertificate
type AttrTransferTypeConstraint TlsConnectionCertificatePropertyInfo = Gio.TlsCertificate.IsTlsCertificate
type AttrTransferType TlsConnectionCertificatePropertyInfo = Gio.TlsCertificate.TlsCertificate
type AttrGetType TlsConnectionCertificatePropertyInfo = (Maybe Gio.TlsCertificate.TlsCertificate)
type AttrLabel TlsConnectionCertificatePropertyInfo = "certificate"
type AttrOrigin TlsConnectionCertificatePropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint TlsConnectionCertificatePropertyInfo o =>
o -> IO (AttrGetType TlsConnectionCertificatePropertyInfo)
attrGet = o -> IO (Maybe TlsCertificate)
o -> IO (AttrGetType TlsConnectionCertificatePropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe TlsCertificate)
getTlsConnectionCertificate
attrSet :: forall o b.
(AttrBaseTypeConstraint TlsConnectionCertificatePropertyInfo o,
AttrSetTypeConstraint TlsConnectionCertificatePropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall (m :: * -> *) o a.
(MonadIO m, IsTlsConnection o, IsTlsCertificate a) =>
o -> a -> m ()
setTlsConnectionCertificate
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TlsConnectionCertificatePropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionCertificatePropertyInfo b) =>
Proxy o
-> b -> IO (AttrTransferType TlsConnectionCertificatePropertyInfo)
attrTransfer Proxy o
_ b
v = do
(ManagedPtr TlsCertificate -> TlsCertificate)
-> b -> IO TlsCertificate
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr TlsCertificate -> TlsCertificate
Gio.TlsCertificate.TlsCertificate b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TlsConnectionCertificatePropertyInfo o,
AttrSetTypeConstraint TlsConnectionCertificatePropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall o (m :: * -> *) a.
(IsTlsConnection o, MonadIO m, IsTlsCertificate a) =>
a -> m (GValueConstruct o)
constructTlsConnectionCertificate
attrClear :: forall o.
AttrBaseTypeConstraint TlsConnectionCertificatePropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.certificate"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:certificate"
})
#endif
getTlsConnectionCiphersuiteName :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe T.Text)
getTlsConnectionCiphersuiteName :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe Text)
getTlsConnectionCiphersuiteName o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"ciphersuite-name"
#if defined(ENABLE_OVERLOADING)
data TlsConnectionCiphersuiteNamePropertyInfo
instance AttrInfo TlsConnectionCiphersuiteNamePropertyInfo where
type AttrAllowedOps TlsConnectionCiphersuiteNamePropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TlsConnectionCiphersuiteNamePropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionCiphersuiteNamePropertyInfo = (~) ()
type AttrTransferTypeConstraint TlsConnectionCiphersuiteNamePropertyInfo = (~) ()
type AttrTransferType TlsConnectionCiphersuiteNamePropertyInfo = ()
type AttrGetType TlsConnectionCiphersuiteNamePropertyInfo = (Maybe T.Text)
type AttrLabel TlsConnectionCiphersuiteNamePropertyInfo = "ciphersuite-name"
type AttrOrigin TlsConnectionCiphersuiteNamePropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint
TlsConnectionCiphersuiteNamePropertyInfo o =>
o -> IO (AttrGetType TlsConnectionCiphersuiteNamePropertyInfo)
attrGet = o -> IO (Maybe Text)
o -> IO (AttrGetType TlsConnectionCiphersuiteNamePropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe Text)
getTlsConnectionCiphersuiteName
attrSet :: forall o b.
(AttrBaseTypeConstraint TlsConnectionCiphersuiteNamePropertyInfo o,
AttrSetTypeConstraint
TlsConnectionCiphersuiteNamePropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TlsConnectionCiphersuiteNamePropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionCiphersuiteNamePropertyInfo b) =>
Proxy o
-> b
-> IO (AttrTransferType TlsConnectionCiphersuiteNamePropertyInfo)
attrTransfer Proxy o
_ = b -> IO (AttrTransferType TlsConnectionCiphersuiteNamePropertyInfo)
() -> IO ()
forall a. HasCallStack => a
undefined
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TlsConnectionCiphersuiteNamePropertyInfo o,
AttrSetTypeConstraint
TlsConnectionCiphersuiteNamePropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint
TlsConnectionCiphersuiteNamePropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.ciphersuiteName"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:ciphersuiteName"
})
#endif
getTlsConnectionDatabase :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe Gio.TlsDatabase.TlsDatabase)
getTlsConnectionDatabase :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe TlsDatabase)
getTlsConnectionDatabase o
obj = IO (Maybe TlsDatabase) -> m (Maybe TlsDatabase)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe TlsDatabase) -> m (Maybe TlsDatabase))
-> IO (Maybe TlsDatabase) -> m (Maybe TlsDatabase)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr TlsDatabase -> TlsDatabase)
-> IO (Maybe TlsDatabase)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"database" ManagedPtr TlsDatabase -> TlsDatabase
Gio.TlsDatabase.TlsDatabase
setTlsConnectionDatabase :: (MonadIO m, IsTlsConnection o, Gio.TlsDatabase.IsTlsDatabase a) => o -> a -> m ()
setTlsConnectionDatabase :: forall (m :: * -> *) o a.
(MonadIO m, IsTlsConnection o, IsTlsDatabase a) =>
o -> a -> m ()
setTlsConnectionDatabase o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"database" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructTlsConnectionDatabase :: (IsTlsConnection o, MIO.MonadIO m, Gio.TlsDatabase.IsTlsDatabase a) => a -> m (GValueConstruct o)
constructTlsConnectionDatabase :: forall o (m :: * -> *) a.
(IsTlsConnection o, MonadIO m, IsTlsDatabase a) =>
a -> m (GValueConstruct o)
constructTlsConnectionDatabase a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"database" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearTlsConnectionDatabase :: (MonadIO m, IsTlsConnection o) => o -> m ()
clearTlsConnectionDatabase :: forall (m :: * -> *) o. (MonadIO m, IsTlsConnection o) => o -> m ()
clearTlsConnectionDatabase o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe TlsDatabase -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"database" (Maybe TlsDatabase
forall a. Maybe a
Nothing :: Maybe Gio.TlsDatabase.TlsDatabase)
#if defined(ENABLE_OVERLOADING)
data TlsConnectionDatabasePropertyInfo
instance AttrInfo TlsConnectionDatabasePropertyInfo where
type AttrAllowedOps TlsConnectionDatabasePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TlsConnectionDatabasePropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionDatabasePropertyInfo = Gio.TlsDatabase.IsTlsDatabase
type AttrTransferTypeConstraint TlsConnectionDatabasePropertyInfo = Gio.TlsDatabase.IsTlsDatabase
type AttrTransferType TlsConnectionDatabasePropertyInfo = Gio.TlsDatabase.TlsDatabase
type AttrGetType TlsConnectionDatabasePropertyInfo = (Maybe Gio.TlsDatabase.TlsDatabase)
type AttrLabel TlsConnectionDatabasePropertyInfo = "database"
type AttrOrigin TlsConnectionDatabasePropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint TlsConnectionDatabasePropertyInfo o =>
o -> IO (AttrGetType TlsConnectionDatabasePropertyInfo)
attrGet = o -> IO (Maybe TlsDatabase)
o -> IO (AttrGetType TlsConnectionDatabasePropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe TlsDatabase)
getTlsConnectionDatabase
attrSet :: forall o b.
(AttrBaseTypeConstraint TlsConnectionDatabasePropertyInfo o,
AttrSetTypeConstraint TlsConnectionDatabasePropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall (m :: * -> *) o a.
(MonadIO m, IsTlsConnection o, IsTlsDatabase a) =>
o -> a -> m ()
setTlsConnectionDatabase
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TlsConnectionDatabasePropertyInfo o,
AttrTransferTypeConstraint TlsConnectionDatabasePropertyInfo b) =>
Proxy o
-> b -> IO (AttrTransferType TlsConnectionDatabasePropertyInfo)
attrTransfer Proxy o
_ b
v = do
(ManagedPtr TlsDatabase -> TlsDatabase) -> b -> IO TlsDatabase
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr TlsDatabase -> TlsDatabase
Gio.TlsDatabase.TlsDatabase b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TlsConnectionDatabasePropertyInfo o,
AttrSetTypeConstraint TlsConnectionDatabasePropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall o (m :: * -> *) a.
(IsTlsConnection o, MonadIO m, IsTlsDatabase a) =>
a -> m (GValueConstruct o)
constructTlsConnectionDatabase
attrClear :: forall o.
AttrBaseTypeConstraint TlsConnectionDatabasePropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall (m :: * -> *) o. (MonadIO m, IsTlsConnection o) => o -> m ()
clearTlsConnectionDatabase
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.database"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:database"
})
#endif
getTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe Gio.TlsInteraction.TlsInteraction)
getTlsConnectionInteraction :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe TlsInteraction)
getTlsConnectionInteraction o
obj = IO (Maybe TlsInteraction) -> m (Maybe TlsInteraction)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe TlsInteraction) -> m (Maybe TlsInteraction))
-> IO (Maybe TlsInteraction) -> m (Maybe TlsInteraction)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr TlsInteraction -> TlsInteraction)
-> IO (Maybe TlsInteraction)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"interaction" ManagedPtr TlsInteraction -> TlsInteraction
Gio.TlsInteraction.TlsInteraction
setTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o, Gio.TlsInteraction.IsTlsInteraction a) => o -> a -> m ()
setTlsConnectionInteraction :: forall (m :: * -> *) o a.
(MonadIO m, IsTlsConnection o, IsTlsInteraction a) =>
o -> a -> m ()
setTlsConnectionInteraction o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"interaction" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructTlsConnectionInteraction :: (IsTlsConnection o, MIO.MonadIO m, Gio.TlsInteraction.IsTlsInteraction a) => a -> m (GValueConstruct o)
constructTlsConnectionInteraction :: forall o (m :: * -> *) a.
(IsTlsConnection o, MonadIO m, IsTlsInteraction a) =>
a -> m (GValueConstruct o)
constructTlsConnectionInteraction a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"interaction" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o) => o -> m ()
clearTlsConnectionInteraction :: forall (m :: * -> *) o. (MonadIO m, IsTlsConnection o) => o -> m ()
clearTlsConnectionInteraction o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe TlsInteraction -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"interaction" (Maybe TlsInteraction
forall a. Maybe a
Nothing :: Maybe Gio.TlsInteraction.TlsInteraction)
#if defined(ENABLE_OVERLOADING)
data TlsConnectionInteractionPropertyInfo
instance AttrInfo TlsConnectionInteractionPropertyInfo where
type AttrAllowedOps TlsConnectionInteractionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TlsConnectionInteractionPropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionInteractionPropertyInfo = Gio.TlsInteraction.IsTlsInteraction
type AttrTransferTypeConstraint TlsConnectionInteractionPropertyInfo = Gio.TlsInteraction.IsTlsInteraction
type AttrTransferType TlsConnectionInteractionPropertyInfo = Gio.TlsInteraction.TlsInteraction
type AttrGetType TlsConnectionInteractionPropertyInfo = (Maybe Gio.TlsInteraction.TlsInteraction)
type AttrLabel TlsConnectionInteractionPropertyInfo = "interaction"
type AttrOrigin TlsConnectionInteractionPropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint TlsConnectionInteractionPropertyInfo o =>
o -> IO (AttrGetType TlsConnectionInteractionPropertyInfo)
attrGet = o -> IO (Maybe TlsInteraction)
o -> IO (AttrGetType TlsConnectionInteractionPropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe TlsInteraction)
getTlsConnectionInteraction
attrSet :: forall o b.
(AttrBaseTypeConstraint TlsConnectionInteractionPropertyInfo o,
AttrSetTypeConstraint TlsConnectionInteractionPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall (m :: * -> *) o a.
(MonadIO m, IsTlsConnection o, IsTlsInteraction a) =>
o -> a -> m ()
setTlsConnectionInteraction
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TlsConnectionInteractionPropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionInteractionPropertyInfo b) =>
Proxy o
-> b -> IO (AttrTransferType TlsConnectionInteractionPropertyInfo)
attrTransfer Proxy o
_ b
v = do
(ManagedPtr TlsInteraction -> TlsInteraction)
-> b -> IO TlsInteraction
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr TlsInteraction -> TlsInteraction
Gio.TlsInteraction.TlsInteraction b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TlsConnectionInteractionPropertyInfo o,
AttrSetTypeConstraint TlsConnectionInteractionPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall o (m :: * -> *) a.
(IsTlsConnection o, MonadIO m, IsTlsInteraction a) =>
a -> m (GValueConstruct o)
constructTlsConnectionInteraction
attrClear :: forall o.
AttrBaseTypeConstraint TlsConnectionInteractionPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall (m :: * -> *) o. (MonadIO m, IsTlsConnection o) => o -> m ()
clearTlsConnectionInteraction
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.interaction"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:interaction"
})
#endif
getTlsConnectionNegotiatedProtocol :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe T.Text)
getTlsConnectionNegotiatedProtocol :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe Text)
getTlsConnectionNegotiatedProtocol o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"negotiated-protocol"
#if defined(ENABLE_OVERLOADING)
data TlsConnectionNegotiatedProtocolPropertyInfo
instance AttrInfo TlsConnectionNegotiatedProtocolPropertyInfo where
type AttrAllowedOps TlsConnectionNegotiatedProtocolPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TlsConnectionNegotiatedProtocolPropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionNegotiatedProtocolPropertyInfo = (~) ()
type AttrTransferTypeConstraint TlsConnectionNegotiatedProtocolPropertyInfo = (~) ()
type AttrTransferType TlsConnectionNegotiatedProtocolPropertyInfo = ()
type AttrGetType TlsConnectionNegotiatedProtocolPropertyInfo = (Maybe T.Text)
type AttrLabel TlsConnectionNegotiatedProtocolPropertyInfo = "negotiated-protocol"
type AttrOrigin TlsConnectionNegotiatedProtocolPropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint
TlsConnectionNegotiatedProtocolPropertyInfo o =>
o -> IO (AttrGetType TlsConnectionNegotiatedProtocolPropertyInfo)
attrGet = o -> IO (Maybe Text)
o -> IO (AttrGetType TlsConnectionNegotiatedProtocolPropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe Text)
getTlsConnectionNegotiatedProtocol
attrSet :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionNegotiatedProtocolPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionNegotiatedProtocolPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionNegotiatedProtocolPropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionNegotiatedProtocolPropertyInfo b) =>
Proxy o
-> b
-> IO
(AttrTransferType TlsConnectionNegotiatedProtocolPropertyInfo)
attrTransfer Proxy o
_ = b
-> IO
(AttrTransferType TlsConnectionNegotiatedProtocolPropertyInfo)
() -> IO ()
forall a. HasCallStack => a
undefined
attrConstruct :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionNegotiatedProtocolPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionNegotiatedProtocolPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint
TlsConnectionNegotiatedProtocolPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.negotiatedProtocol"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:negotiatedProtocol"
})
#endif
getTlsConnectionPeerCertificate :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe Gio.TlsCertificate.TlsCertificate)
getTlsConnectionPeerCertificate :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe TlsCertificate)
getTlsConnectionPeerCertificate o
obj = IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate))
-> IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr TlsCertificate -> TlsCertificate)
-> IO (Maybe TlsCertificate)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"peer-certificate" ManagedPtr TlsCertificate -> TlsCertificate
Gio.TlsCertificate.TlsCertificate
#if defined(ENABLE_OVERLOADING)
data TlsConnectionPeerCertificatePropertyInfo
instance AttrInfo TlsConnectionPeerCertificatePropertyInfo where
type AttrAllowedOps TlsConnectionPeerCertificatePropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TlsConnectionPeerCertificatePropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionPeerCertificatePropertyInfo = (~) ()
type AttrTransferTypeConstraint TlsConnectionPeerCertificatePropertyInfo = (~) ()
type AttrTransferType TlsConnectionPeerCertificatePropertyInfo = ()
type AttrGetType TlsConnectionPeerCertificatePropertyInfo = (Maybe Gio.TlsCertificate.TlsCertificate)
type AttrLabel TlsConnectionPeerCertificatePropertyInfo = "peer-certificate"
type AttrOrigin TlsConnectionPeerCertificatePropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint
TlsConnectionPeerCertificatePropertyInfo o =>
o -> IO (AttrGetType TlsConnectionPeerCertificatePropertyInfo)
attrGet = o -> IO (Maybe TlsCertificate)
o -> IO (AttrGetType TlsConnectionPeerCertificatePropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m (Maybe TlsCertificate)
getTlsConnectionPeerCertificate
attrSet :: forall o b.
(AttrBaseTypeConstraint TlsConnectionPeerCertificatePropertyInfo o,
AttrSetTypeConstraint
TlsConnectionPeerCertificatePropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TlsConnectionPeerCertificatePropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionPeerCertificatePropertyInfo b) =>
Proxy o
-> b
-> IO (AttrTransferType TlsConnectionPeerCertificatePropertyInfo)
attrTransfer Proxy o
_ = b -> IO (AttrTransferType TlsConnectionPeerCertificatePropertyInfo)
() -> IO ()
forall a. HasCallStack => a
undefined
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TlsConnectionPeerCertificatePropertyInfo o,
AttrSetTypeConstraint
TlsConnectionPeerCertificatePropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint
TlsConnectionPeerCertificatePropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.peerCertificate"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:peerCertificate"
})
#endif
getTlsConnectionPeerCertificateErrors :: (MonadIO m, IsTlsConnection o) => o -> m [Gio.Flags.TlsCertificateFlags]
getTlsConnectionPeerCertificateErrors :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m [TlsCertificateFlags]
getTlsConnectionPeerCertificateErrors o
obj = IO [TlsCertificateFlags] -> m [TlsCertificateFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [TlsCertificateFlags] -> m [TlsCertificateFlags])
-> IO [TlsCertificateFlags] -> m [TlsCertificateFlags]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [TlsCertificateFlags]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"peer-certificate-errors"
#if defined(ENABLE_OVERLOADING)
data TlsConnectionPeerCertificateErrorsPropertyInfo
instance AttrInfo TlsConnectionPeerCertificateErrorsPropertyInfo where
type AttrAllowedOps TlsConnectionPeerCertificateErrorsPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint TlsConnectionPeerCertificateErrorsPropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionPeerCertificateErrorsPropertyInfo = (~) ()
type AttrTransferTypeConstraint TlsConnectionPeerCertificateErrorsPropertyInfo = (~) ()
type AttrTransferType TlsConnectionPeerCertificateErrorsPropertyInfo = ()
type AttrGetType TlsConnectionPeerCertificateErrorsPropertyInfo = [Gio.Flags.TlsCertificateFlags]
type AttrLabel TlsConnectionPeerCertificateErrorsPropertyInfo = "peer-certificate-errors"
type AttrOrigin TlsConnectionPeerCertificateErrorsPropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint
TlsConnectionPeerCertificateErrorsPropertyInfo o =>
o
-> IO (AttrGetType TlsConnectionPeerCertificateErrorsPropertyInfo)
attrGet = o -> IO [TlsCertificateFlags]
o
-> IO (AttrGetType TlsConnectionPeerCertificateErrorsPropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m [TlsCertificateFlags]
getTlsConnectionPeerCertificateErrors
attrSet :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionPeerCertificateErrorsPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionPeerCertificateErrorsPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionPeerCertificateErrorsPropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionPeerCertificateErrorsPropertyInfo b) =>
Proxy o
-> b
-> IO
(AttrTransferType TlsConnectionPeerCertificateErrorsPropertyInfo)
attrTransfer Proxy o
_ = b
-> IO
(AttrTransferType TlsConnectionPeerCertificateErrorsPropertyInfo)
() -> IO ()
forall a. HasCallStack => a
undefined
attrConstruct :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionPeerCertificateErrorsPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionPeerCertificateErrorsPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint
TlsConnectionPeerCertificateErrorsPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.peerCertificateErrors"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:peerCertificateErrors"
})
#endif
getTlsConnectionProtocolVersion :: (MonadIO m, IsTlsConnection o) => o -> m Gio.Enums.TlsProtocolVersion
getTlsConnectionProtocolVersion :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m TlsProtocolVersion
getTlsConnectionProtocolVersion o
obj = IO TlsProtocolVersion -> m TlsProtocolVersion
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO TlsProtocolVersion -> m TlsProtocolVersion)
-> IO TlsProtocolVersion -> m TlsProtocolVersion
forall a b. (a -> b) -> a -> b
$ o -> String -> IO TlsProtocolVersion
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"protocol-version"
#if defined(ENABLE_OVERLOADING)
data TlsConnectionProtocolVersionPropertyInfo
instance AttrInfo TlsConnectionProtocolVersionPropertyInfo where
type AttrAllowedOps TlsConnectionProtocolVersionPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint TlsConnectionProtocolVersionPropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionProtocolVersionPropertyInfo = (~) ()
type AttrTransferTypeConstraint TlsConnectionProtocolVersionPropertyInfo = (~) ()
type AttrTransferType TlsConnectionProtocolVersionPropertyInfo = ()
type AttrGetType TlsConnectionProtocolVersionPropertyInfo = Gio.Enums.TlsProtocolVersion
type AttrLabel TlsConnectionProtocolVersionPropertyInfo = "protocol-version"
type AttrOrigin TlsConnectionProtocolVersionPropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint
TlsConnectionProtocolVersionPropertyInfo o =>
o -> IO (AttrGetType TlsConnectionProtocolVersionPropertyInfo)
attrGet = o -> IO (AttrGetType TlsConnectionProtocolVersionPropertyInfo)
o -> IO TlsProtocolVersion
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m TlsProtocolVersion
getTlsConnectionProtocolVersion
attrSet :: forall o b.
(AttrBaseTypeConstraint TlsConnectionProtocolVersionPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionProtocolVersionPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TlsConnectionProtocolVersionPropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionProtocolVersionPropertyInfo b) =>
Proxy o
-> b
-> IO (AttrTransferType TlsConnectionProtocolVersionPropertyInfo)
attrTransfer Proxy o
_ = b -> IO (AttrTransferType TlsConnectionProtocolVersionPropertyInfo)
() -> IO ()
forall a. HasCallStack => a
undefined
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TlsConnectionProtocolVersionPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionProtocolVersionPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint
TlsConnectionProtocolVersionPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.protocolVersion"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:protocolVersion"
})
#endif
getTlsConnectionRehandshakeMode :: (MonadIO m, IsTlsConnection o) => o -> m Gio.Enums.TlsRehandshakeMode
getTlsConnectionRehandshakeMode :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m TlsRehandshakeMode
getTlsConnectionRehandshakeMode o
obj = IO TlsRehandshakeMode -> m TlsRehandshakeMode
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO TlsRehandshakeMode -> m TlsRehandshakeMode)
-> IO TlsRehandshakeMode -> m TlsRehandshakeMode
forall a b. (a -> b) -> a -> b
$ o -> String -> IO TlsRehandshakeMode
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"rehandshake-mode"
setTlsConnectionRehandshakeMode :: (MonadIO m, IsTlsConnection o) => o -> Gio.Enums.TlsRehandshakeMode -> m ()
setTlsConnectionRehandshakeMode :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> TlsRehandshakeMode -> m ()
setTlsConnectionRehandshakeMode o
obj TlsRehandshakeMode
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> TlsRehandshakeMode -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"rehandshake-mode" TlsRehandshakeMode
val
constructTlsConnectionRehandshakeMode :: (IsTlsConnection o, MIO.MonadIO m) => Gio.Enums.TlsRehandshakeMode -> m (GValueConstruct o)
constructTlsConnectionRehandshakeMode :: forall o (m :: * -> *).
(IsTlsConnection o, MonadIO m) =>
TlsRehandshakeMode -> m (GValueConstruct o)
constructTlsConnectionRehandshakeMode TlsRehandshakeMode
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> TlsRehandshakeMode -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"rehandshake-mode" TlsRehandshakeMode
val
#if defined(ENABLE_OVERLOADING)
data TlsConnectionRehandshakeModePropertyInfo
instance AttrInfo TlsConnectionRehandshakeModePropertyInfo where
type AttrAllowedOps TlsConnectionRehandshakeModePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint TlsConnectionRehandshakeModePropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionRehandshakeModePropertyInfo = (~) Gio.Enums.TlsRehandshakeMode
type AttrTransferTypeConstraint TlsConnectionRehandshakeModePropertyInfo = (~) Gio.Enums.TlsRehandshakeMode
type AttrTransferType TlsConnectionRehandshakeModePropertyInfo = Gio.Enums.TlsRehandshakeMode
type AttrGetType TlsConnectionRehandshakeModePropertyInfo = Gio.Enums.TlsRehandshakeMode
type AttrLabel TlsConnectionRehandshakeModePropertyInfo = "rehandshake-mode"
type AttrOrigin TlsConnectionRehandshakeModePropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint
TlsConnectionRehandshakeModePropertyInfo o =>
o -> IO (AttrGetType TlsConnectionRehandshakeModePropertyInfo)
attrGet = o -> IO (AttrGetType TlsConnectionRehandshakeModePropertyInfo)
o -> IO TlsRehandshakeMode
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m TlsRehandshakeMode
getTlsConnectionRehandshakeMode
attrSet :: forall o b.
(AttrBaseTypeConstraint TlsConnectionRehandshakeModePropertyInfo o,
AttrSetTypeConstraint
TlsConnectionRehandshakeModePropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
o -> TlsRehandshakeMode -> IO ()
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> TlsRehandshakeMode -> m ()
setTlsConnectionRehandshakeMode
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TlsConnectionRehandshakeModePropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionRehandshakeModePropertyInfo b) =>
Proxy o
-> b
-> IO (AttrTransferType TlsConnectionRehandshakeModePropertyInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TlsConnectionRehandshakeModePropertyInfo o,
AttrSetTypeConstraint
TlsConnectionRehandshakeModePropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
TlsRehandshakeMode -> IO (GValueConstruct o)
forall o (m :: * -> *).
(IsTlsConnection o, MonadIO m) =>
TlsRehandshakeMode -> m (GValueConstruct o)
constructTlsConnectionRehandshakeMode
attrClear :: forall o.
AttrBaseTypeConstraint
TlsConnectionRehandshakeModePropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.rehandshakeMode"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:rehandshakeMode"
})
#endif
getTlsConnectionRequireCloseNotify :: (MonadIO m, IsTlsConnection o) => o -> m Bool
getTlsConnectionRequireCloseNotify :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m Bool
getTlsConnectionRequireCloseNotify o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"require-close-notify"
setTlsConnectionRequireCloseNotify :: (MonadIO m, IsTlsConnection o) => o -> Bool -> m ()
setTlsConnectionRequireCloseNotify :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> Bool -> m ()
setTlsConnectionRequireCloseNotify o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"require-close-notify" Bool
val
constructTlsConnectionRequireCloseNotify :: (IsTlsConnection o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructTlsConnectionRequireCloseNotify :: forall o (m :: * -> *).
(IsTlsConnection o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructTlsConnectionRequireCloseNotify Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"require-close-notify" Bool
val
#if defined(ENABLE_OVERLOADING)
data TlsConnectionRequireCloseNotifyPropertyInfo
instance AttrInfo TlsConnectionRequireCloseNotifyPropertyInfo where
type AttrAllowedOps TlsConnectionRequireCloseNotifyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint TlsConnectionRequireCloseNotifyPropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionRequireCloseNotifyPropertyInfo = (~) Bool
type AttrTransferTypeConstraint TlsConnectionRequireCloseNotifyPropertyInfo = (~) Bool
type AttrTransferType TlsConnectionRequireCloseNotifyPropertyInfo = Bool
type AttrGetType TlsConnectionRequireCloseNotifyPropertyInfo = Bool
type AttrLabel TlsConnectionRequireCloseNotifyPropertyInfo = "require-close-notify"
type AttrOrigin TlsConnectionRequireCloseNotifyPropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint
TlsConnectionRequireCloseNotifyPropertyInfo o =>
o -> IO (AttrGetType TlsConnectionRequireCloseNotifyPropertyInfo)
attrGet = o -> IO Bool
o -> IO (AttrGetType TlsConnectionRequireCloseNotifyPropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m Bool
getTlsConnectionRequireCloseNotify
attrSet :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionRequireCloseNotifyPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionRequireCloseNotifyPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
o -> Bool -> IO ()
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> Bool -> m ()
setTlsConnectionRequireCloseNotify
attrTransfer :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionRequireCloseNotifyPropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionRequireCloseNotifyPropertyInfo b) =>
Proxy o
-> b
-> IO
(AttrTransferType TlsConnectionRequireCloseNotifyPropertyInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint
TlsConnectionRequireCloseNotifyPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionRequireCloseNotifyPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
Bool -> IO (GValueConstruct o)
forall o (m :: * -> *).
(IsTlsConnection o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructTlsConnectionRequireCloseNotify
attrClear :: forall o.
AttrBaseTypeConstraint
TlsConnectionRequireCloseNotifyPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.requireCloseNotify"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:requireCloseNotify"
})
#endif
getTlsConnectionUseSystemCertdb :: (MonadIO m, IsTlsConnection o) => o -> m Bool
getTlsConnectionUseSystemCertdb :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m Bool
getTlsConnectionUseSystemCertdb o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"use-system-certdb"
setTlsConnectionUseSystemCertdb :: (MonadIO m, IsTlsConnection o) => o -> Bool -> m ()
setTlsConnectionUseSystemCertdb :: forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> Bool -> m ()
setTlsConnectionUseSystemCertdb o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"use-system-certdb" Bool
val
constructTlsConnectionUseSystemCertdb :: (IsTlsConnection o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructTlsConnectionUseSystemCertdb :: forall o (m :: * -> *).
(IsTlsConnection o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructTlsConnectionUseSystemCertdb Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"use-system-certdb" Bool
val
#if defined(ENABLE_OVERLOADING)
data TlsConnectionUseSystemCertdbPropertyInfo
instance AttrInfo TlsConnectionUseSystemCertdbPropertyInfo where
type AttrAllowedOps TlsConnectionUseSystemCertdbPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint TlsConnectionUseSystemCertdbPropertyInfo = IsTlsConnection
type AttrSetTypeConstraint TlsConnectionUseSystemCertdbPropertyInfo = (~) Bool
type AttrTransferTypeConstraint TlsConnectionUseSystemCertdbPropertyInfo = (~) Bool
type AttrTransferType TlsConnectionUseSystemCertdbPropertyInfo = Bool
type AttrGetType TlsConnectionUseSystemCertdbPropertyInfo = Bool
type AttrLabel TlsConnectionUseSystemCertdbPropertyInfo = "use-system-certdb"
type AttrOrigin TlsConnectionUseSystemCertdbPropertyInfo = TlsConnection
attrGet :: forall o.
AttrBaseTypeConstraint
TlsConnectionUseSystemCertdbPropertyInfo o =>
o -> IO (AttrGetType TlsConnectionUseSystemCertdbPropertyInfo)
attrGet = o -> IO Bool
o -> IO (AttrGetType TlsConnectionUseSystemCertdbPropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> m Bool
getTlsConnectionUseSystemCertdb
attrSet :: forall o b.
(AttrBaseTypeConstraint TlsConnectionUseSystemCertdbPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionUseSystemCertdbPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
o -> Bool -> IO ()
forall (m :: * -> *) o.
(MonadIO m, IsTlsConnection o) =>
o -> Bool -> m ()
setTlsConnectionUseSystemCertdb
attrTransfer :: forall o b.
(AttrBaseTypeConstraint TlsConnectionUseSystemCertdbPropertyInfo o,
AttrTransferTypeConstraint
TlsConnectionUseSystemCertdbPropertyInfo b) =>
Proxy o
-> b
-> IO (AttrTransferType TlsConnectionUseSystemCertdbPropertyInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint TlsConnectionUseSystemCertdbPropertyInfo o,
AttrSetTypeConstraint
TlsConnectionUseSystemCertdbPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
Bool -> IO (GValueConstruct o)
forall o (m :: * -> *).
(IsTlsConnection o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructTlsConnectionUseSystemCertdb
attrClear :: forall o.
AttrBaseTypeConstraint
TlsConnectionUseSystemCertdbPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.useSystemCertdb"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#g:attr:useSystemCertdb"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TlsConnection
type instance O.AttributeList TlsConnection = TlsConnectionAttributeList
type TlsConnectionAttributeList = ('[ '("advertisedProtocols", TlsConnectionAdvertisedProtocolsPropertyInfo), '("baseIoStream", TlsConnectionBaseIoStreamPropertyInfo), '("certificate", TlsConnectionCertificatePropertyInfo), '("ciphersuiteName", TlsConnectionCiphersuiteNamePropertyInfo), '("closed", Gio.IOStream.IOStreamClosedPropertyInfo), '("database", TlsConnectionDatabasePropertyInfo), '("inputStream", Gio.IOStream.IOStreamInputStreamPropertyInfo), '("interaction", TlsConnectionInteractionPropertyInfo), '("negotiatedProtocol", TlsConnectionNegotiatedProtocolPropertyInfo), '("outputStream", Gio.IOStream.IOStreamOutputStreamPropertyInfo), '("peerCertificate", TlsConnectionPeerCertificatePropertyInfo), '("peerCertificateErrors", TlsConnectionPeerCertificateErrorsPropertyInfo), '("protocolVersion", TlsConnectionProtocolVersionPropertyInfo), '("rehandshakeMode", TlsConnectionRehandshakeModePropertyInfo), '("requireCloseNotify", TlsConnectionRequireCloseNotifyPropertyInfo), '("useSystemCertdb", TlsConnectionUseSystemCertdbPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
tlsConnectionAdvertisedProtocols :: AttrLabelProxy "advertisedProtocols"
tlsConnectionAdvertisedProtocols :: AttrLabelProxy "advertisedProtocols"
tlsConnectionAdvertisedProtocols = AttrLabelProxy "advertisedProtocols"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionBaseIoStream :: AttrLabelProxy "baseIoStream"
tlsConnectionBaseIoStream :: AttrLabelProxy "baseIoStream"
tlsConnectionBaseIoStream = AttrLabelProxy "baseIoStream"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionCertificate :: AttrLabelProxy "certificate"
tlsConnectionCertificate :: AttrLabelProxy "certificate"
tlsConnectionCertificate = AttrLabelProxy "certificate"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionCiphersuiteName :: AttrLabelProxy "ciphersuiteName"
tlsConnectionCiphersuiteName :: AttrLabelProxy "ciphersuiteName"
tlsConnectionCiphersuiteName = AttrLabelProxy "ciphersuiteName"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionDatabase :: AttrLabelProxy "database"
tlsConnectionDatabase :: AttrLabelProxy "database"
tlsConnectionDatabase = AttrLabelProxy "database"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionInteraction :: AttrLabelProxy "interaction"
tlsConnectionInteraction :: AttrLabelProxy "interaction"
tlsConnectionInteraction = AttrLabelProxy "interaction"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionNegotiatedProtocol :: AttrLabelProxy "negotiatedProtocol"
tlsConnectionNegotiatedProtocol :: AttrLabelProxy "negotiatedProtocol"
tlsConnectionNegotiatedProtocol = AttrLabelProxy "negotiatedProtocol"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionPeerCertificate :: AttrLabelProxy "peerCertificate"
tlsConnectionPeerCertificate :: AttrLabelProxy "peerCertificate"
tlsConnectionPeerCertificate = AttrLabelProxy "peerCertificate"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionPeerCertificateErrors :: AttrLabelProxy "peerCertificateErrors"
tlsConnectionPeerCertificateErrors :: AttrLabelProxy "peerCertificateErrors"
tlsConnectionPeerCertificateErrors = AttrLabelProxy "peerCertificateErrors"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionProtocolVersion :: AttrLabelProxy "protocolVersion"
tlsConnectionProtocolVersion :: AttrLabelProxy "protocolVersion"
tlsConnectionProtocolVersion = AttrLabelProxy "protocolVersion"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionRehandshakeMode :: AttrLabelProxy "rehandshakeMode"
tlsConnectionRehandshakeMode :: AttrLabelProxy "rehandshakeMode"
tlsConnectionRehandshakeMode = AttrLabelProxy "rehandshakeMode"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionRequireCloseNotify :: AttrLabelProxy "requireCloseNotify"
tlsConnectionRequireCloseNotify :: AttrLabelProxy "requireCloseNotify"
tlsConnectionRequireCloseNotify = AttrLabelProxy "requireCloseNotify"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
tlsConnectionUseSystemCertdb :: AttrLabelProxy "useSystemCertdb"
tlsConnectionUseSystemCertdb :: AttrLabelProxy "useSystemCertdb"
tlsConnectionUseSystemCertdb = AttrLabelProxy "useSystemCertdb"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList TlsConnection = TlsConnectionSignalList
type TlsConnectionSignalList = ('[ '("acceptCertificate", TlsConnectionAcceptCertificateSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsTlsCertificate b) =>
a -> b -> [TlsCertificateFlags] -> m Bool
tlsConnectionEmitAcceptCertificate a
conn b
peerCert [TlsCertificateFlags]
errors = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
peerCert' <- unsafeManagedPtrCastPtr peerCert
let errors' = [TlsCertificateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [TlsCertificateFlags]
errors
result <- g_tls_connection_emit_accept_certificate conn' peerCert' errors'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr conn
touchManagedPtr peerCert
return result'
#if defined(ENABLE_OVERLOADING)
data TlsConnectionEmitAcceptCertificateMethodInfo
instance (signature ~ (b -> [Gio.Flags.TlsCertificateFlags] -> m Bool), MonadIO m, IsTlsConnection a, Gio.TlsCertificate.IsTlsCertificate b) => O.OverloadedMethod TlsConnectionEmitAcceptCertificateMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> b -> [TlsCertificateFlags] -> m Bool
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsTlsCertificate b) =>
a -> b -> [TlsCertificateFlags] -> m Bool
tlsConnectionEmitAcceptCertificate
instance O.OverloadedMethodInfo TlsConnectionEmitAcceptCertificateMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionEmitAcceptCertificate",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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 (Maybe Gio.TlsCertificate.TlsCertificate)
tlsConnectionGetCertificate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe TlsCertificate)
tlsConnectionGetCertificate a
conn = IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate))
-> IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate)
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result <- g_tls_connection_get_certificate conn'
maybeResult <- convertIfNonNull result $ \Ptr TlsCertificate
result' -> do
result'' <- ((ManagedPtr TlsCertificate -> TlsCertificate)
-> Ptr TlsCertificate -> IO TlsCertificate
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TlsCertificate -> TlsCertificate
Gio.TlsCertificate.TlsCertificate) Ptr TlsCertificate
result'
return result''
touchManagedPtr conn
return maybeResult
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetCertificateMethodInfo
instance (signature ~ (m (Maybe Gio.TlsCertificate.TlsCertificate)), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetCertificateMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m (Maybe TlsCertificate)
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe TlsCertificate)
tlsConnectionGetCertificate
instance O.OverloadedMethodInfo TlsConnectionGetCertificateMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetCertificate",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v:tlsConnectionGetCertificate"
})
#endif
foreign import ccall "g_tls_connection_get_channel_binding_data" g_tls_connection_get_channel_binding_data ::
Ptr TlsConnection ->
CUInt ->
Ptr (Ptr GByteArray) ->
Ptr (Ptr GError) ->
IO CInt
tlsConnectionGetChannelBindingData ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> Gio.Enums.TlsChannelBindingType
-> m (ByteString)
tlsConnectionGetChannelBindingData :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> TlsChannelBindingType -> m ByteString
tlsConnectionGetChannelBindingData a
conn TlsChannelBindingType
type_ = IO ByteString -> m ByteString
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ByteString -> m ByteString) -> IO ByteString -> m ByteString
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
let type_' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (TlsChannelBindingType -> Int) -> TlsChannelBindingType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TlsChannelBindingType -> Int
forall a. Enum a => a -> Int
fromEnum) TlsChannelBindingType
type_
data_ <- callocMem :: IO (Ptr (Ptr GByteArray))
onException (do
_ <- propagateGError $ g_tls_connection_get_channel_binding_data conn' type_' data_
data_' <- peek data_
data_'' <- unpackGByteArray data_'
touchManagedPtr conn
freeMem data_
return data_''
) (do
freeMem data_
)
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetChannelBindingDataMethodInfo
instance (signature ~ (Gio.Enums.TlsChannelBindingType -> m (ByteString)), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetChannelBindingDataMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> TlsChannelBindingType -> m ByteString
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> TlsChannelBindingType -> m ByteString
tlsConnectionGetChannelBindingData
instance O.OverloadedMethodInfo TlsConnectionGetChannelBindingDataMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetChannelBindingData",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v:tlsConnectionGetChannelBindingData"
})
#endif
foreign import ccall "g_tls_connection_get_ciphersuite_name" g_tls_connection_get_ciphersuite_name ::
Ptr TlsConnection ->
IO CString
tlsConnectionGetCiphersuiteName ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m (Maybe T.Text)
tlsConnectionGetCiphersuiteName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe Text)
tlsConnectionGetCiphersuiteName a
conn = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result <- g_tls_connection_get_ciphersuite_name conn'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
freeMem result'
return result''
touchManagedPtr conn
return maybeResult
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetCiphersuiteNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetCiphersuiteNameMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m (Maybe Text)
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe Text)
tlsConnectionGetCiphersuiteName
instance O.OverloadedMethodInfo TlsConnectionGetCiphersuiteNameMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetCiphersuiteName",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v:tlsConnectionGetCiphersuiteName"
})
#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 (Maybe Gio.TlsDatabase.TlsDatabase)
tlsConnectionGetDatabase :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe TlsDatabase)
tlsConnectionGetDatabase a
conn = IO (Maybe TlsDatabase) -> m (Maybe TlsDatabase)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TlsDatabase) -> m (Maybe TlsDatabase))
-> IO (Maybe TlsDatabase) -> m (Maybe TlsDatabase)
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result <- g_tls_connection_get_database conn'
maybeResult <- convertIfNonNull result $ \Ptr TlsDatabase
result' -> do
result'' <- ((ManagedPtr TlsDatabase -> TlsDatabase)
-> Ptr TlsDatabase -> IO TlsDatabase
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TlsDatabase -> TlsDatabase
Gio.TlsDatabase.TlsDatabase) Ptr TlsDatabase
result'
return result''
touchManagedPtr conn
return maybeResult
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetDatabaseMethodInfo
instance (signature ~ (m (Maybe Gio.TlsDatabase.TlsDatabase)), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetDatabaseMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m (Maybe TlsDatabase)
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe TlsDatabase)
tlsConnectionGetDatabase
instance O.OverloadedMethodInfo TlsConnectionGetDatabaseMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetDatabase",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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 (Maybe Gio.TlsInteraction.TlsInteraction)
tlsConnectionGetInteraction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe TlsInteraction)
tlsConnectionGetInteraction a
conn = IO (Maybe TlsInteraction) -> m (Maybe TlsInteraction)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TlsInteraction) -> m (Maybe TlsInteraction))
-> IO (Maybe TlsInteraction) -> m (Maybe TlsInteraction)
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result <- g_tls_connection_get_interaction conn'
maybeResult <- convertIfNonNull result $ \Ptr TlsInteraction
result' -> do
result'' <- ((ManagedPtr TlsInteraction -> TlsInteraction)
-> Ptr TlsInteraction -> IO TlsInteraction
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TlsInteraction -> TlsInteraction
Gio.TlsInteraction.TlsInteraction) Ptr TlsInteraction
result'
return result''
touchManagedPtr conn
return maybeResult
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetInteractionMethodInfo
instance (signature ~ (m (Maybe Gio.TlsInteraction.TlsInteraction)), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetInteractionMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m (Maybe TlsInteraction)
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe TlsInteraction)
tlsConnectionGetInteraction
instance O.OverloadedMethodInfo TlsConnectionGetInteractionMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetInteraction",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v:tlsConnectionGetInteraction"
})
#endif
foreign import ccall "g_tls_connection_get_negotiated_protocol" g_tls_connection_get_negotiated_protocol ::
Ptr TlsConnection ->
IO CString
tlsConnectionGetNegotiatedProtocol ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m (Maybe T.Text)
tlsConnectionGetNegotiatedProtocol :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe Text)
tlsConnectionGetNegotiatedProtocol a
conn = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result <- g_tls_connection_get_negotiated_protocol conn'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
return result''
touchManagedPtr conn
return maybeResult
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetNegotiatedProtocolMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetNegotiatedProtocolMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m (Maybe Text)
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe Text)
tlsConnectionGetNegotiatedProtocol
instance O.OverloadedMethodInfo TlsConnectionGetNegotiatedProtocolMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetNegotiatedProtocol",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v:tlsConnectionGetNegotiatedProtocol"
})
#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 (Maybe Gio.TlsCertificate.TlsCertificate)
tlsConnectionGetPeerCertificate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe TlsCertificate)
tlsConnectionGetPeerCertificate a
conn = IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate))
-> IO (Maybe TlsCertificate) -> m (Maybe TlsCertificate)
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result <- g_tls_connection_get_peer_certificate conn'
maybeResult <- convertIfNonNull result $ \Ptr TlsCertificate
result' -> do
result'' <- ((ManagedPtr TlsCertificate -> TlsCertificate)
-> Ptr TlsCertificate -> IO TlsCertificate
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TlsCertificate -> TlsCertificate
Gio.TlsCertificate.TlsCertificate) Ptr TlsCertificate
result'
return result''
touchManagedPtr conn
return maybeResult
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetPeerCertificateMethodInfo
instance (signature ~ (m (Maybe Gio.TlsCertificate.TlsCertificate)), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetPeerCertificateMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m (Maybe TlsCertificate)
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m (Maybe TlsCertificate)
tlsConnectionGetPeerCertificate
instance O.OverloadedMethodInfo TlsConnectionGetPeerCertificateMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetPeerCertificate",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m [TlsCertificateFlags]
tlsConnectionGetPeerCertificateErrors a
conn = IO [TlsCertificateFlags] -> m [TlsCertificateFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [TlsCertificateFlags] -> m [TlsCertificateFlags])
-> IO [TlsCertificateFlags] -> m [TlsCertificateFlags]
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result <- g_tls_connection_get_peer_certificate_errors conn'
let result' = CUInt -> [TlsCertificateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
touchManagedPtr conn
return result'
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetPeerCertificateErrorsMethodInfo
instance (signature ~ (m [Gio.Flags.TlsCertificateFlags]), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetPeerCertificateErrorsMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m [TlsCertificateFlags]
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m [TlsCertificateFlags]
tlsConnectionGetPeerCertificateErrors
instance O.OverloadedMethodInfo TlsConnectionGetPeerCertificateErrorsMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetPeerCertificateErrors",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v:tlsConnectionGetPeerCertificateErrors"
})
#endif
foreign import ccall "g_tls_connection_get_protocol_version" g_tls_connection_get_protocol_version ::
Ptr TlsConnection ->
IO CUInt
tlsConnectionGetProtocolVersion ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m Gio.Enums.TlsProtocolVersion
tlsConnectionGetProtocolVersion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m TlsProtocolVersion
tlsConnectionGetProtocolVersion a
conn = IO TlsProtocolVersion -> m TlsProtocolVersion
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TlsProtocolVersion -> m TlsProtocolVersion)
-> IO TlsProtocolVersion -> m TlsProtocolVersion
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result <- g_tls_connection_get_protocol_version conn'
let result' = (Int -> TlsProtocolVersion
forall a. Enum a => Int -> a
toEnum (Int -> TlsProtocolVersion)
-> (CUInt -> Int) -> CUInt -> TlsProtocolVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr conn
return result'
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetProtocolVersionMethodInfo
instance (signature ~ (m Gio.Enums.TlsProtocolVersion), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetProtocolVersionMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m TlsProtocolVersion
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m TlsProtocolVersion
tlsConnectionGetProtocolVersion
instance O.OverloadedMethodInfo TlsConnectionGetProtocolVersionMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetProtocolVersion",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v:tlsConnectionGetProtocolVersion"
})
#endif
foreign import ccall "g_tls_connection_get_rehandshake_mode" g_tls_connection_get_rehandshake_mode ::
Ptr TlsConnection ->
IO CUInt
{-# DEPRECATED tlsConnectionGetRehandshakeMode ["(Since version 2.60.)","Changing the rehandshake mode is no longer"," required for compatibility. Also, rehandshaking has been removed"," from the TLS protocol in TLS 1.3."] #-}
tlsConnectionGetRehandshakeMode ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> m Gio.Enums.TlsRehandshakeMode
tlsConnectionGetRehandshakeMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m TlsRehandshakeMode
tlsConnectionGetRehandshakeMode a
conn = IO TlsRehandshakeMode -> m TlsRehandshakeMode
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TlsRehandshakeMode -> m TlsRehandshakeMode)
-> IO TlsRehandshakeMode -> m TlsRehandshakeMode
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result <- g_tls_connection_get_rehandshake_mode conn'
let result' = (Int -> TlsRehandshakeMode
forall a. Enum a => Int -> a
toEnum (Int -> TlsRehandshakeMode)
-> (CUInt -> Int) -> CUInt -> TlsRehandshakeMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr conn
return result'
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetRehandshakeModeMethodInfo
instance (signature ~ (m Gio.Enums.TlsRehandshakeMode), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetRehandshakeModeMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m TlsRehandshakeMode
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m TlsRehandshakeMode
tlsConnectionGetRehandshakeMode
instance O.OverloadedMethodInfo TlsConnectionGetRehandshakeModeMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetRehandshakeMode",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m Bool
tlsConnectionGetRequireCloseNotify a
conn = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result <- g_tls_connection_get_require_close_notify conn'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr conn
return result'
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetRequireCloseNotifyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetRequireCloseNotifyMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m Bool
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m Bool
tlsConnectionGetRequireCloseNotify
instance O.OverloadedMethodInfo TlsConnectionGetRequireCloseNotifyMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetRequireCloseNotify",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m Bool
tlsConnectionGetUseSystemCertdb a
conn = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result <- g_tls_connection_get_use_system_certdb conn'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr conn
return result'
#if defined(ENABLE_OVERLOADING)
data TlsConnectionGetUseSystemCertdbMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionGetUseSystemCertdbMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m Bool
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> m Bool
tlsConnectionGetUseSystemCertdb
instance O.OverloadedMethodInfo TlsConnectionGetUseSystemCertdbMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionGetUseSystemCertdb",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsCancellable b) =>
a -> Maybe b -> m ()
tlsConnectionHandshake a
conn Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ g_tls_connection_handshake conn' maybeCancellable
touchManagedPtr conn
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data TlsConnectionHandshakeMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsTlsConnection a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod TlsConnectionHandshakeMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Maybe b -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsCancellable b) =>
a -> Maybe b -> m ()
tlsConnectionHandshake
instance O.OverloadedMethodInfo TlsConnectionHandshakeMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionHandshake",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsCancellable b) =>
a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
tlsConnectionHandshakeAsync a
conn Int32
ioPriority Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
maybeCallback <- case callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
Just AsyncReadyCallback
jCallback -> do
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
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 = Ptr a
forall a. Ptr a
nullPtr
g_tls_connection_handshake_async conn' ioPriority maybeCancellable maybeCallback userData
touchManagedPtr conn
whenJust cancellable touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data TlsConnectionHandshakeAsyncMethodInfo
instance (signature ~ (Int32 -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsTlsConnection a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod TlsConnectionHandshakeAsyncMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsCancellable b) =>
a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
tlsConnectionHandshakeAsync
instance O.OverloadedMethodInfo TlsConnectionHandshakeAsyncMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionHandshakeAsync",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsAsyncResult b) =>
a -> b -> m ()
tlsConnectionHandshakeFinish a
conn b
result_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
result_' <- unsafeManagedPtrCastPtr result_
onException (do
_ <- propagateGError $ g_tls_connection_handshake_finish conn' result_'
touchManagedPtr conn
touchManagedPtr result_
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data TlsConnectionHandshakeFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsTlsConnection a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod TlsConnectionHandshakeFinishMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> b -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsAsyncResult b) =>
a -> b -> m ()
tlsConnectionHandshakeFinish
instance O.OverloadedMethodInfo TlsConnectionHandshakeFinishMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionHandshakeFinish",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v:tlsConnectionHandshakeFinish"
})
#endif
foreign import ccall "g_tls_connection_set_advertised_protocols" g_tls_connection_set_advertised_protocols ::
Ptr TlsConnection ->
Ptr CString ->
IO ()
tlsConnectionSetAdvertisedProtocols ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> Maybe ([T.Text])
-> m ()
tlsConnectionSetAdvertisedProtocols :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> Maybe [Text] -> m ()
tlsConnectionSetAdvertisedProtocols a
conn Maybe [Text]
protocols = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
maybeProtocols <- case protocols of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
FP.nullPtr
Just [Text]
jProtocols -> do
jProtocols' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jProtocols
return jProtocols'
g_tls_connection_set_advertised_protocols conn' maybeProtocols
touchManagedPtr conn
mapZeroTerminatedCArray freeMem maybeProtocols
freeMem maybeProtocols
return ()
#if defined(ENABLE_OVERLOADING)
data TlsConnectionSetAdvertisedProtocolsMethodInfo
instance (signature ~ (Maybe ([T.Text]) -> m ()), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionSetAdvertisedProtocolsMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Maybe [Text] -> m ()
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> Maybe [Text] -> m ()
tlsConnectionSetAdvertisedProtocols
instance O.OverloadedMethodInfo TlsConnectionSetAdvertisedProtocolsMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionSetAdvertisedProtocols",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v:tlsConnectionSetAdvertisedProtocols"
})
#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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsTlsCertificate b) =>
a -> b -> m ()
tlsConnectionSetCertificate a
conn b
certificate = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
certificate' <- unsafeManagedPtrCastPtr certificate
g_tls_connection_set_certificate conn' certificate'
touchManagedPtr conn
touchManagedPtr certificate
return ()
#if defined(ENABLE_OVERLOADING)
data TlsConnectionSetCertificateMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsTlsConnection a, Gio.TlsCertificate.IsTlsCertificate b) => O.OverloadedMethod TlsConnectionSetCertificateMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> b -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsTlsCertificate b) =>
a -> b -> m ()
tlsConnectionSetCertificate
instance O.OverloadedMethodInfo TlsConnectionSetCertificateMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionSetCertificate",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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
-> Maybe (b)
-> m ()
tlsConnectionSetDatabase :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsTlsDatabase b) =>
a -> Maybe b -> m ()
tlsConnectionSetDatabase a
conn Maybe b
database = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
maybeDatabase <- case database of
Maybe b
Nothing -> Ptr TlsDatabase -> IO (Ptr TlsDatabase)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TlsDatabase
forall a. Ptr a
FP.nullPtr
Just b
jDatabase -> do
jDatabase' <- b -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jDatabase
return jDatabase'
g_tls_connection_set_database conn' maybeDatabase
touchManagedPtr conn
whenJust database touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data TlsConnectionSetDatabaseMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsTlsConnection a, Gio.TlsDatabase.IsTlsDatabase b) => O.OverloadedMethod TlsConnectionSetDatabaseMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Maybe b -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsTlsDatabase b) =>
a -> Maybe b -> m ()
tlsConnectionSetDatabase
instance O.OverloadedMethodInfo TlsConnectionSetDatabaseMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionSetDatabase",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsTlsInteraction b) =>
a -> Maybe b -> m ()
tlsConnectionSetInteraction a
conn Maybe b
interaction = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
maybeInteraction <- case interaction of
Maybe b
Nothing -> Ptr TlsInteraction -> IO (Ptr TlsInteraction)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TlsInteraction
forall a. Ptr a
FP.nullPtr
Just b
jInteraction -> do
jInteraction' <- b -> IO (Ptr TlsInteraction)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jInteraction
return jInteraction'
g_tls_connection_set_interaction conn' maybeInteraction
touchManagedPtr conn
whenJust interaction touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data TlsConnectionSetInteractionMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsTlsConnection a, Gio.TlsInteraction.IsTlsInteraction b) => O.OverloadedMethod TlsConnectionSetInteractionMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Maybe b -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsConnection a, IsTlsInteraction b) =>
a -> Maybe b -> m ()
tlsConnectionSetInteraction
instance O.OverloadedMethodInfo TlsConnectionSetInteractionMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionSetInteraction",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v:tlsConnectionSetInteraction"
})
#endif
foreign import ccall "g_tls_connection_set_rehandshake_mode" g_tls_connection_set_rehandshake_mode ::
Ptr TlsConnection ->
CUInt ->
IO ()
{-# DEPRECATED tlsConnectionSetRehandshakeMode ["(Since version 2.60.)","Changing the rehandshake mode is no longer"," required for compatibility. Also, rehandshaking has been removed"," from the TLS protocol in TLS 1.3."] #-}
tlsConnectionSetRehandshakeMode ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsConnection a) =>
a
-> Gio.Enums.TlsRehandshakeMode
-> m ()
tlsConnectionSetRehandshakeMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> TlsRehandshakeMode -> m ()
tlsConnectionSetRehandshakeMode a
conn TlsRehandshakeMode
mode = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
let mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (TlsRehandshakeMode -> Int) -> TlsRehandshakeMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TlsRehandshakeMode -> Int
forall a. Enum a => a -> Int
fromEnum) TlsRehandshakeMode
mode
g_tls_connection_set_rehandshake_mode conn' mode'
touchManagedPtr conn
return ()
#if defined(ENABLE_OVERLOADING)
data TlsConnectionSetRehandshakeModeMethodInfo
instance (signature ~ (Gio.Enums.TlsRehandshakeMode -> m ()), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionSetRehandshakeModeMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> TlsRehandshakeMode -> m ()
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> TlsRehandshakeMode -> m ()
tlsConnectionSetRehandshakeMode
instance O.OverloadedMethodInfo TlsConnectionSetRehandshakeModeMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionSetRehandshakeMode",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> Bool -> m ()
tlsConnectionSetRequireCloseNotify a
conn Bool
requireCloseNotify = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
let requireCloseNotify' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
requireCloseNotify
g_tls_connection_set_require_close_notify conn' requireCloseNotify'
touchManagedPtr conn
return ()
#if defined(ENABLE_OVERLOADING)
data TlsConnectionSetRequireCloseNotifyMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionSetRequireCloseNotifyMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Bool -> m ()
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> Bool -> m ()
tlsConnectionSetRequireCloseNotify
instance O.OverloadedMethodInfo TlsConnectionSetRequireCloseNotifyMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionSetRequireCloseNotify",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> Bool -> m ()
tlsConnectionSetUseSystemCertdb a
conn Bool
useSystemCertdb = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
conn' <- a -> IO (Ptr TlsConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
conn
let useSystemCertdb' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
useSystemCertdb
g_tls_connection_set_use_system_certdb conn' useSystemCertdb'
touchManagedPtr conn
return ()
#if defined(ENABLE_OVERLOADING)
data TlsConnectionSetUseSystemCertdbMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsTlsConnection a) => O.OverloadedMethod TlsConnectionSetUseSystemCertdbMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Bool -> m ()
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsConnection a) =>
a -> Bool -> m ()
tlsConnectionSetUseSystemCertdb
instance O.OverloadedMethodInfo TlsConnectionSetUseSystemCertdbMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.TlsConnection.tlsConnectionSetUseSystemCertdb",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-TlsConnection.html#v:tlsConnectionSetUseSystemCertdb"
})
#endif