diff --git a/gui/src/bus.rs b/gui/src/bus.rs index 92dfb66..a0580f5 100644 --- a/gui/src/bus.rs +++ b/gui/src/bus.rs @@ -4,7 +4,7 @@ //! `glib::MainContext::spawn_local`, which polls the future on the GTK main //! thread; tokio's reactor wakes the future when zbus I/O is ready. -use authforge_common::types::Credential; +use authforge_common::types::{Credential, PendingStatus}; const BUS_NAME: &str = "io.dangerousthings.AuthForge"; const OBJECT_PATH: &str = "/io/dangerousthings/AuthForge"; @@ -48,6 +48,14 @@ impl Daemon { ) -> zbus::Result> { self.proxy.receive_signal("EnrollmentFailed").await } + + pub async fn get_pending_status(&self, user: &str) -> zbus::Result { + self.proxy.call("GetPendingStatus", &(user,)).await + } + + pub async fn clear_pending_flag(&self, user: &str) -> zbus::Result<()> { + self.proxy.call("ClearPendingFlag", &(user,)).await + } } #[allow(dead_code)] // wired through keys_page.rs in Task 4.