{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GLib.Structs.BookmarkFile
(
BookmarkFile(..) ,
#if defined(ENABLE_OVERLOADING)
ResolveBookmarkFileMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
BookmarkFileAddApplicationMethodInfo ,
#endif
bookmarkFileAddApplication ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileAddGroupMethodInfo ,
#endif
bookmarkFileAddGroup ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileCopyMethodInfo ,
#endif
bookmarkFileCopy ,
bookmarkFileErrorQuark ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileFreeMethodInfo ,
#endif
bookmarkFileFree ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetAddedMethodInfo ,
#endif
bookmarkFileGetAdded ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetAddedDateTimeMethodInfo ,
#endif
bookmarkFileGetAddedDateTime ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetAppInfoMethodInfo ,
#endif
bookmarkFileGetAppInfo ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetApplicationInfoMethodInfo,
#endif
bookmarkFileGetApplicationInfo ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetApplicationsMethodInfo ,
#endif
bookmarkFileGetApplications ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetDescriptionMethodInfo ,
#endif
bookmarkFileGetDescription ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetGroupsMethodInfo ,
#endif
bookmarkFileGetGroups ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetIconMethodInfo ,
#endif
bookmarkFileGetIcon ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetIsPrivateMethodInfo ,
#endif
bookmarkFileGetIsPrivate ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetMimeTypeMethodInfo ,
#endif
bookmarkFileGetMimeType ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetModifiedMethodInfo ,
#endif
bookmarkFileGetModified ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetModifiedDateTimeMethodInfo,
#endif
bookmarkFileGetModifiedDateTime ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetSizeMethodInfo ,
#endif
bookmarkFileGetSize ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetTitleMethodInfo ,
#endif
bookmarkFileGetTitle ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetUrisMethodInfo ,
#endif
bookmarkFileGetUris ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetVisitedMethodInfo ,
#endif
bookmarkFileGetVisited ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileGetVisitedDateTimeMethodInfo,
#endif
bookmarkFileGetVisitedDateTime ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileHasApplicationMethodInfo ,
#endif
bookmarkFileHasApplication ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileHasGroupMethodInfo ,
#endif
bookmarkFileHasGroup ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileHasItemMethodInfo ,
#endif
bookmarkFileHasItem ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileLoadFromDataMethodInfo ,
#endif
bookmarkFileLoadFromData ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileLoadFromDataDirsMethodInfo ,
#endif
bookmarkFileLoadFromDataDirs ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileLoadFromFileMethodInfo ,
#endif
bookmarkFileLoadFromFile ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileMoveItemMethodInfo ,
#endif
bookmarkFileMoveItem ,
bookmarkFileNew ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileRemoveApplicationMethodInfo ,
#endif
bookmarkFileRemoveApplication ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileRemoveGroupMethodInfo ,
#endif
bookmarkFileRemoveGroup ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileRemoveItemMethodInfo ,
#endif
bookmarkFileRemoveItem ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetAddedMethodInfo ,
#endif
bookmarkFileSetAdded ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetAddedDateTimeMethodInfo ,
#endif
bookmarkFileSetAddedDateTime ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetAppInfoMethodInfo ,
#endif
bookmarkFileSetAppInfo ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetApplicationInfoMethodInfo,
#endif
bookmarkFileSetApplicationInfo ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetDescriptionMethodInfo ,
#endif
bookmarkFileSetDescription ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetGroupsMethodInfo ,
#endif
bookmarkFileSetGroups ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetIconMethodInfo ,
#endif
bookmarkFileSetIcon ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetIsPrivateMethodInfo ,
#endif
bookmarkFileSetIsPrivate ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetMimeTypeMethodInfo ,
#endif
bookmarkFileSetMimeType ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetModifiedMethodInfo ,
#endif
bookmarkFileSetModified ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetModifiedDateTimeMethodInfo,
#endif
bookmarkFileSetModifiedDateTime ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetTitleMethodInfo ,
#endif
bookmarkFileSetTitle ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetVisitedMethodInfo ,
#endif
bookmarkFileSetVisited ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileSetVisitedDateTimeMethodInfo,
#endif
bookmarkFileSetVisitedDateTime ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileToDataMethodInfo ,
#endif
bookmarkFileToData ,
#if defined(ENABLE_OVERLOADING)
BookmarkFileToFileMethodInfo ,
#endif
bookmarkFileToFile ,
) 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 {-# SOURCE #-} qualified GI.GLib.Structs.DateTime as GLib.DateTime
newtype BookmarkFile = BookmarkFile (SP.ManagedPtr BookmarkFile)
deriving (BookmarkFile -> BookmarkFile -> Bool
(BookmarkFile -> BookmarkFile -> Bool)
-> (BookmarkFile -> BookmarkFile -> Bool) -> Eq BookmarkFile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BookmarkFile -> BookmarkFile -> Bool
== :: BookmarkFile -> BookmarkFile -> Bool
$c/= :: BookmarkFile -> BookmarkFile -> Bool
/= :: BookmarkFile -> BookmarkFile -> Bool
Eq)
instance SP.ManagedPtrNewtype BookmarkFile where
toManagedPtr :: BookmarkFile -> ManagedPtr BookmarkFile
toManagedPtr (BookmarkFile ManagedPtr BookmarkFile
p) = ManagedPtr BookmarkFile
p
foreign import ccall "g_bookmark_file_get_type" c_g_bookmark_file_get_type ::
IO GType
type instance O.ParentTypes BookmarkFile = '[]
instance O.HasParentTypes BookmarkFile
instance B.Types.TypedObject BookmarkFile where
glibType :: IO GType
glibType = IO GType
c_g_bookmark_file_get_type
instance B.Types.GBoxed BookmarkFile
instance B.GValue.IsGValue (Maybe BookmarkFile) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_bookmark_file_get_type
gvalueSet_ :: Ptr GValue -> Maybe BookmarkFile -> IO ()
gvalueSet_ Ptr GValue
gv Maybe BookmarkFile
P.Nothing = Ptr GValue -> Ptr BookmarkFile -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr BookmarkFile
forall a. Ptr a
FP.nullPtr :: FP.Ptr BookmarkFile)
gvalueSet_ Ptr GValue
gv (P.Just BookmarkFile
obj) = BookmarkFile -> (Ptr BookmarkFile -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr BookmarkFile
obj (Ptr GValue -> Ptr BookmarkFile -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe BookmarkFile)
gvalueGet_ Ptr GValue
gv = do
Ptr BookmarkFile
ptr <- Ptr GValue -> IO (Ptr BookmarkFile)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr BookmarkFile)
if Ptr BookmarkFile
ptr Ptr BookmarkFile -> Ptr BookmarkFile -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr BookmarkFile
forall a. Ptr a
FP.nullPtr
then BookmarkFile -> Maybe BookmarkFile
forall a. a -> Maybe a
P.Just (BookmarkFile -> Maybe BookmarkFile)
-> IO BookmarkFile -> IO (Maybe BookmarkFile)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr BookmarkFile -> BookmarkFile)
-> Ptr BookmarkFile -> IO BookmarkFile
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr BookmarkFile -> BookmarkFile
BookmarkFile Ptr BookmarkFile
ptr
else Maybe BookmarkFile -> IO (Maybe BookmarkFile)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BookmarkFile
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList BookmarkFile
type instance O.AttributeList BookmarkFile = BookmarkFileAttributeList
type BookmarkFileAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_bookmark_file_new" g_bookmark_file_new ::
IO (Ptr BookmarkFile)
bookmarkFileNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m BookmarkFile
bookmarkFileNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m BookmarkFile
bookmarkFileNew = IO BookmarkFile -> m BookmarkFile
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BookmarkFile -> m BookmarkFile)
-> IO BookmarkFile -> m BookmarkFile
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
result <- IO (Ptr BookmarkFile)
g_bookmark_file_new
Text -> Ptr BookmarkFile -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileNew" Ptr BookmarkFile
result
BookmarkFile
result' <- ((ManagedPtr BookmarkFile -> BookmarkFile)
-> Ptr BookmarkFile -> IO BookmarkFile
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BookmarkFile -> BookmarkFile
BookmarkFile) Ptr BookmarkFile
result
BookmarkFile -> IO BookmarkFile
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return BookmarkFile
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_bookmark_file_add_application" g_bookmark_file_add_application ::
Ptr BookmarkFile ->
CString ->
CString ->
CString ->
IO ()
bookmarkFileAddApplication ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> Maybe (T.Text)
-> Maybe (T.Text)
-> m ()
bookmarkFileAddApplication :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Maybe Text -> Maybe Text -> m ()
bookmarkFileAddApplication BookmarkFile
bookmark Text
uri Maybe Text
name Maybe Text
exec = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
maybeName <- case Maybe Text
name of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jName -> do
CString
jName' <- Text -> IO CString
textToCString Text
jName
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jName'
CString
maybeExec <- case Maybe Text
exec of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jExec -> do
CString
jExec' <- Text -> IO CString
textToCString Text
jExec
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jExec'
Ptr BookmarkFile -> CString -> CString -> CString -> IO ()
g_bookmark_file_add_application Ptr BookmarkFile
bookmark' CString
uri' CString
maybeName CString
maybeExec
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeName
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeExec
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileAddApplicationMethodInfo
instance (signature ~ (T.Text -> Maybe (T.Text) -> Maybe (T.Text) -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileAddApplicationMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileAddApplication
instance O.OverloadedMethodInfo BookmarkFileAddApplicationMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileAddApplication",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileAddApplication"
})
#endif
foreign import ccall "g_bookmark_file_add_group" g_bookmark_file_add_group ::
Ptr BookmarkFile ->
CString ->
CString ->
IO ()
bookmarkFileAddGroup ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> T.Text
-> m ()
bookmarkFileAddGroup :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Text -> m ()
bookmarkFileAddGroup BookmarkFile
bookmark Text
uri Text
group = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
group' <- Text -> IO CString
textToCString Text
group
Ptr BookmarkFile -> CString -> CString -> IO ()
g_bookmark_file_add_group Ptr BookmarkFile
bookmark' CString
uri' CString
group'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
group'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileAddGroupMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileAddGroupMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileAddGroup
instance O.OverloadedMethodInfo BookmarkFileAddGroupMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileAddGroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileAddGroup"
})
#endif
foreign import ccall "g_bookmark_file_copy" g_bookmark_file_copy ::
Ptr BookmarkFile ->
IO (Ptr BookmarkFile)
bookmarkFileCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> m BookmarkFile
bookmarkFileCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> m BookmarkFile
bookmarkFileCopy BookmarkFile
bookmark = IO BookmarkFile -> m BookmarkFile
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BookmarkFile -> m BookmarkFile)
-> IO BookmarkFile -> m BookmarkFile
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
Ptr BookmarkFile
result <- Ptr BookmarkFile -> IO (Ptr BookmarkFile)
g_bookmark_file_copy Ptr BookmarkFile
bookmark'
Text -> Ptr BookmarkFile -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileCopy" Ptr BookmarkFile
result
BookmarkFile
result' <- ((ManagedPtr BookmarkFile -> BookmarkFile)
-> Ptr BookmarkFile -> IO BookmarkFile
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BookmarkFile -> BookmarkFile
BookmarkFile) Ptr BookmarkFile
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
BookmarkFile -> IO BookmarkFile
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return BookmarkFile
result'
#if defined(ENABLE_OVERLOADING)
data BookmarkFileCopyMethodInfo
instance (signature ~ (m BookmarkFile), MonadIO m) => O.OverloadedMethod BookmarkFileCopyMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileCopy
instance O.OverloadedMethodInfo BookmarkFileCopyMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileCopy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileCopy"
})
#endif
foreign import ccall "g_bookmark_file_free" g_bookmark_file_free ::
Ptr BookmarkFile ->
IO ()
bookmarkFileFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> m ()
bookmarkFileFree :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> m ()
bookmarkFileFree BookmarkFile
bookmark = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
Ptr BookmarkFile -> IO ()
g_bookmark_file_free Ptr BookmarkFile
bookmark'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod BookmarkFileFreeMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileFree
instance O.OverloadedMethodInfo BookmarkFileFreeMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileFree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileFree"
})
#endif
foreign import ccall "g_bookmark_file_get_added" g_bookmark_file_get_added ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO CLong
{-# DEPRECATED bookmarkFileGetAdded ["(Since version 2.66)","Use 'GI.GLib.Structs.BookmarkFile.bookmarkFileGetAddedDateTime' instead, as"," @time_t@ is deprecated due to the year 2038 problem."] #-}
bookmarkFileGetAdded ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m CLong
bookmarkFileGetAdded :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m CLong
bookmarkFileGetAdded BookmarkFile
bookmark Text
uri = IO CLong -> m CLong
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CLong -> m CLong) -> IO CLong -> m CLong
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO CLong -> IO () -> IO CLong
forall a b. IO a -> IO b -> IO a
onException (do
CLong
result <- (Ptr (Ptr GError) -> IO CLong) -> IO CLong
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CLong) -> IO CLong)
-> (Ptr (Ptr GError) -> IO CLong) -> IO CLong
forall a b. (a -> b) -> a -> b
$ Ptr BookmarkFile -> CString -> Ptr (Ptr GError) -> IO CLong
g_bookmark_file_get_added Ptr BookmarkFile
bookmark' CString
uri'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CLong -> IO CLong
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CLong
result
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetAddedMethodInfo
instance (signature ~ (T.Text -> m CLong), MonadIO m) => O.OverloadedMethod BookmarkFileGetAddedMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetAdded
instance O.OverloadedMethodInfo BookmarkFileGetAddedMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetAdded",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetAdded"
})
#endif
foreign import ccall "g_bookmark_file_get_added_date_time" g_bookmark_file_get_added_date_time ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr GLib.DateTime.DateTime)
bookmarkFileGetAddedDateTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m GLib.DateTime.DateTime
bookmarkFileGetAddedDateTime :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m DateTime
bookmarkFileGetAddedDateTime BookmarkFile
bookmark Text
uri = IO DateTime -> m DateTime
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DateTime -> m DateTime) -> IO DateTime -> m DateTime
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO DateTime -> IO () -> IO DateTime
forall a b. IO a -> IO b -> IO a
onException (do
Ptr DateTime
result <- (Ptr (Ptr GError) -> IO (Ptr DateTime)) -> IO (Ptr DateTime)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr DateTime)) -> IO (Ptr DateTime))
-> (Ptr (Ptr GError) -> IO (Ptr DateTime)) -> IO (Ptr DateTime)
forall a b. (a -> b) -> a -> b
$ Ptr BookmarkFile
-> CString -> Ptr (Ptr GError) -> IO (Ptr DateTime)
g_bookmark_file_get_added_date_time Ptr BookmarkFile
bookmark' CString
uri'
Text -> Ptr DateTime -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileGetAddedDateTime" Ptr DateTime
result
DateTime
result' <- ((ManagedPtr DateTime -> DateTime) -> Ptr DateTime -> IO DateTime
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr DateTime -> DateTime
GLib.DateTime.DateTime) Ptr DateTime
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
DateTime -> IO DateTime
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DateTime
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetAddedDateTimeMethodInfo
instance (signature ~ (T.Text -> m GLib.DateTime.DateTime), MonadIO m) => O.OverloadedMethod BookmarkFileGetAddedDateTimeMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetAddedDateTime
instance O.OverloadedMethodInfo BookmarkFileGetAddedDateTimeMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetAddedDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetAddedDateTime"
})
#endif
foreign import ccall "g_bookmark_file_get_app_info" g_bookmark_file_get_app_info ::
Ptr BookmarkFile ->
CString ->
CString ->
Ptr CString ->
Ptr Word32 ->
Ptr CLong ->
Ptr (Ptr GError) ->
IO CInt
{-# DEPRECATED bookmarkFileGetAppInfo ["(Since version 2.66)","Use 'GI.GLib.Structs.BookmarkFile.bookmarkFileGetApplicationInfo' instead, as"," @time_t@ is deprecated due to the year 2038 problem."] #-}
bookmarkFileGetAppInfo ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> T.Text
-> m ((T.Text, Word32, CLong))
bookmarkFileGetAppInfo :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Text -> m (Text, Word32, CLong)
bookmarkFileGetAppInfo BookmarkFile
bookmark Text
uri Text
name = IO (Text, Word32, CLong) -> m (Text, Word32, CLong)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Text, Word32, CLong) -> m (Text, Word32, CLong))
-> IO (Text, Word32, CLong) -> m (Text, Word32, CLong)
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr CString
exec <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
Ptr Word32
count <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr CLong
stamp <- IO (Ptr CLong)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CLong)
IO (Text, Word32, CLong) -> IO () -> IO (Text, Word32, CLong)
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
$ Ptr BookmarkFile
-> CString
-> CString
-> Ptr CString
-> Ptr Word32
-> Ptr CLong
-> Ptr (Ptr GError)
-> IO CInt
g_bookmark_file_get_app_info Ptr BookmarkFile
bookmark' CString
uri' CString
name' Ptr CString
exec Ptr Word32
count Ptr CLong
stamp
CString
exec' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
exec
Text
exec'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
exec'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
exec'
Word32
count' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
count
CLong
stamp' <- Ptr CLong -> IO CLong
forall a. Storable a => Ptr a -> IO a
peek Ptr CLong
stamp
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
exec
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
count
Ptr CLong -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CLong
stamp
(Text, Word32, CLong) -> IO (Text, Word32, CLong)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Text
exec'', Word32
count', CLong
stamp')
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
exec
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
count
Ptr CLong -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CLong
stamp
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetAppInfoMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ((T.Text, Word32, CLong))), MonadIO m) => O.OverloadedMethod BookmarkFileGetAppInfoMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetAppInfo
instance O.OverloadedMethodInfo BookmarkFileGetAppInfoMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetAppInfo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetAppInfo"
})
#endif
foreign import ccall "g_bookmark_file_get_application_info" g_bookmark_file_get_application_info ::
Ptr BookmarkFile ->
CString ->
CString ->
Ptr CString ->
Ptr Word32 ->
Ptr (Ptr GLib.DateTime.DateTime) ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileGetApplicationInfo ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> T.Text
-> m ((T.Text, Word32, GLib.DateTime.DateTime))
bookmarkFileGetApplicationInfo :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Text -> m (Text, Word32, DateTime)
bookmarkFileGetApplicationInfo BookmarkFile
bookmark Text
uri Text
name = IO (Text, Word32, DateTime) -> m (Text, Word32, DateTime)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Text, Word32, DateTime) -> m (Text, Word32, DateTime))
-> IO (Text, Word32, DateTime) -> m (Text, Word32, DateTime)
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr CString
exec <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
Ptr Word32
count <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr (Ptr DateTime)
stamp <- IO (Ptr (Ptr DateTime))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GLib.DateTime.DateTime))
IO (Text, Word32, DateTime) -> IO () -> IO (Text, Word32, DateTime)
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
$ Ptr BookmarkFile
-> CString
-> CString
-> Ptr CString
-> Ptr Word32
-> Ptr (Ptr DateTime)
-> Ptr (Ptr GError)
-> IO CInt
g_bookmark_file_get_application_info Ptr BookmarkFile
bookmark' CString
uri' CString
name' Ptr CString
exec Ptr Word32
count Ptr (Ptr DateTime)
stamp
CString
exec' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
exec
Text
exec'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
exec'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
exec'
Word32
count' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
count
Ptr DateTime
stamp' <- Ptr (Ptr DateTime) -> IO (Ptr DateTime)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr DateTime)
stamp
DateTime
stamp'' <- ((ManagedPtr DateTime -> DateTime) -> Ptr DateTime -> IO DateTime
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr DateTime -> DateTime
GLib.DateTime.DateTime) Ptr DateTime
stamp'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
exec
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
count
Ptr (Ptr DateTime) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr DateTime)
stamp
(Text, Word32, DateTime) -> IO (Text, Word32, DateTime)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Text
exec'', Word32
count', DateTime
stamp'')
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
exec
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
count
Ptr (Ptr DateTime) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr DateTime)
stamp
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetApplicationInfoMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ((T.Text, Word32, GLib.DateTime.DateTime))), MonadIO m) => O.OverloadedMethod BookmarkFileGetApplicationInfoMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetApplicationInfo
instance O.OverloadedMethodInfo BookmarkFileGetApplicationInfoMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetApplicationInfo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetApplicationInfo"
})
#endif
foreign import ccall "g_bookmark_file_get_applications" g_bookmark_file_get_applications ::
Ptr BookmarkFile ->
CString ->
Ptr Word64 ->
Ptr (Ptr GError) ->
IO (Ptr CString)
bookmarkFileGetApplications ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m [T.Text]
bookmarkFileGetApplications :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m [Text]
bookmarkFileGetApplications BookmarkFile
bookmark Text
uri = IO [Text] -> m [Text]
forall a. IO a -> m a
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 BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr Word64
length_ <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
IO [Text] -> IO () -> IO [Text]
forall a b. IO a -> IO b -> IO a
onException (do
Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr BookmarkFile
-> CString -> Ptr Word64 -> Ptr (Ptr GError) -> IO (Ptr CString)
g_bookmark_file_get_applications Ptr BookmarkFile
bookmark' CString
uri' Ptr Word64
length_
Word64
length_' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
length_
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileGetApplications" Ptr CString
result
[Text]
result' <- (Word64 -> Ptr CString -> IO [Text]
forall a.
(HasCallStack, Integral a) =>
a -> Ptr CString -> IO [Text]
unpackUTF8CArrayWithLength Word64
length_') Ptr CString
result
(Word64 -> (CString -> IO ()) -> Ptr CString -> IO ()
forall a b c.
(Storable a, Integral b) =>
b -> (a -> IO c) -> Ptr a -> IO ()
mapCArrayWithLength Word64
length_') CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
length_
[Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
length_
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetApplicationsMethodInfo
instance (signature ~ (T.Text -> m [T.Text]), MonadIO m) => O.OverloadedMethod BookmarkFileGetApplicationsMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetApplications
instance O.OverloadedMethodInfo BookmarkFileGetApplicationsMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetApplications",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetApplications"
})
#endif
foreign import ccall "g_bookmark_file_get_description" g_bookmark_file_get_description ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO CString
bookmarkFileGetDescription ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m T.Text
bookmarkFileGetDescription :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m Text
bookmarkFileGetDescription BookmarkFile
bookmark Text
uri = IO Text -> m Text
forall a. IO a -> m a
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 BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
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 BookmarkFile -> CString -> Ptr (Ptr GError) -> IO CString
g_bookmark_file_get_description Ptr BookmarkFile
bookmark' CString
uri'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileGetDescription" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetDescriptionMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m) => O.OverloadedMethod BookmarkFileGetDescriptionMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetDescription
instance O.OverloadedMethodInfo BookmarkFileGetDescriptionMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetDescription",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetDescription"
})
#endif
foreign import ccall "g_bookmark_file_get_groups" g_bookmark_file_get_groups ::
Ptr BookmarkFile ->
CString ->
Ptr Word64 ->
Ptr (Ptr GError) ->
IO (Ptr CString)
bookmarkFileGetGroups ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m [T.Text]
bookmarkFileGetGroups :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m [Text]
bookmarkFileGetGroups BookmarkFile
bookmark Text
uri = IO [Text] -> m [Text]
forall a. IO a -> m a
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 BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr Word64
length_ <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
IO [Text] -> IO () -> IO [Text]
forall a b. IO a -> IO b -> IO a
onException (do
Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr BookmarkFile
-> CString -> Ptr Word64 -> Ptr (Ptr GError) -> IO (Ptr CString)
g_bookmark_file_get_groups Ptr BookmarkFile
bookmark' CString
uri' Ptr Word64
length_
Word64
length_' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
length_
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileGetGroups" Ptr CString
result
[Text]
result' <- (Word64 -> Ptr CString -> IO [Text]
forall a.
(HasCallStack, Integral a) =>
a -> Ptr CString -> IO [Text]
unpackUTF8CArrayWithLength Word64
length_') Ptr CString
result
(Word64 -> (CString -> IO ()) -> Ptr CString -> IO ()
forall a b c.
(Storable a, Integral b) =>
b -> (a -> IO c) -> Ptr a -> IO ()
mapCArrayWithLength Word64
length_') CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
length_
[Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
length_
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetGroupsMethodInfo
instance (signature ~ (T.Text -> m [T.Text]), MonadIO m) => O.OverloadedMethod BookmarkFileGetGroupsMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetGroups
instance O.OverloadedMethodInfo BookmarkFileGetGroupsMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetGroups",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetGroups"
})
#endif
foreign import ccall "g_bookmark_file_get_icon" g_bookmark_file_get_icon ::
Ptr BookmarkFile ->
CString ->
Ptr CString ->
Ptr CString ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileGetIcon ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m ((T.Text, T.Text))
bookmarkFileGetIcon :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m (Text, Text)
bookmarkFileGetIcon BookmarkFile
bookmark Text
uri = IO (Text, Text) -> m (Text, Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Text, Text) -> m (Text, Text))
-> IO (Text, Text) -> m (Text, Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr CString
href <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
Ptr CString
mimeType <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
IO (Text, Text) -> IO () -> IO (Text, Text)
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
$ Ptr BookmarkFile
-> CString
-> Ptr CString
-> Ptr CString
-> Ptr (Ptr GError)
-> IO CInt
g_bookmark_file_get_icon Ptr BookmarkFile
bookmark' CString
uri' Ptr CString
href Ptr CString
mimeType
CString
href' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
href
Text
href'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
href'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
href'
CString
mimeType' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
mimeType
Text
mimeType'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
mimeType'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
mimeType'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
href
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
mimeType
(Text, Text) -> IO (Text, Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Text
href'', Text
mimeType'')
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
href
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
mimeType
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetIconMethodInfo
instance (signature ~ (T.Text -> m ((T.Text, T.Text))), MonadIO m) => O.OverloadedMethod BookmarkFileGetIconMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetIcon
instance O.OverloadedMethodInfo BookmarkFileGetIconMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetIcon",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetIcon"
})
#endif
foreign import ccall "g_bookmark_file_get_is_private" g_bookmark_file_get_is_private ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileGetIsPrivate ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m ()
bookmarkFileGetIsPrivate :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m ()
bookmarkFileGetIsPrivate BookmarkFile
bookmark Text
uri = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
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
$ Ptr BookmarkFile -> CString -> Ptr (Ptr GError) -> IO CInt
g_bookmark_file_get_is_private Ptr BookmarkFile
bookmark' CString
uri'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetIsPrivateMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileGetIsPrivateMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetIsPrivate
instance O.OverloadedMethodInfo BookmarkFileGetIsPrivateMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetIsPrivate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetIsPrivate"
})
#endif
foreign import ccall "g_bookmark_file_get_mime_type" g_bookmark_file_get_mime_type ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO CString
bookmarkFileGetMimeType ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m T.Text
bookmarkFileGetMimeType :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m Text
bookmarkFileGetMimeType BookmarkFile
bookmark Text
uri = IO Text -> m Text
forall a. IO a -> m a
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 BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
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 BookmarkFile -> CString -> Ptr (Ptr GError) -> IO CString
g_bookmark_file_get_mime_type Ptr BookmarkFile
bookmark' CString
uri'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileGetMimeType" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetMimeTypeMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m) => O.OverloadedMethod BookmarkFileGetMimeTypeMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetMimeType
instance O.OverloadedMethodInfo BookmarkFileGetMimeTypeMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetMimeType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetMimeType"
})
#endif
foreign import ccall "g_bookmark_file_get_modified" g_bookmark_file_get_modified ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO CLong
{-# DEPRECATED bookmarkFileGetModified ["(Since version 2.66)","Use 'GI.GLib.Structs.BookmarkFile.bookmarkFileGetModifiedDateTime' instead, as"," @time_t@ is deprecated due to the year 2038 problem."] #-}
bookmarkFileGetModified ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m CLong
bookmarkFileGetModified :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m CLong
bookmarkFileGetModified BookmarkFile
bookmark Text
uri = IO CLong -> m CLong
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CLong -> m CLong) -> IO CLong -> m CLong
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO CLong -> IO () -> IO CLong
forall a b. IO a -> IO b -> IO a
onException (do
CLong
result <- (Ptr (Ptr GError) -> IO CLong) -> IO CLong
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CLong) -> IO CLong)
-> (Ptr (Ptr GError) -> IO CLong) -> IO CLong
forall a b. (a -> b) -> a -> b
$ Ptr BookmarkFile -> CString -> Ptr (Ptr GError) -> IO CLong
g_bookmark_file_get_modified Ptr BookmarkFile
bookmark' CString
uri'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CLong -> IO CLong
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CLong
result
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetModifiedMethodInfo
instance (signature ~ (T.Text -> m CLong), MonadIO m) => O.OverloadedMethod BookmarkFileGetModifiedMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetModified
instance O.OverloadedMethodInfo BookmarkFileGetModifiedMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetModified",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetModified"
})
#endif
foreign import ccall "g_bookmark_file_get_modified_date_time" g_bookmark_file_get_modified_date_time ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr GLib.DateTime.DateTime)
bookmarkFileGetModifiedDateTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m GLib.DateTime.DateTime
bookmarkFileGetModifiedDateTime :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m DateTime
bookmarkFileGetModifiedDateTime BookmarkFile
bookmark Text
uri = IO DateTime -> m DateTime
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DateTime -> m DateTime) -> IO DateTime -> m DateTime
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO DateTime -> IO () -> IO DateTime
forall a b. IO a -> IO b -> IO a
onException (do
Ptr DateTime
result <- (Ptr (Ptr GError) -> IO (Ptr DateTime)) -> IO (Ptr DateTime)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr DateTime)) -> IO (Ptr DateTime))
-> (Ptr (Ptr GError) -> IO (Ptr DateTime)) -> IO (Ptr DateTime)
forall a b. (a -> b) -> a -> b
$ Ptr BookmarkFile
-> CString -> Ptr (Ptr GError) -> IO (Ptr DateTime)
g_bookmark_file_get_modified_date_time Ptr BookmarkFile
bookmark' CString
uri'
Text -> Ptr DateTime -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileGetModifiedDateTime" Ptr DateTime
result
DateTime
result' <- ((ManagedPtr DateTime -> DateTime) -> Ptr DateTime -> IO DateTime
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr DateTime -> DateTime
GLib.DateTime.DateTime) Ptr DateTime
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
DateTime -> IO DateTime
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DateTime
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetModifiedDateTimeMethodInfo
instance (signature ~ (T.Text -> m GLib.DateTime.DateTime), MonadIO m) => O.OverloadedMethod BookmarkFileGetModifiedDateTimeMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetModifiedDateTime
instance O.OverloadedMethodInfo BookmarkFileGetModifiedDateTimeMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetModifiedDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetModifiedDateTime"
})
#endif
foreign import ccall "g_bookmark_file_get_size" g_bookmark_file_get_size ::
Ptr BookmarkFile ->
IO Int32
bookmarkFileGetSize ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> m Int32
bookmarkFileGetSize :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> m Int32
bookmarkFileGetSize BookmarkFile
bookmark = IO Int32 -> m Int32
forall a. IO a -> m a
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 BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
Int32
result <- Ptr BookmarkFile -> IO Int32
g_bookmark_file_get_size Ptr BookmarkFile
bookmark'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetSizeMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.OverloadedMethod BookmarkFileGetSizeMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetSize
instance O.OverloadedMethodInfo BookmarkFileGetSizeMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetSize"
})
#endif
foreign import ccall "g_bookmark_file_get_title" g_bookmark_file_get_title ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO CString
bookmarkFileGetTitle ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> Maybe (T.Text)
-> m T.Text
bookmarkFileGetTitle :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Maybe Text -> m Text
bookmarkFileGetTitle BookmarkFile
bookmark Maybe Text
uri = IO Text -> m Text
forall a. IO a -> m a
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 BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
maybeUri <- case Maybe Text
uri of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jUri -> do
CString
jUri' <- Text -> IO CString
textToCString Text
jUri
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jUri'
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 BookmarkFile -> CString -> Ptr (Ptr GError) -> IO CString
g_bookmark_file_get_title Ptr BookmarkFile
bookmark' CString
maybeUri
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileGetTitle" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUri
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUri
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetTitleMethodInfo
instance (signature ~ (Maybe (T.Text) -> m T.Text), MonadIO m) => O.OverloadedMethod BookmarkFileGetTitleMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetTitle
instance O.OverloadedMethodInfo BookmarkFileGetTitleMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetTitle",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetTitle"
})
#endif
foreign import ccall "g_bookmark_file_get_uris" g_bookmark_file_get_uris ::
Ptr BookmarkFile ->
Ptr Word64 ->
IO (Ptr CString)
bookmarkFileGetUris ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> m [T.Text]
bookmarkFileGetUris :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> m [Text]
bookmarkFileGetUris BookmarkFile
bookmark = IO [Text] -> m [Text]
forall a. IO a -> m a
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 BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
Ptr Word64
length_ <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr CString
result <- Ptr BookmarkFile -> Ptr Word64 -> IO (Ptr CString)
g_bookmark_file_get_uris Ptr BookmarkFile
bookmark' Ptr Word64
length_
Word64
length_' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
length_
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileGetUris" Ptr CString
result
[Text]
result' <- (Word64 -> Ptr CString -> IO [Text]
forall a.
(HasCallStack, Integral a) =>
a -> Ptr CString -> IO [Text]
unpackUTF8CArrayWithLength Word64
length_') Ptr CString
result
(Word64 -> (CString -> IO ()) -> Ptr CString -> IO ()
forall a b c.
(Storable a, Integral b) =>
b -> (a -> IO c) -> Ptr a -> IO ()
mapCArrayWithLength Word64
length_') CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
length_
[Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetUrisMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m) => O.OverloadedMethod BookmarkFileGetUrisMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetUris
instance O.OverloadedMethodInfo BookmarkFileGetUrisMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetUris",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetUris"
})
#endif
foreign import ccall "g_bookmark_file_get_visited" g_bookmark_file_get_visited ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO CLong
{-# DEPRECATED bookmarkFileGetVisited ["(Since version 2.66)","Use 'GI.GLib.Structs.BookmarkFile.bookmarkFileGetVisitedDateTime' instead, as"," @time_t@ is deprecated due to the year 2038 problem."] #-}
bookmarkFileGetVisited ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m CLong
bookmarkFileGetVisited :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m CLong
bookmarkFileGetVisited BookmarkFile
bookmark Text
uri = IO CLong -> m CLong
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CLong -> m CLong) -> IO CLong -> m CLong
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO CLong -> IO () -> IO CLong
forall a b. IO a -> IO b -> IO a
onException (do
CLong
result <- (Ptr (Ptr GError) -> IO CLong) -> IO CLong
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CLong) -> IO CLong)
-> (Ptr (Ptr GError) -> IO CLong) -> IO CLong
forall a b. (a -> b) -> a -> b
$ Ptr BookmarkFile -> CString -> Ptr (Ptr GError) -> IO CLong
g_bookmark_file_get_visited Ptr BookmarkFile
bookmark' CString
uri'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CLong -> IO CLong
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CLong
result
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetVisitedMethodInfo
instance (signature ~ (T.Text -> m CLong), MonadIO m) => O.OverloadedMethod BookmarkFileGetVisitedMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetVisited
instance O.OverloadedMethodInfo BookmarkFileGetVisitedMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetVisited",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetVisited"
})
#endif
foreign import ccall "g_bookmark_file_get_visited_date_time" g_bookmark_file_get_visited_date_time ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr GLib.DateTime.DateTime)
bookmarkFileGetVisitedDateTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m GLib.DateTime.DateTime
bookmarkFileGetVisitedDateTime :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m DateTime
bookmarkFileGetVisitedDateTime BookmarkFile
bookmark Text
uri = IO DateTime -> m DateTime
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DateTime -> m DateTime) -> IO DateTime -> m DateTime
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO DateTime -> IO () -> IO DateTime
forall a b. IO a -> IO b -> IO a
onException (do
Ptr DateTime
result <- (Ptr (Ptr GError) -> IO (Ptr DateTime)) -> IO (Ptr DateTime)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr DateTime)) -> IO (Ptr DateTime))
-> (Ptr (Ptr GError) -> IO (Ptr DateTime)) -> IO (Ptr DateTime)
forall a b. (a -> b) -> a -> b
$ Ptr BookmarkFile
-> CString -> Ptr (Ptr GError) -> IO (Ptr DateTime)
g_bookmark_file_get_visited_date_time Ptr BookmarkFile
bookmark' CString
uri'
Text -> Ptr DateTime -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileGetVisitedDateTime" Ptr DateTime
result
DateTime
result' <- ((ManagedPtr DateTime -> DateTime) -> Ptr DateTime -> IO DateTime
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr DateTime -> DateTime
GLib.DateTime.DateTime) Ptr DateTime
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
DateTime -> IO DateTime
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DateTime
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileGetVisitedDateTimeMethodInfo
instance (signature ~ (T.Text -> m GLib.DateTime.DateTime), MonadIO m) => O.OverloadedMethod BookmarkFileGetVisitedDateTimeMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileGetVisitedDateTime
instance O.OverloadedMethodInfo BookmarkFileGetVisitedDateTimeMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileGetVisitedDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileGetVisitedDateTime"
})
#endif
foreign import ccall "g_bookmark_file_has_application" g_bookmark_file_has_application ::
Ptr BookmarkFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileHasApplication ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> T.Text
-> m ()
bookmarkFileHasApplication :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Text -> m ()
bookmarkFileHasApplication BookmarkFile
bookmark Text
uri Text
name = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
name' <- Text -> IO CString
textToCString Text
name
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
$ Ptr BookmarkFile
-> CString -> CString -> Ptr (Ptr GError) -> IO CInt
g_bookmark_file_has_application Ptr BookmarkFile
bookmark' CString
uri' CString
name'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileHasApplicationMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileHasApplicationMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileHasApplication
instance O.OverloadedMethodInfo BookmarkFileHasApplicationMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileHasApplication",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileHasApplication"
})
#endif
foreign import ccall "g_bookmark_file_has_group" g_bookmark_file_has_group ::
Ptr BookmarkFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileHasGroup ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> T.Text
-> m ()
bookmarkFileHasGroup :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Text -> m ()
bookmarkFileHasGroup BookmarkFile
bookmark Text
uri Text
group = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
group' <- Text -> IO CString
textToCString Text
group
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
$ Ptr BookmarkFile
-> CString -> CString -> Ptr (Ptr GError) -> IO CInt
g_bookmark_file_has_group Ptr BookmarkFile
bookmark' CString
uri' CString
group'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
group'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
group'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileHasGroupMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileHasGroupMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileHasGroup
instance O.OverloadedMethodInfo BookmarkFileHasGroupMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileHasGroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileHasGroup"
})
#endif
foreign import ccall "g_bookmark_file_has_item" g_bookmark_file_has_item ::
Ptr BookmarkFile ->
CString ->
IO CInt
bookmarkFileHasItem ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m Bool
bookmarkFileHasItem :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m Bool
bookmarkFileHasItem BookmarkFile
bookmark Text
uri = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CInt
result <- Ptr BookmarkFile -> CString -> IO CInt
g_bookmark_file_has_item Ptr BookmarkFile
bookmark' CString
uri'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data BookmarkFileHasItemMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m) => O.OverloadedMethod BookmarkFileHasItemMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileHasItem
instance O.OverloadedMethodInfo BookmarkFileHasItemMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileHasItem",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileHasItem"
})
#endif
foreign import ccall "g_bookmark_file_load_from_data" g_bookmark_file_load_from_data ::
Ptr BookmarkFile ->
Ptr Word8 ->
Word64 ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileLoadFromData ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> ByteString
-> m ()
bookmarkFileLoadFromData :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> ByteString -> m ()
bookmarkFileLoadFromData BookmarkFile
bookmark ByteString
data_ = 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
let length_ :: Word64
length_ = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
data_
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
Ptr Word8
data_' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
data_
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
$ Ptr BookmarkFile
-> Ptr Word8 -> Word64 -> Ptr (Ptr GError) -> IO CInt
g_bookmark_file_load_from_data Ptr BookmarkFile
bookmark' Ptr Word8
data_' Word64
length_
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
data_'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
data_'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileLoadFromDataMethodInfo
instance (signature ~ (ByteString -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileLoadFromDataMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileLoadFromData
instance O.OverloadedMethodInfo BookmarkFileLoadFromDataMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileLoadFromData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileLoadFromData"
})
#endif
foreign import ccall "g_bookmark_file_load_from_data_dirs" g_bookmark_file_load_from_data_dirs ::
Ptr BookmarkFile ->
CString ->
Ptr CString ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileLoadFromDataDirs ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> [Char]
-> m ((Maybe [Char]))
bookmarkFileLoadFromDataDirs :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> [Char] -> m (Maybe [Char])
bookmarkFileLoadFromDataDirs BookmarkFile
bookmark [Char]
file = IO (Maybe [Char]) -> m (Maybe [Char])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Char]) -> m (Maybe [Char]))
-> IO (Maybe [Char]) -> m (Maybe [Char])
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
file' <- [Char] -> IO CString
stringToCString [Char]
file
Ptr CString
fullPath <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
IO (Maybe [Char]) -> IO () -> IO (Maybe [Char])
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
$ Ptr BookmarkFile
-> CString -> Ptr CString -> Ptr (Ptr GError) -> IO CInt
g_bookmark_file_load_from_data_dirs Ptr BookmarkFile
bookmark' CString
file' Ptr CString
fullPath
CString
fullPath' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
fullPath
Maybe [Char]
maybeFullPath' <- CString -> (CString -> IO [Char]) -> IO (Maybe [Char])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
fullPath' ((CString -> IO [Char]) -> IO (Maybe [Char]))
-> (CString -> IO [Char]) -> IO (Maybe [Char])
forall a b. (a -> b) -> a -> b
$ \CString
fullPath'' -> do
[Char]
fullPath''' <- HasCallStack => CString -> IO [Char]
CString -> IO [Char]
cstringToString CString
fullPath''
[Char] -> IO [Char]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
fullPath'''
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fullPath'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
file'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
fullPath
Maybe [Char] -> IO (Maybe [Char])
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Char]
maybeFullPath'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
file'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
fullPath
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileLoadFromDataDirsMethodInfo
instance (signature ~ ([Char] -> m ((Maybe [Char]))), MonadIO m) => O.OverloadedMethod BookmarkFileLoadFromDataDirsMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileLoadFromDataDirs
instance O.OverloadedMethodInfo BookmarkFileLoadFromDataDirsMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileLoadFromDataDirs",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileLoadFromDataDirs"
})
#endif
foreign import ccall "g_bookmark_file_load_from_file" g_bookmark_file_load_from_file ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileLoadFromFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> [Char]
-> m ()
bookmarkFileLoadFromFile :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> [Char] -> m ()
bookmarkFileLoadFromFile BookmarkFile
bookmark [Char]
filename = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
filename' <- [Char] -> IO CString
stringToCString [Char]
filename
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
$ Ptr BookmarkFile -> CString -> Ptr (Ptr GError) -> IO CInt
g_bookmark_file_load_from_file Ptr BookmarkFile
bookmark' CString
filename'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileLoadFromFileMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileLoadFromFileMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileLoadFromFile
instance O.OverloadedMethodInfo BookmarkFileLoadFromFileMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileLoadFromFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileLoadFromFile"
})
#endif
foreign import ccall "g_bookmark_file_move_item" g_bookmark_file_move_item ::
Ptr BookmarkFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileMoveItem ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> Maybe (T.Text)
-> m ()
bookmarkFileMoveItem :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Maybe Text -> m ()
bookmarkFileMoveItem BookmarkFile
bookmark Text
oldUri Maybe Text
newUri = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
oldUri' <- Text -> IO CString
textToCString Text
oldUri
CString
maybeNewUri <- case Maybe Text
newUri of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jNewUri -> do
CString
jNewUri' <- Text -> IO CString
textToCString Text
jNewUri
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jNewUri'
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
$ Ptr BookmarkFile
-> CString -> CString -> Ptr (Ptr GError) -> IO CInt
g_bookmark_file_move_item Ptr BookmarkFile
bookmark' CString
oldUri' CString
maybeNewUri
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
oldUri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNewUri
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
oldUri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNewUri
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileMoveItemMethodInfo
instance (signature ~ (T.Text -> Maybe (T.Text) -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileMoveItemMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileMoveItem
instance O.OverloadedMethodInfo BookmarkFileMoveItemMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileMoveItem",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileMoveItem"
})
#endif
foreign import ccall "g_bookmark_file_remove_application" g_bookmark_file_remove_application ::
Ptr BookmarkFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileRemoveApplication ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> T.Text
-> m ()
bookmarkFileRemoveApplication :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Text -> m ()
bookmarkFileRemoveApplication BookmarkFile
bookmark Text
uri Text
name = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
name' <- Text -> IO CString
textToCString Text
name
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
$ Ptr BookmarkFile
-> CString -> CString -> Ptr (Ptr GError) -> IO CInt
g_bookmark_file_remove_application Ptr BookmarkFile
bookmark' CString
uri' CString
name'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileRemoveApplicationMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileRemoveApplicationMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileRemoveApplication
instance O.OverloadedMethodInfo BookmarkFileRemoveApplicationMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileRemoveApplication",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileRemoveApplication"
})
#endif
foreign import ccall "g_bookmark_file_remove_group" g_bookmark_file_remove_group ::
Ptr BookmarkFile ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileRemoveGroup ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> T.Text
-> m ()
bookmarkFileRemoveGroup :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Text -> m ()
bookmarkFileRemoveGroup BookmarkFile
bookmark Text
uri Text
group = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
group' <- Text -> IO CString
textToCString Text
group
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
$ Ptr BookmarkFile
-> CString -> CString -> Ptr (Ptr GError) -> IO CInt
g_bookmark_file_remove_group Ptr BookmarkFile
bookmark' CString
uri' CString
group'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
group'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
group'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileRemoveGroupMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileRemoveGroupMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileRemoveGroup
instance O.OverloadedMethodInfo BookmarkFileRemoveGroupMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileRemoveGroup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileRemoveGroup"
})
#endif
foreign import ccall "g_bookmark_file_remove_item" g_bookmark_file_remove_item ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileRemoveItem ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> m ()
bookmarkFileRemoveItem :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> m ()
bookmarkFileRemoveItem BookmarkFile
bookmark Text
uri = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
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
$ Ptr BookmarkFile -> CString -> Ptr (Ptr GError) -> IO CInt
g_bookmark_file_remove_item Ptr BookmarkFile
bookmark' CString
uri'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileRemoveItemMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileRemoveItemMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileRemoveItem
instance O.OverloadedMethodInfo BookmarkFileRemoveItemMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileRemoveItem",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileRemoveItem"
})
#endif
foreign import ccall "g_bookmark_file_set_added" g_bookmark_file_set_added ::
Ptr BookmarkFile ->
CString ->
CLong ->
IO ()
{-# DEPRECATED bookmarkFileSetAdded ["(Since version 2.66)","Use 'GI.GLib.Structs.BookmarkFile.bookmarkFileSetAddedDateTime' instead, as"," @time_t@ is deprecated due to the year 2038 problem."] #-}
bookmarkFileSetAdded ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> CLong
-> m ()
bookmarkFileSetAdded :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> CLong -> m ()
bookmarkFileSetAdded BookmarkFile
bookmark Text
uri CLong
added = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr BookmarkFile -> CString -> CLong -> IO ()
g_bookmark_file_set_added Ptr BookmarkFile
bookmark' CString
uri' CLong
added
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetAddedMethodInfo
instance (signature ~ (T.Text -> CLong -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetAddedMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetAdded
instance O.OverloadedMethodInfo BookmarkFileSetAddedMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetAdded",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetAdded"
})
#endif
foreign import ccall "g_bookmark_file_set_added_date_time" g_bookmark_file_set_added_date_time ::
Ptr BookmarkFile ->
CString ->
Ptr GLib.DateTime.DateTime ->
IO ()
bookmarkFileSetAddedDateTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> GLib.DateTime.DateTime
-> m ()
bookmarkFileSetAddedDateTime :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> DateTime -> m ()
bookmarkFileSetAddedDateTime BookmarkFile
bookmark Text
uri DateTime
added = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr DateTime
added' <- DateTime -> IO (Ptr DateTime)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DateTime
added
Ptr BookmarkFile -> CString -> Ptr DateTime -> IO ()
g_bookmark_file_set_added_date_time Ptr BookmarkFile
bookmark' CString
uri' Ptr DateTime
added'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
DateTime -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr DateTime
added
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetAddedDateTimeMethodInfo
instance (signature ~ (T.Text -> GLib.DateTime.DateTime -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetAddedDateTimeMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetAddedDateTime
instance O.OverloadedMethodInfo BookmarkFileSetAddedDateTimeMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetAddedDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetAddedDateTime"
})
#endif
foreign import ccall "g_bookmark_file_set_app_info" g_bookmark_file_set_app_info ::
Ptr BookmarkFile ->
CString ->
CString ->
CString ->
Int32 ->
CLong ->
Ptr (Ptr GError) ->
IO CInt
{-# DEPRECATED bookmarkFileSetAppInfo ["(Since version 2.66)","Use 'GI.GLib.Structs.BookmarkFile.bookmarkFileSetApplicationInfo' instead, as"," @time_t@ is deprecated due to the year 2038 problem."] #-}
bookmarkFileSetAppInfo ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> T.Text
-> T.Text
-> Int32
-> CLong
-> m ()
bookmarkFileSetAppInfo :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Text -> Text -> Int32 -> CLong -> m ()
bookmarkFileSetAppInfo BookmarkFile
bookmark Text
uri Text
name Text
exec Int32
count CLong
stamp = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
name' <- Text -> IO CString
textToCString Text
name
CString
exec' <- Text -> IO CString
textToCString Text
exec
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
$ Ptr BookmarkFile
-> CString
-> CString
-> CString
-> Int32
-> CLong
-> Ptr (Ptr GError)
-> IO CInt
g_bookmark_file_set_app_info Ptr BookmarkFile
bookmark' CString
uri' CString
name' CString
exec' Int32
count CLong
stamp
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
exec'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
exec'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetAppInfoMethodInfo
instance (signature ~ (T.Text -> T.Text -> T.Text -> Int32 -> CLong -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetAppInfoMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetAppInfo
instance O.OverloadedMethodInfo BookmarkFileSetAppInfoMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetAppInfo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetAppInfo"
})
#endif
foreign import ccall "g_bookmark_file_set_application_info" g_bookmark_file_set_application_info ::
Ptr BookmarkFile ->
CString ->
CString ->
CString ->
Int32 ->
Ptr GLib.DateTime.DateTime ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileSetApplicationInfo ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> T.Text
-> T.Text
-> Int32
-> Maybe (GLib.DateTime.DateTime)
-> m ()
bookmarkFileSetApplicationInfo :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile
-> Text -> Text -> Text -> Int32 -> Maybe DateTime -> m ()
bookmarkFileSetApplicationInfo BookmarkFile
bookmark Text
uri Text
name Text
exec Int32
count Maybe DateTime
stamp = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
name' <- Text -> IO CString
textToCString Text
name
CString
exec' <- Text -> IO CString
textToCString Text
exec
Ptr DateTime
maybeStamp <- case Maybe DateTime
stamp of
Maybe DateTime
Nothing -> Ptr DateTime -> IO (Ptr DateTime)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DateTime
forall a. Ptr a
nullPtr
Just DateTime
jStamp -> do
Ptr DateTime
jStamp' <- DateTime -> IO (Ptr DateTime)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DateTime
jStamp
Ptr DateTime -> IO (Ptr DateTime)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DateTime
jStamp'
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
$ Ptr BookmarkFile
-> CString
-> CString
-> CString
-> Int32
-> Ptr DateTime
-> Ptr (Ptr GError)
-> IO CInt
g_bookmark_file_set_application_info Ptr BookmarkFile
bookmark' CString
uri' CString
name' CString
exec' Int32
count Ptr DateTime
maybeStamp
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
Maybe DateTime -> (DateTime -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe DateTime
stamp DateTime -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
exec'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
exec'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetApplicationInfoMethodInfo
instance (signature ~ (T.Text -> T.Text -> T.Text -> Int32 -> Maybe (GLib.DateTime.DateTime) -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetApplicationInfoMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetApplicationInfo
instance O.OverloadedMethodInfo BookmarkFileSetApplicationInfoMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetApplicationInfo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetApplicationInfo"
})
#endif
foreign import ccall "g_bookmark_file_set_description" g_bookmark_file_set_description ::
Ptr BookmarkFile ->
CString ->
CString ->
IO ()
bookmarkFileSetDescription ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> Maybe (T.Text)
-> T.Text
-> m ()
bookmarkFileSetDescription :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Maybe Text -> Text -> m ()
bookmarkFileSetDescription BookmarkFile
bookmark Maybe Text
uri Text
description = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
maybeUri <- case Maybe Text
uri of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jUri -> do
CString
jUri' <- Text -> IO CString
textToCString Text
jUri
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jUri'
CString
description' <- Text -> IO CString
textToCString Text
description
Ptr BookmarkFile -> CString -> CString -> IO ()
g_bookmark_file_set_description Ptr BookmarkFile
bookmark' CString
maybeUri CString
description'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUri
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
description'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetDescriptionMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetDescriptionMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetDescription
instance O.OverloadedMethodInfo BookmarkFileSetDescriptionMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetDescription",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetDescription"
})
#endif
foreign import ccall "g_bookmark_file_set_groups" g_bookmark_file_set_groups ::
Ptr BookmarkFile ->
CString ->
Ptr CString ->
Word64 ->
IO ()
bookmarkFileSetGroups ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> Maybe ([T.Text])
-> m ()
bookmarkFileSetGroups :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Maybe [Text] -> m ()
bookmarkFileSetGroups BookmarkFile
bookmark Text
uri Maybe [Text]
groups = 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
let length_ :: Word64
length_ = case Maybe [Text]
groups of
Maybe [Text]
Nothing -> Word64
0
Just [Text]
jGroups -> Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ [Text] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Text]
jGroups
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr CString
maybeGroups <- case Maybe [Text]
groups of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just [Text]
jGroups -> do
Ptr CString
jGroups' <- [Text] -> IO (Ptr CString)
packUTF8CArray [Text]
jGroups
Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jGroups'
Ptr BookmarkFile -> CString -> Ptr CString -> Word64 -> IO ()
g_bookmark_file_set_groups Ptr BookmarkFile
bookmark' CString
uri' Ptr CString
maybeGroups Word64
length_
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
(Word64 -> (CString -> IO ()) -> Ptr CString -> IO ()
forall a b c.
(Storable a, Integral b) =>
b -> (a -> IO c) -> Ptr a -> IO ()
mapCArrayWithLength Word64
length_) CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeGroups
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeGroups
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetGroupsMethodInfo
instance (signature ~ (T.Text -> Maybe ([T.Text]) -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetGroupsMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetGroups
instance O.OverloadedMethodInfo BookmarkFileSetGroupsMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetGroups",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetGroups"
})
#endif
foreign import ccall "g_bookmark_file_set_icon" g_bookmark_file_set_icon ::
Ptr BookmarkFile ->
CString ->
CString ->
CString ->
IO ()
bookmarkFileSetIcon ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> Maybe (T.Text)
-> T.Text
-> m ()
bookmarkFileSetIcon :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Maybe Text -> Text -> m ()
bookmarkFileSetIcon BookmarkFile
bookmark Text
uri Maybe Text
href Text
mimeType = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
maybeHref <- case Maybe Text
href of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jHref -> do
CString
jHref' <- Text -> IO CString
textToCString Text
jHref
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jHref'
CString
mimeType' <- Text -> IO CString
textToCString Text
mimeType
Ptr BookmarkFile -> CString -> CString -> CString -> IO ()
g_bookmark_file_set_icon Ptr BookmarkFile
bookmark' CString
uri' CString
maybeHref CString
mimeType'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeHref
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
mimeType'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetIconMethodInfo
instance (signature ~ (T.Text -> Maybe (T.Text) -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetIconMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetIcon
instance O.OverloadedMethodInfo BookmarkFileSetIconMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetIcon",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetIcon"
})
#endif
foreign import ccall "g_bookmark_file_set_is_private" g_bookmark_file_set_is_private ::
Ptr BookmarkFile ->
CString ->
CInt ->
IO ()
bookmarkFileSetIsPrivate ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> Bool
-> m ()
bookmarkFileSetIsPrivate :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Bool -> m ()
bookmarkFileSetIsPrivate BookmarkFile
bookmark Text
uri Bool
isPrivate = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
let isPrivate' :: CInt
isPrivate' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
isPrivate
Ptr BookmarkFile -> CString -> CInt -> IO ()
g_bookmark_file_set_is_private Ptr BookmarkFile
bookmark' CString
uri' CInt
isPrivate'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetIsPrivateMethodInfo
instance (signature ~ (T.Text -> Bool -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetIsPrivateMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetIsPrivate
instance O.OverloadedMethodInfo BookmarkFileSetIsPrivateMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetIsPrivate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetIsPrivate"
})
#endif
foreign import ccall "g_bookmark_file_set_mime_type" g_bookmark_file_set_mime_type ::
Ptr BookmarkFile ->
CString ->
CString ->
IO ()
bookmarkFileSetMimeType ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> T.Text
-> m ()
bookmarkFileSetMimeType :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> Text -> m ()
bookmarkFileSetMimeType BookmarkFile
bookmark Text
uri Text
mimeType = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
CString
mimeType' <- Text -> IO CString
textToCString Text
mimeType
Ptr BookmarkFile -> CString -> CString -> IO ()
g_bookmark_file_set_mime_type Ptr BookmarkFile
bookmark' CString
uri' CString
mimeType'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
mimeType'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetMimeTypeMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetMimeTypeMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetMimeType
instance O.OverloadedMethodInfo BookmarkFileSetMimeTypeMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetMimeType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetMimeType"
})
#endif
foreign import ccall "g_bookmark_file_set_modified" g_bookmark_file_set_modified ::
Ptr BookmarkFile ->
CString ->
CLong ->
IO ()
{-# DEPRECATED bookmarkFileSetModified ["(Since version 2.66)","Use 'GI.GLib.Structs.BookmarkFile.bookmarkFileSetModifiedDateTime' instead, as"," @time_t@ is deprecated due to the year 2038 problem."] #-}
bookmarkFileSetModified ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> CLong
-> m ()
bookmarkFileSetModified :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> CLong -> m ()
bookmarkFileSetModified BookmarkFile
bookmark Text
uri CLong
modified = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr BookmarkFile -> CString -> CLong -> IO ()
g_bookmark_file_set_modified Ptr BookmarkFile
bookmark' CString
uri' CLong
modified
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetModifiedMethodInfo
instance (signature ~ (T.Text -> CLong -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetModifiedMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetModified
instance O.OverloadedMethodInfo BookmarkFileSetModifiedMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetModified",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetModified"
})
#endif
foreign import ccall "g_bookmark_file_set_modified_date_time" g_bookmark_file_set_modified_date_time ::
Ptr BookmarkFile ->
CString ->
Ptr GLib.DateTime.DateTime ->
IO ()
bookmarkFileSetModifiedDateTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> GLib.DateTime.DateTime
-> m ()
bookmarkFileSetModifiedDateTime :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> DateTime -> m ()
bookmarkFileSetModifiedDateTime BookmarkFile
bookmark Text
uri DateTime
modified = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr DateTime
modified' <- DateTime -> IO (Ptr DateTime)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DateTime
modified
Ptr BookmarkFile -> CString -> Ptr DateTime -> IO ()
g_bookmark_file_set_modified_date_time Ptr BookmarkFile
bookmark' CString
uri' Ptr DateTime
modified'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
DateTime -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr DateTime
modified
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetModifiedDateTimeMethodInfo
instance (signature ~ (T.Text -> GLib.DateTime.DateTime -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetModifiedDateTimeMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetModifiedDateTime
instance O.OverloadedMethodInfo BookmarkFileSetModifiedDateTimeMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetModifiedDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetModifiedDateTime"
})
#endif
foreign import ccall "g_bookmark_file_set_title" g_bookmark_file_set_title ::
Ptr BookmarkFile ->
CString ->
CString ->
IO ()
bookmarkFileSetTitle ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> Maybe (T.Text)
-> T.Text
-> m ()
bookmarkFileSetTitle :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Maybe Text -> Text -> m ()
bookmarkFileSetTitle BookmarkFile
bookmark Maybe Text
uri Text
title = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
maybeUri <- case Maybe Text
uri of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jUri -> do
CString
jUri' <- Text -> IO CString
textToCString Text
jUri
CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jUri'
CString
title' <- Text -> IO CString
textToCString Text
title
Ptr BookmarkFile -> CString -> CString -> IO ()
g_bookmark_file_set_title Ptr BookmarkFile
bookmark' CString
maybeUri CString
title'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeUri
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
title'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetTitleMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetTitleMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetTitle
instance O.OverloadedMethodInfo BookmarkFileSetTitleMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetTitle",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetTitle"
})
#endif
foreign import ccall "g_bookmark_file_set_visited" g_bookmark_file_set_visited ::
Ptr BookmarkFile ->
CString ->
CLong ->
IO ()
{-# DEPRECATED bookmarkFileSetVisited ["(Since version 2.66)","Use 'GI.GLib.Structs.BookmarkFile.bookmarkFileSetVisitedDateTime' instead, as"," @time_t@ is deprecated due to the year 2038 problem."] #-}
bookmarkFileSetVisited ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> CLong
-> m ()
bookmarkFileSetVisited :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> CLong -> m ()
bookmarkFileSetVisited BookmarkFile
bookmark Text
uri CLong
visited = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr BookmarkFile -> CString -> CLong -> IO ()
g_bookmark_file_set_visited Ptr BookmarkFile
bookmark' CString
uri' CLong
visited
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetVisitedMethodInfo
instance (signature ~ (T.Text -> CLong -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetVisitedMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetVisited
instance O.OverloadedMethodInfo BookmarkFileSetVisitedMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetVisited",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetVisited"
})
#endif
foreign import ccall "g_bookmark_file_set_visited_date_time" g_bookmark_file_set_visited_date_time ::
Ptr BookmarkFile ->
CString ->
Ptr GLib.DateTime.DateTime ->
IO ()
bookmarkFileSetVisitedDateTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> T.Text
-> GLib.DateTime.DateTime
-> m ()
bookmarkFileSetVisitedDateTime :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> Text -> DateTime -> m ()
bookmarkFileSetVisitedDateTime BookmarkFile
bookmark Text
uri DateTime
visited = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr DateTime
visited' <- DateTime -> IO (Ptr DateTime)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DateTime
visited
Ptr BookmarkFile -> CString -> Ptr DateTime -> IO ()
g_bookmark_file_set_visited_date_time Ptr BookmarkFile
bookmark' CString
uri' Ptr DateTime
visited'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
DateTime -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr DateTime
visited
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BookmarkFileSetVisitedDateTimeMethodInfo
instance (signature ~ (T.Text -> GLib.DateTime.DateTime -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileSetVisitedDateTimeMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileSetVisitedDateTime
instance O.OverloadedMethodInfo BookmarkFileSetVisitedDateTimeMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileSetVisitedDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileSetVisitedDateTime"
})
#endif
foreign import ccall "g_bookmark_file_to_data" g_bookmark_file_to_data ::
Ptr BookmarkFile ->
Ptr Word64 ->
Ptr (Ptr GError) ->
IO (Ptr Word8)
bookmarkFileToData ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> m ByteString
bookmarkFileToData :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> m ByteString
bookmarkFileToData BookmarkFile
bookmark = IO ByteString -> m ByteString
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ByteString -> m ByteString) -> IO ByteString -> m ByteString
forall a b. (a -> b) -> a -> b
$ do
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
Ptr Word64
length_ <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
IO ByteString -> IO () -> IO ByteString
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Word8
result <- (Ptr (Ptr GError) -> IO (Ptr Word8)) -> IO (Ptr Word8)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Word8)) -> IO (Ptr Word8))
-> (Ptr (Ptr GError) -> IO (Ptr Word8)) -> IO (Ptr Word8)
forall a b. (a -> b) -> a -> b
$ Ptr BookmarkFile
-> Ptr Word64 -> Ptr (Ptr GError) -> IO (Ptr Word8)
g_bookmark_file_to_data Ptr BookmarkFile
bookmark' Ptr Word64
length_
Word64
length_' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
length_
Text -> Ptr Word8 -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bookmarkFileToData" Ptr Word8
result
ByteString
result' <- (Word64 -> Ptr Word8 -> IO ByteString
forall a. Integral a => a -> Ptr Word8 -> IO ByteString
unpackByteStringWithLength Word64
length_') Ptr Word8
result
Ptr Word8 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word8
result
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
length_
ByteString -> IO ByteString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ByteString
result'
) (do
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
length_
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileToDataMethodInfo
instance (signature ~ (m ByteString), MonadIO m) => O.OverloadedMethod BookmarkFileToDataMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileToData
instance O.OverloadedMethodInfo BookmarkFileToDataMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileToData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileToData"
})
#endif
foreign import ccall "g_bookmark_file_to_file" g_bookmark_file_to_file ::
Ptr BookmarkFile ->
CString ->
Ptr (Ptr GError) ->
IO CInt
bookmarkFileToFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
BookmarkFile
-> [Char]
-> m ()
bookmarkFileToFile :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BookmarkFile -> [Char] -> m ()
bookmarkFileToFile BookmarkFile
bookmark [Char]
filename = 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
Ptr BookmarkFile
bookmark' <- BookmarkFile -> IO (Ptr BookmarkFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BookmarkFile
bookmark
CString
filename' <- [Char] -> IO CString
stringToCString [Char]
filename
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
$ Ptr BookmarkFile -> CString -> Ptr (Ptr GError) -> IO CInt
g_bookmark_file_to_file Ptr BookmarkFile
bookmark' CString
filename'
BookmarkFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BookmarkFile
bookmark
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
)
#if defined(ENABLE_OVERLOADING)
data BookmarkFileToFileMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m) => O.OverloadedMethod BookmarkFileToFileMethodInfo BookmarkFile signature where
overloadedMethod = bookmarkFileToFile
instance O.OverloadedMethodInfo BookmarkFileToFileMethodInfo BookmarkFile where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GLib.Structs.BookmarkFile.bookmarkFileToFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-glib-2.0.29/docs/GI-GLib-Structs-BookmarkFile.html#v:bookmarkFileToFile"
})
#endif
foreign import ccall "g_bookmark_file_error_quark" g_bookmark_file_error_quark ::
IO Word32
bookmarkFileErrorQuark ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Word32
bookmarkFileErrorQuark :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Word32
bookmarkFileErrorQuark = IO Word32 -> m Word32
forall a. IO a -> m a
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_bookmark_file_error_quark
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveBookmarkFileMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveBookmarkFileMethod "addApplication" o = BookmarkFileAddApplicationMethodInfo
ResolveBookmarkFileMethod "addGroup" o = BookmarkFileAddGroupMethodInfo
ResolveBookmarkFileMethod "copy" o = BookmarkFileCopyMethodInfo
ResolveBookmarkFileMethod "free" o = BookmarkFileFreeMethodInfo
ResolveBookmarkFileMethod "hasApplication" o = BookmarkFileHasApplicationMethodInfo
ResolveBookmarkFileMethod "hasGroup" o = BookmarkFileHasGroupMethodInfo
ResolveBookmarkFileMethod "hasItem" o = BookmarkFileHasItemMethodInfo
ResolveBookmarkFileMethod "loadFromData" o = BookmarkFileLoadFromDataMethodInfo
ResolveBookmarkFileMethod "loadFromDataDirs" o = BookmarkFileLoadFromDataDirsMethodInfo
ResolveBookmarkFileMethod "loadFromFile" o = BookmarkFileLoadFromFileMethodInfo
ResolveBookmarkFileMethod "moveItem" o = BookmarkFileMoveItemMethodInfo
ResolveBookmarkFileMethod "removeApplication" o = BookmarkFileRemoveApplicationMethodInfo
ResolveBookmarkFileMethod "removeGroup" o = BookmarkFileRemoveGroupMethodInfo
ResolveBookmarkFileMethod "removeItem" o = BookmarkFileRemoveItemMethodInfo
ResolveBookmarkFileMethod "toData" o = BookmarkFileToDataMethodInfo
ResolveBookmarkFileMethod "toFile" o = BookmarkFileToFileMethodInfo
ResolveBookmarkFileMethod "getAdded" o = BookmarkFileGetAddedMethodInfo
ResolveBookmarkFileMethod "getAddedDateTime" o = BookmarkFileGetAddedDateTimeMethodInfo
ResolveBookmarkFileMethod "getAppInfo" o = BookmarkFileGetAppInfoMethodInfo
ResolveBookmarkFileMethod "getApplicationInfo" o = BookmarkFileGetApplicationInfoMethodInfo
ResolveBookmarkFileMethod "getApplications" o = BookmarkFileGetApplicationsMethodInfo
ResolveBookmarkFileMethod "getDescription" o = BookmarkFileGetDescriptionMethodInfo
ResolveBookmarkFileMethod "getGroups" o = BookmarkFileGetGroupsMethodInfo
ResolveBookmarkFileMethod "getIcon" o = BookmarkFileGetIconMethodInfo
ResolveBookmarkFileMethod "getIsPrivate" o = BookmarkFileGetIsPrivateMethodInfo
ResolveBookmarkFileMethod "getMimeType" o = BookmarkFileGetMimeTypeMethodInfo
ResolveBookmarkFileMethod "getModified" o = BookmarkFileGetModifiedMethodInfo
ResolveBookmarkFileMethod "getModifiedDateTime" o = BookmarkFileGetModifiedDateTimeMethodInfo
ResolveBookmarkFileMethod "getSize" o = BookmarkFileGetSizeMethodInfo
ResolveBookmarkFileMethod "getTitle" o = BookmarkFileGetTitleMethodInfo
ResolveBookmarkFileMethod "getUris" o = BookmarkFileGetUrisMethodInfo
ResolveBookmarkFileMethod "getVisited" o = BookmarkFileGetVisitedMethodInfo
ResolveBookmarkFileMethod "getVisitedDateTime" o = BookmarkFileGetVisitedDateTimeMethodInfo
ResolveBookmarkFileMethod "setAdded" o = BookmarkFileSetAddedMethodInfo
ResolveBookmarkFileMethod "setAddedDateTime" o = BookmarkFileSetAddedDateTimeMethodInfo
ResolveBookmarkFileMethod "setAppInfo" o = BookmarkFileSetAppInfoMethodInfo
ResolveBookmarkFileMethod "setApplicationInfo" o = BookmarkFileSetApplicationInfoMethodInfo
ResolveBookmarkFileMethod "setDescription" o = BookmarkFileSetDescriptionMethodInfo
ResolveBookmarkFileMethod "setGroups" o = BookmarkFileSetGroupsMethodInfo
ResolveBookmarkFileMethod "setIcon" o = BookmarkFileSetIconMethodInfo
ResolveBookmarkFileMethod "setIsPrivate" o = BookmarkFileSetIsPrivateMethodInfo
ResolveBookmarkFileMethod "setMimeType" o = BookmarkFileSetMimeTypeMethodInfo
ResolveBookmarkFileMethod "setModified" o = BookmarkFileSetModifiedMethodInfo
ResolveBookmarkFileMethod "setModifiedDateTime" o = BookmarkFileSetModifiedDateTimeMethodInfo
ResolveBookmarkFileMethod "setTitle" o = BookmarkFileSetTitleMethodInfo
ResolveBookmarkFileMethod "setVisited" o = BookmarkFileSetVisitedMethodInfo
ResolveBookmarkFileMethod "setVisitedDateTime" o = BookmarkFileSetVisitedDateTimeMethodInfo
ResolveBookmarkFileMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveBookmarkFileMethod t BookmarkFile, O.OverloadedMethod info BookmarkFile p) => OL.IsLabel t (BookmarkFile -> 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 ~ ResolveBookmarkFileMethod t BookmarkFile, O.OverloadedMethod info BookmarkFile p, R.HasField t BookmarkFile p) => R.HasField t BookmarkFile p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveBookmarkFileMethod t BookmarkFile, O.OverloadedMethodInfo info BookmarkFile) => OL.IsLabel t (O.MethodProxy info BookmarkFile) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif