Commit 07309c59 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui
Browse files

Merge branch 'wip/haeckerfelix/gir-update-regen-test-v1' into 'v0.1'

Update Flatpak GIR and regen (v0.1)

See merge request !13
parents ed991943 4073d93e
Pipeline #456154 passed with stage
This diff is collapsed.
......@@ -86,6 +86,18 @@ version = "1.7.3"
[package.metadata.system-deps.flatpak.v1_7_4]
version = "1.7.4"
[package.metadata.system-deps.flatpak.v1_3_2]
version = "1.3.2"
[package.metadata.system-deps.flatpak.v1_8]
version = "1.8"
[package.metadata.system-deps.flatpak.v1_9_1]
version = "1.9.1"
[package.metadata.system-deps.flatpak.v1_11_1]
version = "1.11.1"
[dependencies]
libc = "0.2"
......@@ -124,7 +136,7 @@ v1_0_3 = ["v0_11_8"]
v1_1 = ["v1_0_3"]
v1_1_1 = ["v1_1"]
v1_1_2 = ["v1_1_1"]
v1_3_3 = ["v1_1_2"]
v1_3_3 = ["v1_3_2"]
v1_3_4 = ["v1_3_3"]
v1_4 = ["v1_3_4"]
v1_4_2 = ["v1_4"]
......@@ -135,3 +147,7 @@ v1_7 = ["v1_5_2"]
v1_7_1 = ["v1_7"]
v1_7_3 = ["v1_7_1"]
v1_7_4 = ["v1_7_3"]
v1_3_2 = ["v1_1_2"]
v1_8 = ["v1_7_3"]
v1_9_1 = ["v1_8"]
v1_11_1 = ["v1_9_1"]
......@@ -103,6 +103,7 @@ pub type FlatpakQueryFlags = c_uint;
pub const FLATPAK_QUERY_FLAGS_NONE: FlatpakQueryFlags = 0;
pub const FLATPAK_QUERY_FLAGS_ONLY_CACHED: FlatpakQueryFlags = 1;
pub const FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED: FlatpakQueryFlags = 2;
pub const FLATPAK_QUERY_FLAGS_ALL_ARCHES: FlatpakQueryFlags = 4;
pub type FlatpakTransactionErrorDetails = c_uint;
pub const FLATPAK_TRANSACTION_ERROR_DETAILS_NON_FATAL: FlatpakTransactionErrorDetails = 1;
......@@ -327,7 +328,8 @@ pub struct FlatpakTransactionClass {
>,
pub install_authenticator:
Option<unsafe extern "C" fn(*mut FlatpakTransaction, *const c_char, *const c_char)>,
pub padding: [gpointer; 4],
pub ready_pre_auth: Option<unsafe extern "C" fn(*mut FlatpakTransaction) -> gboolean>,
pub padding: [gpointer; 3],
}
impl ::std::fmt::Debug for FlatpakTransactionClass {
......@@ -347,6 +349,7 @@ impl ::std::fmt::Debug for FlatpakTransactionClass {
.field("webflow_done", &self.webflow_done)
.field("basic_auth_start", &self.basic_auth_start)
.field("install_authenticator", &self.install_authenticator)
.field("ready_pre_auth", &self.ready_pre_auth)
.field("padding", &self.padding)
.finish()
}
......@@ -882,6 +885,14 @@ extern "C" {
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> *mut glib::GPtrArray;
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
pub fn flatpak_installation_list_pinned_refs(
self_: *mut FlatpakInstallation,
arch: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> *mut glib::GPtrArray;
pub fn flatpak_installation_list_remote_refs_sync(
self_: *mut FlatpakInstallation,
remote_or_uri: *const c_char,
......@@ -897,6 +908,15 @@ extern "C" {
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> *mut glib::GPtrArray;
#[cfg(any(feature = "v1_11_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_11_1")))]
pub fn flatpak_installation_list_remote_related_refs_for_installed_sync(
self_: *mut FlatpakInstallation,
remote_name: *const c_char,
ref_: *const c_char,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> *mut glib::GPtrArray;
#[cfg(any(feature = "v0_6_7", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v0_6_7")))]
pub fn flatpak_installation_list_remote_related_refs_sync(
......@@ -926,6 +946,16 @@ extern "C" {
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> *mut glib::GPtrArray;
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
pub fn flatpak_installation_list_unused_refs_with_options(
self_: *mut FlatpakInstallation,
arch: *const c_char,
metadata_injection: *mut glib::GHashTable,
options: *mut glib::GVariant,
cancellable: *mut gio::GCancellable,
error: *mut *mut glib::GError,
) -> *mut glib::GPtrArray;
pub fn flatpak_installation_load_app_overrides(
self_: *mut FlatpakInstallation,
app_id: *const c_char,
......@@ -1161,6 +1191,9 @@ extern "C" {
pub fn flatpak_ref_parse(ref_: *const c_char, error: *mut *mut glib::GError)
-> *mut FlatpakRef;
pub fn flatpak_ref_format_ref(self_: *mut FlatpakRef) -> *mut c_char;
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
pub fn flatpak_ref_format_ref_cached(self_: *mut FlatpakRef) -> *const c_char;
pub fn flatpak_ref_get_arch(self_: *mut FlatpakRef) -> *const c_char;
pub fn flatpak_ref_get_branch(self_: *mut FlatpakRef) -> *const c_char;
pub fn flatpak_ref_get_collection_id(self_: *mut FlatpakRef) -> *const c_char;
......@@ -1361,6 +1394,11 @@ extern "C" {
pub fn flatpak_transaction_get_current_operation(
self_: *mut FlatpakTransaction,
) -> *mut FlatpakTransactionOperation;
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
pub fn flatpak_transaction_get_include_unused_uninstall_ops(
self_: *mut FlatpakTransaction,
) -> gboolean;
pub fn flatpak_transaction_get_installation(
self_: *mut FlatpakTransaction,
) -> *mut FlatpakInstallation;
......@@ -1384,6 +1422,12 @@ extern "C" {
self_: *mut FlatpakTransaction,
arch: *const c_char,
);
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
pub fn flatpak_transaction_set_disable_auto_pin(
self_: *mut FlatpakTransaction,
disable_pin: gboolean,
);
pub fn flatpak_transaction_set_disable_dependencies(
self_: *mut FlatpakTransaction,
disable_dependencies: gboolean,
......@@ -1404,6 +1448,12 @@ extern "C" {
self_: *mut FlatpakTransaction,
force_uninstall: gboolean,
);
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
pub fn flatpak_transaction_set_include_unused_uninstall_ops(
self_: *mut FlatpakTransaction,
include_unused_uninstall_ops: gboolean,
);
pub fn flatpak_transaction_set_no_deploy(self_: *mut FlatpakTransaction, no_deploy: gboolean);
#[cfg(any(feature = "v1_7_3", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_7_3")))]
......@@ -1465,6 +1515,16 @@ extern "C" {
pub fn flatpak_transaction_operation_get_remote(
self_: *mut FlatpakTransactionOperation,
) -> *const c_char;
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
pub fn flatpak_transaction_operation_get_requires_authentication(
self_: *mut FlatpakTransactionOperation,
) -> gboolean;
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
pub fn flatpak_transaction_operation_get_subpaths(
self_: *mut FlatpakTransactionOperation,
) -> *const *const c_char;
//=========================================================================
// FlatpakTransactionProgress
......
......@@ -491,6 +491,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("(gint) FLATPAK_PORTAL_ERROR_NOT_ALLOWED", "4"),
("(gint) FLATPAK_PORTAL_ERROR_NOT_FOUND", "2"),
("(gint) FLATPAK_PORTAL_ERROR_WINDOW_DESTROYED", "6"),
("(guint) FLATPAK_QUERY_FLAGS_ALL_ARCHES", "4"),
("(guint) FLATPAK_QUERY_FLAGS_NONE", "0"),
("(guint) FLATPAK_QUERY_FLAGS_ONLY_CACHED", "1"),
("(guint) FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED", "2"),
......
......@@ -68,6 +68,7 @@ int main() {
PRINT_CONSTANT((gint) FLATPAK_PORTAL_ERROR_NOT_ALLOWED);
PRINT_CONSTANT((gint) FLATPAK_PORTAL_ERROR_NOT_FOUND);
PRINT_CONSTANT((gint) FLATPAK_PORTAL_ERROR_WINDOW_DESTROYED);
PRINT_CONSTANT((guint) FLATPAK_QUERY_FLAGS_ALL_ARCHES);
PRINT_CONSTANT((guint) FLATPAK_QUERY_FLAGS_NONE);
PRINT_CONSTANT((guint) FLATPAK_QUERY_FLAGS_ONLY_CACHED);
PRINT_CONSTANT((guint) FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED);
......
......@@ -22,7 +22,7 @@ path = '../libflatpak-sys'
version = "0.1"
[features]
default = ["v1_5"]
default = ["v1_11_1"]
dox = []
v0_10 = ["v0_9_8", "ffi/v0_10"]
v0_11_8 = ["v0_10", "ffi/v0_11_8"]
......@@ -37,7 +37,18 @@ v1_0_3 = ["v0_11_8", "ffi/v1_0_3"]
v1_1 = ["v1_0_3", "ffi/v1_1"]
v1_1_1 = ["v1_1", "ffi/v1_1_1"]
v1_1_2 = ["v1_1_1", "ffi/v1_1_2"]
v1_3_3 = ["v1_1_2", "ffi/v1_3_3"]
v1_3_3 = ["v1_3_2", "ffi/v1_3_3"]
v1_3_4 = ["v1_3_3", "ffi/v1_3_4"]
v1_4 = ["v1_3_4", "ffi/v1_4"]
v1_5 = ["v1_4", "ffi/v1_5"]
v1_4_2 = ["v1_4", "ffi/v1_4_2"]
v1_5 = ["v1_4_2", "ffi/v1_5"]
v1_5_1 = ["v1_5", "ffi/v1_5_1"]
v1_5_2 = ["v1_5_1", "ffi/v1_5_2"]
v1_7 = ["v1_5_2", "ffi/v1_7"]
v1_7_1 = ["v1_7", "ffi/v1_7_1"]
v1_7_3 = ["v1_7_1", "ffi/v1_7_3"]
v1_7_4 = ["v1_7_3", "ffi/v1_7_4"]
v1_3_2 = ["v1_1_2", "ffi/v1_3_2"]
v1_8 = ["v1_7_3", "ffi/v1_8"]
v1_9_1 = ["v1_8", "ffi/v1_9_1"]
v1_11_1 = ["v1_9_1", "ffi/v1_11_1"]
......@@ -160,6 +160,8 @@ bitflags! {
const ONLY_CACHED = ffi::FLATPAK_QUERY_FLAGS_ONLY_CACHED as u32;
#[doc(alias = "FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED")]
const ONLY_SIDELOADED = ffi::FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED as u32;
#[doc(alias = "FLATPAK_QUERY_FLAGS_ALL_ARCHES")]
const ALL_ARCHES = ffi::FLATPAK_QUERY_FLAGS_ALL_ARCHES as u32;
}
}
......
......@@ -313,6 +313,15 @@ pub trait InstallationExt: 'static {
cancellable: Option<&impl IsA<gio::Cancellable>>,
) -> Result<Vec<RelatedRef>, glib::Error>;
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
#[doc(alias = "flatpak_installation_list_pinned_refs")]
fn list_pinned_refs(
&self,
arch: Option<&str>,
cancellable: Option<&impl IsA<gio::Cancellable>>,
) -> Result<Vec<InstalledRef>, glib::Error>;
#[doc(alias = "flatpak_installation_list_remote_refs_sync")]
fn list_remote_refs_sync(
&self,
......@@ -330,6 +339,16 @@ pub trait InstallationExt: 'static {
cancellable: Option<&impl IsA<gio::Cancellable>>,
) -> Result<Vec<RemoteRef>, glib::Error>;
#[cfg(any(feature = "v1_11_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_11_1")))]
#[doc(alias = "flatpak_installation_list_remote_related_refs_for_installed_sync")]
fn list_remote_related_refs_for_installed_sync(
&self,
remote_name: &str,
ref_: &str,
cancellable: Option<&impl IsA<gio::Cancellable>>,
) -> Result<Vec<RelatedRef>, glib::Error>;
#[doc(alias = "flatpak_installation_list_remote_related_refs_sync")]
fn list_remote_related_refs_sync(
&self,
......@@ -356,6 +375,11 @@ pub trait InstallationExt: 'static {
cancellable: Option<&impl IsA<gio::Cancellable>>,
) -> Result<Vec<InstalledRef>, glib::Error>;
//#[cfg(any(feature = "v1_9_1", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
//#[doc(alias = "flatpak_installation_list_unused_refs_with_options")]
//fn list_unused_refs_with_options(&self, arch: Option<&str>, metadata_injection: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 25 }/TypeId { ns_id: 0, id: 25 }, options: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Vec<InstalledRef>, glib::Error>;
#[doc(alias = "flatpak_installation_load_app_overrides")]
fn load_app_overrides(
&self,
......@@ -951,6 +975,29 @@ impl<O: IsA<Installation>> InstallationExt for O {
}
}
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
fn list_pinned_refs(
&self,
arch: Option<&str>,
cancellable: Option<&impl IsA<gio::Cancellable>>,
) -> Result<Vec<InstalledRef>, glib::Error> {
unsafe {
let mut error = ptr::null_mut();
let ret = ffi::flatpak_installation_list_pinned_refs(
self.as_ref().to_glib_none().0,
arch.to_glib_none().0,
cancellable.map(|p| p.as_ref()).to_glib_none().0,
&mut error,
);
if error.is_null() {
Ok(FromGlibPtrContainer::from_glib_container(ret))
} else {
Err(from_glib_full(error))
}
}
}
fn list_remote_refs_sync(
&self,
remote_or_uri: &str,
......@@ -997,6 +1044,31 @@ impl<O: IsA<Installation>> InstallationExt for O {
}
}
#[cfg(any(feature = "v1_11_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_11_1")))]
fn list_remote_related_refs_for_installed_sync(
&self,
remote_name: &str,
ref_: &str,
cancellable: Option<&impl IsA<gio::Cancellable>>,
) -> Result<Vec<RelatedRef>, glib::Error> {
unsafe {
let mut error = ptr::null_mut();
let ret = ffi::flatpak_installation_list_remote_related_refs_for_installed_sync(
self.as_ref().to_glib_none().0,
remote_name.to_glib_none().0,
ref_.to_glib_none().0,
cancellable.map(|p| p.as_ref()).to_glib_none().0,
&mut error,
);
if error.is_null() {
Ok(FromGlibPtrContainer::from_glib_container(ret))
} else {
Err(from_glib_full(error))
}
}
}
fn list_remote_related_refs_sync(
&self,
remote_name: &str,
......@@ -1066,6 +1138,12 @@ impl<O: IsA<Installation>> InstallationExt for O {
}
}
//#[cfg(any(feature = "v1_9_1", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
//fn list_unused_refs_with_options(&self, arch: Option<&str>, metadata_injection: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 25 }/TypeId { ns_id: 0, id: 25 }, options: Option<&glib::Variant>, cancellable: Option<&impl IsA<gio::Cancellable>>) -> Result<Vec<InstalledRef>, glib::Error> {
// unsafe { TODO: call ffi:flatpak_installation_list_unused_refs_with_options() }
//}
fn load_app_overrides(
&self,
app_id: &str,
......
......@@ -241,7 +241,7 @@ pub trait InstalledRefExt: 'static {
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_4_2")))]
//#[doc(alias = "flatpak_installed_ref_get_appdata_content_rating")]
//#[doc(alias = "get_appdata_content_rating")]
//fn appdata_content_rating(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 25 }/TypeId { ns_id: 0, id: 25 };
//fn appdata_content_rating(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 };
#[cfg(any(feature = "v1_4_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_4_2")))]
......@@ -381,7 +381,7 @@ pub trait InstalledRefExt: 'static {
impl<O: IsA<InstalledRef>> InstalledRefExt for O {
//#[cfg(any(feature = "v1_4_2", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_4_2")))]
//fn appdata_content_rating(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 25 }/TypeId { ns_id: 0, id: 25 } {
//fn appdata_content_rating(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 } {
// unsafe { TODO: call ffi:flatpak_installed_ref_get_appdata_content_rating() }
//}
......
......@@ -130,6 +130,11 @@ pub trait RefExt: 'static {
#[doc(alias = "flatpak_ref_format_ref")]
fn format_ref(&self) -> Option<glib::GString>;
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
#[doc(alias = "flatpak_ref_format_ref_cached")]
fn format_ref_cached(&self) -> Option<glib::GString>;
#[doc(alias = "flatpak_ref_get_arch")]
#[doc(alias = "get_arch")]
fn arch(&self) -> Option<glib::GString>;
......@@ -160,6 +165,16 @@ impl<O: IsA<Ref>> RefExt for O {
unsafe { from_glib_full(ffi::flatpak_ref_format_ref(self.as_ref().to_glib_none().0)) }
}
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
fn format_ref_cached(&self) -> Option<glib::GString> {
unsafe {
from_glib_none(ffi::flatpak_ref_format_ref_cached(
self.as_ref().to_glib_none().0,
))
}
}
fn arch(&self) -> Option<glib::GString> {
unsafe { from_glib_none(ffi::flatpak_ref_get_arch(self.as_ref().to_glib_none().0)) }
}
......
......@@ -147,6 +147,12 @@ pub trait TransactionExt: 'static {
#[doc(alias = "get_current_operation")]
fn current_operation(&self) -> Option<TransactionOperation>;
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
#[doc(alias = "flatpak_transaction_get_include_unused_uninstall_ops")]
#[doc(alias = "get_include_unused_uninstall_ops")]
fn is_include_unused_uninstall_ops(&self) -> bool;
#[doc(alias = "flatpak_transaction_get_installation")]
#[doc(alias = "get_installation")]
fn installation(&self) -> Option<Installation>;
......@@ -182,6 +188,11 @@ pub trait TransactionExt: 'static {
#[doc(alias = "flatpak_transaction_set_default_arch")]
fn set_default_arch(&self, arch: &str);
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
#[doc(alias = "flatpak_transaction_set_disable_auto_pin")]
fn set_disable_auto_pin(&self, disable_pin: bool);
#[doc(alias = "flatpak_transaction_set_disable_dependencies")]
fn set_disable_dependencies(&self, disable_dependencies: bool);
......@@ -197,6 +208,11 @@ pub trait TransactionExt: 'static {
#[doc(alias = "flatpak_transaction_set_force_uninstall")]
fn set_force_uninstall(&self, force_uninstall: bool);
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
#[doc(alias = "flatpak_transaction_set_include_unused_uninstall_ops")]
fn set_include_unused_uninstall_ops(&self, include_unused_uninstall_ops: bool);
#[doc(alias = "flatpak_transaction_set_no_deploy")]
fn set_no_deploy(&self, no_deploy: bool);
......@@ -241,11 +257,13 @@ pub trait TransactionExt: 'static {
f: F,
) -> SignalHandlerId;
//#[cfg(any(feature = "v1_3_2", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_3_2")))]
//#[doc(alias = "end-of-lifed-with-rebase")]
//fn connect_end_of_lifed_with_rebase<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v1_7_4", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_7_4")))]
#[cfg(any(feature = "v1_8", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_8")))]
#[doc(alias = "install-authenticator")]
fn connect_install_authenticator<F: Fn(&Self, &str, &str) + 'static>(
&self,
......@@ -261,6 +279,11 @@ pub trait TransactionExt: 'static {
#[doc(alias = "ready")]
fn connect_ready<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
#[doc(alias = "ready-pre-auth")]
fn connect_ready_pre_auth<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v1_5_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_5_1")))]
#[doc(alias = "webflow-done")]
......@@ -434,6 +457,16 @@ impl<O: IsA<Transaction>> TransactionExt for O {
}
}
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
fn is_include_unused_uninstall_ops(&self) -> bool {
unsafe {
from_glib(ffi::flatpak_transaction_get_include_unused_uninstall_ops(
self.as_ref().to_glib_none().0,
))
}
}
fn installation(&self) -> Option<Installation> {
unsafe {
from_glib_full(ffi::flatpak_transaction_get_installation(
......@@ -514,6 +547,17 @@ impl<O: IsA<Transaction>> TransactionExt for O {
}
}
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
fn set_disable_auto_pin(&self, disable_pin: bool) {
unsafe {
ffi::flatpak_transaction_set_disable_auto_pin(
self.as_ref().to_glib_none().0,
disable_pin.into_glib(),
);
}
}
fn set_disable_dependencies(&self, disable_dependencies: bool) {
unsafe {
ffi::flatpak_transaction_set_disable_dependencies(
......@@ -559,6 +603,17 @@ impl<O: IsA<Transaction>> TransactionExt for O {
}
}
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
fn set_include_unused_uninstall_ops(&self, include_unused_uninstall_ops: bool) {
unsafe {
ffi::flatpak_transaction_set_include_unused_uninstall_ops(
self.as_ref().to_glib_none().0,
include_unused_uninstall_ops.into_glib(),
);
}
}
fn set_no_deploy(&self, no_deploy: bool) {
unsafe {
ffi::flatpak_transaction_set_no_deploy(
......@@ -727,12 +782,14 @@ impl<O: IsA<Transaction>> TransactionExt for O {
}
}
//#[cfg(any(feature = "v1_3_2", feature = "dox"))]
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_3_2")))]
//fn connect_end_of_lifed_with_rebase<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
// Empty ctype previous_ids: *.CArray TypeId { ns_id: 0, id: 28 }
//}
#[cfg(any(feature = "v1_7_4", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_7_4")))]
#[cfg(any(feature = "v1_8", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_8")))]
fn connect_install_authenticator<F: Fn(&Self, &str, &str) + 'static>(
&self,
f: F,
......@@ -822,6 +879,32 @@ impl<O: IsA<Transaction>> TransactionExt for O {
}
}
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
fn connect_ready_pre_auth<F: Fn(&Self) -> bool + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn ready_pre_auth_trampoline<
P: IsA<Transaction>,
F: Fn(&P) -> bool + 'static,
>(
this: *mut ffi::FlatpakTransaction,
f: glib::ffi::gpointer,
) -> glib::ffi::gboolean {
let f: &F = &*(f as *const F);
f(Transaction::from_glib_borrow(this).unsafe_cast_ref()).into_glib()
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"ready-pre-auth\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
ready_pre_auth_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}
#[cfg(any(feature = "v1_5_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_5_1")))]
fn connect_webflow_done<F: Fn(&Self, &glib::Variant, i32) + 'static>(
......
......@@ -125,6 +125,32 @@ impl TransactionOperation {
))
}
}
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
#[doc(alias = "flatpak_transaction_operation_get_requires_authentication")]
#[doc(alias = "get_requires_authentication")]
pub fn requires_authentication(&self) -> bool {
unsafe {
from_glib(
ffi::flatpak_transaction_operation_get_requires_authentication(
self.to_glib_none().0,
),
)
}
}
#[cfg(any(feature = "v1_9_1", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_9_1")))]
#[doc(alias = "flatpak_transaction_operation_get_subpaths")]
#[doc(alias = "get_subpaths")]
pub fn subpaths(&self) -> Vec<glib::GString> {
unsafe {
FromGlibPtrContainer::from_glib_none(ffi::flatpak_transaction_operation_get_subpaths(
self.to_glib_none().0,
))
}
}
}
impl fmt::Display for TransactionOperation {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment