Update OSTree gir and regenerate

This commit is contained in:
Felix Krull 2019-05-18 00:08:12 +02:00 committed by Colin Walters
parent 91df5067a5
commit 3fa9378a5e
16 changed files with 475 additions and 83 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "ostree"
version = "0.2.0"
version = "0.3.0"
authors = ["Felix Krull"]
license = "MIT"
@ -36,7 +36,7 @@ gio = "0.5"
glib-sys = "0.7"
gobject-sys = "0.7"
gio-sys = "0.7"
ostree-sys = { version = "0.2", path = "sys" }
ostree-sys = { version = "0.3", path = "sys" }
[dev-dependencies]
tempfile = "3"

View File

@ -550,8 +550,8 @@ Any watchers of the #OstreeAsyncProgress will be notified of the change if
</parameters>
</callback>
</field>
<field name="write_config">
<callback name="write_config" throws="1">
<field name="write_config" introspectable="0">
<callback name="write_config" introspectable="0" throws="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
@ -562,6 +562,11 @@ Any watchers of the #OstreeAsyncProgress will be notified of the change if
<parameter name="bootversion" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="new_deployments" transfer-ownership="none">
<array name="GLib.PtrArray" c:type="GPtrArray*">
<type name="gpointer" c:type="gpointer"/>
</array>
</parameter>
<parameter name="cancellable" transfer-ownership="none">
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
@ -1120,7 +1125,8 @@ that should have been under an explicit group.</doc>
</parameters>
</function>
<function name="unlocked_state_to_string"
c:identifier="ostree_deployment_unlocked_state_to_string">
c:identifier="ostree_deployment_unlocked_state_to_string"
version="2016.4">
<return-value transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</return-value>
@ -1264,7 +1270,8 @@ or concatenate it with the full ostree_sysroot_get_path().</doc>
</parameters>
</method>
<method name="get_unlocked"
c:identifier="ostree_deployment_get_unlocked">
c:identifier="ostree_deployment_get_unlocked"
version="2016.4">
<return-value transfer-ownership="none">
<type name="DeploymentUnlockedState"
c:type="OstreeDeploymentUnlockedState"/>
@ -1790,6 +1797,7 @@ If no match is found, the function returns %FALSE and leaves
</method>
<method name="require_valid_signature"
c:identifier="ostree_gpg_verify_result_require_valid_signature"
version="2016.6"
throws="1">
<doc xml:space="preserve">Checks if the result contains at least one signature from the
trusted keyring. You can call this function immediately after
@ -1885,18 +1893,39 @@ signature from trusted keyring, otherwise %FALSE</doc>
<constant name="MAX_METADATA_SIZE"
value="10485760"
c:type="OSTREE_MAX_METADATA_SIZE">
<doc xml:space="preserve">Maximum permitted size in bytes of metadata objects. This is an
arbitrary number, but really, no one should be putting humongous
data in metadata.</doc>
<doc xml:space="preserve">Default limit for maximum permitted size in bytes of metadata objects fetched
over HTTP (including repo/config files, refs, and commit/dirtree/dirmeta
objects). This is an arbitrary number intended to mitigate disk space
exhaustion attacks.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="MAX_METADATA_WARN_SIZE"
value="7340032"
c:type="OSTREE_MAX_METADATA_WARN_SIZE">
<doc xml:space="preserve">Objects committed above this size will be allowed, but a warning
will be emitted.</doc>
<doc xml:space="preserve">This variable is no longer meaningful, it is kept only for compatibility.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="META_KEY_DEPLOY_COLLECTION_ID"
value="ostree.deploy-collection-id"
c:type="OSTREE_META_KEY_DEPLOY_COLLECTION_ID"
version="2018.9">
<doc xml:space="preserve">GVariant type `s`. This key can be used in the repo metadata which is stored
in OSTREE_REPO_METADATA_REF as well as in the summary. The semantics of this
are that the remote repository wants clients to update their remote config
to add this collection ID (clients can't do P2P operations involving a
remote without a collection ID configured on it, even if one is configured
on the server side). Clients must never change or remove a collection ID
already set in their remote config.
Currently, OSTree does not implement changing a remote config based on this
key, but it may do so in a later release, and until then clients such as
Flatpak may implement it.
This is a replacement for the similar metadata key implemented by flatpak,
`xa.collection-id`, which is now deprecated as clients which supported it had
bugs with their P2P implementations.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<class name="MutableTree"
c:symbol-prefix="mutable_tree"
c:type="OstreeMutableTree"
@ -1912,7 +1941,8 @@ will be emitted.</doc>
</return-value>
</constructor>
<constructor name="new_from_checksum"
c:identifier="ostree_mutable_tree_new_from_checksum">
c:identifier="ostree_mutable_tree_new_from_checksum"
version="2018.7">
<doc xml:space="preserve">Creates a new OstreeMutableTree with the contents taken from the given repo
and checksums. The data will be loaded from the repo lazily as needed.</doc>
<return-value transfer-ownership="full">
@ -2012,7 +2042,8 @@ exist.</doc>
</parameters>
</method>
<method name="fill_empty_from_dirtree"
c:identifier="ostree_mutable_tree_fill_empty_from_dirtree">
c:identifier="ostree_mutable_tree_fill_empty_from_dirtree"
version="2018.7">
<doc xml:space="preserve">Merges @self with the tree given by @contents_checksum and
@metadata_checksum, but only if it's possible without writing new objects to
the @repo. We can do this if either @self is empty, the tree given by
@ -2113,6 +2144,29 @@ the contents will be loaded only when needed.</doc>
</parameter>
</parameters>
</method>
<method name="remove"
c:identifier="ostree_mutable_tree_remove"
version="2018.9"
throws="1">
<doc xml:space="preserve">Remove the file or subdirectory named @name from the mutable tree @self.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">Tree</doc>
<type name="MutableTree" c:type="OstreeMutableTree*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">Name of file or subdirectory to remove</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="allow_noent" transfer-ownership="none">
<doc xml:space="preserve">If @FALSE, an error will be thrown if @name does not exist in the tree</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="replace_file"
c:identifier="ostree_mutable_tree_replace_file"
throws="1">
@ -2250,7 +2304,7 @@ content, the other types are metadata.</doc>
</member>
</enumeration>
<constant name="RELEASE_VERSION"
value="8"
value="3"
c:type="OSTREE_RELEASE_VERSION"
version="2017.4">
<doc xml:space="preserve">ostree release version component (e.g. 2 if %OSTREE_VERSION is 2017.2)</doc>
@ -2395,6 +2449,7 @@ instead of assuming "/".</doc>
</constructor>
<function name="create_at"
c:identifier="ostree_repo_create_at"
version="2017.10"
throws="1">
<doc xml:space="preserve">This is a file-descriptor relative version of ostree_repo_create().
Create the underlying structure on disk for the repository, and call
@ -2453,7 +2508,10 @@ The @options dict may contain:
</parameter>
</parameters>
</function>
<function name="open_at" c:identifier="ostree_repo_open_at" throws="1">
<function name="open_at"
c:identifier="ostree_repo_open_at"
version="2017.10"
throws="1">
<doc xml:space="preserve">This combines ostree_repo_new() (but using fd-relative access) with
ostree_repo_open(). Use this when you know you should be operating on an
already extant repository. If you want to create one, use ostree_repo_create_at().</doc>
@ -2648,6 +2706,7 @@ transaction will do nothing and return successfully.</doc>
</method>
<method name="checkout_at"
c:identifier="ostree_repo_checkout_at"
version="2016.8"
throws="1">
<doc xml:space="preserve">Similar to ostree_repo_checkout_tree(), but uses directory-relative
paths for the destination, uses a new `OstreeRepoCheckoutAtOptions`,
@ -3026,7 +3085,7 @@ The following @options are currently defined:
provided.
* `n-network-retries` (`u`): Number of times to retry each download on
receiving a transient network error, such as a socket timeout; default is
5, 0 means return errors without retrying.
5, 0 means return errors without retrying. Since: 2018.6
@finders must be a non-empty %NULL-terminated array of the #OstreeRepoFinder
instances to use, or %NULL to use the system default set of finders, which
@ -3154,6 +3213,22 @@ traverse metadata objects for example.</doc>
</parameter>
</parameters>
</method>
<method name="get_bootloader"
c:identifier="ostree_repo_get_bootloader"
version="2019.2">
<doc xml:space="preserve">Get the bootloader configured. See the documentation for the
"sysroot.bootloader" config key.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">bootloader configuration for the sysroot</doc>
<type name="utf8" c:type="const gchar*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">an #OstreeRepo</doc>
<type name="Repo" c:type="OstreeRepo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_collection_id"
c:identifier="ostree_repo_get_collection_id"
version="2018.6">
@ -3180,7 +3255,28 @@ traverse metadata objects for example.</doc>
</instance-parameter>
</parameters>
</method>
<method name="get_dfd" c:identifier="ostree_repo_get_dfd">
<method name="get_default_repo_finders"
c:identifier="ostree_repo_get_default_repo_finders"
version="2018.9">
<doc xml:space="preserve">Get the set of default repo finders configured. See the documentation for
the "core.default-repo-finders" config key.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">
%NULL-terminated array of strings.</doc>
<array c:type="gchar**">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">an #OstreeRepo</doc>
<type name="Repo" c:type="OstreeRepo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_dfd"
c:identifier="ostree_repo_get_dfd"
version="2016.4">
<doc xml:space="preserve">In some cases it's useful for applications to access the repository
directly; for example, writing content into `repo/tmp` ensures it's
on the same filesystem. Another case is detecting the mtime on the
@ -3210,6 +3306,29 @@ repository (to see whether a ref was written).</doc>
</instance-parameter>
</parameters>
</method>
<method name="get_min_free_space_bytes"
c:identifier="ostree_repo_get_min_free_space_bytes"
version="2018.9"
throws="1">
<doc xml:space="preserve">It can be used to query the value (in bytes) of min-free-space-* config option.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, %FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">Repo</doc>
<type name="Repo" c:type="OstreeRepo*"/>
</instance-parameter>
<parameter name="out_reserved_bytes"
direction="out"
caller-allocates="0"
transfer-ownership="full">
<doc xml:space="preserve">Location to store the result</doc>
<type name="guint64" c:type="guint64*"/>
</parameter>
</parameters>
</method>
<method name="get_mode" c:identifier="ostree_repo_get_mode">
<return-value transfer-ownership="none">
<type name="RepoMode" c:type="OstreeRepoMode"/>
@ -3251,6 +3370,7 @@ that API. In general, you should avoid use of this API.</doc>
</method>
<method name="get_remote_boolean_option"
c:identifier="ostree_repo_get_remote_boolean_option"
version="2016.5"
throws="1">
<doc xml:space="preserve">OSTree remotes are represented by keyfile groups, formatted like:
`[remote "remotename"]`. This function returns a value named @option_name
@ -3289,6 +3409,7 @@ error is returned, @out_value will be set to %FALSE.</doc>
</method>
<method name="get_remote_list_option"
c:identifier="ostree_repo_get_remote_list_option"
version="2016.5"
throws="1">
<doc xml:space="preserve">OSTree remotes are represented by keyfile groups, formatted like:
`[remote "remotename"]`. This function returns a value named @option_name
@ -3327,6 +3448,7 @@ to %NULL.</doc>
</method>
<method name="get_remote_option"
c:identifier="ostree_repo_get_remote_option"
version="2016.5"
throws="1">
<doc xml:space="preserve">OSTree remotes are represented by keyfile groups, formatted like:
`[remote "remotename"]`. This function returns a value named @option_name
@ -3367,6 +3489,7 @@ option name. If an error is returned, @out_value will be set to %NULL.</doc>
</method>
<method name="gpg_verify_data"
c:identifier="ostree_repo_gpg_verify_data"
version="2016.6"
throws="1">
<doc xml:space="preserve">Verify @signatures for @data using GPG keys in the keyring for
@remote_name, and return an #OstreeGpgVerifyResult.
@ -3563,11 +3686,12 @@ Otherwise, a copy will be performed.</doc>
</method>
<method name="import_object_from_with_trust"
c:identifier="ostree_repo_import_object_from_with_trust"
version="2016.5"
throws="1">
<doc xml:space="preserve">Copy object named by @objtype and @checksum into @self from the
source repository @source. If both repositories are of the same
type and on the same filesystem, this will simply be a fast Unix
hard link operation.
source repository @source. If @trusted is %TRUE and both
repositories are of the same type and on the same filesystem,
this will simply be a fast Unix hard link operation.
Otherwise, a copy will be performed.</doc>
<return-value transfer-ownership="none">
@ -3646,7 +3770,9 @@ collection ID is configured for the repository
(ostree_repo_get_collection_id()).
If you want to exclude refs from `refs/remotes`, use
%OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES in @flags.</doc>
%OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES in @flags. Similarly use
%OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS to exclude refs from
`refs/mirrors`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
@ -3812,6 +3938,7 @@ removed as a prefix from the hash table keys.</doc>
</method>
<method name="list_refs_ext"
c:identifier="ostree_repo_list_refs_ext"
version="2016.4"
throws="1">
<doc xml:space="preserve">If @refspec_prefix is %NULL, list all local and remote refspecs,
with their current values in @out_all_refs. Otherwise, only list
@ -4245,6 +4372,7 @@ Locking: exclusive</doc>
</method>
<method name="prune_from_reachable"
c:identifier="ostree_repo_prune_from_reachable"
version="2017.1"
throws="1">
<doc xml:space="preserve">Delete content from the repository. This function is the "backend"
half of the higher level ostree_repo_prune(). To use this function,
@ -4425,7 +4553,18 @@ The following @options are currently defined:
* `subdirs` (`as`): Pull just these subdirectories
* `update-frequency` (`u`): Frequency to call the async progress callback in
milliseconds, if any; only values higher than 0 are valid
* `append-user-agent` (`s`): Additional string to append to the user agent</doc>
* `append-user-agent` (`s`): Additional string to append to the user agent
* `n-network-retries` (`u`): Number of times to retry each download on receiving
a transient network error, such as a socket timeout; default is 5, 0
means return errors without retrying. Since: 2018.6
* `ref-keyring-map` (`a(sss)`): Array of (collection ID, ref name, keyring
remote name) tuples specifying which remote's keyring should be used when
doing GPG verification of each collection-ref. This is useful to prevent a
remote from serving malicious updates to refs which did not originate from
it. This can be a subset or superset of the refs being pulled; any ref
not being pulled will be ignored and any ref without a keyring remote
will be verified with the keyring of the remote being pulled from.
Since: 2019.2</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
@ -4573,6 +4712,7 @@ The following are currently defined:
* require-static-deltas (b): Require static deltas
* override-commit-ids (as): Array of specific commit IDs to fetch for refs
* timestamp-check (b): Verify commit timestamps are newer than current (when pulling via ref); Since: 2017.11
* metadata-size-restriction (t): Restrict metadata objects to a maximum number of bytes; 0 to disable. Since: 2018.9
* dry-run (b): Only print information on what will be downloaded (requires static deltas)
* override-url (s): Fetch objects from this URL if remote specifies no metalink in options
* inherit-transaction (b): Don't initiate, finish or abort a transaction, useful to do multiple pulls in one transaction.
@ -4582,7 +4722,15 @@ The following are currently defined:
* append-user-agent (s): Additional string to append to the user agent
* n-network-retries (u): Number of times to retry each download on receiving
a transient network error, such as a socket timeout; default is 5, 0
means return errors without retrying</doc>
means return errors without retrying. Since: 2018.6
* ref-keyring-map (a(sss)): Array of (collection ID, ref name, keyring
remote name) tuples specifying which remote's keyring should be used when
doing GPG verification of each collection-ref. This is useful to prevent a
remote from serving malicious updates to refs which did not originate from
it. This can be a subset or superset of the refs being pulled; any ref
not being pulled will be ignored and any ref without a keyring remote
will be verified with the keyring of the remote being pulled from.
Since: 2019.2</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
@ -4772,6 +4920,7 @@ Locking: exclusive</doc>
</method>
<method name="reload_config"
c:identifier="ostree_repo_reload_config"
version="2017.2"
throws="1">
<doc xml:space="preserve">By default, an #OstreeRepo will cache the remote configuration and its
own repo/config data. This API can be used to reload it.</doc>
@ -4969,6 +5118,7 @@ with #OSTREE_SUMMARY_GVARIANT_FORMAT as the format string.</doc>
</method>
<method name="remote_fetch_summary_with_options"
c:identifier="ostree_repo_remote_fetch_summary_with_options"
version="2016.6"
throws="1">
<doc xml:space="preserve">Like ostree_repo_remote_fetch_summary(), but supports an extensible set of flags.
The following are currently defined:
@ -5288,7 +5438,9 @@ returned and @out_rev will be set to %NULL. If @allow_noent is %FALSE and
the given @ref cannot be found, a %G_IO_ERROR_NOT_FOUND error will be
returned.
There are currently no @flags which affect the behaviour of this function.</doc>
If you want to check only local refs, not remote or mirrored ones, use the
flag %OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY. This is analogous to using
ostree_repo_resolve_rev_ext() but for collection-refs.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, %FALSE on failure</doc>
<type name="gboolean" c:type="gboolean"/>
@ -5402,11 +5554,15 @@ find the given refspec in local.</doc>
</method>
<method name="resolve_rev_ext"
c:identifier="ostree_repo_resolve_rev_ext"
version="2016.7"
throws="1">
<doc xml:space="preserve">Look up the given refspec, returning the checksum it references in
the parameter @out_rev. Differently from ostree_repo_resolve_rev(),
this will not fall back to searching through remote repos if a
local ref is specified but not found.</doc>
local ref is specified but not found.
The flag %OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY is implied so
using it has no effect.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
@ -5476,6 +5632,7 @@ Multithreading: This function is *not* MT safe.</doc>
</method>
<method name="set_alias_ref_immediate"
c:identifier="ostree_repo_set_alias_ref_immediate"
version="2017.10"
throws="1">
<doc xml:space="preserve">Like ostree_repo_set_ref_immediate(), but creates an alias.</doc>
<return-value transfer-ownership="none">
@ -5515,6 +5672,7 @@ Multithreading: This function is *not* MT safe.</doc>
</method>
<method name="set_cache_dir"
c:identifier="ostree_repo_set_cache_dir"
version="2016.5"
throws="1">
<doc xml:space="preserve">Set a custom location for the cache directory used for e.g.
per-remote summary caches. Setting this manually is useful when
@ -6201,6 +6359,7 @@ checksum @commit_checksum.</doc>
</method>
<method name="verify_commit_for_remote"
c:identifier="ostree_repo_verify_commit_for_remote"
version="2016.14"
throws="1">
<doc xml:space="preserve">Read GPG signature(s) on the commit named by the ASCII checksum
@commit_checksum and return detailed results, based on the keyring
@ -7056,8 +7215,11 @@ ostree_repo_checkout_tree() and ostree_repo_checkout_tree_at().</doc>
<field name="bareuseronly_dirs" writable="1">
<type name="gboolean" c:type="gboolean"/>
</field>
<field name="force_copy_zerosized" writable="1">
<type name="gboolean" c:type="gboolean"/>
</field>
<field name="unused_bools" writable="1">
<array zero-terminated="0" c:type="gboolean" fixed-size="5">
<array zero-terminated="0" c:type="gboolean" fixed-size="4">
<type name="gboolean" c:type="gboolean"/>
</array>
</field>
@ -7090,7 +7252,8 @@ ostree_repo_checkout_tree() and ostree_repo_checkout_tree_at().</doc>
<type name="utf8" c:type="const char*"/>
</field>
<method name="set_devino"
c:identifier="ostree_repo_checkout_at_options_set_devino">
c:identifier="ostree_repo_checkout_at_options_set_devino"
version="2017.13">
<doc xml:space="preserve">This function simply assigns @cache to the `devino_to_csum_cache` member of
@opts; it's only useful for introspection.
@ -8863,6 +9026,11 @@ Note that enabling pathname translation will always override the setting for
c:identifier="OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES">
<doc xml:space="preserve">Exclude remote refs. Since: 2017.11</doc>
</member>
<member name="exclude_mirrors"
value="4"
c:identifier="OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS">
<doc xml:space="preserve">Exclude mirrored refs. Since: 2019.2</doc>
</member>
</bitfield>
<enumeration name="RepoMode" c:type="OstreeRepoMode">
<doc xml:space="preserve">See the documentation of #OstreeRepo for more information about the
@ -8984,15 +9152,25 @@ possible modes.</doc>
c:identifier="OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS">
<doc xml:space="preserve">Delete a remote, do nothing if the remote does not exist</doc>
</member>
<member name="replace"
value="4"
c:identifier="OSTREE_REPO_REMOTE_CHANGE_REPLACE">
<doc xml:space="preserve">Add or replace a remote (Since: 2019.2)</doc>
</member>
</enumeration>
<enumeration name="RepoResolveRevExtFlags"
c:type="OstreeRepoResolveRevExtFlags">
<member name="repo_resolve_rev_ext_none"
<bitfield name="RepoResolveRevExtFlags"
c:type="OstreeRepoResolveRevExtFlags">
<member name="none"
value="0"
c:identifier="OSTREE_REPO_RESOLVE_REV_EXT_NONE">
<doc xml:space="preserve">No flags.</doc>
</member>
</enumeration>
<member name="local_only"
value="1"
c:identifier="OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY">
<doc xml:space="preserve">Exclude remote and mirrored refs. Since: 2019.2</doc>
</member>
</bitfield>
<record name="RepoTransactionStats"
c:type="OstreeRepoTransactionStats"
glib:type-name="OstreeRepoTransactionStats"
@ -9025,9 +9203,12 @@ were written to the repository in this transaction.</doc>
in bytes, counting only content objects.</doc>
<type name="guint64" c:type="guint64"/>
</field>
<field name="devino_cache_hits" writable="1">
<type name="guint" c:type="guint"/>
</field>
<field name="padding1" writable="1">
<doc xml:space="preserve">reserved</doc>
<type name="guint64" c:type="guint64"/>
<type name="guint" c:type="guint"/>
</field>
<field name="padding2" writable="1">
<doc xml:space="preserve">reserved</doc>
@ -9123,6 +9304,7 @@ in bytes, counting only content objects.</doc>
</constructor>
<constructor name="new_at"
c:identifier="ostree_sepolicy_new_at"
version="2017.4"
throws="1">
<return-value transfer-ownership="full">
<doc xml:space="preserve">An accessor object for SELinux policy in root located at @rootfs_dfd</doc>
@ -9158,7 +9340,9 @@ in bytes, counting only content objects.</doc>
</parameter>
</parameters>
</function>
<method name="get_csum" c:identifier="ostree_sepolicy_get_csum">
<method name="get_csum"
c:identifier="ostree_sepolicy_get_csum"
version="2016.5">
<return-value transfer-ownership="none">
<doc xml:space="preserve">Checksum of current policy</doc>
<type name="utf8" c:type="const char*"/>
@ -9626,6 +9810,7 @@ the staged deployment (as it's not in the bootloader entries).</doc>
</method>
<method name="deployment_unlock"
c:identifier="ostree_sysroot_deployment_unlock"
version="2016.4"
throws="1">
<doc xml:space="preserve">Configure the target deployment @deployment such that it
is writable. There are multiple modes, essentially differing
@ -9838,7 +10023,8 @@ the first one in the current deployment list which matches osname.</doc>
</parameters>
</method>
<method name="get_staged_deployment"
c:identifier="ostree_sysroot_get_staged_deployment">
c:identifier="ostree_sysroot_get_staged_deployment"
version="2018.5">
<return-value transfer-ownership="none">
<doc xml:space="preserve">The currently staged deployment, or %NULL if none</doc>
<type name="Deployment" c:type="OstreeDeployment*"/>
@ -9863,6 +10049,7 @@ the first one in the current deployment list which matches osname.</doc>
</method>
<method name="init_osname"
c:identifier="ostree_sysroot_init_osname"
version="2016.4"
throws="1">
<doc xml:space="preserve">Initialize the directory structure for an "osname", which is a
group of operating system deployments, with a shared `/var`. One
@ -9910,6 +10097,7 @@ rootfs @self.</doc>
</method>
<method name="load_if_changed"
c:identifier="ostree_sysroot_load_if_changed"
version="2016.4"
throws="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
@ -10081,7 +10269,7 @@ we're not looking at the booted deployment.</doc>
</parameter>
</parameters>
</method>
<method name="repo" c:identifier="ostree_sysroot_repo">
<method name="repo" c:identifier="ostree_sysroot_repo" version="2017.7">
<doc xml:space="preserve">This function is a variant of ostree_sysroot_get_repo() that cannot fail, and
returns a cached repository. Can only be called after ostree_sysroot_load()
has been invoked successfully.</doc>
@ -10163,6 +10351,7 @@ later, instead.</doc>
</method>
<method name="stage_tree"
c:identifier="ostree_sysroot_stage_tree"
version="2018.5"
throws="1">
<doc xml:space="preserve">Like ostree_sysroot_deploy_tree(), but "finalization" only occurs at OS
shutdown time.</doc>
@ -10312,6 +10501,7 @@ version will perform post-deployment cleanup by default.</doc>
</method>
<method name="write_deployments_with_options"
c:identifier="ostree_sysroot_write_deployments_with_options"
version="2017.4"
throws="1">
<doc xml:space="preserve">Assuming @new_deployments have already been deployed in place on disk via
ostree_sysroot_deploy_tree(), atomically update bootloader configuration. By
@ -10820,14 +11010,14 @@ users who had been using zero before.</doc>
disguised="1">
</record>
<constant name="VERSION"
value="2018.800000"
value="2019.300000"
c:type="OSTREE_VERSION"
version="2017.4">
<doc xml:space="preserve">ostree version.</doc>
<type name="gdouble" c:type="gdouble"/>
</constant>
<constant name="VERSION_S"
value="2018.8"
value="2019.3"
c:type="OSTREE_VERSION_S"
version="2017.4">
<doc xml:space="preserve">ostree version, encoded as a string, useful for printing and
@ -10835,7 +11025,7 @@ concatenation.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="YEAR_VERSION"
value="2018"
value="2019"
c:type="OSTREE_YEAR_VERSION"
version="2017.4">
<doc xml:space="preserve">ostree year version component (e.g. 2017 if %OSTREE_VERSION is 2017.2)</doc>
@ -10883,7 +11073,9 @@ care of synchronization.</doc>
</parameter>
</parameters>
</function>
<function name="check_version" c:identifier="ostree_check_version">
<function name="check_version"
c:identifier="ostree_check_version"
version="2017.4">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if current libostree has at least the requested version, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
@ -10900,7 +11092,8 @@ care of synchronization.</doc>
</parameters>
</function>
<function name="checksum_b64_from_bytes"
c:identifier="ostree_checksum_b64_from_bytes">
c:identifier="ostree_checksum_b64_from_bytes"
version="2016.8">
<return-value transfer-ownership="full">
<doc xml:space="preserve">Modified base64 encoding of @csum
@ -10960,7 +11153,8 @@ character is used.</doc>
</parameters>
</function>
<function name="checksum_b64_to_bytes"
c:identifier="ostree_checksum_b64_to_bytes">
c:identifier="ostree_checksum_b64_to_bytes"
version="2016.8">
<return-value transfer-ownership="full">
<doc xml:space="preserve">Binary version of @checksum.</doc>
<array zero-terminated="0" c:type="guchar*" fixed-size="32">
@ -11411,7 +11605,8 @@ must be %NULL-terminated; it may be empty, but must not be %NULL.</doc>
</parameters>
</function>
<function name="commit_get_content_checksum"
c:identifier="ostree_commit_get_content_checksum">
c:identifier="ostree_commit_get_content_checksum"
version="2018.2">
<doc xml:space="preserve">There are use cases where one wants a checksum just of the content of a
commit. OSTree commits by default capture the current timestamp, and may have
additional metadata, which means that re-committing identical content
@ -11687,6 +11882,7 @@ sets of #OstreeDiffItem in @modified, @removed, and @added.</doc>
</function>
<function name="diff_dirs_with_options"
c:identifier="ostree_diff_dirs_with_options"
version="2017.4"
throws="1">
<doc xml:space="preserve">Compute the difference between directory @a and @b as 3 separate
sets of #OstreeDiffItem in @modified, @removed, and @added.</doc>
@ -11774,7 +11970,9 @@ sets of #OstreeDiffItem in @modified, @removed, and @added.</doc>
</parameter>
</parameters>
</function>
<function name="gpg_error_quark" c:identifier="ostree_gpg_error_quark">
<function name="gpg_error_quark"
c:identifier="ostree_gpg_error_quark"
version="2017.10">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
@ -11960,6 +12158,7 @@ will be `gnome-ostree/buildmaster`. In both cases, %TRUE will be returned.</doc>
</function>
<function name="raw_file_to_archive_z2_stream"
c:identifier="ostree_raw_file_to_archive_z2_stream"
version="2016.6"
throws="1">
<doc xml:space="preserve">Convert from a "bare" file representation into an
OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull.</doc>

View File

@ -38,6 +38,10 @@ lazy_static! {
lazy_static! {
pub static ref FILEMETA_GVARIANT_STRING: &'static str = unsafe{CStr::from_ptr(ffi::OSTREE_FILEMETA_GVARIANT_STRING).to_str().unwrap()};
}
#[cfg(any(feature = "v2018_9", feature = "dox"))]
lazy_static! {
pub static ref META_KEY_DEPLOY_COLLECTION_ID: &'static str = unsafe{CStr::from_ptr(ffi::OSTREE_META_KEY_DEPLOY_COLLECTION_ID).to_str().unwrap()};
}
#[cfg(any(feature = "v2018_3", feature = "dox"))]
lazy_static! {
pub static ref ORIGIN_TRANSIENT_GROUP: &'static str = unsafe{CStr::from_ptr(ffi::OSTREE_ORIGIN_TRANSIENT_GROUP).to_str().unwrap()};

View File

@ -237,6 +237,7 @@ pub enum RepoRemoteChange {
AddIfNotExists,
Delete,
DeleteIfExists,
Replace,
#[doc(hidden)]
__Unknown(i32),
}
@ -251,6 +252,7 @@ impl ToGlib for RepoRemoteChange {
RepoRemoteChange::AddIfNotExists => ffi::OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS,
RepoRemoteChange::Delete => ffi::OSTREE_REPO_REMOTE_CHANGE_DELETE,
RepoRemoteChange::DeleteIfExists => ffi::OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS,
RepoRemoteChange::Replace => ffi::OSTREE_REPO_REMOTE_CHANGE_REPLACE,
RepoRemoteChange::__Unknown(value) => value
}
}
@ -264,41 +266,12 @@ impl FromGlib<ffi::OstreeRepoRemoteChange> for RepoRemoteChange {
1 => RepoRemoteChange::AddIfNotExists,
2 => RepoRemoteChange::Delete,
3 => RepoRemoteChange::DeleteIfExists,
4 => RepoRemoteChange::Replace,
value => RepoRemoteChange::__Unknown(value),
}
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
pub enum RepoResolveRevExtFlags {
RepoResolveRevExtNone,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl ToGlib for RepoResolveRevExtFlags {
type GlibType = ffi::OstreeRepoResolveRevExtFlags;
fn to_glib(&self) -> ffi::OstreeRepoResolveRevExtFlags {
match *self {
RepoResolveRevExtFlags::RepoResolveRevExtNone => ffi::OSTREE_REPO_RESOLVE_REV_EXT_NONE,
RepoResolveRevExtFlags::__Unknown(value) => value
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoResolveRevExtFlags> for RepoResolveRevExtFlags {
fn from_glib(value: ffi::OstreeRepoResolveRevExtFlags) -> Self {
match value {
0 => RepoResolveRevExtFlags::RepoResolveRevExtNone,
value => RepoResolveRevExtFlags::__Unknown(value),
}
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
pub enum StaticDeltaGenerateOpt {

View File

@ -36,6 +36,7 @@ bitflags! {
const NONE = 0;
const ALIASES = 1;
const EXCLUDE_REMOTES = 2;
const EXCLUDE_MIRRORS = 4;
}
}
@ -82,6 +83,29 @@ impl FromGlib<ffi::OstreeRepoPullFlags> for RepoPullFlags {
}
}
bitflags! {
pub struct RepoResolveRevExtFlags: u32 {
const NONE = 0;
const LOCAL_ONLY = 1;
}
}
#[doc(hidden)]
impl ToGlib for RepoResolveRevExtFlags {
type GlibType = ffi::OstreeRepoResolveRevExtFlags;
fn to_glib(&self) -> ffi::OstreeRepoResolveRevExtFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoResolveRevExtFlags> for RepoResolveRevExtFlags {
fn from_glib(value: ffi::OstreeRepoResolveRevExtFlags) -> RepoResolveRevExtFlags {
RepoResolveRevExtFlags::from_bits_truncate(value)
}
}
bitflags! {
pub struct SePolicyRestoreconFlags: u32 {
const NONE = 0;

View File

@ -24,12 +24,14 @@ pub fn break_hardlink<'a, P: Into<Option<&'a gio::Cancellable>>>(dfd: i32, path:
}
}
#[cfg(any(feature = "v2017_4", feature = "dox"))]
pub fn check_version(required_year: u32, required_release: u32) -> bool {
unsafe {
from_glib(ffi::ostree_check_version(required_year, required_release))
}
}
//#[cfg(any(feature = "v2016_8", feature = "dox"))]
//pub fn checksum_b64_from_bytes(csum: /*Unknown conversion*//*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32) -> Option<String> {
// unsafe { TODO: call ffi::ostree_checksum_b64_from_bytes() }
//}
@ -42,6 +44,7 @@ pub fn check_version(required_year: u32, required_release: u32) -> bool {
// unsafe { TODO: call ffi::ostree_checksum_b64_inplace_to_bytes() }
//}
//#[cfg(any(feature = "v2016_8", feature = "dox"))]
//pub fn checksum_b64_to_bytes(checksum: &str) -> /*Unknown conversion*//*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32 {
// unsafe { TODO: call ffi::ostree_checksum_b64_to_bytes() }
//}
@ -99,6 +102,7 @@ pub fn checksum_to_bytes_v(checksum: &str) -> Option<glib::Variant> {
// unsafe { TODO: call ffi::ostree_cmd__private__() }
//}
#[cfg(any(feature = "v2018_2", feature = "dox"))]
pub fn commit_get_content_checksum(commit_variant: &glib::Variant) -> Option<String> {
unsafe {
from_glib_full(ffi::ostree_commit_get_content_checksum(commit_variant.to_glib_none().0))
@ -168,6 +172,7 @@ pub fn create_directory_metadata<'a, P: Into<Option<&'a glib::Variant>>>(dir_inf
// unsafe { TODO: call ffi::ostree_diff_dirs() }
//}
//#[cfg(any(feature = "v2017_4", feature = "dox"))]
//pub fn diff_dirs_with_options<'a, 'b, P: IsA<gio::File>, Q: IsA<gio::File>, R: Into<Option<&'a /*Ignored*/DiffDirsOptions>>, S: Into<Option<&'b gio::Cancellable>>>(flags: /*Ignored*/DiffFlags, a: &P, b: &Q, modified: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 24 }, removed: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 4, id: 15 }, added: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 4, id: 15 }, options: R, cancellable: S) -> Result<(), Error> {
// unsafe { TODO: call ffi::ostree_diff_dirs_with_options() }
//}
@ -176,6 +181,7 @@ pub fn create_directory_metadata<'a, P: Into<Option<&'a glib::Variant>>>(dir_inf
// unsafe { TODO: call ffi::ostree_diff_print() }
//}
//#[cfg(any(feature = "v2017_10", feature = "dox"))]
//pub fn gpg_error_quark() -> /*Ignored*/glib::Quark {
// unsafe { TODO: call ffi::ostree_gpg_error_quark() }
//}
@ -240,6 +246,7 @@ pub fn parse_refspec(refspec: &str) -> Result<(Option<String>, String), Error> {
}
}
#[cfg(any(feature = "v2016_6", feature = "dox"))]
pub fn raw_file_to_archive_z2_stream<'a, 'b, P: IsA<gio::InputStream>, Q: Into<Option<&'a glib::Variant>>, R: Into<Option<&'b gio::Cancellable>>>(input: &P, file_info: &gio::FileInfo, xattrs: Q, cancellable: R) -> Result<gio::InputStream, Error> {
let xattrs = xattrs.into();
let xattrs = xattrs.to_glib_none();

View File

@ -2,6 +2,7 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
#[cfg(any(feature = "v2016_6", feature = "dox"))]
use Error;
use GpgSignatureFormatFlags;
use ffi;
@ -44,6 +45,7 @@ pub trait GpgVerifyResultExt {
fn lookup(&self, key_id: &str) -> Option<u32>;
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn require_valid_signature(&self) -> Result<(), Error>;
}
@ -86,6 +88,7 @@ impl<O: IsA<GpgVerifyResult>> GpgVerifyResultExt for O {
}
}
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn require_valid_signature(&self) -> Result<(), Error> {
unsafe {
let mut error = ptr::null_mut();

View File

@ -53,7 +53,6 @@ pub use self::enums::RepoCheckoutOverwriteMode;
pub use self::enums::RepoMode;
pub use self::enums::RepoPruneFlags;
pub use self::enums::RepoRemoteChange;
pub use self::enums::RepoResolveRevExtFlags;
pub use self::enums::StaticDeltaGenerateOpt;
mod flags;
@ -61,6 +60,7 @@ mod flags;
pub use self::flags::RepoCommitState;
pub use self::flags::RepoListRefsExtFlags;
pub use self::flags::RepoPullFlags;
pub use self::flags::RepoResolveRevExtFlags;
pub use self::flags::SePolicyRestoreconFlags;
pub mod functions;
@ -81,6 +81,8 @@ pub use self::constants::COMMIT_META_KEY_SOURCE_TITLE;
pub use self::constants::COMMIT_META_KEY_VERSION;
pub use self::constants::DIRMETA_GVARIANT_STRING;
pub use self::constants::FILEMETA_GVARIANT_STRING;
#[cfg(any(feature = "v2018_9", feature = "dox"))]
pub use self::constants::META_KEY_DEPLOY_COLLECTION_ID;
#[cfg(any(feature = "v2018_3", feature = "dox"))]
pub use self::constants::ORIGIN_TRANSIENT_GROUP;
#[cfg(any(feature = "v2018_6", feature = "dox"))]

View File

@ -3,6 +3,7 @@
// DO NOT EDIT
use Error;
#[cfg(any(feature = "v2018_7", feature = "dox"))]
use Repo;
use ffi;
use glib::object::IsA;
@ -27,6 +28,7 @@ impl MutableTree {
}
}
#[cfg(any(feature = "v2018_7", feature = "dox"))]
pub fn new_from_checksum(repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> MutableTree {
unsafe {
from_glib_full(ffi::ostree_mutable_tree_new_from_checksum(repo.to_glib_none().0, contents_checksum.to_glib_none().0, metadata_checksum.to_glib_none().0))
@ -48,6 +50,7 @@ pub trait MutableTreeExt {
//fn ensure_parent_dirs(&self, split_path: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 0, id: 28 }, metadata_checksum: &str) -> Result<MutableTree, Error>;
#[cfg(any(feature = "v2018_7", feature = "dox"))]
fn fill_empty_from_dirtree(&self, repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> bool;
fn get_contents_checksum(&self) -> Option<String>;
@ -58,6 +61,9 @@ pub trait MutableTreeExt {
//fn get_subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 37 };
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn remove(&self, name: &str, allow_noent: bool) -> Result<(), Error>;
fn replace_file(&self, name: &str, checksum: &str) -> Result<(), Error>;
fn set_contents_checksum(&self, checksum: &str);
@ -90,6 +96,7 @@ impl<O: IsA<MutableTree>> MutableTreeExt for O {
// unsafe { TODO: call ffi::ostree_mutable_tree_ensure_parent_dirs() }
//}
#[cfg(any(feature = "v2018_7", feature = "dox"))]
fn fill_empty_from_dirtree(&self, repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> bool {
unsafe {
from_glib(ffi::ostree_mutable_tree_fill_empty_from_dirtree(self.to_glib_none().0, repo.to_glib_none().0, contents_checksum.to_glib_none().0, metadata_checksum.to_glib_none().0))
@ -116,6 +123,15 @@ impl<O: IsA<MutableTree>> MutableTreeExt for O {
// unsafe { TODO: call ffi::ostree_mutable_tree_get_subdirs() }
//}
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn remove(&self, name: &str, allow_noent: bool) -> Result<(), Error> {
unsafe {
let mut error = ptr::null_mut();
let _ = ffi::ostree_mutable_tree_remove(self.to_glib_none().0, name.to_glib_none().0, allow_noent.to_glib(), &mut error);
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
fn replace_file(&self, name: &str, checksum: &str) -> Result<(), Error> {
unsafe {
let mut error = ptr::null_mut();

View File

@ -21,6 +21,7 @@ use RepoMode;
use RepoPruneFlags;
use RepoPullFlags;
use RepoRemoteChange;
#[cfg(any(feature = "v2016_7", feature = "dox"))]
use RepoResolveRevExtFlags;
use RepoTransactionStats;
use StaticDeltaGenerateOpt;
@ -69,6 +70,7 @@ impl Repo {
}
}
#[cfg(any(feature = "v2017_10", feature = "dox"))]
pub fn create_at<'a, P: Into<Option<&'a gio::Cancellable>>>(dfd: i32, path: &str, mode: RepoMode, options: &glib::Variant, cancellable: P) -> Result<Repo, Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@ -79,6 +81,7 @@ impl Repo {
}
}
#[cfg(any(feature = "v2017_10", feature = "dox"))]
pub fn open_at<'a, P: Into<Option<&'a gio::Cancellable>>>(dfd: i32, path: &str, cancellable: P) -> Result<Repo, Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@ -115,6 +118,7 @@ pub trait RepoExt {
fn append_gpg_signature<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, commit_checksum: &str, signature_bytes: &glib::Bytes, cancellable: P) -> Result<(), Error>;
//#[cfg(any(feature = "v2016_8", feature = "dox"))]
//fn checkout_at<'a, 'b, P: Into<Option<&'a /*Ignored*/RepoCheckoutAtOptions>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, options: P, destination_dfd: i32, destination_path: &str, commit: &str, cancellable: Q) -> Result<(), Error>;
fn checkout_gc<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, cancellable: P) -> Result<(), Error>;
@ -139,27 +143,41 @@ pub trait RepoExt {
#[cfg(any(feature = "v2017_15", feature = "dox"))]
fn fsck_object<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, objtype: ObjectType, sha256: &str, cancellable: P) -> Result<(), Error>;
#[cfg(any(feature = "v2019_2", feature = "dox"))]
fn get_bootloader(&self) -> Option<String>;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
fn get_collection_id(&self) -> Option<String>;
fn get_config(&self) -> Option<glib::KeyFile>;
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn get_default_repo_finders(&self) -> Vec<String>;
#[cfg(any(feature = "v2016_4", feature = "dox"))]
fn get_dfd(&self) -> i32;
fn get_disable_fsync(&self) -> bool;
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn get_min_free_space_bytes(&self) -> Result<u64, Error>;
fn get_mode(&self) -> RepoMode;
fn get_parent(&self) -> Option<Repo>;
fn get_path(&self) -> Option<gio::File>;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_boolean_option(&self, remote_name: &str, option_name: &str, default_value: bool) -> Result<bool, Error>;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_list_option(&self, remote_name: &str, option_name: &str) -> Result<Vec<String>, Error>;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_option<'a, P: Into<Option<&'a str>>>(&self, remote_name: &str, option_name: &str, default_value: P) -> Result<String, Error>;
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn gpg_verify_data<'a, 'b, 'c, 'd, P: Into<Option<&'a str>>, Q: IsA<gio::File> + 'b, R: Into<Option<&'b Q>>, S: IsA<gio::File> + 'c, T: Into<Option<&'c S>>, U: Into<Option<&'d gio::Cancellable>>>(&self, remote_name: P, data: &glib::Bytes, signatures: &glib::Bytes, keyringdir: R, extra_keyring: T, cancellable: U) -> Result<GpgVerifyResult, Error>;
fn has_object<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, objtype: ObjectType, checksum: &str, cancellable: P) -> Result<bool, Error>;
@ -171,6 +189,7 @@ pub trait RepoExt {
fn import_object_from<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, source: &Repo, objtype: ObjectType, checksum: &str, cancellable: P) -> Result<(), Error>;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn import_object_from_with_trust<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, source: &Repo, objtype: ObjectType, checksum: &str, trusted: bool, cancellable: P) -> Result<(), Error>;
fn is_system(&self) -> bool;
@ -186,6 +205,7 @@ pub trait RepoExt {
//fn list_refs<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, refspec_prefix: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, cancellable: Q) -> Result<(), Error>;
//#[cfg(any(feature = "v2016_4", feature = "dox"))]
//fn list_refs_ext<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, refspec_prefix: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, flags: RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error>;
//fn list_static_delta_names<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, out_deltas: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 0, id: 28 }, cancellable: P) -> Result<(), Error>;
@ -210,6 +230,7 @@ pub trait RepoExt {
fn prune<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, flags: RepoPruneFlags, depth: i32, cancellable: P) -> Result<(i32, i32, u64), Error>;
//#[cfg(any(feature = "v2017_1", feature = "dox"))]
//fn prune_from_reachable<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, options: /*Ignored*/&mut RepoPruneOptions, cancellable: P) -> Result<(i32, i32, u64), Error>;
fn prune_static_deltas<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, commit: P, cancellable: Q) -> Result<(), Error>;
@ -228,6 +249,7 @@ pub trait RepoExt {
fn regenerate_summary<'a, 'b, P: Into<Option<&'a glib::Variant>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, additional_metadata: P, cancellable: Q) -> Result<(), Error>;
#[cfg(any(feature = "v2017_2", feature = "dox"))]
fn reload_config<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, cancellable: P) -> Result<(), Error>;
fn remote_add<'a, 'b, P: Into<Option<&'a glib::Variant>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, name: &str, url: &str, options: P, cancellable: Q) -> Result<(), Error>;
@ -238,6 +260,7 @@ pub trait RepoExt {
fn remote_fetch_summary<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, name: &str, cancellable: P) -> Result<(glib::Bytes, glib::Bytes), Error>;
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn remote_fetch_summary_with_options<'a, 'b, P: Into<Option<&'a glib::Variant>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, name: &str, options: P, cancellable: Q) -> Result<(glib::Bytes, glib::Bytes), Error>;
fn remote_get_gpg_verify(&self, name: &str) -> Result<bool, Error>;
@ -261,12 +284,15 @@ pub trait RepoExt {
fn resolve_rev(&self, refspec: &str, allow_noent: bool) -> Result<String, Error>;
#[cfg(any(feature = "v2016_7", feature = "dox"))]
fn resolve_rev_ext(&self, refspec: &str, allow_noent: bool, flags: RepoResolveRevExtFlags) -> Result<String, Error>;
fn scan_hardlinks<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, cancellable: P) -> Result<(), Error>;
#[cfg(any(feature = "v2017_10", feature = "dox"))]
fn set_alias_ref_immediate<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>, R: Into<Option<&'c gio::Cancellable>>>(&self, remote: P, ref_: &str, target: Q, cancellable: R) -> Result<(), Error>;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn set_cache_dir<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, dfd: i32, path: &str, cancellable: P) -> Result<(), Error>;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
@ -308,6 +334,7 @@ pub trait RepoExt {
fn verify_commit_ext<'a, 'b, 'c, P: IsA<gio::File> + 'a, Q: Into<Option<&'a P>>, R: IsA<gio::File> + 'b, S: Into<Option<&'b R>>, T: Into<Option<&'c gio::Cancellable>>>(&self, commit_checksum: &str, keyringdir: Q, extra_keyring: S, cancellable: T) -> Result<GpgVerifyResult, Error>;
#[cfg(any(feature = "v2016_14", feature = "dox"))]
fn verify_commit_for_remote<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, commit_checksum: &str, remote_name: &str, cancellable: P) -> Result<GpgVerifyResult, Error>;
fn verify_summary<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, remote_name: &str, summary: &glib::Bytes, signatures: &glib::Bytes, cancellable: P) -> Result<GpgVerifyResult, Error>;
@ -378,6 +405,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
//#[cfg(any(feature = "v2016_8", feature = "dox"))]
//fn checkout_at<'a, 'b, P: Into<Option<&'a /*Ignored*/RepoCheckoutAtOptions>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, options: P, destination_dfd: i32, destination_path: &str, commit: &str, cancellable: Q) -> Result<(), Error> {
// unsafe { TODO: call ffi::ostree_repo_checkout_at() }
//}
@ -465,6 +493,13 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2019_2", feature = "dox"))]
fn get_bootloader(&self) -> Option<String> {
unsafe {
from_glib_none(ffi::ostree_repo_get_bootloader(self.to_glib_none().0))
}
}
#[cfg(any(feature = "v2018_6", feature = "dox"))]
fn get_collection_id(&self) -> Option<String> {
unsafe {
@ -478,6 +513,14 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn get_default_repo_finders(&self) -> Vec<String> {
unsafe {
FromGlibPtrContainer::from_glib_none(ffi::ostree_repo_get_default_repo_finders(self.to_glib_none().0))
}
}
#[cfg(any(feature = "v2016_4", feature = "dox"))]
fn get_dfd(&self) -> i32 {
unsafe {
ffi::ostree_repo_get_dfd(self.to_glib_none().0)
@ -490,6 +533,16 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn get_min_free_space_bytes(&self) -> Result<u64, Error> {
unsafe {
let mut out_reserved_bytes = mem::uninitialized();
let mut error = ptr::null_mut();
let _ = ffi::ostree_repo_get_min_free_space_bytes(self.to_glib_none().0, &mut out_reserved_bytes, &mut error);
if error.is_null() { Ok(out_reserved_bytes) } else { Err(from_glib_full(error)) }
}
}
fn get_mode(&self) -> RepoMode {
unsafe {
from_glib(ffi::ostree_repo_get_mode(self.to_glib_none().0))
@ -508,6 +561,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_boolean_option(&self, remote_name: &str, option_name: &str, default_value: bool) -> Result<bool, Error> {
unsafe {
let mut out_value = mem::uninitialized();
@ -517,6 +571,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_list_option(&self, remote_name: &str, option_name: &str) -> Result<Vec<String>, Error> {
unsafe {
let mut out_value = ptr::null_mut();
@ -526,6 +581,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_option<'a, P: Into<Option<&'a str>>>(&self, remote_name: &str, option_name: &str, default_value: P) -> Result<String, Error> {
let default_value = default_value.into();
let default_value = default_value.to_glib_none();
@ -537,6 +593,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn gpg_verify_data<'a, 'b, 'c, 'd, P: Into<Option<&'a str>>, Q: IsA<gio::File> + 'b, R: Into<Option<&'b Q>>, S: IsA<gio::File> + 'c, T: Into<Option<&'c S>>, U: Into<Option<&'d gio::Cancellable>>>(&self, remote_name: P, data: &glib::Bytes, signatures: &glib::Bytes, keyringdir: R, extra_keyring: T, cancellable: U) -> Result<GpgVerifyResult, Error> {
let remote_name = remote_name.into();
let remote_name = remote_name.to_glib_none();
@ -585,6 +642,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn import_object_from_with_trust<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, source: &Repo, objtype: ObjectType, checksum: &str, trusted: bool, cancellable: P) -> Result<(), Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@ -626,6 +684,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
// unsafe { TODO: call ffi::ostree_repo_list_refs() }
//}
//#[cfg(any(feature = "v2016_4", feature = "dox"))]
//fn list_refs_ext<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, refspec_prefix: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, flags: RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error> {
// unsafe { TODO: call ffi::ostree_repo_list_refs_ext() }
//}
@ -731,6 +790,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
//#[cfg(any(feature = "v2017_1", feature = "dox"))]
//fn prune_from_reachable<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, options: /*Ignored*/&mut RepoPruneOptions, cancellable: P) -> Result<(i32, i32, u64), Error> {
// unsafe { TODO: call ffi::ostree_repo_prune_from_reachable() }
//}
@ -829,6 +889,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2017_2", feature = "dox"))]
fn reload_config<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, cancellable: P) -> Result<(), Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@ -887,6 +948,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn remote_fetch_summary_with_options<'a, 'b, P: Into<Option<&'a glib::Variant>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, name: &str, options: P, cancellable: Q) -> Result<(glib::Bytes, glib::Bytes), Error> {
let options = options.into();
let options = options.to_glib_none();
@ -977,6 +1039,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_7", feature = "dox"))]
fn resolve_rev_ext(&self, refspec: &str, allow_noent: bool, flags: RepoResolveRevExtFlags) -> Result<String, Error> {
unsafe {
let mut out_rev = ptr::null_mut();
@ -996,6 +1059,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2017_10", feature = "dox"))]
fn set_alias_ref_immediate<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>, R: Into<Option<&'c gio::Cancellable>>>(&self, remote: P, ref_: &str, target: Q, cancellable: R) -> Result<(), Error> {
let remote = remote.into();
let remote = remote.to_glib_none();
@ -1010,6 +1074,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn set_cache_dir<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, dfd: i32, path: &str, cancellable: P) -> Result<(), Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@ -1183,6 +1248,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_14", feature = "dox"))]
fn verify_commit_for_remote<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, commit_checksum: &str, remote_name: &str, cancellable: P) -> Result<GpgVerifyResult, Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();

View File

@ -35,6 +35,7 @@ impl SePolicy {
}
}
#[cfg(any(feature = "v2017_4", feature = "dox"))]
pub fn new_at<'a, P: Into<Option<&'a gio::Cancellable>>>(rootfs_dfd: i32, cancellable: P) -> Result<SePolicy, Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@ -51,6 +52,7 @@ impl SePolicy {
}
pub trait SePolicyExt {
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_csum(&self) -> Option<String>;
fn get_label<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, relpath: &str, unix_mode: u32, cancellable: P) -> Result<String, Error>;
@ -67,6 +69,7 @@ pub trait SePolicyExt {
}
impl<O: IsA<SePolicy> + IsA<glib::object::Object>> SePolicyExt for O {
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_csum(&self) -> Option<String> {
unsafe {
from_glib_none(ffi::ostree_sepolicy_get_csum(self.to_glib_none().0))

View File

@ -18,12 +18,20 @@ tempdir = "0.3"
dox = []
v2014_9 = []
v2015_7 = ["v2014_9"]
v2016_14 = ["v2016_8"]
v2016_4 = ["v2015_7"]
v2016_5 = ["v2016_4"]
v2016_6 = ["v2016_5"]
v2016_7 = ["v2016_6"]
v2016_8 = ["v2016_7"]
v2017_1 = ["v2016_14"]
v2017_10 = ["v2017_9"]
v2017_11 = ["v2017_10"]
v2017_12 = ["v2017_11"]
v2017_13 = ["v2017_12"]
v2017_15 = ["v2017_13"]
v2017_3 = ["v2015_7"]
v2017_2 = ["v2017_1"]
v2017_3 = ["v2017_2"]
v2017_4 = ["v2017_3"]
v2017_6 = ["v2017_4"]
v2017_7 = ["v2017_6"]
@ -34,6 +42,8 @@ v2018_3 = ["v2018_2"]
v2018_5 = ["v2018_3"]
v2018_6 = ["v2018_5"]
v2018_7 = ["v2018_6"]
v2018_9 = ["v2018_7"]
v2019_2 = ["v2018_9"]
[lib]
name = "ostree_sys"
@ -49,6 +59,6 @@ license = "MIT"
links = "ostree-1"
name = "ostree-sys"
repository = "https://gitlab.com/fkrull/ostree-rs"
version = "0.2.0"
version = "0.3.0"
[package.metadata.docs.rs]
features = ["dox"]

View File

@ -16,7 +16,11 @@ fn main() {
fn find() -> Result<(), Error> {
let package_name = "ostree-1";
let shared_libs = ["ostree-1"];
let version = if cfg!(feature = "v2018_7") {
let version = if cfg!(feature = "v2019_2") {
"2019.2"
} else if cfg!(feature = "v2018_9") {
"2018.9"
} else if cfg!(feature = "v2018_7") {
"2018.7"
} else if cfg!(feature = "v2018_6") {
"2018.6"
@ -48,6 +52,22 @@ fn find() -> Result<(), Error> {
"2017.4"
} else if cfg!(feature = "v2017_3") {
"2017.3"
} else if cfg!(feature = "v2017_2") {
"2017.2"
} else if cfg!(feature = "v2017_1") {
"2017.1"
} else if cfg!(feature = "v2016_14") {
"2016.14"
} else if cfg!(feature = "v2016_8") {
"2016.8"
} else if cfg!(feature = "v2016_7") {
"2016.7"
} else if cfg!(feature = "v2016_6") {
"2016.6"
} else if cfg!(feature = "v2016_5") {
"2016.5"
} else if cfg!(feature = "v2016_4") {
"2016.4"
} else if cfg!(feature = "v2015_7") {
"2015.7"
} else {

View File

@ -105,10 +105,7 @@ pub const OSTREE_REPO_REMOTE_CHANGE_ADD: OstreeRepoRemoteChange = 0;
pub const OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS: OstreeRepoRemoteChange = 1;
pub const OSTREE_REPO_REMOTE_CHANGE_DELETE: OstreeRepoRemoteChange = 2;
pub const OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS: OstreeRepoRemoteChange = 3;
pub type RepoResolveRevExtFlags = c_int;
pub const OSTREE_REPO_RESOLVE_REV_EXT_NONE: RepoResolveRevExtFlags = 0;
pub type OstreeRepoResolveRevExtFlags = RepoResolveRevExtFlags;
pub const OSTREE_REPO_REMOTE_CHANGE_REPLACE: OstreeRepoRemoteChange = 4;
pub type OstreeStaticDeltaGenerateOpt = c_int;
pub const OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY: OstreeStaticDeltaGenerateOpt = 0;
@ -126,6 +123,7 @@ pub const OSTREE_DIRMETA_GVARIANT_STRING: *const c_char = b"(uuua(ayay))\0" as *
pub const OSTREE_FILEMETA_GVARIANT_STRING: *const c_char = b"(uuua(ayay))\0" as *const u8 as *const c_char;
pub const OSTREE_MAX_METADATA_SIZE: c_int = 10485760;
pub const OSTREE_MAX_METADATA_WARN_SIZE: c_int = 7340032;
pub const OSTREE_META_KEY_DEPLOY_COLLECTION_ID: *const c_char = b"ostree.deploy-collection-id\0" as *const u8 as *const c_char;
pub const OSTREE_ORIGIN_TRANSIENT_GROUP: *const c_char = b"libostree-transient\0" as *const u8 as *const c_char;
pub const OSTREE_REPO_METADATA_REF: *const c_char = b"ostree-metadata\0" as *const u8 as *const c_char;
pub const OSTREE_SHA256_DIGEST_LEN: c_int = 32;
@ -170,6 +168,7 @@ pub type OstreeRepoListRefsExtFlags = c_uint;
pub const OSTREE_REPO_LIST_REFS_EXT_NONE: OstreeRepoListRefsExtFlags = 0;
pub const OSTREE_REPO_LIST_REFS_EXT_ALIASES: OstreeRepoListRefsExtFlags = 1;
pub const OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES: OstreeRepoListRefsExtFlags = 2;
pub const OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS: OstreeRepoListRefsExtFlags = 4;
pub type OstreeRepoPullFlags = c_uint;
pub const OSTREE_REPO_PULL_FLAGS_NONE: OstreeRepoPullFlags = 0;
@ -179,6 +178,10 @@ pub const OSTREE_REPO_PULL_FLAGS_UNTRUSTED: OstreeRepoPullFlags = 4;
pub const OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES: OstreeRepoPullFlags = 8;
pub const OSTREE_REPO_PULL_FLAGS_TRUSTED_HTTP: OstreeRepoPullFlags = 16;
pub type OstreeRepoResolveRevExtFlags = c_uint;
pub const OSTREE_REPO_RESOLVE_REV_EXT_NONE: OstreeRepoResolveRevExtFlags = 0;
pub const OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY: OstreeRepoResolveRevExtFlags = 1;
pub type OstreeSePolicyRestoreconFlags = c_uint;
pub const OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE: OstreeSePolicyRestoreconFlags = 0;
pub const OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL: OstreeSePolicyRestoreconFlags = 1;
@ -429,7 +432,8 @@ pub struct OstreeRepoCheckoutAtOptions {
pub no_copy_fallback: gboolean,
pub force_copy: gboolean,
pub bareuseronly_dirs: gboolean,
pub unused_bools: [gboolean; 5],
pub force_copy_zerosized: gboolean,
pub unused_bools: [gboolean; 4],
pub subpath: *const c_char,
pub devino_to_csum_cache: *mut OstreeRepoDevInoCache,
pub unused_ints: [c_int; 6],
@ -451,6 +455,7 @@ impl ::std::fmt::Debug for OstreeRepoCheckoutAtOptions {
.field("no_copy_fallback", &self.no_copy_fallback)
.field("force_copy", &self.force_copy)
.field("bareuseronly_dirs", &self.bareuseronly_dirs)
.field("force_copy_zerosized", &self.force_copy_zerosized)
.field("unused_bools", &self.unused_bools)
.field("subpath", &self.subpath)
.field("devino_to_csum_cache", &self.devino_to_csum_cache)
@ -697,7 +702,8 @@ pub struct OstreeRepoTransactionStats {
pub content_objects_total: c_uint,
pub content_objects_written: c_uint,
pub content_bytes_written: u64,
pub padding1: u64,
pub devino_cache_hits: c_uint,
pub padding1: c_uint,
pub padding2: u64,
pub padding3: u64,
pub padding4: u64,
@ -711,6 +717,7 @@ impl ::std::fmt::Debug for OstreeRepoTransactionStats {
.field("content_objects_total", &self.content_objects_total)
.field("content_objects_written", &self.content_objects_written)
.field("content_bytes_written", &self.content_bytes_written)
.field("devino_cache_hits", &self.devino_cache_hits)
.field("padding1", &self.padding1)
.field("padding2", &self.padding2)
.field("padding3", &self.padding3)
@ -960,6 +967,7 @@ extern "C" {
//=========================================================================
// OstreeRepoCheckoutAtOptions
//=========================================================================
#[cfg(any(feature = "v2017_13", feature = "dox"))]
pub fn ostree_repo_checkout_at_options_set_devino(opts: *mut OstreeRepoCheckoutAtOptions, cache: *mut OstreeRepoDevInoCache);
//=========================================================================
@ -1064,6 +1072,7 @@ extern "C" {
pub fn ostree_deployment_hash(v: gconstpointer) -> c_uint;
#[cfg(any(feature = "v2018_3", feature = "dox"))]
pub fn ostree_deployment_origin_remove_transient_state(origin: *mut glib::GKeyFile);
#[cfg(any(feature = "v2016_4", feature = "dox"))]
pub fn ostree_deployment_unlocked_state_to_string(state: OstreeDeploymentUnlockedState) -> *const c_char;
pub fn ostree_deployment_clone(self_: *mut OstreeDeployment) -> *mut OstreeDeployment;
pub fn ostree_deployment_equal(ap: gconstpointer, bp: gconstpointer) -> gboolean;
@ -1076,6 +1085,7 @@ extern "C" {
pub fn ostree_deployment_get_origin(self_: *mut OstreeDeployment) -> *mut glib::GKeyFile;
pub fn ostree_deployment_get_origin_relpath(self_: *mut OstreeDeployment) -> *mut c_char;
pub fn ostree_deployment_get_osname(self_: *mut OstreeDeployment) -> *const c_char;
#[cfg(any(feature = "v2016_4", feature = "dox"))]
pub fn ostree_deployment_get_unlocked(self_: *mut OstreeDeployment) -> OstreeDeploymentUnlockedState;
#[cfg(any(feature = "v2018_3", feature = "dox"))]
pub fn ostree_deployment_is_pinned(self_: *mut OstreeDeployment) -> gboolean;
@ -1097,6 +1107,7 @@ extern "C" {
pub fn ostree_gpg_verify_result_get(result: *mut OstreeGpgVerifyResult, signature_index: c_uint, attrs: *mut OstreeGpgSignatureAttr, n_attrs: c_uint) -> *mut glib::GVariant;
pub fn ostree_gpg_verify_result_get_all(result: *mut OstreeGpgVerifyResult, signature_index: c_uint) -> *mut glib::GVariant;
pub fn ostree_gpg_verify_result_lookup(result: *mut OstreeGpgVerifyResult, key_id: *const c_char, out_signature_index: *mut c_uint) -> gboolean;
#[cfg(any(feature = "v2016_6", feature = "dox"))]
pub fn ostree_gpg_verify_result_require_valid_signature(result: *mut OstreeGpgVerifyResult, error: *mut *mut glib::GError) -> gboolean;
//=========================================================================
@ -1104,17 +1115,21 @@ extern "C" {
//=========================================================================
pub fn ostree_mutable_tree_get_type() -> GType;
pub fn ostree_mutable_tree_new() -> *mut OstreeMutableTree;
#[cfg(any(feature = "v2018_7", feature = "dox"))]
pub fn ostree_mutable_tree_new_from_checksum(repo: *mut OstreeRepo, contents_checksum: *const c_char, metadata_checksum: *const c_char) -> *mut OstreeMutableTree;
#[cfg(any(feature = "v2018_7", feature = "dox"))]
pub fn ostree_mutable_tree_check_error(self_: *mut OstreeMutableTree, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_mutable_tree_ensure_dir(self_: *mut OstreeMutableTree, name: *const c_char, out_subdir: *mut *mut OstreeMutableTree, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_mutable_tree_ensure_parent_dirs(self_: *mut OstreeMutableTree, split_path: *mut glib::GPtrArray, metadata_checksum: *const c_char, out_parent: *mut *mut OstreeMutableTree, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2018_7", feature = "dox"))]
pub fn ostree_mutable_tree_fill_empty_from_dirtree(self_: *mut OstreeMutableTree, repo: *mut OstreeRepo, contents_checksum: *const c_char, metadata_checksum: *const c_char) -> gboolean;
pub fn ostree_mutable_tree_get_contents_checksum(self_: *mut OstreeMutableTree) -> *const c_char;
pub fn ostree_mutable_tree_get_files(self_: *mut OstreeMutableTree) -> *mut glib::GHashTable;
pub fn ostree_mutable_tree_get_metadata_checksum(self_: *mut OstreeMutableTree) -> *const c_char;
pub fn ostree_mutable_tree_get_subdirs(self_: *mut OstreeMutableTree) -> *mut glib::GHashTable;
pub fn ostree_mutable_tree_lookup(self_: *mut OstreeMutableTree, name: *const c_char, out_file_checksum: *mut *mut c_char, out_subdir: *mut *mut OstreeMutableTree, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2018_9", feature = "dox"))]
pub fn ostree_mutable_tree_remove(self_: *mut OstreeMutableTree, name: *const c_char, allow_noent: gboolean, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_mutable_tree_replace_file(self_: *mut OstreeMutableTree, name: *const c_char, checksum: *const c_char, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_mutable_tree_set_contents_checksum(self_: *mut OstreeMutableTree, checksum: *const c_char);
pub fn ostree_mutable_tree_set_metadata_checksum(self_: *mut OstreeMutableTree, checksum: *const c_char);
@ -1127,8 +1142,10 @@ extern "C" {
pub fn ostree_repo_new(path: *mut gio::GFile) -> *mut OstreeRepo;
pub fn ostree_repo_new_default() -> *mut OstreeRepo;
pub fn ostree_repo_new_for_sysroot_path(repo_path: *mut gio::GFile, sysroot_path: *mut gio::GFile) -> *mut OstreeRepo;
#[cfg(any(feature = "v2017_10", feature = "dox"))]
pub fn ostree_repo_create_at(dfd: c_int, path: *const c_char, mode: OstreeRepoMode, options: *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeRepo;
pub fn ostree_repo_mode_from_string(mode: *const c_char, out_mode: *mut OstreeRepoMode, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2017_10", feature = "dox"))]
pub fn ostree_repo_open_at(dfd: c_int, path: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeRepo;
pub fn ostree_repo_pull_default_console_progress_changed(progress: *mut OstreeAsyncProgress, user_data: gpointer);
#[cfg(any(feature = "v2018_5", feature = "dox"))]
@ -1139,6 +1156,7 @@ extern "C" {
pub fn ostree_repo_abort_transaction(self_: *mut OstreeRepo, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_add_gpg_signature_summary(self_: *mut OstreeRepo, key_id: *mut *mut c_char, homedir: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_append_gpg_signature(self_: *mut OstreeRepo, commit_checksum: *const c_char, signature_bytes: *mut glib::GBytes, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_8", feature = "dox"))]
pub fn ostree_repo_checkout_at(self_: *mut OstreeRepo, options: *mut OstreeRepoCheckoutAtOptions, destination_dfd: c_int, destination_path: *const c_char, commit: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_checkout_gc(self_: *mut OstreeRepo, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_checkout_tree(self_: *mut OstreeRepo, mode: OstreeRepoCheckoutMode, overwrite_mode: OstreeRepoCheckoutOverwriteMode, destination: *mut gio::GFile, source: *mut OstreeRepoFile, source_info: *mut gio::GFileInfo, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
@ -1156,23 +1174,35 @@ extern "C" {
pub fn ostree_repo_find_remotes_finish(self_: *mut OstreeRepo, result: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> *mut *mut OstreeRepoFinderResult;
#[cfg(any(feature = "v2017_15", feature = "dox"))]
pub fn ostree_repo_fsck_object(self_: *mut OstreeRepo, objtype: OstreeObjectType, sha256: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2019_2", feature = "dox"))]
pub fn ostree_repo_get_bootloader(self_: *mut OstreeRepo) -> *const c_char;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
pub fn ostree_repo_get_collection_id(self_: *mut OstreeRepo) -> *const c_char;
pub fn ostree_repo_get_config(self_: *mut OstreeRepo) -> *mut glib::GKeyFile;
#[cfg(any(feature = "v2018_9", feature = "dox"))]
pub fn ostree_repo_get_default_repo_finders(self_: *mut OstreeRepo) -> *mut *mut c_char;
#[cfg(any(feature = "v2016_4", feature = "dox"))]
pub fn ostree_repo_get_dfd(self_: *mut OstreeRepo) -> c_int;
pub fn ostree_repo_get_disable_fsync(self_: *mut OstreeRepo) -> gboolean;
#[cfg(any(feature = "v2018_9", feature = "dox"))]
pub fn ostree_repo_get_min_free_space_bytes(self_: *mut OstreeRepo, out_reserved_bytes: *mut u64, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_get_mode(self_: *mut OstreeRepo) -> OstreeRepoMode;
pub fn ostree_repo_get_parent(self_: *mut OstreeRepo) -> *mut OstreeRepo;
pub fn ostree_repo_get_path(self_: *mut OstreeRepo) -> *mut gio::GFile;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
pub fn ostree_repo_get_remote_boolean_option(self_: *mut OstreeRepo, remote_name: *const c_char, option_name: *const c_char, default_value: gboolean, out_value: *mut gboolean, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
pub fn ostree_repo_get_remote_list_option(self_: *mut OstreeRepo, remote_name: *const c_char, option_name: *const c_char, out_value: *mut *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
pub fn ostree_repo_get_remote_option(self_: *mut OstreeRepo, remote_name: *const c_char, option_name: *const c_char, default_value: *const c_char, out_value: *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_6", feature = "dox"))]
pub fn ostree_repo_gpg_verify_data(self_: *mut OstreeRepo, remote_name: *const c_char, data: *mut glib::GBytes, signatures: *mut glib::GBytes, keyringdir: *mut gio::GFile, extra_keyring: *mut gio::GFile, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeGpgVerifyResult;
pub fn ostree_repo_has_object(self_: *mut OstreeRepo, objtype: OstreeObjectType, checksum: *const c_char, out_have_object: *mut gboolean, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2017_12", feature = "dox"))]
pub fn ostree_repo_hash(self_: *mut OstreeRepo) -> c_uint;
pub fn ostree_repo_import_archive_to_mtree(self_: *mut OstreeRepo, opts: *mut OstreeRepoImportArchiveOptions, archive: *mut c_void, mtree: *mut OstreeMutableTree, modifier: *mut OstreeRepoCommitModifier, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_import_object_from(self_: *mut OstreeRepo, source: *mut OstreeRepo, objtype: OstreeObjectType, checksum: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
pub fn ostree_repo_import_object_from_with_trust(self_: *mut OstreeRepo, source: *mut OstreeRepo, objtype: OstreeObjectType, checksum: *const c_char, trusted: gboolean, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_is_system(repo: *mut OstreeRepo) -> gboolean;
pub fn ostree_repo_is_writable(self_: *mut OstreeRepo, error: *mut *mut glib::GError) -> gboolean;
@ -1181,6 +1211,7 @@ extern "C" {
pub fn ostree_repo_list_commit_objects_starting_with(self_: *mut OstreeRepo, start: *const c_char, out_commits: *mut *mut glib::GHashTable, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_list_objects(self_: *mut OstreeRepo, flags: OstreeRepoListObjectsFlags, out_objects: *mut *mut glib::GHashTable, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_list_refs(self_: *mut OstreeRepo, refspec_prefix: *const c_char, out_all_refs: *mut *mut glib::GHashTable, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_4", feature = "dox"))]
pub fn ostree_repo_list_refs_ext(self_: *mut OstreeRepo, refspec_prefix: *const c_char, out_all_refs: *mut *mut glib::GHashTable, flags: OstreeRepoListRefsExtFlags, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_list_static_delta_names(self_: *mut OstreeRepo, out_deltas: *mut *mut glib::GPtrArray, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2015_7", feature = "dox"))]
@ -1194,6 +1225,7 @@ extern "C" {
pub fn ostree_repo_open(self_: *mut OstreeRepo, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_prepare_transaction(self_: *mut OstreeRepo, out_transaction_resume: *mut gboolean, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_prune(self_: *mut OstreeRepo, flags: OstreeRepoPruneFlags, depth: c_int, out_objects_total: *mut c_int, out_objects_pruned: *mut c_int, out_pruned_object_size_total: *mut u64, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2017_1", feature = "dox"))]
pub fn ostree_repo_prune_from_reachable(self_: *mut OstreeRepo, options: *mut OstreeRepoPruneOptions, out_objects_total: *mut c_int, out_objects_pruned: *mut c_int, out_pruned_object_size_total: *mut u64, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_prune_static_deltas(self_: *mut OstreeRepo, commit: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_pull(self_: *mut OstreeRepo, remote_name: *const c_char, refs_to_fetch: *mut *mut c_char, flags: OstreeRepoPullFlags, progress: *mut OstreeAsyncProgress, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
@ -1207,11 +1239,13 @@ extern "C" {
pub fn ostree_repo_read_commit(self_: *mut OstreeRepo, ref_: *const c_char, out_root: *mut *mut gio::GFile, out_commit: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_read_commit_detached_metadata(self_: *mut OstreeRepo, checksum: *const c_char, out_metadata: *mut *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_regenerate_summary(self_: *mut OstreeRepo, additional_metadata: *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2017_2", feature = "dox"))]
pub fn ostree_repo_reload_config(self_: *mut OstreeRepo, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_remote_add(self_: *mut OstreeRepo, name: *const c_char, url: *const c_char, options: *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_remote_change(self_: *mut OstreeRepo, sysroot: *mut gio::GFile, changeop: OstreeRepoRemoteChange, name: *const c_char, url: *const c_char, options: *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_remote_delete(self_: *mut OstreeRepo, name: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_remote_fetch_summary(self_: *mut OstreeRepo, name: *const c_char, out_summary: *mut *mut glib::GBytes, out_signatures: *mut *mut glib::GBytes, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_6", feature = "dox"))]
pub fn ostree_repo_remote_fetch_summary_with_options(self_: *mut OstreeRepo, name: *const c_char, options: *mut glib::GVariant, out_summary: *mut *mut glib::GBytes, out_signatures: *mut *mut glib::GBytes, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_remote_get_gpg_verify(self_: *mut OstreeRepo, name: *const c_char, out_gpg_verify: *mut gboolean, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_remote_get_gpg_verify_summary(self_: *mut OstreeRepo, name: *const c_char, out_gpg_verify_summary: *mut gboolean, error: *mut *mut glib::GError) -> gboolean;
@ -1226,9 +1260,12 @@ extern "C" {
#[cfg(any(feature = "v2018_6", feature = "dox"))]
pub fn ostree_repo_resolve_keyring_for_collection(self_: *mut OstreeRepo, collection_id: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeRemote;
pub fn ostree_repo_resolve_rev(self_: *mut OstreeRepo, refspec: *const c_char, allow_noent: gboolean, out_rev: *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_7", feature = "dox"))]
pub fn ostree_repo_resolve_rev_ext(self_: *mut OstreeRepo, refspec: *const c_char, allow_noent: gboolean, flags: OstreeRepoResolveRevExtFlags, out_rev: *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_scan_hardlinks(self_: *mut OstreeRepo, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2017_10", feature = "dox"))]
pub fn ostree_repo_set_alias_ref_immediate(self_: *mut OstreeRepo, remote: *const c_char, ref_: *const c_char, target: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
pub fn ostree_repo_set_cache_dir(self_: *mut OstreeRepo, dfd: c_int, path: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
pub fn ostree_repo_set_collection_id(self_: *mut OstreeRepo, collection_id: *const c_char, error: *mut *mut glib::GError) -> gboolean;
@ -1252,6 +1289,7 @@ extern "C" {
pub fn ostree_repo_traverse_reachable_refs(self_: *mut OstreeRepo, depth: c_uint, reachable: *mut glib::GHashTable, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_verify_commit(self_: *mut OstreeRepo, commit_checksum: *const c_char, keyringdir: *mut gio::GFile, extra_keyring: *mut gio::GFile, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_repo_verify_commit_ext(self_: *mut OstreeRepo, commit_checksum: *const c_char, keyringdir: *mut gio::GFile, extra_keyring: *mut gio::GFile, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeGpgVerifyResult;
#[cfg(any(feature = "v2016_14", feature = "dox"))]
pub fn ostree_repo_verify_commit_for_remote(self_: *mut OstreeRepo, commit_checksum: *const c_char, remote_name: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeGpgVerifyResult;
pub fn ostree_repo_verify_summary(self_: *mut OstreeRepo, remote_name: *const c_char, summary: *mut glib::GBytes, signatures: *mut glib::GBytes, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeGpgVerifyResult;
pub fn ostree_repo_write_archive_to_mtree(self_: *mut OstreeRepo, archive: *mut gio::GFile, mtree: *mut OstreeMutableTree, modifier: *mut OstreeRepoCommitModifier, autocreate_parents: gboolean, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
@ -1327,8 +1365,10 @@ extern "C" {
//=========================================================================
pub fn ostree_sepolicy_get_type() -> GType;
pub fn ostree_sepolicy_new(path: *mut gio::GFile, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeSePolicy;
#[cfg(any(feature = "v2017_4", feature = "dox"))]
pub fn ostree_sepolicy_new_at(rootfs_dfd: c_int, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeSePolicy;
pub fn ostree_sepolicy_fscreatecon_cleanup(unused: *mut *mut c_void);
#[cfg(any(feature = "v2016_5", feature = "dox"))]
pub fn ostree_sepolicy_get_csum(self_: *mut OstreeSePolicy) -> *const c_char;
pub fn ostree_sepolicy_get_label(self_: *mut OstreeSePolicy, relpath: *const c_char, unix_mode: u32, out_label: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_sepolicy_get_name(self_: *mut OstreeSePolicy) -> *const c_char;
@ -1351,6 +1391,7 @@ extern "C" {
pub fn ostree_sysroot_deployment_set_mutable(self_: *mut OstreeSysroot, deployment: *mut OstreeDeployment, is_mutable: gboolean, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2018_3", feature = "dox"))]
pub fn ostree_sysroot_deployment_set_pinned(self_: *mut OstreeSysroot, deployment: *mut OstreeDeployment, is_pinned: gboolean, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_4", feature = "dox"))]
pub fn ostree_sysroot_deployment_unlock(self_: *mut OstreeSysroot, deployment: *mut OstreeDeployment, unlocked_state: OstreeDeploymentUnlockedState, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_sysroot_ensure_initialized(self_: *mut OstreeSysroot, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_sysroot_get_booted_deployment(self_: *mut OstreeSysroot) -> *mut OstreeDeployment;
@ -1362,10 +1403,13 @@ extern "C" {
pub fn ostree_sysroot_get_merge_deployment(self_: *mut OstreeSysroot, osname: *const c_char) -> *mut OstreeDeployment;
pub fn ostree_sysroot_get_path(self_: *mut OstreeSysroot) -> *mut gio::GFile;
pub fn ostree_sysroot_get_repo(self_: *mut OstreeSysroot, out_repo: *mut *mut OstreeRepo, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2018_5", feature = "dox"))]
pub fn ostree_sysroot_get_staged_deployment(self_: *mut OstreeSysroot) -> *mut OstreeDeployment;
pub fn ostree_sysroot_get_subbootversion(self_: *mut OstreeSysroot) -> c_int;
#[cfg(any(feature = "v2016_4", feature = "dox"))]
pub fn ostree_sysroot_init_osname(self_: *mut OstreeSysroot, osname: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_sysroot_load(self_: *mut OstreeSysroot, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_4", feature = "dox"))]
pub fn ostree_sysroot_load_if_changed(self_: *mut OstreeSysroot, out_changed: *mut gboolean, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_sysroot_lock(self_: *mut OstreeSysroot, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_sysroot_lock_async(self_: *mut OstreeSysroot, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer);
@ -1374,13 +1418,16 @@ extern "C" {
pub fn ostree_sysroot_prepare_cleanup(self_: *mut OstreeSysroot, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2017_7", feature = "dox"))]
pub fn ostree_sysroot_query_deployments_for(self_: *mut OstreeSysroot, osname: *const c_char, out_pending: *mut *mut OstreeDeployment, out_rollback: *mut *mut OstreeDeployment);
#[cfg(any(feature = "v2017_7", feature = "dox"))]
pub fn ostree_sysroot_repo(self_: *mut OstreeSysroot) -> *mut OstreeRepo;
pub fn ostree_sysroot_simple_write_deployment(sysroot: *mut OstreeSysroot, osname: *const c_char, new_deployment: *mut OstreeDeployment, merge_deployment: *mut OstreeDeployment, flags: OstreeSysrootSimpleWriteDeploymentFlags, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2018_5", feature = "dox"))]
pub fn ostree_sysroot_stage_tree(self_: *mut OstreeSysroot, osname: *const c_char, revision: *const c_char, origin: *mut glib::GKeyFile, merge_deployment: *mut OstreeDeployment, override_kernel_argv: *mut *mut c_char, out_new_deployment: *mut *mut OstreeDeployment, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_sysroot_try_lock(self_: *mut OstreeSysroot, out_acquired: *mut gboolean, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_sysroot_unload(self_: *mut OstreeSysroot);
pub fn ostree_sysroot_unlock(self_: *mut OstreeSysroot);
pub fn ostree_sysroot_write_deployments(self_: *mut OstreeSysroot, new_deployments: *mut glib::GPtrArray, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2017_4", feature = "dox"))]
pub fn ostree_sysroot_write_deployments_with_options(self_: *mut OstreeSysroot, new_deployments: *mut glib::GPtrArray, opts: *mut OstreeSysrootWriteDeploymentsOpts, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_sysroot_write_origin_file(sysroot: *mut OstreeSysroot, deployment: *mut OstreeDeployment, new_origin: *mut glib::GKeyFile, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
@ -1418,10 +1465,13 @@ extern "C" {
//=========================================================================
#[cfg(any(feature = "v2017_15", feature = "dox"))]
pub fn ostree_break_hardlink(dfd: c_int, path: *const c_char, skip_xattrs: gboolean, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2017_4", feature = "dox"))]
pub fn ostree_check_version(required_year: c_uint, required_release: c_uint) -> gboolean;
#[cfg(any(feature = "v2016_8", feature = "dox"))]
pub fn ostree_checksum_b64_from_bytes(csum: *mut [u8; 32]) -> *mut c_char;
pub fn ostree_checksum_b64_inplace_from_bytes(csum: *mut [u8; 32], buf: *mut c_char);
pub fn ostree_checksum_b64_inplace_to_bytes(checksum: *mut [c_char; 32], buf: *mut u8);
#[cfg(any(feature = "v2016_8", feature = "dox"))]
pub fn ostree_checksum_b64_to_bytes(checksum: *const c_char) -> *mut [u8; 32];
pub fn ostree_checksum_bytes_peek(bytes: *mut glib::GVariant) -> *mut [u8; 32];
pub fn ostree_checksum_bytes_peek_validate(bytes: *mut glib::GVariant, error: *mut *mut glib::GError) -> *mut [u8; 32];
@ -1439,6 +1489,7 @@ extern "C" {
pub fn ostree_checksum_to_bytes_v(checksum: *const c_char) -> *mut glib::GVariant;
//pub fn ostree_cmd__private__() -> /*Ignored*/*const OstreeCmdPrivateVTable;
pub fn ostree_cmp_checksum_bytes(a: *const u8, b: *const u8) -> c_int;
#[cfg(any(feature = "v2018_2", feature = "dox"))]
pub fn ostree_commit_get_content_checksum(commit_variant: *mut glib::GVariant) -> *mut c_char;
pub fn ostree_commit_get_parent(commit_variant: *mut glib::GVariant) -> *mut c_char;
pub fn ostree_commit_get_timestamp(commit_variant: *mut glib::GVariant) -> u64;
@ -1447,8 +1498,10 @@ extern "C" {
pub fn ostree_content_stream_parse(compressed: gboolean, input: *mut gio::GInputStream, input_length: u64, trusted: gboolean, out_input: *mut *mut gio::GInputStream, out_file_info: *mut *mut gio::GFileInfo, out_xattrs: *mut *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_create_directory_metadata(dir_info: *mut gio::GFileInfo, xattrs: *mut glib::GVariant) -> *mut glib::GVariant;
pub fn ostree_diff_dirs(flags: OstreeDiffFlags, a: *mut gio::GFile, b: *mut gio::GFile, modified: *mut glib::GPtrArray, removed: *mut glib::GPtrArray, added: *mut glib::GPtrArray, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2017_4", feature = "dox"))]
pub fn ostree_diff_dirs_with_options(flags: OstreeDiffFlags, a: *mut gio::GFile, b: *mut gio::GFile, modified: *mut glib::GPtrArray, removed: *mut glib::GPtrArray, added: *mut glib::GPtrArray, options: *mut OstreeDiffDirsOptions, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
pub fn ostree_diff_print(a: *mut gio::GFile, b: *mut gio::GFile, modified: *mut glib::GPtrArray, removed: *mut glib::GPtrArray, added: *mut glib::GPtrArray);
#[cfg(any(feature = "v2017_10", feature = "dox"))]
pub fn ostree_gpg_error_quark() -> glib::GQuark;
pub fn ostree_hash_object_name(a: gconstpointer) -> c_uint;
pub fn ostree_metadata_variant_type(objtype: OstreeObjectType) -> *const glib::GVariantType;
@ -1459,6 +1512,7 @@ extern "C" {
pub fn ostree_object_type_from_string(str: *const c_char) -> OstreeObjectType;
pub fn ostree_object_type_to_string(objtype: OstreeObjectType) -> *const c_char;
pub fn ostree_parse_refspec(refspec: *const c_char, out_remote: *mut *mut c_char, out_ref: *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2016_6", feature = "dox"))]
pub fn ostree_raw_file_to_archive_z2_stream(input: *mut gio::GInputStream, file_info: *mut gio::GFileInfo, xattrs: *mut glib::GVariant, out_input: *mut *mut gio::GInputStream, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;
#[cfg(any(feature = "v2017_3", feature = "dox"))]
pub fn ostree_raw_file_to_archive_z2_stream_with_options(input: *mut gio::GInputStream, file_info: *mut gio::GFileInfo, xattrs: *mut glib::GVariant, options: *mut glib::GVariant, out_input: *mut *mut gio::GInputStream, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean;

View File

@ -316,6 +316,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT", "0"),
("OSTREE_MAX_METADATA_SIZE", "10485760"),
("OSTREE_MAX_METADATA_WARN_SIZE", "7340032"),
("OSTREE_META_KEY_DEPLOY_COLLECTION_ID", "ostree.deploy-collection-id"),
("OSTREE_OBJECT_TYPE_COMMIT", "4"),
("OSTREE_OBJECT_TYPE_COMMIT_META", "6"),
("OSTREE_OBJECT_TYPE_DIR_META", "3"),
@ -353,6 +354,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("OSTREE_REPO_LIST_OBJECTS_NO_PARENTS", "8"),
("OSTREE_REPO_LIST_OBJECTS_PACKED", "2"),
("OSTREE_REPO_LIST_REFS_EXT_ALIASES", "1"),
("OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS", "4"),
("OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES", "2"),
("OSTREE_REPO_LIST_REFS_EXT_NONE", "0"),
("OSTREE_REPO_METADATA_REF", "ostree-metadata"),
@ -374,6 +376,8 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS", "1"),
("OSTREE_REPO_REMOTE_CHANGE_DELETE", "2"),
("OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS", "3"),
("OSTREE_REPO_REMOTE_CHANGE_REPLACE", "4"),
("OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY", "1"),
("OSTREE_REPO_RESOLVE_REV_EXT_NONE", "0"),
("OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL", "1"),
("OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING", "2"),

View File

@ -1,2 +1,9 @@
// Feel free to edit this file, it won't be regenerated by gir generator unless removed.
#include <ostree.h>
// hack to build and test on versions of libostree < 2019.2
#if !OSTREE_CHECK_VERSION(2019, 2)
# define OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS 4
# define OSTREE_REPO_REMOTE_CHANGE_REPLACE 4
# define OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY 1
#endif