use crate::telepathy; use dbus::{arg, tree}; use std::collections::HashMap; #[derive(Debug)] pub struct ConnectionManager {} #[derive(Copy, Clone, Default, Debug)] pub struct CMData; impl dbus::tree::DataType for CMData { type Tree = (); type Property = (); type Interface = (); type Method = (); type Signal = (); type ObjectPath = std::sync::Arc; } const PROTO: &'static str = "delta"; impl telepathy::ConnectionManager for ConnectionManager { fn get_parameters( &self, protocol: &str, ) -> Result< Vec<( String, u32, String, arg::Variant>, )>, tree::MethodErr, > { Err(tree::MethodErr::no_arg()) } fn list_protocols(&self) -> Result, tree::MethodErr> { Ok(vec![PROTO.to_string()]) } fn request_connection( &self, protocol: &str, parameters: HashMap<&str, arg::Variant>>, ) -> Result<(String, dbus::Path<'static>), tree::MethodErr> { Err(tree::MethodErr::no_arg()) } fn protocols( &self, ) -> Result< HashMap>>>, tree::MethodErr, > { Err(tree::MethodErr::no_arg()) } fn interfaces(&self) -> Result, tree::MethodErr> { Err(tree::MethodErr::no_arg()) } }