use std::collections::HashMap; use zbus::{proxy, zvariant}; #[proxy( interface = "org.freedesktop.portal.Documents", default_service = "org.freedesktop.portal.Documents", default_path = "/org/freedesktop/portal/documents" )] pub trait Documents { /// Add method fn add( &self, o_path_fd: zvariant::Fd<'_>, reuse_existing: bool, persistent: bool, ) -> zbus::Result; /// AddFull method fn add_full( &self, o_path_fds: &[zvariant::Fd<'_>], flags: u32, app_id: &str, permissions: &[&str], ) -> zbus::Result<(Vec, HashMap)>; /// AddNamed method fn add_named( &self, o_path_parent_fd: zvariant::Fd<'_>, filename: &[u8], reuse_existing: bool, persistent: bool, ) -> zbus::Result; /// AddNamedFull method #[allow(clippy::too_many_arguments)] fn add_named_full( &self, o_path_fd: zvariant::Fd<'_>, filename: &[u8], flags: u32, app_id: &str, permissions: &[&str], ) -> zbus::Result<(String, HashMap)>; /// Delete method fn delete(&self, doc_id: &str) -> zbus::Result<()>; /// GetHostPaths method fn get_host_paths(&self, doc_ids: &[&str]) -> zbus::Result>>; /// GetMountPoint method fn get_mount_point(&self) -> zbus::Result>; /// GrantPermissions method fn grant_permissions( &self, doc_id: &str, app_id: &str, permissions: &[&str], ) -> zbus::Result<()>; /// Info method fn info(&self, doc_id: &str) -> zbus::Result<(Vec, HashMap>)>; /// List method fn list(&self, app_id: &str) -> zbus::Result>>; /// Lookup method fn lookup(&self, filename: &[u8]) -> zbus::Result; /// RevokePermissions method fn revoke_permissions( &self, doc_id: &str, app_id: &str, permissions: &[&str], ) -> zbus::Result<()>; /// version property #[zbus(property, name = "version")] fn version(&self) -> zbus::Result; }