Skip to content

Commit

Permalink
Merge pull request #1007 from zeenix/fdo-automate-proxy-gen
Browse files Browse the repository at this point in the history
🔥 zb: `interface` generates `fdo` proxies + make `fdo` mod a hierarchy
  • Loading branch information
zeenix committed Sep 18, 2024
2 parents 480f47d + 469c7af commit 8b7b8c9
Show file tree
Hide file tree
Showing 15 changed files with 1,130 additions and 1,205 deletions.
48 changes: 13 additions & 35 deletions zbus/src/blocking/fdo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,18 @@
//!
//! Provides blocking versions of the proxy types in [`zbus::fdo`] module.

use enumflags2::BitFlags;
use static_assertions::assert_impl_all;
use std::collections::HashMap;
use zbus_names::{
BusName, InterfaceName, OwnedBusName, OwnedInterfaceName, OwnedUniqueName, UniqueName,
WellKnownName,
};
use zvariant::{ObjectPath, Optional, OwnedValue, Value};

use crate::{
fdo::{
ConnectionCredentials, ManagedObjects, ReleaseNameReply, RequestNameFlags,
RequestNameReply, Result,
pub use crate::fdo::{
dbus::{
DBusProxyBlocking as DBusProxy, NameAcquiredIterator, NameLostIterator,
NameOwnerChangedIterator,
},
introspectable::IntrospectableProxyBlocking as IntrospectableProxy,
monitoring::MonitoringProxyBlocking as MonitoringProxy,
object_manager::{
InterfacesAddedIterator, InterfacesRemovedIterator,
ObjectManagerProxyBlocking as ObjectManagerProxy,
},
proxy, OwnedGuid,
peer::PeerProxyBlocking as PeerProxy,
properties::{PropertiesChangedIterator, PropertiesProxyBlocking as PropertiesProxy},
stats::StatsProxyBlocking as StatsProxy,
};

gen_introspectable_proxy!(false, true);
assert_impl_all!(IntrospectableProxy<'_>: Send, Sync, Unpin);

gen_properties_proxy!(false, true);
assert_impl_all!(PropertiesProxy<'_>: Send, Sync, Unpin);

gen_object_manager_proxy!(false, true);
assert_impl_all!(ObjectManagerProxy<'_>: Send, Sync, Unpin);

gen_peer_proxy!(false, true);
assert_impl_all!(PeerProxy<'_>: Send, Sync, Unpin);

gen_monitoring_proxy!(false, true);
assert_impl_all!(MonitoringProxy<'_>: Send, Sync, Unpin);

gen_stats_proxy!(false, true);
assert_impl_all!(StatsProxy<'_>: Send, Sync, Unpin);

gen_dbus_proxy!(false, true);
assert_impl_all!(DBusProxy<'_>: Send, Sync, Unpin);
Loading

0 comments on commit 8b7b8c9

Please sign in to comment.