Update OSTree gir and regenerate

This commit is contained in:
Felix Krull authored and Colin Walters committed 2022-05-06 12:53:53 -04:00
1 parent 91df5067a5
commit 3fa9378a5e
16 files changed
+475 -83

No files matched your search

+4
View File
@@ -38,6 +38,10 @@ lazy_static! {
lazy_static! {
pub static ref FILEMETA_GVARIANT_STRING: &'static str = unsafe{CStr::from_ptr(ffi::OSTREE_FILEMETA_GVARIANT_STRING).to_str().unwrap()};
}
#[cfg(any(feature = "v2018_9", feature = "dox"))]
lazy_static! {
pub static ref META_KEY_DEPLOY_COLLECTION_ID: &'static str = unsafe{CStr::from_ptr(ffi::OSTREE_META_KEY_DEPLOY_COLLECTION_ID).to_str().unwrap()};
}
#[cfg(any(feature = "v2018_3", feature = "dox"))]
lazy_static! {
pub static ref ORIGIN_TRANSIENT_GROUP: &'static str = unsafe{CStr::from_ptr(ffi::OSTREE_ORIGIN_TRANSIENT_GROUP).to_str().unwrap()};
+3 -30
View File
@@ -237,6 +237,7 @@ pub enum RepoRemoteChange {
AddIfNotExists,
Delete,
DeleteIfExists,
Replace,
#[doc(hidden)]
__Unknown(i32),
}
@@ -251,6 +252,7 @@ impl ToGlib for RepoRemoteChange {
RepoRemoteChange::AddIfNotExists => ffi::OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS,
RepoRemoteChange::Delete => ffi::OSTREE_REPO_REMOTE_CHANGE_DELETE,
RepoRemoteChange::DeleteIfExists => ffi::OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS,
RepoRemoteChange::Replace => ffi::OSTREE_REPO_REMOTE_CHANGE_REPLACE,
RepoRemoteChange::__Unknown(value) => value
}
}
@@ -264,41 +266,12 @@ impl FromGlib<ffi::OstreeRepoRemoteChange> for RepoRemoteChange {
1 => RepoRemoteChange::AddIfNotExists,
2 => RepoRemoteChange::Delete,
3 => RepoRemoteChange::DeleteIfExists,
4 => RepoRemoteChange::Replace,
value => RepoRemoteChange::__Unknown(value),
}
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
pub enum RepoResolveRevExtFlags {
RepoResolveRevExtNone,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl ToGlib for RepoResolveRevExtFlags {
type GlibType = ffi::OstreeRepoResolveRevExtFlags;
fn to_glib(&self) -> ffi::OstreeRepoResolveRevExtFlags {
match *self {
RepoResolveRevExtFlags::RepoResolveRevExtNone => ffi::OSTREE_REPO_RESOLVE_REV_EXT_NONE,
RepoResolveRevExtFlags::__Unknown(value) => value
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoResolveRevExtFlags> for RepoResolveRevExtFlags {
fn from_glib(value: ffi::OstreeRepoResolveRevExtFlags) -> Self {
match value {
0 => RepoResolveRevExtFlags::RepoResolveRevExtNone,
value => RepoResolveRevExtFlags::__Unknown(value),
}
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
pub enum StaticDeltaGenerateOpt {
+24
View File
@@ -36,6 +36,7 @@ bitflags! {
const NONE = 0;
const ALIASES = 1;
const EXCLUDE_REMOTES = 2;
const EXCLUDE_MIRRORS = 4;
}
}
@@ -82,6 +83,29 @@ impl FromGlib<ffi::OstreeRepoPullFlags> for RepoPullFlags {
}
}
bitflags! {
pub struct RepoResolveRevExtFlags: u32 {
const NONE = 0;
const LOCAL_ONLY = 1;
}
}
#[doc(hidden)]
impl ToGlib for RepoResolveRevExtFlags {
type GlibType = ffi::OstreeRepoResolveRevExtFlags;
fn to_glib(&self) -> ffi::OstreeRepoResolveRevExtFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoResolveRevExtFlags> for RepoResolveRevExtFlags {
fn from_glib(value: ffi::OstreeRepoResolveRevExtFlags) -> RepoResolveRevExtFlags {
RepoResolveRevExtFlags::from_bits_truncate(value)
}
}
bitflags! {
pub struct SePolicyRestoreconFlags: u32 {
const NONE = 0;
+7
View File
@@ -24,12 +24,14 @@ pub fn break_hardlink<'a, P: Into<Option<&'a gio::Cancellable>>>(dfd: i32, path:
}
}
#[cfg(any(feature = "v2017_4", feature = "dox"))]
pub fn check_version(required_year: u32, required_release: u32) -> bool {
unsafe {
from_glib(ffi::ostree_check_version(required_year, required_release))
}
}
//#[cfg(any(feature = "v2016_8", feature = "dox"))]
//pub fn checksum_b64_from_bytes(csum: /*Unknown conversion*//*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32) -> Option<String> {
// unsafe { TODO: call ffi::ostree_checksum_b64_from_bytes() }
//}
@@ -42,6 +44,7 @@ pub fn check_version(required_year: u32, required_release: u32) -> bool {
// unsafe { TODO: call ffi::ostree_checksum_b64_inplace_to_bytes() }
//}
//#[cfg(any(feature = "v2016_8", feature = "dox"))]
//pub fn checksum_b64_to_bytes(checksum: &str) -> /*Unknown conversion*//*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32 {
// unsafe { TODO: call ffi::ostree_checksum_b64_to_bytes() }
//}
@@ -99,6 +102,7 @@ pub fn checksum_to_bytes_v(checksum: &str) -> Option<glib::Variant> {
// unsafe { TODO: call ffi::ostree_cmd__private__() }
//}
#[cfg(any(feature = "v2018_2", feature = "dox"))]
pub fn commit_get_content_checksum(commit_variant: &glib::Variant) -> Option<String> {
unsafe {
from_glib_full(ffi::ostree_commit_get_content_checksum(commit_variant.to_glib_none().0))
@@ -168,6 +172,7 @@ pub fn create_directory_metadata<'a, P: Into<Option<&'a glib::Variant>>>(dir_inf
// unsafe { TODO: call ffi::ostree_diff_dirs() }
//}
//#[cfg(any(feature = "v2017_4", feature = "dox"))]
//pub fn diff_dirs_with_options<'a, 'b, P: IsA<gio::File>, Q: IsA<gio::File>, R: Into<Option<&'a /*Ignored*/DiffDirsOptions>>, S: Into<Option<&'b gio::Cancellable>>>(flags: /*Ignored*/DiffFlags, a: &P, b: &Q, modified: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 24 }, removed: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 4, id: 15 }, added: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 4, id: 15 }, options: R, cancellable: S) -> Result<(), Error> {
// unsafe { TODO: call ffi::ostree_diff_dirs_with_options() }
//}
@@ -176,6 +181,7 @@ pub fn create_directory_metadata<'a, P: Into<Option<&'a glib::Variant>>>(dir_inf
// unsafe { TODO: call ffi::ostree_diff_print() }
//}
//#[cfg(any(feature = "v2017_10", feature = "dox"))]
//pub fn gpg_error_quark() -> /*Ignored*/glib::Quark {
// unsafe { TODO: call ffi::ostree_gpg_error_quark() }
//}
@@ -240,6 +246,7 @@ pub fn parse_refspec(refspec: &str) -> Result<(Option<String>, String), Error> {
}
}
#[cfg(any(feature = "v2016_6", feature = "dox"))]
pub fn raw_file_to_archive_z2_stream<'a, 'b, P: IsA<gio::InputStream>, Q: Into<Option<&'a glib::Variant>>, R: Into<Option<&'b gio::Cancellable>>>(input: &P, file_info: &gio::FileInfo, xattrs: Q, cancellable: R) -> Result<gio::InputStream, Error> {
let xattrs = xattrs.into();
let xattrs = xattrs.to_glib_none();
@@ -2,6 +2,7 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
#[cfg(any(feature = "v2016_6", feature = "dox"))]
use Error;
use GpgSignatureFormatFlags;
use ffi;
@@ -44,6 +45,7 @@ pub trait GpgVerifyResultExt {
fn lookup(&self, key_id: &str) -> Option<u32>;
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn require_valid_signature(&self) -> Result<(), Error>;
}
@@ -86,6 +88,7 @@ impl<O: IsA<GpgVerifyResult>> GpgVerifyResultExt for O {
}
}
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn require_valid_signature(&self) -> Result<(), Error> {
unsafe {
let mut error = ptr::null_mut();
+3 -1
View File
@@ -53,7 +53,6 @@ pub use self::enums::RepoCheckoutOverwriteMode;
pub use self::enums::RepoMode;
pub use self::enums::RepoPruneFlags;
pub use self::enums::RepoRemoteChange;
pub use self::enums::RepoResolveRevExtFlags;
pub use self::enums::StaticDeltaGenerateOpt;
mod flags;
@@ -61,6 +60,7 @@ mod flags;
pub use self::flags::RepoCommitState;
pub use self::flags::RepoListRefsExtFlags;
pub use self::flags::RepoPullFlags;
pub use self::flags::RepoResolveRevExtFlags;
pub use self::flags::SePolicyRestoreconFlags;
pub mod functions;
@@ -81,6 +81,8 @@ pub use self::constants::COMMIT_META_KEY_SOURCE_TITLE;
pub use self::constants::COMMIT_META_KEY_VERSION;
pub use self::constants::DIRMETA_GVARIANT_STRING;
pub use self::constants::FILEMETA_GVARIANT_STRING;
#[cfg(any(feature = "v2018_9", feature = "dox"))]
pub use self::constants::META_KEY_DEPLOY_COLLECTION_ID;
#[cfg(any(feature = "v2018_3", feature = "dox"))]
pub use self::constants::ORIGIN_TRANSIENT_GROUP;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
@@ -3,6 +3,7 @@
// DO NOT EDIT
use Error;
#[cfg(any(feature = "v2018_7", feature = "dox"))]
use Repo;
use ffi;
use glib::object::IsA;
@@ -27,6 +28,7 @@ impl MutableTree {
}
}
#[cfg(any(feature = "v2018_7", feature = "dox"))]
pub fn new_from_checksum(repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> MutableTree {
unsafe {
from_glib_full(ffi::ostree_mutable_tree_new_from_checksum(repo.to_glib_none().0, contents_checksum.to_glib_none().0, metadata_checksum.to_glib_none().0))
@@ -48,6 +50,7 @@ pub trait MutableTreeExt {
//fn ensure_parent_dirs(&self, split_path: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 0, id: 28 }, metadata_checksum: &str) -> Result<MutableTree, Error>;
#[cfg(any(feature = "v2018_7", feature = "dox"))]
fn fill_empty_from_dirtree(&self, repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> bool;
fn get_contents_checksum(&self) -> Option<String>;
@@ -58,6 +61,9 @@ pub trait MutableTreeExt {
//fn get_subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 37 };
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn remove(&self, name: &str, allow_noent: bool) -> Result<(), Error>;
fn replace_file(&self, name: &str, checksum: &str) -> Result<(), Error>;
fn set_contents_checksum(&self, checksum: &str);
@@ -90,6 +96,7 @@ impl<O: IsA<MutableTree>> MutableTreeExt for O {
// unsafe { TODO: call ffi::ostree_mutable_tree_ensure_parent_dirs() }
//}
#[cfg(any(feature = "v2018_7", feature = "dox"))]
fn fill_empty_from_dirtree(&self, repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> bool {
unsafe {
from_glib(ffi::ostree_mutable_tree_fill_empty_from_dirtree(self.to_glib_none().0, repo.to_glib_none().0, contents_checksum.to_glib_none().0, metadata_checksum.to_glib_none().0))
@@ -116,6 +123,15 @@ impl<O: IsA<MutableTree>> MutableTreeExt for O {
// unsafe { TODO: call ffi::ostree_mutable_tree_get_subdirs() }
//}
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn remove(&self, name: &str, allow_noent: bool) -> Result<(), Error> {
unsafe {
let mut error = ptr::null_mut();
let _ = ffi::ostree_mutable_tree_remove(self.to_glib_none().0, name.to_glib_none().0, allow_noent.to_glib(), &mut error);
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
fn replace_file(&self, name: &str, checksum: &str) -> Result<(), Error> {
unsafe {
let mut error = ptr::null_mut();
+66
View File
@@ -21,6 +21,7 @@ use RepoMode;
use RepoPruneFlags;
use RepoPullFlags;
use RepoRemoteChange;
#[cfg(any(feature = "v2016_7", feature = "dox"))]
use RepoResolveRevExtFlags;
use RepoTransactionStats;
use StaticDeltaGenerateOpt;
@@ -69,6 +70,7 @@ impl Repo {
}
}
#[cfg(any(feature = "v2017_10", feature = "dox"))]
pub fn create_at<'a, P: Into<Option<&'a gio::Cancellable>>>(dfd: i32, path: &str, mode: RepoMode, options: &glib::Variant, cancellable: P) -> Result<Repo, Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@@ -79,6 +81,7 @@ impl Repo {
}
}
#[cfg(any(feature = "v2017_10", feature = "dox"))]
pub fn open_at<'a, P: Into<Option<&'a gio::Cancellable>>>(dfd: i32, path: &str, cancellable: P) -> Result<Repo, Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@@ -115,6 +118,7 @@ pub trait RepoExt {
fn append_gpg_signature<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, commit_checksum: &str, signature_bytes: &glib::Bytes, cancellable: P) -> Result<(), Error>;
//#[cfg(any(feature = "v2016_8", feature = "dox"))]
//fn checkout_at<'a, 'b, P: Into<Option<&'a /*Ignored*/RepoCheckoutAtOptions>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, options: P, destination_dfd: i32, destination_path: &str, commit: &str, cancellable: Q) -> Result<(), Error>;
fn checkout_gc<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, cancellable: P) -> Result<(), Error>;
@@ -139,27 +143,41 @@ pub trait RepoExt {
#[cfg(any(feature = "v2017_15", feature = "dox"))]
fn fsck_object<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, objtype: ObjectType, sha256: &str, cancellable: P) -> Result<(), Error>;
#[cfg(any(feature = "v2019_2", feature = "dox"))]
fn get_bootloader(&self) -> Option<String>;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
fn get_collection_id(&self) -> Option<String>;
fn get_config(&self) -> Option<glib::KeyFile>;
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn get_default_repo_finders(&self) -> Vec<String>;
#[cfg(any(feature = "v2016_4", feature = "dox"))]
fn get_dfd(&self) -> i32;
fn get_disable_fsync(&self) -> bool;
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn get_min_free_space_bytes(&self) -> Result<u64, Error>;
fn get_mode(&self) -> RepoMode;
fn get_parent(&self) -> Option<Repo>;
fn get_path(&self) -> Option<gio::File>;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_boolean_option(&self, remote_name: &str, option_name: &str, default_value: bool) -> Result<bool, Error>;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_list_option(&self, remote_name: &str, option_name: &str) -> Result<Vec<String>, Error>;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_option<'a, P: Into<Option<&'a str>>>(&self, remote_name: &str, option_name: &str, default_value: P) -> Result<String, Error>;
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn gpg_verify_data<'a, 'b, 'c, 'd, P: Into<Option<&'a str>>, Q: IsA<gio::File> + 'b, R: Into<Option<&'b Q>>, S: IsA<gio::File> + 'c, T: Into<Option<&'c S>>, U: Into<Option<&'d gio::Cancellable>>>(&self, remote_name: P, data: &glib::Bytes, signatures: &glib::Bytes, keyringdir: R, extra_keyring: T, cancellable: U) -> Result<GpgVerifyResult, Error>;
fn has_object<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, objtype: ObjectType, checksum: &str, cancellable: P) -> Result<bool, Error>;
@@ -171,6 +189,7 @@ pub trait RepoExt {
fn import_object_from<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, source: &Repo, objtype: ObjectType, checksum: &str, cancellable: P) -> Result<(), Error>;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn import_object_from_with_trust<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, source: &Repo, objtype: ObjectType, checksum: &str, trusted: bool, cancellable: P) -> Result<(), Error>;
fn is_system(&self) -> bool;
@@ -186,6 +205,7 @@ pub trait RepoExt {
//fn list_refs<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, refspec_prefix: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, cancellable: Q) -> Result<(), Error>;
//#[cfg(any(feature = "v2016_4", feature = "dox"))]
//fn list_refs_ext<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, refspec_prefix: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, flags: RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error>;
//fn list_static_delta_names<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, out_deltas: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 0, id: 28 }, cancellable: P) -> Result<(), Error>;
@@ -210,6 +230,7 @@ pub trait RepoExt {
fn prune<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, flags: RepoPruneFlags, depth: i32, cancellable: P) -> Result<(i32, i32, u64), Error>;
//#[cfg(any(feature = "v2017_1", feature = "dox"))]
//fn prune_from_reachable<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, options: /*Ignored*/&mut RepoPruneOptions, cancellable: P) -> Result<(i32, i32, u64), Error>;
fn prune_static_deltas<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, commit: P, cancellable: Q) -> Result<(), Error>;
@@ -228,6 +249,7 @@ pub trait RepoExt {
fn regenerate_summary<'a, 'b, P: Into<Option<&'a glib::Variant>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, additional_metadata: P, cancellable: Q) -> Result<(), Error>;
#[cfg(any(feature = "v2017_2", feature = "dox"))]
fn reload_config<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, cancellable: P) -> Result<(), Error>;
fn remote_add<'a, 'b, P: Into<Option<&'a glib::Variant>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, name: &str, url: &str, options: P, cancellable: Q) -> Result<(), Error>;
@@ -238,6 +260,7 @@ pub trait RepoExt {
fn remote_fetch_summary<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, name: &str, cancellable: P) -> Result<(glib::Bytes, glib::Bytes), Error>;
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn remote_fetch_summary_with_options<'a, 'b, P: Into<Option<&'a glib::Variant>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, name: &str, options: P, cancellable: Q) -> Result<(glib::Bytes, glib::Bytes), Error>;
fn remote_get_gpg_verify(&self, name: &str) -> Result<bool, Error>;
@@ -261,12 +284,15 @@ pub trait RepoExt {
fn resolve_rev(&self, refspec: &str, allow_noent: bool) -> Result<String, Error>;
#[cfg(any(feature = "v2016_7", feature = "dox"))]
fn resolve_rev_ext(&self, refspec: &str, allow_noent: bool, flags: RepoResolveRevExtFlags) -> Result<String, Error>;
fn scan_hardlinks<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, cancellable: P) -> Result<(), Error>;
#[cfg(any(feature = "v2017_10", feature = "dox"))]
fn set_alias_ref_immediate<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>, R: Into<Option<&'c gio::Cancellable>>>(&self, remote: P, ref_: &str, target: Q, cancellable: R) -> Result<(), Error>;
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn set_cache_dir<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, dfd: i32, path: &str, cancellable: P) -> Result<(), Error>;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
@@ -308,6 +334,7 @@ pub trait RepoExt {
fn verify_commit_ext<'a, 'b, 'c, P: IsA<gio::File> + 'a, Q: Into<Option<&'a P>>, R: IsA<gio::File> + 'b, S: Into<Option<&'b R>>, T: Into<Option<&'c gio::Cancellable>>>(&self, commit_checksum: &str, keyringdir: Q, extra_keyring: S, cancellable: T) -> Result<GpgVerifyResult, Error>;
#[cfg(any(feature = "v2016_14", feature = "dox"))]
fn verify_commit_for_remote<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, commit_checksum: &str, remote_name: &str, cancellable: P) -> Result<GpgVerifyResult, Error>;
fn verify_summary<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, remote_name: &str, summary: &glib::Bytes, signatures: &glib::Bytes, cancellable: P) -> Result<GpgVerifyResult, Error>;
@@ -378,6 +405,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
//#[cfg(any(feature = "v2016_8", feature = "dox"))]
//fn checkout_at<'a, 'b, P: Into<Option<&'a /*Ignored*/RepoCheckoutAtOptions>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, options: P, destination_dfd: i32, destination_path: &str, commit: &str, cancellable: Q) -> Result<(), Error> {
// unsafe { TODO: call ffi::ostree_repo_checkout_at() }
//}
@@ -465,6 +493,13 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2019_2", feature = "dox"))]
fn get_bootloader(&self) -> Option<String> {
unsafe {
from_glib_none(ffi::ostree_repo_get_bootloader(self.to_glib_none().0))
}
}
#[cfg(any(feature = "v2018_6", feature = "dox"))]
fn get_collection_id(&self) -> Option<String> {
unsafe {
@@ -478,6 +513,14 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn get_default_repo_finders(&self) -> Vec<String> {
unsafe {
FromGlibPtrContainer::from_glib_none(ffi::ostree_repo_get_default_repo_finders(self.to_glib_none().0))
}
}
#[cfg(any(feature = "v2016_4", feature = "dox"))]
fn get_dfd(&self) -> i32 {
unsafe {
ffi::ostree_repo_get_dfd(self.to_glib_none().0)
@@ -490,6 +533,16 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn get_min_free_space_bytes(&self) -> Result<u64, Error> {
unsafe {
let mut out_reserved_bytes = mem::uninitialized();
let mut error = ptr::null_mut();
let _ = ffi::ostree_repo_get_min_free_space_bytes(self.to_glib_none().0, &mut out_reserved_bytes, &mut error);
if error.is_null() { Ok(out_reserved_bytes) } else { Err(from_glib_full(error)) }
}
}
fn get_mode(&self) -> RepoMode {
unsafe {
from_glib(ffi::ostree_repo_get_mode(self.to_glib_none().0))
@@ -508,6 +561,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_boolean_option(&self, remote_name: &str, option_name: &str, default_value: bool) -> Result<bool, Error> {
unsafe {
let mut out_value = mem::uninitialized();
@@ -517,6 +571,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_list_option(&self, remote_name: &str, option_name: &str) -> Result<Vec<String>, Error> {
unsafe {
let mut out_value = ptr::null_mut();
@@ -526,6 +581,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_remote_option<'a, P: Into<Option<&'a str>>>(&self, remote_name: &str, option_name: &str, default_value: P) -> Result<String, Error> {
let default_value = default_value.into();
let default_value = default_value.to_glib_none();
@@ -537,6 +593,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn gpg_verify_data<'a, 'b, 'c, 'd, P: Into<Option<&'a str>>, Q: IsA<gio::File> + 'b, R: Into<Option<&'b Q>>, S: IsA<gio::File> + 'c, T: Into<Option<&'c S>>, U: Into<Option<&'d gio::Cancellable>>>(&self, remote_name: P, data: &glib::Bytes, signatures: &glib::Bytes, keyringdir: R, extra_keyring: T, cancellable: U) -> Result<GpgVerifyResult, Error> {
let remote_name = remote_name.into();
let remote_name = remote_name.to_glib_none();
@@ -585,6 +642,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn import_object_from_with_trust<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, source: &Repo, objtype: ObjectType, checksum: &str, trusted: bool, cancellable: P) -> Result<(), Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@@ -626,6 +684,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
// unsafe { TODO: call ffi::ostree_repo_list_refs() }
//}
//#[cfg(any(feature = "v2016_4", feature = "dox"))]
//fn list_refs_ext<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, refspec_prefix: P, out_all_refs: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }, flags: RepoListRefsExtFlags, cancellable: Q) -> Result<(), Error> {
// unsafe { TODO: call ffi::ostree_repo_list_refs_ext() }
//}
@@ -731,6 +790,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
//#[cfg(any(feature = "v2017_1", feature = "dox"))]
//fn prune_from_reachable<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, options: /*Ignored*/&mut RepoPruneOptions, cancellable: P) -> Result<(i32, i32, u64), Error> {
// unsafe { TODO: call ffi::ostree_repo_prune_from_reachable() }
//}
@@ -829,6 +889,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2017_2", feature = "dox"))]
fn reload_config<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, cancellable: P) -> Result<(), Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@@ -887,6 +948,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_6", feature = "dox"))]
fn remote_fetch_summary_with_options<'a, 'b, P: Into<Option<&'a glib::Variant>>, Q: Into<Option<&'b gio::Cancellable>>>(&self, name: &str, options: P, cancellable: Q) -> Result<(glib::Bytes, glib::Bytes), Error> {
let options = options.into();
let options = options.to_glib_none();
@@ -977,6 +1039,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_7", feature = "dox"))]
fn resolve_rev_ext(&self, refspec: &str, allow_noent: bool, flags: RepoResolveRevExtFlags) -> Result<String, Error> {
unsafe {
let mut out_rev = ptr::null_mut();
@@ -996,6 +1059,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2017_10", feature = "dox"))]
fn set_alias_ref_immediate<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>, R: Into<Option<&'c gio::Cancellable>>>(&self, remote: P, ref_: &str, target: Q, cancellable: R) -> Result<(), Error> {
let remote = remote.into();
let remote = remote.to_glib_none();
@@ -1010,6 +1074,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn set_cache_dir<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, dfd: i32, path: &str, cancellable: P) -> Result<(), Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@@ -1183,6 +1248,7 @@ impl<O: IsA<Repo> + IsA<glib::object::Object>> RepoExt for O {
}
}
#[cfg(any(feature = "v2016_14", feature = "dox"))]
fn verify_commit_for_remote<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, commit_checksum: &str, remote_name: &str, cancellable: P) -> Result<GpgVerifyResult, Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
+3
View File
@@ -35,6 +35,7 @@ impl SePolicy {
}
}
#[cfg(any(feature = "v2017_4", feature = "dox"))]
pub fn new_at<'a, P: Into<Option<&'a gio::Cancellable>>>(rootfs_dfd: i32, cancellable: P) -> Result<SePolicy, Error> {
let cancellable = cancellable.into();
let cancellable = cancellable.to_glib_none();
@@ -51,6 +52,7 @@ impl SePolicy {
}
pub trait SePolicyExt {
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_csum(&self) -> Option<String>;
fn get_label<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, relpath: &str, unix_mode: u32, cancellable: P) -> Result<String, Error>;
@@ -67,6 +69,7 @@ pub trait SePolicyExt {
}
impl<O: IsA<SePolicy> + IsA<glib::object::Object>> SePolicyExt for O {
#[cfg(any(feature = "v2016_5", feature = "dox"))]
fn get_csum(&self) -> Option<String> {
unsafe {
from_glib_none(ffi::ostree_sepolicy_get_csum(self.to_glib_none().0))