1use std::collections::HashMap;
4use zbus::proxy;
5use zbus::zvariant::{OwnedObjectPath, OwnedValue};
6
7pub type PropertyMap = HashMap<String, OwnedValue>;
9
10pub type InterfaceMap = HashMap<String, PropertyMap>;
12
13pub type ManagedObjectsMap = HashMap<OwnedObjectPath, InterfaceMap>;
15
16#[proxy(
18 default_service = "org.gnome.OnlineAccounts",
19 default_path = "/org/gnome/OnlineAccounts",
20 interface = "org.freedesktop.DBus.ObjectManager"
21)]
22pub trait ObjectManager {
23 fn get_managed_objects(&self) -> zbus::Result<ManagedObjectsMap>;
25}
26
27#[proxy(
29 default_service = "org.gnome.OnlineAccounts",
30 interface = "org.gnome.OnlineAccounts.Account"
31)]
32pub trait Account {
33 #[zbus(property)]
35 fn id(&self) -> zbus::Result<String>;
36
37 #[zbus(property)]
39 fn identity(&self) -> zbus::Result<String>;
40
41 #[zbus(property)]
43 fn presentation_identity(&self) -> zbus::Result<String>;
44
45 #[zbus(property)]
47 fn provider_type(&self) -> zbus::Result<String>;
48}
49
50#[proxy(
52 default_service = "org.gnome.OnlineAccounts",
53 interface = "org.gnome.OnlineAccounts.Files"
54)]
55pub trait Files {
56 #[zbus(property)]
58 fn uri(&self) -> zbus::Result<String>;
59}
60
61#[proxy(
63 default_service = "org.gnome.OnlineAccounts",
64 interface = "org.gnome.OnlineAccounts.PasswordBased"
65)]
66pub trait PasswordBased {
67 fn get_password(&self, id: &str) -> zbus::Result<String>;
69}