321 lines
9.6 KiB
Rust
321 lines
9.6 KiB
Rust
//! DBus interface proxies for:
|
|
//!
|
|
//! - `org.freedesktop.ModemManager1.Modem`,
|
|
//! - `org.freedesktop.ModemManager1.Modem.Messaging`,
|
|
//! - `org.freedesktop.ModemManager1.Modem.Simple`,
|
|
//! - `org.freedesktop.ModemManager1.Modem.Voice`
|
|
//!
|
|
//! This code was generated by `zbus-xmlgen` `3.1.1` from DBus introspection data.
|
|
//! Source: `ModemManager1.xml`.
|
|
|
|
use zbus::dbus_proxy;
|
|
|
|
#[dbus_proxy(
|
|
interface = "org.freedesktop.ModemManager1.Modem.Messaging",
|
|
default_service = "org.freedesktop.ModemManager1",
|
|
assume_defaults = true
|
|
)]
|
|
trait Messaging {
|
|
/// Create method
|
|
fn create(
|
|
&self,
|
|
properties: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
|
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
|
|
|
/// Delete method
|
|
fn delete(&self, path: &zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
|
|
|
/// List method
|
|
fn list(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
|
|
|
/// Added signal
|
|
#[dbus_proxy(signal)]
|
|
fn added(&self, path: zbus::zvariant::ObjectPath<'_>, received: bool) -> zbus::Result<()>;
|
|
|
|
/// Deleted signal
|
|
#[dbus_proxy(signal)]
|
|
fn deleted(&self, path: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
|
|
|
/// DefaultStorage property
|
|
#[dbus_proxy(property)]
|
|
fn default_storage(&self) -> zbus::Result<u32>;
|
|
|
|
/// Messages property
|
|
#[dbus_proxy(property)]
|
|
fn messages(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
|
|
|
/// SupportedStorages property
|
|
#[dbus_proxy(property)]
|
|
fn supported_storages(&self) -> zbus::Result<Vec<u32>>;
|
|
}
|
|
|
|
#[dbus_proxy(
|
|
interface = "org.freedesktop.ModemManager1.Modem",
|
|
default_service = "org.freedesktop.ModemManager1",
|
|
assume_defaults = true
|
|
)]
|
|
trait Modem {
|
|
/// Command method
|
|
fn command(&self, cmd: &str, timeout: u32) -> zbus::Result<String>;
|
|
|
|
/// CreateBearer method
|
|
fn create_bearer(
|
|
&self,
|
|
properties: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
|
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
|
|
|
/// DeleteBearer method
|
|
fn delete_bearer(&self, bearer: &zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
|
|
|
/// Enable method
|
|
fn enable(&self, enable: bool) -> zbus::Result<()>;
|
|
|
|
/// FactoryReset method
|
|
fn factory_reset(&self, code: &str) -> zbus::Result<()>;
|
|
|
|
/// GetCellInfo method
|
|
fn get_cell_info(
|
|
&self,
|
|
) -> zbus::Result<Vec<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>>;
|
|
|
|
/// ListBearers method
|
|
fn list_bearers(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
|
|
|
/// Reset method
|
|
fn reset(&self) -> zbus::Result<()>;
|
|
|
|
/// SetCurrentBands method
|
|
fn set_current_bands(&self, bands: &[u32]) -> zbus::Result<()>;
|
|
|
|
/// SetCurrentCapabilities method
|
|
fn set_current_capabilities(&self, capabilities: u32) -> zbus::Result<()>;
|
|
|
|
/// SetCurrentModes method
|
|
fn set_current_modes(&self, modes: &(u32, u32)) -> zbus::Result<()>;
|
|
|
|
/// SetPowerState method
|
|
fn set_power_state(&self, state: u32) -> zbus::Result<()>;
|
|
|
|
/// SetPrimarySimSlot method
|
|
fn set_primary_sim_slot(&self, sim_slot: u32) -> zbus::Result<()>;
|
|
|
|
// TODO: This fails to compile: duplicate definitions for `receive_state_changed`
|
|
// /// StateChanged signal
|
|
// #[dbus_proxy(signal)]
|
|
// fn state_changed(&self, old: i32, new: i32, reason: u32) -> zbus::Result<()>;
|
|
|
|
/// AccessTechnologies property
|
|
#[dbus_proxy(property)]
|
|
fn access_technologies(&self) -> zbus::Result<u32>;
|
|
|
|
/// Bearers property
|
|
#[dbus_proxy(property)]
|
|
fn bearers(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
|
|
|
/// CarrierConfiguration property
|
|
#[dbus_proxy(property)]
|
|
fn carrier_configuration(&self) -> zbus::Result<String>;
|
|
|
|
/// CarrierConfigurationRevision property
|
|
#[dbus_proxy(property)]
|
|
fn carrier_configuration_revision(&self) -> zbus::Result<String>;
|
|
|
|
/// CurrentBands property
|
|
#[dbus_proxy(property)]
|
|
fn current_bands(&self) -> zbus::Result<Vec<u32>>;
|
|
|
|
/// CurrentCapabilities property
|
|
#[dbus_proxy(property)]
|
|
fn current_capabilities(&self) -> zbus::Result<u32>;
|
|
|
|
/// CurrentModes property
|
|
#[dbus_proxy(property)]
|
|
fn current_modes(&self) -> zbus::Result<(u32, u32)>;
|
|
|
|
/// Device property
|
|
#[dbus_proxy(property)]
|
|
fn device(&self) -> zbus::Result<String>;
|
|
|
|
/// DeviceIdentifier property
|
|
#[dbus_proxy(property)]
|
|
fn device_identifier(&self) -> zbus::Result<String>;
|
|
|
|
/// Drivers property
|
|
#[dbus_proxy(property)]
|
|
fn drivers(&self) -> zbus::Result<Vec<String>>;
|
|
|
|
/// EquipmentIdentifier property
|
|
#[dbus_proxy(property)]
|
|
fn equipment_identifier(&self) -> zbus::Result<String>;
|
|
|
|
/// HardwareRevision property
|
|
#[dbus_proxy(property)]
|
|
fn hardware_revision(&self) -> zbus::Result<String>;
|
|
|
|
/// Manufacturer property
|
|
#[dbus_proxy(property)]
|
|
fn manufacturer(&self) -> zbus::Result<String>;
|
|
|
|
/// MaxActiveBearers property
|
|
#[dbus_proxy(property)]
|
|
fn max_active_bearers(&self) -> zbus::Result<u32>;
|
|
|
|
/// MaxActiveMultiplexedBearers property
|
|
#[dbus_proxy(property)]
|
|
fn max_active_multiplexed_bearers(&self) -> zbus::Result<u32>;
|
|
|
|
/// MaxBearers property
|
|
#[dbus_proxy(property)]
|
|
fn max_bearers(&self) -> zbus::Result<u32>;
|
|
|
|
/// Model property
|
|
#[dbus_proxy(property)]
|
|
fn model(&self) -> zbus::Result<String>;
|
|
|
|
/// OwnNumbers property
|
|
#[dbus_proxy(property)]
|
|
fn own_numbers(&self) -> zbus::Result<Vec<String>>;
|
|
|
|
/// Plugin property
|
|
#[dbus_proxy(property)]
|
|
fn plugin(&self) -> zbus::Result<String>;
|
|
|
|
/// Ports property
|
|
#[dbus_proxy(property)]
|
|
fn ports(&self) -> zbus::Result<Vec<(String, u32)>>;
|
|
|
|
/// PowerState property
|
|
#[dbus_proxy(property)]
|
|
fn power_state(&self) -> zbus::Result<u32>;
|
|
|
|
/// PrimaryPort property
|
|
#[dbus_proxy(property)]
|
|
fn primary_port(&self) -> zbus::Result<String>;
|
|
|
|
/// PrimarySimSlot property
|
|
#[dbus_proxy(property)]
|
|
fn primary_sim_slot(&self) -> zbus::Result<u32>;
|
|
|
|
/// Revision property
|
|
#[dbus_proxy(property)]
|
|
fn revision(&self) -> zbus::Result<String>;
|
|
|
|
/// SignalQuality property
|
|
#[dbus_proxy(property)]
|
|
fn signal_quality(&self) -> zbus::Result<(u32, bool)>;
|
|
|
|
/// Sim property
|
|
#[dbus_proxy(property)]
|
|
fn sim(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
|
|
|
/// SimSlots property
|
|
#[dbus_proxy(property)]
|
|
fn sim_slots(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
|
|
|
/// State property
|
|
#[dbus_proxy(property)]
|
|
fn state(&self) -> zbus::Result<i32>;
|
|
|
|
/// StateFailedReason property
|
|
#[dbus_proxy(property)]
|
|
fn state_failed_reason(&self) -> zbus::Result<u32>;
|
|
|
|
/// SupportedBands property
|
|
#[dbus_proxy(property)]
|
|
fn supported_bands(&self) -> zbus::Result<Vec<u32>>;
|
|
|
|
/// SupportedCapabilities property
|
|
#[dbus_proxy(property)]
|
|
fn supported_capabilities(&self) -> zbus::Result<Vec<u32>>;
|
|
|
|
/// SupportedIpFamilies property
|
|
#[dbus_proxy(property)]
|
|
fn supported_ip_families(&self) -> zbus::Result<u32>;
|
|
|
|
/// SupportedModes property
|
|
#[dbus_proxy(property)]
|
|
fn supported_modes(&self) -> zbus::Result<Vec<(u32, u32)>>;
|
|
|
|
/// UnlockRequired property
|
|
#[dbus_proxy(property)]
|
|
fn unlock_required(&self) -> zbus::Result<u32>;
|
|
|
|
/// UnlockRetries property
|
|
#[dbus_proxy(property)]
|
|
fn unlock_retries(&self) -> zbus::Result<std::collections::HashMap<u32, u32>>;
|
|
}
|
|
|
|
#[dbus_proxy(
|
|
interface = "org.freedesktop.ModemManager1.Modem.Simple",
|
|
default_service = "org.freedesktop.ModemManager1",
|
|
assume_defaults = true
|
|
)]
|
|
trait Simple {
|
|
/// Connect method
|
|
fn connect(
|
|
&self,
|
|
properties: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
|
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
|
|
|
/// Disconnect method
|
|
fn disconnect(&self, bearer: &zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
|
|
|
/// GetStatus method
|
|
fn get_status(
|
|
&self,
|
|
) -> zbus::Result<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>;
|
|
}
|
|
|
|
#[dbus_proxy(
|
|
interface = "org.freedesktop.ModemManager1.Modem.Voice",
|
|
default_service = "org.freedesktop.ModemManager1",
|
|
assume_defaults = true
|
|
)]
|
|
trait Voice {
|
|
/// CallWaitingQuery method
|
|
fn call_waiting_query(&self) -> zbus::Result<bool>;
|
|
|
|
/// CallWaitingSetup method
|
|
fn call_waiting_setup(&self, enable: bool) -> zbus::Result<()>;
|
|
|
|
/// CreateCall method
|
|
fn create_call(
|
|
&self,
|
|
properties: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
|
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
|
|
|
/// DeleteCall method
|
|
fn delete_call(&self, path: &zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
|
|
|
/// HangupAll method
|
|
fn hangup_all(&self) -> zbus::Result<()>;
|
|
|
|
/// HangupAndAccept method
|
|
fn hangup_and_accept(&self) -> zbus::Result<()>;
|
|
|
|
/// HoldAndAccept method
|
|
fn hold_and_accept(&self) -> zbus::Result<()>;
|
|
|
|
/// ListCalls method
|
|
fn list_calls(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
|
|
|
/// Transfer method
|
|
fn transfer(&self) -> zbus::Result<()>;
|
|
|
|
/// CallAdded signal
|
|
#[dbus_proxy(signal)]
|
|
fn call_added(&self, path: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
|
|
|
/// CallDeleted signal
|
|
#[dbus_proxy(signal)]
|
|
fn call_deleted(&self, path: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
|
|
|
/// Calls property
|
|
#[dbus_proxy(property)]
|
|
fn calls(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
|
|
|
/// EmergencyOnly property
|
|
#[dbus_proxy(property)]
|
|
fn emergency_only(&self) -> zbus::Result<bool>;
|
|
}
|