{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GIRepository.Objects.Repository
(
Repository(..) ,
IsRepository ,
toRepository ,
noRepository ,
#if defined(ENABLE_OVERLOADING)
ResolveRepositoryMethod ,
#endif
repositoryDump ,
#if defined(ENABLE_OVERLOADING)
RepositoryEnumerateVersionsMethodInfo ,
#endif
repositoryEnumerateVersions ,
repositoryErrorQuark ,
#if defined(ENABLE_OVERLOADING)
RepositoryFindByErrorDomainMethodInfo ,
#endif
repositoryFindByErrorDomain ,
#if defined(ENABLE_OVERLOADING)
RepositoryFindByGtypeMethodInfo ,
#endif
repositoryFindByGtype ,
#if defined(ENABLE_OVERLOADING)
RepositoryFindByNameMethodInfo ,
#endif
repositoryFindByName ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetCPrefixMethodInfo ,
#endif
repositoryGetCPrefix ,
repositoryGetDefault ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetDependenciesMethodInfo ,
#endif
repositoryGetDependencies ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetImmediateDependenciesMethodInfo,
#endif
repositoryGetImmediateDependencies ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetInfoMethodInfo ,
#endif
repositoryGetInfo ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetLoadedNamespacesMethodInfo ,
#endif
repositoryGetLoadedNamespaces ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetNInfosMethodInfo ,
#endif
repositoryGetNInfos ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetObjectGtypeInterfacesMethodInfo,
#endif
repositoryGetObjectGtypeInterfaces ,
repositoryGetOptionGroup ,
repositoryGetSearchPath ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetSharedLibraryMethodInfo ,
#endif
repositoryGetSharedLibrary ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetTypelibPathMethodInfo ,
#endif
repositoryGetTypelibPath ,
#if defined(ENABLE_OVERLOADING)
RepositoryGetVersionMethodInfo ,
#endif
repositoryGetVersion ,
#if defined(ENABLE_OVERLOADING)
RepositoryIsRegisteredMethodInfo ,
#endif
repositoryIsRegistered ,
#if defined(ENABLE_OVERLOADING)
RepositoryLoadTypelibMethodInfo ,
#endif
repositoryLoadTypelib ,
repositoryPrependLibraryPath ,
repositoryPrependSearchPath ,
#if defined(ENABLE_OVERLOADING)
RepositoryRequireMethodInfo ,
#endif
repositoryRequire ,
#if defined(ENABLE_OVERLOADING)
RepositoryRequirePrivateMethodInfo ,
#endif
repositoryRequirePrivate ,
) 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.GI.Base.Signals as B.Signals
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 {-# SOURCE #-} qualified GI.GIRepository.Flags as GIRepository.Flags
import {-# SOURCE #-} qualified GI.GIRepository.Structs.BaseInfo as GIRepository.BaseInfo
import {-# SOURCE #-} qualified GI.GIRepository.Structs.Typelib as GIRepository.Typelib
import qualified GI.GLib.Structs.OptionGroup as GLib.OptionGroup
import qualified GI.GObject.Objects.Object as GObject.Object
newtype Repository = Repository (ManagedPtr Repository)
deriving (Repository -> Repository -> Bool
(Repository -> Repository -> Bool)
-> (Repository -> Repository -> Bool) -> Eq Repository
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Repository -> Repository -> Bool
$c/= :: Repository -> Repository -> Bool
== :: Repository -> Repository -> Bool
$c== :: Repository -> Repository -> Bool
Eq)
foreign import ccall "g_irepository_get_type"
c_g_irepository_get_type :: IO GType
instance GObject Repository where
gobjectType :: IO GType
gobjectType = IO GType
c_g_irepository_get_type
instance B.GValue.IsGValue Repository where
toGValue :: Repository -> IO GValue
toGValue o :: Repository
o = do
GType
gtype <- IO GType
c_g_irepository_get_type
Repository -> (Ptr Repository -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Repository
o (GType
-> (GValue -> Ptr Repository -> IO ())
-> Ptr Repository
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Repository -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Repository
fromGValue gv :: GValue
gv = do
Ptr Repository
ptr <- GValue -> IO (Ptr Repository)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Repository)
(ManagedPtr Repository -> Repository)
-> Ptr Repository -> IO Repository
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Repository -> Repository
Repository Ptr Repository
ptr
class (GObject o, O.IsDescendantOf Repository o) => IsRepository o
instance (GObject o, O.IsDescendantOf Repository o) => IsRepository o
instance O.HasParentTypes Repository
type instance O.ParentTypes Repository = '[GObject.Object.Object]
toRepository :: (MonadIO m, IsRepository o) => o -> m Repository
toRepository :: o -> m Repository
toRepository = IO Repository -> m Repository
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repository -> m Repository)
-> (o -> IO Repository) -> o -> m Repository
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Repository -> Repository) -> o -> IO Repository
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Repository -> Repository
Repository
noRepository :: Maybe Repository
noRepository :: Maybe Repository
noRepository = Maybe Repository
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveRepositoryMethod (t :: Symbol) (o :: *) :: * where
ResolveRepositoryMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveRepositoryMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveRepositoryMethod "enumerateVersions" o = RepositoryEnumerateVersionsMethodInfo
ResolveRepositoryMethod "findByErrorDomain" o = RepositoryFindByErrorDomainMethodInfo
ResolveRepositoryMethod "findByGtype" o = RepositoryFindByGtypeMethodInfo
ResolveRepositoryMethod "findByName" o = RepositoryFindByNameMethodInfo
ResolveRepositoryMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveRepositoryMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveRepositoryMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveRepositoryMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveRepositoryMethod "isRegistered" o = RepositoryIsRegisteredMethodInfo
ResolveRepositoryMethod "loadTypelib" o = RepositoryLoadTypelibMethodInfo
ResolveRepositoryMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveRepositoryMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveRepositoryMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveRepositoryMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveRepositoryMethod "require" o = RepositoryRequireMethodInfo
ResolveRepositoryMethod "requirePrivate" o = RepositoryRequirePrivateMethodInfo
ResolveRepositoryMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveRepositoryMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveRepositoryMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveRepositoryMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveRepositoryMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveRepositoryMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveRepositoryMethod "getCPrefix" o = RepositoryGetCPrefixMethodInfo
ResolveRepositoryMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveRepositoryMethod "getDependencies" o = RepositoryGetDependenciesMethodInfo
ResolveRepositoryMethod "getImmediateDependencies" o = RepositoryGetImmediateDependenciesMethodInfo
ResolveRepositoryMethod "getInfo" o = RepositoryGetInfoMethodInfo
ResolveRepositoryMethod "getLoadedNamespaces" o = RepositoryGetLoadedNamespacesMethodInfo
ResolveRepositoryMethod "getNInfos" o = RepositoryGetNInfosMethodInfo
ResolveRepositoryMethod "getObjectGtypeInterfaces" o = RepositoryGetObjectGtypeInterfacesMethodInfo
ResolveRepositoryMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveRepositoryMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveRepositoryMethod "getSharedLibrary" o = RepositoryGetSharedLibraryMethodInfo
ResolveRepositoryMethod "getTypelibPath" o = RepositoryGetTypelibPathMethodInfo
ResolveRepositoryMethod "getVersion" o = RepositoryGetVersionMethodInfo
ResolveRepositoryMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveRepositoryMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveRepositoryMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveRepositoryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRepositoryMethod t Repository, O.MethodInfo info Repository p) => OL.IsLabel t (Repository -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Repository
type instance O.AttributeList Repository = RepositoryAttributeList
type RepositoryAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Repository = RepositorySignalList
type RepositorySignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_irepository_enumerate_versions" g_irepository_enumerate_versions ::
Ptr Repository ->
CString ->
IO (Ptr (GList CString))
repositoryEnumerateVersions ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m [T.Text]
repositoryEnumerateVersions :: a -> Text -> m [Text]
repositoryEnumerateVersions repository :: a
repository namespace_ :: Text
namespace_ = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
Ptr (GList CString)
result <- Ptr Repository -> CString -> IO (Ptr (GList CString))
g_irepository_enumerate_versions Ptr Repository
repository' CString
namespace_'
[CString]
result' <- Ptr (GList CString) -> IO [CString]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList CString)
result
[Text]
result'' <- (CString -> IO Text) -> [CString] -> IO [Text]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [CString]
result'
(CString -> IO ()) -> Ptr (GList CString) -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (GList (Ptr a)) -> IO ()
mapGList CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (GList CString)
result
Ptr (GList CString) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList CString)
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
#if defined(ENABLE_OVERLOADING)
data RepositoryEnumerateVersionsMethodInfo
instance (signature ~ (T.Text -> m [T.Text]), MonadIO m, IsRepository a) => O.MethodInfo RepositoryEnumerateVersionsMethodInfo a signature where
overloadedMethod = repositoryEnumerateVersions
#endif
foreign import ccall "g_irepository_find_by_error_domain" g_irepository_find_by_error_domain ::
Ptr Repository ->
Word32 ->
IO (Ptr GIRepository.BaseInfo.BaseInfo)
repositoryFindByErrorDomain ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> Word32
-> m GIRepository.BaseInfo.BaseInfo
repositoryFindByErrorDomain :: a -> Word32 -> m BaseInfo
repositoryFindByErrorDomain repository :: a
repository domain :: Word32
domain = IO BaseInfo -> m BaseInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BaseInfo -> m BaseInfo) -> IO BaseInfo -> m BaseInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr BaseInfo
result <- Ptr Repository -> Word32 -> IO (Ptr BaseInfo)
g_irepository_find_by_error_domain Ptr Repository
repository' Word32
domain
Text -> Ptr BaseInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryFindByErrorDomain" Ptr BaseInfo
result
BaseInfo
result' <- ((ManagedPtr BaseInfo -> BaseInfo) -> Ptr BaseInfo -> IO BaseInfo
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BaseInfo -> BaseInfo
GIRepository.BaseInfo.BaseInfo) Ptr BaseInfo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
BaseInfo -> IO BaseInfo
forall (m :: * -> *) a. Monad m => a -> m a
return BaseInfo
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryFindByErrorDomainMethodInfo
instance (signature ~ (Word32 -> m GIRepository.BaseInfo.BaseInfo), MonadIO m, IsRepository a) => O.MethodInfo RepositoryFindByErrorDomainMethodInfo a signature where
overloadedMethod = repositoryFindByErrorDomain
#endif
foreign import ccall "g_irepository_find_by_gtype" g_irepository_find_by_gtype ::
Ptr Repository ->
CGType ->
IO (Ptr GIRepository.BaseInfo.BaseInfo)
repositoryFindByGtype ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> GType
-> m GIRepository.BaseInfo.BaseInfo
repositoryFindByGtype :: a -> GType -> m BaseInfo
repositoryFindByGtype repository :: a
repository gtype :: GType
gtype = IO BaseInfo -> m BaseInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BaseInfo -> m BaseInfo) -> IO BaseInfo -> m BaseInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
let gtype' :: CGType
gtype' = GType -> CGType
gtypeToCGType GType
gtype
Ptr BaseInfo
result <- Ptr Repository -> CGType -> IO (Ptr BaseInfo)
g_irepository_find_by_gtype Ptr Repository
repository' CGType
gtype'
Text -> Ptr BaseInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryFindByGtype" Ptr BaseInfo
result
BaseInfo
result' <- ((ManagedPtr BaseInfo -> BaseInfo) -> Ptr BaseInfo -> IO BaseInfo
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BaseInfo -> BaseInfo
GIRepository.BaseInfo.BaseInfo) Ptr BaseInfo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
BaseInfo -> IO BaseInfo
forall (m :: * -> *) a. Monad m => a -> m a
return BaseInfo
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryFindByGtypeMethodInfo
instance (signature ~ (GType -> m GIRepository.BaseInfo.BaseInfo), MonadIO m, IsRepository a) => O.MethodInfo RepositoryFindByGtypeMethodInfo a signature where
overloadedMethod = repositoryFindByGtype
#endif
foreign import ccall "g_irepository_find_by_name" g_irepository_find_by_name ::
Ptr Repository ->
CString ->
CString ->
IO (Ptr GIRepository.BaseInfo.BaseInfo)
repositoryFindByName ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> T.Text
-> m GIRepository.BaseInfo.BaseInfo
repositoryFindByName :: a -> Text -> Text -> m BaseInfo
repositoryFindByName repository :: a
repository namespace_ :: Text
namespace_ name :: Text
name = IO BaseInfo -> m BaseInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BaseInfo -> m BaseInfo) -> IO BaseInfo -> m BaseInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr BaseInfo
result <- Ptr Repository -> CString -> CString -> IO (Ptr BaseInfo)
g_irepository_find_by_name Ptr Repository
repository' CString
namespace_' CString
name'
Text -> Ptr BaseInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryFindByName" Ptr BaseInfo
result
BaseInfo
result' <- ((ManagedPtr BaseInfo -> BaseInfo) -> Ptr BaseInfo -> IO BaseInfo
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BaseInfo -> BaseInfo
GIRepository.BaseInfo.BaseInfo) Ptr BaseInfo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
BaseInfo -> IO BaseInfo
forall (m :: * -> *) a. Monad m => a -> m a
return BaseInfo
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryFindByNameMethodInfo
instance (signature ~ (T.Text -> T.Text -> m GIRepository.BaseInfo.BaseInfo), MonadIO m, IsRepository a) => O.MethodInfo RepositoryFindByNameMethodInfo a signature where
overloadedMethod = repositoryFindByName
#endif
foreign import ccall "g_irepository_get_c_prefix" g_irepository_get_c_prefix ::
Ptr Repository ->
CString ->
IO CString
repositoryGetCPrefix ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m T.Text
repositoryGetCPrefix :: a -> Text -> m Text
repositoryGetCPrefix repository :: a
repository namespace_ :: Text
namespace_ = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
CString
result <- Ptr Repository -> CString -> IO CString
g_irepository_get_c_prefix Ptr Repository
repository' CString
namespace_'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryGetCPrefix" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryGetCPrefixMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetCPrefixMethodInfo a signature where
overloadedMethod = repositoryGetCPrefix
#endif
foreign import ccall "g_irepository_get_dependencies" g_irepository_get_dependencies ::
Ptr Repository ->
CString ->
IO (Ptr CString)
repositoryGetDependencies ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m [T.Text]
repositoryGetDependencies :: a -> Text -> m [Text]
repositoryGetDependencies repository :: a
repository namespace_ :: Text
namespace_ = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
Ptr CString
result <- Ptr Repository -> CString -> IO (Ptr CString)
g_irepository_get_dependencies Ptr Repository
repository' CString
namespace_'
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryGetDependencies" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryGetDependenciesMethodInfo
instance (signature ~ (T.Text -> m [T.Text]), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetDependenciesMethodInfo a signature where
overloadedMethod = repositoryGetDependencies
#endif
foreign import ccall "g_irepository_get_immediate_dependencies" g_irepository_get_immediate_dependencies ::
Ptr Repository ->
CString ->
IO (Ptr CString)
repositoryGetImmediateDependencies ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m [T.Text]
repositoryGetImmediateDependencies :: a -> Text -> m [Text]
repositoryGetImmediateDependencies repository :: a
repository namespace_ :: Text
namespace_ = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
Ptr CString
result <- Ptr Repository -> CString -> IO (Ptr CString)
g_irepository_get_immediate_dependencies Ptr Repository
repository' CString
namespace_'
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryGetImmediateDependencies" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryGetImmediateDependenciesMethodInfo
instance (signature ~ (T.Text -> m [T.Text]), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetImmediateDependenciesMethodInfo a signature where
overloadedMethod = repositoryGetImmediateDependencies
#endif
foreign import ccall "g_irepository_get_info" g_irepository_get_info ::
Ptr Repository ->
CString ->
Int32 ->
IO (Ptr GIRepository.BaseInfo.BaseInfo)
repositoryGetInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> Int32
-> m GIRepository.BaseInfo.BaseInfo
repositoryGetInfo :: a -> Text -> Int32 -> m BaseInfo
repositoryGetInfo repository :: a
repository namespace_ :: Text
namespace_ index :: Int32
index = IO BaseInfo -> m BaseInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BaseInfo -> m BaseInfo) -> IO BaseInfo -> m BaseInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
Ptr BaseInfo
result <- Ptr Repository -> CString -> Int32 -> IO (Ptr BaseInfo)
g_irepository_get_info Ptr Repository
repository' CString
namespace_' Int32
index
Text -> Ptr BaseInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryGetInfo" Ptr BaseInfo
result
BaseInfo
result' <- ((ManagedPtr BaseInfo -> BaseInfo) -> Ptr BaseInfo -> IO BaseInfo
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BaseInfo -> BaseInfo
GIRepository.BaseInfo.BaseInfo) Ptr BaseInfo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
BaseInfo -> IO BaseInfo
forall (m :: * -> *) a. Monad m => a -> m a
return BaseInfo
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryGetInfoMethodInfo
instance (signature ~ (T.Text -> Int32 -> m GIRepository.BaseInfo.BaseInfo), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetInfoMethodInfo a signature where
overloadedMethod = repositoryGetInfo
#endif
foreign import ccall "g_irepository_get_loaded_namespaces" g_irepository_get_loaded_namespaces ::
Ptr Repository ->
IO (Ptr CString)
repositoryGetLoadedNamespaces ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> m [T.Text]
repositoryGetLoadedNamespaces :: a -> m [Text]
repositoryGetLoadedNamespaces repository :: a
repository = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr CString
result <- Ptr Repository -> IO (Ptr CString)
g_irepository_get_loaded_namespaces Ptr Repository
repository'
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryGetLoadedNamespaces" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryGetLoadedNamespacesMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetLoadedNamespacesMethodInfo a signature where
overloadedMethod = repositoryGetLoadedNamespaces
#endif
foreign import ccall "g_irepository_get_n_infos" g_irepository_get_n_infos ::
Ptr Repository ->
CString ->
IO Int32
repositoryGetNInfos ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m Int32
repositoryGetNInfos :: a -> Text -> m Int32
repositoryGetNInfos repository :: a
repository namespace_ :: Text
namespace_ = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
Int32
result <- Ptr Repository -> CString -> IO Int32
g_irepository_get_n_infos Ptr Repository
repository' CString
namespace_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data RepositoryGetNInfosMethodInfo
instance (signature ~ (T.Text -> m Int32), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetNInfosMethodInfo a signature where
overloadedMethod = repositoryGetNInfos
#endif
foreign import ccall "g_irepository_get_object_gtype_interfaces" g_irepository_get_object_gtype_interfaces ::
Ptr Repository ->
CGType ->
Ptr Word32 ->
Ptr (Ptr GIRepository.BaseInfo.BaseInfo) ->
IO ()
repositoryGetObjectGtypeInterfaces ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> GType
-> m ([GIRepository.BaseInfo.BaseInfo])
repositoryGetObjectGtypeInterfaces :: a -> GType -> m [BaseInfo]
repositoryGetObjectGtypeInterfaces repository :: a
repository gtype :: GType
gtype = IO [BaseInfo] -> m [BaseInfo]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [BaseInfo] -> m [BaseInfo]) -> IO [BaseInfo] -> m [BaseInfo]
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
let gtype' :: CGType
gtype' = GType -> CGType
gtypeToCGType GType
gtype
Ptr Word32
nInterfacesOut <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr (Ptr BaseInfo)
interfacesOut <- IO (Ptr (Ptr BaseInfo))
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr (Ptr GIRepository.BaseInfo.BaseInfo))
Ptr Repository
-> CGType -> Ptr Word32 -> Ptr (Ptr BaseInfo) -> IO ()
g_irepository_get_object_gtype_interfaces Ptr Repository
repository' CGType
gtype' Ptr Word32
nInterfacesOut Ptr (Ptr BaseInfo)
interfacesOut
Word32
nInterfacesOut' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
nInterfacesOut
Ptr BaseInfo
interfacesOut' <- Ptr (Ptr BaseInfo) -> IO (Ptr BaseInfo)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr BaseInfo)
interfacesOut
[Ptr BaseInfo]
interfacesOut'' <- (Int -> Word32 -> Ptr BaseInfo -> IO [Ptr BaseInfo]
forall a b.
(Integral a, BoxedObject b) =>
Int -> a -> Ptr b -> IO [Ptr b]
unpackBoxedArrayWithLength 72 Word32
nInterfacesOut') Ptr BaseInfo
interfacesOut'
[BaseInfo]
interfacesOut''' <- (Ptr BaseInfo -> IO BaseInfo) -> [Ptr BaseInfo] -> IO [BaseInfo]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr BaseInfo -> BaseInfo) -> Ptr BaseInfo -> IO BaseInfo
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr BaseInfo -> BaseInfo
GIRepository.BaseInfo.BaseInfo) [Ptr BaseInfo]
interfacesOut''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
nInterfacesOut
Ptr (Ptr BaseInfo) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr BaseInfo)
interfacesOut
[BaseInfo] -> IO [BaseInfo]
forall (m :: * -> *) a. Monad m => a -> m a
return [BaseInfo]
interfacesOut'''
#if defined(ENABLE_OVERLOADING)
data RepositoryGetObjectGtypeInterfacesMethodInfo
instance (signature ~ (GType -> m ([GIRepository.BaseInfo.BaseInfo])), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetObjectGtypeInterfacesMethodInfo a signature where
overloadedMethod = repositoryGetObjectGtypeInterfaces
#endif
foreign import ccall "g_irepository_get_shared_library" g_irepository_get_shared_library ::
Ptr Repository ->
CString ->
IO CString
repositoryGetSharedLibrary ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m T.Text
repositoryGetSharedLibrary :: a -> Text -> m Text
repositoryGetSharedLibrary repository :: a
repository namespace_ :: Text
namespace_ = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
CString
result <- Ptr Repository -> CString -> IO CString
g_irepository_get_shared_library Ptr Repository
repository' CString
namespace_'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryGetSharedLibrary" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryGetSharedLibraryMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetSharedLibraryMethodInfo a signature where
overloadedMethod = repositoryGetSharedLibrary
#endif
foreign import ccall "g_irepository_get_typelib_path" g_irepository_get_typelib_path ::
Ptr Repository ->
CString ->
IO CString
repositoryGetTypelibPath ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m T.Text
repositoryGetTypelibPath :: a -> Text -> m Text
repositoryGetTypelibPath repository :: a
repository namespace_ :: Text
namespace_ = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
CString
result <- Ptr Repository -> CString -> IO CString
g_irepository_get_typelib_path Ptr Repository
repository' CString
namespace_'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryGetTypelibPath" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryGetTypelibPathMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetTypelibPathMethodInfo a signature where
overloadedMethod = repositoryGetTypelibPath
#endif
foreign import ccall "g_irepository_get_version" g_irepository_get_version ::
Ptr Repository ->
CString ->
IO CString
repositoryGetVersion ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> m T.Text
repositoryGetVersion :: a -> Text -> m Text
repositoryGetVersion repository :: a
repository namespace_ :: Text
namespace_ = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
CString
result <- Ptr Repository -> CString -> IO CString
g_irepository_get_version Ptr Repository
repository' CString
namespace_'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryGetVersion" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryGetVersionMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryGetVersionMethodInfo a signature where
overloadedMethod = repositoryGetVersion
#endif
foreign import ccall "g_irepository_is_registered" g_irepository_is_registered ::
Ptr Repository ->
CString ->
CString ->
IO CInt
repositoryIsRegistered ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> Maybe (T.Text)
-> m Bool
repositoryIsRegistered :: a -> Text -> Maybe Text -> m Bool
repositoryIsRegistered repository :: a
repository namespace_ :: Text
namespace_ version :: Maybe Text
version = IO Bool -> m Bool
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
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
CString
maybeVersion <- case Maybe Text
version of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jVersion :: Text
jVersion -> do
CString
jVersion' <- Text -> IO CString
textToCString Text
jVersion
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jVersion'
CInt
result <- Ptr Repository -> CString -> CString -> IO CInt
g_irepository_is_registered Ptr Repository
repository' CString
namespace_' CString
maybeVersion
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeVersion
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data RepositoryIsRegisteredMethodInfo
instance (signature ~ (T.Text -> Maybe (T.Text) -> m Bool), MonadIO m, IsRepository a) => O.MethodInfo RepositoryIsRegisteredMethodInfo a signature where
overloadedMethod = repositoryIsRegistered
#endif
foreign import ccall "g_irepository_load_typelib" g_irepository_load_typelib ::
Ptr Repository ->
Ptr GIRepository.Typelib.Typelib ->
CUInt ->
Ptr (Ptr GError) ->
IO CString
repositoryLoadTypelib ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> GIRepository.Typelib.Typelib
-> [GIRepository.Flags.RepositoryLoadFlags]
-> m T.Text
repositoryLoadTypelib :: a -> Typelib -> [RepositoryLoadFlags] -> m Text
repositoryLoadTypelib repository :: a
repository typelib :: Typelib
typelib flags :: [RepositoryLoadFlags]
flags = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
Ptr Typelib
typelib' <- Typelib -> IO (Ptr Typelib)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Typelib
typelib
let flags' :: CUInt
flags' = [RepositoryLoadFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepositoryLoadFlags]
flags
IO Text -> IO () -> IO Text
forall a b. IO a -> IO b -> IO a
onException (do
CString
result <- (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString)
-> (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> Ptr Typelib -> CUInt -> Ptr (Ptr GError) -> IO CString
g_irepository_load_typelib Ptr Repository
repository' Ptr Typelib
typelib' CUInt
flags'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryLoadTypelib" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
Typelib -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Typelib
typelib
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepositoryLoadTypelibMethodInfo
instance (signature ~ (GIRepository.Typelib.Typelib -> [GIRepository.Flags.RepositoryLoadFlags] -> m T.Text), MonadIO m, IsRepository a) => O.MethodInfo RepositoryLoadTypelibMethodInfo a signature where
overloadedMethod = repositoryLoadTypelib
#endif
foreign import ccall "g_irepository_require" g_irepository_require ::
Ptr Repository ->
CString ->
CString ->
CUInt ->
Ptr (Ptr GError) ->
IO (Ptr GIRepository.Typelib.Typelib)
repositoryRequire ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> Maybe (T.Text)
-> [GIRepository.Flags.RepositoryLoadFlags]
-> m GIRepository.Typelib.Typelib
repositoryRequire :: a -> Text -> Maybe Text -> [RepositoryLoadFlags] -> m Typelib
repositoryRequire repository :: a
repository namespace_ :: Text
namespace_ version :: Maybe Text
version flags :: [RepositoryLoadFlags]
flags = IO Typelib -> m Typelib
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Typelib -> m Typelib) -> IO Typelib -> m Typelib
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
CString
maybeVersion <- case Maybe Text
version of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jVersion :: Text
jVersion -> do
CString
jVersion' <- Text -> IO CString
textToCString Text
jVersion
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jVersion'
let flags' :: CUInt
flags' = [RepositoryLoadFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepositoryLoadFlags]
flags
IO Typelib -> IO () -> IO Typelib
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Typelib
result <- (Ptr (Ptr GError) -> IO (Ptr Typelib)) -> IO (Ptr Typelib)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Typelib)) -> IO (Ptr Typelib))
-> (Ptr (Ptr GError) -> IO (Ptr Typelib)) -> IO (Ptr Typelib)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> CString
-> CUInt
-> Ptr (Ptr GError)
-> IO (Ptr Typelib)
g_irepository_require Ptr Repository
repository' CString
namespace_' CString
maybeVersion CUInt
flags'
Text -> Ptr Typelib -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryRequire" Ptr Typelib
result
Typelib
result' <- ((ManagedPtr Typelib -> Typelib) -> Ptr Typelib -> IO Typelib
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Typelib -> Typelib
GIRepository.Typelib.Typelib) Ptr Typelib
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeVersion
Typelib -> IO Typelib
forall (m :: * -> *) a. Monad m => a -> m a
return Typelib
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeVersion
)
#if defined(ENABLE_OVERLOADING)
data RepositoryRequireMethodInfo
instance (signature ~ (T.Text -> Maybe (T.Text) -> [GIRepository.Flags.RepositoryLoadFlags] -> m GIRepository.Typelib.Typelib), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRequireMethodInfo a signature where
overloadedMethod = repositoryRequire
#endif
foreign import ccall "g_irepository_require_private" g_irepository_require_private ::
Ptr Repository ->
CString ->
CString ->
CString ->
CUInt ->
Ptr (Ptr GError) ->
IO (Ptr GIRepository.Typelib.Typelib)
repositoryRequirePrivate ::
(B.CallStack.HasCallStack, MonadIO m, IsRepository a) =>
a
-> T.Text
-> T.Text
-> Maybe (T.Text)
-> [GIRepository.Flags.RepositoryLoadFlags]
-> m GIRepository.Typelib.Typelib
repositoryRequirePrivate :: a
-> Text -> Text -> Maybe Text -> [RepositoryLoadFlags] -> m Typelib
repositoryRequirePrivate repository :: a
repository typelibDir :: Text
typelibDir namespace_ :: Text
namespace_ version :: Maybe Text
version flags :: [RepositoryLoadFlags]
flags = IO Typelib -> m Typelib
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Typelib -> m Typelib) -> IO Typelib -> m Typelib
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
repository' <- a -> IO (Ptr Repository)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
repository
CString
typelibDir' <- Text -> IO CString
textToCString Text
typelibDir
CString
namespace_' <- Text -> IO CString
textToCString Text
namespace_
CString
maybeVersion <- case Maybe Text
version of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jVersion :: Text
jVersion -> do
CString
jVersion' <- Text -> IO CString
textToCString Text
jVersion
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jVersion'
let flags' :: CUInt
flags' = [RepositoryLoadFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [RepositoryLoadFlags]
flags
IO Typelib -> IO () -> IO Typelib
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Typelib
result <- (Ptr (Ptr GError) -> IO (Ptr Typelib)) -> IO (Ptr Typelib)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Typelib)) -> IO (Ptr Typelib))
-> (Ptr (Ptr GError) -> IO (Ptr Typelib)) -> IO (Ptr Typelib)
forall a b. (a -> b) -> a -> b
$ Ptr Repository
-> CString
-> CString
-> CString
-> CUInt
-> Ptr (Ptr GError)
-> IO (Ptr Typelib)
g_irepository_require_private Ptr Repository
repository' CString
typelibDir' CString
namespace_' CString
maybeVersion CUInt
flags'
Text -> Ptr Typelib -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryRequirePrivate" Ptr Typelib
result
Typelib
result' <- ((ManagedPtr Typelib -> Typelib) -> Ptr Typelib -> IO Typelib
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Typelib -> Typelib
GIRepository.Typelib.Typelib) Ptr Typelib
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
repository
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
typelibDir'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeVersion
Typelib -> IO Typelib
forall (m :: * -> *) a. Monad m => a -> m a
return Typelib
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
typelibDir'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
namespace_'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeVersion
)
#if defined(ENABLE_OVERLOADING)
data RepositoryRequirePrivateMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe (T.Text) -> [GIRepository.Flags.RepositoryLoadFlags] -> m GIRepository.Typelib.Typelib), MonadIO m, IsRepository a) => O.MethodInfo RepositoryRequirePrivateMethodInfo a signature where
overloadedMethod = repositoryRequirePrivate
#endif
foreign import ccall "g_irepository_dump" g_irepository_dump ::
CString ->
Ptr (Ptr GError) ->
IO CInt
repositoryDump ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m ()
repositoryDump :: Text -> m ()
repositoryDump arg :: Text
arg = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
CString
arg' <- Text -> IO CString
textToCString Text
arg
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ CString -> Ptr (Ptr GError) -> IO CInt
g_irepository_dump CString
arg'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
arg'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
arg'
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_irepository_error_quark" g_irepository_error_quark ::
IO Word32
repositoryErrorQuark ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Word32
repositoryErrorQuark :: m Word32
repositoryErrorQuark = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Word32
result <- IO Word32
g_irepository_error_quark
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_irepository_get_default" g_irepository_get_default ::
IO (Ptr Repository)
repositoryGetDefault ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Repository
repositoryGetDefault :: m Repository
repositoryGetDefault = IO Repository -> m Repository
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Repository -> m Repository) -> IO Repository -> m Repository
forall a b. (a -> b) -> a -> b
$ do
Ptr Repository
result <- IO (Ptr Repository)
g_irepository_get_default
Text -> Ptr Repository -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryGetDefault" Ptr Repository
result
Repository
result' <- ((ManagedPtr Repository -> Repository)
-> Ptr Repository -> IO Repository
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Repository -> Repository
Repository) Ptr Repository
result
Repository -> IO Repository
forall (m :: * -> *) a. Monad m => a -> m a
return Repository
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_irepository_get_option_group" g_irepository_get_option_group ::
IO (Ptr GLib.OptionGroup.OptionGroup)
repositoryGetOptionGroup ::
(B.CallStack.HasCallStack, MonadIO m) =>
m GLib.OptionGroup.OptionGroup
repositoryGetOptionGroup :: m OptionGroup
repositoryGetOptionGroup = IO OptionGroup -> m OptionGroup
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO OptionGroup -> m OptionGroup)
-> IO OptionGroup -> m OptionGroup
forall a b. (a -> b) -> a -> b
$ do
Ptr OptionGroup
result <- IO (Ptr OptionGroup)
g_irepository_get_option_group
Text -> Ptr OptionGroup -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "repositoryGetOptionGroup" Ptr OptionGroup
result
OptionGroup
result' <- ((ManagedPtr OptionGroup -> OptionGroup)
-> Ptr OptionGroup -> IO OptionGroup
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OptionGroup -> OptionGroup
GLib.OptionGroup.OptionGroup) Ptr OptionGroup
result
OptionGroup -> IO OptionGroup
forall (m :: * -> *) a. Monad m => a -> m a
return OptionGroup
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_irepository_get_search_path" g_irepository_get_search_path ::
IO (Ptr (GSList CString))
repositoryGetSearchPath ::
(B.CallStack.HasCallStack, MonadIO m) =>
m [[Char]]
repositoryGetSearchPath :: m [[Char]]
repositoryGetSearchPath = IO [[Char]] -> m [[Char]]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [[Char]] -> m [[Char]]) -> IO [[Char]] -> m [[Char]]
forall a b. (a -> b) -> a -> b
$ do
Ptr (GSList CString)
result <- IO (Ptr (GSList CString))
g_irepository_get_search_path
[CString]
result' <- Ptr (GSList CString) -> IO [CString]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList CString)
result
[[Char]]
result'' <- (CString -> IO [Char]) -> [CString] -> IO [[Char]]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO [Char]
CString -> IO [Char]
cstringToString [CString]
result'
[[Char]] -> IO [[Char]]
forall (m :: * -> *) a. Monad m => a -> m a
return [[Char]]
result''
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_irepository_prepend_library_path" g_irepository_prepend_library_path ::
CString ->
IO ()
repositoryPrependLibraryPath ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m ()
repositoryPrependLibraryPath :: Text -> m ()
repositoryPrependLibraryPath directory :: Text
directory = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
CString
directory' <- Text -> IO CString
textToCString Text
directory
CString -> IO ()
g_irepository_prepend_library_path CString
directory'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
directory'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_irepository_prepend_search_path" g_irepository_prepend_search_path ::
CString ->
IO ()
repositoryPrependSearchPath ::
(B.CallStack.HasCallStack, MonadIO m) =>
[Char]
-> m ()
repositoryPrependSearchPath :: [Char] -> m ()
repositoryPrependSearchPath directory :: [Char]
directory = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
CString
directory' <- [Char] -> IO CString
stringToCString [Char]
directory
CString -> IO ()
g_irepository_prepend_search_path CString
directory'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
directory'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif