|
| 1 | +From ac2e0c416223552d9a604bab7e33e514e1d518bd 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 01/17] 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..6d69084 100644 |
| 22 | +--- a/src/dbus/rauc.rs |
| 23 | ++++ b/src/dbus/rauc.rs |
| 24 | +@@ -43,6 +43,9 @@ mod installer; |
| 25 | + #[cfg(not(feature = "demo_mode"))] |
| 26 | + use installer::InstallerProxy; |
| 27 | + |
| 28 | ++#[cfg(not(feature = "demo_mode"))] |
| 29 | ++mod poller; |
| 30 | ++ |
| 31 | + #[cfg(feature = "demo_mode")] |
| 32 | + mod imports { |
| 33 | + use std::collections::HashMap; |
| 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