use zbus::proxy;
#[proxy(
interface = "org.freedesktop.PackageKit.Transaction",
assume_defaults = true
)]
pub trait Transaction {
fn accept_eula(&self, eula_id: &str) -> zbus::Result<()>;
fn cancel(&self) -> zbus::Result<()>;
fn depends_on(&self, filter: u64, package_ids: &[&str], recursive: bool) -> zbus::Result<()>;
fn download_packages(&self, store_in_cache: bool, package_ids: &[&str]) -> zbus::Result<()>;
fn get_categories(&self) -> zbus::Result<()>;
fn get_details(&self, package_ids: &[&str]) -> zbus::Result<()>;
fn get_details_local(&self, files: &[&str]) -> zbus::Result<()>;
fn get_distro_upgrades(&self) -> zbus::Result<()>;
fn get_files(&self, package_ids: &[&str]) -> zbus::Result<()>;
fn get_files_local(&self, files: &[&str]) -> zbus::Result<()>;
fn get_old_transactions(&self, number: u32) -> zbus::Result<()>;
fn get_packages(&self, filter: u64) -> zbus::Result<()>;
fn get_repo_list(&self, filter: u64) -> zbus::Result<()>;
fn get_update_detail(&self, package_ids: &[&str]) -> zbus::Result<()>;
fn get_updates(&self, filter: u64) -> zbus::Result<()>;
fn install_files(&self, transaction_flags: u64, full_paths: &[&str]) -> zbus::Result<()>;
fn install_packages(&self, transaction_flags: u64, package_ids: &[&str]) -> zbus::Result<()>;
fn install_signature(&self, sig_type: u32, key_id: &str, package_id: &str) -> zbus::Result<()>;
fn refresh_cache(&self, force: bool) -> zbus::Result<()>;
fn remove_packages(
&self,
transaction_flags: u64,
package_ids: &[&str],
allow_deps: bool,
autoremove: bool,
) -> zbus::Result<()>;
fn repair_system(&self, transaction_flags: u64) -> zbus::Result<()>;
fn repo_enable(&self, repo_id: &str, enabled: bool) -> zbus::Result<()>;
fn repo_remove(
&self,
transaction_flags: u64,
repo_id: &str,
autoremove: bool,
) -> zbus::Result<()>;
fn repo_set_data(&self, repo_id: &str, parameter: &str, value: &str) -> zbus::Result<()>;
fn required_by(&self, filter: u64, package_ids: &[&str], recursive: bool) -> zbus::Result<()>;
fn resolve(&self, filter: u64, packages: &[&str]) -> zbus::Result<()>;
fn search_details(&self, filter: u64, values: &[&str]) -> zbus::Result<()>;
fn search_files(&self, filter: u64, values: &[&str]) -> zbus::Result<()>;
fn search_groups(&self, filter: u64, values: &[&str]) -> zbus::Result<()>;
fn search_names(&self, filter: u64, values: &[&str]) -> zbus::Result<()>;
fn set_hints(&self, hints: &[&str]) -> zbus::Result<()>;
fn update_packages(&self, transaction_flags: u64, package_ids: &[&str]) -> zbus::Result<()>;
fn upgrade_system(
&self,
transaction_flags: u64,
distro_id: &str,
upgrade_kind: u32,
) -> zbus::Result<()>;
fn what_provides(&self, filter: u64, values: &[&str]) -> zbus::Result<()>;
#[zbus(signal)]
fn category(
&self,
parent_id: &str,
cat_id: &str,
name: &str,
summary: &str,
icon: &str,
) -> zbus::Result<()>;
#[zbus(signal)]
fn destroy(&self) -> zbus::Result<()>;
#[zbus(signal)]
fn details(
&self,
data: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[zbus(signal)]
fn distro_upgrade(&self, type_: u32, name: &str, summary: &str) -> zbus::Result<()>;
#[zbus(signal)]
fn error_code(&self, code: u32, details: &str) -> zbus::Result<()>;
#[zbus(signal)]
fn eula_required(
&self,
eula_id: &str,
package_id: &str,
vendor_name: &str,
license_agreement: &str,
) -> zbus::Result<()>;
#[zbus(signal)]
fn files(&self, package_id: &str, file_list: Vec<&str>) -> zbus::Result<()>;
#[zbus(signal)]
fn finished(&self, exit: u32, runtime: u32) -> zbus::Result<()>;
#[zbus(signal)]
fn item_progress(&self, id: &str, status: u32, percentage: u32) -> zbus::Result<()>;
#[zbus(signal)]
fn media_change_required(
&self,
media_type: u32,
media_id: &str,
media_text: &str,
) -> zbus::Result<()>;
#[zbus(signal)]
fn package(&self, info: u32, package_id: &str, summary: &str) -> zbus::Result<()>;
#[zbus(signal)]
fn packages(&self, packages: Vec<(u32, &str, &str)>) -> zbus::Result<()>;
#[zbus(signal)]
fn repo_detail(&self, repo_id: &str, description: &str, enabled: bool) -> zbus::Result<()>;
#[zbus(signal)]
fn repo_signature_required(
&self,
package_id: &str,
repository_name: &str,
key_url: &str,
key_userid: &str,
key_id: &str,
key_fingerprint: &str,
key_timestamp: &str,
type_: u32,
) -> zbus::Result<()>;
#[zbus(signal)]
fn require_restart(&self, type_: u32, package_id: &str) -> zbus::Result<()>;
#[zbus(signal)]
fn transaction(
&self,
object_path: zbus::zvariant::ObjectPath<'_>,
timespec: &str,
succeeded: bool,
role: u32,
duration: u32,
data: &str,
uid: u32,
cmdline: &str,
) -> zbus::Result<()>;
#[zbus(signal)]
fn update_detail(
&self,
package_id: &str,
updates: Vec<&str>,
obsoletes: Vec<&str>,
vendor_urls: Vec<&str>,
bugzilla_urls: Vec<&str>,
cve_urls: Vec<&str>,
restart: u32,
update_text: &str,
changelog: &str,
state: u32,
issued: &str,
updated: &str,
) -> zbus::Result<()>;
#[zbus(signal)]
fn update_details(
&self,
details: Vec<(
&str,
Vec<&str>,
Vec<&str>,
Vec<&str>,
Vec<&str>,
Vec<&str>,
u32,
&str,
&str,
u32,
&str,
&str,
)>,
) -> zbus::Result<()>;
#[zbus(property)]
fn allow_cancel(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn caller_active(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn download_size_remaining(&self) -> zbus::Result<u64>;
#[zbus(property)]
fn elapsed_time(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn last_package(&self) -> zbus::Result<String>;
#[zbus(property)]
fn percentage(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn remaining_time(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn role(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn sender(&self) -> zbus::Result<String>;
#[zbus(property)]
fn speed(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn status(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn transaction_flags(&self) -> zbus::Result<u64>;
#[zbus(property)]
fn uid(&self) -> zbus::Result<u32>;
}