diff --git a/src/main.rs b/src/main.rs index 05be978..12674e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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!"), } } diff --git a/src/padfoot/connection.rs b/src/padfoot/connection.rs index 261a68d..852b7e4 100644 --- a/src/padfoot/connection.rs +++ b/src/padfoot/connection.rs @@ -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, tree::MethodErr> { + println!("Connection<{}>::get_interfaces()", self.id); Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented? } fn get_protocol(&self) -> Result { + println!("Connection<{}>::get_protocol()", self.id); Ok(super::PROTO_NAME.to_string()) } fn get_self_handle(&self) -> Result { + println!("Connection<{}>::get_self_handle()", self.id); Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented? } fn get_status(&self) -> Result { + println!("Connection<{}>::get_status()", self.id); Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented? } fn hold_handles(&self, handle_type: u32, handles: Vec) -> 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, ) -> Result, 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, 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) -> 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, 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, 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, tree::MethodErr> { + println!("Connection<{}>::interfaces()", self.id); Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented? } fn self_handle(&self) -> Result { + println!("Connection<{}>::self_handle()", self.id); Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented? } fn self_id(&self) -> Result { + println!("Connection<{}>::self_id()", self.id); Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented? } fn status(&self) -> Result { + println!("Connection<{}>::status()", self.id); Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented? } fn has_immortal_handles(&self) -> Result { + println!("Connection<{}>::has_immortal_handles()", self.id); Ok(true) } }