1use zbus::proxy;
15#[proxy(
16 interface = "org.freedesktop.PackageKit.Transaction",
17 assume_defaults = true
18)]
19pub trait Transaction {
20 fn accept_eula(&self, eula_id: &str) -> zbus::Result<()>;
22
23 fn cancel(&self) -> zbus::Result<()>;
25
26 fn depends_on(&self, filter: u64, package_ids: &[&str], recursive: bool) -> zbus::Result<()>;
28
29 fn download_packages(&self, store_in_cache: bool, package_ids: &[&str]) -> zbus::Result<()>;
31
32 fn get_categories(&self) -> zbus::Result<()>;
34
35 fn get_details(&self, package_ids: &[&str]) -> zbus::Result<()>;
37
38 fn get_details_local(&self, files: &[&str]) -> zbus::Result<()>;
40
41 fn get_distro_upgrades(&self) -> zbus::Result<()>;
43
44 fn get_files(&self, package_ids: &[&str]) -> zbus::Result<()>;
46
47 fn get_files_local(&self, files: &[&str]) -> zbus::Result<()>;
49
50 fn get_old_transactions(&self, number: u32) -> zbus::Result<()>;
52
53 fn get_packages(&self, filter: u64) -> zbus::Result<()>;
55
56 fn get_repo_list(&self, filter: u64) -> zbus::Result<()>;
58
59 fn get_update_detail(&self, package_ids: &[&str]) -> zbus::Result<()>;
61
62 fn get_updates(&self, filter: u64) -> zbus::Result<()>;
64
65 fn install_files(&self, transaction_flags: u64, full_paths: &[&str]) -> zbus::Result<()>;
67
68 fn install_packages(&self, transaction_flags: u64, package_ids: &[&str]) -> zbus::Result<()>;
70
71 fn install_signature(&self, sig_type: u32, key_id: &str, package_id: &str) -> zbus::Result<()>;
73
74 fn refresh_cache(&self, force: bool) -> zbus::Result<()>;
76
77 fn remove_packages(
79 &self,
80 transaction_flags: u64,
81 package_ids: &[&str],
82 allow_deps: bool,
83 autoremove: bool,
84 ) -> zbus::Result<()>;
85
86 fn repair_system(&self, transaction_flags: u64) -> zbus::Result<()>;
88
89 fn repo_enable(&self, repo_id: &str, enabled: bool) -> zbus::Result<()>;
91
92 fn repo_remove(
94 &self,
95 transaction_flags: u64,
96 repo_id: &str,
97 autoremove: bool,
98 ) -> zbus::Result<()>;
99
100 fn repo_set_data(&self, repo_id: &str, parameter: &str, value: &str) -> zbus::Result<()>;
102
103 fn required_by(&self, filter: u64, package_ids: &[&str], recursive: bool) -> zbus::Result<()>;
105
106 fn resolve(&self, filter: u64, packages: &[&str]) -> zbus::Result<()>;
108
109 fn search_details(&self, filter: u64, values: &[&str]) -> zbus::Result<()>;
111
112 fn search_files(&self, filter: u64, values: &[&str]) -> zbus::Result<()>;
114
115 fn search_groups(&self, filter: u64, values: &[&str]) -> zbus::Result<()>;
117
118 fn search_names(&self, filter: u64, values: &[&str]) -> zbus::Result<()>;
120
121 fn set_hints(&self, hints: &[&str]) -> zbus::Result<()>;
123
124 fn update_packages(&self, transaction_flags: u64, package_ids: &[&str]) -> zbus::Result<()>;
126
127 fn upgrade_system(
129 &self,
130 transaction_flags: u64,
131 distro_id: &str,
132 upgrade_kind: u32,
133 ) -> zbus::Result<()>;
134
135 fn what_provides(&self, filter: u64, values: &[&str]) -> zbus::Result<()>;
137
138 #[zbus(signal)]
140 fn category(
141 &self,
142 parent_id: &str,
143 cat_id: &str,
144 name: &str,
145 summary: &str,
146 icon: &str,
147 ) -> zbus::Result<()>;
148
149 #[zbus(signal)]
151 fn destroy(&self) -> zbus::Result<()>;
152
153 #[zbus(signal)]
155 fn details(
156 &self,
157 data: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
158 ) -> zbus::Result<()>;
159
160 #[zbus(signal)]
162 fn distro_upgrade(&self, type_: u32, name: &str, summary: &str) -> zbus::Result<()>;
163
164 #[zbus(signal)]
166 fn error_code(&self, code: u32, details: &str) -> zbus::Result<()>;
167
168 #[zbus(signal)]
170 fn eula_required(
171 &self,
172 eula_id: &str,
173 package_id: &str,
174 vendor_name: &str,
175 license_agreement: &str,
176 ) -> zbus::Result<()>;
177
178 #[zbus(signal)]
180 fn files(&self, package_id: &str, file_list: Vec<&str>) -> zbus::Result<()>;
181
182 #[zbus(signal)]
184 fn finished(&self, exit: u32, runtime: u32) -> zbus::Result<()>;
185
186 #[zbus(signal)]
188 fn item_progress(&self, id: &str, status: u32, percentage: u32) -> zbus::Result<()>;
189
190 #[zbus(signal)]
192 fn media_change_required(
193 &self,
194 media_type: u32,
195 media_id: &str,
196 media_text: &str,
197 ) -> zbus::Result<()>;
198
199 #[zbus(signal)]
201 fn package(&self, info: u32, package_id: &str, summary: &str) -> zbus::Result<()>;
202
203 #[zbus(signal)]
205 fn packages(&self, packages: Vec<(u32, &str, &str)>) -> zbus::Result<()>;
206
207 #[zbus(signal)]
209 fn repo_detail(&self, repo_id: &str, description: &str, enabled: bool) -> zbus::Result<()>;
210
211 #[zbus(signal)]
213 fn repo_signature_required(
214 &self,
215 package_id: &str,
216 repository_name: &str,
217 key_url: &str,
218 key_userid: &str,
219 key_id: &str,
220 key_fingerprint: &str,
221 key_timestamp: &str,
222 type_: u32,
223 ) -> zbus::Result<()>;
224
225 #[zbus(signal)]
227 fn require_restart(&self, type_: u32, package_id: &str) -> zbus::Result<()>;
228
229 #[zbus(signal)]
231 fn transaction(
232 &self,
233 object_path: zbus::zvariant::ObjectPath<'_>,
234 timespec: &str,
235 succeeded: bool,
236 role: u32,
237 duration: u32,
238 data: &str,
239 uid: u32,
240 cmdline: &str,
241 ) -> zbus::Result<()>;
242
243 #[zbus(signal)]
245 fn update_detail(
246 &self,
247 package_id: &str,
248 updates: Vec<&str>,
249 obsoletes: Vec<&str>,
250 vendor_urls: Vec<&str>,
251 bugzilla_urls: Vec<&str>,
252 cve_urls: Vec<&str>,
253 restart: u32,
254 update_text: &str,
255 changelog: &str,
256 state: u32,
257 issued: &str,
258 updated: &str,
259 ) -> zbus::Result<()>;
260
261 #[zbus(signal)]
263 fn update_details(
264 &self,
265 details: Vec<(
266 &str,
267 Vec<&str>,
268 Vec<&str>,
269 Vec<&str>,
270 Vec<&str>,
271 Vec<&str>,
272 u32,
273 &str,
274 &str,
275 u32,
276 &str,
277 &str,
278 )>,
279 ) -> zbus::Result<()>;
280
281 #[zbus(property)]
283 fn allow_cancel(&self) -> zbus::Result<bool>;
284
285 #[zbus(property)]
287 fn caller_active(&self) -> zbus::Result<bool>;
288
289 #[zbus(property)]
291 fn download_size_remaining(&self) -> zbus::Result<u64>;
292
293 #[zbus(property)]
295 fn elapsed_time(&self) -> zbus::Result<u32>;
296
297 #[zbus(property)]
299 fn last_package(&self) -> zbus::Result<String>;
300
301 #[zbus(property)]
303 fn percentage(&self) -> zbus::Result<u32>;
304
305 #[zbus(property)]
307 fn remaining_time(&self) -> zbus::Result<u32>;
308
309 #[zbus(property)]
311 fn role(&self) -> zbus::Result<u32>;
312
313 #[zbus(property)]
315 fn sender(&self) -> zbus::Result<String>;
316
317 #[zbus(property)]
319 fn speed(&self) -> zbus::Result<u32>;
320
321 #[zbus(property)]
323 fn status(&self) -> zbus::Result<u32>;
324
325 #[zbus(property)]
327 fn transaction_flags(&self) -> zbus::Result<u64>;
328
329 #[zbus(property)]
331 fn uid(&self) -> zbus::Result<u32>;
332}