diff --git a/rust-bindings/rust/src/auto/async_progress.rs b/rust-bindings/rust/src/auto/async_progress.rs index f4374c2e..4b95b654 100644 --- a/rust-bindings/rust/src/auto/async_progress.rs +++ b/rust-bindings/rust/src/auto/async_progress.rs @@ -46,6 +46,9 @@ impl Default for AsyncProgress { pub const NONE_ASYNC_PROGRESS: Option<&AsyncProgress> = None; pub trait AsyncProgressExt: 'static { + #[cfg(any(feature = "v2019_6", feature = "dox"))] + fn copy_state>(&self, dest: &P); + fn finish(&self); //#[cfg(any(feature = "v2017_6", feature = "dox"))] @@ -78,6 +81,13 @@ pub trait AsyncProgressExt: 'static { } impl> AsyncProgressExt for O { + #[cfg(any(feature = "v2019_6", feature = "dox"))] + fn copy_state>(&self, dest: &P) { + unsafe { + ostree_sys::ostree_async_progress_copy_state(self.as_ref().to_glib_none().0, dest.as_ref().to_glib_none().0); + } + } + fn finish(&self) { unsafe { ostree_sys::ostree_async_progress_finish(self.as_ref().to_glib_none().0); diff --git a/rust-bindings/rust/src/auto/mutable_tree.rs b/rust-bindings/rust/src/auto/mutable_tree.rs index 45659bb2..0d58acad 100644 --- a/rust-bindings/rust/src/auto/mutable_tree.rs +++ b/rust-bindings/rust/src/auto/mutable_tree.rs @@ -60,7 +60,7 @@ pub trait MutableTreeExt: 'static { fn get_metadata_checksum(&self) -> Option; - //fn get_subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 39 }; + //fn get_subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 40 }; fn lookup(&self, name: &str) -> Result<(GString, MutableTree), Error>; @@ -122,7 +122,7 @@ impl> MutableTreeExt for O { } } - //fn get_subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 39 } { + //fn get_subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 40 } { // unsafe { TODO: call ostree_sys:ostree_mutable_tree_get_subdirs() } //} diff --git a/rust-bindings/rust/sys/Cargo.toml b/rust-bindings/rust/sys/Cargo.toml index 34aec339..6466d848 100644 --- a/rust-bindings/rust/sys/Cargo.toml +++ b/rust-bindings/rust/sys/Cargo.toml @@ -45,6 +45,7 @@ v2018_9 = ["v2018_7"] v2019_2 = ["v2018_9"] v2019_3 = ["v2019_2"] v2019_4 = ["v2019_3"] +v2019_6 = ["v2019_4"] dox = [] [lib] @@ -64,4 +65,4 @@ repository = "https://gitlab.com/fkrull/ostree-rs" version = "0.5.1" ["package.metadata.docs.rs"] -features = ["dox", "v2019_4"] +features = ["dox", "v2019_6"] diff --git a/rust-bindings/rust/sys/build.rs b/rust-bindings/rust/sys/build.rs index 1155decc..6db8c4c9 100644 --- a/rust-bindings/rust/sys/build.rs +++ b/rust-bindings/rust/sys/build.rs @@ -31,7 +31,9 @@ fn main() { fn find() -> Result<(), Error> { let package_name = "ostree-1"; let shared_libs = ["ostree-1"]; - let version = if cfg!(feature = "v2019_4") { + let version = if cfg!(feature = "v2019_6") { + "2019.6" + } else if cfg!(feature = "v2019_4") { "2019.4" } else if cfg!(feature = "v2019_3") { "2019.3" diff --git a/rust-bindings/rust/sys/src/lib.rs b/rust-bindings/rust/sys/src/lib.rs index fbbb87d1..ba1fc095 100644 --- a/rust-bindings/rust/sys/src/lib.rs +++ b/rust-bindings/rust/sys/src/lib.rs @@ -333,6 +333,11 @@ pub struct _OstreeKernelArgs(c_void); pub type OstreeKernelArgs = *mut _OstreeKernelArgs; +#[repr(C)] +pub struct _OstreeKernelArgsEntry(c_void); + +pub type OstreeKernelArgsEntry = *mut _OstreeKernelArgsEntry; + #[repr(C)] pub struct _OstreeLibarchiveInputStreamPrivate(c_void); @@ -1024,6 +1029,8 @@ extern "C" { pub fn ostree_async_progress_get_type() -> GType; pub fn ostree_async_progress_new() -> *mut OstreeAsyncProgress; pub fn ostree_async_progress_new_and_connect(changed: *mut gpointer, user_data: gpointer) -> *mut OstreeAsyncProgress; + #[cfg(any(feature = "v2019_6", feature = "dox"))] + pub fn ostree_async_progress_copy_state(self_: *mut OstreeAsyncProgress, dest: *mut OstreeAsyncProgress); pub fn ostree_async_progress_finish(self_: *mut OstreeAsyncProgress); #[cfg(any(feature = "v2017_6", feature = "dox"))] pub fn ostree_async_progress_get(self_: *mut OstreeAsyncProgress, ...);