-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
And implement zbus::Error and oo7::portal::Error for Error Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
- Loading branch information
1 parent
467f354
commit f00cc41
Showing
6 changed files
with
41 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
// org.freedesktop.Secret.Item | ||
|
||
use oo7::dbus::api::SecretInner; | ||
use oo7::dbus::{api::SecretInner, ServiceError}; | ||
use zbus::zvariant::ObjectPath; | ||
|
||
use super::Result; | ||
|
||
#[derive(Debug)] | ||
pub struct Item {} | ||
|
||
#[zbus::interface(name = "org.freedesktop.Secret.Item")] | ||
impl Item { | ||
#[zbus(out_args("prompt"))] | ||
pub async fn delete(&self) -> Result<ObjectPath> { | ||
pub async fn delete(&self) -> Result<ObjectPath, ServiceError> { | ||
todo!() | ||
} | ||
|
||
#[zbus(out_args("secret"))] | ||
pub async fn get_secret(&self, _session: ObjectPath<'_>) -> Result<SecretInner> { | ||
pub async fn get_secret(&self, _session: ObjectPath<'_>) -> Result<SecretInner, ServiceError> { | ||
todo!() | ||
} | ||
|
||
pub async fn set_secret(&self, _secret: SecretInner) -> Result<()> { | ||
pub async fn set_secret(&self, _secret: SecretInner) -> Result<(), ServiceError> { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
// org.freedesktop.Secret.Prompt | ||
|
||
use oo7::dbus::ServiceError; | ||
use zbus::interface; | ||
|
||
use super::Result; | ||
|
||
#[derive(Debug)] | ||
pub struct Prompt {} | ||
|
||
#[interface(name = "org.freedesktop.Secret.Prompt")] | ||
impl Prompt { | ||
pub async fn prompt(&self, _window_id: &str) -> Result<()> { | ||
pub async fn prompt(&self, _window_id: &str) -> Result<(), ServiceError> { | ||
todo!() | ||
} | ||
|
||
pub async fn dismiss(&self) -> Result<()> { | ||
pub async fn dismiss(&self) -> Result<(), ServiceError> { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters