| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.OSTree.Structs.CollectionRef
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
- newtype CollectionRef = CollectionRef (ManagedPtr CollectionRef)
- newZeroCollectionRef :: MonadIO m => m CollectionRef
- collectionRefDup :: (HasCallStack, MonadIO m) => CollectionRef -> m CollectionRef
- collectionRefDupv :: (HasCallStack, MonadIO m) => [CollectionRef] -> m [CollectionRef]
- collectionRefEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool
- collectionRefFree :: (HasCallStack, MonadIO m) => CollectionRef -> m ()
- collectionRefFreev :: (HasCallStack, MonadIO m) => [CollectionRef] -> m ()
- collectionRefHash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32
- collectionRefNew :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> m (Maybe CollectionRef)
- clearCollectionRefCollectionId :: MonadIO m => CollectionRef -> m ()
- getCollectionRefCollectionId :: MonadIO m => CollectionRef -> m (Maybe Text)
- setCollectionRefCollectionId :: MonadIO m => CollectionRef -> CString -> m ()
- clearCollectionRefRefName :: MonadIO m => CollectionRef -> m ()
- getCollectionRefRefName :: MonadIO m => CollectionRef -> m (Maybe Text)
- setCollectionRefRefName :: MonadIO m => CollectionRef -> CString -> m ()
Exported types
newtype CollectionRef Source #
Memory-managed wrapper type.
Constructors
| CollectionRef (ManagedPtr CollectionRef) |
Instances
| Eq CollectionRef Source # | |
Defined in GI.OSTree.Structs.CollectionRef | |
| GBoxed CollectionRef Source # | |
Defined in GI.OSTree.Structs.CollectionRef | |
| ManagedPtrNewtype CollectionRef Source # | |
Defined in GI.OSTree.Structs.CollectionRef Methods toManagedPtr :: CollectionRef -> ManagedPtr CollectionRef | |
| TypedObject CollectionRef Source # | |
Defined in GI.OSTree.Structs.CollectionRef Methods glibType :: IO GType | |
| IsGValue CollectionRef Source # | Convert |
Defined in GI.OSTree.Structs.CollectionRef | |
| HasParentTypes CollectionRef Source # | |
Defined in GI.OSTree.Structs.CollectionRef | |
| tag ~ 'AttrSet => Constructible CollectionRef tag Source # | |
Defined in GI.OSTree.Structs.CollectionRef Methods new :: MonadIO m => (ManagedPtr CollectionRef -> CollectionRef) -> [AttrOp CollectionRef tag] -> m CollectionRef | |
| type ParentTypes CollectionRef Source # | |
Defined in GI.OSTree.Structs.CollectionRef type ParentTypes CollectionRef = '[] :: [Type] | |
newZeroCollectionRef :: MonadIO m => m CollectionRef Source #
Construct a CollectionRef struct initialized to zero.
Methods
Overloaded methods
dup
Arguments
| :: (HasCallStack, MonadIO m) | |
| => CollectionRef |
|
| -> m CollectionRef | Returns: a newly allocated copy of |
Create a copy of the given ref.
Since: 2018.6
dupv
Arguments
| :: (HasCallStack, MonadIO m) | |
| => [CollectionRef] |
|
| -> m [CollectionRef] | Returns: a newly allocated copy of |
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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ptr () |
|
| -> Ptr () |
|
| -> m Bool | Returns: |
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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => CollectionRef |
|
| -> m () |
Free the given ref.
Since: 2018.6
freev
Arguments
| :: (HasCallStack, MonadIO m) | |
| => [CollectionRef] |
|
| -> 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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ptr () |
|
| -> m Word32 | Returns: hash value for |
Hash the given ref. This function is suitable for use with HashTable.
ref must be non-Nothing.
Since: 2018.6
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Maybe Text |
|
| -> Text |
|
| -> m (Maybe CollectionRef) | Returns: a new |
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
setcollectionRef [ #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
setcollectionRef [ #refName:=value ]