{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.TlsDatabase
(
TlsDatabase(..) ,
IsTlsDatabase ,
toTlsDatabase ,
#if defined(ENABLE_OVERLOADING)
ResolveTlsDatabaseMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TlsDatabaseCreateCertificateHandleMethodInfo,
#endif
tlsDatabaseCreateCertificateHandle ,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseLookupCertificateForHandleMethodInfo,
#endif
tlsDatabaseLookupCertificateForHandle ,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseLookupCertificateForHandleAsyncMethodInfo,
#endif
tlsDatabaseLookupCertificateForHandleAsync,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseLookupCertificateForHandleFinishMethodInfo,
#endif
tlsDatabaseLookupCertificateForHandleFinish,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseLookupCertificateIssuerMethodInfo,
#endif
tlsDatabaseLookupCertificateIssuer ,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseLookupCertificateIssuerAsyncMethodInfo,
#endif
tlsDatabaseLookupCertificateIssuerAsync ,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseLookupCertificateIssuerFinishMethodInfo,
#endif
tlsDatabaseLookupCertificateIssuerFinish,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseLookupCertificatesIssuedByMethodInfo,
#endif
tlsDatabaseLookupCertificatesIssuedBy ,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseLookupCertificatesIssuedByAsyncMethodInfo,
#endif
tlsDatabaseLookupCertificatesIssuedByAsync,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseLookupCertificatesIssuedByFinishMethodInfo,
#endif
tlsDatabaseLookupCertificatesIssuedByFinish,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseVerifyChainMethodInfo ,
#endif
tlsDatabaseVerifyChain ,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseVerifyChainAsyncMethodInfo ,
#endif
tlsDatabaseVerifyChainAsync ,
#if defined(ENABLE_OVERLOADING)
TlsDatabaseVerifyChainFinishMethodInfo ,
#endif
tlsDatabaseVerifyChainFinish ,
) 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.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.Interfaces.SocketConnectable as Gio.SocketConnectable
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.TlsCertificate as Gio.TlsCertificate
import {-# SOURCE #-} qualified GI.Gio.Objects.TlsInteraction as Gio.TlsInteraction
#endif
newtype TlsDatabase = TlsDatabase (SP.ManagedPtr TlsDatabase)
deriving (TlsDatabase -> TlsDatabase -> Bool
(TlsDatabase -> TlsDatabase -> Bool)
-> (TlsDatabase -> TlsDatabase -> Bool) -> Eq TlsDatabase
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TlsDatabase -> TlsDatabase -> Bool
== :: TlsDatabase -> TlsDatabase -> Bool
$c/= :: TlsDatabase -> TlsDatabase -> Bool
/= :: TlsDatabase -> TlsDatabase -> Bool
Eq)
instance SP.ManagedPtrNewtype TlsDatabase where
toManagedPtr :: TlsDatabase -> ManagedPtr TlsDatabase
toManagedPtr (TlsDatabase ManagedPtr TlsDatabase
p) = ManagedPtr TlsDatabase
p
foreign import ccall "g_tls_database_get_type"
c_g_tls_database_get_type :: IO B.Types.GType
instance B.Types.TypedObject TlsDatabase where
glibType :: IO GType
glibType = IO GType
c_g_tls_database_get_type
instance B.Types.GObject TlsDatabase
class (SP.GObject o, O.IsDescendantOf TlsDatabase o) => IsTlsDatabase o
instance (SP.GObject o, O.IsDescendantOf TlsDatabase o) => IsTlsDatabase o
instance O.HasParentTypes TlsDatabase
type instance O.ParentTypes TlsDatabase = '[GObject.Object.Object]
toTlsDatabase :: (MIO.MonadIO m, IsTlsDatabase o) => o -> m TlsDatabase
toTlsDatabase :: forall (m :: * -> *) o.
(MonadIO m, IsTlsDatabase o) =>
o -> m TlsDatabase
toTlsDatabase = IO TlsDatabase -> m TlsDatabase
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO TlsDatabase -> m TlsDatabase)
-> (o -> IO TlsDatabase) -> o -> m TlsDatabase
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr TlsDatabase -> TlsDatabase) -> o -> IO TlsDatabase
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr TlsDatabase -> TlsDatabase
TlsDatabase
instance B.GValue.IsGValue (Maybe TlsDatabase) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_tls_database_get_type
gvalueSet_ :: Ptr GValue -> Maybe TlsDatabase -> IO ()
gvalueSet_ Ptr GValue
gv Maybe TlsDatabase
P.Nothing = Ptr GValue -> Ptr TlsDatabase -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr TlsDatabase
forall a. Ptr a
FP.nullPtr :: FP.Ptr TlsDatabase)
gvalueSet_ Ptr GValue
gv (P.Just TlsDatabase
obj) = TlsDatabase -> (Ptr TlsDatabase -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TlsDatabase
obj (Ptr GValue -> Ptr TlsDatabase -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe TlsDatabase)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr TlsDatabase)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr TlsDatabase)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject TlsDatabase ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveTlsDatabaseMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveTlsDatabaseMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTlsDatabaseMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTlsDatabaseMethod "createCertificateHandle" o = TlsDatabaseCreateCertificateHandleMethodInfo
ResolveTlsDatabaseMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTlsDatabaseMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTlsDatabaseMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTlsDatabaseMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTlsDatabaseMethod "lookupCertificateForHandle" o = TlsDatabaseLookupCertificateForHandleMethodInfo
ResolveTlsDatabaseMethod "lookupCertificateForHandleAsync" o = TlsDatabaseLookupCertificateForHandleAsyncMethodInfo
ResolveTlsDatabaseMethod "lookupCertificateForHandleFinish" o = TlsDatabaseLookupCertificateForHandleFinishMethodInfo
ResolveTlsDatabaseMethod "lookupCertificateIssuer" o = TlsDatabaseLookupCertificateIssuerMethodInfo
ResolveTlsDatabaseMethod "lookupCertificateIssuerAsync" o = TlsDatabaseLookupCertificateIssuerAsyncMethodInfo
ResolveTlsDatabaseMethod "lookupCertificateIssuerFinish" o = TlsDatabaseLookupCertificateIssuerFinishMethodInfo
ResolveTlsDatabaseMethod "lookupCertificatesIssuedBy" o = TlsDatabaseLookupCertificatesIssuedByMethodInfo
ResolveTlsDatabaseMethod "lookupCertificatesIssuedByAsync" o = TlsDatabaseLookupCertificatesIssuedByAsyncMethodInfo
ResolveTlsDatabaseMethod "lookupCertificatesIssuedByFinish" o = TlsDatabaseLookupCertificatesIssuedByFinishMethodInfo
ResolveTlsDatabaseMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTlsDatabaseMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTlsDatabaseMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTlsDatabaseMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTlsDatabaseMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTlsDatabaseMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTlsDatabaseMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTlsDatabaseMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTlsDatabaseMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTlsDatabaseMethod "verifyChain" o = TlsDatabaseVerifyChainMethodInfo
ResolveTlsDatabaseMethod "verifyChainAsync" o = TlsDatabaseVerifyChainAsyncMethodInfo
ResolveTlsDatabaseMethod "verifyChainFinish" o = TlsDatabaseVerifyChainFinishMethodInfo
ResolveTlsDatabaseMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTlsDatabaseMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTlsDatabaseMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTlsDatabaseMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTlsDatabaseMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTlsDatabaseMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveTlsDatabaseMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTlsDatabaseMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTlsDatabaseMethod t TlsDatabase, O.OverloadedMethod info TlsDatabase p) => OL.IsLabel t (TlsDatabase -> 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 ~ ResolveTlsDatabaseMethod t TlsDatabase, O.OverloadedMethod info TlsDatabase p, R.HasField t TlsDatabase p) => R.HasField t TlsDatabase p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveTlsDatabaseMethod t TlsDatabase, O.OverloadedMethodInfo info TlsDatabase) => OL.IsLabel t (O.MethodProxy info TlsDatabase) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TlsDatabase
type instance O.AttributeList TlsDatabase = TlsDatabaseAttributeList
type TlsDatabaseAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList TlsDatabase = TlsDatabaseSignalList
type TlsDatabaseSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_tls_database_create_certificate_handle" g_tls_database_create_certificate_handle ::
Ptr TlsDatabase ->
Ptr Gio.TlsCertificate.TlsCertificate ->
IO CString
tlsDatabaseCreateCertificateHandle ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.TlsCertificate.IsTlsCertificate b) =>
a
-> b
-> m (Maybe T.Text)
tlsDatabaseCreateCertificateHandle :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b) =>
a -> b -> m (Maybe Text)
tlsDatabaseCreateCertificateHandle a
self b
certificate = 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
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
certificate' <- unsafeManagedPtrCastPtr certificate
result <- g_tls_database_create_certificate_handle self' certificate'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
freeMem result'
return result''
touchManagedPtr self
touchManagedPtr certificate
return maybeResult
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseCreateCertificateHandleMethodInfo
instance (signature ~ (b -> m (Maybe T.Text)), MonadIO m, IsTlsDatabase a, Gio.TlsCertificate.IsTlsCertificate b) => O.OverloadedMethod TlsDatabaseCreateCertificateHandleMethodInfo a signature where
overloadedMethod = tlsDatabaseCreateCertificateHandle
instance O.OverloadedMethodInfo TlsDatabaseCreateCertificateHandleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseCreateCertificateHandle",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseCreateCertificateHandle"
})
#endif
foreign import ccall "g_tls_database_lookup_certificate_for_handle" g_tls_database_lookup_certificate_for_handle ::
Ptr TlsDatabase ->
CString ->
Ptr Gio.TlsInteraction.TlsInteraction ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr Gio.TlsCertificate.TlsCertificate)
tlsDatabaseLookupCertificateForHandle ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.TlsInteraction.IsTlsInteraction b, Gio.Cancellable.IsCancellable c) =>
a
-> T.Text
-> Maybe (b)
-> Gio.Enums.TlsDatabaseLookupFlags
-> Maybe (c)
-> m (Maybe Gio.TlsCertificate.TlsCertificate)
tlsDatabaseLookupCertificateForHandle :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b,
IsCancellable c) =>
a
-> Text
-> Maybe b
-> TlsDatabaseLookupFlags
-> Maybe c
-> m (Maybe TlsCertificate)
tlsDatabaseLookupCertificateForHandle a
self Text
handle Maybe b
interaction TlsDatabaseLookupFlags
flags Maybe c
cancellable = 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
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
handle' <- textToCString handle
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'
let flags' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (TlsDatabaseLookupFlags -> Int)
-> TlsDatabaseLookupFlags
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TlsDatabaseLookupFlags -> Int
forall a. Enum a => a -> Int
fromEnum) TlsDatabaseLookupFlags
flags
maybeCancellable <- case cancellable of
Maybe c
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 c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_tls_database_lookup_certificate_for_handle self' handle' maybeInteraction flags' maybeCancellable
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
wrapObject ManagedPtr TlsCertificate -> TlsCertificate
Gio.TlsCertificate.TlsCertificate) Ptr TlsCertificate
result'
return result''
touchManagedPtr self
whenJust interaction touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem handle'
return maybeResult
) (do
freeMem handle'
)
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseLookupCertificateForHandleMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> Gio.Enums.TlsDatabaseLookupFlags -> Maybe (c) -> m (Maybe Gio.TlsCertificate.TlsCertificate)), MonadIO m, IsTlsDatabase a, Gio.TlsInteraction.IsTlsInteraction b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod TlsDatabaseLookupCertificateForHandleMethodInfo a signature where
overloadedMethod = tlsDatabaseLookupCertificateForHandle
instance O.OverloadedMethodInfo TlsDatabaseLookupCertificateForHandleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseLookupCertificateForHandle",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseLookupCertificateForHandle"
})
#endif
foreign import ccall "g_tls_database_lookup_certificate_for_handle_async" g_tls_database_lookup_certificate_for_handle_async ::
Ptr TlsDatabase ->
CString ->
Ptr Gio.TlsInteraction.TlsInteraction ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
tlsDatabaseLookupCertificateForHandleAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.TlsInteraction.IsTlsInteraction b, Gio.Cancellable.IsCancellable c) =>
a
-> T.Text
-> Maybe (b)
-> Gio.Enums.TlsDatabaseLookupFlags
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
tlsDatabaseLookupCertificateForHandleAsync :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b,
IsCancellable c) =>
a
-> Text
-> Maybe b
-> TlsDatabaseLookupFlags
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
tlsDatabaseLookupCertificateForHandleAsync a
self Text
handle Maybe b
interaction TlsDatabaseLookupFlags
flags Maybe c
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
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
handle' <- textToCString handle
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'
let flags' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (TlsDatabaseLookupFlags -> Int)
-> TlsDatabaseLookupFlags
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TlsDatabaseLookupFlags -> Int
forall a. Enum a => a -> Int
fromEnum) TlsDatabaseLookupFlags
flags
maybeCancellable <- case cancellable of
Maybe c
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 c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
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_database_lookup_certificate_for_handle_async self' handle' maybeInteraction flags' maybeCancellable maybeCallback userData
touchManagedPtr self
whenJust interaction touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem handle'
return ()
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseLookupCertificateForHandleAsyncMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> Gio.Enums.TlsDatabaseLookupFlags -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsTlsDatabase a, Gio.TlsInteraction.IsTlsInteraction b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod TlsDatabaseLookupCertificateForHandleAsyncMethodInfo a signature where
overloadedMethod = tlsDatabaseLookupCertificateForHandleAsync
instance O.OverloadedMethodInfo TlsDatabaseLookupCertificateForHandleAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseLookupCertificateForHandleAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseLookupCertificateForHandleAsync"
})
#endif
foreign import ccall "g_tls_database_lookup_certificate_for_handle_finish" g_tls_database_lookup_certificate_for_handle_finish ::
Ptr TlsDatabase ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr Gio.TlsCertificate.TlsCertificate)
tlsDatabaseLookupCertificateForHandleFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m Gio.TlsCertificate.TlsCertificate
tlsDatabaseLookupCertificateForHandleFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) =>
a -> b -> m TlsCertificate
tlsDatabaseLookupCertificateForHandleFinish a
self b
result_ = IO TlsCertificate -> m TlsCertificate
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TlsCertificate -> m TlsCertificate)
-> IO TlsCertificate -> m TlsCertificate
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result_' <- unsafeManagedPtrCastPtr result_
onException (do
result <- propagateGError $ g_tls_database_lookup_certificate_for_handle_finish self' result_'
checkUnexpectedReturnNULL "tlsDatabaseLookupCertificateForHandleFinish" result
result' <- (wrapObject Gio.TlsCertificate.TlsCertificate) result
touchManagedPtr self
touchManagedPtr result_
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseLookupCertificateForHandleFinishMethodInfo
instance (signature ~ (b -> m Gio.TlsCertificate.TlsCertificate), MonadIO m, IsTlsDatabase a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod TlsDatabaseLookupCertificateForHandleFinishMethodInfo a signature where
overloadedMethod = tlsDatabaseLookupCertificateForHandleFinish
instance O.OverloadedMethodInfo TlsDatabaseLookupCertificateForHandleFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseLookupCertificateForHandleFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseLookupCertificateForHandleFinish"
})
#endif
foreign import ccall "g_tls_database_lookup_certificate_issuer" g_tls_database_lookup_certificate_issuer ::
Ptr TlsDatabase ->
Ptr Gio.TlsCertificate.TlsCertificate ->
Ptr Gio.TlsInteraction.TlsInteraction ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr Gio.TlsCertificate.TlsCertificate)
tlsDatabaseLookupCertificateIssuer ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.TlsCertificate.IsTlsCertificate b, Gio.TlsInteraction.IsTlsInteraction c, Gio.Cancellable.IsCancellable d) =>
a
-> b
-> Maybe (c)
-> Gio.Enums.TlsDatabaseLookupFlags
-> Maybe (d)
-> m Gio.TlsCertificate.TlsCertificate
tlsDatabaseLookupCertificateIssuer :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b,
IsTlsInteraction c, IsCancellable d) =>
a
-> b
-> Maybe c
-> TlsDatabaseLookupFlags
-> Maybe d
-> m TlsCertificate
tlsDatabaseLookupCertificateIssuer a
self b
certificate Maybe c
interaction TlsDatabaseLookupFlags
flags Maybe d
cancellable = IO TlsCertificate -> m TlsCertificate
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TlsCertificate -> m TlsCertificate)
-> IO TlsCertificate -> m TlsCertificate
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
certificate' <- unsafeManagedPtrCastPtr certificate
maybeInteraction <- case interaction of
Maybe c
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 c
jInteraction -> do
jInteraction' <- c -> IO (Ptr TlsInteraction)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jInteraction
return jInteraction'
let flags' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (TlsDatabaseLookupFlags -> Int)
-> TlsDatabaseLookupFlags
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TlsDatabaseLookupFlags -> Int
forall a. Enum a => a -> Int
fromEnum) TlsDatabaseLookupFlags
flags
maybeCancellable <- case cancellable of
Maybe d
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 d
jCancellable -> do
jCancellable' <- d -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_tls_database_lookup_certificate_issuer self' certificate' maybeInteraction flags' maybeCancellable
checkUnexpectedReturnNULL "tlsDatabaseLookupCertificateIssuer" result
result' <- (wrapObject Gio.TlsCertificate.TlsCertificate) result
touchManagedPtr self
touchManagedPtr certificate
whenJust interaction touchManagedPtr
whenJust cancellable touchManagedPtr
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseLookupCertificateIssuerMethodInfo
instance (signature ~ (b -> Maybe (c) -> Gio.Enums.TlsDatabaseLookupFlags -> Maybe (d) -> m Gio.TlsCertificate.TlsCertificate), MonadIO m, IsTlsDatabase a, Gio.TlsCertificate.IsTlsCertificate b, Gio.TlsInteraction.IsTlsInteraction c, Gio.Cancellable.IsCancellable d) => O.OverloadedMethod TlsDatabaseLookupCertificateIssuerMethodInfo a signature where
overloadedMethod = tlsDatabaseLookupCertificateIssuer
instance O.OverloadedMethodInfo TlsDatabaseLookupCertificateIssuerMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseLookupCertificateIssuer",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseLookupCertificateIssuer"
})
#endif
foreign import ccall "g_tls_database_lookup_certificate_issuer_async" g_tls_database_lookup_certificate_issuer_async ::
Ptr TlsDatabase ->
Ptr Gio.TlsCertificate.TlsCertificate ->
Ptr Gio.TlsInteraction.TlsInteraction ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
tlsDatabaseLookupCertificateIssuerAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.TlsCertificate.IsTlsCertificate b, Gio.TlsInteraction.IsTlsInteraction c, Gio.Cancellable.IsCancellable d) =>
a
-> b
-> Maybe (c)
-> Gio.Enums.TlsDatabaseLookupFlags
-> Maybe (d)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
tlsDatabaseLookupCertificateIssuerAsync :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b,
IsTlsInteraction c, IsCancellable d) =>
a
-> b
-> Maybe c
-> TlsDatabaseLookupFlags
-> Maybe d
-> Maybe AsyncReadyCallback
-> m ()
tlsDatabaseLookupCertificateIssuerAsync a
self b
certificate Maybe c
interaction TlsDatabaseLookupFlags
flags Maybe d
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
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
certificate' <- unsafeManagedPtrCastPtr certificate
maybeInteraction <- case interaction of
Maybe c
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 c
jInteraction -> do
jInteraction' <- c -> IO (Ptr TlsInteraction)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jInteraction
return jInteraction'
let flags' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (TlsDatabaseLookupFlags -> Int)
-> TlsDatabaseLookupFlags
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TlsDatabaseLookupFlags -> Int
forall a. Enum a => a -> Int
fromEnum) TlsDatabaseLookupFlags
flags
maybeCancellable <- case cancellable of
Maybe d
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 d
jCancellable -> do
jCancellable' <- d -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
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_database_lookup_certificate_issuer_async self' certificate' maybeInteraction flags' maybeCancellable maybeCallback userData
touchManagedPtr self
touchManagedPtr certificate
whenJust interaction touchManagedPtr
whenJust cancellable touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseLookupCertificateIssuerAsyncMethodInfo
instance (signature ~ (b -> Maybe (c) -> Gio.Enums.TlsDatabaseLookupFlags -> Maybe (d) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsTlsDatabase a, Gio.TlsCertificate.IsTlsCertificate b, Gio.TlsInteraction.IsTlsInteraction c, Gio.Cancellable.IsCancellable d) => O.OverloadedMethod TlsDatabaseLookupCertificateIssuerAsyncMethodInfo a signature where
overloadedMethod = tlsDatabaseLookupCertificateIssuerAsync
instance O.OverloadedMethodInfo TlsDatabaseLookupCertificateIssuerAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseLookupCertificateIssuerAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseLookupCertificateIssuerAsync"
})
#endif
foreign import ccall "g_tls_database_lookup_certificate_issuer_finish" g_tls_database_lookup_certificate_issuer_finish ::
Ptr TlsDatabase ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr Gio.TlsCertificate.TlsCertificate)
tlsDatabaseLookupCertificateIssuerFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m Gio.TlsCertificate.TlsCertificate
tlsDatabaseLookupCertificateIssuerFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) =>
a -> b -> m TlsCertificate
tlsDatabaseLookupCertificateIssuerFinish a
self b
result_ = IO TlsCertificate -> m TlsCertificate
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TlsCertificate -> m TlsCertificate)
-> IO TlsCertificate -> m TlsCertificate
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result_' <- unsafeManagedPtrCastPtr result_
onException (do
result <- propagateGError $ g_tls_database_lookup_certificate_issuer_finish self' result_'
checkUnexpectedReturnNULL "tlsDatabaseLookupCertificateIssuerFinish" result
result' <- (wrapObject Gio.TlsCertificate.TlsCertificate) result
touchManagedPtr self
touchManagedPtr result_
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseLookupCertificateIssuerFinishMethodInfo
instance (signature ~ (b -> m Gio.TlsCertificate.TlsCertificate), MonadIO m, IsTlsDatabase a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod TlsDatabaseLookupCertificateIssuerFinishMethodInfo a signature where
overloadedMethod = tlsDatabaseLookupCertificateIssuerFinish
instance O.OverloadedMethodInfo TlsDatabaseLookupCertificateIssuerFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseLookupCertificateIssuerFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseLookupCertificateIssuerFinish"
})
#endif
foreign import ccall "g_tls_database_lookup_certificates_issued_by" g_tls_database_lookup_certificates_issued_by ::
Ptr TlsDatabase ->
Ptr GByteArray ->
Ptr Gio.TlsInteraction.TlsInteraction ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr (GList (Ptr Gio.TlsCertificate.TlsCertificate)))
tlsDatabaseLookupCertificatesIssuedBy ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.TlsInteraction.IsTlsInteraction b, Gio.Cancellable.IsCancellable c) =>
a
-> ByteString
-> Maybe (b)
-> Gio.Enums.TlsDatabaseLookupFlags
-> Maybe (c)
-> m [Gio.TlsCertificate.TlsCertificate]
tlsDatabaseLookupCertificatesIssuedBy :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b,
IsCancellable c) =>
a
-> ByteString
-> Maybe b
-> TlsDatabaseLookupFlags
-> Maybe c
-> m [TlsCertificate]
tlsDatabaseLookupCertificatesIssuedBy a
self ByteString
issuerRawDn Maybe b
interaction TlsDatabaseLookupFlags
flags Maybe c
cancellable = IO [TlsCertificate] -> m [TlsCertificate]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [TlsCertificate] -> m [TlsCertificate])
-> IO [TlsCertificate] -> m [TlsCertificate]
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
issuerRawDn' <- packGByteArray issuerRawDn
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'
let flags' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (TlsDatabaseLookupFlags -> Int)
-> TlsDatabaseLookupFlags
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TlsDatabaseLookupFlags -> Int
forall a. Enum a => a -> Int
fromEnum) TlsDatabaseLookupFlags
flags
maybeCancellable <- case cancellable of
Maybe c
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 c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_tls_database_lookup_certificates_issued_by self' issuerRawDn' maybeInteraction flags' maybeCancellable
result' <- unpackGList result
result'' <- mapM (wrapObject Gio.TlsCertificate.TlsCertificate) result'
g_list_free result
touchManagedPtr self
whenJust interaction touchManagedPtr
whenJust cancellable touchManagedPtr
unrefGByteArray issuerRawDn'
return result''
) (do
unrefGByteArray issuerRawDn'
)
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseLookupCertificatesIssuedByMethodInfo
instance (signature ~ (ByteString -> Maybe (b) -> Gio.Enums.TlsDatabaseLookupFlags -> Maybe (c) -> m [Gio.TlsCertificate.TlsCertificate]), MonadIO m, IsTlsDatabase a, Gio.TlsInteraction.IsTlsInteraction b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod TlsDatabaseLookupCertificatesIssuedByMethodInfo a signature where
overloadedMethod = tlsDatabaseLookupCertificatesIssuedBy
instance O.OverloadedMethodInfo TlsDatabaseLookupCertificatesIssuedByMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseLookupCertificatesIssuedBy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseLookupCertificatesIssuedBy"
})
#endif
foreign import ccall "g_tls_database_lookup_certificates_issued_by_async" g_tls_database_lookup_certificates_issued_by_async ::
Ptr TlsDatabase ->
Ptr GByteArray ->
Ptr Gio.TlsInteraction.TlsInteraction ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
tlsDatabaseLookupCertificatesIssuedByAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.TlsInteraction.IsTlsInteraction b, Gio.Cancellable.IsCancellable c) =>
a
-> ByteString
-> Maybe (b)
-> Gio.Enums.TlsDatabaseLookupFlags
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
tlsDatabaseLookupCertificatesIssuedByAsync :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b,
IsCancellable c) =>
a
-> ByteString
-> Maybe b
-> TlsDatabaseLookupFlags
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
tlsDatabaseLookupCertificatesIssuedByAsync a
self ByteString
issuerRawDn Maybe b
interaction TlsDatabaseLookupFlags
flags Maybe c
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
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
issuerRawDn' <- packGByteArray issuerRawDn
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'
let flags' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (TlsDatabaseLookupFlags -> Int)
-> TlsDatabaseLookupFlags
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TlsDatabaseLookupFlags -> Int
forall a. Enum a => a -> Int
fromEnum) TlsDatabaseLookupFlags
flags
maybeCancellable <- case cancellable of
Maybe c
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 c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
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_database_lookup_certificates_issued_by_async self' issuerRawDn' maybeInteraction flags' maybeCancellable maybeCallback userData
touchManagedPtr self
whenJust interaction touchManagedPtr
whenJust cancellable touchManagedPtr
unrefGByteArray issuerRawDn'
return ()
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseLookupCertificatesIssuedByAsyncMethodInfo
instance (signature ~ (ByteString -> Maybe (b) -> Gio.Enums.TlsDatabaseLookupFlags -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsTlsDatabase a, Gio.TlsInteraction.IsTlsInteraction b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod TlsDatabaseLookupCertificatesIssuedByAsyncMethodInfo a signature where
overloadedMethod = tlsDatabaseLookupCertificatesIssuedByAsync
instance O.OverloadedMethodInfo TlsDatabaseLookupCertificatesIssuedByAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseLookupCertificatesIssuedByAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseLookupCertificatesIssuedByAsync"
})
#endif
foreign import ccall "g_tls_database_lookup_certificates_issued_by_finish" g_tls_database_lookup_certificates_issued_by_finish ::
Ptr TlsDatabase ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr (GList (Ptr Gio.TlsCertificate.TlsCertificate)))
tlsDatabaseLookupCertificatesIssuedByFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m [Gio.TlsCertificate.TlsCertificate]
tlsDatabaseLookupCertificatesIssuedByFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) =>
a -> b -> m [TlsCertificate]
tlsDatabaseLookupCertificatesIssuedByFinish a
self b
result_ = IO [TlsCertificate] -> m [TlsCertificate]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [TlsCertificate] -> m [TlsCertificate])
-> IO [TlsCertificate] -> m [TlsCertificate]
forall a b. (a -> b) -> a -> b
$ do
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result_' <- unsafeManagedPtrCastPtr result_
onException (do
result <- propagateGError $ g_tls_database_lookup_certificates_issued_by_finish self' result_'
result' <- unpackGList result
result'' <- mapM (wrapObject Gio.TlsCertificate.TlsCertificate) result'
g_list_free result
touchManagedPtr self
touchManagedPtr result_
return result''
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseLookupCertificatesIssuedByFinishMethodInfo
instance (signature ~ (b -> m [Gio.TlsCertificate.TlsCertificate]), MonadIO m, IsTlsDatabase a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod TlsDatabaseLookupCertificatesIssuedByFinishMethodInfo a signature where
overloadedMethod = tlsDatabaseLookupCertificatesIssuedByFinish
instance O.OverloadedMethodInfo TlsDatabaseLookupCertificatesIssuedByFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseLookupCertificatesIssuedByFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseLookupCertificatesIssuedByFinish"
})
#endif
foreign import ccall "g_tls_database_verify_chain" g_tls_database_verify_chain ::
Ptr TlsDatabase ->
Ptr Gio.TlsCertificate.TlsCertificate ->
CString ->
Ptr Gio.SocketConnectable.SocketConnectable ->
Ptr Gio.TlsInteraction.TlsInteraction ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CUInt
tlsDatabaseVerifyChain ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.TlsCertificate.IsTlsCertificate b, Gio.SocketConnectable.IsSocketConnectable c, Gio.TlsInteraction.IsTlsInteraction d, Gio.Cancellable.IsCancellable e) =>
a
-> b
-> T.Text
-> Maybe (c)
-> Maybe (d)
-> [Gio.Flags.TlsDatabaseVerifyFlags]
-> Maybe (e)
-> m [Gio.Flags.TlsCertificateFlags]
tlsDatabaseVerifyChain :: forall (m :: * -> *) a b c d e.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b,
IsSocketConnectable c, IsTlsInteraction d, IsCancellable e) =>
a
-> b
-> Text
-> Maybe c
-> Maybe d
-> [TlsDatabaseVerifyFlags]
-> Maybe e
-> m [TlsCertificateFlags]
tlsDatabaseVerifyChain a
self b
chain Text
purpose Maybe c
identity Maybe d
interaction [TlsDatabaseVerifyFlags]
flags Maybe e
cancellable = 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
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
chain' <- unsafeManagedPtrCastPtr chain
purpose' <- textToCString purpose
maybeIdentity <- case identity of
Maybe c
Nothing -> Ptr SocketConnectable -> IO (Ptr SocketConnectable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr SocketConnectable
forall a. Ptr a
FP.nullPtr
Just c
jIdentity -> do
jIdentity' <- c -> IO (Ptr SocketConnectable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jIdentity
return jIdentity'
maybeInteraction <- case interaction of
Maybe d
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 d
jInteraction -> do
jInteraction' <- d -> IO (Ptr TlsInteraction)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jInteraction
return jInteraction'
let flags' = [TlsDatabaseVerifyFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [TlsDatabaseVerifyFlags]
flags
maybeCancellable <- case cancellable of
Maybe e
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 e
jCancellable -> do
jCancellable' <- e -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr e
jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_tls_database_verify_chain self' chain' purpose' maybeIdentity maybeInteraction flags' maybeCancellable
let result' = CUInt -> [TlsCertificateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
touchManagedPtr self
touchManagedPtr chain
whenJust identity touchManagedPtr
whenJust interaction touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem purpose'
return result'
) (do
freeMem purpose'
)
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseVerifyChainMethodInfo
instance (signature ~ (b -> T.Text -> Maybe (c) -> Maybe (d) -> [Gio.Flags.TlsDatabaseVerifyFlags] -> Maybe (e) -> m [Gio.Flags.TlsCertificateFlags]), MonadIO m, IsTlsDatabase a, Gio.TlsCertificate.IsTlsCertificate b, Gio.SocketConnectable.IsSocketConnectable c, Gio.TlsInteraction.IsTlsInteraction d, Gio.Cancellable.IsCancellable e) => O.OverloadedMethod TlsDatabaseVerifyChainMethodInfo a signature where
overloadedMethod = tlsDatabaseVerifyChain
instance O.OverloadedMethodInfo TlsDatabaseVerifyChainMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseVerifyChain",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseVerifyChain"
})
#endif
foreign import ccall "g_tls_database_verify_chain_async" g_tls_database_verify_chain_async ::
Ptr TlsDatabase ->
Ptr Gio.TlsCertificate.TlsCertificate ->
CString ->
Ptr Gio.SocketConnectable.SocketConnectable ->
Ptr Gio.TlsInteraction.TlsInteraction ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
tlsDatabaseVerifyChainAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.TlsCertificate.IsTlsCertificate b, Gio.SocketConnectable.IsSocketConnectable c, Gio.TlsInteraction.IsTlsInteraction d, Gio.Cancellable.IsCancellable e) =>
a
-> b
-> T.Text
-> Maybe (c)
-> Maybe (d)
-> [Gio.Flags.TlsDatabaseVerifyFlags]
-> Maybe (e)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
tlsDatabaseVerifyChainAsync :: forall (m :: * -> *) a b c d e.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b,
IsSocketConnectable c, IsTlsInteraction d, IsCancellable e) =>
a
-> b
-> Text
-> Maybe c
-> Maybe d
-> [TlsDatabaseVerifyFlags]
-> Maybe e
-> Maybe AsyncReadyCallback
-> m ()
tlsDatabaseVerifyChainAsync a
self b
chain Text
purpose Maybe c
identity Maybe d
interaction [TlsDatabaseVerifyFlags]
flags Maybe e
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
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
chain' <- unsafeManagedPtrCastPtr chain
purpose' <- textToCString purpose
maybeIdentity <- case identity of
Maybe c
Nothing -> Ptr SocketConnectable -> IO (Ptr SocketConnectable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr SocketConnectable
forall a. Ptr a
FP.nullPtr
Just c
jIdentity -> do
jIdentity' <- c -> IO (Ptr SocketConnectable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jIdentity
return jIdentity'
maybeInteraction <- case interaction of
Maybe d
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 d
jInteraction -> do
jInteraction' <- d -> IO (Ptr TlsInteraction)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
jInteraction
return jInteraction'
let flags' = [TlsDatabaseVerifyFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [TlsDatabaseVerifyFlags]
flags
maybeCancellable <- case cancellable of
Maybe e
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 e
jCancellable -> do
jCancellable' <- e -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr e
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_database_verify_chain_async self' chain' purpose' maybeIdentity maybeInteraction flags' maybeCancellable maybeCallback userData
touchManagedPtr self
touchManagedPtr chain
whenJust identity touchManagedPtr
whenJust interaction touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem purpose'
return ()
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseVerifyChainAsyncMethodInfo
instance (signature ~ (b -> T.Text -> Maybe (c) -> Maybe (d) -> [Gio.Flags.TlsDatabaseVerifyFlags] -> Maybe (e) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsTlsDatabase a, Gio.TlsCertificate.IsTlsCertificate b, Gio.SocketConnectable.IsSocketConnectable c, Gio.TlsInteraction.IsTlsInteraction d, Gio.Cancellable.IsCancellable e) => O.OverloadedMethod TlsDatabaseVerifyChainAsyncMethodInfo a signature where
overloadedMethod = tlsDatabaseVerifyChainAsync
instance O.OverloadedMethodInfo TlsDatabaseVerifyChainAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseVerifyChainAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseVerifyChainAsync"
})
#endif
foreign import ccall "g_tls_database_verify_chain_finish" g_tls_database_verify_chain_finish ::
Ptr TlsDatabase ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CUInt
tlsDatabaseVerifyChainFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsTlsDatabase a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m [Gio.Flags.TlsCertificateFlags]
tlsDatabaseVerifyChainFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) =>
a -> b -> m [TlsCertificateFlags]
tlsDatabaseVerifyChainFinish a
self b
result_ = 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
self' <- a -> IO (Ptr TlsDatabase)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
result_' <- unsafeManagedPtrCastPtr result_
onException (do
result <- propagateGError $ g_tls_database_verify_chain_finish self' result_'
let result' = CUInt -> [TlsCertificateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
touchManagedPtr self
touchManagedPtr result_
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data TlsDatabaseVerifyChainFinishMethodInfo
instance (signature ~ (b -> m [Gio.Flags.TlsCertificateFlags]), MonadIO m, IsTlsDatabase a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod TlsDatabaseVerifyChainFinishMethodInfo a signature where
overloadedMethod = tlsDatabaseVerifyChainFinish
instance O.OverloadedMethodInfo TlsDatabaseVerifyChainFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.TlsDatabase.tlsDatabaseVerifyChainFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-TlsDatabase.html#v:tlsDatabaseVerifyChainFinish"
})
#endif