Compare commits

..

4 Commits

Author SHA1 Message Date
460d971bb6 Stub the ConnectionManager interface 2020-05-09 00:43:36 +01:00
fd0d8ec8f7 Couple of README tweaks 2020-05-08 20:50:53 +01:00
133e13bfed Add MIT license 2020-05-08 20:41:45 +01:00
3d44ce6b3d Initial checkin
This commit contains autogenerated telepathy DBUS code and the output
of `cargo new telepathy-delta`. It's pretty chill.
2020-05-08 20:38:30 +01:00
4 changed files with 11 additions and 14 deletions

2
Cargo.lock generated
View File

@@ -38,7 +38,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"
[[package]] [[package]]
name = "telepathy-padfoot" name = "telepathy-delta"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",

View File

@@ -1,7 +1,7 @@
[package] [package]
name = "telepathy-padfoot" name = "telepathy-delta"
version = "0.1.0" version = "0.1.0"
authors = ["Nick Thomas <me@ur.gs>"] authors = ["Nick Thomas <nick@gitlab.com>"]
edition = "2018" edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@@ -19,8 +19,6 @@ impl dbus::tree::DataType for CMData {
const PROTO: &'static str = "delta"; const PROTO: &'static str = "delta";
pub type Dict = HashMap<String, arg::Variant<Box<dyn arg::RefArg + 'static>>>;
impl telepathy::ConnectionManager for ConnectionManager { impl telepathy::ConnectionManager for ConnectionManager {
fn get_parameters( fn get_parameters(
&self, &self,
@@ -34,7 +32,7 @@ impl telepathy::ConnectionManager for ConnectionManager {
)>, )>,
tree::MethodErr, tree::MethodErr,
> { > {
Err(tree::MethodErr::no_arg()) // FIXME: should be NotImplemented Err(tree::MethodErr::no_arg())
} }
fn list_protocols(&self) -> Result<Vec<String>, tree::MethodErr> { fn list_protocols(&self) -> Result<Vec<String>, tree::MethodErr> {
@@ -49,13 +47,13 @@ impl telepathy::ConnectionManager for ConnectionManager {
Err(tree::MethodErr::no_arg()) Err(tree::MethodErr::no_arg())
} }
fn protocols(&self) -> Result<HashMap<String, Dict>, tree::MethodErr> { fn protocols(
let mut hm = HashMap::new(); &self,
let mut props = Dict::new(); ) -> Result<
HashMap<String, HashMap<String, arg::Variant<Box<dyn arg::RefArg + 'static>>>>,
hm.insert(PROTO.to_string(), props); tree::MethodErr,
> {
Ok(hm) Err(tree::MethodErr::no_arg())
} }
fn interfaces(&self) -> Result<Vec<String>, tree::MethodErr> { fn interfaces(&self) -> Result<Vec<String>, tree::MethodErr> {

View File

@@ -1,2 +1 @@
pub struct Protocol {} pub struct Protocol {}