From ae9413343d5dd80925acd00f7e3c2250528945e2 Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Tue, 9 Oct 2018 20:57:04 +0200 Subject: [PATCH] Add RepoListRefsExtFlags --- rust-bindings/rust/conf/libostree.toml | 1 + .../rust/libostree/src/auto/flags.rs | 24 +++++++++++++++++++ rust-bindings/rust/libostree/src/auto/repo.rs | 8 +++---- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/rust-bindings/rust/conf/libostree.toml b/rust-bindings/rust/conf/libostree.toml index a389aa11..7bd1ae1b 100644 --- a/rust-bindings/rust/conf/libostree.toml +++ b/rust-bindings/rust/conf/libostree.toml @@ -28,6 +28,7 @@ generate = [ "OSTree.SePolicy", "OSTree.SePolicyRestoreconFlags", "OSTree.StaticDeltaGenerateOpt", + "OSTree.RepoListRefsExtFlags", #"OSTree.RepoPruneOptions", #"OSTree.RepoExportArchiveOptions", diff --git a/rust-bindings/rust/libostree/src/auto/flags.rs b/rust-bindings/rust/libostree/src/auto/flags.rs index 6bc288a9..c0264bae 100644 --- a/rust-bindings/rust/libostree/src/auto/flags.rs +++ b/rust-bindings/rust/libostree/src/auto/flags.rs @@ -31,6 +31,30 @@ impl FromGlib for RepoCommitState { } } +bitflags! { + pub struct RepoListRefsExtFlags: u32 { + const NONE = 0; + const ALIASES = 1; + const EXCLUDE_REMOTES = 2; + } +} + +#[doc(hidden)] +impl ToGlib for RepoListRefsExtFlags { + type GlibType = ffi::OstreeRepoListRefsExtFlags; + + fn to_glib(&self) -> ffi::OstreeRepoListRefsExtFlags { + self.bits() + } +} + +#[doc(hidden)] +impl FromGlib for RepoListRefsExtFlags { + fn from_glib(value: ffi::OstreeRepoListRefsExtFlags) -> RepoListRefsExtFlags { + RepoListRefsExtFlags::from_bits_truncate(value) + } +} + bitflags! { pub struct RepoPullFlags: u32 { const NONE = 0; diff --git a/rust-bindings/rust/libostree/src/auto/repo.rs b/rust-bindings/rust/libostree/src/auto/repo.rs index fa58c00a..a8506782 100644 --- a/rust-bindings/rust/libostree/src/auto/repo.rs +++ b/rust-bindings/rust/libostree/src/auto/repo.rs @@ -178,7 +178,7 @@ pub trait RepoExt { fn is_writable(&self) -> Result<(), Error>; //#[cfg(any(feature = "v2018_6", feature = "dox"))] - //fn list_collection_refs<'a, 'b, P: Into>, Q: Into>>(&self, match_collection_id: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 1, id: 0 }/TypeId { ns_id: 0, id: 28 }, flags: /*Ignored*/RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error>; + //fn list_collection_refs<'a, 'b, P: Into>, Q: Into>>(&self, match_collection_id: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 1, id: 0 }/TypeId { ns_id: 0, id: 28 }, flags: RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error>; //fn list_commit_objects_starting_with<'a, P: Into>>(&self, start: &str, out_commits: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 2, id: 181 }/TypeId { ns_id: 2, id: 181 }, cancellable: P) -> Result<(), Error>; @@ -186,7 +186,7 @@ pub trait RepoExt { //fn list_refs<'a, 'b, P: Into>, Q: Into>>(&self, refspec_prefix: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, cancellable: Q) -> Result<(), Error>; - //fn list_refs_ext<'a, 'b, P: Into>, Q: Into>>(&self, refspec_prefix: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, flags: /*Ignored*/RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error>; + //fn list_refs_ext<'a, 'b, P: Into>, Q: Into>>(&self, refspec_prefix: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, flags: RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error>; //fn list_static_delta_names<'a, P: Into>>(&self, out_deltas: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 0, id: 28 }, cancellable: P) -> Result<(), Error>; @@ -610,7 +610,7 @@ impl + IsA> RepoExt for O { } //#[cfg(any(feature = "v2018_6", feature = "dox"))] - //fn list_collection_refs<'a, 'b, P: Into>, Q: Into>>(&self, match_collection_id: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 1, id: 0 }/TypeId { ns_id: 0, id: 28 }, flags: /*Ignored*/RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error> { + //fn list_collection_refs<'a, 'b, P: Into>, Q: Into>>(&self, match_collection_id: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 1, id: 0 }/TypeId { ns_id: 0, id: 28 }, flags: RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error> { // unsafe { TODO: call ffi::ostree_repo_list_collection_refs() } //} @@ -626,7 +626,7 @@ impl + IsA> RepoExt for O { // unsafe { TODO: call ffi::ostree_repo_list_refs() } //} - //fn list_refs_ext<'a, 'b, P: Into>, Q: Into>>(&self, refspec_prefix: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, flags: /*Ignored*/RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error> { + //fn list_refs_ext<'a, 'b, P: Into>, Q: Into>>(&self, refspec_prefix: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, flags: RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error> { // unsafe { TODO: call ffi::ostree_repo_list_refs_ext() } //}