This commit contains autogenerated telepathy DBUS code and the output of `cargo new telepathy-delta`. It's pretty chill.
40 lines
1.4 KiB
Rust
40 lines
1.4 KiB
Rust
// This code was autogenerated with `dbus-codegen-rust --file telepathy-spec/spec/Channel_Interface_Credentials_Storage.xml -i org.freedesktop.Telepathy -o src/telepathy/channel_interface_credentials_storage.rs`, see https://github.com/diwic/dbus-rs
|
|
use dbus;
|
|
use dbus::arg;
|
|
use dbus::tree;
|
|
|
|
pub trait ChannelInterfaceCredentialsStorageDRAFT {
|
|
fn store_credentials(&self, store: bool) -> Result<(), tree::MethodErr>;
|
|
}
|
|
|
|
pub fn channel_interface_credentials_storage_draft_server<F, T, D>(
|
|
factory: &tree::Factory<tree::MTFn<D>, D>,
|
|
data: D::Interface,
|
|
f: F,
|
|
) -> tree::Interface<tree::MTFn<D>, D>
|
|
where
|
|
D: tree::DataType,
|
|
D::Method: Default,
|
|
T: ChannelInterfaceCredentialsStorageDRAFT,
|
|
F: 'static + for<'z> Fn(&'z tree::MethodInfo<tree::MTFn<D>, D>) -> &'z T,
|
|
{
|
|
let i = factory.interface(
|
|
"org.freedesktop.Telepathy.Channel.Interface.CredentialsStorage.DRAFT",
|
|
data,
|
|
);
|
|
let f = ::std::sync::Arc::new(f);
|
|
let fclone = f.clone();
|
|
let h = move |minfo: &tree::MethodInfo<tree::MTFn<D>, D>| {
|
|
let mut i = minfo.msg.iter_init();
|
|
let store: bool = i.read()?;
|
|
let d = fclone(minfo);
|
|
d.store_credentials(store)?;
|
|
let rm = minfo.msg.method_return();
|
|
Ok(vec![rm])
|
|
};
|
|
let m = factory.method("StoreCredentials", Default::default(), h);
|
|
let m = m.in_arg(("Store", "b"));
|
|
let i = i.add_m(m);
|
|
i
|
|
}
|