#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Interfaces.TlsBackend
(
TlsBackend(..) ,
noTlsBackend ,
IsTlsBackend ,
toTlsBackend ,
#if ENABLE_OVERLOADING
TlsBackendGetCertificateTypeMethodInfo ,
#endif
tlsBackendGetCertificateType ,
#if ENABLE_OVERLOADING
TlsBackendGetClientConnectionTypeMethodInfo,
#endif
tlsBackendGetClientConnectionType ,
tlsBackendGetDefault ,
#if ENABLE_OVERLOADING
TlsBackendGetDefaultDatabaseMethodInfo ,
#endif
tlsBackendGetDefaultDatabase ,
#if ENABLE_OVERLOADING
TlsBackendGetDtlsClientConnectionTypeMethodInfo,
#endif
tlsBackendGetDtlsClientConnectionType ,
#if ENABLE_OVERLOADING
TlsBackendGetDtlsServerConnectionTypeMethodInfo,
#endif
tlsBackendGetDtlsServerConnectionType ,
#if ENABLE_OVERLOADING
TlsBackendGetFileDatabaseTypeMethodInfo ,
#endif
tlsBackendGetFileDatabaseType ,
#if ENABLE_OVERLOADING
TlsBackendGetServerConnectionTypeMethodInfo,
#endif
tlsBackendGetServerConnectionType ,
#if ENABLE_OVERLOADING
TlsBackendSetDefaultDatabaseMethodInfo ,
#endif
tlsBackendSetDefaultDatabase ,
#if ENABLE_OVERLOADING
TlsBackendSupportsDtlsMethodInfo ,
#endif
tlsBackendSupportsDtls ,
#if 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Objects.TlsDatabase as Gio.TlsDatabase
newtype TlsBackend = TlsBackend (ManagedPtr TlsBackend)
noTlsBackend :: Maybe TlsBackend
noTlsBackend = Nothing
#if ENABLE_OVERLOADING
type instance O.SignalList TlsBackend = TlsBackendSignalList
type TlsBackendSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_tls_backend_get_type"
c_g_tls_backend_get_type :: IO GType
instance GObject TlsBackend where
gobjectType = c_g_tls_backend_get_type
class (GObject o, O.IsDescendantOf TlsBackend o) => IsTlsBackend o
instance (GObject o, O.IsDescendantOf TlsBackend o) => IsTlsBackend o
instance O.HasParentTypes TlsBackend
type instance O.ParentTypes TlsBackend = '[GObject.Object.Object]
toTlsBackend :: (MonadIO m, IsTlsBackend o) => o -> m TlsBackend
toTlsBackend = liftIO . unsafeCastTo TlsBackend
#if ENABLE_OVERLOADING
instance O.HasAttributeList TlsBackend
type instance O.AttributeList TlsBackend = TlsBackendAttributeList
type TlsBackendAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type family ResolveTlsBackendMethod (t :: Symbol) (o :: *) :: * 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.MethodInfo info TlsBackend p) => OL.IsLabel t (TlsBackend -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
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 backend = liftIO $ do
backend' <- unsafeManagedPtrCastPtr backend
result <- g_tls_backend_get_certificate_type backend'
let result' = GType result
touchManagedPtr backend
return result'
#if ENABLE_OVERLOADING
data TlsBackendGetCertificateTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.MethodInfo TlsBackendGetCertificateTypeMethodInfo a signature where
overloadedMethod _ = 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 backend = liftIO $ do
backend' <- unsafeManagedPtrCastPtr backend
result <- g_tls_backend_get_client_connection_type backend'
let result' = GType result
touchManagedPtr backend
return result'
#if ENABLE_OVERLOADING
data TlsBackendGetClientConnectionTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.MethodInfo TlsBackendGetClientConnectionTypeMethodInfo a signature where
overloadedMethod _ = 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 backend = liftIO $ do
backend' <- unsafeManagedPtrCastPtr backend
result <- g_tls_backend_get_default_database backend'
checkUnexpectedReturnNULL "tlsBackendGetDefaultDatabase" result
result' <- (wrapObject Gio.TlsDatabase.TlsDatabase) result
touchManagedPtr backend
return result'
#if ENABLE_OVERLOADING
data TlsBackendGetDefaultDatabaseMethodInfo
instance (signature ~ (m Gio.TlsDatabase.TlsDatabase), MonadIO m, IsTlsBackend a) => O.MethodInfo TlsBackendGetDefaultDatabaseMethodInfo a signature where
overloadedMethod _ = 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 backend = liftIO $ do
backend' <- unsafeManagedPtrCastPtr backend
result <- g_tls_backend_get_dtls_client_connection_type backend'
let result' = GType result
touchManagedPtr backend
return result'
#if ENABLE_OVERLOADING
data TlsBackendGetDtlsClientConnectionTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.MethodInfo TlsBackendGetDtlsClientConnectionTypeMethodInfo a signature where
overloadedMethod _ = 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 backend = liftIO $ do
backend' <- unsafeManagedPtrCastPtr backend
result <- g_tls_backend_get_dtls_server_connection_type backend'
let result' = GType result
touchManagedPtr backend
return result'
#if ENABLE_OVERLOADING
data TlsBackendGetDtlsServerConnectionTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.MethodInfo TlsBackendGetDtlsServerConnectionTypeMethodInfo a signature where
overloadedMethod _ = 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 backend = liftIO $ do
backend' <- unsafeManagedPtrCastPtr backend
result <- g_tls_backend_get_file_database_type backend'
let result' = GType result
touchManagedPtr backend
return result'
#if ENABLE_OVERLOADING
data TlsBackendGetFileDatabaseTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.MethodInfo TlsBackendGetFileDatabaseTypeMethodInfo a signature where
overloadedMethod _ = 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 backend = liftIO $ do
backend' <- unsafeManagedPtrCastPtr backend
result <- g_tls_backend_get_server_connection_type backend'
let result' = GType result
touchManagedPtr backend
return result'
#if ENABLE_OVERLOADING
data TlsBackendGetServerConnectionTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsTlsBackend a) => O.MethodInfo TlsBackendGetServerConnectionTypeMethodInfo a signature where
overloadedMethod _ = 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 backend database = liftIO $ do
backend' <- unsafeManagedPtrCastPtr backend
maybeDatabase <- case database of
Nothing -> return nullPtr
Just jDatabase -> do
jDatabase' <- unsafeManagedPtrCastPtr jDatabase
return jDatabase'
g_tls_backend_set_default_database backend' maybeDatabase
touchManagedPtr backend
whenJust database touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data TlsBackendSetDefaultDatabaseMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsTlsBackend a, Gio.TlsDatabase.IsTlsDatabase b) => O.MethodInfo TlsBackendSetDefaultDatabaseMethodInfo a signature where
overloadedMethod _ = 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 backend = liftIO $ do
backend' <- unsafeManagedPtrCastPtr backend
result <- g_tls_backend_supports_dtls backend'
let result' = (/= 0) result
touchManagedPtr backend
return result'
#if ENABLE_OVERLOADING
data TlsBackendSupportsDtlsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTlsBackend a) => O.MethodInfo TlsBackendSupportsDtlsMethodInfo a signature where
overloadedMethod _ = 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 backend = liftIO $ do
backend' <- unsafeManagedPtrCastPtr backend
result <- g_tls_backend_supports_tls backend'
let result' = (/= 0) result
touchManagedPtr backend
return result'
#if ENABLE_OVERLOADING
data TlsBackendSupportsTlsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTlsBackend a) => O.MethodInfo TlsBackendSupportsTlsMethodInfo a signature where
overloadedMethod _ = 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 = liftIO $ do
result <- g_tls_backend_get_default
checkUnexpectedReturnNULL "tlsBackendGetDefault" result
result' <- (newObject TlsBackend) result
return result'
#if ENABLE_OVERLOADING
#endif