Regenerate
This commit is contained in:
1 parent
c55459463f
commit
0e9a16f4c1
13 files changed
+92
-21
No files matched your search
@@ -22,6 +22,10 @@ pub static COMMIT_META_KEY_SOURCE_TITLE: once_cell::sync::Lazy<&'static str> = o
|
||||
pub static COMMIT_META_KEY_VERSION: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_COMMIT_META_KEY_VERSION).to_str().unwrap()});
|
||||
pub static DIRMETA_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_DIRMETA_GVARIANT_STRING).to_str().unwrap()});
|
||||
pub static FILEMETA_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_FILEMETA_GVARIANT_STRING).to_str().unwrap()});
|
||||
#[cfg(any(feature = "v2021_1", feature = "dox"))]
|
||||
pub static METADATA_KEY_BOOTABLE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_METADATA_KEY_BOOTABLE).to_str().unwrap()});
|
||||
#[cfg(any(feature = "v2021_1", feature = "dox"))]
|
||||
pub static METADATA_KEY_LINUX: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_METADATA_KEY_LINUX).to_str().unwrap()});
|
||||
#[cfg(any(feature = "v2018_9", feature = "dox"))]
|
||||
pub static META_KEY_DEPLOY_COLLECTION_ID: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_META_KEY_DEPLOY_COLLECTION_ID).to_str().unwrap()});
|
||||
#[cfg(any(feature = "v2018_3", feature = "dox"))]
|
||||
|
||||
@@ -21,7 +21,7 @@ glib_wrapper! {
|
||||
}
|
||||
|
||||
impl Deployment {
|
||||
pub fn new(index: i32, osname: &str, csum: &str, deployserial: i32, bootcsum: &str, bootserial: i32) -> Deployment {
|
||||
pub fn new(index: i32, osname: &str, csum: &str, deployserial: i32, bootcsum: Option<&str>, bootserial: i32) -> Deployment {
|
||||
unsafe {
|
||||
from_glib_full(ostree_sys::ostree_deployment_new(index, osname.to_glib_none().0, csum.to_glib_none().0, deployserial, bootcsum.to_glib_none().0, bootserial))
|
||||
}
|
||||
@@ -100,6 +100,12 @@ impl Deployment {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn hash(&self) -> u32 {
|
||||
unsafe {
|
||||
ostree_sys::ostree_deployment_hash(ToGlibPtr::<*mut ostree_sys::OstreeDeployment>::to_glib_none(self).0 as glib_sys::gconstpointer)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2018_3", feature = "dox"))]
|
||||
pub fn is_pinned(&self) -> bool {
|
||||
unsafe {
|
||||
@@ -114,7 +120,7 @@ impl Deployment {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_bootconfig(&self, bootconfig: &BootconfigParser) {
|
||||
pub fn set_bootconfig(&self, bootconfig: Option<&BootconfigParser>) {
|
||||
unsafe {
|
||||
ostree_sys::ostree_deployment_set_bootconfig(self.to_glib_none().0, bootconfig.to_glib_none().0);
|
||||
}
|
||||
@@ -132,18 +138,12 @@ impl Deployment {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_origin(&self, origin: &glib::KeyFile) {
|
||||
pub fn set_origin(&self, origin: Option<&glib::KeyFile>) {
|
||||
unsafe {
|
||||
ostree_sys::ostree_deployment_set_origin(self.to_glib_none().0, origin.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn hash(&self) -> u32 {
|
||||
unsafe {
|
||||
ostree_sys::ostree_deployment_hash(ToGlibPtr::<*mut ostree_sys::OstreeDeployment>::to_glib_none(self).0 as glib_sys::gconstpointer)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2018_3", feature = "dox"))]
|
||||
pub fn origin_remove_transient_state(origin: &glib::KeyFile) {
|
||||
unsafe {
|
||||
|
||||
@@ -83,6 +83,11 @@ pub fn commit_get_timestamp(commit_variant: &glib::Variant) -> u64 {
|
||||
}
|
||||
}
|
||||
|
||||
//#[cfg(any(feature = "v2021_1", feature = "dox"))]
|
||||
//pub fn commit_metadata_for_bootable<P: IsA<gio::File>, Q: IsA<gio::Cancellable>>(root: &P, dict: /*Ignored*/&glib::VariantDict, cancellable: Option<&Q>) -> Result<(), glib::Error> {
|
||||
// unsafe { TODO: call ostree_sys:ostree_commit_metadata_for_bootable() }
|
||||
//}
|
||||
|
||||
pub fn content_file_parse<P: IsA<gio::File>, Q: IsA<gio::Cancellable>>(compressed: bool, content_path: &P, trusted: bool, cancellable: Option<&Q>) -> Result<(gio::InputStream, gio::FileInfo, glib::Variant), glib::Error> {
|
||||
unsafe {
|
||||
let mut out_input = ptr::null_mut();
|
||||
|
||||
@@ -160,6 +160,10 @@ 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 = "v2021_1", feature = "dox"))]
|
||||
pub use self::constants::METADATA_KEY_BOOTABLE;
|
||||
#[cfg(any(feature = "v2021_1", feature = "dox"))]
|
||||
pub use self::constants::METADATA_KEY_LINUX;
|
||||
#[cfg(any(feature = "v2018_9", feature = "dox"))]
|
||||
pub use self::constants::META_KEY_DEPLOY_COLLECTION_ID;
|
||||
#[cfg(any(feature = "v2018_3", feature = "dox"))]
|
||||
|
||||
@@ -279,6 +279,16 @@ impl Repo {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2020_8", feature = "dox"))]
|
||||
pub fn gpg_sign_data<P: IsA<gio::Cancellable>>(&self, data: &glib::Bytes, old_signatures: &glib::Bytes, key_id: &[&str], homedir: Option<&str>, cancellable: Option<&P>) -> Result<glib::Bytes, glib::Error> {
|
||||
unsafe {
|
||||
let mut out_signatures = ptr::null_mut();
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ostree_sys::ostree_repo_gpg_sign_data(self.to_glib_none().0, data.to_glib_none().0, old_signatures.to_glib_none().0, key_id.to_glib_none().0, homedir.to_glib_none().0, &mut out_signatures, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(out_signatures)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2016_6", feature = "dox"))]
|
||||
pub fn gpg_verify_data<P: IsA<gio::File>, Q: IsA<gio::File>, R: IsA<gio::Cancellable>>(&self, remote_name: Option<&str>, data: &glib::Bytes, signatures: &glib::Bytes, keyringdir: Option<&P>, extra_keyring: Option<&Q>, cancellable: Option<&R>) -> Result<GpgVerifyResult, glib::Error> {
|
||||
unsafe {
|
||||
@@ -362,6 +372,16 @@ impl Repo {
|
||||
// unsafe { TODO: call ostree_sys:ostree_repo_list_refs_ext() }
|
||||
//}
|
||||
|
||||
#[cfg(any(feature = "v2020_7", feature = "dox"))]
|
||||
pub fn list_static_delta_indexes<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<Vec<GString>, glib::Error> {
|
||||
unsafe {
|
||||
let mut out_indexes = ptr::null_mut();
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ostree_sys::ostree_repo_list_static_delta_indexes(self.to_glib_none().0, &mut out_indexes, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(FromGlibPtrContainer::from_glib_container(out_indexes)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn list_static_delta_names<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<Vec<GString>, glib::Error> {
|
||||
unsafe {
|
||||
let mut out_deltas = ptr::null_mut();
|
||||
@@ -676,7 +696,7 @@ impl Repo {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn resolve_rev(&self, refspec: &str, allow_noent: bool) -> Result<GString, glib::Error> {
|
||||
pub fn resolve_rev(&self, refspec: &str, allow_noent: bool) -> Result<Option<GString>, glib::Error> {
|
||||
unsafe {
|
||||
let mut out_rev = ptr::null_mut();
|
||||
let mut error = ptr::null_mut();
|
||||
@@ -686,7 +706,7 @@ impl Repo {
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2016_7", feature = "dox"))]
|
||||
pub fn resolve_rev_ext(&self, refspec: &str, allow_noent: bool, flags: RepoResolveRevExtFlags) -> Result<GString, glib::Error> {
|
||||
pub fn resolve_rev_ext(&self, refspec: &str, allow_noent: bool, flags: RepoResolveRevExtFlags) -> Result<Option<GString>, glib::Error> {
|
||||
unsafe {
|
||||
let mut out_rev = ptr::null_mut();
|
||||
let mut error = ptr::null_mut();
|
||||
@@ -786,7 +806,7 @@ impl Repo {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn static_delta_generate<P: IsA<gio::Cancellable>>(&self, opt: StaticDeltaGenerateOpt, from: &str, to: &str, metadata: Option<&glib::Variant>, params: Option<&glib::Variant>, cancellable: Option<&P>) -> Result<(), glib::Error> {
|
||||
pub fn static_delta_generate<P: IsA<gio::Cancellable>>(&self, opt: StaticDeltaGenerateOpt, from: Option<&str>, to: &str, metadata: Option<&glib::Variant>, params: Option<&glib::Variant>, cancellable: Option<&P>) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ostree_sys::ostree_repo_static_delta_generate(self.to_glib_none().0, opt.to_glib(), from.to_glib_none().0, to.to_glib_none().0, metadata.to_glib_none().0, params.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||
@@ -794,6 +814,10 @@ impl Repo {
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn static_delta_reindex<P: IsA<gio::Cancellable>>(&self, flags: /*Ignored*/StaticDeltaIndexFlags, opt_to_commit: &str, cancellable: Option<&P>) -> Result<(), glib::Error> {
|
||||
// unsafe { TODO: call ostree_sys:ostree_repo_static_delta_reindex() }
|
||||
//}
|
||||
|
||||
#[cfg(any(feature = "v2020_7", feature = "dox"))]
|
||||
pub fn static_delta_verify_signature<P: IsA<Sign>>(&self, delta_id: &str, sign: &P) -> Result<Option<GString>, glib::Error> {
|
||||
unsafe {
|
||||
@@ -990,7 +1014,7 @@ impl Repo {
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2017_10", feature = "dox"))]
|
||||
pub fn create_at<P: IsA<gio::Cancellable>>(dfd: i32, path: &str, mode: RepoMode, options: &glib::Variant, cancellable: Option<&P>) -> Result<Repo, glib::Error> {
|
||||
pub fn create_at<P: IsA<gio::Cancellable>>(dfd: i32, path: &str, mode: RepoMode, options: Option<&glib::Variant>, cancellable: Option<&P>) -> Result<Repo, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ostree_sys::ostree_repo_create_at(dfd, path.to_glib_none().0, mode.to_glib(), options.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||
|
||||
@@ -300,7 +300,7 @@ impl Sysroot {
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2017_7", feature = "dox"))]
|
||||
pub fn query_deployments_for(&self, osname: Option<&str>) -> (Deployment, Deployment) {
|
||||
pub fn query_deployments_for(&self, osname: Option<&str>) -> (Option<Deployment>, Option<Deployment>) {
|
||||
unsafe {
|
||||
let mut out_pending = ptr::null_mut();
|
||||
let mut out_rollback = ptr::null_mut();
|
||||
@@ -316,6 +316,15 @@ impl Sysroot {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2021_1", feature = "dox"))]
|
||||
pub fn require_booted_deployment(&self) -> Result<Deployment, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ostree_sys::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)) }
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v2020_1", feature = "dox"))]
|
||||
pub fn set_mount_namespace_in_use(&self) {
|
||||
unsafe {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 2bdb1c1)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 90b20d3)
|
||||
Reference in new issue
Block a user