mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-21 13:34:34 +03:00
Merge 68542b880c
into 8aaea0c65d
This commit is contained in:
commit
718d93ab63
@ -36,9 +36,9 @@ members = [".", "rust-bindings/sys"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "0.20.0"
|
base64 = "0.20.0"
|
||||||
bitflags = "1.2.1"
|
bitflags = "1.2.1"
|
||||||
ffi = { package = "ostree-sys", path = "rust-bindings/sys", version = "0.14.0" }
|
ffi = { package = "ostree-sys", path = "rust-bindings/sys", version = "0.15.0" }
|
||||||
gio = "0.18"
|
gio = "0.19"
|
||||||
glib = "0.18"
|
glib = "0.19"
|
||||||
hex = "0.4.2"
|
hex = "0.4.2"
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
once_cell = "1.4.0"
|
once_cell = "1.4.0"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
GIR_REPO := https://github.com/gtk-rs/gir.git
|
d .GIR_REPO := https://github.com/gtk-rs/gir.git
|
||||||
GIR_VERSION := 0eeebbdf9d4d5a0b0148c7fa055bf961e16e54a0
|
GIR_VERSION := 0.19
|
||||||
OSTREE_REPO := ../ostree
|
OSTREE_REPO := ../ostree
|
||||||
OSTREE_VERSION := patch-v2022.2
|
OSTREE_VERSION := patch-v2022.2
|
||||||
RUSTDOC_STRIPPER_VERSION := 0.1.17
|
RUSTDOC_STRIPPER_VERSION := 0.1.17
|
||||||
@ -11,7 +11,7 @@ all: gir
|
|||||||
|
|
||||||
# -- gir generation --
|
# -- gir generation --
|
||||||
target/tools/bin/gir:
|
target/tools/bin/gir:
|
||||||
cargo install --root target/tools --git $(GIR_REPO) --rev $(GIR_VERSION) -- gir
|
cargo install --root target/tools --git $(GIR_REPO) --branch $(GIR_VERSION) -- gir
|
||||||
|
|
||||||
gir: target/tools/bin/gir
|
gir: target/tools/bin/gir
|
||||||
target/tools/bin/gir -c conf/ostree-sys.toml
|
target/tools/bin/gir -c conf/ostree-sys.toml
|
||||||
@ -35,6 +35,7 @@ update-gir-files: \
|
|||||||
remove-gir-files \
|
remove-gir-files \
|
||||||
gir-files \
|
gir-files \
|
||||||
gir-files/GLib-2.0.gir \
|
gir-files/GLib-2.0.gir \
|
||||||
|
gir-files/GModule-2.0.gir \
|
||||||
gir-files/Gio-2.0.gir \
|
gir-files/Gio-2.0.gir \
|
||||||
gir-files/GObject-2.0.gir \
|
gir-files/GObject-2.0.gir \
|
||||||
gir-files/OSTree-1.0.gir
|
gir-files/OSTree-1.0.gir
|
||||||
@ -46,7 +47,7 @@ gir-files:
|
|||||||
mkdir -p gir-files
|
mkdir -p gir-files
|
||||||
|
|
||||||
%.gir:
|
%.gir:
|
||||||
curl -o $@ -L https://github.com/gtk-rs/gir-files/raw/master/${@F}
|
curl -o $@ -L https://github.com/gtk-rs/gir-files/raw/0.19/${@F}
|
||||||
|
|
||||||
gir-files/OSTree-1.0.gir:
|
gir-files/OSTree-1.0.gir:
|
||||||
ln -sfr ../OSTree-1.0.gir $@
|
ln -sfr ../OSTree-1.0.gir $@
|
||||||
|
45
rust-bindings/src/auto/async_progress.rs
generated
45
rust-bindings/src/auto/async_progress.rs
generated
@ -2,13 +2,8 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::object::ObjectType as ObjectType_;
|
use glib::{prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
|
||||||
use glib::signal::connect_raw;
|
use std::{boxed::Box as Box_};
|
||||||
use glib::signal::SignalHandlerId;
|
|
||||||
use glib::translate::*;
|
|
||||||
use std::boxed::Box as Box_;
|
|
||||||
use std::fmt;
|
|
||||||
use std::mem::transmute;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeAsyncProgress")]
|
#[doc(alias = "OstreeAsyncProgress")]
|
||||||
@ -32,8 +27,8 @@ impl AsyncProgress {
|
|||||||
// unsafe { TODO: call ffi:ostree_async_progress_new_and_connect() }
|
// unsafe { TODO: call ffi:ostree_async_progress_new_and_connect() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2019_6", feature = "dox"))]
|
#[cfg(feature = "v2019_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2019_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2019_6")))]
|
||||||
#[doc(alias = "ostree_async_progress_copy_state")]
|
#[doc(alias = "ostree_async_progress_copy_state")]
|
||||||
pub fn copy_state(&self, dest: &AsyncProgress) {
|
pub fn copy_state(&self, dest: &AsyncProgress) {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -48,15 +43,15 @@ impl AsyncProgress {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
//#[cfg(feature = "v2017_6")]
|
||||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
|
//#[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
|
||||||
//#[doc(alias = "ostree_async_progress_get")]
|
//#[doc(alias = "ostree_async_progress_get")]
|
||||||
//pub fn get(&self, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
|
//pub fn get(&self, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
|
||||||
// unsafe { TODO: call ffi:ostree_async_progress_get() }
|
// unsafe { TODO: call ffi:ostree_async_progress_get() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
#[cfg(feature = "v2017_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
|
||||||
#[doc(alias = "ostree_async_progress_get_status")]
|
#[doc(alias = "ostree_async_progress_get_status")]
|
||||||
#[doc(alias = "get_status")]
|
#[doc(alias = "get_status")]
|
||||||
pub fn status(&self) -> Option<glib::GString> {
|
pub fn status(&self) -> Option<glib::GString> {
|
||||||
@ -81,8 +76,8 @@ impl AsyncProgress {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
#[cfg(feature = "v2017_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
|
||||||
#[doc(alias = "ostree_async_progress_get_variant")]
|
#[doc(alias = "ostree_async_progress_get_variant")]
|
||||||
#[doc(alias = "get_variant")]
|
#[doc(alias = "get_variant")]
|
||||||
pub fn variant(&self, key: &str) -> Option<glib::Variant> {
|
pub fn variant(&self, key: &str) -> Option<glib::Variant> {
|
||||||
@ -91,15 +86,15 @@ impl AsyncProgress {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
//#[cfg(feature = "v2017_6")]
|
||||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
|
//#[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
|
||||||
//#[doc(alias = "ostree_async_progress_set")]
|
//#[doc(alias = "ostree_async_progress_set")]
|
||||||
//pub fn set(&self, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
|
//pub fn set(&self, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
|
||||||
// unsafe { TODO: call ffi:ostree_async_progress_set() }
|
// unsafe { TODO: call ffi:ostree_async_progress_set() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
#[cfg(feature = "v2017_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
|
||||||
#[doc(alias = "ostree_async_progress_set_status")]
|
#[doc(alias = "ostree_async_progress_set_status")]
|
||||||
pub fn set_status(&self, status: Option<&str>) {
|
pub fn set_status(&self, status: Option<&str>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -121,8 +116,8 @@ impl AsyncProgress {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
#[cfg(feature = "v2017_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_6")))]
|
||||||
#[doc(alias = "ostree_async_progress_set_variant")]
|
#[doc(alias = "ostree_async_progress_set_variant")]
|
||||||
pub fn set_variant(&self, key: &str, value: &glib::Variant) {
|
pub fn set_variant(&self, key: &str, value: &glib::Variant) {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -139,7 +134,7 @@ impl AsyncProgress {
|
|||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _,
|
connect_raw(self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(changed_trampoline::<F> as *const ())), Box_::into_raw(f))
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(changed_trampoline::<F> as *const ())), Box_::into_raw(f))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -149,9 +144,3 @@ impl Default for AsyncProgress {
|
|||||||
Self::new()
|
Self::new()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for AsyncProgress {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("AsyncProgress")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
35
rust-bindings/src/auto/bootconfig_parser.rs
generated
35
rust-bindings/src/auto/bootconfig_parser.rs
generated
@ -2,10 +2,7 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::object::IsA;
|
use glib::{prelude::*,translate::*};
|
||||||
use glib::translate::*;
|
|
||||||
use std::fmt;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeBootconfigParser")]
|
#[doc(alias = "OstreeBootconfigParser")]
|
||||||
@ -39,8 +36,8 @@ impl BootconfigParser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_7", feature = "dox"))]
|
#[cfg(feature = "v2020_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
|
||||||
#[doc(alias = "ostree_bootconfig_parser_get_overlay_initrds")]
|
#[doc(alias = "ostree_bootconfig_parser_get_overlay_initrds")]
|
||||||
#[doc(alias = "get_overlay_initrds")]
|
#[doc(alias = "get_overlay_initrds")]
|
||||||
pub fn overlay_initrds(&self) -> Vec<glib::GString> {
|
pub fn overlay_initrds(&self) -> Vec<glib::GString> {
|
||||||
@ -52,9 +49,9 @@ impl BootconfigParser {
|
|||||||
#[doc(alias = "ostree_bootconfig_parser_parse")]
|
#[doc(alias = "ostree_bootconfig_parser_parse")]
|
||||||
pub fn parse(&self, path: &impl IsA<gio::File>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn parse(&self, path: &impl IsA<gio::File>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_bootconfig_parser_parse(self.to_glib_none().0, path.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_bootconfig_parser_parse(self.to_glib_none().0, path.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -62,9 +59,9 @@ impl BootconfigParser {
|
|||||||
#[doc(alias = "ostree_bootconfig_parser_parse_at")]
|
#[doc(alias = "ostree_bootconfig_parser_parse_at")]
|
||||||
pub fn parse_at(&self, dfd: i32, path: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn parse_at(&self, dfd: i32, path: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_bootconfig_parser_parse_at(self.to_glib_none().0, dfd, path.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_bootconfig_parser_parse_at(self.to_glib_none().0, dfd, path.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,8 +73,8 @@ impl BootconfigParser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_7", feature = "dox"))]
|
#[cfg(feature = "v2020_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
|
||||||
#[doc(alias = "ostree_bootconfig_parser_set_overlay_initrds")]
|
#[doc(alias = "ostree_bootconfig_parser_set_overlay_initrds")]
|
||||||
pub fn set_overlay_initrds(&self, initrds: &[&str]) {
|
pub fn set_overlay_initrds(&self, initrds: &[&str]) {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -88,9 +85,9 @@ impl BootconfigParser {
|
|||||||
#[doc(alias = "ostree_bootconfig_parser_write")]
|
#[doc(alias = "ostree_bootconfig_parser_write")]
|
||||||
pub fn write(&self, output: &impl IsA<gio::File>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn write(&self, output: &impl IsA<gio::File>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_bootconfig_parser_write(self.to_glib_none().0, output.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_bootconfig_parser_write(self.to_glib_none().0, output.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,9 +95,9 @@ impl BootconfigParser {
|
|||||||
#[doc(alias = "ostree_bootconfig_parser_write_at")]
|
#[doc(alias = "ostree_bootconfig_parser_write_at")]
|
||||||
pub fn write_at(&self, dfd: i32, path: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn write_at(&self, dfd: i32, path: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_bootconfig_parser_write_at(self.to_glib_none().0, dfd, path.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_bootconfig_parser_write_at(self.to_glib_none().0, dfd, path.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -111,9 +108,3 @@ impl Default for BootconfigParser {
|
|||||||
Self::new()
|
Self::new()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for BootconfigParser {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("BootconfigParser")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
9
rust-bindings/src/auto/collection_ref.rs
generated
9
rust-bindings/src/auto/collection_ref.rs
generated
@ -2,8 +2,7 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::hash;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[derive(Debug, PartialOrd, Ord)]
|
#[derive(Debug, PartialOrd, Ord)]
|
||||||
@ -48,9 +47,9 @@ impl PartialEq for CollectionRef {
|
|||||||
|
|
||||||
impl Eq for CollectionRef {}
|
impl Eq for CollectionRef {}
|
||||||
|
|
||||||
impl hash::Hash for CollectionRef {
|
impl std::hash::Hash for CollectionRef {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn hash<H>(&self, state: &mut H) where H: hash::Hasher {
|
fn hash<H>(&self, state: &mut H) where H: std::hash::Hasher {
|
||||||
hash::Hash::hash(&self.hash(), state)
|
std::hash::Hash::hash(&self.hash(), state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
rust-bindings/src/auto/commit_sizes_entry.rs
generated
4
rust-bindings/src/auto/commit_sizes_entry.rs
generated
@ -2,8 +2,8 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::ObjectType;
|
use crate::{ObjectType};
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
|
100
rust-bindings/src/auto/constants.rs
generated
100
rust-bindings/src/auto/constants.rs
generated
@ -2,75 +2,75 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use std::ffi::CStr;
|
use glib::{GStr};
|
||||||
|
|
||||||
#[doc(alias = "OSTREE_COMMIT_GVARIANT_STRING")]
|
#[doc(alias = "OSTREE_COMMIT_GVARIANT_STRING")]
|
||||||
pub static COMMIT_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_GVARIANT_STRING).to_str().unwrap()});
|
pub static COMMIT_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_GVARIANT_STRING)};
|
||||||
#[cfg(any(feature = "v2020_4", feature = "dox"))]
|
#[cfg(feature = "v2020_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
|
||||||
#[doc(alias = "OSTREE_COMMIT_META_KEY_ARCHITECTURE")]
|
#[doc(alias = "OSTREE_COMMIT_META_KEY_ARCHITECTURE")]
|
||||||
pub static COMMIT_META_KEY_ARCHITECTURE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_ARCHITECTURE).to_str().unwrap()});
|
pub static COMMIT_META_KEY_ARCHITECTURE: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_ARCHITECTURE)};
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
#[doc(alias = "OSTREE_COMMIT_META_KEY_COLLECTION_BINDING")]
|
#[doc(alias = "OSTREE_COMMIT_META_KEY_COLLECTION_BINDING")]
|
||||||
pub static COMMIT_META_KEY_COLLECTION_BINDING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_COLLECTION_BINDING).to_str().unwrap()});
|
pub static COMMIT_META_KEY_COLLECTION_BINDING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_COLLECTION_BINDING)};
|
||||||
#[cfg(any(feature = "v2017_7", feature = "dox"))]
|
#[cfg(feature = "v2017_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
|
||||||
#[doc(alias = "OSTREE_COMMIT_META_KEY_ENDOFLIFE")]
|
#[doc(alias = "OSTREE_COMMIT_META_KEY_ENDOFLIFE")]
|
||||||
pub static COMMIT_META_KEY_ENDOFLIFE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_ENDOFLIFE).to_str().unwrap()});
|
pub static COMMIT_META_KEY_ENDOFLIFE: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_ENDOFLIFE)};
|
||||||
#[cfg(any(feature = "v2017_7", feature = "dox"))]
|
#[cfg(feature = "v2017_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
|
||||||
#[doc(alias = "OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE")]
|
#[doc(alias = "OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE")]
|
||||||
pub static COMMIT_META_KEY_ENDOFLIFE_REBASE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE).to_str().unwrap()});
|
pub static COMMIT_META_KEY_ENDOFLIFE_REBASE: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE)};
|
||||||
#[cfg(any(feature = "v2017_9", feature = "dox"))]
|
#[cfg(feature = "v2017_9")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_9")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_9")))]
|
||||||
#[doc(alias = "OSTREE_COMMIT_META_KEY_REF_BINDING")]
|
#[doc(alias = "OSTREE_COMMIT_META_KEY_REF_BINDING")]
|
||||||
pub static COMMIT_META_KEY_REF_BINDING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_REF_BINDING).to_str().unwrap()});
|
pub static COMMIT_META_KEY_REF_BINDING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_REF_BINDING)};
|
||||||
#[cfg(any(feature = "v2017_13", feature = "dox"))]
|
#[cfg(feature = "v2017_13")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
|
||||||
#[doc(alias = "OSTREE_COMMIT_META_KEY_SOURCE_TITLE")]
|
#[doc(alias = "OSTREE_COMMIT_META_KEY_SOURCE_TITLE")]
|
||||||
pub static COMMIT_META_KEY_SOURCE_TITLE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_SOURCE_TITLE).to_str().unwrap()});
|
pub static COMMIT_META_KEY_SOURCE_TITLE: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_SOURCE_TITLE)};
|
||||||
#[cfg(any(feature = "v2014_9", feature = "dox"))]
|
#[cfg(feature = "v2014_9")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2014_9")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2014_9")))]
|
||||||
#[doc(alias = "OSTREE_COMMIT_META_KEY_VERSION")]
|
#[doc(alias = "OSTREE_COMMIT_META_KEY_VERSION")]
|
||||||
pub static COMMIT_META_KEY_VERSION: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_COMMIT_META_KEY_VERSION).to_str().unwrap()});
|
pub static COMMIT_META_KEY_VERSION: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_COMMIT_META_KEY_VERSION)};
|
||||||
#[doc(alias = "OSTREE_DIRMETA_GVARIANT_STRING")]
|
#[doc(alias = "OSTREE_DIRMETA_GVARIANT_STRING")]
|
||||||
pub static DIRMETA_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_DIRMETA_GVARIANT_STRING).to_str().unwrap()});
|
pub static DIRMETA_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_DIRMETA_GVARIANT_STRING)};
|
||||||
#[doc(alias = "OSTREE_FILEMETA_GVARIANT_STRING")]
|
#[doc(alias = "OSTREE_FILEMETA_GVARIANT_STRING")]
|
||||||
pub static FILEMETA_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_FILEMETA_GVARIANT_STRING).to_str().unwrap()});
|
pub static FILEMETA_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_FILEMETA_GVARIANT_STRING)};
|
||||||
#[doc(alias = "OSTREE_GPG_KEY_GVARIANT_STRING")]
|
#[doc(alias = "OSTREE_GPG_KEY_GVARIANT_STRING")]
|
||||||
pub static GPG_KEY_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_GPG_KEY_GVARIANT_STRING).to_str().unwrap()});
|
pub static GPG_KEY_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_GPG_KEY_GVARIANT_STRING)};
|
||||||
#[cfg(any(feature = "v2021_1", feature = "dox"))]
|
#[cfg(feature = "v2021_1")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
|
||||||
#[doc(alias = "OSTREE_METADATA_KEY_BOOTABLE")]
|
#[doc(alias = "OSTREE_METADATA_KEY_BOOTABLE")]
|
||||||
pub static METADATA_KEY_BOOTABLE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_METADATA_KEY_BOOTABLE).to_str().unwrap()});
|
pub static METADATA_KEY_BOOTABLE: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_METADATA_KEY_BOOTABLE)};
|
||||||
#[cfg(any(feature = "v2021_1", feature = "dox"))]
|
#[cfg(feature = "v2021_1")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
|
||||||
#[doc(alias = "OSTREE_METADATA_KEY_LINUX")]
|
#[doc(alias = "OSTREE_METADATA_KEY_LINUX")]
|
||||||
pub static METADATA_KEY_LINUX: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_METADATA_KEY_LINUX).to_str().unwrap()});
|
pub static METADATA_KEY_LINUX: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_METADATA_KEY_LINUX)};
|
||||||
#[cfg(any(feature = "v2018_9", feature = "dox"))]
|
#[cfg(feature = "v2018_9")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_9")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_9")))]
|
||||||
#[doc(alias = "OSTREE_META_KEY_DEPLOY_COLLECTION_ID")]
|
#[doc(alias = "OSTREE_META_KEY_DEPLOY_COLLECTION_ID")]
|
||||||
pub static META_KEY_DEPLOY_COLLECTION_ID: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_META_KEY_DEPLOY_COLLECTION_ID).to_str().unwrap()});
|
pub static META_KEY_DEPLOY_COLLECTION_ID: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_META_KEY_DEPLOY_COLLECTION_ID)};
|
||||||
#[cfg(any(feature = "v2018_3", feature = "dox"))]
|
#[cfg(feature = "v2018_3")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
|
||||||
#[doc(alias = "OSTREE_ORIGIN_TRANSIENT_GROUP")]
|
#[doc(alias = "OSTREE_ORIGIN_TRANSIENT_GROUP")]
|
||||||
pub static ORIGIN_TRANSIENT_GROUP: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_ORIGIN_TRANSIENT_GROUP).to_str().unwrap()});
|
pub static ORIGIN_TRANSIENT_GROUP: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_ORIGIN_TRANSIENT_GROUP)};
|
||||||
#[cfg(any(feature = "v2022_2", feature = "dox"))]
|
#[cfg(feature = "v2022_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2022_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2022_2")))]
|
||||||
#[doc(alias = "OSTREE_PATH_BOOTED")]
|
#[doc(alias = "OSTREE_PATH_BOOTED")]
|
||||||
pub static PATH_BOOTED: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_PATH_BOOTED).to_str().unwrap()});
|
pub static PATH_BOOTED: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_PATH_BOOTED)};
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
#[doc(alias = "OSTREE_REPO_METADATA_REF")]
|
#[doc(alias = "OSTREE_REPO_METADATA_REF")]
|
||||||
pub static REPO_METADATA_REF: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_REPO_METADATA_REF).to_str().unwrap()});
|
pub static REPO_METADATA_REF: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_REPO_METADATA_REF)};
|
||||||
#[cfg(any(feature = "v2020_4", feature = "dox"))]
|
#[cfg(feature = "v2020_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
|
||||||
#[doc(alias = "OSTREE_SIGN_NAME_ED25519")]
|
#[doc(alias = "OSTREE_SIGN_NAME_ED25519")]
|
||||||
pub static SIGN_NAME_ED25519: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_SIGN_NAME_ED25519).to_str().unwrap()});
|
pub static SIGN_NAME_ED25519: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_SIGN_NAME_ED25519)};
|
||||||
#[doc(alias = "OSTREE_SUMMARY_GVARIANT_STRING")]
|
#[doc(alias = "OSTREE_SUMMARY_GVARIANT_STRING")]
|
||||||
pub static SUMMARY_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_SUMMARY_GVARIANT_STRING).to_str().unwrap()});
|
pub static SUMMARY_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_SUMMARY_GVARIANT_STRING)};
|
||||||
#[doc(alias = "OSTREE_SUMMARY_SIG_GVARIANT_STRING")]
|
#[doc(alias = "OSTREE_SUMMARY_SIG_GVARIANT_STRING")]
|
||||||
pub static SUMMARY_SIG_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_SUMMARY_SIG_GVARIANT_STRING).to_str().unwrap()});
|
pub static SUMMARY_SIG_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_SUMMARY_SIG_GVARIANT_STRING)};
|
||||||
#[doc(alias = "OSTREE_TREE_GVARIANT_STRING")]
|
#[doc(alias = "OSTREE_TREE_GVARIANT_STRING")]
|
||||||
pub static TREE_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ffi::OSTREE_TREE_GVARIANT_STRING).to_str().unwrap()});
|
pub static TREE_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_TREE_GVARIANT_STRING)};
|
||||||
|
13
rust-bindings/src/auto/content_writer.rs
generated
13
rust-bindings/src/auto/content_writer.rs
generated
@ -2,10 +2,7 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::object::IsA;
|
use glib::{prelude::*,translate::*};
|
||||||
use glib::translate::*;
|
|
||||||
use std::fmt;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeContentWriter")]
|
#[doc(alias = "OstreeContentWriter")]
|
||||||
@ -20,15 +17,9 @@ impl ContentWriter {
|
|||||||
#[doc(alias = "ostree_content_writer_finish")]
|
#[doc(alias = "ostree_content_writer_finish")]
|
||||||
pub fn finish(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::GString, glib::Error> {
|
pub fn finish(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::GString, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_content_writer_finish(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let ret = ffi::ostree_content_writer_finish(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for ContentWriter {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("ContentWriter")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
46
rust-bindings/src/auto/deployment.rs
generated
46
rust-bindings/src/auto/deployment.rs
generated
@ -2,12 +2,11 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::BootconfigParser;
|
use crate::{BootconfigParser};
|
||||||
#[cfg(any(feature = "v2016_4", feature = "dox"))]
|
#[cfg(feature = "v2016_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
|
||||||
use crate::DeploymentUnlockedState;
|
use crate::{DeploymentUnlockedState};
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeDeployment")]
|
#[doc(alias = "OstreeDeployment")]
|
||||||
@ -113,8 +112,8 @@ impl Deployment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2016_4", feature = "dox"))]
|
#[cfg(feature = "v2016_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
|
||||||
#[doc(alias = "ostree_deployment_get_unlocked")]
|
#[doc(alias = "ostree_deployment_get_unlocked")]
|
||||||
#[doc(alias = "get_unlocked")]
|
#[doc(alias = "get_unlocked")]
|
||||||
pub fn unlocked(&self) -> DeploymentUnlockedState {
|
pub fn unlocked(&self) -> DeploymentUnlockedState {
|
||||||
@ -130,8 +129,17 @@ impl Deployment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_3", feature = "dox"))]
|
#[cfg(feature = "v2023_8")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2023_8")))]
|
||||||
|
#[doc(alias = "ostree_deployment_is_finalization_locked")]
|
||||||
|
pub fn is_finalization_locked(&self) -> bool {
|
||||||
|
unsafe {
|
||||||
|
from_glib(ffi::ostree_deployment_is_finalization_locked(self.to_glib_none().0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "v2018_3")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
|
||||||
#[doc(alias = "ostree_deployment_is_pinned")]
|
#[doc(alias = "ostree_deployment_is_pinned")]
|
||||||
pub fn is_pinned(&self) -> bool {
|
pub fn is_pinned(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -139,8 +147,8 @@ impl Deployment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_3", feature = "dox"))]
|
#[cfg(feature = "v2018_3")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
|
||||||
#[doc(alias = "ostree_deployment_is_staged")]
|
#[doc(alias = "ostree_deployment_is_staged")]
|
||||||
pub fn is_staged(&self) -> bool {
|
pub fn is_staged(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -176,8 +184,8 @@ impl Deployment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_3", feature = "dox"))]
|
#[cfg(feature = "v2018_3")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
|
||||||
#[doc(alias = "ostree_deployment_origin_remove_transient_state")]
|
#[doc(alias = "ostree_deployment_origin_remove_transient_state")]
|
||||||
pub fn origin_remove_transient_state(origin: &glib::KeyFile) {
|
pub fn origin_remove_transient_state(origin: &glib::KeyFile) {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -185,8 +193,8 @@ impl Deployment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2016_4", feature = "dox"))]
|
#[cfg(feature = "v2016_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
|
||||||
#[doc(alias = "ostree_deployment_unlocked_state_to_string")]
|
#[doc(alias = "ostree_deployment_unlocked_state_to_string")]
|
||||||
pub fn unlocked_state_to_string(state: DeploymentUnlockedState) -> glib::GString {
|
pub fn unlocked_state_to_string(state: DeploymentUnlockedState) -> glib::GString {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -194,9 +202,3 @@ impl Deployment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Deployment {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("Deployment")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
318
rust-bindings/src/auto/enums.rs
generated
318
rust-bindings/src/auto/enums.rs
generated
@ -2,8 +2,7 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
@ -22,44 +21,35 @@ pub enum DeploymentUnlockedState {
|
|||||||
__Unknown(i32),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for DeploymentUnlockedState {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "DeploymentUnlockedState::{}", match *self {
|
|
||||||
Self::None => "None",
|
|
||||||
Self::Development => "Development",
|
|
||||||
Self::Hotfix => "Hotfix",
|
|
||||||
Self::Transient => "Transient",
|
|
||||||
_ => "Unknown",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for DeploymentUnlockedState {
|
impl IntoGlib for DeploymentUnlockedState {
|
||||||
type GlibType = ffi::OstreeDeploymentUnlockedState;
|
type GlibType = ffi::OstreeDeploymentUnlockedState;
|
||||||
|
|
||||||
fn into_glib(self) -> ffi::OstreeDeploymentUnlockedState {
|
#[inline]
|
||||||
match self {
|
fn into_glib(self) -> ffi::OstreeDeploymentUnlockedState {
|
||||||
|
match self {
|
||||||
Self::None => ffi::OSTREE_DEPLOYMENT_UNLOCKED_NONE,
|
Self::None => ffi::OSTREE_DEPLOYMENT_UNLOCKED_NONE,
|
||||||
Self::Development => ffi::OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT,
|
Self::Development => ffi::OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT,
|
||||||
Self::Hotfix => ffi::OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX,
|
Self::Hotfix => ffi::OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX,
|
||||||
Self::Transient => ffi::OSTREE_DEPLOYMENT_UNLOCKED_TRANSIENT,
|
Self::Transient => ffi::OSTREE_DEPLOYMENT_UNLOCKED_TRANSIENT,
|
||||||
Self::__Unknown(value) => value,
|
Self::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeDeploymentUnlockedState> for DeploymentUnlockedState {
|
impl FromGlib<ffi::OstreeDeploymentUnlockedState> for DeploymentUnlockedState {
|
||||||
unsafe fn from_glib(value: ffi::OstreeDeploymentUnlockedState) -> Self {
|
#[inline]
|
||||||
match value {
|
unsafe fn from_glib(value: ffi::OstreeDeploymentUnlockedState) -> Self {
|
||||||
|
|
||||||
|
match value {
|
||||||
ffi::OSTREE_DEPLOYMENT_UNLOCKED_NONE => Self::None,
|
ffi::OSTREE_DEPLOYMENT_UNLOCKED_NONE => Self::None,
|
||||||
ffi::OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT => Self::Development,
|
ffi::OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT => Self::Development,
|
||||||
ffi::OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX => Self::Hotfix,
|
ffi::OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX => Self::Hotfix,
|
||||||
ffi::OSTREE_DEPLOYMENT_UNLOCKED_TRANSIENT => Self::Transient,
|
ffi::OSTREE_DEPLOYMENT_UNLOCKED_TRANSIENT => Self::Transient,
|
||||||
value => Self::__Unknown(value),
|
value => Self::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
@ -101,35 +91,12 @@ pub enum GpgSignatureAttr {
|
|||||||
__Unknown(i32),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for GpgSignatureAttr {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "GpgSignatureAttr::{}", match *self {
|
|
||||||
Self::Valid => "Valid",
|
|
||||||
Self::SigExpired => "SigExpired",
|
|
||||||
Self::KeyExpired => "KeyExpired",
|
|
||||||
Self::KeyRevoked => "KeyRevoked",
|
|
||||||
Self::KeyMissing => "KeyMissing",
|
|
||||||
Self::Fingerprint => "Fingerprint",
|
|
||||||
Self::Timestamp => "Timestamp",
|
|
||||||
Self::ExpTimestamp => "ExpTimestamp",
|
|
||||||
Self::PubkeyAlgoName => "PubkeyAlgoName",
|
|
||||||
Self::HashAlgoName => "HashAlgoName",
|
|
||||||
Self::UserName => "UserName",
|
|
||||||
Self::UserEmail => "UserEmail",
|
|
||||||
Self::FingerprintPrimary => "FingerprintPrimary",
|
|
||||||
Self::KeyExpTimestamp => "KeyExpTimestamp",
|
|
||||||
Self::KeyExpTimestampPrimary => "KeyExpTimestampPrimary",
|
|
||||||
_ => "Unknown",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for GpgSignatureAttr {
|
impl IntoGlib for GpgSignatureAttr {
|
||||||
type GlibType = ffi::OstreeGpgSignatureAttr;
|
type GlibType = ffi::OstreeGpgSignatureAttr;
|
||||||
|
|
||||||
fn into_glib(self) -> ffi::OstreeGpgSignatureAttr {
|
fn into_glib(self) -> ffi::OstreeGpgSignatureAttr {
|
||||||
match self {
|
match self {
|
||||||
Self::Valid => ffi::OSTREE_GPG_SIGNATURE_ATTR_VALID,
|
Self::Valid => ffi::OSTREE_GPG_SIGNATURE_ATTR_VALID,
|
||||||
Self::SigExpired => ffi::OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED,
|
Self::SigExpired => ffi::OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED,
|
||||||
Self::KeyExpired => ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED,
|
Self::KeyExpired => ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED,
|
||||||
@ -147,13 +114,14 @@ impl IntoGlib for GpgSignatureAttr {
|
|||||||
Self::KeyExpTimestampPrimary => ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY,
|
Self::KeyExpTimestampPrimary => ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY,
|
||||||
Self::__Unknown(value) => value,
|
Self::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeGpgSignatureAttr> for GpgSignatureAttr {
|
impl FromGlib<ffi::OstreeGpgSignatureAttr> for GpgSignatureAttr {
|
||||||
unsafe fn from_glib(value: ffi::OstreeGpgSignatureAttr) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeGpgSignatureAttr) -> Self {
|
||||||
match value {
|
|
||||||
|
match value {
|
||||||
ffi::OSTREE_GPG_SIGNATURE_ATTR_VALID => Self::Valid,
|
ffi::OSTREE_GPG_SIGNATURE_ATTR_VALID => Self::Valid,
|
||||||
ffi::OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED => Self::SigExpired,
|
ffi::OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED => Self::SigExpired,
|
||||||
ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED => Self::KeyExpired,
|
ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED => Self::KeyExpired,
|
||||||
@ -171,7 +139,7 @@ impl FromGlib<ffi::OstreeGpgSignatureAttr> for GpgSignatureAttr {
|
|||||||
ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY => Self::KeyExpTimestampPrimary,
|
ffi::OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY => Self::KeyExpTimestampPrimary,
|
||||||
value => Self::__Unknown(value),
|
value => Self::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
@ -201,29 +169,13 @@ pub enum ObjectType {
|
|||||||
__Unknown(i32),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for ObjectType {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "ObjectType::{}", match *self {
|
|
||||||
Self::File => "File",
|
|
||||||
Self::DirTree => "DirTree",
|
|
||||||
Self::DirMeta => "DirMeta",
|
|
||||||
Self::Commit => "Commit",
|
|
||||||
Self::TombstoneCommit => "TombstoneCommit",
|
|
||||||
Self::CommitMeta => "CommitMeta",
|
|
||||||
Self::PayloadLink => "PayloadLink",
|
|
||||||
Self::FileXattrs => "FileXattrs",
|
|
||||||
Self::FileXattrsLink => "FileXattrsLink",
|
|
||||||
_ => "Unknown",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for ObjectType {
|
impl IntoGlib for ObjectType {
|
||||||
type GlibType = ffi::OstreeObjectType;
|
type GlibType = ffi::OstreeObjectType;
|
||||||
|
|
||||||
fn into_glib(self) -> ffi::OstreeObjectType {
|
#[inline]
|
||||||
match self {
|
fn into_glib(self) -> ffi::OstreeObjectType {
|
||||||
|
match self {
|
||||||
Self::File => ffi::OSTREE_OBJECT_TYPE_FILE,
|
Self::File => ffi::OSTREE_OBJECT_TYPE_FILE,
|
||||||
Self::DirTree => ffi::OSTREE_OBJECT_TYPE_DIR_TREE,
|
Self::DirTree => ffi::OSTREE_OBJECT_TYPE_DIR_TREE,
|
||||||
Self::DirMeta => ffi::OSTREE_OBJECT_TYPE_DIR_META,
|
Self::DirMeta => ffi::OSTREE_OBJECT_TYPE_DIR_META,
|
||||||
@ -235,13 +187,15 @@ impl IntoGlib for ObjectType {
|
|||||||
Self::FileXattrsLink => ffi::OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK,
|
Self::FileXattrsLink => ffi::OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK,
|
||||||
Self::__Unknown(value) => value,
|
Self::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeObjectType> for ObjectType {
|
impl FromGlib<ffi::OstreeObjectType> for ObjectType {
|
||||||
unsafe fn from_glib(value: ffi::OstreeObjectType) -> Self {
|
#[inline]
|
||||||
match value {
|
unsafe fn from_glib(value: ffi::OstreeObjectType) -> Self {
|
||||||
|
|
||||||
|
match value {
|
||||||
ffi::OSTREE_OBJECT_TYPE_FILE => Self::File,
|
ffi::OSTREE_OBJECT_TYPE_FILE => Self::File,
|
||||||
ffi::OSTREE_OBJECT_TYPE_DIR_TREE => Self::DirTree,
|
ffi::OSTREE_OBJECT_TYPE_DIR_TREE => Self::DirTree,
|
||||||
ffi::OSTREE_OBJECT_TYPE_DIR_META => Self::DirMeta,
|
ffi::OSTREE_OBJECT_TYPE_DIR_META => Self::DirMeta,
|
||||||
@ -253,11 +207,11 @@ impl FromGlib<ffi::OstreeObjectType> for ObjectType {
|
|||||||
ffi::OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK => Self::FileXattrsLink,
|
ffi::OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK => Self::FileXattrsLink,
|
||||||
value => Self::__Unknown(value),
|
value => Self::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_2", feature = "dox"))]
|
#[cfg(feature = "v2018_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_2")))]
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
@ -271,44 +225,35 @@ pub enum RepoCheckoutFilterResult {
|
|||||||
__Unknown(i32),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_2", feature = "dox"))]
|
#[cfg(feature = "v2018_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_2")))]
|
||||||
impl fmt::Display for RepoCheckoutFilterResult {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "RepoCheckoutFilterResult::{}", match *self {
|
|
||||||
Self::Allow => "Allow",
|
|
||||||
Self::Skip => "Skip",
|
|
||||||
_ => "Unknown",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoCheckoutFilterResult {
|
impl IntoGlib for RepoCheckoutFilterResult {
|
||||||
type GlibType = ffi::OstreeRepoCheckoutFilterResult;
|
type GlibType = ffi::OstreeRepoCheckoutFilterResult;
|
||||||
|
|
||||||
fn into_glib(self) -> ffi::OstreeRepoCheckoutFilterResult {
|
#[inline]
|
||||||
match self {
|
fn into_glib(self) -> ffi::OstreeRepoCheckoutFilterResult {
|
||||||
|
match self {
|
||||||
Self::Allow => ffi::OSTREE_REPO_CHECKOUT_FILTER_ALLOW,
|
Self::Allow => ffi::OSTREE_REPO_CHECKOUT_FILTER_ALLOW,
|
||||||
Self::Skip => ffi::OSTREE_REPO_CHECKOUT_FILTER_SKIP,
|
Self::Skip => ffi::OSTREE_REPO_CHECKOUT_FILTER_SKIP,
|
||||||
Self::__Unknown(value) => value,
|
Self::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_2", feature = "dox"))]
|
#[cfg(feature = "v2018_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_2")))]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoCheckoutFilterResult> for RepoCheckoutFilterResult {
|
impl FromGlib<ffi::OstreeRepoCheckoutFilterResult> for RepoCheckoutFilterResult {
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoCheckoutFilterResult) -> Self {
|
#[inline]
|
||||||
match value {
|
unsafe fn from_glib(value: ffi::OstreeRepoCheckoutFilterResult) -> Self {
|
||||||
|
|
||||||
|
match value {
|
||||||
ffi::OSTREE_REPO_CHECKOUT_FILTER_ALLOW => Self::Allow,
|
ffi::OSTREE_REPO_CHECKOUT_FILTER_ALLOW => Self::Allow,
|
||||||
ffi::OSTREE_REPO_CHECKOUT_FILTER_SKIP => Self::Skip,
|
ffi::OSTREE_REPO_CHECKOUT_FILTER_SKIP => Self::Skip,
|
||||||
value => Self::__Unknown(value),
|
value => Self::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
@ -324,38 +269,31 @@ pub enum RepoCheckoutMode {
|
|||||||
__Unknown(i32),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoCheckoutMode {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "RepoCheckoutMode::{}", match *self {
|
|
||||||
Self::None => "None",
|
|
||||||
Self::User => "User",
|
|
||||||
_ => "Unknown",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoCheckoutMode {
|
impl IntoGlib for RepoCheckoutMode {
|
||||||
type GlibType = ffi::OstreeRepoCheckoutMode;
|
type GlibType = ffi::OstreeRepoCheckoutMode;
|
||||||
|
|
||||||
fn into_glib(self) -> ffi::OstreeRepoCheckoutMode {
|
#[inline]
|
||||||
match self {
|
fn into_glib(self) -> ffi::OstreeRepoCheckoutMode {
|
||||||
|
match self {
|
||||||
Self::None => ffi::OSTREE_REPO_CHECKOUT_MODE_NONE,
|
Self::None => ffi::OSTREE_REPO_CHECKOUT_MODE_NONE,
|
||||||
Self::User => ffi::OSTREE_REPO_CHECKOUT_MODE_USER,
|
Self::User => ffi::OSTREE_REPO_CHECKOUT_MODE_USER,
|
||||||
Self::__Unknown(value) => value,
|
Self::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoCheckoutMode> for RepoCheckoutMode {
|
impl FromGlib<ffi::OstreeRepoCheckoutMode> for RepoCheckoutMode {
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoCheckoutMode) -> Self {
|
#[inline]
|
||||||
match value {
|
unsafe fn from_glib(value: ffi::OstreeRepoCheckoutMode) -> Self {
|
||||||
|
|
||||||
|
match value {
|
||||||
ffi::OSTREE_REPO_CHECKOUT_MODE_NONE => Self::None,
|
ffi::OSTREE_REPO_CHECKOUT_MODE_NONE => Self::None,
|
||||||
ffi::OSTREE_REPO_CHECKOUT_MODE_USER => Self::User,
|
ffi::OSTREE_REPO_CHECKOUT_MODE_USER => Self::User,
|
||||||
value => Self::__Unknown(value),
|
value => Self::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
@ -375,44 +313,35 @@ pub enum RepoCheckoutOverwriteMode {
|
|||||||
__Unknown(i32),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoCheckoutOverwriteMode {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "RepoCheckoutOverwriteMode::{}", match *self {
|
|
||||||
Self::None => "None",
|
|
||||||
Self::UnionFiles => "UnionFiles",
|
|
||||||
Self::AddFiles => "AddFiles",
|
|
||||||
Self::UnionIdentical => "UnionIdentical",
|
|
||||||
_ => "Unknown",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoCheckoutOverwriteMode {
|
impl IntoGlib for RepoCheckoutOverwriteMode {
|
||||||
type GlibType = ffi::OstreeRepoCheckoutOverwriteMode;
|
type GlibType = ffi::OstreeRepoCheckoutOverwriteMode;
|
||||||
|
|
||||||
fn into_glib(self) -> ffi::OstreeRepoCheckoutOverwriteMode {
|
#[inline]
|
||||||
match self {
|
fn into_glib(self) -> ffi::OstreeRepoCheckoutOverwriteMode {
|
||||||
|
match self {
|
||||||
Self::None => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_NONE,
|
Self::None => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_NONE,
|
||||||
Self::UnionFiles => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES,
|
Self::UnionFiles => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES,
|
||||||
Self::AddFiles => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES,
|
Self::AddFiles => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES,
|
||||||
Self::UnionIdentical => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL,
|
Self::UnionIdentical => ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL,
|
||||||
Self::__Unknown(value) => value,
|
Self::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoCheckoutOverwriteMode> for RepoCheckoutOverwriteMode {
|
impl FromGlib<ffi::OstreeRepoCheckoutOverwriteMode> for RepoCheckoutOverwriteMode {
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoCheckoutOverwriteMode) -> Self {
|
#[inline]
|
||||||
match value {
|
unsafe fn from_glib(value: ffi::OstreeRepoCheckoutOverwriteMode) -> Self {
|
||||||
|
|
||||||
|
match value {
|
||||||
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_NONE => Self::None,
|
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_NONE => Self::None,
|
||||||
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES => Self::UnionFiles,
|
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES => Self::UnionFiles,
|
||||||
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES => Self::AddFiles,
|
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES => Self::AddFiles,
|
||||||
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL => Self::UnionIdentical,
|
ffi::OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL => Self::UnionIdentical,
|
||||||
value => Self::__Unknown(value),
|
value => Self::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
@ -428,38 +357,31 @@ pub enum RepoCommitFilterResult {
|
|||||||
__Unknown(i32),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoCommitFilterResult {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "RepoCommitFilterResult::{}", match *self {
|
|
||||||
Self::Allow => "Allow",
|
|
||||||
Self::Skip => "Skip",
|
|
||||||
_ => "Unknown",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoCommitFilterResult {
|
impl IntoGlib for RepoCommitFilterResult {
|
||||||
type GlibType = ffi::OstreeRepoCommitFilterResult;
|
type GlibType = ffi::OstreeRepoCommitFilterResult;
|
||||||
|
|
||||||
fn into_glib(self) -> ffi::OstreeRepoCommitFilterResult {
|
#[inline]
|
||||||
match self {
|
fn into_glib(self) -> ffi::OstreeRepoCommitFilterResult {
|
||||||
|
match self {
|
||||||
Self::Allow => ffi::OSTREE_REPO_COMMIT_FILTER_ALLOW,
|
Self::Allow => ffi::OSTREE_REPO_COMMIT_FILTER_ALLOW,
|
||||||
Self::Skip => ffi::OSTREE_REPO_COMMIT_FILTER_SKIP,
|
Self::Skip => ffi::OSTREE_REPO_COMMIT_FILTER_SKIP,
|
||||||
Self::__Unknown(value) => value,
|
Self::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoCommitFilterResult> for RepoCommitFilterResult {
|
impl FromGlib<ffi::OstreeRepoCommitFilterResult> for RepoCommitFilterResult {
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoCommitFilterResult) -> Self {
|
#[inline]
|
||||||
match value {
|
unsafe fn from_glib(value: ffi::OstreeRepoCommitFilterResult) -> Self {
|
||||||
|
|
||||||
|
match value {
|
||||||
ffi::OSTREE_REPO_COMMIT_FILTER_ALLOW => Self::Allow,
|
ffi::OSTREE_REPO_COMMIT_FILTER_ALLOW => Self::Allow,
|
||||||
ffi::OSTREE_REPO_COMMIT_FILTER_SKIP => Self::Skip,
|
ffi::OSTREE_REPO_COMMIT_FILTER_SKIP => Self::Skip,
|
||||||
value => Self::__Unknown(value),
|
value => Self::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
@ -479,44 +401,35 @@ pub enum RepoCommitIterResult {
|
|||||||
__Unknown(i32),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoCommitIterResult {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "RepoCommitIterResult::{}", match *self {
|
|
||||||
Self::Error => "Error",
|
|
||||||
Self::End => "End",
|
|
||||||
Self::File => "File",
|
|
||||||
Self::Dir => "Dir",
|
|
||||||
_ => "Unknown",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoCommitIterResult {
|
impl IntoGlib for RepoCommitIterResult {
|
||||||
type GlibType = ffi::OstreeRepoCommitIterResult;
|
type GlibType = ffi::OstreeRepoCommitIterResult;
|
||||||
|
|
||||||
fn into_glib(self) -> ffi::OstreeRepoCommitIterResult {
|
#[inline]
|
||||||
match self {
|
fn into_glib(self) -> ffi::OstreeRepoCommitIterResult {
|
||||||
|
match self {
|
||||||
Self::Error => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_ERROR,
|
Self::Error => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_ERROR,
|
||||||
Self::End => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_END,
|
Self::End => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_END,
|
||||||
Self::File => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_FILE,
|
Self::File => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_FILE,
|
||||||
Self::Dir => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_DIR,
|
Self::Dir => ffi::OSTREE_REPO_COMMIT_ITER_RESULT_DIR,
|
||||||
Self::__Unknown(value) => value,
|
Self::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoCommitIterResult> for RepoCommitIterResult {
|
impl FromGlib<ffi::OstreeRepoCommitIterResult> for RepoCommitIterResult {
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoCommitIterResult) -> Self {
|
#[inline]
|
||||||
match value {
|
unsafe fn from_glib(value: ffi::OstreeRepoCommitIterResult) -> Self {
|
||||||
|
|
||||||
|
match value {
|
||||||
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_ERROR => Self::Error,
|
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_ERROR => Self::Error,
|
||||||
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_END => Self::End,
|
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_END => Self::End,
|
||||||
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_FILE => Self::File,
|
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_FILE => Self::File,
|
||||||
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_DIR => Self::Dir,
|
ffi::OSTREE_REPO_COMMIT_ITER_RESULT_DIR => Self::Dir,
|
||||||
value => Self::__Unknown(value),
|
value => Self::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
@ -538,25 +451,13 @@ pub enum RepoMode {
|
|||||||
__Unknown(i32),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoMode {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "RepoMode::{}", match *self {
|
|
||||||
Self::Bare => "Bare",
|
|
||||||
Self::Archive => "Archive",
|
|
||||||
Self::BareUser => "BareUser",
|
|
||||||
Self::BareUserOnly => "BareUserOnly",
|
|
||||||
Self::BareSplitXattrs => "BareSplitXattrs",
|
|
||||||
_ => "Unknown",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoMode {
|
impl IntoGlib for RepoMode {
|
||||||
type GlibType = ffi::OstreeRepoMode;
|
type GlibType = ffi::OstreeRepoMode;
|
||||||
|
|
||||||
fn into_glib(self) -> ffi::OstreeRepoMode {
|
#[inline]
|
||||||
match self {
|
fn into_glib(self) -> ffi::OstreeRepoMode {
|
||||||
|
match self {
|
||||||
Self::Bare => ffi::OSTREE_REPO_MODE_BARE,
|
Self::Bare => ffi::OSTREE_REPO_MODE_BARE,
|
||||||
Self::Archive => ffi::OSTREE_REPO_MODE_ARCHIVE,
|
Self::Archive => ffi::OSTREE_REPO_MODE_ARCHIVE,
|
||||||
Self::BareUser => ffi::OSTREE_REPO_MODE_BARE_USER,
|
Self::BareUser => ffi::OSTREE_REPO_MODE_BARE_USER,
|
||||||
@ -564,13 +465,15 @@ impl IntoGlib for RepoMode {
|
|||||||
Self::BareSplitXattrs => ffi::OSTREE_REPO_MODE_BARE_SPLIT_XATTRS,
|
Self::BareSplitXattrs => ffi::OSTREE_REPO_MODE_BARE_SPLIT_XATTRS,
|
||||||
Self::__Unknown(value) => value,
|
Self::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoMode> for RepoMode {
|
impl FromGlib<ffi::OstreeRepoMode> for RepoMode {
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoMode) -> Self {
|
#[inline]
|
||||||
match value {
|
unsafe fn from_glib(value: ffi::OstreeRepoMode) -> Self {
|
||||||
|
|
||||||
|
match value {
|
||||||
ffi::OSTREE_REPO_MODE_BARE => Self::Bare,
|
ffi::OSTREE_REPO_MODE_BARE => Self::Bare,
|
||||||
ffi::OSTREE_REPO_MODE_ARCHIVE => Self::Archive,
|
ffi::OSTREE_REPO_MODE_ARCHIVE => Self::Archive,
|
||||||
ffi::OSTREE_REPO_MODE_BARE_USER => Self::BareUser,
|
ffi::OSTREE_REPO_MODE_BARE_USER => Self::BareUser,
|
||||||
@ -578,7 +481,7 @@ impl FromGlib<ffi::OstreeRepoMode> for RepoMode {
|
|||||||
ffi::OSTREE_REPO_MODE_BARE_SPLIT_XATTRS => Self::BareSplitXattrs,
|
ffi::OSTREE_REPO_MODE_BARE_SPLIT_XATTRS => Self::BareSplitXattrs,
|
||||||
value => Self::__Unknown(value),
|
value => Self::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
@ -600,25 +503,13 @@ pub enum RepoRemoteChange {
|
|||||||
__Unknown(i32),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoRemoteChange {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "RepoRemoteChange::{}", match *self {
|
|
||||||
Self::Add => "Add",
|
|
||||||
Self::AddIfNotExists => "AddIfNotExists",
|
|
||||||
Self::Delete => "Delete",
|
|
||||||
Self::DeleteIfExists => "DeleteIfExists",
|
|
||||||
Self::Replace => "Replace",
|
|
||||||
_ => "Unknown",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoRemoteChange {
|
impl IntoGlib for RepoRemoteChange {
|
||||||
type GlibType = ffi::OstreeRepoRemoteChange;
|
type GlibType = ffi::OstreeRepoRemoteChange;
|
||||||
|
|
||||||
fn into_glib(self) -> ffi::OstreeRepoRemoteChange {
|
#[inline]
|
||||||
match self {
|
fn into_glib(self) -> ffi::OstreeRepoRemoteChange {
|
||||||
|
match self {
|
||||||
Self::Add => ffi::OSTREE_REPO_REMOTE_CHANGE_ADD,
|
Self::Add => ffi::OSTREE_REPO_REMOTE_CHANGE_ADD,
|
||||||
Self::AddIfNotExists => ffi::OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS,
|
Self::AddIfNotExists => ffi::OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS,
|
||||||
Self::Delete => ffi::OSTREE_REPO_REMOTE_CHANGE_DELETE,
|
Self::Delete => ffi::OSTREE_REPO_REMOTE_CHANGE_DELETE,
|
||||||
@ -626,13 +517,15 @@ impl IntoGlib for RepoRemoteChange {
|
|||||||
Self::Replace => ffi::OSTREE_REPO_REMOTE_CHANGE_REPLACE,
|
Self::Replace => ffi::OSTREE_REPO_REMOTE_CHANGE_REPLACE,
|
||||||
Self::__Unknown(value) => value,
|
Self::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoRemoteChange> for RepoRemoteChange {
|
impl FromGlib<ffi::OstreeRepoRemoteChange> for RepoRemoteChange {
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoRemoteChange) -> Self {
|
#[inline]
|
||||||
match value {
|
unsafe fn from_glib(value: ffi::OstreeRepoRemoteChange) -> Self {
|
||||||
|
|
||||||
|
match value {
|
||||||
ffi::OSTREE_REPO_REMOTE_CHANGE_ADD => Self::Add,
|
ffi::OSTREE_REPO_REMOTE_CHANGE_ADD => Self::Add,
|
||||||
ffi::OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS => Self::AddIfNotExists,
|
ffi::OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS => Self::AddIfNotExists,
|
||||||
ffi::OSTREE_REPO_REMOTE_CHANGE_DELETE => Self::Delete,
|
ffi::OSTREE_REPO_REMOTE_CHANGE_DELETE => Self::Delete,
|
||||||
@ -640,7 +533,7 @@ impl FromGlib<ffi::OstreeRepoRemoteChange> for RepoRemoteChange {
|
|||||||
ffi::OSTREE_REPO_REMOTE_CHANGE_REPLACE => Self::Replace,
|
ffi::OSTREE_REPO_REMOTE_CHANGE_REPLACE => Self::Replace,
|
||||||
value => Self::__Unknown(value),
|
value => Self::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||||
@ -656,37 +549,30 @@ pub enum StaticDeltaGenerateOpt {
|
|||||||
__Unknown(i32),
|
__Unknown(i32),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for StaticDeltaGenerateOpt {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "StaticDeltaGenerateOpt::{}", match *self {
|
|
||||||
Self::Lowlatency => "Lowlatency",
|
|
||||||
Self::Major => "Major",
|
|
||||||
_ => "Unknown",
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for StaticDeltaGenerateOpt {
|
impl IntoGlib for StaticDeltaGenerateOpt {
|
||||||
type GlibType = ffi::OstreeStaticDeltaGenerateOpt;
|
type GlibType = ffi::OstreeStaticDeltaGenerateOpt;
|
||||||
|
|
||||||
fn into_glib(self) -> ffi::OstreeStaticDeltaGenerateOpt {
|
#[inline]
|
||||||
match self {
|
fn into_glib(self) -> ffi::OstreeStaticDeltaGenerateOpt {
|
||||||
|
match self {
|
||||||
Self::Lowlatency => ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY,
|
Self::Lowlatency => ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY,
|
||||||
Self::Major => ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR,
|
Self::Major => ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR,
|
||||||
Self::__Unknown(value) => value,
|
Self::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeStaticDeltaGenerateOpt> for StaticDeltaGenerateOpt {
|
impl FromGlib<ffi::OstreeStaticDeltaGenerateOpt> for StaticDeltaGenerateOpt {
|
||||||
unsafe fn from_glib(value: ffi::OstreeStaticDeltaGenerateOpt) -> Self {
|
#[inline]
|
||||||
match value {
|
unsafe fn from_glib(value: ffi::OstreeStaticDeltaGenerateOpt) -> Self {
|
||||||
|
|
||||||
|
match value {
|
||||||
ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY => Self::Lowlatency,
|
ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY => Self::Lowlatency,
|
||||||
ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR => Self::Major,
|
ffi::OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR => Self::Major,
|
||||||
value => Self::__Unknown(value),
|
value => Self::__Unknown(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
219
rust-bindings/src/auto/flags.rs
generated
219
rust-bindings/src/auto/flags.rs
generated
@ -2,17 +2,12 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use bitflags::bitflags;
|
use glib::{bitflags::bitflags,prelude::*,translate::*};
|
||||||
use glib::translate::*;
|
|
||||||
use glib::value::FromValue;
|
|
||||||
use glib::value::ToValue;
|
|
||||||
use glib::StaticType;
|
|
||||||
use glib::Type;
|
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_13", feature = "dox"))]
|
#[cfg(feature = "v2017_13")]
|
||||||
bitflags! {
|
bitflags! {
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeChecksumFlags")]
|
#[doc(alias = "OstreeChecksumFlags")]
|
||||||
pub struct ChecksumFlags: u32 {
|
pub struct ChecksumFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_CHECKSUM_FLAGS_NONE")]
|
#[doc(alias = "OSTREE_CHECKSUM_FLAGS_NONE")]
|
||||||
@ -24,35 +19,30 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_13", feature = "dox"))]
|
#[cfg(feature = "v2017_13")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
|
||||||
impl fmt::Display for ChecksumFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_13", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for ChecksumFlags {
|
impl IntoGlib for ChecksumFlags {
|
||||||
type GlibType = ffi::OstreeChecksumFlags;
|
type GlibType = ffi::OstreeChecksumFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeChecksumFlags {
|
fn into_glib(self) -> ffi::OstreeChecksumFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_13", feature = "dox"))]
|
#[cfg(feature = "v2017_13")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeChecksumFlags> for ChecksumFlags {
|
impl FromGlib<ffi::OstreeChecksumFlags> for ChecksumFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeChecksumFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeChecksumFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeDiffFlags")]
|
#[doc(alias = "OstreeDiffFlags")]
|
||||||
pub struct DiffFlags: u32 {
|
pub struct DiffFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_DIFF_FLAGS_NONE")]
|
#[doc(alias = "OSTREE_DIFF_FLAGS_NONE")]
|
||||||
@ -62,16 +52,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for DiffFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for DiffFlags {
|
impl IntoGlib for DiffFlags {
|
||||||
type GlibType = ffi::OstreeDiffFlags;
|
type GlibType = ffi::OstreeDiffFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeDiffFlags {
|
fn into_glib(self) -> ffi::OstreeDiffFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -79,12 +64,14 @@ impl IntoGlib for DiffFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeDiffFlags> for DiffFlags {
|
impl FromGlib<ffi::OstreeDiffFlags> for DiffFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeDiffFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeDiffFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeGpgSignatureFormatFlags")]
|
#[doc(alias = "OstreeGpgSignatureFormatFlags")]
|
||||||
pub struct GpgSignatureFormatFlags: u32 {
|
pub struct GpgSignatureFormatFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT")]
|
#[doc(alias = "OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT")]
|
||||||
@ -92,16 +79,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for GpgSignatureFormatFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for GpgSignatureFormatFlags {
|
impl IntoGlib for GpgSignatureFormatFlags {
|
||||||
type GlibType = ffi::OstreeGpgSignatureFormatFlags;
|
type GlibType = ffi::OstreeGpgSignatureFormatFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeGpgSignatureFormatFlags {
|
fn into_glib(self) -> ffi::OstreeGpgSignatureFormatFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -109,12 +91,14 @@ impl IntoGlib for GpgSignatureFormatFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeGpgSignatureFormatFlags> for GpgSignatureFormatFlags {
|
impl FromGlib<ffi::OstreeGpgSignatureFormatFlags> for GpgSignatureFormatFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeGpgSignatureFormatFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeGpgSignatureFormatFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeRepoCommitModifierFlags")]
|
#[doc(alias = "OstreeRepoCommitModifierFlags")]
|
||||||
pub struct RepoCommitModifierFlags: u32 {
|
pub struct RepoCommitModifierFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE")]
|
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE")]
|
||||||
@ -131,12 +115,8 @@ bitflags! {
|
|||||||
const CONSUME = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME as _;
|
const CONSUME = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME as _;
|
||||||
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL")]
|
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL")]
|
||||||
const DEVINO_CANONICAL = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL as _;
|
const DEVINO_CANONICAL = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL as _;
|
||||||
}
|
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1")]
|
||||||
}
|
const SELINUX_LABEL_V1 = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1 as _;
|
||||||
|
|
||||||
impl fmt::Display for RepoCommitModifierFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,6 +124,7 @@ impl fmt::Display for RepoCommitModifierFlags {
|
|||||||
impl IntoGlib for RepoCommitModifierFlags {
|
impl IntoGlib for RepoCommitModifierFlags {
|
||||||
type GlibType = ffi::OstreeRepoCommitModifierFlags;
|
type GlibType = ffi::OstreeRepoCommitModifierFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeRepoCommitModifierFlags {
|
fn into_glib(self) -> ffi::OstreeRepoCommitModifierFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -151,14 +132,16 @@ impl IntoGlib for RepoCommitModifierFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoCommitModifierFlags> for RepoCommitModifierFlags {
|
impl FromGlib<ffi::OstreeRepoCommitModifierFlags> for RepoCommitModifierFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoCommitModifierFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeRepoCommitModifierFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2015_7", feature = "dox"))]
|
#[cfg(feature = "v2015_7")]
|
||||||
bitflags! {
|
bitflags! {
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeRepoCommitState")]
|
#[doc(alias = "OstreeRepoCommitState")]
|
||||||
pub struct RepoCommitState: u32 {
|
pub struct RepoCommitState: u32 {
|
||||||
#[doc(alias = "OSTREE_REPO_COMMIT_STATE_NORMAL")]
|
#[doc(alias = "OSTREE_REPO_COMMIT_STATE_NORMAL")]
|
||||||
@ -170,35 +153,30 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2015_7", feature = "dox"))]
|
#[cfg(feature = "v2015_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
|
||||||
impl fmt::Display for RepoCommitState {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2015_7", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoCommitState {
|
impl IntoGlib for RepoCommitState {
|
||||||
type GlibType = ffi::OstreeRepoCommitState;
|
type GlibType = ffi::OstreeRepoCommitState;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeRepoCommitState {
|
fn into_glib(self) -> ffi::OstreeRepoCommitState {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2015_7", feature = "dox"))]
|
#[cfg(feature = "v2015_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoCommitState> for RepoCommitState {
|
impl FromGlib<ffi::OstreeRepoCommitState> for RepoCommitState {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoCommitState) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeRepoCommitState) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeRepoCommitTraverseFlags")]
|
#[doc(alias = "OstreeRepoCommitTraverseFlags")]
|
||||||
pub struct RepoCommitTraverseFlags: u32 {
|
pub struct RepoCommitTraverseFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE")]
|
#[doc(alias = "OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE")]
|
||||||
@ -208,16 +186,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoCommitTraverseFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoCommitTraverseFlags {
|
impl IntoGlib for RepoCommitTraverseFlags {
|
||||||
type GlibType = ffi::OstreeRepoCommitTraverseFlags;
|
type GlibType = ffi::OstreeRepoCommitTraverseFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeRepoCommitTraverseFlags {
|
fn into_glib(self) -> ffi::OstreeRepoCommitTraverseFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -225,12 +198,14 @@ impl IntoGlib for RepoCommitTraverseFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoCommitTraverseFlags> for RepoCommitTraverseFlags {
|
impl FromGlib<ffi::OstreeRepoCommitTraverseFlags> for RepoCommitTraverseFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoCommitTraverseFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeRepoCommitTraverseFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeRepoListObjectsFlags")]
|
#[doc(alias = "OstreeRepoListObjectsFlags")]
|
||||||
pub struct RepoListObjectsFlags: u32 {
|
pub struct RepoListObjectsFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_REPO_LIST_OBJECTS_LOOSE")]
|
#[doc(alias = "OSTREE_REPO_LIST_OBJECTS_LOOSE")]
|
||||||
@ -244,16 +219,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoListObjectsFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoListObjectsFlags {
|
impl IntoGlib for RepoListObjectsFlags {
|
||||||
type GlibType = ffi::OstreeRepoListObjectsFlags;
|
type GlibType = ffi::OstreeRepoListObjectsFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeRepoListObjectsFlags {
|
fn into_glib(self) -> ffi::OstreeRepoListObjectsFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -261,12 +231,14 @@ impl IntoGlib for RepoListObjectsFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoListObjectsFlags> for RepoListObjectsFlags {
|
impl FromGlib<ffi::OstreeRepoListObjectsFlags> for RepoListObjectsFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoListObjectsFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeRepoListObjectsFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeRepoListRefsExtFlags")]
|
#[doc(alias = "OstreeRepoListRefsExtFlags")]
|
||||||
pub struct RepoListRefsExtFlags: u32 {
|
pub struct RepoListRefsExtFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_REPO_LIST_REFS_EXT_NONE")]
|
#[doc(alias = "OSTREE_REPO_LIST_REFS_EXT_NONE")]
|
||||||
@ -280,16 +252,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoListRefsExtFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoListRefsExtFlags {
|
impl IntoGlib for RepoListRefsExtFlags {
|
||||||
type GlibType = ffi::OstreeRepoListRefsExtFlags;
|
type GlibType = ffi::OstreeRepoListRefsExtFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeRepoListRefsExtFlags {
|
fn into_glib(self) -> ffi::OstreeRepoListRefsExtFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -297,12 +264,14 @@ impl IntoGlib for RepoListRefsExtFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoListRefsExtFlags> for RepoListRefsExtFlags {
|
impl FromGlib<ffi::OstreeRepoListRefsExtFlags> for RepoListRefsExtFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoListRefsExtFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeRepoListRefsExtFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeRepoPruneFlags")]
|
#[doc(alias = "OstreeRepoPruneFlags")]
|
||||||
pub struct RepoPruneFlags: u32 {
|
pub struct RepoPruneFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_REPO_PRUNE_FLAGS_NONE")]
|
#[doc(alias = "OSTREE_REPO_PRUNE_FLAGS_NONE")]
|
||||||
@ -316,16 +285,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoPruneFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoPruneFlags {
|
impl IntoGlib for RepoPruneFlags {
|
||||||
type GlibType = ffi::OstreeRepoPruneFlags;
|
type GlibType = ffi::OstreeRepoPruneFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeRepoPruneFlags {
|
fn into_glib(self) -> ffi::OstreeRepoPruneFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -333,12 +297,14 @@ impl IntoGlib for RepoPruneFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoPruneFlags> for RepoPruneFlags {
|
impl FromGlib<ffi::OstreeRepoPruneFlags> for RepoPruneFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoPruneFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeRepoPruneFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeRepoPullFlags")]
|
#[doc(alias = "OstreeRepoPullFlags")]
|
||||||
pub struct RepoPullFlags: u32 {
|
pub struct RepoPullFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_REPO_PULL_FLAGS_NONE")]
|
#[doc(alias = "OSTREE_REPO_PULL_FLAGS_NONE")]
|
||||||
@ -356,16 +322,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoPullFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoPullFlags {
|
impl IntoGlib for RepoPullFlags {
|
||||||
type GlibType = ffi::OstreeRepoPullFlags;
|
type GlibType = ffi::OstreeRepoPullFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeRepoPullFlags {
|
fn into_glib(self) -> ffi::OstreeRepoPullFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -373,12 +334,14 @@ impl IntoGlib for RepoPullFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoPullFlags> for RepoPullFlags {
|
impl FromGlib<ffi::OstreeRepoPullFlags> for RepoPullFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoPullFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeRepoPullFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeRepoResolveRevExtFlags")]
|
#[doc(alias = "OstreeRepoResolveRevExtFlags")]
|
||||||
pub struct RepoResolveRevExtFlags: u32 {
|
pub struct RepoResolveRevExtFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_REPO_RESOLVE_REV_EXT_NONE")]
|
#[doc(alias = "OSTREE_REPO_RESOLVE_REV_EXT_NONE")]
|
||||||
@ -388,16 +351,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoResolveRevExtFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoResolveRevExtFlags {
|
impl IntoGlib for RepoResolveRevExtFlags {
|
||||||
type GlibType = ffi::OstreeRepoResolveRevExtFlags;
|
type GlibType = ffi::OstreeRepoResolveRevExtFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeRepoResolveRevExtFlags {
|
fn into_glib(self) -> ffi::OstreeRepoResolveRevExtFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -405,14 +363,16 @@ impl IntoGlib for RepoResolveRevExtFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoResolveRevExtFlags> for RepoResolveRevExtFlags {
|
impl FromGlib<ffi::OstreeRepoResolveRevExtFlags> for RepoResolveRevExtFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoResolveRevExtFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeRepoResolveRevExtFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2021_4", feature = "dox"))]
|
#[cfg(feature = "v2021_4")]
|
||||||
bitflags! {
|
bitflags! {
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeRepoVerifyFlags")]
|
#[doc(alias = "OstreeRepoVerifyFlags")]
|
||||||
pub struct RepoVerifyFlags: u32 {
|
pub struct RepoVerifyFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_REPO_VERIFY_FLAGS_NONE")]
|
#[doc(alias = "OSTREE_REPO_VERIFY_FLAGS_NONE")]
|
||||||
@ -424,35 +384,30 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2021_4", feature = "dox"))]
|
#[cfg(feature = "v2021_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
|
||||||
impl fmt::Display for RepoVerifyFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2021_4", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for RepoVerifyFlags {
|
impl IntoGlib for RepoVerifyFlags {
|
||||||
type GlibType = ffi::OstreeRepoVerifyFlags;
|
type GlibType = ffi::OstreeRepoVerifyFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeRepoVerifyFlags {
|
fn into_glib(self) -> ffi::OstreeRepoVerifyFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2021_4", feature = "dox"))]
|
#[cfg(feature = "v2021_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeRepoVerifyFlags> for RepoVerifyFlags {
|
impl FromGlib<ffi::OstreeRepoVerifyFlags> for RepoVerifyFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeRepoVerifyFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeRepoVerifyFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeSePolicyRestoreconFlags")]
|
#[doc(alias = "OstreeSePolicyRestoreconFlags")]
|
||||||
pub struct SePolicyRestoreconFlags: u32 {
|
pub struct SePolicyRestoreconFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE")]
|
#[doc(alias = "OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE")]
|
||||||
@ -464,16 +419,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for SePolicyRestoreconFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for SePolicyRestoreconFlags {
|
impl IntoGlib for SePolicyRestoreconFlags {
|
||||||
type GlibType = ffi::OstreeSePolicyRestoreconFlags;
|
type GlibType = ffi::OstreeSePolicyRestoreconFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeSePolicyRestoreconFlags {
|
fn into_glib(self) -> ffi::OstreeSePolicyRestoreconFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -481,12 +431,14 @@ impl IntoGlib for SePolicyRestoreconFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeSePolicyRestoreconFlags> for SePolicyRestoreconFlags {
|
impl FromGlib<ffi::OstreeSePolicyRestoreconFlags> for SePolicyRestoreconFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeSePolicyRestoreconFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeSePolicyRestoreconFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeSysrootSimpleWriteDeploymentFlags")]
|
#[doc(alias = "OstreeSysrootSimpleWriteDeploymentFlags")]
|
||||||
pub struct SysrootSimpleWriteDeploymentFlags: u32 {
|
pub struct SysrootSimpleWriteDeploymentFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE")]
|
#[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE")]
|
||||||
@ -504,16 +456,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for SysrootSimpleWriteDeploymentFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for SysrootSimpleWriteDeploymentFlags {
|
impl IntoGlib for SysrootSimpleWriteDeploymentFlags {
|
||||||
type GlibType = ffi::OstreeSysrootSimpleWriteDeploymentFlags;
|
type GlibType = ffi::OstreeSysrootSimpleWriteDeploymentFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeSysrootSimpleWriteDeploymentFlags {
|
fn into_glib(self) -> ffi::OstreeSysrootSimpleWriteDeploymentFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -521,12 +468,14 @@ impl IntoGlib for SysrootSimpleWriteDeploymentFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeSysrootSimpleWriteDeploymentFlags> for SysrootSimpleWriteDeploymentFlags {
|
impl FromGlib<ffi::OstreeSysrootSimpleWriteDeploymentFlags> for SysrootSimpleWriteDeploymentFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeSysrootSimpleWriteDeploymentFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeSysrootSimpleWriteDeploymentFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeSysrootUpgraderFlags")]
|
#[doc(alias = "OstreeSysrootUpgraderFlags")]
|
||||||
pub struct SysrootUpgraderFlags: u32 {
|
pub struct SysrootUpgraderFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED")]
|
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED")]
|
||||||
@ -536,16 +485,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for SysrootUpgraderFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for SysrootUpgraderFlags {
|
impl IntoGlib for SysrootUpgraderFlags {
|
||||||
type GlibType = ffi::OstreeSysrootUpgraderFlags;
|
type GlibType = ffi::OstreeSysrootUpgraderFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeSysrootUpgraderFlags {
|
fn into_glib(self) -> ffi::OstreeSysrootUpgraderFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -553,30 +497,45 @@ impl IntoGlib for SysrootUpgraderFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeSysrootUpgraderFlags> for SysrootUpgraderFlags {
|
impl FromGlib<ffi::OstreeSysrootUpgraderFlags> for SysrootUpgraderFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeSysrootUpgraderFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeSysrootUpgraderFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl StaticType for SysrootUpgraderFlags {
|
impl StaticType for SysrootUpgraderFlags {
|
||||||
fn static_type() -> Type {
|
#[inline]
|
||||||
unsafe { from_glib(ffi::ostree_sysroot_upgrader_flags_get_type()) }
|
#[doc(alias = "ostree_sysroot_upgrader_flags_get_type")]
|
||||||
}
|
fn static_type() -> glib::Type {
|
||||||
|
unsafe { from_glib(ffi::ostree_sysroot_upgrader_flags_get_type()) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl glib::HasParamSpec for SysrootUpgraderFlags {
|
||||||
|
type ParamSpec = glib::ParamSpecFlags;
|
||||||
|
type SetValue = Self;
|
||||||
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|
Self::ParamSpec::builder
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl glib::value::ValueType for SysrootUpgraderFlags {
|
impl glib::value::ValueType for SysrootUpgraderFlags {
|
||||||
type Type = Self;
|
type Type = Self;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl<'a> FromValue<'a> for SysrootUpgraderFlags {
|
unsafe impl<'a> glib::value::FromValue<'a> for SysrootUpgraderFlags {
|
||||||
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
||||||
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ToValue for SysrootUpgraderFlags {
|
impl ToValue for SysrootUpgraderFlags {
|
||||||
|
#[inline]
|
||||||
fn to_value(&self) -> glib::Value {
|
fn to_value(&self) -> glib::Value {
|
||||||
let mut value = glib::Value::for_value_type::<Self>();
|
let mut value = glib::Value::for_value_type::<Self>();
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -585,6 +544,7 @@ impl ToValue for SysrootUpgraderFlags {
|
|||||||
value
|
value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn value_type(&self) -> glib::Type {
|
fn value_type(&self) -> glib::Type {
|
||||||
Self::static_type()
|
Self::static_type()
|
||||||
}
|
}
|
||||||
@ -598,6 +558,7 @@ impl From<SysrootUpgraderFlags> for glib::Value {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
#[doc(alias = "OstreeSysrootUpgraderPullFlags")]
|
#[doc(alias = "OstreeSysrootUpgraderPullFlags")]
|
||||||
pub struct SysrootUpgraderPullFlags: u32 {
|
pub struct SysrootUpgraderPullFlags: u32 {
|
||||||
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE")]
|
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE")]
|
||||||
@ -609,16 +570,11 @@ bitflags! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for SysrootUpgraderPullFlags {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
<Self as fmt::Debug>::fmt(self, f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl IntoGlib for SysrootUpgraderPullFlags {
|
impl IntoGlib for SysrootUpgraderPullFlags {
|
||||||
type GlibType = ffi::OstreeSysrootUpgraderPullFlags;
|
type GlibType = ffi::OstreeSysrootUpgraderPullFlags;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn into_glib(self) -> ffi::OstreeSysrootUpgraderPullFlags {
|
fn into_glib(self) -> ffi::OstreeSysrootUpgraderPullFlags {
|
||||||
self.bits()
|
self.bits()
|
||||||
}
|
}
|
||||||
@ -626,6 +582,7 @@ impl IntoGlib for SysrootUpgraderPullFlags {
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<ffi::OstreeSysrootUpgraderPullFlags> for SysrootUpgraderPullFlags {
|
impl FromGlib<ffi::OstreeSysrootUpgraderPullFlags> for SysrootUpgraderPullFlags {
|
||||||
|
#[inline]
|
||||||
unsafe fn from_glib(value: ffi::OstreeSysrootUpgraderPullFlags) -> Self {
|
unsafe fn from_glib(value: ffi::OstreeSysrootUpgraderPullFlags) -> Self {
|
||||||
Self::from_bits_truncate(value)
|
Self::from_bits_truncate(value)
|
||||||
}
|
}
|
||||||
|
191
rust-bindings/src/auto/functions.rs
generated
191
rust-bindings/src/auto/functions.rs
generated
@ -2,32 +2,27 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_1", feature = "dox"))]
|
use crate::{DiffFlags,DiffItem,ObjectType};
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
|
#[cfg(feature = "v2020_1")]
|
||||||
use crate::CommitSizesEntry;
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
|
||||||
use crate::DiffFlags;
|
use crate::{CommitSizesEntry};
|
||||||
use crate::DiffItem;
|
use glib::{prelude::*,translate::*};
|
||||||
use crate::ObjectType;
|
|
||||||
use glib::object::IsA;
|
|
||||||
use glib::translate::*;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_15", feature = "dox"))]
|
#[cfg(feature = "v2017_15")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_15")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_15")))]
|
||||||
#[doc(alias = "ostree_break_hardlink")]
|
#[doc(alias = "ostree_break_hardlink")]
|
||||||
pub fn break_hardlink(dfd: i32, path: &str, skip_xattrs: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn break_hardlink(dfd: i32, path: &str, skip_xattrs: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_break_hardlink(dfd, path.to_glib_none().0, skip_xattrs.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_break_hardlink(dfd, path.to_glib_none().0, skip_xattrs.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_4", feature = "dox"))]
|
#[cfg(feature = "v2017_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
|
||||||
#[doc(alias = "ostree_check_version")]
|
#[doc(alias = "ostree_check_version")]
|
||||||
pub fn check_version(required_year: u32, required_release: u32) -> bool {
|
pub fn check_version(required_year: u32, required_release: u32) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -59,8 +54,8 @@ pub fn checksum_to_bytes_v(checksum: &str) -> glib::Variant {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_2", feature = "dox"))]
|
#[cfg(feature = "v2018_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_2")))]
|
||||||
#[doc(alias = "ostree_commit_get_content_checksum")]
|
#[doc(alias = "ostree_commit_get_content_checksum")]
|
||||||
pub fn commit_get_content_checksum(commit_variant: &glib::Variant) -> Option<glib::GString> {
|
pub fn commit_get_content_checksum(commit_variant: &glib::Variant) -> Option<glib::GString> {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -68,15 +63,15 @@ pub fn commit_get_content_checksum(commit_variant: &glib::Variant) -> Option<gli
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_1", feature = "dox"))]
|
#[cfg(feature = "v2020_1")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
|
||||||
#[doc(alias = "ostree_commit_get_object_sizes")]
|
#[doc(alias = "ostree_commit_get_object_sizes")]
|
||||||
pub fn commit_get_object_sizes(commit_variant: &glib::Variant) -> Result<Vec<CommitSizesEntry>, glib::Error> {
|
pub fn commit_get_object_sizes(commit_variant: &glib::Variant) -> Result<Vec<CommitSizesEntry>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_sizes_entries = ptr::null_mut();
|
let mut out_sizes_entries = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_commit_get_object_sizes(commit_variant.to_glib_none().0, &mut out_sizes_entries, &mut error);
|
let is_ok = ffi::ostree_commit_get_object_sizes(commit_variant.to_glib_none().0, &mut out_sizes_entries, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(FromGlibPtrContainer::from_glib_container(out_sizes_entries)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(FromGlibPtrContainer::from_glib_container(out_sizes_entries)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,8 +83,8 @@ pub fn commit_get_parent(commit_variant: &glib::Variant) -> Option<glib::GString
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2016_3", feature = "dox"))]
|
#[cfg(feature = "v2016_3")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_3")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2016_3")))]
|
||||||
#[doc(alias = "ostree_commit_get_timestamp")]
|
#[doc(alias = "ostree_commit_get_timestamp")]
|
||||||
pub fn commit_get_timestamp(commit_variant: &glib::Variant) -> u64 {
|
pub fn commit_get_timestamp(commit_variant: &glib::Variant) -> u64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -97,8 +92,8 @@ pub fn commit_get_timestamp(commit_variant: &glib::Variant) -> u64 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[cfg(any(feature = "v2021_1", feature = "dox"))]
|
//#[cfg(feature = "v2021_1")]
|
||||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
|
//#[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
|
||||||
//#[doc(alias = "ostree_commit_metadata_for_bootable")]
|
//#[doc(alias = "ostree_commit_metadata_for_bootable")]
|
||||||
//pub fn commit_metadata_for_bootable(root: &impl IsA<gio::File>, dict: /*Ignored*/&glib::VariantDict, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
//pub fn commit_metadata_for_bootable(root: &impl IsA<gio::File>, dict: /*Ignored*/&glib::VariantDict, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
// unsafe { TODO: call ffi:ostree_commit_metadata_for_bootable() }
|
// unsafe { TODO: call ffi:ostree_commit_metadata_for_bootable() }
|
||||||
@ -107,12 +102,12 @@ pub fn commit_get_timestamp(commit_variant: &glib::Variant) -> u64 {
|
|||||||
#[doc(alias = "ostree_content_file_parse")]
|
#[doc(alias = "ostree_content_file_parse")]
|
||||||
pub fn content_file_parse(compressed: bool, content_path: &impl IsA<gio::File>, trusted: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, gio::FileInfo, glib::Variant), glib::Error> {
|
pub fn content_file_parse(compressed: bool, content_path: &impl IsA<gio::File>, trusted: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, gio::FileInfo, glib::Variant), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_input = ptr::null_mut();
|
let mut out_input = std::ptr::null_mut();
|
||||||
let mut out_file_info = ptr::null_mut();
|
let mut out_file_info = std::ptr::null_mut();
|
||||||
let mut out_xattrs = ptr::null_mut();
|
let mut out_xattrs = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_content_file_parse(compressed.into_glib(), content_path.as_ref().to_glib_none().0, trusted.into_glib(), &mut out_input, &mut out_file_info, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_content_file_parse(compressed.into_glib(), content_path.as_ref().to_glib_none().0, trusted.into_glib(), &mut out_input, &mut out_file_info, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok((from_glib_full(out_input), from_glib_full(out_file_info), from_glib_full(out_xattrs))) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok((from_glib_full(out_input), from_glib_full(out_file_info), from_glib_full(out_xattrs))) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -120,12 +115,12 @@ pub fn content_file_parse(compressed: bool, content_path: &impl IsA<gio::File>,
|
|||||||
#[doc(alias = "ostree_content_file_parse_at")]
|
#[doc(alias = "ostree_content_file_parse_at")]
|
||||||
pub fn content_file_parse_at(compressed: bool, parent_dfd: i32, path: &str, trusted: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, gio::FileInfo, glib::Variant), glib::Error> {
|
pub fn content_file_parse_at(compressed: bool, parent_dfd: i32, path: &str, trusted: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, gio::FileInfo, glib::Variant), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_input = ptr::null_mut();
|
let mut out_input = std::ptr::null_mut();
|
||||||
let mut out_file_info = ptr::null_mut();
|
let mut out_file_info = std::ptr::null_mut();
|
||||||
let mut out_xattrs = ptr::null_mut();
|
let mut out_xattrs = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_content_file_parse_at(compressed.into_glib(), parent_dfd, path.to_glib_none().0, trusted.into_glib(), &mut out_input, &mut out_file_info, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_content_file_parse_at(compressed.into_glib(), parent_dfd, path.to_glib_none().0, trusted.into_glib(), &mut out_input, &mut out_file_info, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok((from_glib_full(out_input), from_glib_full(out_file_info), from_glib_full(out_xattrs))) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok((from_glib_full(out_input), from_glib_full(out_file_info), from_glib_full(out_xattrs))) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -133,12 +128,12 @@ pub fn content_file_parse_at(compressed: bool, parent_dfd: i32, path: &str, trus
|
|||||||
#[doc(alias = "ostree_content_stream_parse")]
|
#[doc(alias = "ostree_content_stream_parse")]
|
||||||
pub fn content_stream_parse(compressed: bool, input: &impl IsA<gio::InputStream>, input_length: u64, trusted: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, gio::FileInfo, glib::Variant), glib::Error> {
|
pub fn content_stream_parse(compressed: bool, input: &impl IsA<gio::InputStream>, input_length: u64, trusted: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, gio::FileInfo, glib::Variant), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_input = ptr::null_mut();
|
let mut out_input = std::ptr::null_mut();
|
||||||
let mut out_file_info = ptr::null_mut();
|
let mut out_file_info = std::ptr::null_mut();
|
||||||
let mut out_xattrs = ptr::null_mut();
|
let mut out_xattrs = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_content_stream_parse(compressed.into_glib(), input.as_ref().to_glib_none().0, input_length, trusted.into_glib(), &mut out_input, &mut out_file_info, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_content_stream_parse(compressed.into_glib(), input.as_ref().to_glib_none().0, input_length, trusted.into_glib(), &mut out_input, &mut out_file_info, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok((from_glib_full(out_input), from_glib_full(out_file_info), from_glib_full(out_xattrs))) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok((from_glib_full(out_input), from_glib_full(out_file_info), from_glib_full(out_xattrs))) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -153,15 +148,15 @@ pub fn create_directory_metadata(dir_info: &gio::FileInfo, xattrs: Option<&glib:
|
|||||||
#[doc(alias = "ostree_diff_dirs")]
|
#[doc(alias = "ostree_diff_dirs")]
|
||||||
pub fn diff_dirs(flags: DiffFlags, a: &impl IsA<gio::File>, b: &impl IsA<gio::File>, modified: &[&DiffItem], removed: &[gio::File], added: &[gio::File], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn diff_dirs(flags: DiffFlags, a: &impl IsA<gio::File>, b: &impl IsA<gio::File>, modified: &[&DiffItem], removed: &[gio::File], added: &[gio::File], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_diff_dirs(flags.into_glib(), a.as_ref().to_glib_none().0, b.as_ref().to_glib_none().0, modified.to_glib_none().0, removed.to_glib_none().0, added.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_diff_dirs(flags.into_glib(), a.as_ref().to_glib_none().0, b.as_ref().to_glib_none().0, modified.to_glib_none().0, removed.to_glib_none().0, added.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[cfg(any(feature = "v2017_4", feature = "dox"))]
|
//#[cfg(feature = "v2017_4")]
|
||||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
|
//#[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
|
||||||
//#[doc(alias = "ostree_diff_dirs_with_options")]
|
//#[doc(alias = "ostree_diff_dirs_with_options")]
|
||||||
//pub fn diff_dirs_with_options(flags: DiffFlags, a: &impl IsA<gio::File>, b: &impl IsA<gio::File>, modified: &[&DiffItem], removed: &[gio::File], added: &[gio::File], options: /*Ignored*/Option<&mut DiffDirsOptions>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
//pub fn diff_dirs_with_options(flags: DiffFlags, a: &impl IsA<gio::File>, b: &impl IsA<gio::File>, modified: &[&DiffItem], removed: &[gio::File], added: &[gio::File], options: /*Ignored*/Option<&mut DiffDirsOptions>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
// unsafe { TODO: call ffi:ostree_diff_dirs_with_options() }
|
// unsafe { TODO: call ffi:ostree_diff_dirs_with_options() }
|
||||||
@ -177,7 +172,7 @@ pub fn diff_print(a: &impl IsA<gio::File>, b: &impl IsA<gio::File>, modified: &[
|
|||||||
#[doc(alias = "ostree_fs_get_all_xattrs")]
|
#[doc(alias = "ostree_fs_get_all_xattrs")]
|
||||||
pub fn fs_get_all_xattrs(fd: i32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Variant, glib::Error> {
|
pub fn fs_get_all_xattrs(fd: i32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Variant, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_fs_get_all_xattrs(fd, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let ret = ffi::ostree_fs_get_all_xattrs(fd, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
@ -186,14 +181,14 @@ pub fn fs_get_all_xattrs(fd: i32, cancellable: Option<&impl IsA<gio::Cancellable
|
|||||||
#[doc(alias = "ostree_fs_get_all_xattrs_at")]
|
#[doc(alias = "ostree_fs_get_all_xattrs_at")]
|
||||||
pub fn fs_get_all_xattrs_at(dfd: i32, path: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Variant, glib::Error> {
|
pub fn fs_get_all_xattrs_at(dfd: i32, path: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Variant, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_fs_get_all_xattrs_at(dfd, path.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let ret = ffi::ostree_fs_get_all_xattrs_at(dfd, path.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_10", feature = "dox"))]
|
#[cfg(feature = "v2017_10")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
|
||||||
#[doc(alias = "ostree_gpg_error_quark")]
|
#[doc(alias = "ostree_gpg_error_quark")]
|
||||||
pub fn gpg_error_quark() -> glib::Quark {
|
pub fn gpg_error_quark() -> glib::Quark {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -211,8 +206,8 @@ pub fn metadata_variant_type(objtype: ObjectType) -> glib::VariantType {
|
|||||||
#[doc(alias = "ostree_object_from_string")]
|
#[doc(alias = "ostree_object_from_string")]
|
||||||
pub fn object_from_string(str: &str) -> (glib::GString, ObjectType) {
|
pub fn object_from_string(str: &str) -> (glib::GString, ObjectType) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_checksum = ptr::null_mut();
|
let mut out_checksum = std::ptr::null_mut();
|
||||||
let mut out_objtype = mem::MaybeUninit::uninit();
|
let mut out_objtype = std::mem::MaybeUninit::uninit();
|
||||||
ffi::ostree_object_from_string(str.to_glib_none().0, &mut out_checksum, out_objtype.as_mut_ptr());
|
ffi::ostree_object_from_string(str.to_glib_none().0, &mut out_checksum, out_objtype.as_mut_ptr());
|
||||||
(from_glib_full(out_checksum), from_glib(out_objtype.assume_init()))
|
(from_glib_full(out_checksum), from_glib(out_objtype.assume_init()))
|
||||||
}
|
}
|
||||||
@ -221,8 +216,8 @@ pub fn object_from_string(str: &str) -> (glib::GString, ObjectType) {
|
|||||||
#[doc(alias = "ostree_object_name_deserialize")]
|
#[doc(alias = "ostree_object_name_deserialize")]
|
||||||
pub fn object_name_deserialize(variant: &glib::Variant) -> (glib::GString, ObjectType) {
|
pub fn object_name_deserialize(variant: &glib::Variant) -> (glib::GString, ObjectType) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_checksum = ptr::null();
|
let mut out_checksum = std::ptr::null();
|
||||||
let mut out_objtype = mem::MaybeUninit::uninit();
|
let mut out_objtype = std::mem::MaybeUninit::uninit();
|
||||||
ffi::ostree_object_name_deserialize(variant.to_glib_none().0, &mut out_checksum, out_objtype.as_mut_ptr());
|
ffi::ostree_object_name_deserialize(variant.to_glib_none().0, &mut out_checksum, out_objtype.as_mut_ptr());
|
||||||
(from_glib_none(out_checksum), from_glib(out_objtype.assume_init()))
|
(from_glib_none(out_checksum), from_glib(out_objtype.assume_init()))
|
||||||
}
|
}
|
||||||
@ -259,37 +254,37 @@ pub fn object_type_to_string(objtype: ObjectType) -> glib::GString {
|
|||||||
#[doc(alias = "ostree_parse_refspec")]
|
#[doc(alias = "ostree_parse_refspec")]
|
||||||
pub fn parse_refspec(refspec: &str) -> Result<(Option<glib::GString>, glib::GString), glib::Error> {
|
pub fn parse_refspec(refspec: &str) -> Result<(Option<glib::GString>, glib::GString), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_remote = ptr::null_mut();
|
let mut out_remote = std::ptr::null_mut();
|
||||||
let mut out_ref = ptr::null_mut();
|
let mut out_ref = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_parse_refspec(refspec.to_glib_none().0, &mut out_remote, &mut out_ref, &mut error);
|
let is_ok = ffi::ostree_parse_refspec(refspec.to_glib_none().0, &mut out_remote, &mut out_ref, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok((from_glib_full(out_remote), from_glib_full(out_ref))) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok((from_glib_full(out_remote), from_glib_full(out_ref))) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2016_6", feature = "dox"))]
|
#[cfg(feature = "v2016_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2016_6")))]
|
||||||
#[doc(alias = "ostree_raw_file_to_archive_z2_stream")]
|
#[doc(alias = "ostree_raw_file_to_archive_z2_stream")]
|
||||||
pub fn raw_file_to_archive_z2_stream(input: &impl IsA<gio::InputStream>, file_info: &gio::FileInfo, xattrs: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<gio::InputStream, glib::Error> {
|
pub fn raw_file_to_archive_z2_stream(input: &impl IsA<gio::InputStream>, file_info: &gio::FileInfo, xattrs: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<gio::InputStream, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_input = ptr::null_mut();
|
let mut out_input = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_raw_file_to_archive_z2_stream(input.as_ref().to_glib_none().0, file_info.to_glib_none().0, xattrs.to_glib_none().0, &mut out_input, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_raw_file_to_archive_z2_stream(input.as_ref().to_glib_none().0, file_info.to_glib_none().0, xattrs.to_glib_none().0, &mut out_input, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_input)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_input)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_3", feature = "dox"))]
|
#[cfg(feature = "v2017_3")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_3")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_3")))]
|
||||||
#[doc(alias = "ostree_raw_file_to_archive_z2_stream_with_options")]
|
#[doc(alias = "ostree_raw_file_to_archive_z2_stream_with_options")]
|
||||||
pub fn raw_file_to_archive_z2_stream_with_options(input: &impl IsA<gio::InputStream>, file_info: &gio::FileInfo, xattrs: Option<&glib::Variant>, options: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<gio::InputStream, glib::Error> {
|
pub fn raw_file_to_archive_z2_stream_with_options(input: &impl IsA<gio::InputStream>, file_info: &gio::FileInfo, xattrs: Option<&glib::Variant>, options: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<gio::InputStream, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_input = ptr::null_mut();
|
let mut out_input = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_raw_file_to_archive_z2_stream_with_options(input.as_ref().to_glib_none().0, file_info.to_glib_none().0, xattrs.to_glib_none().0, options.to_glib_none().0, &mut out_input, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_raw_file_to_archive_z2_stream_with_options(input.as_ref().to_glib_none().0, file_info.to_glib_none().0, xattrs.to_glib_none().0, options.to_glib_none().0, &mut out_input, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_input)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_input)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -297,11 +292,11 @@ pub fn raw_file_to_archive_z2_stream_with_options(input: &impl IsA<gio::InputStr
|
|||||||
#[doc(alias = "ostree_raw_file_to_content_stream")]
|
#[doc(alias = "ostree_raw_file_to_content_stream")]
|
||||||
pub fn raw_file_to_content_stream(input: &impl IsA<gio::InputStream>, file_info: &gio::FileInfo, xattrs: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, u64), glib::Error> {
|
pub fn raw_file_to_content_stream(input: &impl IsA<gio::InputStream>, file_info: &gio::FileInfo, xattrs: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(gio::InputStream, u64), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_input = ptr::null_mut();
|
let mut out_input = std::ptr::null_mut();
|
||||||
let mut out_length = mem::MaybeUninit::uninit();
|
let mut out_length = std::mem::MaybeUninit::uninit();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_raw_file_to_content_stream(input.as_ref().to_glib_none().0, file_info.to_glib_none().0, xattrs.to_glib_none().0, &mut out_input, out_length.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_raw_file_to_content_stream(input.as_ref().to_glib_none().0, file_info.to_glib_none().0, xattrs.to_glib_none().0, &mut out_input, out_length.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok((from_glib_full(out_input), out_length.assume_init())) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok((from_glib_full(out_input), out_length.assume_init())) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -309,33 +304,33 @@ pub fn raw_file_to_content_stream(input: &impl IsA<gio::InputStream>, file_info:
|
|||||||
#[doc(alias = "ostree_validate_checksum_string")]
|
#[doc(alias = "ostree_validate_checksum_string")]
|
||||||
pub fn validate_checksum_string(sha256: &str) -> Result<(), glib::Error> {
|
pub fn validate_checksum_string(sha256: &str) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_validate_checksum_string(sha256.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_validate_checksum_string(sha256.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
#[doc(alias = "ostree_validate_collection_id")]
|
#[doc(alias = "ostree_validate_collection_id")]
|
||||||
pub fn validate_collection_id(collection_id: Option<&str>) -> Result<(), glib::Error> {
|
pub fn validate_collection_id(collection_id: Option<&str>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_validate_collection_id(collection_id.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_validate_collection_id(collection_id.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_8", feature = "dox"))]
|
#[cfg(feature = "v2017_8")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_8")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_8")))]
|
||||||
#[doc(alias = "ostree_validate_remote_name")]
|
#[doc(alias = "ostree_validate_remote_name")]
|
||||||
pub fn validate_remote_name(remote_name: &str) -> Result<(), glib::Error> {
|
pub fn validate_remote_name(remote_name: &str) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_validate_remote_name(remote_name.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_validate_remote_name(remote_name.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -343,9 +338,9 @@ pub fn validate_remote_name(remote_name: &str) -> Result<(), glib::Error> {
|
|||||||
#[doc(alias = "ostree_validate_rev")]
|
#[doc(alias = "ostree_validate_rev")]
|
||||||
pub fn validate_rev(rev: &str) -> Result<(), glib::Error> {
|
pub fn validate_rev(rev: &str) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_validate_rev(rev.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_validate_rev(rev.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -353,9 +348,9 @@ pub fn validate_rev(rev: &str) -> Result<(), glib::Error> {
|
|||||||
#[doc(alias = "ostree_validate_structureof_checksum_string")]
|
#[doc(alias = "ostree_validate_structureof_checksum_string")]
|
||||||
pub fn validate_structureof_checksum_string(checksum: &str) -> Result<(), glib::Error> {
|
pub fn validate_structureof_checksum_string(checksum: &str) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_validate_structureof_checksum_string(checksum.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_validate_structureof_checksum_string(checksum.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -363,9 +358,9 @@ pub fn validate_structureof_checksum_string(checksum: &str) -> Result<(), glib::
|
|||||||
#[doc(alias = "ostree_validate_structureof_commit")]
|
#[doc(alias = "ostree_validate_structureof_commit")]
|
||||||
pub fn validate_structureof_commit(commit: &glib::Variant) -> Result<(), glib::Error> {
|
pub fn validate_structureof_commit(commit: &glib::Variant) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_validate_structureof_commit(commit.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_validate_structureof_commit(commit.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -373,9 +368,9 @@ pub fn validate_structureof_commit(commit: &glib::Variant) -> Result<(), glib::E
|
|||||||
#[doc(alias = "ostree_validate_structureof_csum_v")]
|
#[doc(alias = "ostree_validate_structureof_csum_v")]
|
||||||
pub fn validate_structureof_csum_v(checksum: &glib::Variant) -> Result<(), glib::Error> {
|
pub fn validate_structureof_csum_v(checksum: &glib::Variant) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_validate_structureof_csum_v(checksum.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_validate_structureof_csum_v(checksum.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -383,9 +378,9 @@ pub fn validate_structureof_csum_v(checksum: &glib::Variant) -> Result<(), glib:
|
|||||||
#[doc(alias = "ostree_validate_structureof_dirmeta")]
|
#[doc(alias = "ostree_validate_structureof_dirmeta")]
|
||||||
pub fn validate_structureof_dirmeta(dirmeta: &glib::Variant) -> Result<(), glib::Error> {
|
pub fn validate_structureof_dirmeta(dirmeta: &glib::Variant) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_validate_structureof_dirmeta(dirmeta.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_validate_structureof_dirmeta(dirmeta.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -393,9 +388,9 @@ pub fn validate_structureof_dirmeta(dirmeta: &glib::Variant) -> Result<(), glib:
|
|||||||
#[doc(alias = "ostree_validate_structureof_dirtree")]
|
#[doc(alias = "ostree_validate_structureof_dirtree")]
|
||||||
pub fn validate_structureof_dirtree(dirtree: &glib::Variant) -> Result<(), glib::Error> {
|
pub fn validate_structureof_dirtree(dirtree: &glib::Variant) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_validate_structureof_dirtree(dirtree.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_validate_structureof_dirtree(dirtree.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -403,9 +398,9 @@ pub fn validate_structureof_dirtree(dirtree: &glib::Variant) -> Result<(), glib:
|
|||||||
#[doc(alias = "ostree_validate_structureof_file_mode")]
|
#[doc(alias = "ostree_validate_structureof_file_mode")]
|
||||||
pub fn validate_structureof_file_mode(mode: u32) -> Result<(), glib::Error> {
|
pub fn validate_structureof_file_mode(mode: u32) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_validate_structureof_file_mode(mode, &mut error);
|
let is_ok = ffi::ostree_validate_structureof_file_mode(mode, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -413,9 +408,9 @@ pub fn validate_structureof_file_mode(mode: u32) -> Result<(), glib::Error> {
|
|||||||
#[doc(alias = "ostree_validate_structureof_objtype")]
|
#[doc(alias = "ostree_validate_structureof_objtype")]
|
||||||
pub fn validate_structureof_objtype(objtype: u8) -> Result<(), glib::Error> {
|
pub fn validate_structureof_objtype(objtype: u8) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_validate_structureof_objtype(objtype, &mut error);
|
let is_ok = ffi::ostree_validate_structureof_objtype(objtype, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
23
rust-bindings/src/auto/gpg_verify_result.rs
generated
23
rust-bindings/src/auto/gpg_verify_result.rs
generated
@ -2,12 +2,7 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::fmt;
|
|
||||||
use std::mem;
|
|
||||||
#[cfg(any(feature = "v2016_6", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeGpgVerifyResult")]
|
#[doc(alias = "OstreeGpgVerifyResult")]
|
||||||
@ -49,27 +44,21 @@ impl GpgVerifyResult {
|
|||||||
#[doc(alias = "ostree_gpg_verify_result_lookup")]
|
#[doc(alias = "ostree_gpg_verify_result_lookup")]
|
||||||
pub fn lookup(&self, key_id: &str) -> Option<u32> {
|
pub fn lookup(&self, key_id: &str) -> Option<u32> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_signature_index = mem::MaybeUninit::uninit();
|
let mut out_signature_index = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ostree_gpg_verify_result_lookup(self.to_glib_none().0, key_id.to_glib_none().0, out_signature_index.as_mut_ptr()));
|
let ret = from_glib(ffi::ostree_gpg_verify_result_lookup(self.to_glib_none().0, key_id.to_glib_none().0, out_signature_index.as_mut_ptr()));
|
||||||
if ret { Some(out_signature_index.assume_init()) } else { None }
|
if ret { Some(out_signature_index.assume_init()) } else { None }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2016_6", feature = "dox"))]
|
#[cfg(feature = "v2016_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2016_6")))]
|
||||||
#[doc(alias = "ostree_gpg_verify_result_require_valid_signature")]
|
#[doc(alias = "ostree_gpg_verify_result_require_valid_signature")]
|
||||||
pub fn require_valid_signature(&self) -> Result<(), glib::Error> {
|
pub fn require_valid_signature(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_gpg_verify_result_require_valid_signature(self.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_gpg_verify_result_require_valid_signature(self.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for GpgVerifyResult {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("GpgVerifyResult")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
109
rust-bindings/src/auto/mod.rs
generated
109
rust-bindings/src/auto/mod.rs
generated
@ -53,28 +53,28 @@ pub use self::sysroot::Sysroot;
|
|||||||
mod sysroot_upgrader;
|
mod sysroot_upgrader;
|
||||||
pub use self::sysroot_upgrader::SysrootUpgrader;
|
pub use self::sysroot_upgrader::SysrootUpgrader;
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
mod collection_ref;
|
mod collection_ref;
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
pub use self::collection_ref::CollectionRef;
|
pub use self::collection_ref::CollectionRef;
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_1", feature = "dox"))]
|
#[cfg(feature = "v2020_1")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
|
||||||
mod commit_sizes_entry;
|
mod commit_sizes_entry;
|
||||||
#[cfg(any(feature = "v2020_1", feature = "dox"))]
|
#[cfg(feature = "v2020_1")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
|
||||||
pub use self::commit_sizes_entry::CommitSizesEntry;
|
pub use self::commit_sizes_entry::CommitSizesEntry;
|
||||||
|
|
||||||
mod diff_item;
|
mod diff_item;
|
||||||
pub use self::diff_item::DiffItem;
|
pub use self::diff_item::DiffItem;
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
mod remote;
|
mod remote;
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
pub use self::remote::Remote;
|
pub use self::remote::Remote;
|
||||||
|
|
||||||
mod repo_commit_modifier;
|
mod repo_commit_modifier;
|
||||||
@ -83,19 +83,19 @@ pub use self::repo_commit_modifier::RepoCommitModifier;
|
|||||||
mod repo_dev_ino_cache;
|
mod repo_dev_ino_cache;
|
||||||
pub use self::repo_dev_ino_cache::RepoDevInoCache;
|
pub use self::repo_dev_ino_cache::RepoDevInoCache;
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
mod repo_finder_result;
|
mod repo_finder_result;
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
pub use self::repo_finder_result::RepoFinderResult;
|
pub use self::repo_finder_result::RepoFinderResult;
|
||||||
|
|
||||||
mod enums;
|
mod enums;
|
||||||
pub use self::enums::DeploymentUnlockedState;
|
pub use self::enums::DeploymentUnlockedState;
|
||||||
pub use self::enums::GpgSignatureAttr;
|
pub use self::enums::GpgSignatureAttr;
|
||||||
pub use self::enums::ObjectType;
|
pub use self::enums::ObjectType;
|
||||||
#[cfg(any(feature = "v2018_2", feature = "dox"))]
|
#[cfg(feature = "v2018_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_2")))]
|
||||||
pub use self::enums::RepoCheckoutFilterResult;
|
pub use self::enums::RepoCheckoutFilterResult;
|
||||||
pub use self::enums::RepoCheckoutMode;
|
pub use self::enums::RepoCheckoutMode;
|
||||||
pub use self::enums::RepoCheckoutOverwriteMode;
|
pub use self::enums::RepoCheckoutOverwriteMode;
|
||||||
@ -106,14 +106,14 @@ pub use self::enums::RepoRemoteChange;
|
|||||||
pub use self::enums::StaticDeltaGenerateOpt;
|
pub use self::enums::StaticDeltaGenerateOpt;
|
||||||
|
|
||||||
mod flags;
|
mod flags;
|
||||||
#[cfg(any(feature = "v2017_13", feature = "dox"))]
|
#[cfg(feature = "v2017_13")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
|
||||||
pub use self::flags::ChecksumFlags;
|
pub use self::flags::ChecksumFlags;
|
||||||
pub use self::flags::DiffFlags;
|
pub use self::flags::DiffFlags;
|
||||||
pub use self::flags::GpgSignatureFormatFlags;
|
pub use self::flags::GpgSignatureFormatFlags;
|
||||||
pub use self::flags::RepoCommitModifierFlags;
|
pub use self::flags::RepoCommitModifierFlags;
|
||||||
#[cfg(any(feature = "v2015_7", feature = "dox"))]
|
#[cfg(feature = "v2015_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
|
||||||
pub use self::flags::RepoCommitState;
|
pub use self::flags::RepoCommitState;
|
||||||
pub use self::flags::RepoCommitTraverseFlags;
|
pub use self::flags::RepoCommitTraverseFlags;
|
||||||
pub use self::flags::RepoListObjectsFlags;
|
pub use self::flags::RepoListObjectsFlags;
|
||||||
@ -121,69 +121,68 @@ pub use self::flags::RepoListRefsExtFlags;
|
|||||||
pub use self::flags::RepoPruneFlags;
|
pub use self::flags::RepoPruneFlags;
|
||||||
pub use self::flags::RepoPullFlags;
|
pub use self::flags::RepoPullFlags;
|
||||||
pub use self::flags::RepoResolveRevExtFlags;
|
pub use self::flags::RepoResolveRevExtFlags;
|
||||||
#[cfg(any(feature = "v2021_4", feature = "dox"))]
|
#[cfg(feature = "v2021_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
|
||||||
pub use self::flags::RepoVerifyFlags;
|
pub use self::flags::RepoVerifyFlags;
|
||||||
pub use self::flags::SePolicyRestoreconFlags;
|
pub use self::flags::SePolicyRestoreconFlags;
|
||||||
pub use self::flags::SysrootSimpleWriteDeploymentFlags;
|
pub use self::flags::SysrootSimpleWriteDeploymentFlags;
|
||||||
pub use self::flags::SysrootUpgraderFlags;
|
pub use self::flags::SysrootUpgraderFlags;
|
||||||
pub use self::flags::SysrootUpgraderPullFlags;
|
pub use self::flags::SysrootUpgraderPullFlags;
|
||||||
|
|
||||||
pub mod functions;
|
pub(crate) mod functions;
|
||||||
|
|
||||||
mod constants;
|
mod constants;
|
||||||
pub use self::constants::COMMIT_GVARIANT_STRING;
|
pub use self::constants::COMMIT_GVARIANT_STRING;
|
||||||
#[cfg(any(feature = "v2020_4", feature = "dox"))]
|
#[cfg(feature = "v2020_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
|
||||||
pub use self::constants::COMMIT_META_KEY_ARCHITECTURE;
|
pub use self::constants::COMMIT_META_KEY_ARCHITECTURE;
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
pub use self::constants::COMMIT_META_KEY_COLLECTION_BINDING;
|
pub use self::constants::COMMIT_META_KEY_COLLECTION_BINDING;
|
||||||
#[cfg(any(feature = "v2017_7", feature = "dox"))]
|
#[cfg(feature = "v2017_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
|
||||||
pub use self::constants::COMMIT_META_KEY_ENDOFLIFE;
|
pub use self::constants::COMMIT_META_KEY_ENDOFLIFE;
|
||||||
#[cfg(any(feature = "v2017_7", feature = "dox"))]
|
#[cfg(feature = "v2017_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
|
||||||
pub use self::constants::COMMIT_META_KEY_ENDOFLIFE_REBASE;
|
pub use self::constants::COMMIT_META_KEY_ENDOFLIFE_REBASE;
|
||||||
#[cfg(any(feature = "v2017_9", feature = "dox"))]
|
#[cfg(feature = "v2017_9")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_9")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_9")))]
|
||||||
pub use self::constants::COMMIT_META_KEY_REF_BINDING;
|
pub use self::constants::COMMIT_META_KEY_REF_BINDING;
|
||||||
#[cfg(any(feature = "v2017_13", feature = "dox"))]
|
#[cfg(feature = "v2017_13")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
|
||||||
pub use self::constants::COMMIT_META_KEY_SOURCE_TITLE;
|
pub use self::constants::COMMIT_META_KEY_SOURCE_TITLE;
|
||||||
#[cfg(any(feature = "v2014_9", feature = "dox"))]
|
#[cfg(feature = "v2014_9")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2014_9")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2014_9")))]
|
||||||
pub use self::constants::COMMIT_META_KEY_VERSION;
|
pub use self::constants::COMMIT_META_KEY_VERSION;
|
||||||
pub use self::constants::DIRMETA_GVARIANT_STRING;
|
pub use self::constants::DIRMETA_GVARIANT_STRING;
|
||||||
pub use self::constants::FILEMETA_GVARIANT_STRING;
|
pub use self::constants::FILEMETA_GVARIANT_STRING;
|
||||||
pub use self::constants::GPG_KEY_GVARIANT_STRING;
|
pub use self::constants::GPG_KEY_GVARIANT_STRING;
|
||||||
#[cfg(any(feature = "v2021_1", feature = "dox"))]
|
#[cfg(feature = "v2021_1")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
|
||||||
pub use self::constants::METADATA_KEY_BOOTABLE;
|
pub use self::constants::METADATA_KEY_BOOTABLE;
|
||||||
#[cfg(any(feature = "v2021_1", feature = "dox"))]
|
#[cfg(feature = "v2021_1")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
|
||||||
pub use self::constants::METADATA_KEY_LINUX;
|
pub use self::constants::METADATA_KEY_LINUX;
|
||||||
#[cfg(any(feature = "v2018_9", feature = "dox"))]
|
#[cfg(feature = "v2018_9")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_9")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_9")))]
|
||||||
pub use self::constants::META_KEY_DEPLOY_COLLECTION_ID;
|
pub use self::constants::META_KEY_DEPLOY_COLLECTION_ID;
|
||||||
#[cfg(any(feature = "v2018_3", feature = "dox"))]
|
#[cfg(feature = "v2018_3")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
|
||||||
pub use self::constants::ORIGIN_TRANSIENT_GROUP;
|
pub use self::constants::ORIGIN_TRANSIENT_GROUP;
|
||||||
#[cfg(any(feature = "v2022_2", feature = "dox"))]
|
#[cfg(feature = "v2022_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2022_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2022_2")))]
|
||||||
pub use self::constants::PATH_BOOTED;
|
pub use self::constants::PATH_BOOTED;
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
pub use self::constants::REPO_METADATA_REF;
|
pub use self::constants::REPO_METADATA_REF;
|
||||||
#[cfg(any(feature = "v2020_4", feature = "dox"))]
|
#[cfg(feature = "v2020_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
|
||||||
pub use self::constants::SIGN_NAME_ED25519;
|
pub use self::constants::SIGN_NAME_ED25519;
|
||||||
pub use self::constants::SUMMARY_GVARIANT_STRING;
|
pub use self::constants::SUMMARY_GVARIANT_STRING;
|
||||||
pub use self::constants::SUMMARY_SIG_GVARIANT_STRING;
|
pub use self::constants::SUMMARY_SIG_GVARIANT_STRING;
|
||||||
pub use self::constants::TREE_GVARIANT_STRING;
|
pub use self::constants::TREE_GVARIANT_STRING;
|
||||||
|
|
||||||
#[doc(hidden)]
|
pub(crate) mod traits {
|
||||||
pub mod traits {
|
|
||||||
pub use super::repo_finder::RepoFinderExt;
|
pub use super::repo_finder::RepoFinderExt;
|
||||||
pub use super::sign::SignExt;
|
pub use super::sign::SignExt;
|
||||||
}
|
}
|
||||||
|
76
rust-bindings/src/auto/mutable_tree.rs
generated
76
rust-bindings/src/auto/mutable_tree.rs
generated
@ -2,12 +2,10 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_7", feature = "dox"))]
|
#[cfg(feature = "v2018_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_7")))]
|
||||||
use crate::Repo;
|
use crate::{Repo};
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::fmt;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeMutableTree")]
|
#[doc(alias = "OstreeMutableTree")]
|
||||||
@ -26,8 +24,8 @@ impl MutableTree {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_7", feature = "dox"))]
|
#[cfg(feature = "v2018_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_7")))]
|
||||||
#[doc(alias = "ostree_mutable_tree_new_from_checksum")]
|
#[doc(alias = "ostree_mutable_tree_new_from_checksum")]
|
||||||
#[doc(alias = "new_from_checksum")]
|
#[doc(alias = "new_from_checksum")]
|
||||||
pub fn from_checksum(repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> MutableTree {
|
pub fn from_checksum(repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> MutableTree {
|
||||||
@ -36,26 +34,26 @@ impl MutableTree {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2021_5", feature = "dox"))]
|
#[cfg(feature = "v2021_5")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_5")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_5")))]
|
||||||
#[doc(alias = "ostree_mutable_tree_new_from_commit")]
|
#[doc(alias = "ostree_mutable_tree_new_from_commit")]
|
||||||
#[doc(alias = "new_from_commit")]
|
#[doc(alias = "new_from_commit")]
|
||||||
pub fn from_commit(repo: &Repo, rev: &str) -> Result<MutableTree, glib::Error> {
|
pub fn from_commit(repo: &Repo, rev: &str) -> Result<MutableTree, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_mutable_tree_new_from_commit(repo.to_glib_none().0, rev.to_glib_none().0, &mut error);
|
let ret = ffi::ostree_mutable_tree_new_from_commit(repo.to_glib_none().0, rev.to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_7", feature = "dox"))]
|
#[cfg(feature = "v2018_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_7")))]
|
||||||
#[doc(alias = "ostree_mutable_tree_check_error")]
|
#[doc(alias = "ostree_mutable_tree_check_error")]
|
||||||
pub fn check_error(&self) -> Result<(), glib::Error> {
|
pub fn check_error(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_mutable_tree_check_error(self.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_mutable_tree_check_error(self.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -63,10 +61,10 @@ impl MutableTree {
|
|||||||
#[doc(alias = "ostree_mutable_tree_ensure_dir")]
|
#[doc(alias = "ostree_mutable_tree_ensure_dir")]
|
||||||
pub fn ensure_dir(&self, name: &str) -> Result<MutableTree, glib::Error> {
|
pub fn ensure_dir(&self, name: &str) -> Result<MutableTree, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_subdir = ptr::null_mut();
|
let mut out_subdir = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_mutable_tree_ensure_dir(self.to_glib_none().0, name.to_glib_none().0, &mut out_subdir, &mut error);
|
let is_ok = ffi::ostree_mutable_tree_ensure_dir(self.to_glib_none().0, name.to_glib_none().0, &mut out_subdir, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_subdir)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_subdir)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -74,16 +72,16 @@ impl MutableTree {
|
|||||||
#[doc(alias = "ostree_mutable_tree_ensure_parent_dirs")]
|
#[doc(alias = "ostree_mutable_tree_ensure_parent_dirs")]
|
||||||
pub fn ensure_parent_dirs(&self, split_path: &[&str], metadata_checksum: &str) -> Result<MutableTree, glib::Error> {
|
pub fn ensure_parent_dirs(&self, split_path: &[&str], metadata_checksum: &str) -> Result<MutableTree, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_parent = ptr::null_mut();
|
let mut out_parent = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_mutable_tree_ensure_parent_dirs(self.to_glib_none().0, split_path.to_glib_none().0, metadata_checksum.to_glib_none().0, &mut out_parent, &mut error);
|
let is_ok = ffi::ostree_mutable_tree_ensure_parent_dirs(self.to_glib_none().0, split_path.to_glib_none().0, metadata_checksum.to_glib_none().0, &mut out_parent, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_parent)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_parent)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_7", feature = "dox"))]
|
#[cfg(feature = "v2018_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_7")))]
|
||||||
#[doc(alias = "ostree_mutable_tree_fill_empty_from_dirtree")]
|
#[doc(alias = "ostree_mutable_tree_fill_empty_from_dirtree")]
|
||||||
pub fn fill_empty_from_dirtree(&self, repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> bool {
|
pub fn fill_empty_from_dirtree(&self, repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -122,23 +120,23 @@ impl MutableTree {
|
|||||||
#[doc(alias = "ostree_mutable_tree_lookup")]
|
#[doc(alias = "ostree_mutable_tree_lookup")]
|
||||||
pub fn lookup(&self, name: &str) -> Result<(Option<glib::GString>, Option<MutableTree>), glib::Error> {
|
pub fn lookup(&self, name: &str) -> Result<(Option<glib::GString>, Option<MutableTree>), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_file_checksum = ptr::null_mut();
|
let mut out_file_checksum = std::ptr::null_mut();
|
||||||
let mut out_subdir = ptr::null_mut();
|
let mut out_subdir = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_mutable_tree_lookup(self.to_glib_none().0, name.to_glib_none().0, &mut out_file_checksum, &mut out_subdir, &mut error);
|
let is_ok = ffi::ostree_mutable_tree_lookup(self.to_glib_none().0, name.to_glib_none().0, &mut out_file_checksum, &mut out_subdir, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok((from_glib_full(out_file_checksum), from_glib_full(out_subdir))) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok((from_glib_full(out_file_checksum), from_glib_full(out_subdir))) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_9", feature = "dox"))]
|
#[cfg(feature = "v2018_9")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_9")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_9")))]
|
||||||
#[doc(alias = "ostree_mutable_tree_remove")]
|
#[doc(alias = "ostree_mutable_tree_remove")]
|
||||||
pub fn remove(&self, name: &str, allow_noent: bool) -> Result<(), glib::Error> {
|
pub fn remove(&self, name: &str, allow_noent: bool) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_mutable_tree_remove(self.to_glib_none().0, name.to_glib_none().0, allow_noent.into_glib(), &mut error);
|
let is_ok = ffi::ostree_mutable_tree_remove(self.to_glib_none().0, name.to_glib_none().0, allow_noent.into_glib(), &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -146,9 +144,9 @@ impl MutableTree {
|
|||||||
#[doc(alias = "ostree_mutable_tree_replace_file")]
|
#[doc(alias = "ostree_mutable_tree_replace_file")]
|
||||||
pub fn replace_file(&self, name: &str, checksum: &str) -> Result<(), glib::Error> {
|
pub fn replace_file(&self, name: &str, checksum: &str) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_mutable_tree_replace_file(self.to_glib_none().0, name.to_glib_none().0, checksum.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_mutable_tree_replace_file(self.to_glib_none().0, name.to_glib_none().0, checksum.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -170,10 +168,10 @@ impl MutableTree {
|
|||||||
#[doc(alias = "ostree_mutable_tree_walk")]
|
#[doc(alias = "ostree_mutable_tree_walk")]
|
||||||
pub fn walk(&self, split_path: &[&str], start: u32) -> Result<MutableTree, glib::Error> {
|
pub fn walk(&self, split_path: &[&str], start: u32) -> Result<MutableTree, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_subdir = ptr::null_mut();
|
let mut out_subdir = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_mutable_tree_walk(self.to_glib_none().0, split_path.to_glib_none().0, start, &mut out_subdir, &mut error);
|
let is_ok = ffi::ostree_mutable_tree_walk(self.to_glib_none().0, split_path.to_glib_none().0, start, &mut out_subdir, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_subdir)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_subdir)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,9 +182,3 @@ impl Default for MutableTree {
|
|||||||
Self::new()
|
Self::new()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for MutableTree {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("MutableTree")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
7
rust-bindings/src/auto/remote.rs
generated
7
rust-bindings/src/auto/remote.rs
generated
@ -2,8 +2,7 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
@ -34,9 +33,9 @@ impl Remote {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Remote {
|
impl std::fmt::Display for Remote {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
f.write_str(&self.name())
|
f.write_str(&self.name())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
738
rust-bindings/src/auto/repo.rs
generated
738
rust-bindings/src/auto/repo.rs
generated
File diff suppressed because it is too large
Load Diff
54
rust-bindings/src/auto/repo_commit_modifier.rs
generated
54
rust-bindings/src/auto/repo_commit_modifier.rs
generated
@ -2,21 +2,15 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::Repo;
|
use crate::{Repo,RepoCommitFilterResult,RepoCommitModifierFlags,SePolicy};
|
||||||
use crate::RepoCommitFilterResult;
|
#[cfg(feature = "v2017_13")]
|
||||||
use crate::RepoCommitModifierFlags;
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
|
||||||
#[cfg(any(feature = "v2017_13", feature = "dox"))]
|
use crate::{RepoDevInoCache};
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
|
use glib::{translate::*};
|
||||||
use crate::RepoDevInoCache;
|
#[cfg(feature = "v2020_4")]
|
||||||
use crate::SePolicy;
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
|
||||||
#[cfg(any(feature = "v2020_4", feature = "dox"))]
|
use glib::{prelude::*};
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
|
use std::{boxed::Box as Box_};
|
||||||
use glib::object::IsA;
|
|
||||||
use glib::translate::*;
|
|
||||||
use std::boxed::Box as Box_;
|
|
||||||
#[cfg(any(feature = "v2020_4", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
@ -37,17 +31,17 @@ impl RepoCommitModifier {
|
|||||||
let repo = from_glib_borrow(repo);
|
let repo = from_glib_borrow(repo);
|
||||||
let path: Borrowed<glib::GString> = from_glib_borrow(path);
|
let path: Borrowed<glib::GString> = from_glib_borrow(path);
|
||||||
let file_info = from_glib_borrow(file_info);
|
let file_info = from_glib_borrow(file_info);
|
||||||
let callback: &Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>> = &*(user_data as *mut _);
|
let callback = &*(user_data as *mut Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>>);
|
||||||
let res = if let Some(ref callback) = *callback {
|
if let Some(ref callback) = *callback {
|
||||||
callback(&repo, path.as_str(), &file_info)
|
callback(&repo, path.as_str(), &file_info)
|
||||||
} else {
|
} else {
|
||||||
panic!("cannot get closure...")
|
panic!("cannot get closure...")
|
||||||
};
|
}
|
||||||
res.into_glib()
|
.into_glib()
|
||||||
}
|
}
|
||||||
let commit_filter = if commit_filter_data.is_some() { Some(commit_filter_func as _) } else { None };
|
let commit_filter = if commit_filter_data.is_some() { Some(commit_filter_func as _) } else { None };
|
||||||
unsafe extern "C" fn destroy_notify_func(data: glib::ffi::gpointer) {
|
unsafe extern "C" fn destroy_notify_func(data: glib::ffi::gpointer) {
|
||||||
let _callback: Box_<Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>>> = Box_::from_raw(data as *mut _);
|
let _callback = Box_::from_raw(data as *mut Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>>);
|
||||||
}
|
}
|
||||||
let destroy_call3 = Some(destroy_notify_func as _);
|
let destroy_call3 = Some(destroy_notify_func as _);
|
||||||
let super_callback0: Box_<Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>>> = commit_filter_data;
|
let super_callback0: Box_<Option<Box_<dyn Fn(&Repo, &str, &gio::FileInfo) -> RepoCommitFilterResult + 'static>>> = commit_filter_data;
|
||||||
@ -56,8 +50,8 @@ impl RepoCommitModifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_13", feature = "dox"))]
|
#[cfg(feature = "v2017_13")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
|
||||||
#[doc(alias = "ostree_repo_commit_modifier_set_devino_cache")]
|
#[doc(alias = "ostree_repo_commit_modifier_set_devino_cache")]
|
||||||
pub fn set_devino_cache(&self, cache: &RepoDevInoCache) {
|
pub fn set_devino_cache(&self, cache: &RepoDevInoCache) {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -72,14 +66,14 @@ impl RepoCommitModifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_4", feature = "dox"))]
|
#[cfg(feature = "v2020_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
|
||||||
#[doc(alias = "ostree_repo_commit_modifier_set_sepolicy_from_commit")]
|
#[doc(alias = "ostree_repo_commit_modifier_set_sepolicy_from_commit")]
|
||||||
pub fn set_sepolicy_from_commit(&self, repo: &Repo, rev: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn set_sepolicy_from_commit(&self, repo: &Repo, rev: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_repo_commit_modifier_set_sepolicy_from_commit(self.to_glib_none().0, repo.to_glib_none().0, rev.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_repo_commit_modifier_set_sepolicy_from_commit(self.to_glib_none().0, repo.to_glib_none().0, rev.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,13 +85,13 @@ impl RepoCommitModifier {
|
|||||||
let repo = from_glib_borrow(repo);
|
let repo = from_glib_borrow(repo);
|
||||||
let path: Borrowed<glib::GString> = from_glib_borrow(path);
|
let path: Borrowed<glib::GString> = from_glib_borrow(path);
|
||||||
let file_info = from_glib_borrow(file_info);
|
let file_info = from_glib_borrow(file_info);
|
||||||
let callback: &P = &*(user_data as *mut _);
|
let callback = &*(user_data as *mut P);
|
||||||
let res = (*callback)(&repo, path.as_str(), &file_info);
|
(*callback)(&repo, path.as_str(), &file_info)
|
||||||
res.to_glib_full()
|
.to_glib_full()
|
||||||
}
|
}
|
||||||
let callback = Some(callback_func::<P> as _);
|
let callback = Some(callback_func::<P> as _);
|
||||||
unsafe extern "C" fn destroy_func<P: Fn(&Repo, &str, &gio::FileInfo) -> glib::Variant + 'static>(data: glib::ffi::gpointer) {
|
unsafe extern "C" fn destroy_func<P: Fn(&Repo, &str, &gio::FileInfo) -> glib::Variant + 'static>(data: glib::ffi::gpointer) {
|
||||||
let _callback: Box_<P> = Box_::from_raw(data as *mut _);
|
let _callback = Box_::from_raw(data as *mut P);
|
||||||
}
|
}
|
||||||
let destroy_call2 = Some(destroy_func::<P> as _);
|
let destroy_call2 = Some(destroy_func::<P> as _);
|
||||||
let super_callback0: Box_<P> = callback_data;
|
let super_callback0: Box_<P> = callback_data;
|
||||||
|
2
rust-bindings/src/auto/repo_dev_ino_cache.rs
generated
2
rust-bindings/src/auto/repo_dev_ino_cache.rs
generated
@ -2,7 +2,7 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
|
34
rust-bindings/src/auto/repo_file.rs
generated
34
rust-bindings/src/auto/repo_file.rs
generated
@ -2,12 +2,8 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::Repo;
|
use crate::{Repo};
|
||||||
use glib::object::IsA;
|
use glib::{prelude::*,translate::*};
|
||||||
use glib::translate::*;
|
|
||||||
use std::fmt;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeRepoFile")]
|
#[doc(alias = "OstreeRepoFile")]
|
||||||
@ -22,9 +18,9 @@ impl RepoFile {
|
|||||||
#[doc(alias = "ostree_repo_file_ensure_resolved")]
|
#[doc(alias = "ostree_repo_file_ensure_resolved")]
|
||||||
pub fn ensure_resolved(&self) -> Result<(), glib::Error> {
|
pub fn ensure_resolved(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_repo_file_ensure_resolved(self.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_repo_file_ensure_resolved(self.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -58,10 +54,10 @@ impl RepoFile {
|
|||||||
#[doc(alias = "get_xattrs")]
|
#[doc(alias = "get_xattrs")]
|
||||||
pub fn xattrs(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Variant, glib::Error> {
|
pub fn xattrs(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Variant, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_xattrs = ptr::null_mut();
|
let mut out_xattrs = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_repo_file_get_xattrs(self.to_glib_none().0, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_repo_file_get_xattrs(self.to_glib_none().0, &mut out_xattrs, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_xattrs)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_xattrs)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -69,8 +65,8 @@ impl RepoFile {
|
|||||||
#[doc(alias = "ostree_repo_file_tree_find_child")]
|
#[doc(alias = "ostree_repo_file_tree_find_child")]
|
||||||
pub fn tree_find_child(&self, name: &str) -> (i32, bool, glib::Variant) {
|
pub fn tree_find_child(&self, name: &str) -> (i32, bool, glib::Variant) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut is_dir = mem::MaybeUninit::uninit();
|
let mut is_dir = std::mem::MaybeUninit::uninit();
|
||||||
let mut out_container = ptr::null_mut();
|
let mut out_container = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_repo_file_tree_find_child(self.to_glib_none().0, name.to_glib_none().0, is_dir.as_mut_ptr(), &mut out_container);
|
let ret = ffi::ostree_repo_file_tree_find_child(self.to_glib_none().0, name.to_glib_none().0, is_dir.as_mut_ptr(), &mut out_container);
|
||||||
(ret, from_glib(is_dir.assume_init()), from_glib_full(out_container))
|
(ret, from_glib(is_dir.assume_init()), from_glib_full(out_container))
|
||||||
}
|
}
|
||||||
@ -107,10 +103,10 @@ impl RepoFile {
|
|||||||
#[doc(alias = "ostree_repo_file_tree_query_child")]
|
#[doc(alias = "ostree_repo_file_tree_query_child")]
|
||||||
pub fn tree_query_child(&self, n: i32, attributes: &str, flags: gio::FileQueryInfoFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<gio::FileInfo, glib::Error> {
|
pub fn tree_query_child(&self, n: i32, attributes: &str, flags: gio::FileQueryInfoFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<gio::FileInfo, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_info = ptr::null_mut();
|
let mut out_info = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_repo_file_tree_query_child(self.to_glib_none().0, n, attributes.to_glib_none().0, flags.into_glib(), &mut out_info, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_repo_file_tree_query_child(self.to_glib_none().0, n, attributes.to_glib_none().0, flags.into_glib(), &mut out_info, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_info)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_info)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,9 +118,3 @@ impl RepoFile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoFile {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("RepoFile")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
31
rust-bindings/src/auto/repo_finder.rs
generated
31
rust-bindings/src/auto/repo_finder.rs
generated
@ -2,17 +2,13 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
use crate::RepoFinderResult;
|
use crate::{RepoFinderResult};
|
||||||
use glib::object::IsA;
|
use glib::{prelude::*};
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::fmt;
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeRepoFinder")]
|
#[doc(alias = "OstreeRepoFinder")]
|
||||||
@ -28,12 +24,11 @@ impl RepoFinder {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait RepoFinderExt: 'static {}
|
mod sealed {
|
||||||
|
pub trait Sealed {}
|
||||||
|
impl<T: super::IsA<super::RepoFinder>> Sealed for T {}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub trait RepoFinderExt: IsA<RepoFinder> + sealed::Sealed + 'static {}
|
||||||
|
|
||||||
impl<O: IsA<RepoFinder>> RepoFinderExt for O {}
|
impl<O: IsA<RepoFinder>> RepoFinderExt for O {}
|
||||||
|
|
||||||
impl fmt::Display for RepoFinder {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("RepoFinder")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
23
rust-bindings/src/auto/repo_finder_avahi.rs
generated
23
rust-bindings/src/auto/repo_finder_avahi.rs
generated
@ -2,11 +2,10 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::RepoFinder;
|
use crate::{RepoFinder};
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeRepoFinderAvahi")]
|
#[doc(alias = "OstreeRepoFinderAvahi")]
|
||||||
@ -18,8 +17,8 @@ glib::wrapper! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl RepoFinderAvahi {
|
impl RepoFinderAvahi {
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
#[doc(alias = "ostree_repo_finder_avahi_new")]
|
#[doc(alias = "ostree_repo_finder_avahi_new")]
|
||||||
pub fn new(context: Option<&glib::MainContext>) -> RepoFinderAvahi {
|
pub fn new(context: Option<&glib::MainContext>) -> RepoFinderAvahi {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -27,8 +26,8 @@ impl RepoFinderAvahi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
#[doc(alias = "ostree_repo_finder_avahi_stop")]
|
#[doc(alias = "ostree_repo_finder_avahi_stop")]
|
||||||
pub fn stop(&self) {
|
pub fn stop(&self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -36,9 +35,3 @@ impl RepoFinderAvahi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoFinderAvahi {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("RepoFinderAvahi")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
23
rust-bindings/src/auto/repo_finder_config.rs
generated
23
rust-bindings/src/auto/repo_finder_config.rs
generated
@ -2,11 +2,10 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::RepoFinder;
|
use crate::{RepoFinder};
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeRepoFinderConfig")]
|
#[doc(alias = "OstreeRepoFinderConfig")]
|
||||||
@ -18,8 +17,8 @@ glib::wrapper! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl RepoFinderConfig {
|
impl RepoFinderConfig {
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
#[doc(alias = "ostree_repo_finder_config_new")]
|
#[doc(alias = "ostree_repo_finder_config_new")]
|
||||||
pub fn new() -> RepoFinderConfig {
|
pub fn new() -> RepoFinderConfig {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -28,16 +27,10 @@ impl RepoFinderConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
impl Default for RepoFinderConfig {
|
impl Default for RepoFinderConfig {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new()
|
Self::new()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoFinderConfig {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("RepoFinderConfig")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
34
rust-bindings/src/auto/repo_finder_mount.rs
generated
34
rust-bindings/src/auto/repo_finder_mount.rs
generated
@ -2,20 +2,10 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::RepoFinder;
|
use crate::{RepoFinder};
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
use glib::object::IsA;
|
use glib::{prelude::*,translate::*};
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
|
||||||
use glib::object::ObjectType as ObjectType_;
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
|
||||||
use glib::translate::*;
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
|
||||||
use glib::StaticType;
|
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeRepoFinderMount")]
|
#[doc(alias = "OstreeRepoFinderMount")]
|
||||||
@ -27,8 +17,8 @@ glib::wrapper! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl RepoFinderMount {
|
impl RepoFinderMount {
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
#[doc(alias = "ostree_repo_finder_mount_new")]
|
#[doc(alias = "ostree_repo_finder_mount_new")]
|
||||||
pub fn new(monitor: Option<&impl IsA<gio::VolumeMonitor>>) -> RepoFinderMount {
|
pub fn new(monitor: Option<&impl IsA<gio::VolumeMonitor>>) -> RepoFinderMount {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -36,15 +26,9 @@ impl RepoFinderMount {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
pub fn monitor(&self) -> Option<gio::VolumeMonitor> {
|
pub fn monitor(&self) -> Option<gio::VolumeMonitor> {
|
||||||
glib::ObjectExt::property(self, "monitor")
|
ObjectExt::property(self, "monitor")
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl fmt::Display for RepoFinderMount {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("RepoFinderMount")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
27
rust-bindings/src/auto/repo_finder_override.rs
generated
27
rust-bindings/src/auto/repo_finder_override.rs
generated
@ -2,11 +2,10 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::RepoFinder;
|
use crate::{RepoFinder};
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeRepoFinderOverride")]
|
#[doc(alias = "OstreeRepoFinderOverride")]
|
||||||
@ -18,8 +17,8 @@ glib::wrapper! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl RepoFinderOverride {
|
impl RepoFinderOverride {
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
#[doc(alias = "ostree_repo_finder_override_new")]
|
#[doc(alias = "ostree_repo_finder_override_new")]
|
||||||
pub fn new() -> RepoFinderOverride {
|
pub fn new() -> RepoFinderOverride {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -27,8 +26,8 @@ impl RepoFinderOverride {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
#[doc(alias = "ostree_repo_finder_override_add_uri")]
|
#[doc(alias = "ostree_repo_finder_override_add_uri")]
|
||||||
pub fn add_uri(&self, uri: &str) {
|
pub fn add_uri(&self, uri: &str) {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -37,16 +36,10 @@ impl RepoFinderOverride {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[cfg(feature = "v2018_6")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
impl Default for RepoFinderOverride {
|
impl Default for RepoFinderOverride {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new()
|
Self::new()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for RepoFinderOverride {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("RepoFinderOverride")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
9
rust-bindings/src/auto/repo_finder_result.rs
generated
9
rust-bindings/src/auto/repo_finder_result.rs
generated
@ -2,8 +2,7 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::cmp;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[derive(Debug, Hash)]
|
#[derive(Debug, Hash)]
|
||||||
@ -41,14 +40,14 @@ impl Eq for RepoFinderResult {}
|
|||||||
|
|
||||||
impl PartialOrd for RepoFinderResult {
|
impl PartialOrd for RepoFinderResult {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
|
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
||||||
self.compare(other).partial_cmp(&0)
|
Some(self.cmp(other))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Ord for RepoFinderResult {
|
impl Ord for RepoFinderResult {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn cmp(&self, other: &Self) -> cmp::Ordering {
|
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
|
||||||
self.compare(other).cmp(&0)
|
self.compare(other).cmp(&0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
51
rust-bindings/src/auto/se_policy.rs
generated
51
rust-bindings/src/auto/se_policy.rs
generated
@ -2,14 +2,8 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::Repo;
|
use crate::{Repo,SePolicyRestoreconFlags};
|
||||||
use crate::SePolicyRestoreconFlags;
|
use glib::{prelude::*,translate::*};
|
||||||
use glib::object::IsA;
|
|
||||||
use glib::object::ObjectType as ObjectType_;
|
|
||||||
use glib::translate::*;
|
|
||||||
use glib::StaticType;
|
|
||||||
use std::fmt;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeSePolicy")]
|
#[doc(alias = "OstreeSePolicy")]
|
||||||
@ -24,18 +18,18 @@ impl SePolicy {
|
|||||||
#[doc(alias = "ostree_sepolicy_new")]
|
#[doc(alias = "ostree_sepolicy_new")]
|
||||||
pub fn new(path: &impl IsA<gio::File>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SePolicy, glib::Error> {
|
pub fn new(path: &impl IsA<gio::File>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SePolicy, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_sepolicy_new(path.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let ret = ffi::ostree_sepolicy_new(path.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_4", feature = "dox"))]
|
#[cfg(feature = "v2017_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
|
||||||
#[doc(alias = "ostree_sepolicy_new_at")]
|
#[doc(alias = "ostree_sepolicy_new_at")]
|
||||||
pub fn new_at(rootfs_dfd: i32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SePolicy, glib::Error> {
|
pub fn new_at(rootfs_dfd: i32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SePolicy, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_sepolicy_new_at(rootfs_dfd, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let ret = ffi::ostree_sepolicy_new_at(rootfs_dfd, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
@ -45,14 +39,14 @@ impl SePolicy {
|
|||||||
#[doc(alias = "new_from_commit")]
|
#[doc(alias = "new_from_commit")]
|
||||||
pub fn from_commit(repo: &Repo, rev: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SePolicy, glib::Error> {
|
pub fn from_commit(repo: &Repo, rev: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SePolicy, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_sepolicy_new_from_commit(repo.to_glib_none().0, rev.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let ret = ffi::ostree_sepolicy_new_from_commit(repo.to_glib_none().0, rev.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2016_5", feature = "dox"))]
|
#[cfg(feature = "v2016_5")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_5")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
|
||||||
#[doc(alias = "ostree_sepolicy_get_csum")]
|
#[doc(alias = "ostree_sepolicy_get_csum")]
|
||||||
#[doc(alias = "get_csum")]
|
#[doc(alias = "get_csum")]
|
||||||
pub fn csum(&self) -> Option<glib::GString> {
|
pub fn csum(&self) -> Option<glib::GString> {
|
||||||
@ -65,17 +59,17 @@ impl SePolicy {
|
|||||||
#[doc(alias = "get_label")]
|
#[doc(alias = "get_label")]
|
||||||
pub fn label(&self, relpath: &str, unix_mode: u32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error> {
|
pub fn label(&self, relpath: &str, unix_mode: u32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_label = ptr::null_mut();
|
let mut out_label = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sepolicy_get_label(self.to_glib_none().0, relpath.to_glib_none().0, unix_mode, &mut out_label, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sepolicy_get_label(self.to_glib_none().0, relpath.to_glib_none().0, unix_mode, &mut out_label, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_label)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_label)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "ostree_sepolicy_get_name")]
|
#[doc(alias = "ostree_sepolicy_get_name")]
|
||||||
#[doc(alias = "get_name")]
|
#[doc(alias = "get_name")]
|
||||||
pub fn name(&self) -> glib::GString {
|
pub fn name(&self) -> Option<glib::GString> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::ostree_sepolicy_get_name(self.to_glib_none().0))
|
from_glib_none(ffi::ostree_sepolicy_get_name(self.to_glib_none().0))
|
||||||
}
|
}
|
||||||
@ -92,10 +86,10 @@ impl SePolicy {
|
|||||||
#[doc(alias = "ostree_sepolicy_restorecon")]
|
#[doc(alias = "ostree_sepolicy_restorecon")]
|
||||||
pub fn restorecon(&self, path: &str, info: Option<&gio::FileInfo>, target: &impl IsA<gio::File>, flags: SePolicyRestoreconFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error> {
|
pub fn restorecon(&self, path: &str, info: Option<&gio::FileInfo>, target: &impl IsA<gio::File>, flags: SePolicyRestoreconFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_new_label = ptr::null_mut();
|
let mut out_new_label = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sepolicy_restorecon(self.to_glib_none().0, path.to_glib_none().0, info.to_glib_none().0, target.as_ref().to_glib_none().0, flags.into_glib(), &mut out_new_label, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sepolicy_restorecon(self.to_glib_none().0, path.to_glib_none().0, info.to_glib_none().0, target.as_ref().to_glib_none().0, flags.into_glib(), &mut out_new_label, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_new_label)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_new_label)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,23 +97,16 @@ impl SePolicy {
|
|||||||
#[doc(alias = "ostree_sepolicy_setfscreatecon")]
|
#[doc(alias = "ostree_sepolicy_setfscreatecon")]
|
||||||
pub fn setfscreatecon(&self, path: &str, mode: u32) -> Result<(), glib::Error> {
|
pub fn setfscreatecon(&self, path: &str, mode: u32) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sepolicy_setfscreatecon(self.to_glib_none().0, path.to_glib_none().0, mode, &mut error);
|
let is_ok = ffi::ostree_sepolicy_setfscreatecon(self.to_glib_none().0, path.to_glib_none().0, mode, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "rootfs-dfd")]
|
#[doc(alias = "rootfs-dfd")]
|
||||||
pub fn rootfs_dfd(&self) -> i32 {
|
pub fn rootfs_dfd(&self) -> i32 {
|
||||||
glib::ObjectExt::property(self, "rootfs-dfd")
|
ObjectExt::property(self, "rootfs-dfd")
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl fmt::Display for SePolicy {
|
|
||||||
#[inline]
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str(&self.name())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
217
rust-bindings/src/auto/sign.rs
generated
217
rust-bindings/src/auto/sign.rs
generated
@ -2,17 +2,13 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
use crate::Repo;
|
use crate::{Repo};
|
||||||
use glib::object::IsA;
|
use glib::{prelude::*};
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
use glib::translate::*;
|
use glib::{translate::*};
|
||||||
use std::fmt;
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeSign")]
|
#[doc(alias = "OstreeSign")]
|
||||||
@ -27,8 +23,8 @@ impl Sign {
|
|||||||
pub const NONE: Option<&'static Sign> = None;
|
pub const NONE: Option<&'static Sign> = None;
|
||||||
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
#[doc(alias = "ostree_sign_get_all")]
|
#[doc(alias = "ostree_sign_get_all")]
|
||||||
#[doc(alias = "get_all")]
|
#[doc(alias = "get_all")]
|
||||||
pub fn all() -> Vec<Sign> {
|
pub fn all() -> Vec<Sign> {
|
||||||
@ -37,228 +33,175 @@ impl Sign {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
#[doc(alias = "ostree_sign_get_by_name")]
|
#[doc(alias = "ostree_sign_get_by_name")]
|
||||||
#[doc(alias = "get_by_name")]
|
#[doc(alias = "get_by_name")]
|
||||||
pub fn by_name(name: &str) -> Result<Sign, glib::Error> {
|
pub fn by_name(name: &str) -> Result<Sign, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_sign_get_by_name(name.to_glib_none().0, &mut error);
|
let ret = ffi::ostree_sign_get_by_name(name.to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait SignExt: 'static {
|
mod sealed {
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
pub trait Sealed {}
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
impl<T: super::IsA<super::Sign>> Sealed for T {}
|
||||||
#[doc(alias = "ostree_sign_add_pk")]
|
|
||||||
fn add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_clear_keys")]
|
|
||||||
fn clear_keys(&self) -> Result<(), glib::Error>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_commit")]
|
|
||||||
fn commit(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_commit_verify")]
|
|
||||||
fn commit_verify(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_data")]
|
|
||||||
fn data(&self, data: &glib::Bytes, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Bytes, glib::Error>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_data_verify")]
|
|
||||||
fn data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant) -> Result<Option<glib::GString>, glib::Error>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_get_name")]
|
|
||||||
#[doc(alias = "get_name")]
|
|
||||||
fn name(&self) -> glib::GString;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_load_pk")]
|
|
||||||
fn load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_metadata_format")]
|
|
||||||
fn metadata_format(&self) -> glib::GString;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_metadata_key")]
|
|
||||||
fn metadata_key(&self) -> glib::GString;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_set_pk")]
|
|
||||||
fn set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_set_sk")]
|
|
||||||
fn set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error>;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
|
||||||
#[doc(alias = "ostree_sign_summary")]
|
|
||||||
fn summary(&self, repo: &Repo, keys: &glib::Variant, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Sign>> SignExt for O {
|
pub trait SignExt: IsA<Sign> + sealed::Sealed + 'static {
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_add_pk")]
|
||||||
fn add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> {
|
fn add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sign_add_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sign_add_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_clear_keys")]
|
||||||
fn clear_keys(&self) -> Result<(), glib::Error> {
|
fn clear_keys(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sign_clear_keys(self.as_ref().to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sign_clear_keys(self.as_ref().to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_commit")]
|
||||||
fn commit(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
fn commit(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sign_commit(self.as_ref().to_glib_none().0, repo.to_glib_none().0, commit_checksum.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sign_commit(self.as_ref().to_glib_none().0, repo.to_glib_none().0, commit_checksum.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_commit_verify")]
|
||||||
fn commit_verify(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error> {
|
fn commit_verify(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Option<glib::GString>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_success_message = ptr::null_mut();
|
let mut out_success_message = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sign_commit_verify(self.as_ref().to_glib_none().0, repo.to_glib_none().0, commit_checksum.to_glib_none().0, &mut out_success_message, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sign_commit_verify(self.as_ref().to_glib_none().0, repo.to_glib_none().0, commit_checksum.to_glib_none().0, &mut out_success_message, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_success_message)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_success_message)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_data")]
|
||||||
fn data(&self, data: &glib::Bytes, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Bytes, glib::Error> {
|
fn data(&self, data: &glib::Bytes, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::Bytes, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut signature = ptr::null_mut();
|
let mut signature = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sign_data(self.as_ref().to_glib_none().0, data.to_glib_none().0, &mut signature, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sign_data(self.as_ref().to_glib_none().0, data.to_glib_none().0, &mut signature, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(signature)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(signature)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_data_verify")]
|
||||||
fn data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant) -> Result<Option<glib::GString>, glib::Error> {
|
fn data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant) -> Result<Option<glib::GString>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_success_message = ptr::null_mut();
|
let mut out_success_message = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sign_data_verify(self.as_ref().to_glib_none().0, data.to_glib_none().0, signatures.to_glib_none().0, &mut out_success_message, &mut error);
|
let is_ok = ffi::ostree_sign_data_verify(self.as_ref().to_glib_none().0, data.to_glib_none().0, signatures.to_glib_none().0, &mut out_success_message, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_success_message)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_success_message)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_get_name")]
|
||||||
|
#[doc(alias = "get_name")]
|
||||||
fn name(&self) -> glib::GString {
|
fn name(&self) -> glib::GString {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::ostree_sign_get_name(self.as_ref().to_glib_none().0))
|
from_glib_none(ffi::ostree_sign_get_name(self.as_ref().to_glib_none().0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_load_pk")]
|
||||||
fn load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error> {
|
fn load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sign_load_pk(self.as_ref().to_glib_none().0, options.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sign_load_pk(self.as_ref().to_glib_none().0, options.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_metadata_format")]
|
||||||
fn metadata_format(&self) -> glib::GString {
|
fn metadata_format(&self) -> glib::GString {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::ostree_sign_metadata_format(self.as_ref().to_glib_none().0))
|
from_glib_none(ffi::ostree_sign_metadata_format(self.as_ref().to_glib_none().0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_metadata_key")]
|
||||||
fn metadata_key(&self) -> glib::GString {
|
fn metadata_key(&self) -> glib::GString {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::ostree_sign_metadata_key(self.as_ref().to_glib_none().0))
|
from_glib_none(ffi::ostree_sign_metadata_key(self.as_ref().to_glib_none().0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_set_pk")]
|
||||||
fn set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> {
|
fn set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sign_set_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sign_set_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_set_sk")]
|
||||||
fn set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error> {
|
fn set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sign_set_sk(self.as_ref().to_glib_none().0, secret_key.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sign_set_sk(self.as_ref().to_glib_none().0, secret_key.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_2", feature = "dox"))]
|
#[cfg(feature = "v2020_2")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_2")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
|
||||||
|
#[doc(alias = "ostree_sign_summary")]
|
||||||
fn summary(&self, repo: &Repo, keys: &glib::Variant, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
fn summary(&self, repo: &Repo, keys: &glib::Variant, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sign_summary(self.as_ref().to_glib_none().0, repo.to_glib_none().0, keys.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sign_summary(self.as_ref().to_glib_none().0, repo.to_glib_none().0, keys.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Sign {
|
impl<O: IsA<Sign>> SignExt for O {}
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("Sign")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
293
rust-bindings/src/auto/sysroot.rs
generated
293
rust-bindings/src/auto/sysroot.rs
generated
@ -2,39 +2,24 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::Deployment;
|
use crate::{Deployment,SysrootSimpleWriteDeploymentFlags};
|
||||||
#[cfg(any(feature = "v2016_4", feature = "dox"))]
|
#[cfg(feature = "v2016_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
|
||||||
use crate::DeploymentUnlockedState;
|
use crate::{DeploymentUnlockedState};
|
||||||
#[cfg(any(feature = "v2017_7", feature = "dox"))]
|
#[cfg(feature = "v2017_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
|
||||||
use crate::Repo;
|
use crate::{SysrootWriteDeploymentsOpts};
|
||||||
#[cfg(any(feature = "v2020_7", feature = "dox"))]
|
#[cfg(feature = "v2017_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
|
||||||
use crate::SysrootDeployTreeOpts;
|
use crate::{Repo};
|
||||||
use crate::SysrootSimpleWriteDeploymentFlags;
|
#[cfg(feature = "v2020_7")]
|
||||||
#[cfg(any(feature = "v2017_4", feature = "dox"))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
|
use crate::{SysrootDeployTreeOpts};
|
||||||
use crate::SysrootWriteDeploymentsOpts;
|
use glib::{prelude::*,translate::*};
|
||||||
use glib::object::IsA;
|
#[cfg(feature = "v2017_10")]
|
||||||
#[cfg(any(feature = "v2017_10", feature = "dox"))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
|
use glib::{signal::{connect_raw, SignalHandlerId}};
|
||||||
use glib::object::ObjectType as ObjectType_;
|
use std::{boxed::Box as Box_,pin::Pin};
|
||||||
#[cfg(any(feature = "v2017_10", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
|
|
||||||
use glib::signal::connect_raw;
|
|
||||||
#[cfg(any(feature = "v2017_10", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
|
|
||||||
use glib::signal::SignalHandlerId;
|
|
||||||
use glib::translate::*;
|
|
||||||
use std::boxed::Box as Box_;
|
|
||||||
use std::fmt;
|
|
||||||
use std::mem;
|
|
||||||
#[cfg(any(feature = "v2017_10", feature = "dox"))]
|
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
|
|
||||||
use std::mem::transmute;
|
|
||||||
use std::pin::Pin;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeSysroot")]
|
#[doc(alias = "OstreeSysroot")]
|
||||||
@ -60,45 +45,57 @@ impl Sysroot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "ostree_sysroot_cleanup")]
|
#[cfg(feature = "v2023_8")]
|
||||||
pub fn cleanup(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2023_8")))]
|
||||||
|
#[doc(alias = "ostree_sysroot_change_finalization")]
|
||||||
|
pub fn change_finalization(&self, deployment: &Deployment) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_cleanup(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_change_finalization(self.to_glib_none().0, deployment.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
#[doc(alias = "ostree_sysroot_cleanup")]
|
||||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_6")))]
|
pub fn cleanup(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
|
unsafe {
|
||||||
|
let mut error = std::ptr::null_mut();
|
||||||
|
let is_ok = ffi::ostree_sysroot_cleanup(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//#[cfg(feature = "v2018_6")]
|
||||||
|
//#[cfg_attr(docsrs, doc(cfg(feature = "v2018_6")))]
|
||||||
//#[doc(alias = "ostree_sysroot_cleanup_prune_repo")]
|
//#[doc(alias = "ostree_sysroot_cleanup_prune_repo")]
|
||||||
//pub fn cleanup_prune_repo(&self, options: /*Ignored*/&mut RepoPruneOptions, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(i32, i32, u64), glib::Error> {
|
//pub fn cleanup_prune_repo(&self, options: /*Ignored*/&mut RepoPruneOptions, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(i32, i32, u64), glib::Error> {
|
||||||
// unsafe { TODO: call ffi:ostree_sysroot_cleanup_prune_repo() }
|
// unsafe { TODO: call ffi:ostree_sysroot_cleanup_prune_repo() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_5", feature = "dox"))]
|
#[cfg(feature = "v2018_5")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
|
||||||
#[doc(alias = "ostree_sysroot_deploy_tree")]
|
#[doc(alias = "ostree_sysroot_deploy_tree")]
|
||||||
pub fn deploy_tree(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, provided_merge_deployment: Option<&Deployment>, override_kernel_argv: &[&str], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
|
pub fn deploy_tree(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, provided_merge_deployment: Option<&Deployment>, override_kernel_argv: &[&str], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_new_deployment = ptr::null_mut();
|
let mut out_new_deployment = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_deploy_tree(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, provided_merge_deployment.to_glib_none().0, override_kernel_argv.to_glib_none().0, &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_deploy_tree(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, provided_merge_deployment.to_glib_none().0, override_kernel_argv.to_glib_none().0, &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_7", feature = "dox"))]
|
#[cfg(feature = "v2020_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
|
||||||
#[doc(alias = "ostree_sysroot_deploy_tree_with_options")]
|
#[doc(alias = "ostree_sysroot_deploy_tree_with_options")]
|
||||||
pub fn deploy_tree_with_options(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, provided_merge_deployment: Option<&Deployment>, opts: Option<&SysrootDeployTreeOpts>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
|
pub fn deploy_tree_with_options(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, provided_merge_deployment: Option<&Deployment>, opts: Option<&SysrootDeployTreeOpts>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_new_deployment = ptr::null_mut();
|
let mut out_new_deployment = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_deploy_tree_with_options(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, provided_merge_deployment.to_glib_none().0, mut_override(opts.to_glib_none().0), &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_deploy_tree_with_options(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, provided_merge_deployment.to_glib_none().0, mut_override(opts.to_glib_none().0), &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -106,9 +103,9 @@ impl Sysroot {
|
|||||||
#[doc(alias = "ostree_sysroot_deployment_set_kargs")]
|
#[doc(alias = "ostree_sysroot_deployment_set_kargs")]
|
||||||
pub fn deployment_set_kargs(&self, deployment: &Deployment, new_kargs: &[&str], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn deployment_set_kargs(&self, deployment: &Deployment, new_kargs: &[&str], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_deployment_set_kargs(self.to_glib_none().0, deployment.to_glib_none().0, new_kargs.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_deployment_set_kargs(self.to_glib_none().0, deployment.to_glib_none().0, new_kargs.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -116,9 +113,9 @@ impl Sysroot {
|
|||||||
#[doc(alias = "ostree_sysroot_deployment_set_kargs_in_place")]
|
#[doc(alias = "ostree_sysroot_deployment_set_kargs_in_place")]
|
||||||
pub fn deployment_set_kargs_in_place(&self, deployment: &Deployment, kargs_str: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn deployment_set_kargs_in_place(&self, deployment: &Deployment, kargs_str: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_deployment_set_kargs_in_place(self.to_glib_none().0, deployment.to_glib_none().0, kargs_str.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_deployment_set_kargs_in_place(self.to_glib_none().0, deployment.to_glib_none().0, kargs_str.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -126,33 +123,33 @@ impl Sysroot {
|
|||||||
#[doc(alias = "ostree_sysroot_deployment_set_mutable")]
|
#[doc(alias = "ostree_sysroot_deployment_set_mutable")]
|
||||||
pub fn deployment_set_mutable(&self, deployment: &Deployment, is_mutable: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn deployment_set_mutable(&self, deployment: &Deployment, is_mutable: bool, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_deployment_set_mutable(self.to_glib_none().0, deployment.to_glib_none().0, is_mutable.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_deployment_set_mutable(self.to_glib_none().0, deployment.to_glib_none().0, is_mutable.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_3", feature = "dox"))]
|
#[cfg(feature = "v2018_3")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_3")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_3")))]
|
||||||
#[doc(alias = "ostree_sysroot_deployment_set_pinned")]
|
#[doc(alias = "ostree_sysroot_deployment_set_pinned")]
|
||||||
pub fn deployment_set_pinned(&self, deployment: &Deployment, is_pinned: bool) -> Result<(), glib::Error> {
|
pub fn deployment_set_pinned(&self, deployment: &Deployment, is_pinned: bool) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_deployment_set_pinned(self.to_glib_none().0, deployment.to_glib_none().0, is_pinned.into_glib(), &mut error);
|
let is_ok = ffi::ostree_sysroot_deployment_set_pinned(self.to_glib_none().0, deployment.to_glib_none().0, is_pinned.into_glib(), &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2016_4", feature = "dox"))]
|
#[cfg(feature = "v2016_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
|
||||||
#[doc(alias = "ostree_sysroot_deployment_unlock")]
|
#[doc(alias = "ostree_sysroot_deployment_unlock")]
|
||||||
pub fn deployment_unlock(&self, deployment: &Deployment, unlocked_state: DeploymentUnlockedState, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn deployment_unlock(&self, deployment: &Deployment, unlocked_state: DeploymentUnlockedState, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_deployment_unlock(self.to_glib_none().0, deployment.to_glib_none().0, unlocked_state.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_deployment_unlock(self.to_glib_none().0, deployment.to_glib_none().0, unlocked_state.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -160,9 +157,9 @@ impl Sysroot {
|
|||||||
#[doc(alias = "ostree_sysroot_ensure_initialized")]
|
#[doc(alias = "ostree_sysroot_ensure_initialized")]
|
||||||
pub fn ensure_initialized(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn ensure_initialized(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_ensure_initialized(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_ensure_initialized(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -231,8 +228,8 @@ impl Sysroot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_5", feature = "dox"))]
|
#[cfg(feature = "v2018_5")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
|
||||||
#[doc(alias = "ostree_sysroot_get_staged_deployment")]
|
#[doc(alias = "ostree_sysroot_get_staged_deployment")]
|
||||||
#[doc(alias = "get_staged_deployment")]
|
#[doc(alias = "get_staged_deployment")]
|
||||||
pub fn staged_deployment(&self) -> Option<Deployment> {
|
pub fn staged_deployment(&self) -> Option<Deployment> {
|
||||||
@ -249,44 +246,44 @@ impl Sysroot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2016_4", feature = "dox"))]
|
#[cfg(feature = "v2016_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
|
||||||
#[doc(alias = "ostree_sysroot_init_osname")]
|
#[doc(alias = "ostree_sysroot_init_osname")]
|
||||||
pub fn init_osname(&self, osname: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn init_osname(&self, osname: &str, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_init_osname(self.to_glib_none().0, osname.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_init_osname(self.to_glib_none().0, osname.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_1", feature = "dox"))]
|
#[cfg(feature = "v2020_1")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
|
||||||
#[doc(alias = "ostree_sysroot_initialize")]
|
#[doc(alias = "ostree_sysroot_initialize")]
|
||||||
pub fn initialize(&self) -> Result<(), glib::Error> {
|
pub fn initialize(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_initialize(self.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_initialize(self.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2022_7", feature = "dox"))]
|
#[cfg(feature = "v2022_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2022_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2022_7")))]
|
||||||
#[doc(alias = "ostree_sysroot_initialize_with_mount_namespace")]
|
#[doc(alias = "ostree_sysroot_initialize_with_mount_namespace")]
|
||||||
pub fn initialize_with_mount_namespace(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn initialize_with_mount_namespace(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_initialize_with_mount_namespace(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_initialize_with_mount_namespace(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_1", feature = "dox"))]
|
#[cfg(feature = "v2020_1")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
|
||||||
#[doc(alias = "ostree_sysroot_is_booted")]
|
#[doc(alias = "ostree_sysroot_is_booted")]
|
||||||
pub fn is_booted(&self) -> bool {
|
pub fn is_booted(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -297,22 +294,22 @@ impl Sysroot {
|
|||||||
#[doc(alias = "ostree_sysroot_load")]
|
#[doc(alias = "ostree_sysroot_load")]
|
||||||
pub fn load(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn load(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_load(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_load(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2016_4", feature = "dox"))]
|
#[cfg(feature = "v2016_4")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2016_4")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2016_4")))]
|
||||||
#[doc(alias = "ostree_sysroot_load_if_changed")]
|
#[doc(alias = "ostree_sysroot_load_if_changed")]
|
||||||
pub fn load_if_changed(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<bool, glib::Error> {
|
pub fn load_if_changed(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<bool, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_changed = mem::MaybeUninit::uninit();
|
let mut out_changed = std::mem::MaybeUninit::uninit();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_load_if_changed(self.to_glib_none().0, out_changed.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_load_if_changed(self.to_glib_none().0, out_changed.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib(out_changed.assume_init())) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib(out_changed.assume_init())) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -320,9 +317,9 @@ impl Sysroot {
|
|||||||
#[doc(alias = "ostree_sysroot_lock")]
|
#[doc(alias = "ostree_sysroot_lock")]
|
||||||
pub fn lock(&self) -> Result<(), glib::Error> {
|
pub fn lock(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_lock(self.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_lock(self.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -342,7 +339,7 @@ impl Sysroot {
|
|||||||
|
|
||||||
let user_data: Box_<glib::thread_guard::ThreadGuard<P>> = Box_::new(glib::thread_guard::ThreadGuard::new(callback));
|
let user_data: Box_<glib::thread_guard::ThreadGuard<P>> = Box_::new(glib::thread_guard::ThreadGuard::new(callback));
|
||||||
unsafe extern "C" fn lock_async_trampoline<P: FnOnce(Result<(), glib::Error>) + 'static>(_source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer) {
|
unsafe extern "C" fn lock_async_trampoline<P: FnOnce(Result<(), glib::Error>) + 'static>(_source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer) {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let _ = ffi::ostree_sysroot_lock_finish(_source_object as *mut _, res, &mut error);
|
let _ = ffi::ostree_sysroot_lock_finish(_source_object as *mut _, res, &mut error);
|
||||||
let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) };
|
let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) };
|
||||||
let callback: Box_<glib::thread_guard::ThreadGuard<P>> = Box_::from_raw(user_data as *mut _);
|
let callback: Box_<glib::thread_guard::ThreadGuard<P>> = Box_::from_raw(user_data as *mut _);
|
||||||
@ -378,27 +375,27 @@ impl Sysroot {
|
|||||||
#[doc(alias = "ostree_sysroot_prepare_cleanup")]
|
#[doc(alias = "ostree_sysroot_prepare_cleanup")]
|
||||||
pub fn prepare_cleanup(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn prepare_cleanup(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_prepare_cleanup(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_prepare_cleanup(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_7", feature = "dox"))]
|
#[cfg(feature = "v2017_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
|
||||||
#[doc(alias = "ostree_sysroot_query_deployments_for")]
|
#[doc(alias = "ostree_sysroot_query_deployments_for")]
|
||||||
pub fn query_deployments_for(&self, osname: Option<&str>) -> (Option<Deployment>, Option<Deployment>) {
|
pub fn query_deployments_for(&self, osname: Option<&str>) -> (Option<Deployment>, Option<Deployment>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_pending = ptr::null_mut();
|
let mut out_pending = std::ptr::null_mut();
|
||||||
let mut out_rollback = ptr::null_mut();
|
let mut out_rollback = std::ptr::null_mut();
|
||||||
ffi::ostree_sysroot_query_deployments_for(self.to_glib_none().0, osname.to_glib_none().0, &mut out_pending, &mut out_rollback);
|
ffi::ostree_sysroot_query_deployments_for(self.to_glib_none().0, osname.to_glib_none().0, &mut out_pending, &mut out_rollback);
|
||||||
(from_glib_full(out_pending), from_glib_full(out_rollback))
|
(from_glib_full(out_pending), from_glib_full(out_rollback))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_7", feature = "dox"))]
|
#[cfg(feature = "v2017_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_7")))]
|
||||||
#[doc(alias = "ostree_sysroot_repo")]
|
#[doc(alias = "ostree_sysroot_repo")]
|
||||||
pub fn repo(&self) -> Repo {
|
pub fn repo(&self) -> Repo {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -406,19 +403,19 @@ impl Sysroot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2021_1", feature = "dox"))]
|
#[cfg(feature = "v2021_1")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_1")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_1")))]
|
||||||
#[doc(alias = "ostree_sysroot_require_booted_deployment")]
|
#[doc(alias = "ostree_sysroot_require_booted_deployment")]
|
||||||
pub fn require_booted_deployment(&self) -> Result<Deployment, glib::Error> {
|
pub fn require_booted_deployment(&self) -> Result<Deployment, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_sysroot_require_booted_deployment(self.to_glib_none().0, &mut error);
|
let ret = ffi::ostree_sysroot_require_booted_deployment(self.to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_1", feature = "dox"))]
|
#[cfg(feature = "v2020_1")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_1")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_1")))]
|
||||||
#[doc(alias = "ostree_sysroot_set_mount_namespace_in_use")]
|
#[doc(alias = "ostree_sysroot_set_mount_namespace_in_use")]
|
||||||
pub fn set_mount_namespace_in_use(&self) {
|
pub fn set_mount_namespace_in_use(&self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -429,48 +426,48 @@ impl Sysroot {
|
|||||||
#[doc(alias = "ostree_sysroot_simple_write_deployment")]
|
#[doc(alias = "ostree_sysroot_simple_write_deployment")]
|
||||||
pub fn simple_write_deployment(&self, osname: Option<&str>, new_deployment: &Deployment, merge_deployment: Option<&Deployment>, flags: SysrootSimpleWriteDeploymentFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn simple_write_deployment(&self, osname: Option<&str>, new_deployment: &Deployment, merge_deployment: Option<&Deployment>, flags: SysrootSimpleWriteDeploymentFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_simple_write_deployment(self.to_glib_none().0, osname.to_glib_none().0, new_deployment.to_glib_none().0, merge_deployment.to_glib_none().0, flags.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_simple_write_deployment(self.to_glib_none().0, osname.to_glib_none().0, new_deployment.to_glib_none().0, merge_deployment.to_glib_none().0, flags.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_7", feature = "dox"))]
|
#[cfg(feature = "v2020_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
|
||||||
#[doc(alias = "ostree_sysroot_stage_overlay_initrd")]
|
#[doc(alias = "ostree_sysroot_stage_overlay_initrd")]
|
||||||
pub fn stage_overlay_initrd(&self, fd: i32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::GString, glib::Error> {
|
pub fn stage_overlay_initrd(&self, fd: i32, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<glib::GString, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_checksum = ptr::null_mut();
|
let mut out_checksum = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_stage_overlay_initrd(self.to_glib_none().0, fd, &mut out_checksum, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_stage_overlay_initrd(self.to_glib_none().0, fd, &mut out_checksum, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_checksum)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_checksum)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2018_5", feature = "dox"))]
|
#[cfg(feature = "v2018_5")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2018_5")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2018_5")))]
|
||||||
#[doc(alias = "ostree_sysroot_stage_tree")]
|
#[doc(alias = "ostree_sysroot_stage_tree")]
|
||||||
pub fn stage_tree(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, merge_deployment: Option<&Deployment>, override_kernel_argv: &[&str], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
|
pub fn stage_tree(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, merge_deployment: Option<&Deployment>, override_kernel_argv: &[&str], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_new_deployment = ptr::null_mut();
|
let mut out_new_deployment = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_stage_tree(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, merge_deployment.to_glib_none().0, override_kernel_argv.to_glib_none().0, &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_stage_tree(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, merge_deployment.to_glib_none().0, override_kernel_argv.to_glib_none().0, &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2020_7", feature = "dox"))]
|
#[cfg(feature = "v2020_7")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2020_7")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2020_7")))]
|
||||||
#[doc(alias = "ostree_sysroot_stage_tree_with_options")]
|
#[doc(alias = "ostree_sysroot_stage_tree_with_options")]
|
||||||
pub fn stage_tree_with_options(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, merge_deployment: Option<&Deployment>, opts: &SysrootDeployTreeOpts, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
|
pub fn stage_tree_with_options(&self, osname: Option<&str>, revision: &str, origin: Option<&glib::KeyFile>, merge_deployment: Option<&Deployment>, opts: &SysrootDeployTreeOpts, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Deployment, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_new_deployment = ptr::null_mut();
|
let mut out_new_deployment = std::ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_stage_tree_with_options(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, merge_deployment.to_glib_none().0, mut_override(opts.to_glib_none().0), &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_stage_tree_with_options(self.to_glib_none().0, osname.to_glib_none().0, revision.to_glib_none().0, origin.to_glib_none().0, merge_deployment.to_glib_none().0, mut_override(opts.to_glib_none().0), &mut out_new_deployment, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(out_new_deployment)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -478,10 +475,10 @@ impl Sysroot {
|
|||||||
#[doc(alias = "ostree_sysroot_try_lock")]
|
#[doc(alias = "ostree_sysroot_try_lock")]
|
||||||
pub fn try_lock(&self) -> Result<bool, glib::Error> {
|
pub fn try_lock(&self) -> Result<bool, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_acquired = mem::MaybeUninit::uninit();
|
let mut out_acquired = std::mem::MaybeUninit::uninit();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_try_lock(self.to_glib_none().0, out_acquired.as_mut_ptr(), &mut error);
|
let is_ok = ffi::ostree_sysroot_try_lock(self.to_glib_none().0, out_acquired.as_mut_ptr(), &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib(out_acquired.assume_init())) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib(out_acquired.assume_init())) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -500,24 +497,36 @@ impl Sysroot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "ostree_sysroot_write_deployments")]
|
#[cfg(feature = "v2023_11")]
|
||||||
pub fn write_deployments(&self, new_deployments: &[Deployment], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2023_11")))]
|
||||||
|
#[doc(alias = "ostree_sysroot_update_post_copy")]
|
||||||
|
pub fn update_post_copy(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_write_deployments(self.to_glib_none().0, new_deployments.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_update_post_copy(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_4", feature = "dox"))]
|
#[doc(alias = "ostree_sysroot_write_deployments")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_4")))]
|
pub fn write_deployments(&self, new_deployments: &[Deployment], cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
|
unsafe {
|
||||||
|
let mut error = std::ptr::null_mut();
|
||||||
|
let is_ok = ffi::ostree_sysroot_write_deployments(self.to_glib_none().0, new_deployments.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "v2017_4")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_4")))]
|
||||||
#[doc(alias = "ostree_sysroot_write_deployments_with_options")]
|
#[doc(alias = "ostree_sysroot_write_deployments_with_options")]
|
||||||
pub fn write_deployments_with_options(&self, new_deployments: &[Deployment], opts: &SysrootWriteDeploymentsOpts, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn write_deployments_with_options(&self, new_deployments: &[Deployment], opts: &SysrootWriteDeploymentsOpts, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_write_deployments_with_options(self.to_glib_none().0, new_deployments.to_glib_none().0, mut_override(opts.to_glib_none().0), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_write_deployments_with_options(self.to_glib_none().0, new_deployments.to_glib_none().0, mut_override(opts.to_glib_none().0), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -525,9 +534,9 @@ impl Sysroot {
|
|||||||
#[doc(alias = "ostree_sysroot_write_origin_file")]
|
#[doc(alias = "ostree_sysroot_write_origin_file")]
|
||||||
pub fn write_origin_file(&self, deployment: &Deployment, new_origin: Option<&glib::KeyFile>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn write_origin_file(&self, deployment: &Deployment, new_origin: Option<&glib::KeyFile>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_write_origin_file(self.to_glib_none().0, deployment.to_glib_none().0, new_origin.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_write_origin_file(self.to_glib_none().0, deployment.to_glib_none().0, new_origin.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -540,8 +549,8 @@ impl Sysroot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v2017_10", feature = "dox"))]
|
#[cfg(feature = "v2017_10")]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_10")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_10")))]
|
||||||
#[doc(alias = "journal-msg")]
|
#[doc(alias = "journal-msg")]
|
||||||
pub fn connect_journal_msg<F: Fn(&Self, &str) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_journal_msg<F: Fn(&Self, &str) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn journal_msg_trampoline<F: Fn(&Sysroot, &str) + Send + 'static>(this: *mut ffi::OstreeSysroot, msg: *mut libc::c_char, f: glib::ffi::gpointer) {
|
unsafe extern "C" fn journal_msg_trampoline<F: Fn(&Sysroot, &str) + Send + 'static>(this: *mut ffi::OstreeSysroot, msg: *mut libc::c_char, f: glib::ffi::gpointer) {
|
||||||
@ -551,15 +560,9 @@ impl Sysroot {
|
|||||||
unsafe {
|
unsafe {
|
||||||
let f: Box_<F> = Box_::new(f);
|
let f: Box_<F> = Box_::new(f);
|
||||||
connect_raw(self.as_ptr() as *mut _, b"journal-msg\0".as_ptr() as *const _,
|
connect_raw(self.as_ptr() as *mut _, b"journal-msg\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(journal_msg_trampoline::<F> as *const ())), Box_::into_raw(f))
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(journal_msg_trampoline::<F> as *const ())), Box_::into_raw(f))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl Send for Sysroot {}
|
unsafe impl Send for Sysroot {}
|
||||||
|
|
||||||
impl fmt::Display for Sysroot {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("Sysroot")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
57
rust-bindings/src/auto/sysroot_upgrader.rs
generated
57
rust-bindings/src/auto/sysroot_upgrader.rs
generated
@ -2,19 +2,8 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use crate::AsyncProgress;
|
use crate::{AsyncProgress,Repo,RepoPullFlags,Sysroot,SysrootUpgraderFlags,SysrootUpgraderPullFlags};
|
||||||
use crate::Repo;
|
use glib::{prelude::*,translate::*};
|
||||||
use crate::RepoPullFlags;
|
|
||||||
use crate::Sysroot;
|
|
||||||
use crate::SysrootUpgraderFlags;
|
|
||||||
use crate::SysrootUpgraderPullFlags;
|
|
||||||
use glib::object::IsA;
|
|
||||||
use glib::object::ObjectType as ObjectType_;
|
|
||||||
use glib::translate::*;
|
|
||||||
use glib::StaticType;
|
|
||||||
use std::fmt;
|
|
||||||
use std::mem;
|
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "OstreeSysrootUpgrader")]
|
#[doc(alias = "OstreeSysrootUpgrader")]
|
||||||
@ -29,7 +18,7 @@ impl SysrootUpgrader {
|
|||||||
#[doc(alias = "ostree_sysroot_upgrader_new")]
|
#[doc(alias = "ostree_sysroot_upgrader_new")]
|
||||||
pub fn new(sysroot: &Sysroot, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SysrootUpgrader, glib::Error> {
|
pub fn new(sysroot: &Sysroot, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SysrootUpgrader, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_sysroot_upgrader_new(sysroot.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let ret = ffi::ostree_sysroot_upgrader_new(sysroot.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
@ -39,7 +28,7 @@ impl SysrootUpgrader {
|
|||||||
#[doc(alias = "new_for_os")]
|
#[doc(alias = "new_for_os")]
|
||||||
pub fn for_os(sysroot: &Sysroot, osname: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SysrootUpgrader, glib::Error> {
|
pub fn for_os(sysroot: &Sysroot, osname: Option<&str>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SysrootUpgrader, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_sysroot_upgrader_new_for_os(sysroot.to_glib_none().0, osname.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let ret = ffi::ostree_sysroot_upgrader_new_for_os(sysroot.to_glib_none().0, osname.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
@ -49,7 +38,7 @@ impl SysrootUpgrader {
|
|||||||
#[doc(alias = "new_for_os_with_flags")]
|
#[doc(alias = "new_for_os_with_flags")]
|
||||||
pub fn for_os_with_flags(sysroot: &Sysroot, osname: Option<&str>, flags: SysrootUpgraderFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SysrootUpgrader, glib::Error> {
|
pub fn for_os_with_flags(sysroot: &Sysroot, osname: Option<&str>, flags: SysrootUpgraderFlags, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<SysrootUpgrader, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ostree_sysroot_upgrader_new_for_os_with_flags(sysroot.to_glib_none().0, osname.to_glib_none().0, flags.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let ret = ffi::ostree_sysroot_upgrader_new_for_os_with_flags(sysroot.to_glib_none().0, osname.to_glib_none().0, flags.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
@ -58,9 +47,9 @@ impl SysrootUpgrader {
|
|||||||
#[doc(alias = "ostree_sysroot_upgrader_deploy")]
|
#[doc(alias = "ostree_sysroot_upgrader_deploy")]
|
||||||
pub fn deploy(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn deploy(&self, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_upgrader_deploy(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_upgrader_deploy(self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,10 +80,10 @@ impl SysrootUpgrader {
|
|||||||
#[doc(alias = "ostree_sysroot_upgrader_pull")]
|
#[doc(alias = "ostree_sysroot_upgrader_pull")]
|
||||||
pub fn pull(&self, flags: RepoPullFlags, upgrader_flags: SysrootUpgraderPullFlags, progress: Option<&AsyncProgress>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<bool, glib::Error> {
|
pub fn pull(&self, flags: RepoPullFlags, upgrader_flags: SysrootUpgraderPullFlags, progress: Option<&AsyncProgress>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<bool, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_changed = mem::MaybeUninit::uninit();
|
let mut out_changed = std::mem::MaybeUninit::uninit();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_upgrader_pull(self.to_glib_none().0, flags.into_glib(), upgrader_flags.into_glib(), progress.to_glib_none().0, out_changed.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_upgrader_pull(self.to_glib_none().0, flags.into_glib(), upgrader_flags.into_glib(), progress.to_glib_none().0, out_changed.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib(out_changed.assume_init())) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib(out_changed.assume_init())) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -102,10 +91,10 @@ impl SysrootUpgrader {
|
|||||||
#[doc(alias = "ostree_sysroot_upgrader_pull_one_dir")]
|
#[doc(alias = "ostree_sysroot_upgrader_pull_one_dir")]
|
||||||
pub fn pull_one_dir(&self, dir_to_pull: &str, flags: RepoPullFlags, upgrader_flags: SysrootUpgraderPullFlags, progress: Option<&AsyncProgress>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<bool, glib::Error> {
|
pub fn pull_one_dir(&self, dir_to_pull: &str, flags: RepoPullFlags, upgrader_flags: SysrootUpgraderPullFlags, progress: Option<&AsyncProgress>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<bool, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut out_changed = mem::MaybeUninit::uninit();
|
let mut out_changed = std::mem::MaybeUninit::uninit();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_upgrader_pull_one_dir(self.to_glib_none().0, dir_to_pull.to_glib_none().0, flags.into_glib(), upgrader_flags.into_glib(), progress.to_glib_none().0, out_changed.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_upgrader_pull_one_dir(self.to_glib_none().0, dir_to_pull.to_glib_none().0, flags.into_glib(), upgrader_flags.into_glib(), progress.to_glib_none().0, out_changed.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(from_glib(out_changed.assume_init())) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(from_glib(out_changed.assume_init())) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,38 +102,32 @@ impl SysrootUpgrader {
|
|||||||
#[doc(alias = "ostree_sysroot_upgrader_set_origin")]
|
#[doc(alias = "ostree_sysroot_upgrader_set_origin")]
|
||||||
pub fn set_origin(&self, origin: Option<&glib::KeyFile>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
pub fn set_origin(&self, origin: Option<&glib::KeyFile>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_upgrader_set_origin(self.to_glib_none().0, origin.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_upgrader_set_origin(self.to_glib_none().0, origin.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn flags(&self) -> SysrootUpgraderFlags {
|
pub fn flags(&self) -> SysrootUpgraderFlags {
|
||||||
glib::ObjectExt::property(self, "flags")
|
ObjectExt::property(self, "flags")
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn osname(&self) -> Option<glib::GString> {
|
pub fn osname(&self) -> Option<glib::GString> {
|
||||||
glib::ObjectExt::property(self, "osname")
|
ObjectExt::property(self, "osname")
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn sysroot(&self) -> Option<Sysroot> {
|
pub fn sysroot(&self) -> Option<Sysroot> {
|
||||||
glib::ObjectExt::property(self, "sysroot")
|
ObjectExt::property(self, "sysroot")
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "ostree_sysroot_upgrader_check_timestamps")]
|
#[doc(alias = "ostree_sysroot_upgrader_check_timestamps")]
|
||||||
pub fn check_timestamps(repo: &Repo, from_rev: &str, to_rev: &str) -> Result<(), glib::Error> {
|
pub fn check_timestamps(repo: &Repo, from_rev: &str, to_rev: &str) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ostree_sysroot_upgrader_check_timestamps(repo.to_glib_none().0, from_rev.to_glib_none().0, to_rev.to_glib_none().0, &mut error);
|
let is_ok = ffi::ostree_sysroot_upgrader_check_timestamps(repo.to_glib_none().0, from_rev.to_glib_none().0, to_rev.to_glib_none().0, &mut error);
|
||||||
assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for SysrootUpgrader {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
f.write_str("SysrootUpgrader")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
4
rust-bindings/src/auto/versions.txt
generated
4
rust-bindings/src/auto/versions.txt
generated
@ -1,2 +1,2 @@
|
|||||||
Generated by gir (https://github.com/gtk-rs/gir @ 0eeebbdf9d4d)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (@ e93ebd738598)
|
from gir-files (@ cae315c499c1)
|
||||||
|
@ -5,7 +5,8 @@ use crate::RepoMode;
|
|||||||
use crate::{Checksum, ObjectDetails, ObjectName, ObjectType, Repo, RepoTransactionStats};
|
use crate::{Checksum, ObjectDetails, ObjectName, ObjectType, Repo, RepoTransactionStats};
|
||||||
use ffi::OstreeRepoListObjectsFlags;
|
use ffi::OstreeRepoListObjectsFlags;
|
||||||
use glib::ffi as glib_sys;
|
use glib::ffi as glib_sys;
|
||||||
use glib::{self, translate::*, Error, IsA};
|
use glib::object::IsA;
|
||||||
|
use glib::{self, translate::*, Error};
|
||||||
#[cfg(any(feature = "v2017_10", feature = "dox"))]
|
#[cfg(any(feature = "v2017_10", feature = "dox"))]
|
||||||
use std::os::fd::BorrowedFd;
|
use std::os::fd::BorrowedFd;
|
||||||
use std::{
|
use std::{
|
||||||
|
@ -74,6 +74,8 @@ impl Sysroot {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
use gio::prelude::*;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -112,6 +114,9 @@ mod tests {
|
|||||||
|
|
||||||
sysroot.path()
|
sysroot.path()
|
||||||
};
|
};
|
||||||
assert_eq!(path_created.to_string(), path_loaded.to_string());
|
assert_eq!(
|
||||||
|
format!("{:?}", path_created.path()),
|
||||||
|
format!("{:?}", path_loaded.path())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,17 +4,17 @@ system-deps = "6"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
|
|
||||||
[dependencies.gio]
|
[dependencies.gio_sys]
|
||||||
package = "gio-sys"
|
package = "gio-sys"
|
||||||
version = "0.18"
|
version = "0.19"
|
||||||
|
|
||||||
[dependencies.glib]
|
[dependencies.glib_sys]
|
||||||
package = "glib-sys"
|
package = "glib-sys"
|
||||||
version = "0.18"
|
version = "0.19"
|
||||||
|
|
||||||
[dependencies.gobject]
|
[dependencies.gobject_sys]
|
||||||
package = "gobject-sys"
|
package = "gobject-sys"
|
||||||
version = "0.18"
|
version = "0.19"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
shell-words = "1.0.0"
|
shell-words = "1.0.0"
|
||||||
@ -69,6 +69,8 @@ v2022_5 = ["v2022_2"]
|
|||||||
v2022_6 = ["v2022_5"]
|
v2022_6 = ["v2022_5"]
|
||||||
v2022_7 = ["v2022_5"]
|
v2022_7 = ["v2022_5"]
|
||||||
v2023_1 = ["v2022_7"]
|
v2023_1 = ["v2022_7"]
|
||||||
|
v2023_8 = ["v2023_1"]
|
||||||
|
v2023_11 = ["v2023_8"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "ostree_sys"
|
name = "ostree_sys"
|
||||||
@ -84,10 +86,14 @@ license = "MIT"
|
|||||||
links = "ostree-1"
|
links = "ostree-1"
|
||||||
name = "ostree-sys"
|
name = "ostree-sys"
|
||||||
repository = "https://github.com/ostreedev/ostree-rs"
|
repository = "https://github.com/ostreedev/ostree-rs"
|
||||||
version = "0.14.0"
|
version = "0.15.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["dox"]
|
features = ["dox"]
|
||||||
|
rustc-args = ["--cfg", "docsrs"]
|
||||||
|
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
|
||||||
|
|
||||||
[package.metadata.system-deps.ostree_1]
|
[package.metadata.system-deps.ostree_1]
|
||||||
name = "ostree-1"
|
name = "ostree-1"
|
||||||
version = "0.0"
|
version = "0.0"
|
||||||
@ -232,3 +238,9 @@ version = "2022.7"
|
|||||||
|
|
||||||
[package.metadata.system-deps.ostree_1.v2023_1]
|
[package.metadata.system-deps.ostree_1.v2023_1]
|
||||||
version = "2023.1"
|
version = "2023.1"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.ostree_1.v2023_8]
|
||||||
|
version = "2023.8"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.ostree_1.v2023_11]
|
||||||
|
version = "2023.11"
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
#[cfg(not(feature = "dox"))]
|
#[cfg(not(docsrs))]
|
||||||
use std::process;
|
use std::process;
|
||||||
|
|
||||||
#[cfg(feature = "dox")]
|
#[cfg(docsrs)]
|
||||||
fn main() {} // prevent linking libraries to avoid documentation failure
|
fn main() {} // prevent linking libraries to avoid documentation failure
|
||||||
|
|
||||||
#[cfg(not(feature = "dox"))]
|
#[cfg(not(docsrs))]
|
||||||
fn main() {
|
fn main() {
|
||||||
if let Err(s) = system_deps::Config::new().probe() {
|
if let Err(s) = system_deps::Config::new().probe() {
|
||||||
println!("cargo:warning={s}");
|
println!("cargo:warning={s}");
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
Generated by gir (https://github.com/gtk-rs/gir @ 0eeebbdf9d4d)
|
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
|
||||||
from gir-files (@ e93ebd738598)
|
from gir-files (@ cae315c499c1)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,13 +2,15 @@
|
|||||||
// from gir-files
|
// from gir-files
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
#![cfg(unix)]
|
||||||
|
|
||||||
use ostree_sys::*;
|
use ostree_sys::*;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::mem::{align_of, size_of};
|
use std::mem::{align_of, size_of};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::Command;
|
use std::process::{Command, Stdio};
|
||||||
use std::str;
|
use std::str;
|
||||||
use tempfile::Builder;
|
use tempfile::Builder;
|
||||||
|
|
||||||
@ -68,9 +70,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
|||||||
let mut cmd = Command::new(pkg_config);
|
let mut cmd = Command::new(pkg_config);
|
||||||
cmd.arg("--cflags");
|
cmd.arg("--cflags");
|
||||||
cmd.args(packages);
|
cmd.args(packages);
|
||||||
|
cmd.stderr(Stdio::inherit());
|
||||||
let out = cmd.output()?;
|
let out = cmd.output()?;
|
||||||
if !out.status.success() {
|
if !out.status.success() {
|
||||||
return Err(format!("command {cmd:?} returned {}", out.status).into());
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
let stdout = str::from_utf8(&out.stdout)?;
|
let stdout = str::from_utf8(&out.stdout)?;
|
||||||
Ok(shell_words::split(stdout.trim())?)
|
Ok(shell_words::split(stdout.trim())?)
|
||||||
@ -110,7 +114,6 @@ impl Results {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
fn cross_validate_constants_with_c() {
|
fn cross_validate_constants_with_c() {
|
||||||
let mut c_constants: Vec<(String, String)> = Vec::new();
|
let mut c_constants: Vec<(String, String)> = Vec::new();
|
||||||
|
|
||||||
@ -145,7 +148,6 @@ fn cross_validate_constants_with_c() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
fn cross_validate_layout_with_c() {
|
fn cross_validate_layout_with_c() {
|
||||||
let mut c_layouts = Vec::new();
|
let mut c_layouts = Vec::new();
|
||||||
|
|
||||||
@ -187,13 +189,15 @@ fn get_c_output(name: &str) -> Result<String, Box<dyn Error>> {
|
|||||||
let cc = Compiler::new().expect("configured compiler");
|
let cc = Compiler::new().expect("configured compiler");
|
||||||
cc.compile(&c_file, &exe)?;
|
cc.compile(&c_file, &exe)?;
|
||||||
|
|
||||||
let mut abi_cmd = Command::new(exe);
|
let mut cmd = Command::new(exe);
|
||||||
let output = abi_cmd.output()?;
|
cmd.stderr(Stdio::inherit());
|
||||||
if !output.status.success() {
|
let out = cmd.output()?;
|
||||||
return Err(format!("command {abi_cmd:?} failed, {output:?}").into());
|
if !out.status.success() {
|
||||||
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(String::from_utf8(output.stdout)?)
|
Ok(String::from_utf8(out.stdout)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
@ -680,6 +684,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
|
|||||||
"2",
|
"2",
|
||||||
),
|
),
|
||||||
("(guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE", "0"),
|
("(guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE", "0"),
|
||||||
|
(
|
||||||
|
"(guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1",
|
||||||
|
"64",
|
||||||
|
),
|
||||||
("(guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS", "1"),
|
("(guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS", "1"),
|
||||||
("(guint) OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL", "2"),
|
("(guint) OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL", "2"),
|
||||||
("(guint) OSTREE_REPO_COMMIT_STATE_NORMAL", "0"),
|
("(guint) OSTREE_REPO_COMMIT_STATE_NORMAL", "0"),
|
||||||
|
@ -6,174 +6,173 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#define PRINT_CONSTANT(CONSTANT_NAME) \
|
#define PRINT_CONSTANT(CONSTANT_NAME) \
|
||||||
printf ("%s;", #CONSTANT_NAME); \
|
printf("%s;", #CONSTANT_NAME); \
|
||||||
printf (_Generic ((CONSTANT_NAME), \
|
printf(_Generic((CONSTANT_NAME), \
|
||||||
char *: "%s", \
|
char *: "%s", \
|
||||||
const char *: "%s", \
|
const char *: "%s", \
|
||||||
char: "%c", \
|
char: "%c", \
|
||||||
signed char: "%hhd", \
|
signed char: "%hhd", \
|
||||||
unsigned char: "%hhu", \
|
unsigned char: "%hhu", \
|
||||||
short int: "%hd", \
|
short int: "%hd", \
|
||||||
unsigned short int: "%hu", \
|
unsigned short int: "%hu", \
|
||||||
int: "%d", \
|
int: "%d", \
|
||||||
unsigned int: "%u", \
|
unsigned int: "%u", \
|
||||||
long: "%ld", \
|
long: "%ld", \
|
||||||
unsigned long: "%lu", \
|
unsigned long: "%lu", \
|
||||||
long long: "%lld", \
|
long long: "%lld", \
|
||||||
unsigned long long: "%llu", \
|
unsigned long long: "%llu", \
|
||||||
float: "%f", \
|
float: "%f", \
|
||||||
double: "%f", \
|
double: "%f", \
|
||||||
long double: "%ld"), \
|
long double: "%ld"), \
|
||||||
CONSTANT_NAME); \
|
CONSTANT_NAME); \
|
||||||
printf ("\n");
|
printf("\n");
|
||||||
|
|
||||||
int
|
int main() {
|
||||||
main ()
|
PRINT_CONSTANT((guint) OSTREE_CHECKSUM_FLAGS_CANONICAL_PERMISSIONS);
|
||||||
{
|
PRINT_CONSTANT((guint) OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_CHECKSUM_FLAGS_CANONICAL_PERMISSIONS);
|
PRINT_CONSTANT((guint) OSTREE_CHECKSUM_FLAGS_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS);
|
PRINT_CONSTANT(OSTREE_COMMIT_GVARIANT_STRING);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_CHECKSUM_FLAGS_NONE);
|
PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_ARCHITECTURE);
|
||||||
PRINT_CONSTANT (OSTREE_COMMIT_GVARIANT_STRING);
|
PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_COLLECTION_BINDING);
|
||||||
PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_ARCHITECTURE);
|
PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_ENDOFLIFE);
|
||||||
PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_COLLECTION_BINDING);
|
PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE);
|
||||||
PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_ENDOFLIFE);
|
PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_REF_BINDING);
|
||||||
PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE);
|
PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_SOURCE_TITLE);
|
||||||
PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_REF_BINDING);
|
PRINT_CONSTANT(OSTREE_COMMIT_META_KEY_VERSION);
|
||||||
PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_SOURCE_TITLE);
|
PRINT_CONSTANT((gint) OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT);
|
||||||
PRINT_CONSTANT (OSTREE_COMMIT_META_KEY_VERSION);
|
PRINT_CONSTANT((gint) OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_DEPLOYMENT_UNLOCKED_DEVELOPMENT);
|
PRINT_CONSTANT((gint) OSTREE_DEPLOYMENT_UNLOCKED_NONE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX);
|
PRINT_CONSTANT((gint) OSTREE_DEPLOYMENT_UNLOCKED_TRANSIENT);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_DEPLOYMENT_UNLOCKED_NONE);
|
PRINT_CONSTANT((guint) OSTREE_DIFF_FLAGS_IGNORE_XATTRS);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_DEPLOYMENT_UNLOCKED_TRANSIENT);
|
PRINT_CONSTANT((guint) OSTREE_DIFF_FLAGS_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_DIFF_FLAGS_IGNORE_XATTRS);
|
PRINT_CONSTANT(OSTREE_DIRMETA_GVARIANT_STRING);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_DIFF_FLAGS_NONE);
|
PRINT_CONSTANT(OSTREE_FILEMETA_GVARIANT_STRING);
|
||||||
PRINT_CONSTANT (OSTREE_DIRMETA_GVARIANT_STRING);
|
PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_EXPIRED_KEY);
|
||||||
PRINT_CONSTANT (OSTREE_FILEMETA_GVARIANT_STRING);
|
PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_EXPIRED_SIGNATURE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_EXPIRED_KEY);
|
PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_INVALID_SIGNATURE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_EXPIRED_SIGNATURE);
|
PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_MISSING_KEY);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_INVALID_SIGNATURE);
|
PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_NO_SIGNATURE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_MISSING_KEY);
|
PRINT_CONSTANT((gint) OSTREE_GPG_ERROR_REVOKED_KEY);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_NO_SIGNATURE);
|
PRINT_CONSTANT(OSTREE_GPG_KEY_GVARIANT_STRING);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_ERROR_REVOKED_KEY);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_EXP_TIMESTAMP);
|
||||||
PRINT_CONSTANT (OSTREE_GPG_KEY_GVARIANT_STRING);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_EXP_TIMESTAMP);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_PUBKEY_ALGO_NAME);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_PUBKEY_ALGO_NAME);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_TIMESTAMP);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_TIMESTAMP);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_USER_NAME);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL);
|
PRINT_CONSTANT((gint) OSTREE_GPG_SIGNATURE_ATTR_VALID);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_USER_NAME);
|
PRINT_CONSTANT((guint) OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_GPG_SIGNATURE_ATTR_VALID);
|
PRINT_CONSTANT(OSTREE_MAX_METADATA_SIZE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT);
|
PRINT_CONSTANT(OSTREE_MAX_METADATA_WARN_SIZE);
|
||||||
PRINT_CONSTANT (OSTREE_MAX_METADATA_SIZE);
|
PRINT_CONSTANT(OSTREE_METADATA_KEY_BOOTABLE);
|
||||||
PRINT_CONSTANT (OSTREE_MAX_METADATA_WARN_SIZE);
|
PRINT_CONSTANT(OSTREE_METADATA_KEY_LINUX);
|
||||||
PRINT_CONSTANT (OSTREE_METADATA_KEY_BOOTABLE);
|
PRINT_CONSTANT(OSTREE_META_KEY_DEPLOY_COLLECTION_ID);
|
||||||
PRINT_CONSTANT (OSTREE_METADATA_KEY_LINUX);
|
PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_COMMIT);
|
||||||
PRINT_CONSTANT (OSTREE_META_KEY_DEPLOY_COLLECTION_ID);
|
PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_COMMIT_META);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_COMMIT);
|
PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_DIR_META);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_COMMIT_META);
|
PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_DIR_TREE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_DIR_META);
|
PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_FILE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_DIR_TREE);
|
PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_FILE_XATTRS);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_FILE);
|
PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_FILE_XATTRS);
|
PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_PAYLOAD_LINK);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK);
|
PRINT_CONSTANT((gint) OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_PAYLOAD_LINK);
|
PRINT_CONSTANT(OSTREE_ORIGIN_TRANSIENT_GROUP);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT);
|
PRINT_CONSTANT(OSTREE_PATH_BOOTED);
|
||||||
PRINT_CONSTANT (OSTREE_ORIGIN_TRANSIENT_GROUP);
|
PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_FILTER_ALLOW);
|
||||||
PRINT_CONSTANT (OSTREE_PATH_BOOTED);
|
PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_FILTER_SKIP);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_FILTER_ALLOW);
|
PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_MODE_NONE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_FILTER_SKIP);
|
PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_MODE_USER);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_MODE_NONE);
|
PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_MODE_USER);
|
PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_OVERWRITE_NONE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES);
|
PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_OVERWRITE_NONE);
|
PRINT_CONSTANT((gint) OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES);
|
PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_FILTER_ALLOW);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL);
|
PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_FILTER_SKIP);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_FILTER_ALLOW);
|
PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_ITER_RESULT_DIR);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_FILTER_SKIP);
|
PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_ITER_RESULT_END);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_ITER_RESULT_DIR);
|
PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_ITER_RESULT_ERROR);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_ITER_RESULT_END);
|
PRINT_CONSTANT((gint) OSTREE_REPO_COMMIT_ITER_RESULT_FILE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_ITER_RESULT_ERROR);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_COMMIT_ITER_RESULT_FILE);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_STATE_NORMAL);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_STATE_NORMAL);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_STATE_PARTIAL);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_STATE_PARTIAL);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY);
|
PRINT_CONSTANT((guint) OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE);
|
PRINT_CONSTANT((guint) OSTREE_REPO_LIST_OBJECTS_ALL);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_OBJECTS_ALL);
|
PRINT_CONSTANT((guint) OSTREE_REPO_LIST_OBJECTS_LOOSE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_OBJECTS_LOOSE);
|
PRINT_CONSTANT((guint) OSTREE_REPO_LIST_OBJECTS_NO_PARENTS);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_OBJECTS_NO_PARENTS);
|
PRINT_CONSTANT((guint) OSTREE_REPO_LIST_OBJECTS_PACKED);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_OBJECTS_PACKED);
|
PRINT_CONSTANT((guint) OSTREE_REPO_LIST_REFS_EXT_ALIASES);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_REFS_EXT_ALIASES);
|
PRINT_CONSTANT((guint) OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS);
|
PRINT_CONSTANT((guint) OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES);
|
PRINT_CONSTANT((guint) OSTREE_REPO_LIST_REFS_EXT_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_LIST_REFS_EXT_NONE);
|
PRINT_CONSTANT((gint) OSTREE_REPO_LOCK_EXCLUSIVE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_LOCK_EXCLUSIVE);
|
PRINT_CONSTANT((gint) OSTREE_REPO_LOCK_SHARED);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_LOCK_SHARED);
|
PRINT_CONSTANT(OSTREE_REPO_METADATA_REF);
|
||||||
PRINT_CONSTANT (OSTREE_REPO_METADATA_REF);
|
PRINT_CONSTANT((gint) OSTREE_REPO_MODE_ARCHIVE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_ARCHIVE);
|
PRINT_CONSTANT((gint) OSTREE_REPO_MODE_ARCHIVE_Z2);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_ARCHIVE_Z2);
|
PRINT_CONSTANT((gint) OSTREE_REPO_MODE_BARE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_BARE);
|
PRINT_CONSTANT((gint) OSTREE_REPO_MODE_BARE_SPLIT_XATTRS);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_BARE_SPLIT_XATTRS);
|
PRINT_CONSTANT((gint) OSTREE_REPO_MODE_BARE_USER);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_BARE_USER);
|
PRINT_CONSTANT((gint) OSTREE_REPO_MODE_BARE_USER_ONLY);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_MODE_BARE_USER_ONLY);
|
PRINT_CONSTANT((guint) OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY);
|
PRINT_CONSTANT((guint) OSTREE_REPO_PRUNE_FLAGS_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_PRUNE_FLAGS_NONE);
|
PRINT_CONSTANT((guint) OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE);
|
PRINT_CONSTANT((guint) OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY);
|
PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES);
|
PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY);
|
PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_MIRROR);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_MIRROR);
|
PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_NONE);
|
PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_TRUSTED_HTTP);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_TRUSTED_HTTP);
|
PRINT_CONSTANT((guint) OSTREE_REPO_PULL_FLAGS_UNTRUSTED);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_PULL_FLAGS_UNTRUSTED);
|
PRINT_CONSTANT((gint) OSTREE_REPO_REMOTE_CHANGE_ADD);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_REMOTE_CHANGE_ADD);
|
PRINT_CONSTANT((gint) OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS);
|
PRINT_CONSTANT((gint) OSTREE_REPO_REMOTE_CHANGE_DELETE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_REMOTE_CHANGE_DELETE);
|
PRINT_CONSTANT((gint) OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS);
|
PRINT_CONSTANT((gint) OSTREE_REPO_REMOTE_CHANGE_REPLACE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_REPO_REMOTE_CHANGE_REPLACE);
|
PRINT_CONSTANT((guint) OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY);
|
PRINT_CONSTANT((guint) OSTREE_REPO_RESOLVE_REV_EXT_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_RESOLVE_REV_EXT_NONE);
|
PRINT_CONSTANT((guint) OSTREE_REPO_VERIFY_FLAGS_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_VERIFY_FLAGS_NONE);
|
PRINT_CONSTANT((guint) OSTREE_REPO_VERIFY_FLAGS_NO_GPG);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_VERIFY_FLAGS_NO_GPG);
|
PRINT_CONSTANT((guint) OSTREE_REPO_VERIFY_FLAGS_NO_SIGNAPI);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_REPO_VERIFY_FLAGS_NO_SIGNAPI);
|
PRINT_CONSTANT((guint) OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL);
|
PRINT_CONSTANT((guint) OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING);
|
PRINT_CONSTANT((guint) OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE);
|
PRINT_CONSTANT(OSTREE_SHA256_DIGEST_LEN);
|
||||||
PRINT_CONSTANT (OSTREE_SHA256_DIGEST_LEN);
|
PRINT_CONSTANT(OSTREE_SHA256_STRING_LEN);
|
||||||
PRINT_CONSTANT (OSTREE_SHA256_STRING_LEN);
|
PRINT_CONSTANT(OSTREE_SIGN_NAME_ED25519);
|
||||||
PRINT_CONSTANT (OSTREE_SIGN_NAME_ED25519);
|
PRINT_CONSTANT((gint) OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY);
|
PRINT_CONSTANT((gint) OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR);
|
PRINT_CONSTANT((gint) OSTREE_STATIC_DELTA_INDEX_FLAGS_NONE);
|
||||||
PRINT_CONSTANT ((gint)OSTREE_STATIC_DELTA_INDEX_FLAGS_NONE);
|
PRINT_CONSTANT(OSTREE_SUMMARY_GVARIANT_STRING);
|
||||||
PRINT_CONSTANT (OSTREE_SUMMARY_GVARIANT_STRING);
|
PRINT_CONSTANT(OSTREE_SUMMARY_SIG_GVARIANT_STRING);
|
||||||
PRINT_CONSTANT (OSTREE_SUMMARY_SIG_GVARIANT_STRING);
|
PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE);
|
PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT);
|
PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN);
|
PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN);
|
PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_PENDING);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_PENDING);
|
PRINT_CONSTANT((guint) OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_ROLLBACK);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_ROLLBACK);
|
PRINT_CONSTANT((guint) OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED);
|
PRINT_CONSTANT((guint) OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE);
|
PRINT_CONSTANT((guint) OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER);
|
PRINT_CONSTANT((guint) OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE);
|
PRINT_CONSTANT((guint) OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC);
|
||||||
PRINT_CONSTANT ((guint)OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC);
|
PRINT_CONSTANT(OSTREE_TIMESTAMP);
|
||||||
PRINT_CONSTANT (OSTREE_TIMESTAMP);
|
PRINT_CONSTANT(OSTREE_TREE_GVARIANT_STRING);
|
||||||
PRINT_CONSTANT (OSTREE_TREE_GVARIANT_STRING);
|
return 0;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
@ -6,113 +6,60 @@
|
|||||||
#include <stdalign.h>
|
#include <stdalign.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int
|
int main() {
|
||||||
main ()
|
printf("%s;%zu;%zu\n", "OstreeAsyncProgressClass", sizeof(OstreeAsyncProgressClass), alignof(OstreeAsyncProgressClass));
|
||||||
{
|
printf("%s;%zu;%zu\n", "OstreeChecksumFlags", sizeof(OstreeChecksumFlags), alignof(OstreeChecksumFlags));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeAsyncProgressClass", sizeof (OstreeAsyncProgressClass),
|
printf("%s;%zu;%zu\n", "OstreeCollectionRef", sizeof(OstreeCollectionRef), alignof(OstreeCollectionRef));
|
||||||
alignof (OstreeAsyncProgressClass));
|
printf("%s;%zu;%zu\n", "OstreeCollectionRefv", sizeof(OstreeCollectionRefv), alignof(OstreeCollectionRefv));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeChecksumFlags", sizeof (OstreeChecksumFlags),
|
printf("%s;%zu;%zu\n", "OstreeCommitSizesEntry", sizeof(OstreeCommitSizesEntry), alignof(OstreeCommitSizesEntry));
|
||||||
alignof (OstreeChecksumFlags));
|
printf("%s;%zu;%zu\n", "OstreeContentWriterClass", sizeof(OstreeContentWriterClass), alignof(OstreeContentWriterClass));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeCollectionRef", sizeof (OstreeCollectionRef),
|
printf("%s;%zu;%zu\n", "OstreeDeploymentUnlockedState", sizeof(OstreeDeploymentUnlockedState), alignof(OstreeDeploymentUnlockedState));
|
||||||
alignof (OstreeCollectionRef));
|
printf("%s;%zu;%zu\n", "OstreeDiffDirsOptions", sizeof(OstreeDiffDirsOptions), alignof(OstreeDiffDirsOptions));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeCollectionRefv", sizeof (OstreeCollectionRefv),
|
printf("%s;%zu;%zu\n", "OstreeDiffFlags", sizeof(OstreeDiffFlags), alignof(OstreeDiffFlags));
|
||||||
alignof (OstreeCollectionRefv));
|
printf("%s;%zu;%zu\n", "OstreeDiffItem", sizeof(OstreeDiffItem), alignof(OstreeDiffItem));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeCommitSizesEntry", sizeof (OstreeCommitSizesEntry),
|
printf("%s;%zu;%zu\n", "OstreeGpgError", sizeof(OstreeGpgError), alignof(OstreeGpgError));
|
||||||
alignof (OstreeCommitSizesEntry));
|
printf("%s;%zu;%zu\n", "OstreeGpgSignatureAttr", sizeof(OstreeGpgSignatureAttr), alignof(OstreeGpgSignatureAttr));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeContentWriterClass", sizeof (OstreeContentWriterClass),
|
printf("%s;%zu;%zu\n", "OstreeGpgSignatureFormatFlags", sizeof(OstreeGpgSignatureFormatFlags), alignof(OstreeGpgSignatureFormatFlags));
|
||||||
alignof (OstreeContentWriterClass));
|
printf("%s;%zu;%zu\n", "OstreeMutableTreeClass", sizeof(OstreeMutableTreeClass), alignof(OstreeMutableTreeClass));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeDeploymentUnlockedState", sizeof (OstreeDeploymentUnlockedState),
|
printf("%s;%zu;%zu\n", "OstreeMutableTreeIter", sizeof(OstreeMutableTreeIter), alignof(OstreeMutableTreeIter));
|
||||||
alignof (OstreeDeploymentUnlockedState));
|
printf("%s;%zu;%zu\n", "OstreeObjectType", sizeof(OstreeObjectType), alignof(OstreeObjectType));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeDiffDirsOptions", sizeof (OstreeDiffDirsOptions),
|
printf("%s;%zu;%zu\n", "OstreeRepoCheckoutAtOptions", sizeof(OstreeRepoCheckoutAtOptions), alignof(OstreeRepoCheckoutAtOptions));
|
||||||
alignof (OstreeDiffDirsOptions));
|
printf("%s;%zu;%zu\n", "OstreeRepoCheckoutFilterResult", sizeof(OstreeRepoCheckoutFilterResult), alignof(OstreeRepoCheckoutFilterResult));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeDiffFlags", sizeof (OstreeDiffFlags), alignof (OstreeDiffFlags));
|
printf("%s;%zu;%zu\n", "OstreeRepoCheckoutMode", sizeof(OstreeRepoCheckoutMode), alignof(OstreeRepoCheckoutMode));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeDiffItem", sizeof (OstreeDiffItem), alignof (OstreeDiffItem));
|
printf("%s;%zu;%zu\n", "OstreeRepoCheckoutOverwriteMode", sizeof(OstreeRepoCheckoutOverwriteMode), alignof(OstreeRepoCheckoutOverwriteMode));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeGpgError", sizeof (OstreeGpgError), alignof (OstreeGpgError));
|
printf("%s;%zu;%zu\n", "OstreeRepoCommitFilterResult", sizeof(OstreeRepoCommitFilterResult), alignof(OstreeRepoCommitFilterResult));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeGpgSignatureAttr", sizeof (OstreeGpgSignatureAttr),
|
printf("%s;%zu;%zu\n", "OstreeRepoCommitIterResult", sizeof(OstreeRepoCommitIterResult), alignof(OstreeRepoCommitIterResult));
|
||||||
alignof (OstreeGpgSignatureAttr));
|
printf("%s;%zu;%zu\n", "OstreeRepoCommitModifierFlags", sizeof(OstreeRepoCommitModifierFlags), alignof(OstreeRepoCommitModifierFlags));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeGpgSignatureFormatFlags", sizeof (OstreeGpgSignatureFormatFlags),
|
printf("%s;%zu;%zu\n", "OstreeRepoCommitState", sizeof(OstreeRepoCommitState), alignof(OstreeRepoCommitState));
|
||||||
alignof (OstreeGpgSignatureFormatFlags));
|
printf("%s;%zu;%zu\n", "OstreeRepoCommitTraverseFlags", sizeof(OstreeRepoCommitTraverseFlags), alignof(OstreeRepoCommitTraverseFlags));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeMutableTreeClass", sizeof (OstreeMutableTreeClass),
|
printf("%s;%zu;%zu\n", "OstreeRepoCommitTraverseIter", sizeof(OstreeRepoCommitTraverseIter), alignof(OstreeRepoCommitTraverseIter));
|
||||||
alignof (OstreeMutableTreeClass));
|
printf("%s;%zu;%zu\n", "OstreeRepoFileClass", sizeof(OstreeRepoFileClass), alignof(OstreeRepoFileClass));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeMutableTreeIter", sizeof (OstreeMutableTreeIter),
|
printf("%s;%zu;%zu\n", "OstreeRepoFinderAvahiClass", sizeof(OstreeRepoFinderAvahiClass), alignof(OstreeRepoFinderAvahiClass));
|
||||||
alignof (OstreeMutableTreeIter));
|
printf("%s;%zu;%zu\n", "OstreeRepoFinderConfigClass", sizeof(OstreeRepoFinderConfigClass), alignof(OstreeRepoFinderConfigClass));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeObjectType", sizeof (OstreeObjectType),
|
printf("%s;%zu;%zu\n", "OstreeRepoFinderInterface", sizeof(OstreeRepoFinderInterface), alignof(OstreeRepoFinderInterface));
|
||||||
alignof (OstreeObjectType));
|
printf("%s;%zu;%zu\n", "OstreeRepoFinderMountClass", sizeof(OstreeRepoFinderMountClass), alignof(OstreeRepoFinderMountClass));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoCheckoutAtOptions", sizeof (OstreeRepoCheckoutAtOptions),
|
printf("%s;%zu;%zu\n", "OstreeRepoFinderOverrideClass", sizeof(OstreeRepoFinderOverrideClass), alignof(OstreeRepoFinderOverrideClass));
|
||||||
alignof (OstreeRepoCheckoutAtOptions));
|
printf("%s;%zu;%zu\n", "OstreeRepoFinderResult", sizeof(OstreeRepoFinderResult), alignof(OstreeRepoFinderResult));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoCheckoutFilterResult", sizeof (OstreeRepoCheckoutFilterResult),
|
printf("%s;%zu;%zu\n", "OstreeRepoFinderResultv", sizeof(OstreeRepoFinderResultv), alignof(OstreeRepoFinderResultv));
|
||||||
alignof (OstreeRepoCheckoutFilterResult));
|
printf("%s;%zu;%zu\n", "OstreeRepoListObjectsFlags", sizeof(OstreeRepoListObjectsFlags), alignof(OstreeRepoListObjectsFlags));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoCheckoutMode", sizeof (OstreeRepoCheckoutMode),
|
printf("%s;%zu;%zu\n", "OstreeRepoListRefsExtFlags", sizeof(OstreeRepoListRefsExtFlags), alignof(OstreeRepoListRefsExtFlags));
|
||||||
alignof (OstreeRepoCheckoutMode));
|
printf("%s;%zu;%zu\n", "OstreeRepoLockType", sizeof(OstreeRepoLockType), alignof(OstreeRepoLockType));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoCheckoutOverwriteMode",
|
printf("%s;%zu;%zu\n", "OstreeRepoMode", sizeof(OstreeRepoMode), alignof(OstreeRepoMode));
|
||||||
sizeof (OstreeRepoCheckoutOverwriteMode), alignof (OstreeRepoCheckoutOverwriteMode));
|
printf("%s;%zu;%zu\n", "OstreeRepoPruneFlags", sizeof(OstreeRepoPruneFlags), alignof(OstreeRepoPruneFlags));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoCommitFilterResult", sizeof (OstreeRepoCommitFilterResult),
|
printf("%s;%zu;%zu\n", "OstreeRepoPruneOptions", sizeof(OstreeRepoPruneOptions), alignof(OstreeRepoPruneOptions));
|
||||||
alignof (OstreeRepoCommitFilterResult));
|
printf("%s;%zu;%zu\n", "OstreeRepoPullFlags", sizeof(OstreeRepoPullFlags), alignof(OstreeRepoPullFlags));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoCommitIterResult", sizeof (OstreeRepoCommitIterResult),
|
printf("%s;%zu;%zu\n", "OstreeRepoRemoteChange", sizeof(OstreeRepoRemoteChange), alignof(OstreeRepoRemoteChange));
|
||||||
alignof (OstreeRepoCommitIterResult));
|
printf("%s;%zu;%zu\n", "OstreeRepoResolveRevExtFlags", sizeof(OstreeRepoResolveRevExtFlags), alignof(OstreeRepoResolveRevExtFlags));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoCommitModifierFlags", sizeof (OstreeRepoCommitModifierFlags),
|
printf("%s;%zu;%zu\n", "OstreeRepoTransactionStats", sizeof(OstreeRepoTransactionStats), alignof(OstreeRepoTransactionStats));
|
||||||
alignof (OstreeRepoCommitModifierFlags));
|
printf("%s;%zu;%zu\n", "OstreeRepoVerifyFlags", sizeof(OstreeRepoVerifyFlags), alignof(OstreeRepoVerifyFlags));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoCommitState", sizeof (OstreeRepoCommitState),
|
printf("%s;%zu;%zu\n", "OstreeSePolicyRestoreconFlags", sizeof(OstreeSePolicyRestoreconFlags), alignof(OstreeSePolicyRestoreconFlags));
|
||||||
alignof (OstreeRepoCommitState));
|
printf("%s;%zu;%zu\n", "OstreeSignInterface", sizeof(OstreeSignInterface), alignof(OstreeSignInterface));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoCommitTraverseFlags", sizeof (OstreeRepoCommitTraverseFlags),
|
printf("%s;%zu;%zu\n", "OstreeStaticDeltaGenerateOpt", sizeof(OstreeStaticDeltaGenerateOpt), alignof(OstreeStaticDeltaGenerateOpt));
|
||||||
alignof (OstreeRepoCommitTraverseFlags));
|
printf("%s;%zu;%zu\n", "OstreeStaticDeltaIndexFlags", sizeof(OstreeStaticDeltaIndexFlags), alignof(OstreeStaticDeltaIndexFlags));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoCommitTraverseIter", sizeof (OstreeRepoCommitTraverseIter),
|
printf("%s;%zu;%zu\n", "OstreeSysrootDeployTreeOpts", sizeof(OstreeSysrootDeployTreeOpts), alignof(OstreeSysrootDeployTreeOpts));
|
||||||
alignof (OstreeRepoCommitTraverseIter));
|
printf("%s;%zu;%zu\n", "OstreeSysrootSimpleWriteDeploymentFlags", sizeof(OstreeSysrootSimpleWriteDeploymentFlags), alignof(OstreeSysrootSimpleWriteDeploymentFlags));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoFileClass", sizeof (OstreeRepoFileClass),
|
printf("%s;%zu;%zu\n", "OstreeSysrootUpgraderFlags", sizeof(OstreeSysrootUpgraderFlags), alignof(OstreeSysrootUpgraderFlags));
|
||||||
alignof (OstreeRepoFileClass));
|
printf("%s;%zu;%zu\n", "OstreeSysrootUpgraderPullFlags", sizeof(OstreeSysrootUpgraderPullFlags), alignof(OstreeSysrootUpgraderPullFlags));
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoFinderAvahiClass", sizeof (OstreeRepoFinderAvahiClass),
|
printf("%s;%zu;%zu\n", "OstreeSysrootWriteDeploymentsOpts", sizeof(OstreeSysrootWriteDeploymentsOpts), alignof(OstreeSysrootWriteDeploymentsOpts));
|
||||||
alignof (OstreeRepoFinderAvahiClass));
|
return 0;
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoFinderConfigClass", sizeof (OstreeRepoFinderConfigClass),
|
|
||||||
alignof (OstreeRepoFinderConfigClass));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoFinderInterface", sizeof (OstreeRepoFinderInterface),
|
|
||||||
alignof (OstreeRepoFinderInterface));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoFinderMountClass", sizeof (OstreeRepoFinderMountClass),
|
|
||||||
alignof (OstreeRepoFinderMountClass));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoFinderOverrideClass", sizeof (OstreeRepoFinderOverrideClass),
|
|
||||||
alignof (OstreeRepoFinderOverrideClass));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoFinderResult", sizeof (OstreeRepoFinderResult),
|
|
||||||
alignof (OstreeRepoFinderResult));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoFinderResultv", sizeof (OstreeRepoFinderResultv),
|
|
||||||
alignof (OstreeRepoFinderResultv));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoListObjectsFlags", sizeof (OstreeRepoListObjectsFlags),
|
|
||||||
alignof (OstreeRepoListObjectsFlags));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoListRefsExtFlags", sizeof (OstreeRepoListRefsExtFlags),
|
|
||||||
alignof (OstreeRepoListRefsExtFlags));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoLockType", sizeof (OstreeRepoLockType),
|
|
||||||
alignof (OstreeRepoLockType));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoMode", sizeof (OstreeRepoMode), alignof (OstreeRepoMode));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoPruneFlags", sizeof (OstreeRepoPruneFlags),
|
|
||||||
alignof (OstreeRepoPruneFlags));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoPruneOptions", sizeof (OstreeRepoPruneOptions),
|
|
||||||
alignof (OstreeRepoPruneOptions));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoPullFlags", sizeof (OstreeRepoPullFlags),
|
|
||||||
alignof (OstreeRepoPullFlags));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoRemoteChange", sizeof (OstreeRepoRemoteChange),
|
|
||||||
alignof (OstreeRepoRemoteChange));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoResolveRevExtFlags", sizeof (OstreeRepoResolveRevExtFlags),
|
|
||||||
alignof (OstreeRepoResolveRevExtFlags));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoTransactionStats", sizeof (OstreeRepoTransactionStats),
|
|
||||||
alignof (OstreeRepoTransactionStats));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeRepoVerifyFlags", sizeof (OstreeRepoVerifyFlags),
|
|
||||||
alignof (OstreeRepoVerifyFlags));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeSePolicyRestoreconFlags", sizeof (OstreeSePolicyRestoreconFlags),
|
|
||||||
alignof (OstreeSePolicyRestoreconFlags));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeSignInterface", sizeof (OstreeSignInterface),
|
|
||||||
alignof (OstreeSignInterface));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeStaticDeltaGenerateOpt", sizeof (OstreeStaticDeltaGenerateOpt),
|
|
||||||
alignof (OstreeStaticDeltaGenerateOpt));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeStaticDeltaIndexFlags", sizeof (OstreeStaticDeltaIndexFlags),
|
|
||||||
alignof (OstreeStaticDeltaIndexFlags));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeSysrootDeployTreeOpts", sizeof (OstreeSysrootDeployTreeOpts),
|
|
||||||
alignof (OstreeSysrootDeployTreeOpts));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeSysrootSimpleWriteDeploymentFlags",
|
|
||||||
sizeof (OstreeSysrootSimpleWriteDeploymentFlags),
|
|
||||||
alignof (OstreeSysrootSimpleWriteDeploymentFlags));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeSysrootUpgraderFlags", sizeof (OstreeSysrootUpgraderFlags),
|
|
||||||
alignof (OstreeSysrootUpgraderFlags));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeSysrootUpgraderPullFlags", sizeof (OstreeSysrootUpgraderPullFlags),
|
|
||||||
alignof (OstreeSysrootUpgraderPullFlags));
|
|
||||||
printf ("%s;%zu;%zu\n", "OstreeSysrootWriteDeploymentsOpts",
|
|
||||||
sizeof (OstreeSysrootWriteDeploymentsOpts), alignof (OstreeSysrootWriteDeploymentsOpts));
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ fn list_repo_objects() {
|
|||||||
commit_cnt += 1;
|
commit_cnt += 1;
|
||||||
}
|
}
|
||||||
x => {
|
x => {
|
||||||
panic!("unexpected object type {}", x);
|
panic!("unexpected object type {:?}", x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user