Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
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.
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
- newtype RepoFinderResult = RepoFinderResult (ManagedPtr RepoFinderResult)
- newZeroRepoFinderResult :: MonadIO m => m RepoFinderResult
- noRepoFinderResult :: Maybe RepoFinderResult
- repoFinderResultCompare :: (HasCallStack, MonadIO m) => RepoFinderResult -> RepoFinderResult -> m Int32
- repoFinderResultDup :: (HasCallStack, MonadIO m) => RepoFinderResult -> m RepoFinderResult
- repoFinderResultFree :: (HasCallStack, MonadIO m) => RepoFinderResult -> m ()
- repoFinderResultFreev :: (HasCallStack, MonadIO m) => [RepoFinderResult] -> m ()
- clearRepoFinderResultFinder :: MonadIO m => RepoFinderResult -> m ()
- getRepoFinderResultFinder :: MonadIO m => RepoFinderResult -> m (Maybe RepoFinder)
- setRepoFinderResultFinder :: MonadIO m => RepoFinderResult -> Ptr RepoFinder -> m ()
- getRepoFinderResultPriority :: MonadIO m => RepoFinderResult -> m Int32
- setRepoFinderResultPriority :: MonadIO m => RepoFinderResult -> Int32 -> m ()
- clearRepoFinderResultRemote :: MonadIO m => RepoFinderResult -> m ()
- getRepoFinderResultRemote :: MonadIO m => RepoFinderResult -> m (Maybe Remote)
- setRepoFinderResultRemote :: MonadIO m => RepoFinderResult -> Ptr Remote -> m ()
- getRepoFinderResultSummaryLastModified :: MonadIO m => RepoFinderResult -> m Word64
- setRepoFinderResultSummaryLastModified :: MonadIO m => RepoFinderResult -> Word64 -> m ()
Exported types
newtype RepoFinderResult Source #
Memory-managed wrapper type.
RepoFinderResult (ManagedPtr RepoFinderResult) |
Instances
BoxedObject RepoFinderResult Source # | |
Defined in GI.OSTree.Structs.RepoFinderResult boxedType :: RepoFinderResult -> IO GType | |
tag ~ AttrSet => Constructible RepoFinderResult tag Source # | |
Defined in GI.OSTree.Structs.RepoFinderResult new :: MonadIO m => (ManagedPtr RepoFinderResult -> RepoFinderResult) -> [AttrOp RepoFinderResult tag] -> m RepoFinderResult |
newZeroRepoFinderResult :: MonadIO m => m RepoFinderResult Source #
Construct a RepoFinderResult
struct initialized to zero.
noRepoFinderResult :: Maybe RepoFinderResult Source #
A convenience alias for Nothing
:: Maybe
RepoFinderResult
.
Methods
compare
repoFinderResultCompare Source #
:: (HasCallStack, MonadIO m) | |
=> RepoFinderResult |
|
-> RepoFinderResult |
|
-> m Int32 | Returns: <0 if |
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
:: (HasCallStack, MonadIO m) | |
=> RepoFinderResult |
|
-> m RepoFinderResult | Returns: a newly allocated copy of |
Copy an RepoFinderResult
.
Since: 2018.6
free
:: (HasCallStack, MonadIO m) | |
=> RepoFinderResult |
|
-> m () |
Free the given result
.
Since: 2018.6
freev
repoFinderResultFreev Source #
:: (HasCallStack, MonadIO m) | |
=> [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 ]