From c228cd9c104d19e1b83b54f5dc5b94da20ae3c28 Mon Sep 17 00:00:00 2001 From: Bryan Malyn Date: Sat, 9 Nov 2024 06:49:42 -0600 Subject: [PATCH] [dep]: Update dependencies (#2092) Update calibright, zbus, and futures, quick-xml --- Cargo.lock | 111 ++++++++----------- Cargo.toml | 8 +- src/blocks/battery/upower.rs | 6 +- src/blocks/bluetooth.rs | 4 +- src/blocks/external_ip.rs | 6 +- src/blocks/hueshift.rs | 2 +- src/blocks/kdeconnect.rs | 12 +- src/blocks/kdeconnect/battery.rs | 2 +- src/blocks/kdeconnect/connectivity_report.rs | 2 +- src/blocks/keyboard_layout/kbdd_bus.rs | 4 +- src/blocks/keyboard_layout/locale_bus.rs | 4 +- src/blocks/music.rs | 4 +- src/blocks/music/zbus_mpris.rs | 52 +-------- src/blocks/music/zbus_playerctld.rs | 2 +- src/blocks/notify.rs | 6 +- src/blocks/service_status.rs | 2 +- 16 files changed, 81 insertions(+), 146 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 90f195ca40..66c91bd60d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -376,9 +376,9 @@ dependencies = [ [[package]] name = "calibright" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61a1bc948e4d4946e8ed02b5c36be74956524814f85ee4c4b80c385b6f4d09a" +checksum = "7f4be58c171034d3e138dfba7038e42c33919e6c5c51de364136fcaa00c68eee" dependencies = [ "dirs", "futures-util", @@ -903,9 +903,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -918,9 +918,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -928,15 +928,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -945,9 +945,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -964,9 +964,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -975,15 +975,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -993,9 +993,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1230,7 +1230,7 @@ dependencies = [ "notmuch", "oauth2", "pipewire", - "quick-xml 0.31.0", + "quick-xml", "regex", "reqwest", "sensors", @@ -2201,16 +2201,6 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1190fd18ae6ce9e137184f207593877e70f39b015040156b1e05081cdfe3733a" -[[package]] -name = "quick-xml" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "quick-xml" version = "0.36.1" @@ -2218,6 +2208,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96a05e2e8efddfa51a84ca47cec303fac86c8541b686d37cac5efc0e094417bc" dependencies = [ "memchr", + "serde", ] [[package]] @@ -2287,9 +2278,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -2299,9 +2290,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -2310,9 +2301,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -2576,17 +2567,6 @@ dependencies = [ "serde", ] -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sha2" version = "0.10.8" @@ -3240,7 +3220,7 @@ version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "076ab8342497b77753c4f882f6d1654e1f8f4bd648ce72d045f237b8a727f4c9" dependencies = [ - "quick-xml 0.36.1", + "quick-xml", "thiserror", ] @@ -3550,9 +3530,9 @@ dependencies = [ [[package]] name = "zbus" -version = "4.4.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" +checksum = "0d17185ff0b54cf0af51da5762f9ccef45b633af5006651669fe90bb97e830f4" dependencies = [ "async-broadcast", "async-process", @@ -3561,20 +3541,17 @@ dependencies = [ "enumflags2", "event-listener", "futures-core", - "futures-sink", "futures-util", "hex", "nix 0.29.0", "ordered-stream", - "rand", "serde", "serde_repr", - "sha1", "static_assertions", "tokio", "tracing", "uds_windows", - "windows-sys 0.52.0", + "windows-sys 0.59.0", "xdg-home", "zbus_macros", "zbus_names", @@ -3583,9 +3560,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "4.4.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" +checksum = "ed3ad52bf7d51ef2a7b1bf9bbac6a2ebb8c77c7df297d3246963573d931bd5fd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3596,9 +3573,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "3.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +checksum = "cdc27fbd3593ff015cef906527a2ec4115e2e3dbf6204a24d952ac4975c80614" dependencies = [ "serde", "static_assertions", @@ -3682,22 +3659,23 @@ dependencies = [ [[package]] name = "zvariant" -version = "4.2.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" +checksum = "b909387da6d5787949f780919b5149d7f29f2f03f75eb883a67206e780b48fab" dependencies = [ "endi", "enumflags2", "serde", "static_assertions", "zvariant_derive", + "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "4.2.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" +checksum = "67fb722e4d5e0d88a4c370c17abf3e2323c549d9580b4c2d775f475a45b34307" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3708,11 +3686,14 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "2.1.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" +checksum = "05195b9a8930cfccb637b8ff1531404b5e16c5383f8f025078106793e24f9974" dependencies = [ + "nom", "proc-macro2", "quote", + "serde", + "static_assertions", "syn 2.0.77", ] diff --git a/Cargo.toml b/Cargo.toml index 868497a082..4fdea5e678 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,14 +32,14 @@ rustdoc-args = ["--cfg", "docsrs"] async-trait = "0.1" backon = { version = "1.2", default-features = false, features = ["tokio-sleep"] } base64 = { version = "0.22.1" } -calibright = { version = "0.1.6", features = ["watch"] } +calibright = { version = "0.1.9", features = ["watch"] } chrono = { version = "0.4", default-features = false, features = ["clock", "unstable-locales"] } chrono-tz = { version = "0.9", features = ["serde"] } clap = { version = "4.0", default-features = false, features = ["std", "derive", "help", "usage"] } debounced = "0.2.0" dirs = "5.0" env_logger = "0.11" -futures = { version = "0.3", default-features = false } +futures = { version = "0.3.31", default-features = false } glob = { version = "0.3.1", optional = true } hyper = "0.14" iana-time-zone = "0.1.60" @@ -61,7 +61,7 @@ nom = "7.1.2" notmuch = { version = "0.8", optional = true } oauth2 = { version = "4.4.2" } pipewire = { version = "0.8", default-features = false, optional = true } -quick-xml = { version = "0.31.0", features = ["serialize"] } +quick-xml = { version = "0.36.1", features = ["serialize"] } regex = "1.5" reqwest = { version = "0.11", features = ["json"] } sensors = "0.2.2" @@ -77,7 +77,7 @@ toml = { version = "0.8", features = ["preserve_order"] } unicode-segmentation = "1.10.1" wayrs-client = { version = "1.0", features = ["tokio"] } wayrs-protocols = { version = "0.14", features = ["wlr-foreign-toplevel-management-unstable-v1"] } -zbus = { version = "4", default-features = false, features = ["tokio"] } +zbus = { version = "5", default-features = false, features = ["tokio"] } [dependencies.tokio] version = "1.12" diff --git a/src/blocks/battery/upower.rs b/src/blocks/battery/upower.rs index e51dcc48f6..40263c2aea 100644 --- a/src/blocks/battery/upower.rs +++ b/src/blocks/battery/upower.rs @@ -12,7 +12,7 @@ const DISPLAY_DEVICE_PATH: ObjectPath = struct DeviceConnection { device_proxy: DeviceProxy<'static>, - changes: PropertiesChangedStream<'static>, + changes: PropertiesChangedStream, } impl DeviceConnection { @@ -99,8 +99,8 @@ pub(super) struct Device { device: DeviceName, dev_model: Option, device_conn: Option, - device_added_stream: DeviceAddedStream<'static>, - device_removed_stream: DeviceRemovedStream<'static>, + device_added_stream: DeviceAddedStream, + device_removed_stream: DeviceRemovedStream, } impl Device { diff --git a/src/blocks/bluetooth.rs b/src/blocks/bluetooth.rs index 8bfb064d0a..7b4faf4583 100644 --- a/src/blocks/bluetooth.rs +++ b/src/blocks/bluetooth.rs @@ -398,14 +398,14 @@ impl Device { .error("Failed to create PropertiesProxy")?, device: Device1Proxy::builder(manager_proxy.inner().connection()) // No caching because https://github.com/greshake/i3status-rust/issues/1565#issuecomment-1379308681 - .cache_properties(zbus::CacheProperties::No) + .cache_properties(zbus::proxy::CacheProperties::No) .path(path.clone()) .unwrap() .build() .await .error("Failed to create Device1Proxy")?, battery: Battery1Proxy::builder(manager_proxy.inner().connection()) - .cache_properties(zbus::CacheProperties::No) + .cache_properties(zbus::proxy::CacheProperties::No) .path(path) .unwrap() .build() diff --git a/src/blocks/external_ip.rs b/src/blocks/external_ip.rs index 8a6a5daaaa..98949b67d1 100644 --- a/src/blocks/external_ip.rs +++ b/src/blocks/external_ip.rs @@ -91,7 +91,7 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> { proxy .add_match_rule( MatchRule::builder() - .msg_type(zbus::MessageType::Signal) + .msg_type(zbus::message::Type::Signal) .path("/org/freedesktop/NetworkManager") .and_then(|x| x.interface("org.freedesktop.DBus.Properties")) .and_then(|x| x.member("PropertiesChanged")) @@ -103,7 +103,7 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> { proxy .add_match_rule( MatchRule::builder() - .msg_type(zbus::MessageType::Signal) + .msg_type(zbus::message::Type::Signal) .path_namespace("/org/freedesktop/NetworkManager/ActiveConnection") .and_then(|x| x.interface("org.freedesktop.DBus.Properties")) .and_then(|x| x.member("PropertiesChanged")) @@ -115,7 +115,7 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> { proxy .add_match_rule( MatchRule::builder() - .msg_type(zbus::MessageType::Signal) + .msg_type(zbus::message::Type::Signal) .path_namespace("/org/freedesktop/NetworkManager/IP4Config") .and_then(|x| x.interface("org.freedesktop.DBus.Properties")) .and_then(|x| x.member("PropertiesChanged")) diff --git a/src/blocks/hueshift.rs b/src/blocks/hueshift.rs index 9740016bff..e556592a8f 100644 --- a/src/blocks/hueshift.rs +++ b/src/blocks/hueshift.rs @@ -330,7 +330,7 @@ impl HueShiftDriver for Wlsunset { struct WlGammarelayRs { proxy: WlGammarelayRsBusProxy<'static>, - updates: zbus::PropertyStream<'static, u16>, + updates: zbus::proxy::PropertyStream<'static, u16>, } impl WlGammarelayRs { diff --git a/src/blocks/kdeconnect.rs b/src/blocks/kdeconnect.rs index 0318fb254d..431363f7e1 100644 --- a/src/blocks/kdeconnect.rs +++ b/src/blocks/kdeconnect.rs @@ -195,8 +195,8 @@ struct Device { connectivity_proxy: ConnectivityDbusProxy<'static>, device_signals: zbus::proxy::SignalStream<'static>, notifications_signals: zbus::proxy::SignalStream<'static>, - battery_refreshed: battery::refreshedStream<'static>, - connectivity_refreshed: connectivity_report::refreshedStream<'static>, + battery_refreshed: battery::refreshedStream, + connectivity_refreshed: connectivity_report::refreshedStream, } struct DeviceInfo { @@ -315,7 +315,7 @@ impl Device { for id in devices { let device_proxy = DeviceDbusProxy::builder(daemon_proxy.inner().connection()) - .cache_properties(zbus::CacheProperties::No) + .cache_properties(zbus::proxy::CacheProperties::No) .path(format!("/modules/kdeconnect/devices/{id}")) .unwrap() .build() @@ -339,7 +339,7 @@ impl Device { let connectivity_path = format!("{device_path}/connectivity_report"); let battery_proxy = BatteryDbusProxy::builder(daemon_proxy.inner().connection()) - .cache_properties(zbus::CacheProperties::No) + .cache_properties(zbus::proxy::CacheProperties::No) .path(battery_path) .error("Failed to set battery path")? .build() @@ -347,14 +347,14 @@ impl Device { .error("Failed to create BatteryDbusProxy")?; let notifications_proxy = NotificationsDbusProxy::builder(daemon_proxy.inner().connection()) - .cache_properties(zbus::CacheProperties::No) + .cache_properties(zbus::proxy::CacheProperties::No) .path(notifications_path) .error("Failed to set notifications path")? .build() .await .error("Failed to create BatteryDbusProxy")?; let connectivity_proxy = ConnectivityDbusProxy::builder(daemon_proxy.inner().connection()) - .cache_properties(zbus::CacheProperties::No) + .cache_properties(zbus::proxy::CacheProperties::No) .path(connectivity_path) .error("Failed to set connectivity path")? .build() diff --git a/src/blocks/kdeconnect/battery.rs b/src/blocks/kdeconnect/battery.rs index f8cf041202..c4168c5e76 100644 --- a/src/blocks/kdeconnect/battery.rs +++ b/src/blocks/kdeconnect/battery.rs @@ -2,7 +2,7 @@ interface = "org.kde.kdeconnect.device.battery", default_service = "org.kde.kdeconnect" )] -trait BatteryDbus { +pub(super) trait BatteryDbus { #[zbus(signal, name = "refreshed")] fn refreshed(&self, is_charging: bool, charge: i32) -> zbus::Result<()>; diff --git a/src/blocks/kdeconnect/connectivity_report.rs b/src/blocks/kdeconnect/connectivity_report.rs index b28aba27eb..6178eed971 100644 --- a/src/blocks/kdeconnect/connectivity_report.rs +++ b/src/blocks/kdeconnect/connectivity_report.rs @@ -2,7 +2,7 @@ interface = "org.kde.kdeconnect.device.connectivity_report", default_service = "org.kde.kdeconnect" )] -trait ConnectivityDbus { +pub(super) trait ConnectivityDbus { #[zbus(signal, name = "refreshed")] fn refreshed(&self, network_type: String, network_strength: i32) -> zbus::Result<()>; diff --git a/src/blocks/keyboard_layout/kbdd_bus.rs b/src/blocks/keyboard_layout/kbdd_bus.rs index 0ed7afaecd..b605352afa 100644 --- a/src/blocks/keyboard_layout/kbdd_bus.rs +++ b/src/blocks/keyboard_layout/kbdd_bus.rs @@ -1,7 +1,7 @@ use super::*; pub(super) struct KbddBus { - stream: layoutNameChangedStream<'static>, + stream: layoutNameChangedStream, info: Info, } @@ -9,7 +9,7 @@ impl KbddBus { pub(super) async fn new() -> Result { let conn = new_dbus_connection().await?; let proxy = KbddBusInterfaceProxy::builder(&conn) - .cache_properties(zbus::CacheProperties::No) + .cache_properties(zbus::proxy::CacheProperties::No) .build() .await .error("Failed to create KbddBusInterfaceProxy")?; diff --git a/src/blocks/keyboard_layout/locale_bus.rs b/src/blocks/keyboard_layout/locale_bus.rs index c22f4b2451..c6c80dd98d 100644 --- a/src/blocks/keyboard_layout/locale_bus.rs +++ b/src/blocks/keyboard_layout/locale_bus.rs @@ -2,8 +2,8 @@ use super::*; pub(super) struct LocaleBus { proxy: LocaleBusInterfaceProxy<'static>, - stream1: zbus::PropertyStream<'static, String>, - stream2: zbus::PropertyStream<'static, String>, + stream1: zbus::proxy::PropertyStream<'static, String>, + stream2: zbus::proxy::PropertyStream<'static, String>, } impl LocaleBus { diff --git a/src/blocks/music.rs b/src/blocks/music.rs index 51217a40a6..fd3b999da2 100644 --- a/src/blocks/music.rs +++ b/src/blocks/music.rs @@ -267,7 +267,7 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> { let mut properties_stream = MessageStream::for_match_rule( MatchRule::builder() - .msg_type(zbus::MessageType::Signal) + .msg_type(zbus::message::Type::Signal) .interface("org.freedesktop.DBus.Properties") .and_then(|x| x.member("PropertiesChanged")) .and_then(|x| x.path("/org/mpris/MediaPlayer2")) @@ -281,7 +281,7 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> { let mut name_owner_changed_stream = MessageStream::for_match_rule( MatchRule::builder() - .msg_type(zbus::MessageType::Signal) + .msg_type(zbus::message::Type::Signal) .interface("org.freedesktop.DBus") .and_then(|x| x.member("NameOwnerChanged")) .and_then(|x| x.arg0ns("org.mpris.MediaPlayer2")) diff --git a/src/blocks/music/zbus_mpris.rs b/src/blocks/music/zbus_mpris.rs index f47860b2ee..2cf11c3266 100644 --- a/src/blocks/music/zbus_mpris.rs +++ b/src/blocks/music/zbus_mpris.rs @@ -1,4 +1,4 @@ -//! # DBus interface proxies for: `org.mpris.MediaPlayer2`, `org.mpris.MediaPlayer2.Player` +//! # DBus interface proxies for: `org.mpris.MediaPlayer2.Player` //! //! This code was generated by `zbus-xmlgen` `1.0.0` from DBus introspection data. //! Source: `11`. @@ -20,7 +20,7 @@ //! …consequently `zbus-xmlgen` did not generate code for the above interfaces. use std::collections::HashMap; -use zbus::zvariant::{self, ObjectPath, OwnedValue, Type, Value}; +use zbus::zvariant::{self, ObjectPath, OwnedValue, Value}; #[derive(Debug, Clone)] pub struct PlayerMetadata { @@ -29,12 +29,6 @@ pub struct PlayerMetadata { pub url: Option, } -impl Type for PlayerMetadata { - fn signature() -> zvariant::Signature<'static> { - as Type>::signature() - } -} - impl TryFrom for PlayerMetadata { type Error = as TryFrom>::Error; @@ -61,51 +55,11 @@ impl TryFrom for PlayerMetadata { } } -#[zbus::proxy( - interface = "org.mpris.MediaPlayer2", - default_path = "/org/mpris/MediaPlayer2" -)] -trait MediaPlayer2 { - /// Quit method - fn quit(&self) -> zbus::Result<()>; - - /// Raise method - fn raise(&self) -> zbus::Result<()>; - - /// CanQuit property - #[zbus(property)] - fn can_quit(&self) -> zbus::Result; - - /// CanRaise property - #[zbus(property)] - fn can_raise(&self) -> zbus::Result; - - /// DesktopEntry property - #[zbus(property)] - fn desktop_entry(&self) -> zbus::Result; - - /// HasTrackList property - #[zbus(property)] - fn has_track_list(&self) -> zbus::Result; - - /// Identity property - #[zbus(property)] - fn identity(&self) -> zbus::Result; - - /// SupportedMimeTypes property - #[zbus(property)] - fn supported_mime_types(&self) -> zbus::Result>; - - /// SupportedUriSchemes property - #[zbus(property)] - fn supported_uri_schemes(&self) -> zbus::Result>; -} - #[zbus::proxy( interface = "org.mpris.MediaPlayer2.Player", default_path = "/org/mpris/MediaPlayer2" )] -trait Player { +pub(super) trait Player { /// Next method fn next(&self) -> zbus::Result<()>; diff --git a/src/blocks/music/zbus_playerctld.rs b/src/blocks/music/zbus_playerctld.rs index 41cc48316a..83214d4e30 100644 --- a/src/blocks/music/zbus_playerctld.rs +++ b/src/blocks/music/zbus_playerctld.rs @@ -24,7 +24,7 @@ default_service = "org.mpris.MediaPlayer2.playerctld", default_path = "/org/mpris/MediaPlayer2" )] -trait Playerctld { +pub(super) trait Playerctld { /// Shift method fn shift(&self) -> zbus::Result; diff --git a/src/blocks/notify.rs b/src/blocks/notify.rs index 57c700fc61..7bdd127ad9 100644 --- a/src/blocks/notify.rs +++ b/src/blocks/notify.rs @@ -58,7 +58,7 @@ use super::prelude::*; use tokio::try_join; -use zbus::PropertyStream; +use zbus::proxy::PropertyStream; const ICON_ON: &str = "bell"; const ICON_OFF: &str = "bell-slash"; @@ -208,8 +208,8 @@ trait DunstDbus { } struct SwayNCDriver { proxy: SwayNCDbusProxy<'static>, - changes: SubscribeStream<'static>, - changes_v2: SubscribeV2Stream<'static>, + changes: SubscribeStream, + changes_v2: SubscribeV2Stream, } impl SwayNCDriver { diff --git a/src/blocks/service_status.rs b/src/blocks/service_status.rs index d3d7ed961c..a66107fea0 100644 --- a/src/blocks/service_status.rs +++ b/src/blocks/service_status.rs @@ -42,7 +42,7 @@ //! use super::prelude::*; -use zbus::PropertyStream; +use zbus::proxy::PropertyStream; #[derive(Deserialize, Debug, Default)] #[serde(deny_unknown_fields, default)]