Skip to content

Commit

Permalink
client/dbus: Add path to public item API
Browse files Browse the repository at this point in the history
Delete signals only return a path. Therefore, getting the path from items stored by
the API user is the only way to check if they got deleted.
  • Loading branch information
sophie-h authored and bilelmoussaoui committed Jan 6, 2024
1 parent 5021c68 commit 34dd3c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/src/dbus/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::{collections::HashMap, sync::Arc, time::Duration};
use async_lock::RwLock;
#[cfg(feature = "tokio")]
use tokio::sync::RwLock;
use zbus::zvariant::ObjectPath;
use zeroize::Zeroizing;

use super::{api, Algorithm, Error};
Expand Down Expand Up @@ -195,4 +196,9 @@ impl<'a> Item<'a> {
Ok(())
}
}

/// Returns item path
pub fn path(&self) -> &ObjectPath<'_> {
self.inner.inner().path()
}
}

0 comments on commit 34dd3c2

Please sign in to comment.