From 70281e74843194baab9392a4ebb4a0d8918f94d0 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Tue, 5 Nov 2024 11:56:50 -0800 Subject: [PATCH] Update to zbus 5.x --- Cargo.lock | 292 +++++++++++------- Cargo.toml | 14 +- cosmic-app-list/Cargo.toml | 2 +- cosmic-applet-a11y/Cargo.toml | 2 +- cosmic-applet-audio/Cargo.toml | 2 +- cosmic-applet-audio/src/mpris_subscription.rs | 3 +- .../src/backend/power_daemon.rs | 2 +- .../src/backend/power_profiles.rs | 2 +- cosmic-applet-network/Cargo.toml | 2 +- cosmic-applet-notifications/Cargo.toml | 4 +- .../src/subscriptions/freedesktop_proxy.rs | 2 +- .../src/subscriptions/notifications.rs | 2 +- cosmic-applet-power/Cargo.toml | 3 +- cosmic-applet-power/src/cosmic_session.rs | 2 +- cosmic-applet-power/src/session_manager.rs | 2 +- .../src/subscriptions/status_notifier_item.rs | 16 +- .../status_notifier_watcher/server.rs | 18 +- cosmic-applet-time/Cargo.toml | 2 +- 18 files changed, 226 insertions(+), 146 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68e7163f..0b8c3c98 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1093,7 +1093,7 @@ dependencies = [ "tracing-log", "tracing-subscriber", "url", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -1119,7 +1119,7 @@ dependencies = [ "tracing", "tracing-log", "tracing-subscriber", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -1141,7 +1141,7 @@ dependencies = [ "tracing-subscriber", "url", "urlencoding", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -1162,7 +1162,7 @@ dependencies = [ "tracing-log", "tracing-subscriber", "udev 0.8.0", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -1241,7 +1241,7 @@ dependencies = [ "tracing", "tracing-log", "tracing-subscriber", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -1265,7 +1265,7 @@ dependencies = [ "tracing-log", "tracing-subscriber", "url", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -1282,7 +1282,7 @@ dependencies = [ "tracing", "tracing-log", "tracing-subscriber", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -1296,7 +1296,7 @@ dependencies = [ "tracing", "tracing-log", "tracing-subscriber", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -1337,7 +1337,7 @@ dependencies = [ "tracing", "tracing-log", "tracing-subscriber", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -1408,7 +1408,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1424,13 +1424,13 @@ dependencies = [ "tokio", "tracing", "xdg", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "quote", "syn 1.0.109", @@ -1439,29 +1439,29 @@ dependencies = [ [[package]] name = "cosmic-dbus-a11y" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#62100129240d164e39fff16bda34faad520936de" +source = "git+https://github.com/pop-os/dbus-settings-bindings?branch=zbus5#0db9235f3fc4401a4b8fbbf695728adb5dc91f23" dependencies = [ - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] name = "cosmic-dbus-networkmanager" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#62100129240d164e39fff16bda34faad520936de" +source = "git+https://github.com/pop-os/dbus-settings-bindings?branch=zbus5#0db9235f3fc4401a4b8fbbf695728adb5dc91f23" dependencies = [ "bitflags 2.6.0", "derive_builder", "procfs", "thiserror", "time", - "zbus 4.4.0", - "zvariant 4.2.0", + "zbus 5.1.0", + "zvariant 5.1.0", ] [[package]] name = "cosmic-notifications-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-notifications#980b9621332502af4754c837f54e514282581c2f" +source = "git+https://github.com/pop-os/cosmic-notifications?branch=zbus5#6c08a8c09ecb9bc9370ac2d93855e8a63b00de16" dependencies = [ "cosmic-config", "serde", @@ -1470,14 +1470,14 @@ dependencies = [ [[package]] name = "cosmic-notifications-util" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-notifications#980b9621332502af4754c837f54e514282581c2f" +source = "git+https://github.com/pop-os/cosmic-notifications?branch=zbus5#6c08a8c09ecb9bc9370ac2d93855e8a63b00de16" dependencies = [ "bytemuck", "fast_image_resize", "serde", "tracing", "url", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -1526,15 +1526,15 @@ dependencies = [ [[package]] name = "cosmic-settings-daemon" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#62100129240d164e39fff16bda34faad520936de" +source = "git+https://github.com/pop-os/dbus-settings-bindings//?branch=zbus5#0db9235f3fc4401a4b8fbbf695728adb5dc91f23" dependencies = [ - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] name = "cosmic-settings-subscriptions" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-settings-subscriptions#ff9883a029b44fb8eafb7c7a06d08b36a563e481" +source = "git+https://github.com/pop-os/cosmic-settings-subscriptions?branch=zbus5#6ac5ebbd02851ebcaa786d7aa2136728546acdbc" dependencies = [ "cosmic-dbus-networkmanager", "futures", @@ -1549,7 +1549,7 @@ dependencies = [ "tokio-stream", "tracing", "upower_dbus", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -1578,7 +1578,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "almost", "cosmic-config", @@ -1713,7 +1713,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f731440b39c73910e253cb465ec1fac97732b3c7af215639881ec0c2a38f4f69" dependencies = [ - "darling 0.20.10", + "darling", "itertools 0.12.1", "proc-macro2", "quote", @@ -1732,38 +1732,14 @@ dependencies = [ "winapi", ] -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] - [[package]] name = "darling" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.10", - "darling_macro 0.20.10", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1780,24 +1756,13 @@ dependencies = [ "syn 2.0.86", ] -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core 0.14.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.10", + "darling_core", "quote", "syn 2.0.86", ] @@ -1876,33 +1841,33 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.12.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.12.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ - "darling 0.14.4", + "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.86", ] [[package]] name = "derive_builder_macro" -version = "0.12.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 1.0.109", + "syn 2.0.86", ] [[package]] @@ -1911,7 +1876,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e8ef033054e131169b8f0f9a7af8f5533a9436fadf3c500ed547f730f07090d" dependencies = [ - "darling 0.20.10", + "darling", "proc-macro2", "quote", "syn 2.0.86", @@ -2998,7 +2963,7 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "dnd", "iced_accessibility", @@ -3016,7 +2981,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "accesskit", "accesskit_winit", @@ -3025,7 +2990,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "bitflags 2.6.0", "bytes", @@ -3049,7 +3014,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "futures", "iced_core", @@ -3075,7 +3040,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "bitflags 2.6.0", "bytemuck", @@ -3097,7 +3062,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3109,7 +3074,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "bytes", "dnd", @@ -3124,7 +3089,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "bytemuck", "cosmic-text", @@ -3140,7 +3105,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "as-raw-xcb-connection", "bitflags 2.6.0", @@ -3171,7 +3136,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "dnd", "iced_renderer", @@ -3189,7 +3154,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "dnd", "iced_futures", @@ -3930,7 +3895,7 @@ checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#4b562867eccb65895953023a19393fa293aafb4b" +source = "git+https://github.com/pop-os/libcosmic//?branch=zbus5#aad8f172b2477db940eb200cab2d7872a7450677" dependencies = [ "apply", "ashpd 0.9.2", @@ -3970,7 +3935,7 @@ dependencies = [ "unicode-segmentation", "url", "ustr", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -3989,7 +3954,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -4107,12 +4072,11 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "logind-zbus" -version = "4.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85a07c35bc3d71bd5ce956b6e89420fbce7e221da18ce2c685c0c784e64fa01" +version = "5.0.0" +source = "git+https://gitlab.com/ids1024/logind-zbus?branch=zbus5#27ac360262e9b62d8b796baa2bc748ae347b0b09" dependencies = [ "serde", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -4305,14 +4269,14 @@ dependencies = [ [[package]] name = "mpris2-zbus" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#62100129240d164e39fff16bda34faad520936de" +source = "git+https://github.com/pop-os/dbus-settings-bindings?branch=zbus5#0db9235f3fc4401a4b8fbbf695728adb5dc91f23" dependencies = [ "futures-util", "serde", "thiserror", "time", - "zbus 4.4.0", - "zvariant 4.2.0", + "zbus 5.1.0", + "zvariant 5.1.0", ] [[package]] @@ -4562,7 +4526,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.86", @@ -5235,22 +5199,21 @@ dependencies = [ [[package]] name = "procfs" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" +checksum = "cc5b72d8145275d844d4b5f6d4e1eef00c8cd889edb6035c21675d1bb1f45c9f" dependencies = [ "bitflags 2.6.0", "hex", - "lazy_static", "procfs-core", "rustix 0.38.38", ] [[package]] name = "procfs-core" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" +checksum = "239df02d8349b06fc07398a3a1697b06418223b1c7725085e801e7c0fc6a12ec" dependencies = [ "bitflags 2.6.0", "hex", @@ -6106,9 +6069,9 @@ dependencies = [ [[package]] name = "switcheroo-control" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#62100129240d164e39fff16bda34faad520936de" +source = "git+https://github.com/pop-os/dbus-settings-bindings?branch=zbus5#0db9235f3fc4401a4b8fbbf695728adb5dc91f23" dependencies = [ - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -6272,9 +6235,9 @@ dependencies = [ [[package]] name = "timedate-zbus" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#62100129240d164e39fff16bda34faad520936de" +source = "git+https://github.com/pop-os/dbus-settings-bindings?branch=zbus5#0db9235f3fc4401a4b8fbbf695728adb5dc91f23" dependencies = [ - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -6654,11 +6617,11 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "upower_dbus" version = "0.3.2" -source = "git+https://github.com/pop-os/dbus-settings-bindings#62100129240d164e39fff16bda34faad520936de" +source = "git+https://github.com/pop-os/dbus-settings-bindings?branch=zbus5#0db9235f3fc4401a4b8fbbf695728adb5dc91f23" dependencies = [ "serde", "serde_repr", - "zbus 4.4.0", + "zbus 5.1.0", ] [[package]] @@ -7019,7 +6982,7 @@ dependencies = [ "js-sys", "log", "naga", - "parking_lot 0.12.3", + "parking_lot 0.11.2", "profiling", "raw-window-handle", "smallvec", @@ -7047,7 +7010,7 @@ dependencies = [ "log", "naga", "once_cell", - "parking_lot 0.12.3", + "parking_lot 0.11.2", "profiling", "raw-window-handle", "rustc-hash 1.1.0", @@ -7088,7 +7051,7 @@ dependencies = [ "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", - "parking_lot 0.12.3", + "parking_lot 0.11.2", "profiling", "range-alloc", "raw-window-handle", @@ -7141,7 +7104,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -7764,6 +7727,44 @@ dependencies = [ "zvariant 4.2.0", ] +[[package]] +name = "zbus" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0c8d6fdd4c4ac401fd298fd169d538a386e9df3c32ff136e8745dfa443dbd8" +dependencies = [ + "async-broadcast 0.7.1", + "async-executor", + "async-fs", + "async-io 2.3.4", + "async-lock 3.4.0", + "async-process 2.3.0", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener 5.3.1", + "futures-core", + "futures-util", + "hex", + "nix 0.29.0", + "ordered-stream", + "rand", + "serde", + "serde_repr", + "static_assertions", + "tokio", + "tracing", + "uds_windows", + "windows-sys 0.59.0", + "winnow 0.6.20", + "xdg-home", + "zbus_macros 5.1.0", + "zbus_names 4.1.0", + "zvariant 5.1.0", +] + [[package]] name = "zbus_macros" version = "3.15.2" @@ -7791,6 +7792,21 @@ dependencies = [ "zvariant_utils 2.1.0", ] +[[package]] +name = "zbus_macros" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed1f3cc6313cbefd539b4eee6de36a990897ab6cc2c30a82b3ac29ef9099e6c0" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.86", + "zbus_names 4.1.0", + "zvariant 5.1.0", + "zvariant_utils 3.0.2", +] + [[package]] name = "zbus_names" version = "2.6.1" @@ -7813,6 +7829,18 @@ dependencies = [ "zvariant 4.2.0", ] +[[package]] +name = "zbus_names" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "856b7a38811f71846fd47856ceee8bccaec8399ff53fb370247e66081ace647b" +dependencies = [ + "serde", + "static_assertions", + "winnow 0.6.20", + "zvariant 5.1.0", +] + [[package]] name = "zeno" version = "0.2.3" @@ -7937,6 +7965,21 @@ dependencies = [ "zvariant_derive 4.2.0", ] +[[package]] +name = "zvariant" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1200ee6ac32f1e5a312e455a949a4794855515d34f9909f4a3e082d14e1a56f" +dependencies = [ + "endi", + "enumflags2", + "serde", + "static_assertions", + "winnow 0.6.20", + "zvariant_derive 5.1.0", + "zvariant_utils 3.0.2", +] + [[package]] name = "zvariant_derive" version = "3.15.2" @@ -7963,6 +8006,19 @@ dependencies = [ "zvariant_utils 2.1.0", ] +[[package]] +name = "zvariant_derive" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687e3b97fae6c9104fbbd36c73d27d149abf04fb874e2efbd84838763daa8916" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.86", + "zvariant_utils 3.0.2", +] + [[package]] name = "zvariant_utils" version = "1.0.1" @@ -7984,3 +8040,17 @@ dependencies = [ "quote", "syn 2.0.86", ] + +[[package]] +name = "zvariant_utils" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20d1d011a38f12360e5fcccceeff5e2c42a8eb7f27f0dcba97a0862ede05c9c6" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "static_assertions", + "syn 2.0.86", + "winnow 0.6.20", +] diff --git a/Cargo.toml b/Cargo.toml index 3defa10f..88da3cdf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-c cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", default-features = false, features = [ "client", ], rev = "c8d3a1c" } -cosmic-settings-subscriptions = { git = "https://github.com/pop-os/cosmic-settings-subscriptions" } +cosmic-settings-subscriptions = { git = "https://github.com/pop-os/cosmic-settings-subscriptions", branch = "zbus5" } # cosmic-settings-subscriptions = { path = "../cosmic-settings-subscriptions" } cosmic-time = { git = "https://github.com/pop-os/cosmic-time", default-features = false, features = [ @@ -45,7 +45,7 @@ i18n-embed = { version = "0.14.1", features = [ "desktop-requester", ] } i18n-embed-fl = "0.8" -libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false, features = [ +libcosmic = { git = "https://github.com/pop-os/libcosmic", branch = "zbus5", default-features = false, features = [ "applet", "applet-token", "multi-window", @@ -59,7 +59,7 @@ once_cell = "1" rust-embed = "8.3" rust-embed-utils = "8.3.0" rustix = { version = "0.38", features = ["fs", "process"] } -zbus = { version = "4.2.1", default-features = false, features = ["tokio"] } +zbus = { version = "5.0.1", default-features = false, features = ["tokio"] } tracing = "0.1" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } tracing-log = "0.2.0" @@ -83,3 +83,11 @@ ignored = ["libcosmic"] # winit = { path = "../winit" } [patch."https://github.com/smithay/client-toolkit.git"] sctk = { package = "smithay-client-toolkit", version = "=0.19.2" } + +[patch."https://github.com/pop-os/dbus-settings-bindings"] +cosmic-settings-daemon = { git = "https://github.com/pop-os/dbus-settings-bindings//", branch = "zbus5" } + +[patch."https://github.com/pop-os/libcosmic"] +cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "zbus5" } +libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "zbus5" } +iced_futures = { git = "https://github.com/pop-os/libcosmic//", branch = "zbus5" } diff --git a/cosmic-app-list/Cargo.toml b/cosmic-app-list/Cargo.toml index 1b83e5ff..ff139e5e 100644 --- a/cosmic-app-list/Cargo.toml +++ b/cosmic-app-list/Cargo.toml @@ -21,7 +21,7 @@ rand = "0.8.5" rust-embed.workspace = true rustix.workspace = true serde = { version = "1.0", features = ["derive"] } -switcheroo-control = { git = "https://github.com/pop-os/dbus-settings-bindings" } +switcheroo-control = { git = "https://github.com/pop-os/dbus-settings-bindings", branch = "zbus5" } tokio = { version = "1.36.0", features = [ "sync", "rt", diff --git a/cosmic-applet-a11y/Cargo.toml b/cosmic-applet-a11y/Cargo.toml index df8b5fa8..c905e2fe 100644 --- a/cosmic-applet-a11y/Cargo.toml +++ b/cosmic-applet-a11y/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -cosmic-dbus-a11y = { git = "https://github.com/pop-os/dbus-settings-bindings" } +cosmic-dbus-a11y = { git = "https://github.com/pop-os/dbus-settings-bindings", branch = "zbus5" } cosmic-time.workspace = true i18n-embed-fl.workspace = true i18n-embed.workspace = true diff --git a/cosmic-applet-audio/Cargo.toml b/cosmic-applet-audio/Cargo.toml index 0ea2c0be..1758b1ca 100644 --- a/cosmic-applet-audio/Cargo.toml +++ b/cosmic-applet-audio/Cargo.toml @@ -11,7 +11,7 @@ i18n-embed-fl.workspace = true i18n-embed.workspace = true libcosmic.workspace = true libpulse-binding = "2.28.1" -mpris2-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings" } +mpris2-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", branch = "zbus5" } rust-embed.workspace = true serde = "1.0.197" tokio = { version = "1.36.0", features = ["full"] } diff --git a/cosmic-applet-audio/src/mpris_subscription.rs b/cosmic-applet-audio/src/mpris_subscription.rs index 058f0079..9b402e3a 100644 --- a/cosmic-applet-audio/src/mpris_subscription.rs +++ b/cosmic-applet-audio/src/mpris_subscription.rs @@ -135,7 +135,8 @@ struct State { players: Vec, active_player: Option, active_player_metadata_stream: Option + Unpin + Send>>, - any_player_state_stream: futures::stream::SelectAll>, + any_player_state_stream: + futures::stream::SelectAll>, } fn filter_firefox_players(players: &mut Vec) { diff --git a/cosmic-applet-battery/src/backend/power_daemon.rs b/cosmic-applet-battery/src/backend/power_daemon.rs index 337ac136..db3a1dc2 100644 --- a/cosmic-applet-battery/src/backend/power_daemon.rs +++ b/cosmic-applet-battery/src/backend/power_daemon.rs @@ -25,7 +25,7 @@ use zbus::proxy; default_path = "/com/system76/PowerDaemon", assume_defaults = true )] -trait PowerDaemon { +pub trait PowerDaemon { /// Balanced method fn balanced(&self) -> zbus::Result<()>; diff --git a/cosmic-applet-battery/src/backend/power_profiles.rs b/cosmic-applet-battery/src/backend/power_profiles.rs index e3e1c158..853ee587 100644 --- a/cosmic-applet-battery/src/backend/power_profiles.rs +++ b/cosmic-applet-battery/src/backend/power_profiles.rs @@ -17,7 +17,7 @@ use zbus::proxy; default_path = "/org/freedesktop/UPower/PowerProfiles", assume_defaults = true )] -trait PowerProfiles { +pub trait PowerProfiles { /// HoldProfile method fn hold_profile(&self, profile: &str, reason: &str, application_id: &str) -> zbus::Result; diff --git a/cosmic-applet-network/Cargo.toml b/cosmic-applet-network/Cargo.toml index 72f65eb7..d08bc7b6 100644 --- a/cosmic-applet-network/Cargo.toml +++ b/cosmic-applet-network/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0-or-later" [dependencies] anyhow.workspace = true -cosmic-dbus-networkmanager = { git = "https://github.com/pop-os/dbus-settings-bindings" } +cosmic-dbus-networkmanager = { git = "https://github.com/pop-os/dbus-settings-bindings", branch = "zbus5" } cosmic-time.workspace = true futures.workspace = true futures-util.workspace = true diff --git a/cosmic-applet-notifications/Cargo.toml b/cosmic-applet-notifications/Cargo.toml index 080fac72..aa664d76 100644 --- a/cosmic-applet-notifications/Cargo.toml +++ b/cosmic-applet-notifications/Cargo.toml @@ -17,8 +17,8 @@ tokio = { version = "1.36.0", features = [ "io-util", "io-std", ] } -cosmic-notifications-util = { git = "https://github.com/pop-os/cosmic-notifications" } -cosmic-notifications-config = { git = "https://github.com/pop-os/cosmic-notifications" } +cosmic-notifications-util = { git = "https://github.com/pop-os/cosmic-notifications", branch = "zbus5" } +cosmic-notifications-config = { git = "https://github.com/pop-os/cosmic-notifications", branch = "zbus5" } # cosmic-notifications-util = { path = "../../cosmic-notifications-daemon/cosmic-notifications-util" } # cosmic-notifications-config = { path = "../../cosmic-notifications-daemon/cosmic-notifications-config" } tracing = "0.1" diff --git a/cosmic-applet-notifications/src/subscriptions/freedesktop_proxy.rs b/cosmic-applet-notifications/src/subscriptions/freedesktop_proxy.rs index f06a8194..d5f68a85 100644 --- a/cosmic-applet-notifications/src/subscriptions/freedesktop_proxy.rs +++ b/cosmic-applet-notifications/src/subscriptions/freedesktop_proxy.rs @@ -26,7 +26,7 @@ use zbus::proxy; default_service = "org.freedesktop.Notifications", default_path = "/org/freedesktop/Notifications" )] -trait Notifications { +pub trait Notifications { /// CloseNotification method fn close_notification(&self, id: u32) -> zbus::Result<()>; diff --git a/cosmic-applet-notifications/src/subscriptions/notifications.rs b/cosmic-applet-notifications/src/subscriptions/notifications.rs index 898b8348..a793b076 100644 --- a/cosmic-applet-notifications/src/subscriptions/notifications.rs +++ b/cosmic-applet-notifications/src/subscriptions/notifications.rs @@ -84,7 +84,7 @@ pub fn notifications(proxy: NotificationsAppletProxy<'static>) -> Subscription zbus::Result<()>; } diff --git a/cosmic-applet-power/src/session_manager.rs b/cosmic-applet-power/src/session_manager.rs index 43d9661e..efe6ccec 100644 --- a/cosmic-applet-power/src/session_manager.rs +++ b/cosmic-applet-power/src/session_manager.rs @@ -24,7 +24,7 @@ use zbus::proxy; #[proxy(interface = "org.gnome.SessionManager", assume_defaults = true)] -trait SessionManager { +pub trait SessionManager { /// CanRebootToFirmwareSetup method fn can_reboot_to_firmware_setup(&self) -> zbus::Result; diff --git a/cosmic-applet-status-area/src/subscriptions/status_notifier_item.rs b/cosmic-applet-status-area/src/subscriptions/status_notifier_item.rs index 43593fe1..2d0718c0 100644 --- a/cosmic-applet-status-area/src/subscriptions/status_notifier_item.rs +++ b/cosmic-applet-status-area/src/subscriptions/status_notifier_item.rs @@ -6,6 +6,7 @@ use cosmic::{ widget::icon, }; use futures::{FutureExt, StreamExt}; +use std::collections::HashMap; use zbus::zvariant::{self, OwnedValue}; #[derive(Clone, Debug)] @@ -110,7 +111,7 @@ async fn get_layout(menu_proxy: DBusMenuProxy<'static>) -> Result zbus::Result; @@ -128,15 +129,14 @@ pub struct Layout(i32, LayoutProps, Vec); impl<'a> serde::Deserialize<'a> for Layout { fn deserialize>(deserializer: D) -> Result { let (id, props, children) = - <(i32, LayoutProps, Vec<(zvariant::Signature<'_>, Self)>)>::deserialize(deserializer)?; + <(i32, LayoutProps, Vec<(zvariant::Signature, Self)>)>::deserialize(deserializer)?; Ok(Self(id, props, children.into_iter().map(|x| x.1).collect())) } } impl zvariant::Type for Layout { - fn signature() -> zvariant::Signature<'static> { - zvariant::Signature::try_from("(ia{sv}av)").unwrap() - } + const SIGNATURE: &'static zvariant::Signature = + <(i32, HashMap, Vec)>::SIGNATURE; } #[derive(Clone, Debug, zvariant::DeserializeDict)] @@ -166,9 +166,7 @@ pub struct LayoutProps { } impl zvariant::Type for LayoutProps { - fn signature() -> zvariant::Signature<'static> { - zvariant::Signature::try_from("a{sv}").unwrap() - } + const SIGNATURE: &'static zvariant::Signature = >::SIGNATURE; } #[allow(dead_code)] @@ -227,7 +225,7 @@ impl Layout { } #[zbus::proxy(interface = "com.canonical.dbusmenu")] -trait DBusMenu { +pub trait DBusMenu { fn get_layout( &self, parent_id: i32, diff --git a/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/server.rs b/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/server.rs index 221b4a35..6804de9d 100644 --- a/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/server.rs +++ b/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/server.rs @@ -8,8 +8,10 @@ use futures::prelude::*; use zbus::{ fdo::{DBusProxy, RequestNameFlags, RequestNameReply}, + message::Header, names::{BusName, UniqueName, WellKnownName}, - MessageHeader, Result, SignalContext, + object_server::SignalEmitter, + Result, }; const NAME: WellKnownName = @@ -26,8 +28,8 @@ impl StatusNotifierWatcher { async fn register_status_notifier_item( &mut self, service: &str, - #[zbus(header)] hdr: MessageHeader<'_>, - #[zbus(signal_context)] ctxt: SignalContext<'_>, + #[zbus(header)] hdr: Header<'_>, + #[zbus(signal_emitter)] ctxt: SignalEmitter<'_>, ) { let sender = hdr.sender().unwrap(); let service = if service.starts_with('/') { @@ -62,20 +64,20 @@ impl StatusNotifierWatcher { } #[zbus(signal)] - async fn status_notifier_item_registered(ctxt: &SignalContext<'_>, service: &str) + async fn status_notifier_item_registered(ctxt: &SignalEmitter<'_>, service: &str) -> Result<()>; #[zbus(signal)] async fn status_notifier_item_unregistered( - ctxt: &SignalContext<'_>, + ctxt: &SignalEmitter<'_>, service: &str, ) -> Result<()>; #[zbus(signal)] - async fn status_notifier_host_registered(ctxt: &SignalContext<'_>) -> Result<()>; + async fn status_notifier_host_registered(ctxt: &SignalEmitter<'_>) -> Result<()>; #[zbus(signal)] - async fn status_notifier_host_unregistered(ctxt: &SignalContext<'_>) -> Result<()>; + async fn status_notifier_host_unregistered(ctxt: &SignalEmitter<'_>) -> Result<()>; } pub async fn create_service(connection: &zbus::Connection) -> zbus::Result<()> { @@ -122,7 +124,7 @@ pub async fn create_service(connection: &zbus::Connection) -> zbus::Result<()> { .iter() .position(|(unique_name, _)| unique_name == name) { - let ctxt = zbus::SignalContext::new(&connection, OBJECT_PATH).unwrap(); + let ctxt = SignalEmitter::new(&connection, OBJECT_PATH).unwrap(); let service = interface.items.remove(idx).1; StatusNotifierWatcher::status_notifier_item_unregistered(&ctxt, &service) .await diff --git a/cosmic-applet-time/Cargo.toml b/cosmic-applet-time/Cargo.toml index 03c3be62..157f71eb 100644 --- a/cosmic-applet-time/Cargo.toml +++ b/cosmic-applet-time/Cargo.toml @@ -22,4 +22,4 @@ icu = { version = "1.4.0", features = [ "icu_datetime_experimental", ] } zbus.workspace = true -timedate-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings" } +timedate-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", branch = "zbus5" }