From 03abeebb89ed991b0f0aba7839ce2cdf8b03e94c Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Sat, 29 Sep 2018 15:24:41 +0200 Subject: [PATCH] Add initial gir output --- rust-bindings/rust/.gitignore | 1 + rust-bindings/rust/libostree-sys/Cargo.lock | 103 + rust-bindings/rust/libostree-sys/Cargo.toml | 39 + rust-bindings/rust/libostree-sys/build.rs | 96 + rust-bindings/rust/libostree-sys/src/lib.rs | 1671 +++++++++++++++++ rust-bindings/rust/libostree-sys/tests/abi.rs | 415 ++++ .../rust/libostree-sys/tests/constant.c | 27 + .../rust/libostree-sys/tests/layout.c | 12 + .../rust/libostree-sys/tests/manual.h | 2 + 9 files changed, 2366 insertions(+) create mode 100644 rust-bindings/rust/libostree-sys/Cargo.lock create mode 100644 rust-bindings/rust/libostree-sys/Cargo.toml create mode 100644 rust-bindings/rust/libostree-sys/build.rs create mode 100644 rust-bindings/rust/libostree-sys/src/lib.rs create mode 100644 rust-bindings/rust/libostree-sys/tests/abi.rs create mode 100644 rust-bindings/rust/libostree-sys/tests/constant.c create mode 100644 rust-bindings/rust/libostree-sys/tests/layout.c create mode 100644 rust-bindings/rust/libostree-sys/tests/manual.h diff --git a/rust-bindings/rust/.gitignore b/rust-bindings/rust/.gitignore index a09c56df..8899eafb 100644 --- a/rust-bindings/rust/.gitignore +++ b/rust-bindings/rust/.gitignore @@ -1 +1,2 @@ /.idea +/*/target diff --git a/rust-bindings/rust/libostree-sys/Cargo.lock b/rust-bindings/rust/libostree-sys/Cargo.lock new file mode 100644 index 00000000..c812448a --- /dev/null +++ b/rust-bindings/rust/libostree-sys/Cargo.lock @@ -0,0 +1,103 @@ +[[package]] +name = "bitflags" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "libc" +version = "0.2.43" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "os-tree-sys" +version = "0.2.0" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "shell-words 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pkg-config" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rand" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "remove_dir_all" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "shell-words" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "tempdir" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[metadata] +"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" +"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" +"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" +"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" +"checksum shell-words 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39acde55a154c4cd3ae048ac78cc21c25f3a0145e44111b523279113dce0d94a" +"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" +"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/rust-bindings/rust/libostree-sys/Cargo.toml b/rust-bindings/rust/libostree-sys/Cargo.toml new file mode 100644 index 00000000..d215800d --- /dev/null +++ b/rust-bindings/rust/libostree-sys/Cargo.toml @@ -0,0 +1,39 @@ +[build-dependencies] +pkg-config = "0.3.7" + +[dependencies] +libc = "0.2" + +[dev-dependencies] +shell-words = "0.1.0" +tempdir = "0.3" + +[features] +dox = [] +v2014_9 = [] +v2015_7 = ["v2014_9"] +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_4 = ["v2017_3"] +v2017_6 = ["v2017_4"] +v2017_7 = ["v2017_6"] +v2017_8 = ["v2017_7"] +v2017_9 = ["v2017_8"] +v2018_2 = ["v2017_15"] +v2018_3 = ["v2018_2"] +v2018_5 = ["v2018_3"] +v2018_6 = ["v2018_5"] +v2018_7 = ["v2018_6"] + +[lib] +name = "os_tree_sys" + +[package] +build = "build.rs" +links = "os_tree" +name = "os-tree-sys" +version = "0.2.0" diff --git a/rust-bindings/rust/libostree-sys/build.rs b/rust-bindings/rust/libostree-sys/build.rs new file mode 100644 index 00000000..ba199e44 --- /dev/null +++ b/rust-bindings/rust/libostree-sys/build.rs @@ -0,0 +1,96 @@ +extern crate pkg_config; + +use pkg_config::{Config, Error}; +use std::env; +use std::io::prelude::*; +use std::io; +use std::process; + +fn main() { + if let Err(s) = find() { + let _ = writeln!(io::stderr(), "{}", s); + process::exit(1); + } +} + +fn find() -> Result<(), Error> { + let package_name = "ostree-1"; + let shared_libs = ["ostree-1"]; + let version = if cfg!(feature = "v2018_7") { + "2018.7" + } else if cfg!(feature = "v2018_6") { + "2018.6" + } else if cfg!(feature = "v2018_5") { + "2018.5" + } else if cfg!(feature = "v2018_3") { + "2018.3" + } else if cfg!(feature = "v2018_2") { + "2018.2" + } else if cfg!(feature = "v2017_15") { + "2017.15" + } else if cfg!(feature = "v2017_13") { + "2017.13" + } else if cfg!(feature = "v2017_12") { + "2017.12" + } else if cfg!(feature = "v2017_11") { + "2017.11" + } else if cfg!(feature = "v2017_10") { + "2017.10" + } else if cfg!(feature = "v2017_9") { + "2017.9" + } else if cfg!(feature = "v2017_8") { + "2017.8" + } else if cfg!(feature = "v2017_7") { + "2017.7" + } else if cfg!(feature = "v2017_6") { + "2017.6" + } else if cfg!(feature = "v2017_4") { + "2017.4" + } else if cfg!(feature = "v2017_3") { + "2017.3" + } else if cfg!(feature = "v2015_7") { + "2015.7" + } else { + "0.0" + }; + + if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + println!("cargo:rustc-link-search=native={}", lib_dir); + return Ok(()) + } + + let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); + let hardcode_shared_libs = target.contains("windows"); + + let mut config = Config::new(); + config.atleast_version(version); + config.print_system_libs(false); + if hardcode_shared_libs { + config.cargo_metadata(false); + } + match config.probe(package_name) { + Ok(library) => { + if hardcode_shared_libs { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + for path in library.link_paths.iter() { + println!("cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist")); + } + } + Ok(()) + } + Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + Ok(()) + } + Err(err) => Err(err), + } +} + diff --git a/rust-bindings/rust/libostree-sys/src/lib.rs b/rust-bindings/rust/libostree-sys/src/lib.rs new file mode 100644 index 00000000..9986c8d1 --- /dev/null +++ b/rust-bindings/rust/libostree-sys/src/lib.rs @@ -0,0 +1,1671 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ c385982) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![cfg_attr(feature = "cargo-clippy", allow(approx_constant, type_complexity, unreadable_literal))] + +extern crate libc; + +#[allow(unused_imports)] +use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, + c_short, c_ushort, c_long, c_ulong, + c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Aliases +pub type OstreeCollectionRefv = *mut *mut OstreeCollectionRef; +pub type OstreeRepoFinderResultv = *mut *mut OstreeRepoFinderResult; + +// Enums +pub type OstreeDeploymentUnlockedState = c_int; +pub const OSTREE_DEPLOYMENT_UNLOCKED_NONE: OstreeDeploymentUnlockedState = 0; +pub const OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT: OstreeDeploymentUnlockedState = 1; +pub const OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX: OstreeDeploymentUnlockedState = 2; + +pub type OstreeGpgError = c_int; +pub const OSTREE_GPG_ERROR_NO_SIGNATURE: OstreeGpgError = 0; +pub const OSTREE_GPG_ERROR_INVALID_SIGNATURE: OstreeGpgError = 1; +pub const OSTREE_GPG_ERROR_MISSING_KEY: OstreeGpgError = 2; + +pub type OstreeGpgSignatureAttr = c_int; +pub const OSTREE_GPG_SIGNATURE_ATTR_VALID: OstreeGpgSignatureAttr = 0; +pub const OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED: OstreeGpgSignatureAttr = 1; +pub const OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED: OstreeGpgSignatureAttr = 2; +pub const OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED: OstreeGpgSignatureAttr = 3; +pub const OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING: OstreeGpgSignatureAttr = 4; +pub const OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT: OstreeGpgSignatureAttr = 5; +pub const OSTREE_GPG_SIGNATURE_ATTR_TIMESTAMP: OstreeGpgSignatureAttr = 6; +pub const OSTREE_GPG_SIGNATURE_ATTR_EXP_TIMESTAMP: OstreeGpgSignatureAttr = 7; +pub const OSTREE_GPG_SIGNATURE_ATTR_PUBKEY_ALGO_NAME: OstreeGpgSignatureAttr = 8; +pub const OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME: OstreeGpgSignatureAttr = 9; +pub const OSTREE_GPG_SIGNATURE_ATTR_USER_NAME: OstreeGpgSignatureAttr = 10; +pub const OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL: OstreeGpgSignatureAttr = 11; +pub const OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY: OstreeGpgSignatureAttr = 12; + +pub type GpgSignatureFormatFlags = c_int; +pub const OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT: GpgSignatureFormatFlags = 0; +pub type OstreeGpgSignatureFormatFlags = GpgSignatureFormatFlags; + +pub type OstreeObjectType = c_int; +pub const OSTREE_OBJECT_TYPE_FILE: OstreeObjectType = 1; +pub const OSTREE_OBJECT_TYPE_DIR_TREE: OstreeObjectType = 2; +pub const OSTREE_OBJECT_TYPE_DIR_META: OstreeObjectType = 3; +pub const OSTREE_OBJECT_TYPE_COMMIT: OstreeObjectType = 4; +pub const OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT: OstreeObjectType = 5; +pub const OSTREE_OBJECT_TYPE_COMMIT_META: OstreeObjectType = 6; +pub const OSTREE_OBJECT_TYPE_PAYLOAD_LINK: OstreeObjectType = 7; + +pub type OstreeRepoCheckoutFilterResult = c_int; +pub const OSTREE_REPO_CHECKOUT_FILTER_ALLOW: OstreeRepoCheckoutFilterResult = 0; +pub const OSTREE_REPO_CHECKOUT_FILTER_SKIP: OstreeRepoCheckoutFilterResult = 1; + +pub type OstreeRepoCheckoutMode = c_int; +pub const OSTREE_REPO_CHECKOUT_MODE_NONE: OstreeRepoCheckoutMode = 0; +pub const OSTREE_REPO_CHECKOUT_MODE_USER: OstreeRepoCheckoutMode = 1; + +pub type OstreeRepoCheckoutOverwriteMode = c_int; +pub const OSTREE_REPO_CHECKOUT_OVERWRITE_NONE: OstreeRepoCheckoutOverwriteMode = 0; +pub const OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES: OstreeRepoCheckoutOverwriteMode = 1; +pub const OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES: OstreeRepoCheckoutOverwriteMode = 2; +pub const OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL: OstreeRepoCheckoutOverwriteMode = 3; + +pub type OstreeRepoCommitFilterResult = c_int; +pub const OSTREE_REPO_COMMIT_FILTER_ALLOW: OstreeRepoCommitFilterResult = 0; +pub const OSTREE_REPO_COMMIT_FILTER_SKIP: OstreeRepoCommitFilterResult = 1; + +pub type OstreeRepoCommitIterResult = c_int; +pub const OSTREE_REPO_COMMIT_ITER_RESULT_ERROR: OstreeRepoCommitIterResult = 0; +pub const OSTREE_REPO_COMMIT_ITER_RESULT_END: OstreeRepoCommitIterResult = 1; +pub const OSTREE_REPO_COMMIT_ITER_RESULT_FILE: OstreeRepoCommitIterResult = 2; +pub const OSTREE_REPO_COMMIT_ITER_RESULT_DIR: OstreeRepoCommitIterResult = 3; + +pub type OstreeRepoMode = c_int; +pub const OSTREE_REPO_MODE_BARE: OstreeRepoMode = 0; +pub const OSTREE_REPO_MODE_ARCHIVE: OstreeRepoMode = 1; +pub const OSTREE_REPO_MODE_BARE_USER: OstreeRepoMode = 2; +pub const OSTREE_REPO_MODE_BARE_USER_ONLY: OstreeRepoMode = 3; + +pub type OstreeRepoPruneFlags = c_int; +pub const OSTREE_REPO_PRUNE_FLAGS_NONE: OstreeRepoPruneFlags = 0; +pub const OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE: OstreeRepoPruneFlags = 1; +pub const OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY: OstreeRepoPruneFlags = 2; + +pub type OstreeRepoRemoteChange = c_int; +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 type OstreeStaticDeltaGenerateOpt = c_int; +pub const OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY: OstreeStaticDeltaGenerateOpt = 0; +pub const OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR: OstreeStaticDeltaGenerateOpt = 1; + +// Constants +pub const OSTREE_COMMIT_GVARIANT_STRING: *const c_char = b"(a{sv}aya(say)sstayay)\0" as *const u8 as *const c_char; +pub const OSTREE_COMMIT_META_KEY_COLLECTION_BINDING: *const c_char = b"ostree.collection-binding\0" as *const u8 as *const c_char; +pub const OSTREE_COMMIT_META_KEY_ENDOFLIFE: *const c_char = b"ostree.endoflife\0" as *const u8 as *const c_char; +pub const OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE: *const c_char = b"ostree.endoflife-rebase\0" as *const u8 as *const c_char; +pub const OSTREE_COMMIT_META_KEY_REF_BINDING: *const c_char = b"ostree.ref-binding\0" as *const u8 as *const c_char; +pub const OSTREE_COMMIT_META_KEY_SOURCE_TITLE: *const c_char = b"ostree.source-title\0" as *const u8 as *const c_char; +pub const OSTREE_COMMIT_META_KEY_VERSION: *const c_char = b"version\0" as *const u8 as *const c_char; +pub const OSTREE_DIRMETA_GVARIANT_STRING: *const c_char = b"(uuua(ayay))\0" as *const u8 as *const c_char; +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_ORIGIN_TRANSIENT_GROUP: *const c_char = b"libostree-transient\0" as *const u8 as *const c_char; +pub const OSTREE_RELEASE_VERSION: c_int = 8; +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; +pub const OSTREE_SHA256_STRING_LEN: c_int = 64; +pub const OSTREE_SUMMARY_GVARIANT_STRING: *const c_char = b"(a(s(taya{sv}))a{sv})\0" as *const u8 as *const c_char; +pub const OSTREE_SUMMARY_SIG_GVARIANT_STRING: *const c_char = b"a{sv}\0" as *const u8 as *const c_char; +pub const OSTREE_TIMESTAMP: c_int = 0; +pub const OSTREE_TREE_GVARIANT_STRING: *const c_char = b"(a(say)a(sayay))\0" as *const u8 as *const c_char; +pub const OSTREE_VERSION: c_double = 2018.800000; +pub const OSTREE_VERSION_S: *const c_char = b"2018.8\0" as *const u8 as *const c_char; +pub const OSTREE_YEAR_VERSION: c_int = 2018; + +// Flags +pub type OstreeChecksumFlags = c_uint; +pub const OSTREE_CHECKSUM_FLAGS_NONE: OstreeChecksumFlags = 0; +pub const OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS: OstreeChecksumFlags = 1; + +pub type OstreeDiffFlags = c_uint; +pub const OSTREE_DIFF_FLAGS_NONE: OstreeDiffFlags = 0; +pub const OSTREE_DIFF_FLAGS_IGNORE_XATTRS: OstreeDiffFlags = 1; + +pub type OstreeRepoCommitModifierFlags = c_uint; +pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE: OstreeRepoCommitModifierFlags = 0; +pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS: OstreeRepoCommitModifierFlags = 1; +pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES: OstreeRepoCommitModifierFlags = 2; +pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS: OstreeRepoCommitModifierFlags = 4; +pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED: OstreeRepoCommitModifierFlags = 8; +pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME: OstreeRepoCommitModifierFlags = 16; +pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL: OstreeRepoCommitModifierFlags = 32; + +pub type OstreeRepoCommitState = c_uint; +pub const OSTREE_REPO_COMMIT_STATE_NORMAL: OstreeRepoCommitState = 0; +pub const OSTREE_REPO_COMMIT_STATE_PARTIAL: OstreeRepoCommitState = 1; + +pub type OstreeRepoCommitTraverseFlags = c_uint; +pub const OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE: OstreeRepoCommitTraverseFlags = 1; + +pub type OstreeRepoListObjectsFlags = c_uint; +pub const OSTREE_REPO_LIST_OBJECTS_LOOSE: OstreeRepoListObjectsFlags = 1; +pub const OSTREE_REPO_LIST_OBJECTS_PACKED: OstreeRepoListObjectsFlags = 2; +pub const OSTREE_REPO_LIST_OBJECTS_ALL: OstreeRepoListObjectsFlags = 4; +pub const OSTREE_REPO_LIST_OBJECTS_NO_PARENTS: OstreeRepoListObjectsFlags = 8; + +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 type OstreeRepoPullFlags = c_uint; +pub const OSTREE_REPO_PULL_FLAGS_NONE: OstreeRepoPullFlags = 0; +pub const OSTREE_REPO_PULL_FLAGS_MIRROR: OstreeRepoPullFlags = 1; +pub const OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY: OstreeRepoPullFlags = 2; +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 OstreeSePolicyRestoreconFlags = c_uint; +pub const OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE: OstreeSePolicyRestoreconFlags = 0; +pub const OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL: OstreeSePolicyRestoreconFlags = 1; +pub const OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING: OstreeSePolicyRestoreconFlags = 2; + +pub type OstreeSysrootSimpleWriteDeploymentFlags = c_uint; +pub const OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE: OstreeSysrootSimpleWriteDeploymentFlags = 0; +pub const OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN: OstreeSysrootSimpleWriteDeploymentFlags = 1; +pub const OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT: OstreeSysrootSimpleWriteDeploymentFlags = 2; +pub const OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN: OstreeSysrootSimpleWriteDeploymentFlags = 4; +pub const OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_PENDING: OstreeSysrootSimpleWriteDeploymentFlags = 8; +pub const OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_ROLLBACK: OstreeSysrootSimpleWriteDeploymentFlags = 16; + +pub type OstreeSysrootUpgraderFlags = c_uint; +pub const OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED: OstreeSysrootUpgraderFlags = 2; + +pub type OstreeSysrootUpgraderPullFlags = c_uint; +pub const OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE: OstreeSysrootUpgraderPullFlags = 0; +pub const OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER: OstreeSysrootUpgraderPullFlags = 1; +pub const OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC: OstreeSysrootUpgraderPullFlags = 2; + +// Callbacks +pub type OstreeRepoCheckoutFilter = Option OstreeRepoCheckoutFilterResult>; +pub type OstreeRepoCommitFilter = Option OstreeRepoCommitFilterResult>; +pub type OstreeRepoCommitModifierXattrCallback = Option *mut glib::GVariant>; +pub type OstreeRepoImportArchiveTranslatePathname = Option *mut c_char>; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeAsyncProgressClass { + pub parent_class: gobject::GObjectClass, + pub changed: Option, +} + +impl ::std::fmt::Debug for OstreeAsyncProgressClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeAsyncProgressClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("changed", &self.changed) + .finish() + } +} + +#[repr(C)] +pub struct OstreeBootloader(c_void); + +impl ::std::fmt::Debug for OstreeBootloader { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeBootloader @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeBootloaderGrub2(c_void); + +impl ::std::fmt::Debug for OstreeBootloaderGrub2 { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeBootloaderGrub2 @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeBootloaderInterface { + pub g_iface: gobject::GTypeInterface, + pub query: Option gboolean>, + pub get_name: Option *const c_char>, + pub write_config: Option gboolean>, + pub is_atomic: Option gboolean>, +} + +impl ::std::fmt::Debug for OstreeBootloaderInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeBootloaderInterface @ {:?}", self as *const _)) + .field("g_iface", &self.g_iface) + .field("query", &self.query) + .field("get_name", &self.get_name) + .field("write_config", &self.write_config) + .field("is_atomic", &self.is_atomic) + .finish() + } +} + +#[repr(C)] +pub struct OstreeBootloaderSyslinux(c_void); + +impl ::std::fmt::Debug for OstreeBootloaderSyslinux { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeBootloaderSyslinux @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeBootloaderUboot(c_void); + +impl ::std::fmt::Debug for OstreeBootloaderUboot { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeBootloaderUboot @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeChecksumInputStreamClass { + pub parent_class: gio::GFilterInputStreamClass, + pub _g_reserved1: Option, + pub _g_reserved2: Option, + pub _g_reserved3: Option, + pub _g_reserved4: Option, + pub _g_reserved5: Option, +} + +impl ::std::fmt::Debug for OstreeChecksumInputStreamClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeChecksumInputStreamClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_g_reserved1", &self._g_reserved1) + .field("_g_reserved2", &self._g_reserved2) + .field("_g_reserved3", &self._g_reserved3) + .field("_g_reserved4", &self._g_reserved4) + .field("_g_reserved5", &self._g_reserved5) + .finish() + } +} + +#[repr(C)] +pub struct OstreeChecksumInputStreamPrivate(c_void); + +impl ::std::fmt::Debug for OstreeChecksumInputStreamPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeChecksumInputStreamPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeCmdPrivateVTable { + pub ostree_system_generator: Option gboolean>, + pub ostree_generate_grub2_config: Option gboolean>, + pub ostree_static_delta_dump: Option gboolean>, + pub ostree_static_delta_query_exists: Option gboolean>, + pub ostree_static_delta_delete: Option gboolean>, + pub ostree_repo_verify_bindings: Option gboolean>, + pub ostree_finalize_staged: Option gboolean>, +} + +impl ::std::fmt::Debug for OstreeCmdPrivateVTable { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeCmdPrivateVTable @ {:?}", self as *const _)) + .field("ostree_system_generator", &self.ostree_system_generator) + .field("ostree_generate_grub2_config", &self.ostree_generate_grub2_config) + .field("ostree_static_delta_dump", &self.ostree_static_delta_dump) + .field("ostree_static_delta_query_exists", &self.ostree_static_delta_query_exists) + .field("ostree_static_delta_delete", &self.ostree_static_delta_delete) + .field("ostree_repo_verify_bindings", &self.ostree_repo_verify_bindings) + .field("ostree_finalize_staged", &self.ostree_finalize_staged) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeCollectionRef { + pub collection_id: *mut c_char, + pub ref_name: *mut c_char, +} + +impl ::std::fmt::Debug for OstreeCollectionRef { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeCollectionRef @ {:?}", self as *const _)) + .field("collection_id", &self.collection_id) + .field("ref_name", &self.ref_name) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeDiffDirsOptions { + pub owner_uid: c_int, + pub owner_gid: c_int, + pub devino_to_csum_cache: *mut OstreeRepoDevInoCache, + pub unused_bools: [gboolean; 7], + pub unused_ints: [c_int; 6], + pub unused_ptrs: [gpointer; 7], +} + +impl ::std::fmt::Debug for OstreeDiffDirsOptions { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeDiffDirsOptions @ {:?}", self as *const _)) + .field("owner_uid", &self.owner_uid) + .field("owner_gid", &self.owner_gid) + .field("devino_to_csum_cache", &self.devino_to_csum_cache) + .field("unused_bools", &self.unused_bools) + .field("unused_ints", &self.unused_ints) + .field("unused_ptrs", &self.unused_ptrs) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeDiffItem { + pub refcount: /*volatile*/c_int, + pub src: *mut gio::GFile, + pub target: *mut gio::GFile, + pub src_info: *mut gio::GFileInfo, + pub target_info: *mut gio::GFileInfo, + pub src_checksum: *mut c_char, + pub target_checksum: *mut c_char, +} + +impl ::std::fmt::Debug for OstreeDiffItem { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeDiffItem @ {:?}", self as *const _)) + .field("src", &self.src) + .field("target", &self.target) + .field("src_info", &self.src_info) + .field("target_info", &self.target_info) + .field("src_checksum", &self.src_checksum) + .field("target_checksum", &self.target_checksum) + .finish() + } +} + +#[repr(C)] +pub struct OstreeGpgVerifier(c_void); + +impl ::std::fmt::Debug for OstreeGpgVerifier { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeGpgVerifier @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeLibarchiveInputStream { + pub parent_instance: gio::GInputStream, + pub priv_: *mut OstreeLibarchiveInputStreamPrivate, +} + +impl ::std::fmt::Debug for OstreeLibarchiveInputStream { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeLibarchiveInputStream @ {:?}", self as *const _)) + .field("parent_instance", &self.parent_instance) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeLibarchiveInputStreamClass { + pub parent_class: gio::GInputStreamClass, + pub _g_reserved1: Option, + pub _g_reserved2: Option, + pub _g_reserved3: Option, + pub _g_reserved4: Option, + pub _g_reserved5: Option, +} + +impl ::std::fmt::Debug for OstreeLibarchiveInputStreamClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeLibarchiveInputStreamClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_g_reserved1", &self._g_reserved1) + .field("_g_reserved2", &self._g_reserved2) + .field("_g_reserved3", &self._g_reserved3) + .field("_g_reserved4", &self._g_reserved4) + .field("_g_reserved5", &self._g_reserved5) + .finish() + } +} + +#[repr(C)] +pub struct OstreeLibarchiveInputStreamPrivate(c_void); + +impl ::std::fmt::Debug for OstreeLibarchiveInputStreamPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeLibarchiveInputStreamPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeLzmaCompressor(c_void); + +impl ::std::fmt::Debug for OstreeLzmaCompressor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeLzmaCompressor @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeLzmaCompressorClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for OstreeLzmaCompressorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeLzmaCompressorClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct OstreeLzmaDecompressor(c_void); + +impl ::std::fmt::Debug for OstreeLzmaDecompressor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeLzmaDecompressor @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeLzmaDecompressorClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for OstreeLzmaDecompressorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeLzmaDecompressorClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeMutableTreeClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for OstreeMutableTreeClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeMutableTreeClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeMutableTreeIter { + pub in_files: gboolean, + pub iter: glib::GHashTableIter, +} + +impl ::std::fmt::Debug for OstreeMutableTreeIter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeMutableTreeIter @ {:?}", self as *const _)) + .field("in_files", &self.in_files) + .field("iter", &self.iter) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRemote(c_void); + +impl ::std::fmt::Debug for OstreeRemote { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRemote @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoCheckoutAtOptions { + pub mode: OstreeRepoCheckoutMode, + pub overwrite_mode: OstreeRepoCheckoutOverwriteMode, + pub enable_uncompressed_cache: gboolean, + pub enable_fsync: gboolean, + pub process_whiteouts: gboolean, + pub no_copy_fallback: gboolean, + pub force_copy: gboolean, + pub bareuseronly_dirs: gboolean, + pub unused_bools: [gboolean; 5], + pub subpath: *const c_char, + pub devino_to_csum_cache: *mut OstreeRepoDevInoCache, + pub unused_ints: [c_int; 6], + pub unused_ptrs: [gpointer; 3], + pub filter: OstreeRepoCheckoutFilter, + pub filter_user_data: gpointer, + pub sepolicy: *mut OstreeSePolicy, + pub sepolicy_prefix: *const c_char, +} + +impl ::std::fmt::Debug for OstreeRepoCheckoutAtOptions { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoCheckoutAtOptions @ {:?}", self as *const _)) + .field("mode", &self.mode) + .field("overwrite_mode", &self.overwrite_mode) + .field("enable_uncompressed_cache", &self.enable_uncompressed_cache) + .field("enable_fsync", &self.enable_fsync) + .field("process_whiteouts", &self.process_whiteouts) + .field("no_copy_fallback", &self.no_copy_fallback) + .field("force_copy", &self.force_copy) + .field("bareuseronly_dirs", &self.bareuseronly_dirs) + .field("unused_bools", &self.unused_bools) + .field("subpath", &self.subpath) + .field("devino_to_csum_cache", &self.devino_to_csum_cache) + .field("unused_ints", &self.unused_ints) + .field("unused_ptrs", &self.unused_ptrs) + .field("filter", &self.filter) + .field("filter_user_data", &self.filter_user_data) + .field("sepolicy", &self.sepolicy) + .field("sepolicy_prefix", &self.sepolicy_prefix) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepoCheckoutOptions { + pub mode: OstreeRepoCheckoutMode, + pub overwrite_mode: OstreeRepoCheckoutOverwriteMode, + _truncated_record_marker: c_void, + // /*Ignored*/field enable_uncompressed_cache has incomplete type +} + +impl ::std::fmt::Debug for OstreeRepoCheckoutOptions { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoCheckoutOptions @ {:?}", self as *const _)) + .field("mode", &self.mode) + .field("overwrite_mode", &self.overwrite_mode) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepoCommitModifier(c_void); + +impl ::std::fmt::Debug for OstreeRepoCommitModifier { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoCommitModifier @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoCommitTraverseIter { + pub initialized: gboolean, + pub dummy: [gpointer; 10], + pub dummy_checksum_data: [c_char; 130], +} + +impl ::std::fmt::Debug for OstreeRepoCommitTraverseIter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoCommitTraverseIter @ {:?}", self as *const _)) + .field("initialized", &self.initialized) + .field("dummy", &self.dummy) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepoDevInoCache(c_void); + +impl ::std::fmt::Debug for OstreeRepoDevInoCache { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoDevInoCache @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepoExportArchiveOptions { + _truncated_record_marker: c_void, + // /*Ignored*/field disable_xattrs has incomplete type +} + +impl ::std::fmt::Debug for OstreeRepoExportArchiveOptions { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoExportArchiveOptions @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoFileClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for OstreeRepoFileClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFileClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepoFileEnumerator(c_void); + +impl ::std::fmt::Debug for OstreeRepoFileEnumerator { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFileEnumerator @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoFileEnumeratorClass { + pub parent_class: gio::GFileEnumeratorClass, +} + +impl ::std::fmt::Debug for OstreeRepoFileEnumeratorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFileEnumeratorClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoFinderAvahiClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for OstreeRepoFinderAvahiClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFinderAvahiClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoFinderConfigClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for OstreeRepoFinderConfigClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFinderConfigClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoFinderInterface { + pub g_iface: gobject::GTypeInterface, + pub resolve_async: Option, + pub resolve_finish: Option *mut glib::GPtrArray>, +} + +impl ::std::fmt::Debug for OstreeRepoFinderInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFinderInterface @ {:?}", self as *const _)) + .field("g_iface", &self.g_iface) + .field("resolve_async", &self.resolve_async) + .field("resolve_finish", &self.resolve_finish) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoFinderMountClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for OstreeRepoFinderMountClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFinderMountClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoFinderOverrideClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for OstreeRepoFinderOverrideClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFinderOverrideClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoFinderResult { + pub remote: *mut OstreeRemote, + pub finder: *mut OstreeRepoFinder, + pub priority: c_int, + pub ref_to_checksum: *mut glib::GHashTable, + pub summary_last_modified: u64, + pub ref_to_timestamp: *mut glib::GHashTable, + pub padding: [gpointer; 3], +} + +impl ::std::fmt::Debug for OstreeRepoFinderResult { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFinderResult @ {:?}", self as *const _)) + .field("remote", &self.remote) + .field("finder", &self.finder) + .field("priority", &self.priority) + .field("ref_to_checksum", &self.ref_to_checksum) + .field("summary_last_modified", &self.summary_last_modified) + .field("ref_to_timestamp", &self.ref_to_timestamp) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepoImportArchiveOptions { + _truncated_record_marker: c_void, + // /*Ignored*/field ignore_unsupported_content has incomplete type +} + +impl ::std::fmt::Debug for OstreeRepoImportArchiveOptions { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoImportArchiveOptions @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoPruneOptions { + pub flags: OstreeRepoPruneFlags, + pub reachable: *mut glib::GHashTable, + pub unused_bools: [gboolean; 6], + pub unused_ints: [c_int; 6], + pub unused_ptrs: [gpointer; 7], +} + +impl ::std::fmt::Debug for OstreeRepoPruneOptions { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoPruneOptions @ {:?}", self as *const _)) + .field("flags", &self.flags) + .field("reachable", &self.reachable) + .field("unused_bools", &self.unused_bools) + .field("unused_ints", &self.unused_ints) + .field("unused_ptrs", &self.unused_ptrs) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRepoTransactionStats { + pub metadata_objects_total: c_uint, + pub metadata_objects_written: c_uint, + pub content_objects_total: c_uint, + pub content_objects_written: c_uint, + pub content_bytes_written: u64, + pub padding1: u64, + pub padding2: u64, + pub padding3: u64, + pub padding4: u64, +} + +impl ::std::fmt::Debug for OstreeRepoTransactionStats { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoTransactionStats @ {:?}", self as *const _)) + .field("metadata_objects_total", &self.metadata_objects_total) + .field("metadata_objects_written", &self.metadata_objects_written) + .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("padding1", &self.padding1) + .field("padding2", &self.padding2) + .field("padding3", &self.padding3) + .field("padding4", &self.padding4) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeRollsumMatches { + pub from_rollsums: *mut glib::GHashTable, + pub to_rollsums: *mut glib::GHashTable, + pub crcmatches: c_uint, + pub bufmatches: c_uint, + pub total: c_uint, + pub match_size: u64, + pub matches: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for OstreeRollsumMatches { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRollsumMatches @ {:?}", self as *const _)) + .field("from_rollsums", &self.from_rollsums) + .field("to_rollsums", &self.to_rollsums) + .field("crcmatches", &self.crcmatches) + .field("bufmatches", &self.bufmatches) + .field("total", &self.total) + .field("match_size", &self.match_size) + .field("matches", &self.matches) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeSysrootWriteDeploymentsOpts { + pub do_postclean: gboolean, + pub unused_bools: [gboolean; 7], + pub unused_ints: [c_int; 7], + pub unused_ptrs: [gpointer; 7], +} + +impl ::std::fmt::Debug for OstreeSysrootWriteDeploymentsOpts { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeSysrootWriteDeploymentsOpts @ {:?}", self as *const _)) + .field("do_postclean", &self.do_postclean) + .field("unused_bools", &self.unused_bools) + .field("unused_ints", &self.unused_ints) + .field("unused_ptrs", &self.unused_ptrs) + .finish() + } +} + +#[repr(C)] +pub struct OstreeTlsCertInteraction(c_void); + +impl ::std::fmt::Debug for OstreeTlsCertInteraction { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeTlsCertInteraction @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeTlsCertInteractionClass(c_void); + +impl ::std::fmt::Debug for OstreeTlsCertInteractionClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeTlsCertInteractionClass @ {:?}", self as *const _)) + .finish() + } +} + +// Classes +#[repr(C)] +pub struct OstreeAsyncProgress(c_void); + +impl ::std::fmt::Debug for OstreeAsyncProgress { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeAsyncProgress @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeBootconfigParser(c_void); + +impl ::std::fmt::Debug for OstreeBootconfigParser { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeBootconfigParser @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeChecksumInputStream { + pub parent_instance: gio::GFilterInputStream, + pub priv_: *mut OstreeChecksumInputStreamPrivate, +} + +impl ::std::fmt::Debug for OstreeChecksumInputStream { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeChecksumInputStream @ {:?}", self as *const _)) + .field("parent_instance", &self.parent_instance) + .finish() + } +} + +#[repr(C)] +pub struct OstreeDeployment(c_void); + +impl ::std::fmt::Debug for OstreeDeployment { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeDeployment @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeGpgVerifyResult(c_void); + +impl ::std::fmt::Debug for OstreeGpgVerifyResult { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeGpgVerifyResult @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeMutableTree(c_void); + +impl ::std::fmt::Debug for OstreeMutableTree { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeMutableTree @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepo(c_void); + +impl ::std::fmt::Debug for OstreeRepo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepoFile(c_void); + +impl ::std::fmt::Debug for OstreeRepoFile { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFile @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepoFinderAvahi(c_void); + +impl ::std::fmt::Debug for OstreeRepoFinderAvahi { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFinderAvahi @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepoFinderConfig(c_void); + +impl ::std::fmt::Debug for OstreeRepoFinderConfig { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFinderConfig @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepoFinderMount(c_void); + +impl ::std::fmt::Debug for OstreeRepoFinderMount { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFinderMount @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeRepoFinderOverride(c_void); + +impl ::std::fmt::Debug for OstreeRepoFinderOverride { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeRepoFinderOverride @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeSePolicy(c_void); + +impl ::std::fmt::Debug for OstreeSePolicy { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeSePolicy @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeSysroot(c_void); + +impl ::std::fmt::Debug for OstreeSysroot { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeSysroot @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct OstreeSysrootUpgrader(c_void); + +impl ::std::fmt::Debug for OstreeSysrootUpgrader { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeSysrootUpgrader @ {:?}", self as *const _)) + .finish() + } +} + +// Interfaces +#[repr(C)] +pub struct OstreeRepoFinder(c_void); + +impl ::std::fmt::Debug for OstreeRepoFinder { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "OstreeRepoFinder @ {:?}", self as *const _) + } +} + + +extern "C" { + + //========================================================================= + // OstreeSysrootUpgraderFlags + //========================================================================= + pub fn ostree_sysroot_upgrader_flags_get_type() -> GType; + + //========================================================================= + // OstreeCollectionRef + //========================================================================= + pub fn ostree_collection_ref_get_type() -> GType; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_collection_ref_new(collection_id: *const c_char, ref_name: *const c_char) -> *mut OstreeCollectionRef; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_collection_ref_dup(ref_: *const OstreeCollectionRef) -> *mut OstreeCollectionRef; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_collection_ref_free(ref_: *mut OstreeCollectionRef); + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_collection_ref_dupv(refs: *mut *mut OstreeCollectionRef) -> *mut *mut OstreeCollectionRef; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_collection_ref_equal(ref1: gconstpointer, ref2: gconstpointer) -> gboolean; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_collection_ref_freev(refs: *mut *mut OstreeCollectionRef); + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_collection_ref_hash(ref_: gconstpointer) -> c_uint; + + //========================================================================= + // OstreeDiffItem + //========================================================================= + pub fn ostree_diff_item_get_type() -> GType; + pub fn ostree_diff_item_ref(diffitem: *mut OstreeDiffItem) -> *mut OstreeDiffItem; + pub fn ostree_diff_item_unref(diffitem: *mut OstreeDiffItem); + + //========================================================================= + // OstreeRemote + //========================================================================= + pub fn ostree_remote_get_type() -> GType; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_remote_get_name(remote: *mut OstreeRemote) -> *const c_char; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_remote_get_url(remote: *mut OstreeRemote) -> *mut c_char; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_remote_ref(remote: *mut OstreeRemote) -> *mut OstreeRemote; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_remote_unref(remote: *mut OstreeRemote); + + //========================================================================= + // OstreeRepoCheckoutAtOptions + //========================================================================= + pub fn ostree_repo_checkout_at_options_set_devino(opts: *mut OstreeRepoCheckoutAtOptions, cache: *mut OstreeRepoDevInoCache); + + //========================================================================= + // OstreeRepoCommitModifier + //========================================================================= + pub fn ostree_repo_commit_modifier_get_type() -> GType; + pub fn ostree_repo_commit_modifier_new(flags: OstreeRepoCommitModifierFlags, commit_filter: OstreeRepoCommitFilter, user_data: gpointer, destroy_notify: glib::GDestroyNotify) -> *mut OstreeRepoCommitModifier; + pub fn ostree_repo_commit_modifier_ref(modifier: *mut OstreeRepoCommitModifier) -> *mut OstreeRepoCommitModifier; + #[cfg(any(feature = "v2017_13", feature = "dox"))] + pub fn ostree_repo_commit_modifier_set_devino_cache(modifier: *mut OstreeRepoCommitModifier, cache: *mut OstreeRepoDevInoCache); + pub fn ostree_repo_commit_modifier_set_sepolicy(modifier: *mut OstreeRepoCommitModifier, sepolicy: *mut OstreeSePolicy); + pub fn ostree_repo_commit_modifier_set_xattr_callback(modifier: *mut OstreeRepoCommitModifier, callback: OstreeRepoCommitModifierXattrCallback, destroy: glib::GDestroyNotify, user_data: gpointer); + pub fn ostree_repo_commit_modifier_unref(modifier: *mut OstreeRepoCommitModifier); + + //========================================================================= + // OstreeRepoCommitTraverseIter + //========================================================================= + pub fn ostree_repo_commit_traverse_iter_clear(iter: *mut OstreeRepoCommitTraverseIter); + pub fn ostree_repo_commit_traverse_iter_get_dir(iter: *mut OstreeRepoCommitTraverseIter, out_name: *mut *mut c_char, out_content_checksum: *mut *mut c_char, out_meta_checksum: *mut *mut c_char); + pub fn ostree_repo_commit_traverse_iter_get_file(iter: *mut OstreeRepoCommitTraverseIter, out_name: *mut *mut c_char, out_checksum: *mut *mut c_char); + pub fn ostree_repo_commit_traverse_iter_init_commit(iter: *mut OstreeRepoCommitTraverseIter, repo: *mut OstreeRepo, commit: *mut glib::GVariant, flags: OstreeRepoCommitTraverseFlags, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_commit_traverse_iter_init_dirtree(iter: *mut OstreeRepoCommitTraverseIter, repo: *mut OstreeRepo, dirtree: *mut glib::GVariant, flags: OstreeRepoCommitTraverseFlags, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_commit_traverse_iter_next(iter: *mut OstreeRepoCommitTraverseIter, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> OstreeRepoCommitIterResult; + pub fn ostree_repo_commit_traverse_iter_cleanup(p: *mut c_void); + + //========================================================================= + // OstreeRepoDevInoCache + //========================================================================= + pub fn ostree_repo_devino_cache_get_type() -> GType; + pub fn ostree_repo_devino_cache_new() -> *mut OstreeRepoDevInoCache; + pub fn ostree_repo_devino_cache_ref(cache: *mut OstreeRepoDevInoCache) -> *mut OstreeRepoDevInoCache; + pub fn ostree_repo_devino_cache_unref(cache: *mut OstreeRepoDevInoCache); + + //========================================================================= + // OstreeRepoFinderResult + //========================================================================= + pub fn ostree_repo_finder_result_get_type() -> GType; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_result_new(remote: *mut OstreeRemote, finder: *mut OstreeRepoFinder, priority: c_int, ref_to_checksum: *mut glib::GHashTable, ref_to_timestamp: *mut glib::GHashTable, summary_last_modified: u64) -> *mut OstreeRepoFinderResult; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_result_compare(a: *const OstreeRepoFinderResult, b: *const OstreeRepoFinderResult) -> c_int; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_result_dup(result: *mut OstreeRepoFinderResult) -> *mut OstreeRepoFinderResult; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_result_free(result: *mut OstreeRepoFinderResult); + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_result_freev(results: *mut *mut OstreeRepoFinderResult); + + //========================================================================= + // OstreeRepoTransactionStats + //========================================================================= + pub fn ostree_repo_transaction_stats_get_type() -> GType; + + //========================================================================= + // OstreeAsyncProgress + //========================================================================= + pub fn ostree_async_progress_get_type() -> GType; + pub fn ostree_async_progress_new() -> *mut OstreeAsyncProgress; + pub fn ostree_async_progress_new_and_connect(changed: *mut gpointer, user_data: gpointer) -> *mut OstreeAsyncProgress; + pub fn ostree_async_progress_finish(self_: *mut OstreeAsyncProgress); + #[cfg(any(feature = "v2017_6", feature = "dox"))] + pub fn ostree_async_progress_get(self_: *mut OstreeAsyncProgress, ...); + #[cfg(any(feature = "v2017_6", feature = "dox"))] + pub fn ostree_async_progress_get_status(self_: *mut OstreeAsyncProgress) -> *mut c_char; + pub fn ostree_async_progress_get_uint(self_: *mut OstreeAsyncProgress, key: *const c_char) -> c_uint; + pub fn ostree_async_progress_get_uint64(self_: *mut OstreeAsyncProgress, key: *const c_char) -> u64; + #[cfg(any(feature = "v2017_6", feature = "dox"))] + pub fn ostree_async_progress_get_variant(self_: *mut OstreeAsyncProgress, key: *const c_char) -> *mut glib::GVariant; + #[cfg(any(feature = "v2017_6", feature = "dox"))] + pub fn ostree_async_progress_set(self_: *mut OstreeAsyncProgress, ...); + #[cfg(any(feature = "v2017_6", feature = "dox"))] + pub fn ostree_async_progress_set_status(self_: *mut OstreeAsyncProgress, status: *const c_char); + pub fn ostree_async_progress_set_uint(self_: *mut OstreeAsyncProgress, key: *const c_char, value: c_uint); + pub fn ostree_async_progress_set_uint64(self_: *mut OstreeAsyncProgress, key: *const c_char, value: u64); + #[cfg(any(feature = "v2017_6", feature = "dox"))] + pub fn ostree_async_progress_set_variant(self_: *mut OstreeAsyncProgress, key: *const c_char, value: *mut glib::GVariant); + + //========================================================================= + // OstreeBootconfigParser + //========================================================================= + pub fn ostree_bootconfig_parser_get_type() -> GType; + pub fn ostree_bootconfig_parser_new() -> *mut OstreeBootconfigParser; + pub fn ostree_bootconfig_parser_clone(self_: *mut OstreeBootconfigParser) -> *mut OstreeBootconfigParser; + pub fn ostree_bootconfig_parser_get(self_: *mut OstreeBootconfigParser, key: *const c_char) -> *const c_char; + pub fn ostree_bootconfig_parser_parse(self_: *mut OstreeBootconfigParser, path: *mut gio::GFile, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_bootconfig_parser_parse_at(self_: *mut OstreeBootconfigParser, dfd: c_int, path: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_bootconfig_parser_set(self_: *mut OstreeBootconfigParser, key: *const c_char, value: *const c_char); + pub fn ostree_bootconfig_parser_write(self_: *mut OstreeBootconfigParser, output: *mut gio::GFile, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_bootconfig_parser_write_at(self_: *mut OstreeBootconfigParser, dfd: c_int, path: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + + //========================================================================= + // OstreeChecksumInputStream + //========================================================================= + pub fn ostree_checksum_input_stream_get_type() -> GType; + pub fn ostree_checksum_input_stream_new(stream: *mut gio::GInputStream, checksum: *mut glib::GChecksum) -> *mut OstreeChecksumInputStream; + + //========================================================================= + // OstreeDeployment + //========================================================================= + pub fn ostree_deployment_get_type() -> GType; + pub fn ostree_deployment_new(index: c_int, osname: *const c_char, csum: *const c_char, deployserial: c_int, bootcsum: *const c_char, bootserial: c_int) -> *mut OstreeDeployment; + 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); + 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; + pub fn ostree_deployment_get_bootconfig(self_: *mut OstreeDeployment) -> *mut OstreeBootconfigParser; + pub fn ostree_deployment_get_bootcsum(self_: *mut OstreeDeployment) -> *const c_char; + pub fn ostree_deployment_get_bootserial(self_: *mut OstreeDeployment) -> c_int; + pub fn ostree_deployment_get_csum(self_: *mut OstreeDeployment) -> *const c_char; + pub fn ostree_deployment_get_deployserial(self_: *mut OstreeDeployment) -> c_int; + pub fn ostree_deployment_get_index(self_: *mut OstreeDeployment) -> c_int; + 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; + 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; + #[cfg(any(feature = "v2018_3", feature = "dox"))] + pub fn ostree_deployment_is_staged(self_: *mut OstreeDeployment) -> gboolean; + pub fn ostree_deployment_set_bootconfig(self_: *mut OstreeDeployment, bootconfig: *mut OstreeBootconfigParser); + pub fn ostree_deployment_set_bootserial(self_: *mut OstreeDeployment, index: c_int); + pub fn ostree_deployment_set_index(self_: *mut OstreeDeployment, index: c_int); + pub fn ostree_deployment_set_origin(self_: *mut OstreeDeployment, origin: *mut glib::GKeyFile); + + //========================================================================= + // OstreeGpgVerifyResult + //========================================================================= + pub fn ostree_gpg_verify_result_get_type() -> GType; + pub fn ostree_gpg_verify_result_describe_variant(variant: *mut glib::GVariant, output_buffer: *mut glib::GString, line_prefix: *const c_char, flags: OstreeGpgSignatureFormatFlags); + pub fn ostree_gpg_verify_result_count_all(result: *mut OstreeGpgVerifyResult) -> c_uint; + pub fn ostree_gpg_verify_result_count_valid(result: *mut OstreeGpgVerifyResult) -> c_uint; + pub fn ostree_gpg_verify_result_describe(result: *mut OstreeGpgVerifyResult, signature_index: c_uint, output_buffer: *mut glib::GString, line_prefix: *const c_char, flags: OstreeGpgSignatureFormatFlags); + 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; + pub fn ostree_gpg_verify_result_require_valid_signature(result: *mut OstreeGpgVerifyResult, error: *mut *mut glib::GError) -> gboolean; + + //========================================================================= + // OstreeMutableTree + //========================================================================= + pub fn ostree_mutable_tree_get_type() -> GType; + pub fn ostree_mutable_tree_new() -> *mut OstreeMutableTree; + 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; + 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; + 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); + pub fn ostree_mutable_tree_walk(self_: *mut OstreeMutableTree, split_path: *mut glib::GPtrArray, start: c_uint, out_subdir: *mut *mut OstreeMutableTree, error: *mut *mut glib::GError) -> gboolean; + + //========================================================================= + // OstreeRepo + //========================================================================= + pub fn ostree_repo_get_type() -> GType; + 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; + 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; + 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"))] + pub fn ostree_repo_traverse_new_parents() -> *mut glib::GHashTable; + pub fn ostree_repo_traverse_new_reachable() -> *mut glib::GHashTable; + #[cfg(any(feature = "v2018_5", feature = "dox"))] + pub fn ostree_repo_traverse_parents_get_commits(parents: *mut glib::GHashTable, object: *mut glib::GVariant) -> *mut *mut c_char; + 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; + 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; + pub fn ostree_repo_checkout_tree_at(self_: *mut OstreeRepo, options: *mut OstreeRepoCheckoutOptions, 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_commit_transaction(self_: *mut OstreeRepo, out_stats: *mut OstreeRepoTransactionStats, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_copy_config(self_: *mut OstreeRepo) -> *mut glib::GKeyFile; + pub fn ostree_repo_create(self_: *mut OstreeRepo, mode: OstreeRepoMode, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_delete_object(self_: *mut OstreeRepo, objtype: OstreeObjectType, sha256: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2017_12", feature = "dox"))] + pub fn ostree_repo_equal(a: *mut OstreeRepo, b: *mut OstreeRepo) -> gboolean; + pub fn ostree_repo_export_tree_to_archive(self_: *mut OstreeRepo, opts: *mut OstreeRepoExportArchiveOptions, root: *mut OstreeRepoFile, archive: *mut c_void, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_find_remotes_async(self_: *mut OstreeRepo, refs: *mut *mut OstreeCollectionRef, options: *mut glib::GVariant, finders: *mut *mut OstreeRepoFinder, progress: *mut OstreeAsyncProgress, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); + #[cfg(any(feature = "v2018_6", feature = "dox"))] + 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 = "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; + pub fn ostree_repo_get_dfd(self_: *mut OstreeRepo) -> c_int; + pub fn ostree_repo_get_disable_fsync(self_: *mut OstreeRepo) -> 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; + 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; + 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; + 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; + 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; + 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; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_list_collection_refs(self_: *mut OstreeRepo, match_collection_id: *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_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; + 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"))] + pub fn ostree_repo_load_commit(self_: *mut OstreeRepo, checksum: *const c_char, out_commit: *mut *mut glib::GVariant, out_state: *mut OstreeRepoCommitState, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_load_file(self_: *mut OstreeRepo, checksum: *const c_char, 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_repo_load_object_stream(self_: *mut OstreeRepo, objtype: OstreeObjectType, checksum: *const c_char, out_input: *mut *mut gio::GInputStream, out_size: *mut u64, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_load_variant(self_: *mut OstreeRepo, objtype: OstreeObjectType, sha256: *const c_char, out_variant: *mut *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_load_variant_if_exists(self_: *mut OstreeRepo, objtype: OstreeObjectType, sha256: *const c_char, out_variant: *mut *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2017_15", feature = "dox"))] + pub fn ostree_repo_mark_commit_partial(self_: *mut OstreeRepo, checksum: *const c_char, is_partial: gboolean, error: *mut *mut glib::GError) -> gboolean; + 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; + 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; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_pull_from_remotes_async(self_: *mut OstreeRepo, results: *mut *mut OstreeRepoFinderResult, options: *mut glib::GVariant, progress: *mut OstreeAsyncProgress, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_pull_from_remotes_finish(self_: *mut OstreeRepo, result: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_pull_one_dir(self_: *mut OstreeRepo, remote_name: *const c_char, dir_to_pull: *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; + pub fn ostree_repo_pull_with_options(self_: *mut OstreeRepo, remote_name_or_baseurl: *const c_char, options: *mut glib::GVariant, progress: *mut OstreeAsyncProgress, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_query_object_storage_size(self_: *mut OstreeRepo, objtype: OstreeObjectType, sha256: *const c_char, out_size: *mut u64, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + 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; + 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; + 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; + pub fn ostree_repo_remote_get_url(self_: *mut OstreeRepo, name: *const c_char, out_url: *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_remote_gpg_import(self_: *mut OstreeRepo, name: *const c_char, source_stream: *mut gio::GInputStream, key_ids: *mut *mut c_char, out_imported: *mut c_uint, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_remote_list(self_: *mut OstreeRepo, out_n_remotes: *mut c_uint) -> *mut *mut c_char; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_remote_list_collection_refs(self_: *mut OstreeRepo, remote_name: *const c_char, out_all_refs: *mut *mut glib::GHashTable, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_remote_list_refs(self_: *mut OstreeRepo, remote_name: *const c_char, out_all_refs: *mut *mut glib::GHashTable, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_resolve_collection_ref(self_: *mut OstreeRepo, ref_: *const OstreeCollectionRef, allow_noent: gboolean, flags: OstreeRepoResolveRevExtFlags, out_rev: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + #[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; + 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; + 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; + 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; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_set_collection_ref_immediate(self_: *mut OstreeRepo, ref_: *const OstreeCollectionRef, checksum: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_set_disable_fsync(self_: *mut OstreeRepo, disable_fsync: gboolean); + pub fn ostree_repo_set_ref_immediate(self_: *mut OstreeRepo, remote: *const c_char, ref_: *const c_char, checksum: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_sign_commit(self_: *mut OstreeRepo, commit_checksum: *const c_char, key_id: *const c_char, homedir: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_sign_delta(self_: *mut OstreeRepo, from_commit: *const c_char, to_commit: *const c_char, key_id: *const c_char, homedir: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_static_delta_execute_offline(self_: *mut OstreeRepo, dir_or_file: *mut gio::GFile, skip_validation: gboolean, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_static_delta_generate(self_: *mut OstreeRepo, opt: OstreeStaticDeltaGenerateOpt, from: *const c_char, to: *const c_char, metadata: *mut glib::GVariant, params: *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_transaction_set_collection_ref(self_: *mut OstreeRepo, ref_: *const OstreeCollectionRef, checksum: *const c_char); + pub fn ostree_repo_transaction_set_ref(self_: *mut OstreeRepo, remote: *const c_char, ref_: *const c_char, checksum: *const c_char); + pub fn ostree_repo_transaction_set_refspec(self_: *mut OstreeRepo, refspec: *const c_char, checksum: *const c_char); + pub fn ostree_repo_traverse_commit(repo: *mut OstreeRepo, commit_checksum: *const c_char, maxdepth: c_int, out_reachable: *mut *mut glib::GHashTable, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_traverse_commit_union(repo: *mut OstreeRepo, commit_checksum: *const c_char, maxdepth: c_int, inout_reachable: *mut glib::GHashTable, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2018_5", feature = "dox"))] + pub fn ostree_repo_traverse_commit_union_with_parents(repo: *mut OstreeRepo, commit_checksum: *const c_char, maxdepth: c_int, inout_reachable: *mut glib::GHashTable, inout_parents: *mut glib::GHashTable, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + 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; + 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; + pub fn ostree_repo_write_commit(self_: *mut OstreeRepo, parent: *const c_char, subject: *const c_char, body: *const c_char, metadata: *mut glib::GVariant, root: *mut OstreeRepoFile, out_commit: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_commit_detached_metadata(self_: *mut OstreeRepo, checksum: *const c_char, metadata: *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_commit_with_time(self_: *mut OstreeRepo, parent: *const c_char, subject: *const c_char, body: *const c_char, metadata: *mut glib::GVariant, root: *mut OstreeRepoFile, time: u64, out_commit: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_config(self_: *mut OstreeRepo, new_config: *mut glib::GKeyFile, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_content(self_: *mut OstreeRepo, expected_checksum: *const c_char, object_input: *mut gio::GInputStream, length: u64, out_csum: *mut *mut [u8; 32], cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_content_async(self_: *mut OstreeRepo, expected_checksum: *const c_char, object: *mut gio::GInputStream, length: u64, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); + pub fn ostree_repo_write_content_finish(self_: *mut OstreeRepo, result: *mut gio::GAsyncResult, out_csum: *mut *mut u8, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_content_trusted(self_: *mut OstreeRepo, checksum: *const c_char, object_input: *mut gio::GInputStream, length: u64, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_dfd_to_mtree(self_: *mut OstreeRepo, dfd: c_int, path: *const c_char, mtree: *mut OstreeMutableTree, modifier: *mut OstreeRepoCommitModifier, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_directory_to_mtree(self_: *mut OstreeRepo, dir: *mut gio::GFile, mtree: *mut OstreeMutableTree, modifier: *mut OstreeRepoCommitModifier, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_metadata(self_: *mut OstreeRepo, objtype: OstreeObjectType, expected_checksum: *const c_char, object: *mut glib::GVariant, out_csum: *mut *mut [u8; 32], cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_metadata_async(self_: *mut OstreeRepo, objtype: OstreeObjectType, expected_checksum: *const c_char, object: *mut glib::GVariant, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); + pub fn ostree_repo_write_metadata_finish(self_: *mut OstreeRepo, result: *mut gio::GAsyncResult, out_csum: *mut *mut [u8; 32], error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_metadata_stream_trusted(self_: *mut OstreeRepo, objtype: OstreeObjectType, checksum: *const c_char, object_input: *mut gio::GInputStream, length: u64, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_metadata_trusted(self_: *mut OstreeRepo, objtype: OstreeObjectType, checksum: *const c_char, variant: *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_write_mtree(self_: *mut OstreeRepo, mtree: *mut OstreeMutableTree, out_file: *mut *mut gio::GFile, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + + //========================================================================= + // OstreeRepoFile + //========================================================================= + pub fn ostree_repo_file_get_type() -> GType; + pub fn ostree_repo_file_ensure_resolved(self_: *mut OstreeRepoFile, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_file_get_checksum(self_: *mut OstreeRepoFile) -> *const c_char; + pub fn ostree_repo_file_get_repo(self_: *mut OstreeRepoFile) -> *mut OstreeRepo; + pub fn ostree_repo_file_get_root(self_: *mut OstreeRepoFile) -> *mut OstreeRepoFile; + pub fn ostree_repo_file_get_xattrs(self_: *mut OstreeRepoFile, out_xattrs: *mut *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_file_tree_find_child(self_: *mut OstreeRepoFile, name: *const c_char, is_dir: *mut gboolean, out_container: *mut *mut glib::GVariant) -> c_int; + pub fn ostree_repo_file_tree_get_contents(self_: *mut OstreeRepoFile) -> *mut glib::GVariant; + pub fn ostree_repo_file_tree_get_contents_checksum(self_: *mut OstreeRepoFile) -> *const c_char; + pub fn ostree_repo_file_tree_get_metadata(self_: *mut OstreeRepoFile) -> *mut glib::GVariant; + pub fn ostree_repo_file_tree_get_metadata_checksum(self_: *mut OstreeRepoFile) -> *const c_char; + pub fn ostree_repo_file_tree_query_child(self_: *mut OstreeRepoFile, n: c_int, attributes: *const c_char, flags: gio::GFileQueryInfoFlags, out_info: *mut *mut gio::GFileInfo, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_repo_file_tree_set_metadata(self_: *mut OstreeRepoFile, checksum: *const c_char, metadata: *mut glib::GVariant); + + //========================================================================= + // OstreeRepoFinderAvahi + //========================================================================= + pub fn ostree_repo_finder_avahi_get_type() -> GType; + pub fn ostree_repo_finder_avahi_new(context: *mut glib::GMainContext) -> *mut OstreeRepoFinderAvahi; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_avahi_start(self_: *mut OstreeRepoFinderAvahi, error: *mut *mut glib::GError); + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_avahi_stop(self_: *mut OstreeRepoFinderAvahi); + + //========================================================================= + // OstreeRepoFinderConfig + //========================================================================= + pub fn ostree_repo_finder_config_get_type() -> GType; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_config_new() -> *mut OstreeRepoFinderConfig; + + //========================================================================= + // OstreeRepoFinderMount + //========================================================================= + pub fn ostree_repo_finder_mount_get_type() -> GType; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_mount_new(monitor: *mut gio::GVolumeMonitor) -> *mut OstreeRepoFinderMount; + + //========================================================================= + // OstreeRepoFinderOverride + //========================================================================= + pub fn ostree_repo_finder_override_get_type() -> GType; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_override_new() -> *mut OstreeRepoFinderOverride; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_override_add_uri(self_: *mut OstreeRepoFinderOverride, uri: *const c_char); + + //========================================================================= + // OstreeSePolicy + //========================================================================= + 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; + 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); + 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; + pub fn ostree_sepolicy_get_path(self_: *mut OstreeSePolicy) -> *mut gio::GFile; + pub fn ostree_sepolicy_restorecon(self_: *mut OstreeSePolicy, path: *const c_char, info: *mut gio::GFileInfo, target: *mut gio::GFile, flags: OstreeSePolicyRestoreconFlags, out_new_label: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sepolicy_setfscreatecon(self_: *mut OstreeSePolicy, path: *const c_char, mode: u32, error: *mut *mut glib::GError) -> gboolean; + + //========================================================================= + // OstreeSysroot + //========================================================================= + pub fn ostree_sysroot_get_type() -> GType; + pub fn ostree_sysroot_new(path: *mut gio::GFile) -> *mut OstreeSysroot; + pub fn ostree_sysroot_new_default() -> *mut OstreeSysroot; + pub fn ostree_sysroot_get_deployment_origin_path(deployment_path: *mut gio::GFile) -> *mut gio::GFile; + pub fn ostree_sysroot_cleanup(self_: *mut OstreeSysroot, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_sysroot_cleanup_prune_repo(sysroot: *mut OstreeSysroot, 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_sysroot_deploy_tree(self_: *mut OstreeSysroot, osname: *const c_char, revision: *const c_char, origin: *mut glib::GKeyFile, provided_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_deployment_set_kargs(self_: *mut OstreeSysroot, deployment: *mut OstreeDeployment, new_kargs: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + 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; + 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; + pub fn ostree_sysroot_get_bootversion(self_: *mut OstreeSysroot) -> c_int; + pub fn ostree_sysroot_get_deployment_directory(self_: *mut OstreeSysroot, deployment: *mut OstreeDeployment) -> *mut gio::GFile; + pub fn ostree_sysroot_get_deployment_dirpath(self_: *mut OstreeSysroot, deployment: *mut OstreeDeployment) -> *mut c_char; + pub fn ostree_sysroot_get_deployments(self_: *mut OstreeSysroot) -> *mut glib::GPtrArray; + pub fn ostree_sysroot_get_fd(self_: *mut OstreeSysroot) -> c_int; + 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; + pub fn ostree_sysroot_get_staged_deployment(self_: *mut OstreeSysroot) -> *mut OstreeDeployment; + pub fn ostree_sysroot_get_subbootversion(self_: *mut OstreeSysroot) -> c_int; + 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; + 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); + pub fn ostree_sysroot_lock_finish(self_: *mut OstreeSysroot, result: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sysroot_origin_new_from_refspec(self_: *mut OstreeSysroot, refspec: *const c_char) -> *mut glib::GKeyFile; + 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); + 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; + 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; + 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; + + //========================================================================= + // OstreeSysrootUpgrader + //========================================================================= + pub fn ostree_sysroot_upgrader_get_type() -> GType; + pub fn ostree_sysroot_upgrader_new(sysroot: *mut OstreeSysroot, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeSysrootUpgrader; + pub fn ostree_sysroot_upgrader_new_for_os(sysroot: *mut OstreeSysroot, osname: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeSysrootUpgrader; + pub fn ostree_sysroot_upgrader_new_for_os_with_flags(sysroot: *mut OstreeSysroot, osname: *const c_char, flags: OstreeSysrootUpgraderFlags, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut OstreeSysrootUpgrader; + pub fn ostree_sysroot_upgrader_check_timestamps(repo: *mut OstreeRepo, from_rev: *const c_char, to_rev: *const c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sysroot_upgrader_deploy(self_: *mut OstreeSysrootUpgrader, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sysroot_upgrader_dup_origin(self_: *mut OstreeSysrootUpgrader) -> *mut glib::GKeyFile; + pub fn ostree_sysroot_upgrader_get_origin(self_: *mut OstreeSysrootUpgrader) -> *mut glib::GKeyFile; + pub fn ostree_sysroot_upgrader_get_origin_description(self_: *mut OstreeSysrootUpgrader) -> *mut c_char; + pub fn ostree_sysroot_upgrader_pull(self_: *mut OstreeSysrootUpgrader, flags: OstreeRepoPullFlags, upgrader_flags: OstreeSysrootUpgraderPullFlags, progress: *mut OstreeAsyncProgress, out_changed: *mut gboolean, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sysroot_upgrader_pull_one_dir(self_: *mut OstreeSysrootUpgrader, dir_to_pull: *const c_char, flags: OstreeRepoPullFlags, upgrader_flags: OstreeSysrootUpgraderPullFlags, progress: *mut OstreeAsyncProgress, out_changed: *mut gboolean, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sysroot_upgrader_set_origin(self_: *mut OstreeSysrootUpgrader, origin: *mut glib::GKeyFile, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + + //========================================================================= + // OstreeRepoFinder + //========================================================================= + pub fn ostree_repo_finder_get_type() -> GType; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_resolve_all_async(finders: *mut *mut OstreeRepoFinder, refs: *mut *mut OstreeCollectionRef, parent_repo: *mut OstreeRepo, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_resolve_all_finish(result: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> *mut glib::GPtrArray; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_resolve_async(self_: *mut OstreeRepoFinder, refs: *mut *mut OstreeCollectionRef, parent_repo: *mut OstreeRepo, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_repo_finder_resolve_finish(self_: *mut OstreeRepoFinder, result: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> *mut glib::GPtrArray; + + //========================================================================= + // Other functions + //========================================================================= + #[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; + pub fn ostree_check_version(required_year: c_uint, required_release: c_uint) -> gboolean; + 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); + 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]; + pub fn ostree_checksum_file(f: *mut gio::GFile, objtype: OstreeObjectType, out_csum: *mut *mut [u8; 32], cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_checksum_file_async(f: *mut gio::GFile, objtype: OstreeObjectType, io_priority: c_int, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); + pub fn ostree_checksum_file_async_finish(f: *mut gio::GFile, result: *mut gio::GAsyncResult, out_csum: *mut *mut [u8; 32], error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2017_13", feature = "dox"))] + pub fn ostree_checksum_file_at(dfd: c_int, path: *const c_char, stbuf: *mut stat, objtype: OstreeObjectType, flags: OstreeChecksumFlags, out_checksum: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_checksum_file_from_input(file_info: *mut gio::GFileInfo, xattrs: *mut glib::GVariant, in_: *mut gio::GInputStream, objtype: OstreeObjectType, out_csum: *mut *mut [u8; 32], cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_checksum_from_bytes(csum: *mut [u8; 32]) -> *mut c_char; + pub fn ostree_checksum_from_bytes_v(csum_v: *mut glib::GVariant) -> *mut c_char; + pub fn ostree_checksum_inplace_from_bytes(csum: *mut [u8; 32], buf: *mut c_char); + pub fn ostree_checksum_inplace_to_bytes(checksum: *const c_char, buf: *mut u8); + pub fn ostree_checksum_to_bytes(checksum: *const c_char) -> *mut [u8; 32]; + pub fn ostree_checksum_to_bytes_v(checksum: *const c_char) -> *mut glib::GVariant; + pub fn ostree_cmd__private__() -> *const OstreeCmdPrivateVTable; + pub fn ostree_cmp_checksum_bytes(a: *const u8, b: *const u8) -> c_int; + 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; + pub fn ostree_content_file_parse(compressed: gboolean, content_path: *mut gio::GFile, 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_content_file_parse_at(compressed: gboolean, parent_dfd: c_int, path: *const c_char, 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_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; + 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); + 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; + pub fn ostree_object_from_string(str: *const c_char, out_checksum: *mut *mut c_char, out_objtype: *mut OstreeObjectType); + pub fn ostree_object_name_deserialize(variant: *mut glib::GVariant, out_checksum: *mut *const c_char, out_objtype: *mut OstreeObjectType); + pub fn ostree_object_name_serialize(checksum: *const c_char, objtype: OstreeObjectType) -> *mut glib::GVariant; + pub fn ostree_object_to_string(checksum: *const c_char, objtype: OstreeObjectType) -> *mut c_char; + 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; + 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; + pub fn ostree_raw_file_to_content_stream(input: *mut gio::GInputStream, file_info: *mut gio::GFileInfo, xattrs: *mut glib::GVariant, out_input: *mut *mut gio::GInputStream, out_length: *mut u64, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_validate_checksum_string(sha256: *const c_char, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2018_6", feature = "dox"))] + pub fn ostree_validate_collection_id(collection_id: *const c_char, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2017_8", feature = "dox"))] + pub fn ostree_validate_remote_name(remote_name: *const c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_validate_rev(rev: *const c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_validate_structureof_checksum_string(checksum: *const c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_validate_structureof_commit(commit: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_validate_structureof_csum_v(checksum: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_validate_structureof_dirmeta(dirmeta: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_validate_structureof_dirtree(dirtree: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_validate_structureof_file_mode(mode: u32, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_validate_structureof_objtype(objtype: c_uchar, error: *mut *mut glib::GError) -> gboolean; + +} diff --git a/rust-bindings/rust/libostree-sys/tests/abi.rs b/rust-bindings/rust/libostree-sys/tests/abi.rs new file mode 100644 index 00000000..b056a2d3 --- /dev/null +++ b/rust-bindings/rust/libostree-sys/tests/abi.rs @@ -0,0 +1,415 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ c385982) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) +// DO NOT EDIT + +extern crate os_tree_sys; +extern crate shell_words; +extern crate tempdir; +use std::env; +use std::error::Error; +use std::path::Path; +use std::mem::{align_of, size_of}; +use std::process::Command; +use std::str; +use os_tree_sys::*; + +static PACKAGES: &[&str] = &["ostree-1"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", + &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", + &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, + self.failed, + self.failed_to_compile) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!("1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1"); + + let mut results : Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + }, + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!(Layout {size: 1, alignment: 1}, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type"); + + let mut results : Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + }, + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", + &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout {size, alignment}) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", + &abi_cmd, &output).into()); + } + + Ok(str::from_utf8(&output.stdout)?.trim().to_owned()) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ("OstreeAsyncProgressClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeBootloaderInterface", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeChecksumFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeChecksumInputStream", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeChecksumInputStreamClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeCmdPrivateVTable", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeCollectionRef", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeCollectionRefv", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeDeploymentUnlockedState", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeDiffDirsOptions", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeDiffFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeDiffItem", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeGpgError", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeGpgSignatureAttr", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeGpgSignatureFormatFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeLibarchiveInputStream", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeLibarchiveInputStreamClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeLzmaCompressorClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeLzmaDecompressorClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeMutableTreeClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeMutableTreeIter", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeObjectType", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoCheckoutAtOptions", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoCheckoutFilterResult", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoCheckoutMode", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoCheckoutOverwriteMode", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoCommitFilterResult", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoCommitIterResult", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoCommitModifierFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoCommitState", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoCommitTraverseFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoCommitTraverseIter", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoFileClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoFileEnumeratorClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoFinderAvahiClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoFinderConfigClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoFinderInterface", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoFinderMountClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoFinderOverrideClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoFinderResult", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoFinderResultv", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoListObjectsFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoListRefsExtFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoMode", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoPruneFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoPruneOptions", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoPullFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoRemoteChange", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoResolveRevExtFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRepoTransactionStats", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeRollsumMatches", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeSePolicyRestoreconFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeStaticDeltaGenerateOpt", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeSysrootSimpleWriteDeploymentFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeSysrootUpgraderFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeSysrootUpgraderPullFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeSysrootWriteDeploymentsOpts", Layout {size: size_of::(), alignment: align_of::()}), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS", "1"), + ("OSTREE_CHECKSUM_FLAGS_NONE", "0"), + ("OSTREE_COMMIT_GVARIANT_STRING", "(a{sv}aya(say)sstayay)"), + ("OSTREE_COMMIT_META_KEY_COLLECTION_BINDING", "ostree.collection-binding"), + ("OSTREE_COMMIT_META_KEY_ENDOFLIFE", "ostree.endoflife"), + ("OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE", "ostree.endoflife-rebase"), + ("OSTREE_COMMIT_META_KEY_REF_BINDING", "ostree.ref-binding"), + ("OSTREE_COMMIT_META_KEY_SOURCE_TITLE", "ostree.source-title"), + ("OSTREE_COMMIT_META_KEY_VERSION", "version"), + ("OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT", "1"), + ("OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX", "2"), + ("OSTREE_DEPLOYMENT_UNLOCKED_NONE", "0"), + ("OSTREE_DIFF_FLAGS_IGNORE_XATTRS", "1"), + ("OSTREE_DIFF_FLAGS_NONE", "0"), + ("OSTREE_DIRMETA_GVARIANT_STRING", "(uuua(ayay))"), + ("OSTREE_FILEMETA_GVARIANT_STRING", "(uuua(ayay))"), + ("OSTREE_GPG_ERROR_INVALID_SIGNATURE", "1"), + ("OSTREE_GPG_ERROR_MISSING_KEY", "2"), + ("OSTREE_GPG_ERROR_NO_SIGNATURE", "0"), + ("OSTREE_GPG_SIGNATURE_ATTR_EXP_TIMESTAMP", "7"), + ("OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT", "5"), + ("OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY", "12"), + ("OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME", "9"), + ("OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED", "2"), + ("OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING", "4"), + ("OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED", "3"), + ("OSTREE_GPG_SIGNATURE_ATTR_PUBKEY_ALGO_NAME", "8"), + ("OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED", "1"), + ("OSTREE_GPG_SIGNATURE_ATTR_TIMESTAMP", "6"), + ("OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL", "11"), + ("OSTREE_GPG_SIGNATURE_ATTR_USER_NAME", "10"), + ("OSTREE_GPG_SIGNATURE_ATTR_VALID", "0"), + ("OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT", "0"), + ("OSTREE_MAX_METADATA_SIZE", "10485760"), + ("OSTREE_MAX_METADATA_WARN_SIZE", "7340032"), + ("OSTREE_OBJECT_TYPE_COMMIT", "4"), + ("OSTREE_OBJECT_TYPE_COMMIT_META", "6"), + ("OSTREE_OBJECT_TYPE_DIR_META", "3"), + ("OSTREE_OBJECT_TYPE_DIR_TREE", "2"), + ("OSTREE_OBJECT_TYPE_FILE", "1"), + ("OSTREE_OBJECT_TYPE_PAYLOAD_LINK", "7"), + ("OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT", "5"), + ("OSTREE_ORIGIN_TRANSIENT_GROUP", "libostree-transient"), + ("OSTREE_RELEASE_VERSION", "8"), + ("OSTREE_REPO_CHECKOUT_FILTER_ALLOW", "0"), + ("OSTREE_REPO_CHECKOUT_FILTER_SKIP", "1"), + ("OSTREE_REPO_CHECKOUT_MODE_NONE", "0"), + ("OSTREE_REPO_CHECKOUT_MODE_USER", "1"), + ("OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES", "2"), + ("OSTREE_REPO_CHECKOUT_OVERWRITE_NONE", "0"), + ("OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES", "1"), + ("OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL", "3"), + ("OSTREE_REPO_COMMIT_FILTER_ALLOW", "0"), + ("OSTREE_REPO_COMMIT_FILTER_SKIP", "1"), + ("OSTREE_REPO_COMMIT_ITER_RESULT_DIR", "3"), + ("OSTREE_REPO_COMMIT_ITER_RESULT_END", "1"), + ("OSTREE_REPO_COMMIT_ITER_RESULT_ERROR", "0"), + ("OSTREE_REPO_COMMIT_ITER_RESULT_FILE", "2"), + ("OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS", "4"), + ("OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME", "16"), + ("OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL", "32"), + ("OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED", "8"), + ("OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES", "2"), + ("OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE", "0"), + ("OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS", "1"), + ("OSTREE_REPO_COMMIT_STATE_NORMAL", "0"), + ("OSTREE_REPO_COMMIT_STATE_PARTIAL", "1"), + ("OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE", "1"), + ("OSTREE_REPO_LIST_OBJECTS_ALL", "4"), + ("OSTREE_REPO_LIST_OBJECTS_LOOSE", "1"), + ("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_REMOTES", "2"), + ("OSTREE_REPO_LIST_REFS_EXT_NONE", "0"), + ("OSTREE_REPO_METADATA_REF", "ostree-metadata"), + ("OSTREE_REPO_MODE_ARCHIVE", "1"), + ("OSTREE_REPO_MODE_ARCHIVE_Z2", "1"), + ("OSTREE_REPO_MODE_BARE", "0"), + ("OSTREE_REPO_MODE_BARE_USER", "2"), + ("OSTREE_REPO_MODE_BARE_USER_ONLY", "3"), + ("OSTREE_REPO_PRUNE_FLAGS_NONE", "0"), + ("OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE", "1"), + ("OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY", "2"), + ("OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES", "8"), + ("OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY", "2"), + ("OSTREE_REPO_PULL_FLAGS_MIRROR", "1"), + ("OSTREE_REPO_PULL_FLAGS_NONE", "0"), + ("OSTREE_REPO_PULL_FLAGS_TRUSTED_HTTP", "16"), + ("OSTREE_REPO_PULL_FLAGS_UNTRUSTED", "4"), + ("OSTREE_REPO_REMOTE_CHANGE_ADD", "0"), + ("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_RESOLVE_REV_EXT_NONE", "0"), + ("OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL", "1"), + ("OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING", "2"), + ("OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE", "0"), + ("OSTREE_SHA256_DIGEST_LEN", "32"), + ("OSTREE_SHA256_STRING_LEN", "64"), + ("OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY", "0"), + ("OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR", "1"), + ("OSTREE_SUMMARY_GVARIANT_STRING", "(a(s(taya{sv}))a{sv})"), + ("OSTREE_SUMMARY_SIG_GVARIANT_STRING", "a{sv}"), + ("OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE", "0"), + ("OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT", "2"), + ("OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN", "4"), + ("OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN", "1"), + ("OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_PENDING", "8"), + ("OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_ROLLBACK", "16"), + ("OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED", "2"), + ("OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER", "1"), + ("OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE", "0"), + ("OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC", "2"), + ("OSTREE_TIMESTAMP", "0"), + ("OSTREE_TREE_GVARIANT_STRING", "(a(say)a(sayay))"), + ("OSTREE_VERSION", "2018.800000"), + ("OSTREE_VERSION_S", "2018.8"), + ("OSTREE_YEAR_VERSION", "2018"), +]; + + diff --git a/rust-bindings/rust/libostree-sys/tests/constant.c b/rust-bindings/rust/libostree-sys/tests/constant.c new file mode 100644 index 00000000..14a67b1e --- /dev/null +++ b/rust-bindings/rust/libostree-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ c385982) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "%s", + const char *: "%s", + char: "%c", + signed char: "%hhd", + unsigned char: "%hhu", + short int: "%hd", + unsigned short int: "%hu", + int: "%d", + unsigned int: "%u", + long: "%ld", + unsigned long: "%lu", + long long: "%lld", + unsigned long long: "%llu", + double: "%f", + long double: "%ld"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/rust-bindings/rust/libostree-sys/tests/layout.c b/rust-bindings/rust/libostree-sys/tests/layout.c new file mode 100644 index 00000000..86e8513c --- /dev/null +++ b/rust-bindings/rust/libostree-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ c385982) +// from gir-files (https://github.com/gtk-rs/gir-files @ ???) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/rust-bindings/rust/libostree-sys/tests/manual.h b/rust-bindings/rust/libostree-sys/tests/manual.h new file mode 100644 index 00000000..33968c2e --- /dev/null +++ b/rust-bindings/rust/libostree-sys/tests/manual.h @@ -0,0 +1,2 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. +