{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Interfaces.TlsBackend
(
TlsBackend(..) ,
IsTlsBackend ,
toTlsBackend ,
#if defined(ENABLE_OVERLOADING)
ResolveTlsBackendMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsBackendGetCertificateTypeMethodInfo ,
#endif
tlsBackendGetCertificateType ,
#if defined(ENABLE_OVERLOADING)
TlsBackendGetClientConnectionTypeMethodInfo,
#endif
tlsBackendGetClientConnectionType ,
tlsBackendGetDefault ,
#if defined(ENABLE_OVERLOADING)
TlsBackendGetDefaultDatabaseMethodInfo ,
#endif
tlsBackendGetDefaultDatabase ,
#if defined(ENABLE_OVERLOADING)
TlsBackendGetDtlsClientConnectionTypeMethodInfo,
#endif
tlsBackendGetDtlsClientConnectionType ,
#if defined(ENABLE_OVERLOADING)
TlsBackendGetDtlsServerConnectionTypeMethodInfo,
#endif
tlsBackendGetDtlsServerConnectionType ,
#if defined(ENABLE_OVERLOADING)
TlsBackendGetFileDatabaseTypeMethodInfo ,
#endif
tlsBackendGetFileDatabaseType ,
#if defined(ENABLE_OVERLOADING)
TlsBackendGetServerConnectionTypeMethodInfo,
#endif
tlsBackendGetServerConnectionType ,
#if defined(ENABLE_OVERLOADING)
TlsBackendSetDefaultDatabaseMethodInfo ,
#endif
tlsBackendSetDefaultDatabase ,
#if defined(ENABLE_OVERLOADING)
TlsBackendSupportsDtlsMethodInfo ,
#endif
tlsBackendSupportsDtls ,
#if defined(ENABLE_OVERLOADING)
TlsBackendSupportsTlsMethodInfo ,
#endif
tlsBackendSupportsTls ,
) 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.TlsConnection as Gio.TlsConnection
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 {-# SOURCE #-} qualified GI.Gio.Objects.TlsDatabase as Gio.TlsDatabase
#endif
newtype TlsBackend = TlsBackend (SP.ManagedPtr TlsBackend)
deriving (TlsBackend -> TlsBackend -> Bool
(TlsBackend -> TlsBackend -> Bool)
-> (TlsBackend -> TlsBackend -> Bool) -> Eq TlsBackend
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TlsBackend -> TlsBackend -> Bool
== :: TlsBackend -> TlsBackend -> Bool
$c/= :: TlsBackend -> TlsBackend -> Bool
/= :: TlsBackend -> TlsBackend -> Bool
Eq)
instance SP.ManagedPtrNewtype TlsBackend where
toManagedPtr :: TlsBackend -> ManagedPtr TlsBackend
toManagedPtr (TlsBackend ManagedPtr TlsBackend
p) = ManagedPtr TlsBackend
p
foreign import ccall "g_tls_backend_get_type"
c_g_tls_backend_get_type :: IO B.Types.GType
instance B.Types.TypedObject TlsBackend where
glibType :: IO GType
glibType = IO GType
c_g_tls_backend_get_type
instance B.Types.GObject TlsBackend
class (SP.GObject o, O.IsDescendantOf TlsBackend o) => IsTlsBackend o
instance (SP.GObject o, O.IsDescendantOf TlsBackend o) => IsTlsBackend o
instance O.HasParentTypes TlsBackend
type instance O.ParentTypes TlsBackend = '[GObject.Object.Object]
toTlsBackend :: (MIO.MonadIO m, IsTlsBackend o) => o -> m TlsBackend
toTlsBackend :: forall (m :: * -> *) o.
(MonadIO m, IsTlsBackend o) =>
o -> m TlsBackend
toTlsBackend = IO TlsBackend -> m TlsBackend
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO TlsBackend -> m TlsBackend)
-> (o -> IO TlsBackend) -> o -> m TlsBackend
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr TlsBackend -> TlsBackend) -> o -> IO TlsBackend
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr TlsBackend -> TlsBackend
TlsBackend
instance B.GValue.IsGValue (Maybe TlsBackend) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_tls_backend_get_type
gvalueSet_ :: Ptr GValue -> Maybe TlsBackend -> IO ()
gvalueSet_ Ptr GValue
gv Maybe TlsBackend
P.Nothing = Ptr GValue -> Ptr TlsBackend -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr TlsBackend
forall a. Ptr a
FP.nullPtr :: FP.Ptr TlsBackend)
gvalueSet_ Ptr GValue
gv (P.Just TlsBackend
obj) = TlsBackend -> (Ptr TlsBackend -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TlsBackend
obj (Ptr GValue -> Ptr TlsBackend -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe TlsBackend)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr TlsBackend)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr TlsBackend)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject TlsBackend ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TlsBackend
type instance O.AttributeList TlsBackend = TlsBackendAttributeList
type TlsBackendAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveTlsBackendMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveTlsBackendMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTlsBackendMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTlsBackendMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTlsBackendMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTlsBackendMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTlsBackendMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTlsBackendMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTlsBackendMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTlsBackendMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTlsBackendMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTlsBackendMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTlsBackendMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTlsBackendMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTlsBackendMethod "supportsDtls" o = TlsBackendSupportsDtlsMethodInfo
ResolveTlsBackendMethod "supportsTls" o = TlsBackendSupportsTlsMethodInfo
ResolveTlsBackendMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTlsBackendMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTlsBackendMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTlsBackendMethod "getCertificateType" o = TlsBackendGetCertificateTypeMethodInfo
ResolveTlsBackendMethod "getClientConnectionType" o = TlsBackendGetClientConnectionTypeMethodInfo
ResolveTlsBackendMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTlsBackendMethod "getDefaultDatabase" o = TlsBackendGetDefaultDatabaseMethodInfo
ResolveTlsBackendMethod "getDtlsClientConnectionType" o = TlsBackendGetDtlsClientConnectionTypeMethodInfo
ResolveTlsBackendMethod "getDtlsServerConnectionType" o = TlsBackendGetDtlsServerConnectionTypeMethodInfo
ResolveTlsBackendMethod "getFileDatabaseType" o = TlsBackendGetFileDatabaseTypeMethodInfo
ResolveTlsBackendMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTlsBackendMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTlsBackendMethod "getServerConnectionType" o = TlsBackendGetServerConnectionTypeMethodInfo
ResolveTlsBackendMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTlsBackendMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveTlsBackendMethod "setDefaultDatabase" o = TlsBackendSetDefaultDatabaseMethodInfo
ResolveTlsBackendMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTlsBackendMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTlsBackendMethod t TlsBackend, O.OverloadedMethod info TlsBackend p) => OL.IsLabel t (TlsBackend -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveTlsBackendMethod t TlsBackend, O.OverloadedMethod info TlsBackend p, R.HasField t TlsBackend p) => R.HasField t TlsBackend p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveTlsBackendMethod t TlsBackend, O.OverloadedMethodInfo info TlsBackend) => OL.IsLabel t (O.MethodProxy info TlsBackend) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
foreign import ccall "g_tls_backend_get_certificate_type" g_tls_backend_get_certificate_type ::
Ptr TlsBackend ->
IO CGType
tlsBackendGetCertificateType ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsBackend a) =>
a
-> m GType
tlsBackendGetCertificateType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsBackend a) =>
a -> m GType
tlsBackendGetCertificateType a
backend = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
backend' <- a -> IO (Ptr TlsBackend)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
backend
result <- g_tls_backend_get_certificate_type backend'
let result' = CGType -> GType
GType CGType
result
touchManagedPtr backend
return result'
#if defined(ENABLE_OVERLOADING)
data TlsBackendGetCertificateTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.OverloadedMethod TlsBackendGetCertificateTypeMethodInfo a signature where
overloadedMethod = tlsBackendGetCertificateType
instance O.OverloadedMethodInfo TlsBackendGetCertificateTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.TlsBackend.tlsBackendGetCertificateType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-TlsBackend.html#v:tlsBackendGetCertificateType"
})
#endif
foreign import ccall "g_tls_backend_get_client_connection_type" g_tls_backend_get_client_connection_type ::
Ptr TlsBackend ->
IO CGType
tlsBackendGetClientConnectionType ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsBackend a) =>
a
-> m GType
tlsBackendGetClientConnectionType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsBackend a) =>
a -> m GType
tlsBackendGetClientConnectionType a
backend = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
backend' <- a -> IO (Ptr TlsBackend)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
backend
result <- g_tls_backend_get_client_connection_type backend'
let result' = CGType -> GType
GType CGType
result
touchManagedPtr backend
return result'
#if defined(ENABLE_OVERLOADING)
data TlsBackendGetClientConnectionTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.OverloadedMethod TlsBackendGetClientConnectionTypeMethodInfo a signature where
overloadedMethod = tlsBackendGetClientConnectionType
instance O.OverloadedMethodInfo TlsBackendGetClientConnectionTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.TlsBackend.tlsBackendGetClientConnectionType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-TlsBackend.html#v:tlsBackendGetClientConnectionType"
})
#endif
foreign import ccall "g_tls_backend_get_default_database" g_tls_backend_get_default_database ::
Ptr TlsBackend ->
IO (Ptr Gio.TlsDatabase.TlsDatabase)
tlsBackendGetDefaultDatabase ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsBackend a) =>
a
-> m Gio.TlsDatabase.TlsDatabase
tlsBackendGetDefaultDatabase :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsBackend a) =>
a -> m TlsDatabase
tlsBackendGetDefaultDatabase a
backend = IO TlsDatabase -> m TlsDatabase
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TlsDatabase -> m TlsDatabase)
-> IO TlsDatabase -> m TlsDatabase
forall a b. (a -> b) -> a -> b
$ do
backend' <- a -> IO (Ptr TlsBackend)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
backend
result <- g_tls_backend_get_default_database backend'
checkUnexpectedReturnNULL "tlsBackendGetDefaultDatabase" result
result' <- (wrapObject Gio.TlsDatabase.TlsDatabase) result
touchManagedPtr backend
return result'
#if defined(ENABLE_OVERLOADING)
data TlsBackendGetDefaultDatabaseMethodInfo
instance (signature ~ (m Gio.TlsDatabase.TlsDatabase), MonadIO m, IsTlsBackend a) => O.OverloadedMethod TlsBackendGetDefaultDatabaseMethodInfo a signature where
overloadedMethod = tlsBackendGetDefaultDatabase
instance O.OverloadedMethodInfo TlsBackendGetDefaultDatabaseMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.TlsBackend.tlsBackendGetDefaultDatabase",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-TlsBackend.html#v:tlsBackendGetDefaultDatabase"
})
#endif
foreign import ccall "g_tls_backend_get_dtls_client_connection_type" g_tls_backend_get_dtls_client_connection_type ::
Ptr TlsBackend ->
IO CGType
tlsBackendGetDtlsClientConnectionType ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsBackend a) =>
a
-> m GType
tlsBackendGetDtlsClientConnectionType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsBackend a) =>
a -> m GType
tlsBackendGetDtlsClientConnectionType a
backend = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
backend' <- a -> IO (Ptr TlsBackend)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
backend
result <- g_tls_backend_get_dtls_client_connection_type backend'
let result' = CGType -> GType
GType CGType
result
touchManagedPtr backend
return result'
#if defined(ENABLE_OVERLOADING)
data TlsBackendGetDtlsClientConnectionTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.OverloadedMethod TlsBackendGetDtlsClientConnectionTypeMethodInfo a signature where
overloadedMethod = tlsBackendGetDtlsClientConnectionType
instance O.OverloadedMethodInfo TlsBackendGetDtlsClientConnectionTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.TlsBackend.tlsBackendGetDtlsClientConnectionType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-TlsBackend.html#v:tlsBackendGetDtlsClientConnectionType"
})
#endif
foreign import ccall "g_tls_backend_get_dtls_server_connection_type" g_tls_backend_get_dtls_server_connection_type ::
Ptr TlsBackend ->
IO CGType
tlsBackendGetDtlsServerConnectionType ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsBackend a) =>
a
-> m GType
tlsBackendGetDtlsServerConnectionType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsBackend a) =>
a -> m GType
tlsBackendGetDtlsServerConnectionType a
backend = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
backend' <- a -> IO (Ptr TlsBackend)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
backend
result <- g_tls_backend_get_dtls_server_connection_type backend'
let result' = CGType -> GType
GType CGType
result
touchManagedPtr backend
return result'
#if defined(ENABLE_OVERLOADING)
data TlsBackendGetDtlsServerConnectionTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.OverloadedMethod TlsBackendGetDtlsServerConnectionTypeMethodInfo a signature where
overloadedMethod = tlsBackendGetDtlsServerConnectionType
instance O.OverloadedMethodInfo TlsBackendGetDtlsServerConnectionTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.TlsBackend.tlsBackendGetDtlsServerConnectionType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-TlsBackend.html#v:tlsBackendGetDtlsServerConnectionType"
})
#endif
foreign import ccall "g_tls_backend_get_file_database_type" g_tls_backend_get_file_database_type ::
Ptr TlsBackend ->
IO CGType
tlsBackendGetFileDatabaseType ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsBackend a) =>
a
-> m GType
tlsBackendGetFileDatabaseType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsBackend a) =>
a -> m GType
tlsBackendGetFileDatabaseType a
backend = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
backend' <- a -> IO (Ptr TlsBackend)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
backend
result <- g_tls_backend_get_file_database_type backend'
let result' = CGType -> GType
GType CGType
result
touchManagedPtr backend
return result'
#if defined(ENABLE_OVERLOADING)
data TlsBackendGetFileDatabaseTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.OverloadedMethod TlsBackendGetFileDatabaseTypeMethodInfo a signature where
overloadedMethod = tlsBackendGetFileDatabaseType
instance O.OverloadedMethodInfo TlsBackendGetFileDatabaseTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.TlsBackend.tlsBackendGetFileDatabaseType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-TlsBackend.html#v:tlsBackendGetFileDatabaseType"
})
#endif
foreign import ccall "g_tls_backend_get_server_connection_type" g_tls_backend_get_server_connection_type ::
Ptr TlsBackend ->
IO CGType
tlsBackendGetServerConnectionType ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsBackend a) =>
a
-> m GType
tlsBackendGetServerConnectionType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsBackend a) =>
a -> m GType
tlsBackendGetServerConnectionType a
backend = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
backend' <- a -> IO (Ptr TlsBackend)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
backend
result <- g_tls_backend_get_server_connection_type backend'
let result' = CGType -> GType
GType CGType
result
touchManagedPtr backend
return result'
#if defined(ENABLE_OVERLOADING)
data TlsBackendGetServerConnectionTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.OverloadedMethod TlsBackendGetServerConnectionTypeMethodInfo a signature where
overloadedMethod = tlsBackendGetServerConnectionType
instance O.OverloadedMethodInfo TlsBackendGetServerConnectionTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.TlsBackend.tlsBackendGetServerConnectionType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-TlsBackend.html#v:tlsBackendGetServerConnectionType"
})
#endif
foreign import ccall "g_tls_backend_set_default_database" g_tls_backend_set_default_database ::
Ptr TlsBackend ->
Ptr Gio.TlsDatabase.TlsDatabase ->
IO ()
tlsBackendSetDefaultDatabase ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsBackend a, Gio.TlsDatabase.IsTlsDatabase b) =>
a
-> Maybe (b)
-> m ()
tlsBackendSetDefaultDatabase :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsBackend a, IsTlsDatabase b) =>
a -> Maybe b -> m ()
tlsBackendSetDefaultDatabase a
backend 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
backend' <- a -> IO (Ptr TlsBackend)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
backend
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_backend_set_default_database backend' maybeDatabase
touchManagedPtr backend
whenJust database touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data TlsBackendSetDefaultDatabaseMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsTlsBackend a, Gio.TlsDatabase.IsTlsDatabase b) => O.OverloadedMethod TlsBackendSetDefaultDatabaseMethodInfo a signature where
overloadedMethod = tlsBackendSetDefaultDatabase
instance O.OverloadedMethodInfo TlsBackendSetDefaultDatabaseMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.TlsBackend.tlsBackendSetDefaultDatabase",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-TlsBackend.html#v:tlsBackendSetDefaultDatabase"
})
#endif
foreign import ccall "g_tls_backend_supports_dtls" g_tls_backend_supports_dtls ::
Ptr TlsBackend ->
IO CInt
tlsBackendSupportsDtls ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsBackend a) =>
a
-> m Bool
tlsBackendSupportsDtls :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsBackend a) =>
a -> m Bool
tlsBackendSupportsDtls a
backend = 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
backend' <- a -> IO (Ptr TlsBackend)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
backend
result <- g_tls_backend_supports_dtls backend'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr backend
return result'
#if defined(ENABLE_OVERLOADING)
data TlsBackendSupportsDtlsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTlsBackend a) => O.OverloadedMethod TlsBackendSupportsDtlsMethodInfo a signature where
overloadedMethod = tlsBackendSupportsDtls
instance O.OverloadedMethodInfo TlsBackendSupportsDtlsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.TlsBackend.tlsBackendSupportsDtls",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-TlsBackend.html#v:tlsBackendSupportsDtls"
})
#endif
foreign import ccall "g_tls_backend_supports_tls" g_tls_backend_supports_tls ::
Ptr TlsBackend ->
IO CInt
tlsBackendSupportsTls ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsBackend a) =>
a
-> m Bool
tlsBackendSupportsTls :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTlsBackend a) =>
a -> m Bool
tlsBackendSupportsTls a
backend = 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
backend' <- a -> IO (Ptr TlsBackend)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
backend
result <- g_tls_backend_supports_tls backend'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr backend
return result'
#if defined(ENABLE_OVERLOADING)
data TlsBackendSupportsTlsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTlsBackend a) => O.OverloadedMethod TlsBackendSupportsTlsMethodInfo a signature where
overloadedMethod = tlsBackendSupportsTls
instance O.OverloadedMethodInfo TlsBackendSupportsTlsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Interfaces.TlsBackend.tlsBackendSupportsTls",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Interfaces-TlsBackend.html#v:tlsBackendSupportsTls"
})
#endif
foreign import ccall "g_tls_backend_get_default" g_tls_backend_get_default ::
IO (Ptr TlsBackend)
tlsBackendGetDefault ::
(B.CallStack.HasCallStack, MonadIO m) =>
m TlsBackend
tlsBackendGetDefault :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m TlsBackend
tlsBackendGetDefault = IO TlsBackend -> m TlsBackend
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TlsBackend -> m TlsBackend) -> IO TlsBackend -> m TlsBackend
forall a b. (a -> b) -> a -> b
$ do
result <- IO (Ptr TlsBackend)
g_tls_backend_get_default
checkUnexpectedReturnNULL "tlsBackendGetDefault" result
result' <- (newObject TlsBackend) result
return result'
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList TlsBackend = TlsBackendSignalList
type TlsBackendSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif