Wire up the additional channel interfaces a bit
This commit is contained in:
@@ -32,26 +32,31 @@ impl telepathy::ChannelInterfaceMessages for Channel {
|
|||||||
|
|
||||||
fn supported_content_types(&self) -> Result<Vec<String>> {
|
fn supported_content_types(&self) -> Result<Vec<String>> {
|
||||||
println!("Channel::supported_content_types()");
|
println!("Channel::supported_content_types()");
|
||||||
Err(MethodErr::no_arg())
|
|
||||||
|
Ok(vec!["text/plain".to_string()]) // TODO: image support
|
||||||
}
|
}
|
||||||
|
|
||||||
fn message_types(&self) -> Result<Vec<u32>> {
|
fn message_types(&self) -> Result<Vec<u32>> {
|
||||||
println!("Channel::message_types()");
|
println!("Channel::message_types()");
|
||||||
Err(MethodErr::no_arg())
|
|
||||||
|
Ok(vec![0]) // Normal messages. FIXME: MDNs too
|
||||||
}
|
}
|
||||||
|
|
||||||
fn message_part_support_flags(&self) -> Result<u32> {
|
fn message_part_support_flags(&self) -> Result<u32> {
|
||||||
println!("Channel::message_part_support_flags()");
|
println!("Channel::message_part_support_flags()");
|
||||||
Err(MethodErr::no_arg())
|
|
||||||
|
Ok(0) // FIXME: support multipart messages
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pending_messages(&self) -> Result<Vec<Vec<HashMap<String, VarArg>>>> {
|
fn pending_messages(&self) -> Result<Vec<Vec<HashMap<String, VarArg>>>> {
|
||||||
println!("Channel::pending_messages()");
|
println!("Channel::pending_messages()");
|
||||||
Err(MethodErr::no_arg())
|
|
||||||
|
Ok(vec![]) // FIXME: check for pending messages
|
||||||
}
|
}
|
||||||
|
|
||||||
fn delivery_reporting_support(&self) -> Result<u32> {
|
fn delivery_reporting_support(&self) -> Result<u32> {
|
||||||
println!("Channel::delivery_reporting_support()");
|
println!("Channel::delivery_reporting_support()");
|
||||||
Err(MethodErr::no_arg())
|
|
||||||
|
Ok(0) // FIXME: MDNs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
use crate::telepathy;
|
use crate::telepathy;
|
||||||
|
use crate::telepathy::ChannelInterfaceMessages;
|
||||||
use dbus::tree::MethodErr;
|
use dbus::tree::MethodErr;
|
||||||
|
|
||||||
use super::{Channel, Result};
|
use super::{Channel, Result};
|
||||||
@@ -28,7 +29,8 @@ impl telepathy::ChannelTypeText for Channel {
|
|||||||
|
|
||||||
fn get_message_types(&self) -> Result<Vec<u32>> {
|
fn get_message_types(&self) -> Result<Vec<u32>> {
|
||||||
println!("Channel::get_message_types()");
|
println!("Channel::get_message_types()");
|
||||||
Err(MethodErr::no_arg())
|
|
||||||
|
self.message_types()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn list_pending_messages(&self, clear: bool) -> Result<Vec<PendingMessagesSpec>> {
|
fn list_pending_messages(&self, clear: bool) -> Result<Vec<PendingMessagesSpec>> {
|
||||||
|
Reference in New Issue
Block a user