Files
telepathy-padfoot/src/delta/connection_manager.rs

63 lines
1.5 KiB
Rust

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<ConnectionManager>;
}
const PROTO: &'static str = "delta";
impl telepathy::ConnectionManager for ConnectionManager {
fn get_parameters(
&self,
protocol: &str,
) -> Result<
Vec<(
String,
u32,
String,
arg::Variant<Box<dyn arg::RefArg + 'static>>,
)>,
tree::MethodErr,
> {
Err(tree::MethodErr::no_arg())
}
fn list_protocols(&self) -> Result<Vec<String>, tree::MethodErr> {
Ok(vec![PROTO.to_string()])
}
fn request_connection(
&self,
protocol: &str,
parameters: HashMap<&str, arg::Variant<Box<dyn arg::RefArg>>>,
) -> Result<(String, dbus::Path<'static>), tree::MethodErr> {
Err(tree::MethodErr::no_arg())
}
fn protocols(
&self,
) -> Result<
HashMap<String, HashMap<String, arg::Variant<Box<dyn arg::RefArg + 'static>>>>,
tree::MethodErr,
> {
Err(tree::MethodErr::no_arg())
}
fn interfaces(&self) -> Result<Vec<String>, tree::MethodErr> {
Err(tree::MethodErr::no_arg())
}
}