gi-ostree-1.0.11: OSTree bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.OSTree.Structs.CollectionRef

Contents

Description

A structure which globally uniquely identifies a ref as the tuple (collectionId, refName). For backwards compatibility, collectionId may be Nothing, indicating a ref name which is not globally unique.

Since: 2018.6

Synopsis

Exported types

newtype CollectionRef Source #

Memory-managed wrapper type.

newZeroCollectionRef :: MonadIO m => m CollectionRef Source #

Construct a CollectionRef struct initialized to zero.

Methods

dup

collectionRefDup Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CollectionRef

ref: an CollectionRef

-> m CollectionRef

Returns: a newly allocated copy of ref

Create a copy of the given ref.

Since: 2018.6

dupv

collectionRefDupv Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [CollectionRef]

refs: Nothing-terminated array of OstreeCollectionRefs

-> m [CollectionRef]

Returns: a newly allocated copy of refs

Copy an array of OstreeCollectionRefs, including deep copies of all its elements. refs must be Nothing-terminated; it may be empty, but must not be Nothing.

Since: 2018.6

equal

collectionRefEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ptr ()

ref1: an CollectionRef

-> Ptr ()

ref2: another CollectionRef

-> m Bool

Returns: True if ref1 and ref2 are equal, False otherwise

Compare ref1 and ref2 and return True if they have the same collection ID and ref name, and False otherwise. Both ref1 and ref2 must be non-Nothing.

Since: 2018.6

free

collectionRefFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> CollectionRef

ref: an CollectionRef

-> m () 

Free the given ref.

Since: 2018.6

freev

collectionRefFreev Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [CollectionRef]

refs: an array of OstreeCollectionRefs

-> m () 

Free the given array of refs, including freeing all its elements. refs must be Nothing-terminated; it may be empty, but must not be Nothing.

Since: 2018.6

hash

collectionRefHash Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ptr ()

ref: an CollectionRef

-> m Word32

Returns: hash value for ref

Hash the given ref. This function is suitable for use with HashTable. ref must be non-Nothing.

Since: 2018.6

new

collectionRefNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

collectionId: a collection ID, or Nothing for a plain ref

-> Text

refName: a ref name

-> m CollectionRef

Returns: a new CollectionRef

Create a new CollectionRef containing (collectionId, refName). If collectionId is Nothing, this is equivalent to a plain ref name string (not a refspec; no remote name is included), which can be used for non-P2P operations.

Since: 2018.6

Properties

collectionId

collection ID which provided the ref, or Nothing if there is no associated collection

clearCollectionRefCollectionId :: MonadIO m => CollectionRef -> m () Source #

Set the value of the “collection_id” field to Nothing. When overloading is enabled, this is equivalent to

clear #collectionId

getCollectionRefCollectionId :: MonadIO m => CollectionRef -> m (Maybe Text) Source #

Get the value of the “collection_id” field. When overloading is enabled, this is equivalent to

get collectionRef #collectionId

setCollectionRefCollectionId :: MonadIO m => CollectionRef -> CString -> m () Source #

Set the value of the “collection_id” field. When overloading is enabled, this is equivalent to

set collectionRef [ #collectionId := value ]

refName

ref name

clearCollectionRefRefName :: MonadIO m => CollectionRef -> m () Source #

Set the value of the “ref_name” field to Nothing. When overloading is enabled, this is equivalent to

clear #refName

getCollectionRefRefName :: MonadIO m => CollectionRef -> m (Maybe Text) Source #

Get the value of the “ref_name” field. When overloading is enabled, this is equivalent to

get collectionRef #refName

setCollectionRefRefName :: MonadIO m => CollectionRef -> CString -> m () Source #

Set the value of the “ref_name” field. When overloading is enabled, this is equivalent to

set collectionRef [ #refName := value ]