gi-ggit-1.0.4: GI/Ggit/Structs/IndexEntry.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
Represents an index entry object.
-}
#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Ggit.Structs.IndexEntry
(
-- * Exported types
IndexEntry(..) ,
noIndexEntry ,
-- * Methods
-- ** getDev #method:getDev#
#if ENABLE_OVERLOADING
IndexEntryGetDevMethodInfo ,
#endif
indexEntryGetDev ,
-- ** getFileSize #method:getFileSize#
#if ENABLE_OVERLOADING
IndexEntryGetFileSizeMethodInfo ,
#endif
indexEntryGetFileSize ,
-- ** getFlags #method:getFlags#
#if ENABLE_OVERLOADING
IndexEntryGetFlagsMethodInfo ,
#endif
indexEntryGetFlags ,
-- ** getFlagsExtended #method:getFlagsExtended#
#if ENABLE_OVERLOADING
IndexEntryGetFlagsExtendedMethodInfo ,
#endif
indexEntryGetFlagsExtended ,
-- ** getGid #method:getGid#
#if ENABLE_OVERLOADING
IndexEntryGetGidMethodInfo ,
#endif
indexEntryGetGid ,
-- ** getId #method:getId#
#if ENABLE_OVERLOADING
IndexEntryGetIdMethodInfo ,
#endif
indexEntryGetId ,
-- ** getIno #method:getIno#
#if ENABLE_OVERLOADING
IndexEntryGetInoMethodInfo ,
#endif
indexEntryGetIno ,
-- ** getMode #method:getMode#
#if ENABLE_OVERLOADING
IndexEntryGetModeMethodInfo ,
#endif
indexEntryGetMode ,
-- ** getPath #method:getPath#
#if ENABLE_OVERLOADING
IndexEntryGetPathMethodInfo ,
#endif
indexEntryGetPath ,
-- ** getUid #method:getUid#
#if ENABLE_OVERLOADING
IndexEntryGetUidMethodInfo ,
#endif
indexEntryGetUid ,
-- ** isConflict #method:isConflict#
#if ENABLE_OVERLOADING
IndexEntryIsConflictMethodInfo ,
#endif
indexEntryIsConflict ,
-- ** ref #method:ref#
#if ENABLE_OVERLOADING
IndexEntryRefMethodInfo ,
#endif
indexEntryRef ,
-- ** setCommit #method:setCommit#
#if ENABLE_OVERLOADING
IndexEntrySetCommitMethodInfo ,
#endif
indexEntrySetCommit ,
-- ** setDev #method:setDev#
#if ENABLE_OVERLOADING
IndexEntrySetDevMethodInfo ,
#endif
indexEntrySetDev ,
-- ** setFileSize #method:setFileSize#
#if ENABLE_OVERLOADING
IndexEntrySetFileSizeMethodInfo ,
#endif
indexEntrySetFileSize ,
-- ** setFlags #method:setFlags#
#if ENABLE_OVERLOADING
IndexEntrySetFlagsMethodInfo ,
#endif
indexEntrySetFlags ,
-- ** setFlagsExtended #method:setFlagsExtended#
#if ENABLE_OVERLOADING
IndexEntrySetFlagsExtendedMethodInfo ,
#endif
indexEntrySetFlagsExtended ,
-- ** setGid #method:setGid#
#if ENABLE_OVERLOADING
IndexEntrySetGidMethodInfo ,
#endif
indexEntrySetGid ,
-- ** setId #method:setId#
#if ENABLE_OVERLOADING
IndexEntrySetIdMethodInfo ,
#endif
indexEntrySetId ,
-- ** setIno #method:setIno#
#if ENABLE_OVERLOADING
IndexEntrySetInoMethodInfo ,
#endif
indexEntrySetIno ,
-- ** setMode #method:setMode#
#if ENABLE_OVERLOADING
IndexEntrySetModeMethodInfo ,
#endif
indexEntrySetMode ,
-- ** setPath #method:setPath#
#if ENABLE_OVERLOADING
IndexEntrySetPathMethodInfo ,
#endif
indexEntrySetPath ,
-- ** setUid #method:setUid#
#if ENABLE_OVERLOADING
IndexEntrySetUidMethodInfo ,
#endif
indexEntrySetUid ,
-- ** stat #method:stat#
#if ENABLE_OVERLOADING
IndexEntryStatMethodInfo ,
#endif
indexEntryStat ,
-- ** unref #method:unref#
#if ENABLE_OVERLOADING
IndexEntryUnrefMethodInfo ,
#endif
indexEntryUnref ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import {-# SOURCE #-} qualified GI.Ggit.Objects.Commit as Ggit.Commit
import {-# SOURCE #-} qualified GI.Ggit.Structs.OId as Ggit.OId
import qualified GI.Gio.Interfaces.File as Gio.File
-- | Memory-managed wrapper type.
newtype IndexEntry = IndexEntry (ManagedPtr IndexEntry)
foreign import ccall "ggit_index_entry_get_type" c_ggit_index_entry_get_type ::
IO GType
instance BoxedObject IndexEntry where
boxedType _ = c_ggit_index_entry_get_type
-- | A convenience alias for `Nothing` :: `Maybe` `IndexEntry`.
noIndexEntry :: Maybe IndexEntry
noIndexEntry = Nothing
#if ENABLE_OVERLOADING
instance O.HasAttributeList IndexEntry
type instance O.AttributeList IndexEntry = IndexEntryAttributeList
type IndexEntryAttributeList = ('[ ] :: [(Symbol, *)])
#endif
-- method IndexEntry::get_dev
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_get_dev" ggit_index_entry_get_dev ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO Word32
{- |
Get the dev of the index entry.
-}
indexEntryGetDev ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m Word32
{- ^ __Returns:__ the dev. -}
indexEntryGetDev entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_get_dev entry'
touchManagedPtr entry
return result
#if ENABLE_OVERLOADING
data IndexEntryGetDevMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo IndexEntryGetDevMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryGetDev
#endif
-- method IndexEntry::get_file_size
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt64)
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_get_file_size" ggit_index_entry_get_file_size ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO Int64
{- |
Get the file size of the index entry.
-}
indexEntryGetFileSize ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m Int64
{- ^ __Returns:__ the file size. -}
indexEntryGetFileSize entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_get_file_size entry'
touchManagedPtr entry
return result
#if ENABLE_OVERLOADING
data IndexEntryGetFileSizeMethodInfo
instance (signature ~ (m Int64), MonadIO m) => O.MethodInfo IndexEntryGetFileSizeMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryGetFileSize
#endif
-- method IndexEntry::get_flags
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_get_flags" ggit_index_entry_get_flags ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO Word32
{- |
Get the flags of the index entry.
-}
indexEntryGetFlags ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m Word32
{- ^ __Returns:__ the flags. -}
indexEntryGetFlags entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_get_flags entry'
touchManagedPtr entry
return result
#if ENABLE_OVERLOADING
data IndexEntryGetFlagsMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo IndexEntryGetFlagsMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryGetFlags
#endif
-- method IndexEntry::get_flags_extended
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_get_flags_extended" ggit_index_entry_get_flags_extended ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO Word32
{- |
Get the extended flags of the index entry.
-}
indexEntryGetFlagsExtended ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m Word32
{- ^ __Returns:__ the extended flags. -}
indexEntryGetFlagsExtended entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_get_flags_extended entry'
touchManagedPtr entry
return result
#if ENABLE_OVERLOADING
data IndexEntryGetFlagsExtendedMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo IndexEntryGetFlagsExtendedMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryGetFlagsExtended
#endif
-- method IndexEntry::get_gid
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_get_gid" ggit_index_entry_get_gid ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO Word32
{- |
Get the gid of the index entry.
-}
indexEntryGetGid ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m Word32
{- ^ __Returns:__ the gid. -}
indexEntryGetGid entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_get_gid entry'
touchManagedPtr entry
return result
#if ENABLE_OVERLOADING
data IndexEntryGetGidMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo IndexEntryGetGidMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryGetGid
#endif
-- method IndexEntry::get_id
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Ggit", name = "OId"}))
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_get_id" ggit_index_entry_get_id ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO (Ptr Ggit.OId.OId)
{- |
Get the oid of the index entry.
-}
indexEntryGetId ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m (Maybe Ggit.OId.OId)
{- ^ __Returns:__ the oid or 'Nothing'. -}
indexEntryGetId entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_get_id entry'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapBoxed Ggit.OId.OId) result'
return result''
touchManagedPtr entry
return maybeResult
#if ENABLE_OVERLOADING
data IndexEntryGetIdMethodInfo
instance (signature ~ (m (Maybe Ggit.OId.OId)), MonadIO m) => O.MethodInfo IndexEntryGetIdMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryGetId
#endif
-- method IndexEntry::get_ino
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_get_ino" ggit_index_entry_get_ino ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO Word32
{- |
Get the ino of the index entry.
-}
indexEntryGetIno ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m Word32
{- ^ __Returns:__ the ino. -}
indexEntryGetIno entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_get_ino entry'
touchManagedPtr entry
return result
#if ENABLE_OVERLOADING
data IndexEntryGetInoMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo IndexEntryGetInoMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryGetIno
#endif
-- method IndexEntry::get_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_get_mode" ggit_index_entry_get_mode ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO Word32
{- |
Get the mode of the index entry.
-}
indexEntryGetMode ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m Word32
{- ^ __Returns:__ the mode. -}
indexEntryGetMode entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_get_mode entry'
touchManagedPtr entry
return result
#if ENABLE_OVERLOADING
data IndexEntryGetModeMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo IndexEntryGetModeMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryGetMode
#endif
-- method IndexEntry::get_path
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_get_path" ggit_index_entry_get_path ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO CString
{- |
/No description available in the introspection data./
-}
indexEntryGetPath ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
-> m T.Text
indexEntryGetPath entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_get_path entry'
checkUnexpectedReturnNULL "indexEntryGetPath" result
result' <- cstringToText result
touchManagedPtr entry
return result'
#if ENABLE_OVERLOADING
data IndexEntryGetPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo IndexEntryGetPathMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryGetPath
#endif
-- method IndexEntry::get_uid
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_get_uid" ggit_index_entry_get_uid ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO Word32
{- |
Get the uid of the index entry.
-}
indexEntryGetUid ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m Word32
{- ^ __Returns:__ the uid. -}
indexEntryGetUid entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_get_uid entry'
touchManagedPtr entry
return result
#if ENABLE_OVERLOADING
data IndexEntryGetUidMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo IndexEntryGetUidMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryGetUid
#endif
-- method IndexEntry::is_conflict
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_is_conflict" ggit_index_entry_is_conflict ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO CInt
{- |
Get whether the entry represents a conflict.
-}
indexEntryIsConflict ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m Bool
{- ^ __Returns:__ 'True' if the entry is a conflict, or 'False' otherwise. -}
indexEntryIsConflict entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_is_conflict entry'
let result' = (/= 0) result
touchManagedPtr entry
return result'
#if ENABLE_OVERLOADING
data IndexEntryIsConflictMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo IndexEntryIsConflictMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryIsConflict
#endif
-- method IndexEntry::ref
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Ggit", name = "IndexEntry"}))
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_ref" ggit_index_entry_ref ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO (Ptr IndexEntry)
{- |
Atomically increments the reference count of /@entry@/ by one.
This function is MT-safe and may be called from any thread.
-}
indexEntryRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m (Maybe IndexEntry)
{- ^ __Returns:__ a 'GI.Ggit.Structs.IndexEntry.IndexEntry' or 'Nothing'. -}
indexEntryRef entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
result <- ggit_index_entry_ref entry'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newBoxed IndexEntry) result'
return result''
touchManagedPtr entry
return maybeResult
#if ENABLE_OVERLOADING
data IndexEntryRefMethodInfo
instance (signature ~ (m (Maybe IndexEntry)), MonadIO m) => O.MethodInfo IndexEntryRefMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryRef
#endif
-- method IndexEntry::set_commit
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "commit", argType = TInterface (Name {namespace = "Ggit", name = "Commit"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitCommit.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_set_commit" ggit_index_entry_set_commit ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
Ptr Ggit.Commit.Commit -> -- commit : TInterface (Name {namespace = "Ggit", name = "Commit"})
IO ()
{- |
Set the index entry to point to a given commit. This sets the index entry
id to the commit id, changes the mode to @/GGIT_FILE_MODE_COMMIT/@ and updates
the timestamps to when the commit was made.
-}
indexEntrySetCommit ::
(B.CallStack.HasCallStack, MonadIO m, Ggit.Commit.IsCommit a) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> a
{- ^ /@commit@/: a 'GI.Ggit.Objects.Commit.Commit'. -}
-> m ()
indexEntrySetCommit entry commit = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
commit' <- unsafeManagedPtrCastPtr commit
ggit_index_entry_set_commit entry' commit'
touchManagedPtr entry
touchManagedPtr commit
return ()
#if ENABLE_OVERLOADING
data IndexEntrySetCommitMethodInfo
instance (signature ~ (a -> m ()), MonadIO m, Ggit.Commit.IsCommit a) => O.MethodInfo IndexEntrySetCommitMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntrySetCommit
#endif
-- method IndexEntry::set_dev
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dev", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the dev.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_set_dev" ggit_index_entry_set_dev ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
Word32 -> -- dev : TBasicType TUInt
IO ()
{- |
Set the dev of the index entry.
-}
indexEntrySetDev ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> Word32
{- ^ /@dev@/: the dev. -}
-> m ()
indexEntrySetDev entry dev = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
ggit_index_entry_set_dev entry' dev
touchManagedPtr entry
return ()
#if ENABLE_OVERLOADING
data IndexEntrySetDevMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo IndexEntrySetDevMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntrySetDev
#endif
-- method IndexEntry::set_file_size
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file_size", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the file size.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_set_file_size" ggit_index_entry_set_file_size ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
Int64 -> -- file_size : TBasicType TInt64
IO ()
{- |
Set the file size of the index entry.
-}
indexEntrySetFileSize ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> Int64
{- ^ /@fileSize@/: the file size. -}
-> m ()
indexEntrySetFileSize entry fileSize = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
ggit_index_entry_set_file_size entry' fileSize
touchManagedPtr entry
return ()
#if ENABLE_OVERLOADING
data IndexEntrySetFileSizeMethodInfo
instance (signature ~ (Int64 -> m ()), MonadIO m) => O.MethodInfo IndexEntrySetFileSizeMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntrySetFileSize
#endif
-- method IndexEntry::set_flags
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the flags.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_set_flags" ggit_index_entry_set_flags ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
Word32 -> -- flags : TBasicType TUInt
IO ()
{- |
Set the flags of the index entry.
-}
indexEntrySetFlags ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> Word32
{- ^ /@flags@/: the flags. -}
-> m ()
indexEntrySetFlags entry flags = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
ggit_index_entry_set_flags entry' flags
touchManagedPtr entry
return ()
#if ENABLE_OVERLOADING
data IndexEntrySetFlagsMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo IndexEntrySetFlagsMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntrySetFlags
#endif
-- method IndexEntry::set_flags_extended
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags_extended", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the extended flags.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_set_flags_extended" ggit_index_entry_set_flags_extended ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
Word32 -> -- flags_extended : TBasicType TUInt
IO ()
{- |
Set the extended flags of the index entry.
-}
indexEntrySetFlagsExtended ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> Word32
{- ^ /@flagsExtended@/: the extended flags. -}
-> m ()
indexEntrySetFlagsExtended entry flagsExtended = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
ggit_index_entry_set_flags_extended entry' flagsExtended
touchManagedPtr entry
return ()
#if ENABLE_OVERLOADING
data IndexEntrySetFlagsExtendedMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo IndexEntrySetFlagsExtendedMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntrySetFlagsExtended
#endif
-- method IndexEntry::set_gid
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "gid", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the gid.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_set_gid" ggit_index_entry_set_gid ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
Word32 -> -- gid : TBasicType TUInt
IO ()
{- |
Set the gid of the index entry.
-}
indexEntrySetGid ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> Word32
{- ^ /@gid@/: the gid. -}
-> m ()
indexEntrySetGid entry gid = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
ggit_index_entry_set_gid entry' gid
touchManagedPtr entry
return ()
#if ENABLE_OVERLOADING
data IndexEntrySetGidMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo IndexEntrySetGidMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntrySetGid
#endif
-- method IndexEntry::set_id
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TInterface (Name {namespace = "Ggit", name = "OId"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the oid.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_set_id" ggit_index_entry_set_id ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
Ptr Ggit.OId.OId -> -- id : TInterface (Name {namespace = "Ggit", name = "OId"})
IO ()
{- |
Set the oid of the index entry.
-}
indexEntrySetId ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> Maybe (Ggit.OId.OId)
{- ^ /@id@/: the oid. -}
-> m ()
indexEntrySetId entry id = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
maybeId <- case id of
Nothing -> return nullPtr
Just jId -> do
jId' <- unsafeManagedPtrGetPtr jId
return jId'
ggit_index_entry_set_id entry' maybeId
touchManagedPtr entry
whenJust id touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data IndexEntrySetIdMethodInfo
instance (signature ~ (Maybe (Ggit.OId.OId) -> m ()), MonadIO m) => O.MethodInfo IndexEntrySetIdMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntrySetId
#endif
-- method IndexEntry::set_ino
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ino", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the ino.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_set_ino" ggit_index_entry_set_ino ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
Word32 -> -- ino : TBasicType TUInt
IO ()
{- |
Set the ino of the index entry.
-}
indexEntrySetIno ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> Word32
{- ^ /@ino@/: the ino. -}
-> m ()
indexEntrySetIno entry ino = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
ggit_index_entry_set_ino entry' ino
touchManagedPtr entry
return ()
#if ENABLE_OVERLOADING
data IndexEntrySetInoMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo IndexEntrySetInoMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntrySetIno
#endif
-- method IndexEntry::set_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mode", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the mode.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_set_mode" ggit_index_entry_set_mode ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
Word32 -> -- mode : TBasicType TUInt
IO ()
{- |
Set the mode of the index entry.
-}
indexEntrySetMode ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> Word32
{- ^ /@mode@/: the mode. -}
-> m ()
indexEntrySetMode entry mode = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
ggit_index_entry_set_mode entry' mode
touchManagedPtr entry
return ()
#if ENABLE_OVERLOADING
data IndexEntrySetModeMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo IndexEntrySetModeMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntrySetMode
#endif
-- method IndexEntry::set_path
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the path.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_set_path" ggit_index_entry_set_path ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
CString -> -- path : TBasicType TUTF8
IO ()
{- |
Set the path of the index entry. The path should be relative to the working
directory.
-}
indexEntrySetPath ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> Maybe (T.Text)
{- ^ /@path@/: the path. -}
-> m ()
indexEntrySetPath entry path = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
maybePath <- case path of
Nothing -> return nullPtr
Just jPath -> do
jPath' <- textToCString jPath
return jPath'
ggit_index_entry_set_path entry' maybePath
touchManagedPtr entry
freeMem maybePath
return ()
#if ENABLE_OVERLOADING
data IndexEntrySetPathMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m) => O.MethodInfo IndexEntrySetPathMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntrySetPath
#endif
-- method IndexEntry::set_uid
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uid", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the uid.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_set_uid" ggit_index_entry_set_uid ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
Word32 -> -- uid : TBasicType TUInt
IO ()
{- |
Set the uid of the index entry.
-}
indexEntrySetUid ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> Word32
{- ^ /@uid@/: the uid. -}
-> m ()
indexEntrySetUid entry uid = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
ggit_index_entry_set_uid entry' uid
touchManagedPtr entry
return ()
#if ENABLE_OVERLOADING
data IndexEntrySetUidMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo IndexEntrySetUidMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntrySetUid
#endif
-- method IndexEntry::stat
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the file to stat.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False
foreign import ccall "ggit_index_entry_stat" ggit_index_entry_stat ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
Ptr Gio.File.File -> -- file : TInterface (Name {namespace = "Gio", name = "File"})
Ptr (Ptr GError) -> -- error
IO CInt
{- |
Fill the entry fields from statting /@file@/.
-}
indexEntryStat ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> a
{- ^ /@file@/: the file to stat. -}
-> m ()
{- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
indexEntryStat entry file = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
file' <- unsafeManagedPtrCastPtr file
onException (do
_ <- propagateGError $ ggit_index_entry_stat entry' file'
touchManagedPtr entry
touchManagedPtr file
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data IndexEntryStatMethodInfo
instance (signature ~ (a -> m ()), MonadIO m, Gio.File.IsFile a) => O.MethodInfo IndexEntryStatMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryStat
#endif
-- method IndexEntry::unref
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "entry", argType = TInterface (Name {namespace = "Ggit", name = "IndexEntry"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GgitIndexEntry.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "ggit_index_entry_unref" ggit_index_entry_unref ::
Ptr IndexEntry -> -- entry : TInterface (Name {namespace = "Ggit", name = "IndexEntry"})
IO ()
{- |
Atomically decrements the reference count of /@entry@/ by one.
If the reference count drops to 0, /@entry@/ is freed.
-}
indexEntryUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntry
{- ^ /@entry@/: a 'GI.Ggit.Structs.IndexEntry.IndexEntry'. -}
-> m ()
indexEntryUnref entry = liftIO $ do
entry' <- unsafeManagedPtrGetPtr entry
ggit_index_entry_unref entry'
touchManagedPtr entry
return ()
#if ENABLE_OVERLOADING
data IndexEntryUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo IndexEntryUnrefMethodInfo IndexEntry signature where
overloadedMethod _ = indexEntryUnref
#endif
#if ENABLE_OVERLOADING
type family ResolveIndexEntryMethod (t :: Symbol) (o :: *) :: * where
ResolveIndexEntryMethod "isConflict" o = IndexEntryIsConflictMethodInfo
ResolveIndexEntryMethod "ref" o = IndexEntryRefMethodInfo
ResolveIndexEntryMethod "stat" o = IndexEntryStatMethodInfo
ResolveIndexEntryMethod "unref" o = IndexEntryUnrefMethodInfo
ResolveIndexEntryMethod "getDev" o = IndexEntryGetDevMethodInfo
ResolveIndexEntryMethod "getFileSize" o = IndexEntryGetFileSizeMethodInfo
ResolveIndexEntryMethod "getFlags" o = IndexEntryGetFlagsMethodInfo
ResolveIndexEntryMethod "getFlagsExtended" o = IndexEntryGetFlagsExtendedMethodInfo
ResolveIndexEntryMethod "getGid" o = IndexEntryGetGidMethodInfo
ResolveIndexEntryMethod "getId" o = IndexEntryGetIdMethodInfo
ResolveIndexEntryMethod "getIno" o = IndexEntryGetInoMethodInfo
ResolveIndexEntryMethod "getMode" o = IndexEntryGetModeMethodInfo
ResolveIndexEntryMethod "getPath" o = IndexEntryGetPathMethodInfo
ResolveIndexEntryMethod "getUid" o = IndexEntryGetUidMethodInfo
ResolveIndexEntryMethod "setCommit" o = IndexEntrySetCommitMethodInfo
ResolveIndexEntryMethod "setDev" o = IndexEntrySetDevMethodInfo
ResolveIndexEntryMethod "setFileSize" o = IndexEntrySetFileSizeMethodInfo
ResolveIndexEntryMethod "setFlags" o = IndexEntrySetFlagsMethodInfo
ResolveIndexEntryMethod "setFlagsExtended" o = IndexEntrySetFlagsExtendedMethodInfo
ResolveIndexEntryMethod "setGid" o = IndexEntrySetGidMethodInfo
ResolveIndexEntryMethod "setId" o = IndexEntrySetIdMethodInfo
ResolveIndexEntryMethod "setIno" o = IndexEntrySetInoMethodInfo
ResolveIndexEntryMethod "setMode" o = IndexEntrySetModeMethodInfo
ResolveIndexEntryMethod "setPath" o = IndexEntrySetPathMethodInfo
ResolveIndexEntryMethod "setUid" o = IndexEntrySetUidMethodInfo
ResolveIndexEntryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveIndexEntryMethod t IndexEntry, O.MethodInfo info IndexEntry p) => OL.IsLabel t (IndexEntry -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif