Displays the protocol in empathy
This commit is contained in:
@@ -37,6 +37,8 @@ const FLAG_SECRET: u32 = 8;
|
||||
|
||||
impl telepathy::ConnectionManager for ConnectionManager {
|
||||
fn get_parameters(&self, protocol: &str) -> Result<Vec<ParamSpec>, tree::MethodErr> {
|
||||
println!("CM::get_parameters({})", protocol);
|
||||
|
||||
if protocol != PROTO {
|
||||
return Err(tree::MethodErr::no_arg()); // FIXME: should be NotImplemented?
|
||||
}
|
||||
@@ -59,21 +61,27 @@ impl telepathy::ConnectionManager for ConnectionManager {
|
||||
}
|
||||
|
||||
fn list_protocols(&self) -> Result<Vec<String>, tree::MethodErr> {
|
||||
println!("CM::list_protocols()");
|
||||
|
||||
Ok(vec![PROTO.to_string()])
|
||||
}
|
||||
|
||||
fn request_connection(
|
||||
&self,
|
||||
_protocol: &str,
|
||||
_parameters: HashMap<&str, arg::Variant<Box<dyn arg::RefArg>>>,
|
||||
protocol: &str,
|
||||
parameters: HashMap<&str, arg::Variant<Box<dyn arg::RefArg>>>,
|
||||
) -> Result<(String, dbus::Path<'static>), tree::MethodErr> {
|
||||
println!("CM::request_connection({}, {:?})", protocol, parameters);
|
||||
|
||||
Err(tree::MethodErr::no_arg())
|
||||
}
|
||||
|
||||
fn protocols(&self) -> Result<HashMap<String, Dict>, tree::MethodErr> {
|
||||
println!("CM::protocols()");
|
||||
|
||||
// If this map is empty or missing, clients SHOULD fall back to
|
||||
// calling ListProtocol and GetParameters
|
||||
Ok(HashMap::new())
|
||||
// calling ListProtocols and GetParameters
|
||||
Err(tree::MethodErr::no_arg())
|
||||
}
|
||||
|
||||
fn interfaces(&self) -> Result<Vec<String>, tree::MethodErr> {
|
||||
|
Reference in New Issue
Block a user