conf: remove a problematic function that was fixed in gir

This commit is contained in:
Felix Krull 2019-06-28 20:46:38 +02:00 committed by Colin Walters
parent 43c7791890
commit 48de859582
2 changed files with 29 additions and 4 deletions

View File

@ -130,14 +130,11 @@ status = "generate"
[[object]] [[object]]
name = "OSTree.Repo" name = "OSTree.Repo"
status = "generate" status = "generate"
[[object.function]]
# this one crashes gir, somehow
name = "write_metadata_async"
ignore = true
[[object.function]] [[object.function]]
# this one generates a guchar** incorrectly # this one generates a guchar** incorrectly
name = "write_content_async" name = "write_content_async"
ignore = true ignore = true
[[object.function]] [[object.function]]
# these fail because of issues with zero-terminated arrays # these fail because of issues with zero-terminated arrays
pattern = "find_remotes_async|pull_from_remotes_async" pattern = "find_remotes_async|pull_from_remotes_async"

View File

@ -900,6 +900,34 @@ impl Repo {
// unsafe { TODO: call ostree_sys:ostree_repo_write_metadata() } // unsafe { TODO: call ostree_sys:ostree_repo_write_metadata() }
//} //}
//pub fn write_metadata_async<P: IsA<gio::Cancellable>, Q: FnOnce(Result</*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, Error>) + Send + 'static>(&self, objtype: ObjectType, expected_checksum: Option<&str>, object: &glib::Variant, cancellable: Option<&P>, callback: Q) {
// unsafe { TODO: call ostree_sys:ostree_repo_write_metadata_async() }
//}
//#[cfg(feature = "futures")]
//pub fn write_metadata_async_future(&self, objtype: ObjectType, expected_checksum: Option<&str>, object: &glib::Variant) -> Box_<dyn future::Future<Output = Result</*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, Error>> + std::marker::Unpin> {
//use gio::GioFuture;
//use fragile::Fragile;
//let expected_checksum = expected_checksum.map(ToOwned::to_owned);
//let object = object.clone();
//GioFuture::new(self, move |obj, send| {
// let cancellable = gio::Cancellable::new();
// let send = Fragile::new(send);
// obj.write_metadata_async(
// objtype,
// expected_checksum.as_ref().map(::std::borrow::Borrow::borrow),
// &object,
// Some(&cancellable),
// move |res| {
// let _ = send.into_inner().send(res);
// },
// );
// cancellable
//})
//}
pub fn write_metadata_stream_trusted<P: IsA<gio::InputStream>, Q: IsA<gio::Cancellable>>(&self, objtype: ObjectType, checksum: &str, object_input: &P, length: u64, cancellable: Option<&Q>) -> Result<(), Error> { pub fn write_metadata_stream_trusted<P: IsA<gio::InputStream>, Q: IsA<gio::Cancellable>>(&self, objtype: ObjectType, checksum: &str, object_input: &P, length: u64, cancellable: Option<&Q>) -> Result<(), Error> {
unsafe { unsafe {
let mut error = ptr::null_mut(); let mut error = ptr::null_mut();