More dictionary-based stuff
This commit is contained in:
parent
ec7ac55a60
commit
337b27e4a8
4 changed files with 60 additions and 36 deletions
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
pub mod connection;
|
||||
|
||||
use crate::settings::connection::Settings;
|
||||
use zbus::dbus_proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
|
|
@ -34,13 +33,19 @@ pub trait Settings {
|
|||
/// AddConnection method
|
||||
fn add_connection(
|
||||
&self,
|
||||
connection: &Settings,
|
||||
connection: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// AddConnection2 method
|
||||
fn add_connection2(
|
||||
&self,
|
||||
settings: &Settings,
|
||||
settings: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
flags: u32,
|
||||
args: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
) -> zbus::Result<(
|
||||
|
|
@ -51,7 +56,10 @@ pub trait Settings {
|
|||
/// AddConnectionUnsaved method
|
||||
fn add_connection_unsaved(
|
||||
&self,
|
||||
connection: &Settings,
|
||||
connection: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// GetConnectionByUuid method
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use crate::settings::connection::Settings;
|
||||
use zbus::dbus_proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
|
|
@ -46,24 +45,46 @@ pub trait ConnectionSettings {
|
|||
>;
|
||||
|
||||
/// GetSettings method
|
||||
fn get_settings(&self) -> zbus::Result<Settings>;
|
||||
fn get_settings(
|
||||
&self,
|
||||
) -> zbus::Result<
|
||||
std::collections::HashMap<
|
||||
String,
|
||||
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
|
||||
>,
|
||||
>;
|
||||
|
||||
/// Save method
|
||||
fn save(&self) -> zbus::Result<()>;
|
||||
|
||||
/// Update method
|
||||
fn update(&self, properties: &Settings) -> zbus::Result<()>;
|
||||
fn update(
|
||||
&self,
|
||||
properties: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
) -> zbus::Result<()>;
|
||||
|
||||
/// Update2 method
|
||||
fn update2(
|
||||
&self,
|
||||
settings: &Settings,
|
||||
settings: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
flags: u32,
|
||||
args: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
) -> zbus::Result<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>;
|
||||
|
||||
/// UpdateUnsaved method
|
||||
fn update_unsaved(&self, properties: &Settings) -> zbus::Result<()>;
|
||||
fn update_unsaved(
|
||||
&self,
|
||||
properties: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
) -> zbus::Result<()>;
|
||||
|
||||
/// Removed signal
|
||||
#[dbus_proxy(signal)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue