#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Interfaces.TlsFileDatabase
(
TlsFileDatabase(..) ,
noTlsFileDatabase ,
IsTlsFileDatabase ,
toTlsFileDatabase ,
tlsFileDatabaseNew ,
#if ENABLE_OVERLOADING
TlsFileDatabaseAnchorsPropertyInfo ,
#endif
clearTlsFileDatabaseAnchors ,
constructTlsFileDatabaseAnchors ,
getTlsFileDatabaseAnchors ,
setTlsFileDatabaseAnchors ,
#if ENABLE_OVERLOADING
tlsFileDatabaseAnchors ,
#endif
) 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 TlsFileDatabase = TlsFileDatabase (ManagedPtr TlsFileDatabase)
noTlsFileDatabase :: Maybe TlsFileDatabase
noTlsFileDatabase = Nothing
#if ENABLE_OVERLOADING
type instance O.SignalList TlsFileDatabase = TlsFileDatabaseSignalList
type TlsFileDatabaseSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_tls_file_database_get_type"
c_g_tls_file_database_get_type :: IO GType
instance GObject TlsFileDatabase where
gobjectType = c_g_tls_file_database_get_type
class (GObject o, O.IsDescendantOf TlsFileDatabase o) => IsTlsFileDatabase o
instance (GObject o, O.IsDescendantOf TlsFileDatabase o) => IsTlsFileDatabase o
instance O.HasParentTypes TlsFileDatabase
type instance O.ParentTypes TlsFileDatabase = '[GObject.Object.Object, Gio.TlsDatabase.TlsDatabase]
toTlsFileDatabase :: (MonadIO m, IsTlsFileDatabase o) => o -> m TlsFileDatabase
toTlsFileDatabase = liftIO . unsafeCastTo TlsFileDatabase
getTlsFileDatabaseAnchors :: (MonadIO m, IsTlsFileDatabase o) => o -> m (Maybe T.Text)
getTlsFileDatabaseAnchors obj = liftIO $ B.Properties.getObjectPropertyString obj "anchors"
setTlsFileDatabaseAnchors :: (MonadIO m, IsTlsFileDatabase o) => o -> T.Text -> m ()
setTlsFileDatabaseAnchors obj val = liftIO $ B.Properties.setObjectPropertyString obj "anchors" (Just val)
constructTlsFileDatabaseAnchors :: (IsTlsFileDatabase o) => T.Text -> IO (GValueConstruct o)
constructTlsFileDatabaseAnchors val = B.Properties.constructObjectPropertyString "anchors" (Just val)
clearTlsFileDatabaseAnchors :: (MonadIO m, IsTlsFileDatabase o) => o -> m ()
clearTlsFileDatabaseAnchors obj = liftIO $ B.Properties.setObjectPropertyString obj "anchors" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data TlsFileDatabaseAnchorsPropertyInfo
instance AttrInfo TlsFileDatabaseAnchorsPropertyInfo where
type AttrAllowedOps TlsFileDatabaseAnchorsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TlsFileDatabaseAnchorsPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint TlsFileDatabaseAnchorsPropertyInfo = IsTlsFileDatabase
type AttrGetType TlsFileDatabaseAnchorsPropertyInfo = (Maybe T.Text)
type AttrLabel TlsFileDatabaseAnchorsPropertyInfo = "anchors"
type AttrOrigin TlsFileDatabaseAnchorsPropertyInfo = TlsFileDatabase
attrGet _ = getTlsFileDatabaseAnchors
attrSet _ = setTlsFileDatabaseAnchors
attrConstruct _ = constructTlsFileDatabaseAnchors
attrClear _ = clearTlsFileDatabaseAnchors
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList TlsFileDatabase
type instance O.AttributeList TlsFileDatabase = TlsFileDatabaseAttributeList
type TlsFileDatabaseAttributeList = ('[ '("anchors", TlsFileDatabaseAnchorsPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
tlsFileDatabaseAnchors :: AttrLabelProxy "anchors"
tlsFileDatabaseAnchors = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type family ResolveTlsFileDatabaseMethod (t :: Symbol) (o :: *) :: * where
ResolveTlsFileDatabaseMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTlsFileDatabaseMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTlsFileDatabaseMethod "createCertificateHandle" o = Gio.TlsDatabase.TlsDatabaseCreateCertificateHandleMethodInfo
ResolveTlsFileDatabaseMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTlsFileDatabaseMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTlsFileDatabaseMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTlsFileDatabaseMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTlsFileDatabaseMethod "lookupCertificateForHandle" o = Gio.TlsDatabase.TlsDatabaseLookupCertificateForHandleMethodInfo
ResolveTlsFileDatabaseMethod "lookupCertificateForHandleAsync" o = Gio.TlsDatabase.TlsDatabaseLookupCertificateForHandleAsyncMethodInfo
ResolveTlsFileDatabaseMethod "lookupCertificateForHandleFinish" o = Gio.TlsDatabase.TlsDatabaseLookupCertificateForHandleFinishMethodInfo
ResolveTlsFileDatabaseMethod "lookupCertificateIssuer" o = Gio.TlsDatabase.TlsDatabaseLookupCertificateIssuerMethodInfo
ResolveTlsFileDatabaseMethod "lookupCertificateIssuerAsync" o = Gio.TlsDatabase.TlsDatabaseLookupCertificateIssuerAsyncMethodInfo
ResolveTlsFileDatabaseMethod "lookupCertificateIssuerFinish" o = Gio.TlsDatabase.TlsDatabaseLookupCertificateIssuerFinishMethodInfo
ResolveTlsFileDatabaseMethod "lookupCertificatesIssuedBy" o = Gio.TlsDatabase.TlsDatabaseLookupCertificatesIssuedByMethodInfo
ResolveTlsFileDatabaseMethod "lookupCertificatesIssuedByAsync" o = Gio.TlsDatabase.TlsDatabaseLookupCertificatesIssuedByAsyncMethodInfo
ResolveTlsFileDatabaseMethod "lookupCertificatesIssuedByFinish" o = Gio.TlsDatabase.TlsDatabaseLookupCertificatesIssuedByFinishMethodInfo
ResolveTlsFileDatabaseMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTlsFileDatabaseMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTlsFileDatabaseMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTlsFileDatabaseMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTlsFileDatabaseMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTlsFileDatabaseMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTlsFileDatabaseMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTlsFileDatabaseMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTlsFileDatabaseMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTlsFileDatabaseMethod "verifyChain" o = Gio.TlsDatabase.TlsDatabaseVerifyChainMethodInfo
ResolveTlsFileDatabaseMethod "verifyChainAsync" o = Gio.TlsDatabase.TlsDatabaseVerifyChainAsyncMethodInfo
ResolveTlsFileDatabaseMethod "verifyChainFinish" o = Gio.TlsDatabase.TlsDatabaseVerifyChainFinishMethodInfo
ResolveTlsFileDatabaseMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTlsFileDatabaseMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTlsFileDatabaseMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTlsFileDatabaseMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTlsFileDatabaseMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTlsFileDatabaseMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveTlsFileDatabaseMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTlsFileDatabaseMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTlsFileDatabaseMethod t TlsFileDatabase, O.MethodInfo info TlsFileDatabase p) => OL.IsLabel t (TlsFileDatabase -> 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_file_database_new" g_tls_file_database_new ::
CString ->
Ptr (Ptr GError) ->
IO (Ptr TlsFileDatabase)
tlsFileDatabaseNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
[Char]
-> m TlsFileDatabase
tlsFileDatabaseNew anchors = liftIO $ do
anchors' <- stringToCString anchors
onException (do
result <- propagateGError $ g_tls_file_database_new anchors'
checkUnexpectedReturnNULL "tlsFileDatabaseNew" result
result' <- (wrapObject TlsFileDatabase) result
freeMem anchors'
return result'
) (do
freeMem anchors'
)
#if ENABLE_OVERLOADING
#endif