gi-ostree-1.0.15: OSTree bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.OSTree.Structs.RepoFinderResult

Description

RepoFinderResult gives a single result from an repoFinderResolveAsync or repoFinderResolveAllAsync operation. This represents a single remote which provides none, some or all of the refs being resolved. The structure includes various bits of metadata which allow repoPullFromRemotesAsync (for example) to prioritise how to pull the refs.

An RepoFinderResult is immutable after construction.

The priority is used as one input of many to ordering functions like repoFinderResultCompare.

refToChecksum indicates which refs (out of the ones queried for as inputs to repoFinderResolveAsync) are provided by this remote. The refs are present as keys (of type CollectionRef), and the corresponding values are the checksums of the commits the remote currently has for those refs. (These might not be the latest commits available out of all results.) A checksum may be Nothing if the remote does not advertise the corresponding ref. After repoFinderResolveAsync has been called, the commit metadata should be available locally, so the details for each checksum can be looked up using repoLoadCommit.

refToTimestamp provides timestamps for the set of refs in refToChecksum. The refs are keys (of type CollectionRef) and the values are guint64 pointers with the timestamp associated with the checksum provided in refToChecksum. refToTimestamp can be Nothing, and when it's not, the timestamps are zero when any of the following conditions are met: (1) the override-commit-ids option was used on ostree_repo_find_remotes_async (2) there was an error in trying to get the commit metadata (3) the checksum for this ref is Nothing in refToChecksum.

Since: 2018.6

Synopsis

Exported types

newtype RepoFinderResult Source #

Memory-managed wrapper type.

newZeroRepoFinderResult :: MonadIO m => m RepoFinderResult Source #

Construct a RepoFinderResult struct initialized to zero.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

compare, dup, free.

Getters

None.

Setters

None.

compare

repoFinderResultCompare Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> RepoFinderResult

a: an RepoFinderResult

-> RepoFinderResult

b: an RepoFinderResult

-> m Int32

Returns: <0 if a is ordered before b, 0 if they are ordered equally, >0 if b is ordered before a

Compare two RepoFinderResult instances to work out which one is better to pull from, and hence needs to be ordered before the other.

Since: 2018.6

dup

repoFinderResultDup Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> RepoFinderResult

result: an RepoFinderResult to copy

-> m RepoFinderResult

Returns: a newly allocated copy of result

Copy an RepoFinderResult.

Since: 2018.6

free

repoFinderResultFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> RepoFinderResult

result: an RepoFinderResult

-> m () 

Free the given result.

Since: 2018.6

freev

repoFinderResultFreev Source #

Arguments

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

results: an RepoFinderResult

-> m () 

Free the given results array, freeing each element and the container.

Since: 2018.6

Properties

finder

the RepoFinder instance which produced this result

clearRepoFinderResultFinder :: MonadIO m => RepoFinderResult -> m () Source #

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

clear #finder

getRepoFinderResultFinder :: MonadIO m => RepoFinderResult -> m (Maybe RepoFinder) Source #

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

get repoFinderResult #finder

setRepoFinderResultFinder :: MonadIO m => RepoFinderResult -> Ptr RepoFinder -> m () Source #

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

set repoFinderResult [ #finder := value ]

priority

static priority of the result, where higher numbers indicate lower priority

getRepoFinderResultPriority :: MonadIO m => RepoFinderResult -> m Int32 Source #

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

get repoFinderResult #priority

setRepoFinderResultPriority :: MonadIO m => RepoFinderResult -> Int32 -> m () Source #

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

set repoFinderResult [ #priority := value ]

remote

Remote which contains the transport details for the result, such as its URI and GPG key

clearRepoFinderResultRemote :: MonadIO m => RepoFinderResult -> m () Source #

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

clear #remote

getRepoFinderResultRemote :: MonadIO m => RepoFinderResult -> m (Maybe Remote) Source #

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

get repoFinderResult #remote

setRepoFinderResultRemote :: MonadIO m => RepoFinderResult -> Ptr Remote -> m () Source #

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

set repoFinderResult [ #remote := value ]

summaryLastModified

Unix timestamp (seconds since the epoch, UTC) when the summary file on the remote was last modified, or 0 if unknown

getRepoFinderResultSummaryLastModified :: MonadIO m => RepoFinderResult -> m Word64 Source #

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

get repoFinderResult #summaryLastModified

setRepoFinderResultSummaryLastModified :: MonadIO m => RepoFinderResult -> Word64 -> m () Source #

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

set repoFinderResult [ #summaryLastModified := value ]