Add some debugging output to connection
This commit is contained in:
@@ -88,7 +88,7 @@ fn run() -> Result<()> {
|
||||
for msg in msg_r.try_iter().take(10) {
|
||||
print!("Sending message...");
|
||||
match c.send(msg) {
|
||||
Err(e) => println!("error!"),
|
||||
Err(e) => println!("error! {:?}", e),
|
||||
_ => println!("OK!"),
|
||||
}
|
||||
}
|
||||
|
@@ -175,26 +175,35 @@ impl telepathy::Connection for Connection {
|
||||
}
|
||||
|
||||
fn disconnect(&self) -> Result<(), tree::MethodErr> {
|
||||
println!("Connection<{}>::disconnect()", self.id);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn get_interfaces(&self) -> Result<Vec<String>, tree::MethodErr> {
|
||||
println!("Connection<{}>::get_interfaces()", self.id);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn get_protocol(&self) -> Result<String, tree::MethodErr> {
|
||||
println!("Connection<{}>::get_protocol()", self.id);
|
||||
Ok(super::PROTO_NAME.to_string())
|
||||
}
|
||||
|
||||
fn get_self_handle(&self) -> Result<u32, tree::MethodErr> {
|
||||
println!("Connection<{}>::get_self_handle()", self.id);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn get_status(&self) -> Result<u32, tree::MethodErr> {
|
||||
println!("Connection<{}>::get_status()", self.id);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn hold_handles(&self, handle_type: u32, handles: Vec<u32>) -> Result<(), tree::MethodErr> {
|
||||
println!(
|
||||
"Connection<{}>::hold_handles({}, {:?})",
|
||||
self.id, handle_type, handles
|
||||
);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
@@ -203,16 +212,25 @@ impl telepathy::Connection for Connection {
|
||||
handle_type: u32,
|
||||
handles: Vec<u32>,
|
||||
) -> Result<Vec<String>, tree::MethodErr> {
|
||||
println!(
|
||||
"Connection<{}>::inspect_handles({}, {:?})",
|
||||
self.id, handle_type, handles
|
||||
);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn list_channels(
|
||||
&self,
|
||||
) -> Result<Vec<(dbus::Path<'static>, String, u32, u32)>, tree::MethodErr> {
|
||||
println!("Connection<{}>::list_channels()", self.id);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn release_handles(&self, handle_type: u32, handles: Vec<u32>) -> Result<(), tree::MethodErr> {
|
||||
println!(
|
||||
"Connection<{}>::release_handles({}, {:?})",
|
||||
self.id, handle_type, handles
|
||||
);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
@@ -223,6 +241,10 @@ impl telepathy::Connection for Connection {
|
||||
handle: u32,
|
||||
suppress_handler: bool,
|
||||
) -> Result<dbus::Path<'static>, tree::MethodErr> {
|
||||
println!(
|
||||
"Connection<{}>::request_channel({}, {}, {}, {})",
|
||||
self.id, type_, handle_type, handle, suppress_handler
|
||||
);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
@@ -231,34 +253,48 @@ impl telepathy::Connection for Connection {
|
||||
handle_type: u32,
|
||||
identifiers: Vec<&str>,
|
||||
) -> Result<Vec<u32>, tree::MethodErr> {
|
||||
println!(
|
||||
"Connection<{}>::request_handles({}, {:?})",
|
||||
self.id, handle_type, identifiers
|
||||
);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn add_client_interest(&self, tokens: Vec<&str>) -> Result<(), tree::MethodErr> {
|
||||
println!("Connection<{}>::add_client_interest({:?})", self.id, tokens);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn remove_client_interest(&self, tokens: Vec<&str>) -> Result<(), tree::MethodErr> {
|
||||
println!(
|
||||
"Connection<{}>::remove_client_interest({:?})",
|
||||
self.id, tokens
|
||||
);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn interfaces(&self) -> Result<Vec<String>, tree::MethodErr> {
|
||||
println!("Connection<{}>::interfaces()", self.id);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn self_handle(&self) -> Result<u32, tree::MethodErr> {
|
||||
println!("Connection<{}>::self_handle()", self.id);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn self_id(&self) -> Result<String, tree::MethodErr> {
|
||||
println!("Connection<{}>::self_id()", self.id);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn status(&self) -> Result<u32, tree::MethodErr> {
|
||||
println!("Connection<{}>::status()", self.id);
|
||||
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented?
|
||||
}
|
||||
|
||||
fn has_immortal_handles(&self) -> Result<bool, tree::MethodErr> {
|
||||
println!("Connection<{}>::has_immortal_handles()", self.id);
|
||||
Ok(true)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user