74 lines
1.8 KiB
Rust
74 lines
1.8 KiB
Rust
|
use crate::telepathy;
|
||
|
|
||
|
use dbus::tree::MethodErr;
|
||
|
|
||
|
use super::{Channel, Result};
|
||
|
|
||
|
impl AsRef<dyn telepathy::Channel + 'static> for std::rc::Rc<Channel> {
|
||
|
fn as_ref(&self) -> &(dyn telepathy::Channel + 'static) {
|
||
|
&**self
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl telepathy::Channel for Channel {
|
||
|
fn close(&self) -> Result<()> {
|
||
|
println!("Channel::close()");
|
||
|
Err(MethodErr::no_arg())
|
||
|
}
|
||
|
|
||
|
fn get_channel_type(&self) -> Result<String> {
|
||
|
self.channel_type()
|
||
|
}
|
||
|
|
||
|
fn get_handle(&self) -> Result<(u32, u32)> {
|
||
|
println!("Channel::get_handle()");
|
||
|
Err(MethodErr::no_arg())
|
||
|
}
|
||
|
|
||
|
fn get_interfaces(&self) -> Result<Vec<String>> {
|
||
|
println!("Channel::get_interfaces()");
|
||
|
Err(MethodErr::no_arg())
|
||
|
}
|
||
|
|
||
|
fn channel_type(&self) -> Result<String> {
|
||
|
println!("Channel::channel_type()");
|
||
|
|
||
|
Ok("org.freedesktop.Telepathy.Channel.Text".to_string())
|
||
|
}
|
||
|
|
||
|
fn interfaces(&self) -> Result<Vec<String>> {
|
||
|
println!("Channel::interfaces()");
|
||
|
Ok(super::channel_interfaces())
|
||
|
}
|
||
|
|
||
|
fn target_handle(&self) -> Result<u32> {
|
||
|
println!("Channel::target_handle()");
|
||
|
Err(MethodErr::no_arg())
|
||
|
}
|
||
|
|
||
|
fn target_id(&self) -> Result<String> {
|
||
|
println!("Channel::target_id()");
|
||
|
Err(MethodErr::no_arg())
|
||
|
}
|
||
|
|
||
|
fn target_handle_type(&self) -> Result<u32> {
|
||
|
println!("Channel::target_handle_type()");
|
||
|
Err(MethodErr::no_arg())
|
||
|
}
|
||
|
|
||
|
fn requested(&self) -> Result<bool> {
|
||
|
println!("Channel::requested()");
|
||
|
Err(MethodErr::no_arg())
|
||
|
}
|
||
|
|
||
|
fn initiator_handle(&self) -> Result<u32> {
|
||
|
println!("Channel::initiator_handle()");
|
||
|
Err(MethodErr::no_arg())
|
||
|
}
|
||
|
|
||
|
fn initiator_id(&self) -> Result<String> {
|
||
|
println!("Channel::initiator_id()");
|
||
|
Err(MethodErr::no_arg())
|
||
|
}
|
||
|
}
|