Skip to content

Commit 8cec17d

Browse files
committed
WIP: rauc-polling: tacd
1 parent 0afc0de commit 8cec17d

12 files changed

+3168
-2
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
From 65ffa10650ed33521c2ba0f0d21dab3fbb97836c Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= <[email protected]>
3+
Date: Thu, 27 Mar 2025 08:59:42 +0100
4+
Subject: [PATCH 1/5] tacd: dbus: rauc: re-introspect services
5+
MIME-Version: 1.0
6+
Content-Type: text/plain; charset=UTF-8
7+
Content-Transfer-Encoding: 8bit
8+
9+
RAUC is in the process of adding native update polling support.
10+
Re-introspect the dbus service to add the new APIs.
11+
12+
Signed-off-by: Leonard Göhrs <[email protected]>
13+
---
14+
src/dbus/rauc.rs | 3 +++
15+
src/dbus/rauc/installer.rs | 5 +++++
16+
src/dbus/rauc/poller.rs | 24 ++++++++++++++++++++++++
17+
3 files changed, 32 insertions(+)
18+
create mode 100644 src/dbus/rauc/poller.rs
19+
20+
diff --git a/src/dbus/rauc.rs b/src/dbus/rauc.rs
21+
index 415f771..573aef0 100644
22+
--- a/src/dbus/rauc.rs
23+
+++ b/src/dbus/rauc.rs
24+
@@ -40,6 +40,9 @@ mod demo_mode;
25+
#[cfg(not(feature = "demo_mode"))]
26+
mod installer;
27+
28+
+#[cfg(not(feature = "demo_mode"))]
29+
+mod poller;
30+
+
31+
#[cfg(not(feature = "demo_mode"))]
32+
use installer::InstallerProxy;
33+
34+
diff --git a/src/dbus/rauc/installer.rs b/src/dbus/rauc/installer.rs
35+
index d8c1836..f030161 100644
36+
--- a/src/dbus/rauc/installer.rs
37+
+++ b/src/dbus/rauc/installer.rs
38+
@@ -10,6 +10,11 @@ use zbus::proxy;
39+
default_path = "/"
40+
)]
41+
trait Installer {
42+
+ /// GetArtifactStatus method
43+
+ fn get_artifact_status(
44+
+ &self,
45+
+ ) -> zbus::Result<Vec<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>>;
46+
+
47+
/// GetPrimary method
48+
fn get_primary(&self) -> zbus::Result<String>;
49+
50+
diff --git a/src/dbus/rauc/poller.rs b/src/dbus/rauc/poller.rs
51+
new file mode 100644
52+
index 0000000..70fdb3b
53+
--- /dev/null
54+
+++ b/src/dbus/rauc/poller.rs
55+
@@ -0,0 +1,24 @@
56+
+//! This code was generated by `zbus-xmlgen` `4.1.0` from DBus introspection data.
57+
+//!
58+
+//! By running `zbus-xmlgen system de.pengutronix.rauc /` on the LXA TAC.
59+
+
60+
+use zbus::proxy;
61+
+
62+
+#[proxy(
63+
+ interface = "de.pengutronix.rauc.Poller",
64+
+ default_service = "de.pengutronix.rauc",
65+
+ default_path = "/"
66+
+)]
67+
+trait Poller {
68+
+ /// Poll method
69+
+ fn poll(&self) -> zbus::Result<()>;
70+
+
71+
+ /// NextPoll property
72+
+ #[zbus(property)]
73+
+ fn next_poll(&self) -> zbus::Result<i64>;
74+
+
75+
+ /// Status property
76+
+ #[zbus(property)]
77+
+ fn status(&self)
78+
+ -> zbus::Result<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>;
79+
+}
80+
--
81+
2.39.5
82+

0 commit comments

Comments
 (0)