Cargo.toml: Update to zbus 5

This commit is contained in:
Vicki Pfau 2024-11-07 17:20:57 -08:00
parent bdb2d26e2f
commit a2af4d1bc5
29 changed files with 100 additions and 385 deletions

343
Cargo.lock generated
View file

@ -50,67 +50,6 @@ dependencies = [
"pin-project-lite", "pin-project-lite",
] ]
[[package]]
name = "async-channel"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a"
dependencies = [
"concurrent-queue",
"event-listener-strategy",
"futures-core",
"pin-project-lite",
]
[[package]]
name = "async-io"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059"
dependencies = [
"async-lock",
"cfg-if",
"concurrent-queue",
"futures-io",
"futures-lite",
"parking",
"polling",
"rustix",
"slab",
"tracing",
"windows-sys 0.59.0",
]
[[package]]
name = "async-lock"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18"
dependencies = [
"event-listener",
"event-listener-strategy",
"pin-project-lite",
]
[[package]]
name = "async-process"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb"
dependencies = [
"async-channel",
"async-io",
"async-lock",
"async-signal",
"async-task",
"blocking",
"cfg-if",
"event-listener",
"futures-lite",
"rustix",
"tracing",
]
[[package]] [[package]]
name = "async-recursion" name = "async-recursion"
version = "1.1.1" version = "1.1.1"
@ -122,30 +61,6 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "async-signal"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3"
dependencies = [
"async-io",
"async-lock",
"atomic-waker",
"cfg-if",
"futures-core",
"futures-io",
"rustix",
"signal-hook-registry",
"slab",
"windows-sys 0.59.0",
]
[[package]]
name = "async-task"
version = "4.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
[[package]] [[package]]
name = "async-trait" name = "async-trait"
version = "0.1.83" version = "0.1.83"
@ -157,12 +72,6 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "atomic-waker"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]] [[package]]
name = "autocfg" name = "autocfg"
version = "1.4.0" version = "1.4.0"
@ -190,34 +99,6 @@ version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "block-buffer"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
"generic-array",
]
[[package]]
name = "blocking"
version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea"
dependencies = [
"async-channel",
"async-task",
"futures-io",
"futures-lite",
"piper",
]
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]] [[package]]
name = "bytes" name = "bytes"
version = "1.8.0" version = "1.8.0"
@ -317,15 +198,6 @@ dependencies = [
"tiny-keccak", "tiny-keccak",
] ]
[[package]]
name = "cpufeatures"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0"
dependencies = [
"libc",
]
[[package]] [[package]]
name = "crossbeam-utils" name = "crossbeam-utils"
version = "0.8.20" version = "0.8.20"
@ -338,26 +210,6 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
[[package]]
name = "crypto-common"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array",
"typenum",
]
[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"crypto-common",
]
[[package]] [[package]]
name = "dlv-list" name = "dlv-list"
version = "0.5.2" version = "0.5.2"
@ -449,25 +301,6 @@ version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
[[package]]
name = "futures-io"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
[[package]]
name = "futures-lite"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f1fa2f9765705486b33fd2acf1577f8ec449c2ba1f318ae5447697b7c08d210"
dependencies = [
"fastrand",
"futures-core",
"futures-io",
"parking",
"pin-project-lite",
]
[[package]] [[package]]
name = "futures-sink" name = "futures-sink"
version = "0.3.31" version = "0.3.31"
@ -494,16 +327,6 @@ dependencies = [
"slab", "slab",
] ]
[[package]]
name = "generic-array"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
]
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.15" version = "0.2.15"
@ -545,12 +368,6 @@ version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
[[package]]
name = "hermit-abi"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
[[package]] [[package]]
name = "hex" name = "hex"
version = "0.4.3" version = "0.4.3"
@ -595,7 +412,7 @@ version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
dependencies = [ dependencies = [
"hermit-abi 0.3.9", "hermit-abi",
"libc", "libc",
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
@ -682,7 +499,7 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
dependencies = [ dependencies = [
"hermit-abi 0.3.9", "hermit-abi",
"libc", "libc",
"wasi", "wasi",
"windows-sys 0.52.0", "windows-sys 0.52.0",
@ -791,47 +608,12 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "piper"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066"
dependencies = [
"atomic-waker",
"fastrand",
"futures-io",
]
[[package]] [[package]]
name = "pkg-config" name = "pkg-config"
version = "0.3.31" version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
[[package]]
name = "polling"
version = "3.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f"
dependencies = [
"cfg-if",
"concurrent-queue",
"hermit-abi 0.4.0",
"pin-project-lite",
"rustix",
"tracing",
"windows-sys 0.59.0",
]
[[package]]
name = "ppv-lite86"
version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
dependencies = [
"zerocopy",
]
[[package]] [[package]]
name = "proc-macro-crate" name = "proc-macro-crate"
version = "3.2.0" version = "3.2.0"
@ -852,9 +634,9 @@ dependencies = [
[[package]] [[package]]
name = "quick-xml" name = "quick-xml"
version = "0.30.0" version = "0.36.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe"
dependencies = [ dependencies = [
"memchr", "memchr",
"serde", "serde",
@ -869,36 +651,6 @@ dependencies = [
"proc-macro2", "proc-macro2",
] ]
[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha",
"rand_core",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
]
[[package]] [[package]]
name = "regex" name = "regex"
version = "1.11.1" version = "1.11.1"
@ -1018,17 +770,6 @@ dependencies = [
"serde", "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]] [[package]]
name = "sharded-slab" name = "sharded-slab"
version = "0.1.7" version = "0.1.7"
@ -1300,12 +1041,6 @@ dependencies = [
"tracing-core", "tracing-core",
] ]
[[package]]
name = "typenum"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]] [[package]]
name = "udev" name = "udev"
version = "0.9.1" version = "0.9.1"
@ -1335,12 +1070,6 @@ version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
[[package]]
name = "version_check"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]] [[package]]
name = "wasi" name = "wasi"
version = "0.11.0+wasi-snapshot-preview1" version = "0.11.0+wasi-snapshot-preview1"
@ -1544,31 +1273,28 @@ dependencies = [
[[package]] [[package]]
name = "zbus" name = "zbus"
version = "4.4.0" version = "5.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" checksum = "1162094dc63b1629fcc44150bcceeaa80798cd28bcbe7fa987b65a034c258608"
dependencies = [ dependencies = [
"async-broadcast", "async-broadcast",
"async-process",
"async-recursion", "async-recursion",
"async-trait", "async-trait",
"enumflags2", "enumflags2",
"event-listener", "event-listener",
"futures-core", "futures-core",
"futures-sink",
"futures-util", "futures-util",
"hex", "hex",
"nix", "nix",
"ordered-stream", "ordered-stream",
"rand",
"serde", "serde",
"serde_repr", "serde_repr",
"sha1",
"static_assertions", "static_assertions",
"tokio", "tokio",
"tracing", "tracing",
"uds_windows", "uds_windows",
"windows-sys 0.52.0", "windows-sys 0.59.0",
"winnow",
"xdg-home", "xdg-home",
"zbus_macros", "zbus_macros",
"zbus_names", "zbus_names",
@ -1577,33 +1303,36 @@ dependencies = [
[[package]] [[package]]
name = "zbus_macros" name = "zbus_macros"
version = "4.4.0" version = "5.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" checksum = "2cd2dcdce3e2727f7d74b7e33b5a89539b3cc31049562137faf7ae4eb86cd16d"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn", "syn",
"zbus_names",
"zvariant",
"zvariant_utils", "zvariant_utils",
] ]
[[package]] [[package]]
name = "zbus_names" name = "zbus_names"
version = "3.0.0" version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" checksum = "856b7a38811f71846fd47856ceee8bccaec8399ff53fb370247e66081ace647b"
dependencies = [ dependencies = [
"serde", "serde",
"static_assertions", "static_assertions",
"winnow",
"zvariant", "zvariant",
] ]
[[package]] [[package]]
name = "zbus_xml" name = "zbus_xml"
version = "4.0.0" version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab3f374552b954f6abb4bd6ce979e6c9b38fb9d0cd7cc68a7d796e70c9f3a233" checksum = "c210addbcb424e91411ef782a5a1e264b5a5d268766faccd7d113c7c0440b9ab"
dependencies = [ dependencies = [
"quick-xml", "quick-xml",
"serde", "serde",
@ -1612,45 +1341,26 @@ dependencies = [
"zvariant", "zvariant",
] ]
[[package]]
name = "zerocopy"
version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
dependencies = [
"byteorder",
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "zvariant" name = "zvariant"
version = "4.2.0" version = "5.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" checksum = "a1200ee6ac32f1e5a312e455a949a4794855515d34f9909f4a3e082d14e1a56f"
dependencies = [ dependencies = [
"endi", "endi",
"enumflags2", "enumflags2",
"serde", "serde",
"static_assertions", "static_assertions",
"winnow",
"zvariant_derive", "zvariant_derive",
"zvariant_utils",
] ]
[[package]] [[package]]
name = "zvariant_derive" name = "zvariant_derive"
version = "4.2.0" version = "5.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" checksum = "687e3b97fae6c9104fbbd36c73d27d149abf04fb874e2efbd84838763daa8916"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro2", "proc-macro2",
@ -1661,11 +1371,14 @@ dependencies = [
[[package]] [[package]]
name = "zvariant_utils" name = "zvariant_utils"
version = "2.1.0" version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" checksum = "20d1d011a38f12360e5fcccceeff5e2c42a8eb7f27f0dcba97a0862ede05c9c6"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"serde",
"static_assertions",
"syn", "syn",
"winnow",
] ]

View file

@ -30,6 +30,6 @@ tracing = { version = "0.1", default-features = false }
tracing-subscriber = { version = "0.3", default-features = false, features = ["env-filter", "fmt"] } tracing-subscriber = { version = "0.3", default-features = false, features = ["env-filter", "fmt"] }
udev = "0.9" udev = "0.9"
xdg = "2.5" xdg = "2.5"
zbus = { version = "4", default-features = false, features = ["tokio"] } zbus = { version = "5", default-features = false, features = ["tokio"] }
zbus_xml = "4" zbus_xml = "5"
strum = { version = "0.26", features = ["derive"] } strum = { version = "0.26", features = ["derive"] }

View file

@ -194,11 +194,7 @@ async fn get_all_properties(conn: &Connection) -> Result<()> {
} }
_ => continue, _ => continue,
}; };
properties.extend( properties.extend(properties_proxy.get_all(name).await?);
properties_proxy
.get_all(zvariant::Optional::from(Some(name)))
.await?,
);
} }
for key in properties.keys().sorted() { for key in properties.keys().sorted() {
let value = &properties[key]; let value = &properties[key];

View file

@ -14,8 +14,7 @@ use tokio_util::sync::CancellationToken;
use tracing::error; use tracing::error;
use tracing_subscriber::prelude::*; use tracing_subscriber::prelude::*;
use tracing_subscriber::{fmt, Registry}; use tracing_subscriber::{fmt, Registry};
use zbus::connection::Connection; use zbus::connection::{Builder, Connection};
use zbus::ConnectionBuilder;
use crate::daemon::{channel, Daemon, DaemonCommand, DaemonContext}; use crate::daemon::{channel, Daemon, DaemonCommand, DaemonContext};
use crate::ds_inhibit::Inhibitor; use crate::ds_inhibit::Inhibitor;
@ -160,7 +159,7 @@ impl DaemonContext for RootContext {
pub(crate) type Command = DaemonCommand<RootCommand>; pub(crate) type Command = DaemonCommand<RootCommand>;
async fn create_connection(channel: Sender<Command>) -> Result<Connection> { async fn create_connection(channel: Sender<Command>) -> Result<Connection> {
let connection = ConnectionBuilder::system()? let connection = Builder::system()?
.name("com.steampowered.SteamOSManager1")? .name("com.steampowered.SteamOSManager1")?
.build() .build()
.await?; .await?;

View file

@ -14,8 +14,7 @@ use tracing_subscriber::prelude::*;
use tracing_subscriber::{fmt, Registry}; use tracing_subscriber::{fmt, Registry};
#[cfg(not(test))] #[cfg(not(test))]
use xdg::BaseDirectories; use xdg::BaseDirectories;
use zbus::connection::Connection; use zbus::connection::{Builder, Connection};
use zbus::ConnectionBuilder;
use crate::daemon::{channel, Daemon, DaemonCommand, DaemonContext}; use crate::daemon::{channel, Daemon, DaemonCommand, DaemonContext};
use crate::job::{JobManager, JobManagerService}; use crate::job::{JobManager, JobManagerService};
@ -107,7 +106,7 @@ async fn create_connections(
channel: Sender<Command>, channel: Sender<Command>,
) -> Result<(Connection, Connection, impl Service)> { ) -> Result<(Connection, Connection, impl Service)> {
let system = Connection::system().await?; let system = Connection::system().await?;
let connection = ConnectionBuilder::session()? let connection = Builder::session()?
.name("com.steampowered.SteamOSManager1")? .name("com.steampowered.SteamOSManager1")?
.build() .build()
.await?; .await?;

View file

@ -21,7 +21,8 @@ use tokio::sync::oneshot;
use tokio_stream::StreamExt; use tokio_stream::StreamExt;
use tracing::error; use tracing::error;
use zbus::fdo::{self, IntrospectableProxy}; use zbus::fdo::{self, IntrospectableProxy};
use zbus::{interface, zvariant, Connection, Interface, InterfaceRef, SignalContext}; use zbus::object_server::{Interface, InterfaceRef, SignalEmitter};
use zbus::{interface, zvariant, Connection};
use zbus_xml::Node; use zbus_xml::Node;
use crate::error::{to_zbus_fdo_error, zbus_to_zbus_fdo}; use crate::error::{to_zbus_fdo_error, zbus_to_zbus_fdo};
@ -100,7 +101,7 @@ impl JobManager {
.await?; .await?;
let object_path = zvariant::OwnedObjectPath::try_from(path).map_err(to_zbus_fdo_error)?; let object_path = zvariant::OwnedObjectPath::try_from(path).map_err(to_zbus_fdo_error)?;
JobManagerInterface::job_started(self.jm_iface.signal_context(), object_path.as_ref()) JobManagerInterface::job_started(self.jm_iface.signal_emitter(), object_path.as_ref())
.await?; .await?;
Ok(object_path) Ok(object_path)
} }
@ -170,7 +171,7 @@ impl JobManager {
impl JobManagerInterface { impl JobManagerInterface {
#[zbus(signal)] #[zbus(signal)]
async fn job_started( async fn job_started(
signal_ctxt: &SignalContext<'_>, signal_ctxt: &SignalEmitter<'_>,
job: zvariant::ObjectPath<'_>, job: zvariant::ObjectPath<'_>,
) -> zbus::Result<()>; ) -> zbus::Result<()>;
} }
@ -387,14 +388,14 @@ pub(crate) mod test {
use tokio::sync::{mpsc, oneshot}; use tokio::sync::{mpsc, oneshot};
use tokio::task::JoinHandle; use tokio::task::JoinHandle;
use tokio::time::sleep; use tokio::time::sleep;
use zbus::connection::Builder;
use zbus::names::BusName; use zbus::names::BusName;
use zbus::ConnectionBuilder;
#[tokio::test] #[tokio::test]
async fn test_job_emitted() { async fn test_job_emitted() {
let _h = testing::start(); let _h = testing::start();
let connection = ConnectionBuilder::session() let connection = Builder::session()
.expect("session") .expect("session")
.build() .build()
.await .await
@ -405,7 +406,7 @@ pub(crate) mod test {
let (tx, rx) = oneshot::channel::<()>(); let (tx, rx) = oneshot::channel::<()>();
let job = tokio::spawn(async move { let job = tokio::spawn(async move {
let connection = ConnectionBuilder::session()?.build().await?; let connection = Builder::session()?.build().await?;
let jm = JobManager1Proxy::builder(&connection) let jm = JobManager1Proxy::builder(&connection)
.destination(sender)? .destination(sender)?
.build() .build()
@ -535,7 +536,7 @@ pub(crate) mod test {
let (fin_tx, fin_rx) = oneshot::channel(); let (fin_tx, fin_rx) = oneshot::channel();
let job: JoinHandle<Result<()>> = tokio::spawn(async move { let job: JoinHandle<Result<()>> = tokio::spawn(async move {
let connection = ConnectionBuilder::address(address) let connection = Builder::address(address)
.expect("address") .expect("address")
.build() .build()
.await .await

View file

@ -13,8 +13,9 @@ use tokio::fs::File;
use tokio::sync::mpsc::Sender; use tokio::sync::mpsc::Sender;
use tokio::sync::oneshot; use tokio::sync::oneshot;
use tracing::{error, info}; use tracing::{error, info};
use zbus::object_server::SignalEmitter;
use zbus::zvariant::{self, Fd}; use zbus::zvariant::{self, Fd};
use zbus::{fdo, interface, Connection, SignalContext}; use zbus::{fdo, interface, Connection};
use crate::daemon::root::{Command, RootCommand}; use crate::daemon::root::{Command, RootCommand};
use crate::daemon::DaemonCommand; use crate::daemon::DaemonCommand;
@ -310,7 +311,7 @@ impl SteamOSManager {
&mut self, &mut self,
mode: u32, mode: u32,
options: HashMap<&str, zvariant::Value<'_>>, options: HashMap<&str, zvariant::Value<'_>>,
#[zbus(signal_context)] ctx: SignalContext<'_>, #[zbus(signal_emitter)] ctx: SignalEmitter<'_>,
) -> fdo::Result<()> { ) -> fdo::Result<()> {
// Set the wifi debug mode to mode, using an int for flexibility going forward but only // Set the wifi debug mode to mode, using an int for flexibility going forward but only
// doing things on 0 or 1 for now // doing things on 0 or 1 for now

View file

@ -11,8 +11,9 @@ use std::collections::HashMap;
use tokio::sync::mpsc::{Sender, UnboundedSender}; use tokio::sync::mpsc::{Sender, UnboundedSender};
use tokio::sync::oneshot; use tokio::sync::oneshot;
use tracing::error; use tracing::error;
use zbus::proxy::Builder; use zbus::object_server::SignalEmitter;
use zbus::{fdo, interface, zvariant, CacheProperties, Connection, Proxy, SignalContext}; use zbus::proxy::{Builder, CacheProperties};
use zbus::{fdo, interface, zvariant, Connection, Proxy};
use crate::cec::{HdmiCecControl, HdmiCecState}; use crate::cec::{HdmiCecControl, HdmiCecState};
use crate::daemon::user::Command; use crate::daemon::user::Command;
@ -190,7 +191,7 @@ impl SteamOSManager {
&self, &self,
mode: u32, mode: u32,
buffer_size: u32, buffer_size: u32,
#[zbus(signal_context)] ctx: SignalContext<'_>, #[zbus(signal_emitter)] ctx: SignalEmitter<'_>,
) -> fdo::Result<()> { ) -> fdo::Result<()> {
let _: () = method!(self, "SetWifiDebugMode", mode, buffer_size)?; let _: () = method!(self, "SetWifiDebugMode", mode, buffer_size)?;
self.wifi_debug_mode_state_changed(&ctx) self.wifi_debug_mode_state_changed(&ctx)
@ -464,7 +465,7 @@ impl WifiDebug1 {
&self, &self,
mode: u32, mode: u32,
options: HashMap<&str, zvariant::Value<'_>>, options: HashMap<&str, zvariant::Value<'_>>,
#[zbus(signal_context)] ctx: SignalContext<'_>, #[zbus(signal_emitter)] ctx: SignalEmitter<'_>,
) -> fdo::Result<()> { ) -> fdo::Result<()> {
let _: () = method!(self, "SetWifiDebugMode", mode, options)?; let _: () = method!(self, "SetWifiDebugMode", mode, options)?;
self.wifi_debug_mode_state_changed(&ctx) self.wifi_debug_mode_state_changed(&ctx)
@ -669,7 +670,8 @@ mod test {
use std::time::Duration; use std::time::Duration;
use tokio::sync::mpsc::unbounded_channel; use tokio::sync::mpsc::unbounded_channel;
use tokio::time::sleep; use tokio::time::sleep;
use zbus::{Connection, Interface}; use zbus::object_server::Interface;
use zbus::Connection;
struct TestHandle { struct TestHandle {
_handle: testing::TestHandle, _handle: testing::TestHandle,

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.AmbientLightSensor1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.AmbientLightSensor1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait AmbientLightSensor1 { pub trait AmbientLightSensor1 {
/// AlsCalibrationGain property /// AlsCalibrationGain property
#[zbus(property)] #[zbus(property)]
fn als_calibration_gain(&self) -> zbus::Result<Vec<f64>>; fn als_calibration_gain(&self) -> zbus::Result<Vec<f64>>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.CpuScaling1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.CpuScaling1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait CpuScaling1 { pub trait CpuScaling1 {
/// AvailableCpuScalingGovernors property /// AvailableCpuScalingGovernors property
#[zbus(property)] #[zbus(property)]
fn available_cpu_scaling_governors(&self) -> zbus::Result<Vec<String>>; fn available_cpu_scaling_governors(&self) -> zbus::Result<Vec<String>>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.FactoryReset1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.FactoryReset1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait FactoryReset1 { pub trait FactoryReset1 {
/// PrepareFactoryReset method /// PrepareFactoryReset method
fn prepare_factory_reset(&self, kind: u32) -> zbus::Result<u32>; fn prepare_factory_reset(&self, kind: u32) -> zbus::Result<u32>;
} }

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.FanControl1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.FanControl1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait FanControl1 { pub trait FanControl1 {
/// FanControlState property /// FanControlState property
#[zbus(property)] #[zbus(property)]
fn fan_control_state(&self) -> zbus::Result<u32>; fn fan_control_state(&self) -> zbus::Result<u32>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.GpuPerformanceLevel1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.GpuPerformanceLevel1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait GpuPerformanceLevel1 { pub trait GpuPerformanceLevel1 {
/// AvailableGpuPerformanceLevels property /// AvailableGpuPerformanceLevels property
#[zbus(property)] #[zbus(property)]
fn available_gpu_performance_levels(&self) -> zbus::Result<Vec<String>>; fn available_gpu_performance_levels(&self) -> zbus::Result<Vec<String>>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.GpuPowerProfile1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.GpuPowerProfile1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait GpuPowerProfile1 { pub trait GpuPowerProfile1 {
/// AvailableGpuPowerProfiles property /// AvailableGpuPowerProfiles property
#[zbus(property)] #[zbus(property)]
fn available_gpu_power_profiles(&self) -> zbus::Result<Vec<String>>; fn available_gpu_power_profiles(&self) -> zbus::Result<Vec<String>>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.HdmiCec1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.HdmiCec1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait HdmiCec1 { pub trait HdmiCec1 {
/// HdmiCecState property /// HdmiCecState property
#[zbus(property)] #[zbus(property)]
fn hdmi_cec_state(&self) -> zbus::Result<u32>; fn hdmi_cec_state(&self) -> zbus::Result<u32>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.Job1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.Job1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -17,7 +17,7 @@ use zbus::proxy;
default_service = "com.steampowered.SteamOSManager1", default_service = "com.steampowered.SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait Job1 { pub trait Job1 {
/// Cancel method /// Cancel method
fn cancel(&self, force: bool) -> zbus::Result<()>; fn cancel(&self, force: bool) -> zbus::Result<()>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.JobManager1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.JobManager1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1/Jobs", default_path = "/com/steampowered/SteamOSManager1/Jobs",
assume_defaults = true assume_defaults = true
)] )]
trait JobManager1 { pub trait JobManager1 {
/// JobStarted signal /// JobStarted signal
#[zbus(signal)] #[zbus(signal)]
fn job_started(&self, job: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>; fn job_started(&self, job: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.Manager` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.Manager`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.Manager.xml`. //! Source: `com.steampowered.SteamOSManager1.Manager.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait Manager { pub trait Manager {
/// SetWifiDebugMode method /// SetWifiDebugMode method
fn set_wifi_debug_mode(&self, mode: u32, buffer_size: u32) -> zbus::Result<()>; fn set_wifi_debug_mode(&self, mode: u32, buffer_size: u32) -> zbus::Result<()>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.Manager2` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.Manager2`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait Manager2 { pub trait Manager2 {
/// ReloadConfig method /// ReloadConfig method
fn reload_config(&self) -> zbus::Result<()>; fn reload_config(&self) -> zbus::Result<()>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.Storage1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.Storage1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait Storage1 { pub trait Storage1 {
/// FormatDevice method /// FormatDevice method
fn format_device( fn format_device(
&self, &self,

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.TdpLimit1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.TdpLimit1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait TdpLimit1 { pub trait TdpLimit1 {
/// TdpLimit property /// TdpLimit property
#[zbus(property)] #[zbus(property)]
fn tdp_limit(&self) -> zbus::Result<u32>; fn tdp_limit(&self) -> zbus::Result<u32>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.UdevEvents1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.UdevEvents1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait UdevEvents1 { pub trait UdevEvents1 {
/// UsbOverCurrent signal /// UsbOverCurrent signal
#[zbus(signal)] #[zbus(signal)]
fn usb_over_current(&self, devpath: &str, port: &str, count: u64) -> zbus::Result<()>; fn usb_over_current(&self, devpath: &str, port: &str, count: u64) -> zbus::Result<()>;

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.UpdateBios1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.UpdateBios1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait UpdateBios1 { pub trait UpdateBios1 {
/// UpdateBios method /// UpdateBios method
fn update_bios(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>; fn update_bios(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
} }

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.UpdateDock1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.UpdateDock1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait UpdateDock1 { pub trait UpdateDock1 {
/// UpdateDock method /// UpdateDock method
fn update_dock(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>; fn update_dock(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
} }

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.WifiDebug1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.WifiDebug1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait WifiDebug1 { pub trait WifiDebug1 {
/// SetWifiDebugMode method /// SetWifiDebugMode method
fn set_wifi_debug_mode( fn set_wifi_debug_mode(
&self, &self,

View file

@ -1,6 +1,6 @@
//! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.WifiPowerManagement1` //! # D-Bus interface proxy for: `com.steampowered.SteamOSManager1.WifiPowerManagement1`
//! //!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. //! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
//! Source: `com.steampowered.SteamOSManager1.xml`. //! Source: `com.steampowered.SteamOSManager1.xml`.
//! //!
//! You may prefer to adapt it, instead of using it verbatim. //! You may prefer to adapt it, instead of using it verbatim.
@ -18,7 +18,7 @@ use zbus::proxy;
default_path = "/com/steampowered/SteamOSManager1", default_path = "/com/steampowered/SteamOSManager1",
assume_defaults = true assume_defaults = true
)] )]
trait WifiPowerManagement1 { pub trait WifiPowerManagement1 {
/// WifiPowerManagementState property /// WifiPowerManagementState property
#[zbus(property)] #[zbus(property)]
fn wifi_power_management_state(&self) -> zbus::Result<u32>; fn wifi_power_management_state(&self) -> zbus::Result<u32>;

View file

@ -9,8 +9,9 @@ use anyhow::{anyhow, Result};
use std::path::PathBuf; use std::path::PathBuf;
use std::str::FromStr; use std::str::FromStr;
use strum::{Display, EnumString}; use strum::{Display, EnumString};
use zbus::proxy::CacheProperties;
use zbus::zvariant::OwnedObjectPath; use zbus::zvariant::OwnedObjectPath;
use zbus::{CacheProperties, Connection}; use zbus::Connection;
#[zbus::proxy( #[zbus::proxy(
interface = "org.freedesktop.systemd1.Unit", interface = "org.freedesktop.systemd1.Unit",

View file

@ -17,8 +17,10 @@ use tokio::io::{AsyncBufReadExt, BufReader};
use tokio::process::{Child, Command}; use tokio::process::{Child, Command};
use tokio::sync::Mutex; use tokio::sync::Mutex;
use tracing::error; use tracing::error;
use zbus::connection::{Builder, Connection};
use zbus::object_server::Interface;
use zbus::zvariant::ObjectPath; use zbus::zvariant::ObjectPath;
use zbus::{Address, Connection, ConnectionBuilder, Interface}; use zbus::Address;
use zbus_xml::{Method, Node, Property, Signal}; use zbus_xml::{Method, Node, Property, Signal};
use crate::platform::PlatformConfig; use crate::platform::PlatformConfig;
@ -128,7 +130,7 @@ impl MockDBus {
.ok_or(anyhow!("Failed to read address"))?; .ok_or(anyhow!("Failed to read address"))?;
let address = Address::from_str(address.trim_end())?; let address = Address::from_str(address.trim_end())?;
let connection = ConnectionBuilder::address(address.clone())?.build().await?; let connection = Builder::address(address.clone())?.build().await?;
Ok(MockDBus { Ok(MockDBus {
connection, connection,

View file

@ -13,7 +13,8 @@ use tokio::net::unix::pipe::Sender;
use tokio::sync::mpsc::{unbounded_channel, UnboundedSender}; use tokio::sync::mpsc::{unbounded_channel, UnboundedSender};
use tracing::debug; use tracing::debug;
use udev::{Event, EventType, MonitorBuilder}; use udev::{Event, EventType, MonitorBuilder};
use zbus::{self, interface, Connection, InterfaceRef, SignalContext}; use zbus::object_server::{InterfaceRef, SignalEmitter};
use zbus::{self, interface, Connection};
use crate::thread::spawn; use crate::thread::spawn;
use crate::Service; use crate::Service;
@ -66,7 +67,7 @@ impl Service for UdevMonitor {
count, count,
} => { } => {
UdevDbusObject::usb_over_current( UdevDbusObject::usb_over_current(
self.udev_object.signal_context(), self.udev_object.signal_emitter(),
devpath.as_str(), devpath.as_str(),
port.as_str(), port.as_str(),
count, count,
@ -104,7 +105,7 @@ impl UdevMonitor {
impl UdevDbusObject { impl UdevDbusObject {
#[zbus(signal)] #[zbus(signal)]
async fn usb_over_current( async fn usb_over_current(
signal_ctxt: &SignalContext<'_>, signal_ctxt: &SignalEmitter<'_>,
devpath: &str, devpath: &str,
port: &str, port: &str,
count: u64, count: u64,
@ -176,7 +177,7 @@ mod test {
use super::*; use super::*;
use std::time::Duration; use std::time::Duration;
use tokio::time::sleep; use tokio::time::sleep;
use zbus::Interface; use zbus::object_server::Interface;
use crate::testing; use crate::testing;