feat: zbus 4.2.1 update
This commit is contained in:
parent
ce9c789fe6
commit
f05789c4ce
42 changed files with 390 additions and 389 deletions
|
|
@ -28,7 +28,7 @@ pub struct Device<'a>(DeviceProxy<'a>);
|
|||
impl<'a> Device<'a> {
|
||||
pub async fn active_connection(&self) -> Result<ActiveConnection<'a>> {
|
||||
let active_connection = self.0.active_connection().await?;
|
||||
Ok(ActiveConnectionProxy::builder(self.0.connection())
|
||||
Ok(ActiveConnectionProxy::builder(self.0.inner().connection())
|
||||
.path(active_connection)?
|
||||
.build()
|
||||
.await?
|
||||
|
|
@ -39,7 +39,7 @@ impl<'a> Device<'a> {
|
|||
let available_connections = self.0.available_connections().await?;
|
||||
let mut out = Vec::with_capacity(available_connections.len());
|
||||
for connection in available_connections {
|
||||
let connection = ActiveConnectionProxy::builder(self.0.connection())
|
||||
let connection = ActiveConnectionProxy::builder(self.0.inner().connection())
|
||||
.path(connection)?
|
||||
.build()
|
||||
.await?;
|
||||
|
|
@ -62,36 +62,36 @@ impl<'a> Device<'a> {
|
|||
pub async fn downcast_to_device(&'a self) -> Result<Option<SpecificDevice<'a>>> {
|
||||
match self.device_type().await? {
|
||||
DeviceType::Bluetooth => Ok(Some(SpecificDevice::Bluetooth(
|
||||
BluetoothDeviceProxy::builder(self.0.connection())
|
||||
.path(self.0.path())?
|
||||
BluetoothDeviceProxy::builder(self.0.inner().connection())
|
||||
.path(self.0.inner().path())?
|
||||
.build()
|
||||
.await?
|
||||
.into(),
|
||||
))),
|
||||
DeviceType::Ethernet => Ok(Some(SpecificDevice::Wired(
|
||||
WiredDeviceProxy::builder(self.0.connection())
|
||||
.path(self.0.path())?
|
||||
WiredDeviceProxy::builder(self.0.inner().connection())
|
||||
.path(self.0.inner().path())?
|
||||
.build()
|
||||
.await?
|
||||
.into(),
|
||||
))),
|
||||
DeviceType::Wifi => Ok(Some(SpecificDevice::Wireless(
|
||||
WirelessDeviceProxy::builder(self.0.connection())
|
||||
.path(self.0.path())?
|
||||
WirelessDeviceProxy::builder(self.0.inner().connection())
|
||||
.path(self.0.inner().path())?
|
||||
.build()
|
||||
.await?
|
||||
.into(),
|
||||
))),
|
||||
DeviceType::TunTap => Ok(Some(SpecificDevice::TunTap(
|
||||
TunDeviceProxy::builder(self.0.connection())
|
||||
.path(self.0.path())?
|
||||
TunDeviceProxy::builder(self.0.inner().connection())
|
||||
.path(self.0.inner().path())?
|
||||
.build()
|
||||
.await?
|
||||
.into(),
|
||||
))),
|
||||
DeviceType::WireGuard => Ok(Some(SpecificDevice::WireGuard(
|
||||
WireGuardDeviceProxy::builder(self.0.connection())
|
||||
.path(self.0.path())?
|
||||
WireGuardDeviceProxy::builder(self.0.inner().connection())
|
||||
.path(self.0.inner().path())?
|
||||
.build()
|
||||
.await?
|
||||
.into(),
|
||||
|
|
@ -105,7 +105,7 @@ impl<'a> Device<'a> {
|
|||
}
|
||||
|
||||
pub async fn ip4_config(&self) -> Result<Ipv4Config<'a>> {
|
||||
let config = Ipv4ConfigProxy::builder(self.0.connection())
|
||||
let config = Ipv4ConfigProxy::builder(self.0.inner().connection())
|
||||
.path(self.0.ip4_config().await?)?
|
||||
.build()
|
||||
.await?;
|
||||
|
|
@ -113,7 +113,7 @@ impl<'a> Device<'a> {
|
|||
}
|
||||
|
||||
pub async fn ip6_config(&self) -> Result<Ipv6Config<'a>> {
|
||||
let config = Ipv6ConfigProxy::builder(self.0.connection())
|
||||
let config = Ipv6ConfigProxy::builder(self.0.inner().connection())
|
||||
.path(self.0.ip6_config().await?)?
|
||||
.build()
|
||||
.await?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue