Initial commit
This commit is contained in:
commit
1273f1f098
11 changed files with 1772 additions and 0 deletions
10
.editorconfig
Normal file
10
.editorconfig
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[*]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
end_of_line = lf
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
42
.gitignore
vendored
Normal file
42
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# RUST gitignore generated by Blindfold
|
||||
|
||||
# Generated by Cargo
|
||||
# will have compiled files and executables
|
||||
debug/
|
||||
target/
|
||||
# These are backup files generated by rustfmt
|
||||
**/*.rs.bk
|
||||
|
||||
# VISUALSTUDIOCODE gitignore generated by Blindfold
|
||||
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
|
||||
# CLION gitignore generated by Blindfold
|
||||
|
||||
.idea
|
||||
|
||||
# LINUX gitignore generated by Blindfold
|
||||
|
||||
*~
|
||||
|
||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||
.fuse_hidden*
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
# Linux trash folder which might appear on any partition or disk
|
||||
.Trash-*
|
||||
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
|
||||
8
.rustfmt.toml
Normal file
8
.rustfmt.toml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
edition = "2021"
|
||||
hard_tabs = true
|
||||
merge_derives = true
|
||||
newline_style = "Unix"
|
||||
remove_nested_parens = true
|
||||
reorder_imports = true
|
||||
reorder_modules = true
|
||||
use_field_init_shorthand = true
|
||||
702
Cargo.lock
generated
Normal file
702
Cargo.lock
generated
Normal file
|
|
@ -0,0 +1,702 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-broadcast"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90622698a1218e0b2fb846c97b5f19a0831f6baddee73d9454156365ccfa473b"
|
||||
dependencies = [
|
||||
"easy-parallel",
|
||||
"event-listener",
|
||||
"futures-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-channel"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319"
|
||||
dependencies = [
|
||||
"concurrent-queue",
|
||||
"event-listener",
|
||||
"futures-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-executor"
|
||||
version = "1.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965"
|
||||
dependencies = [
|
||||
"async-task",
|
||||
"concurrent-queue",
|
||||
"fastrand",
|
||||
"futures-lite",
|
||||
"once_cell",
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-io"
|
||||
version = "1.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b"
|
||||
dependencies = [
|
||||
"concurrent-queue",
|
||||
"futures-lite",
|
||||
"libc",
|
||||
"log",
|
||||
"once_cell",
|
||||
"parking",
|
||||
"polling",
|
||||
"slab",
|
||||
"socket2",
|
||||
"waker-fn",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-lock"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b"
|
||||
dependencies = [
|
||||
"event-listener",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-recursion"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-task"
|
||||
version = "4.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0"
|
||||
|
||||
[[package]]
|
||||
name = "async-trait"
|
||||
version = "0.1.52"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
||||
|
||||
[[package]]
|
||||
name = "cache-padded"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.72"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "concurrent-queue"
|
||||
version = "1.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3"
|
||||
dependencies = [
|
||||
"cache-padded",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmic-dbus-networkmanager"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derivative"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "easy-parallel"
|
||||
version = "3.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6907e25393cdcc1f4f3f513d9aac1e840eb1cc341a0fccb01171f7d14d10b946"
|
||||
|
||||
[[package]]
|
||||
name = "enumflags2"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a25c90b056b3f84111cf183cbeddef0d3a0bbe9a674f057e1a1533c315f24def"
|
||||
dependencies = [
|
||||
"enumflags2_derive",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "enumflags2_derive"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "144ec79496cbab6f84fa125dc67be9264aef22eb8a28da8454d9c33f15108da4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "event-listener"
|
||||
version = "2.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59"
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "1.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "779d043b6a0b90cc4c0ed7ee380a6504394cee7efd7db050e3774eee387324b2"
|
||||
dependencies = [
|
||||
"instant",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7"
|
||||
|
||||
[[package]]
|
||||
name = "futures-io"
|
||||
version = "0.3.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2"
|
||||
|
||||
[[package]]
|
||||
name = "futures-lite"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48"
|
||||
dependencies = [
|
||||
"fastrand",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"memchr",
|
||||
"parking",
|
||||
"pin-project-lite",
|
||||
"waker-fn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-sink"
|
||||
version = "0.3.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e3055baccb68d74ff6480350f8d6eb8fcfa3aa11bdc1a1ae3afdd0514617d508"
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
"futures-task",
|
||||
"pin-project-lite",
|
||||
"pin-utils",
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"wasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hex"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.112"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.23.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"memoffset",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
|
||||
|
||||
[[package]]
|
||||
name = "ordered-stream"
|
||||
version = "0.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44630c059eacfd6e08bdaa51b1db2ce33119caa4ddc1235e923109aa5f25ccb1"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parking"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72"
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
|
||||
|
||||
[[package]]
|
||||
name = "pin-utils"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
||||
|
||||
[[package]]
|
||||
name = "polling"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"log",
|
||||
"wepoll-ffi",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-crate"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83"
|
||||
dependencies = [
|
||||
"thiserror",
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47aa80447ce4daf1717500037052af176af5d38cc3e571d9ec1c7353fc10c87d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"rand_chacha",
|
||||
"rand_core",
|
||||
"rand_hc",
|
||||
]
|
||||
|
||||
[[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.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_hc"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.133"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.133"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_repr"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "98d0516900518c29efa217c298fa1f4e6c6ffc85ae29fd7f4ee48f176e1a9ed5"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
|
||||
|
||||
[[package]]
|
||||
name = "slab"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
|
||||
|
||||
[[package]]
|
||||
name = "socket2"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.85"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.5.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
||||
|
||||
[[package]]
|
||||
name = "waker-fn"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.10.2+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
|
||||
|
||||
[[package]]
|
||||
name = "wepoll-ffi"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "zbus"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d8b6202696b4dc8ee26ff92939c79a0307e7cd683374fdf500902d74d914fef6"
|
||||
dependencies = [
|
||||
"async-broadcast",
|
||||
"async-channel",
|
||||
"async-executor",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"async-recursion",
|
||||
"async-task",
|
||||
"async-trait",
|
||||
"byteorder",
|
||||
"derivative",
|
||||
"enumflags2",
|
||||
"event-listener",
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
"futures-util",
|
||||
"hex",
|
||||
"nix",
|
||||
"once_cell",
|
||||
"ordered-stream",
|
||||
"rand",
|
||||
"serde",
|
||||
"serde_repr",
|
||||
"sha1",
|
||||
"static_assertions",
|
||||
"zbus_macros",
|
||||
"zbus_names",
|
||||
"zvariant",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zbus_macros"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd2ea67f43e8abd245eabc480e597990340d9870b585d40bf4350d742acb2219"
|
||||
dependencies = [
|
||||
"proc-macro-crate",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"regex",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zbus_names"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae1f142d242d6854815a8c5c2aea83d9508f72f5757d0a137c21ef4b07bfee66"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"static_assertions",
|
||||
"zvariant",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zvariant"
|
||||
version = "3.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4a946c049b2eac1a253f98e9267a8ce7a3d93be274ea146e6dd7a0965232a911"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"enumflags2",
|
||||
"libc",
|
||||
"serde",
|
||||
"static_assertions",
|
||||
"zvariant_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zvariant_derive"
|
||||
version = "3.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "28fce5afb8d639bff79b1e8cdb258a3ca22d458f4603b23d794b4cb4e878c990"
|
||||
dependencies = [
|
||||
"proc-macro-crate",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
2
Cargo.toml
Normal file
2
Cargo.toml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[workspace]
|
||||
members = ["networkmanager"]
|
||||
359
LICENSE.md
Normal file
359
LICENSE.md
Normal file
|
|
@ -0,0 +1,359 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
## 1. Definitions
|
||||
|
||||
### 1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
### 1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
### 1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
### 1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
### 1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
+ (a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
+ (b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
### 1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
### 1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
### 1.8. "License"
|
||||
means this document.
|
||||
|
||||
### 1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
### 1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
+ (a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
+ (b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
### 1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
### 1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
### 1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
### 1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
## 2. License Grants and Conditions
|
||||
|
||||
### 2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
+ (a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
+ (b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
### 2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
### 2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
+ (a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
+ (b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
+ (c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
### 2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
### 2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
### 2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
### 2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
## 3. Responsibilities
|
||||
|
||||
### 3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
### 3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
+ (a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
+ (b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
### 3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
### 3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
### 3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
## 4. Inability to Comply Due to Statute or Regulation
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
## 5. Termination
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
|
||||
## 6. Disclaimer of Warranty
|
||||
|
||||
**Covered Software is provided under this License on an "as is"
|
||||
basis, without warranty of any kind, either expressed, implied, or
|
||||
statutory, including, without limitation, warranties that the
|
||||
Covered Software is free of defects, merchantable, fit for a
|
||||
particular purpose or non-infringing. The entire risk as to the
|
||||
quality and performance of the Covered Software is with You.
|
||||
Should any Covered Software prove defective in any respect, You
|
||||
(not any Contributor) assume the cost of any necessary servicing,
|
||||
repair, or correction. This disclaimer of warranty constitutes an
|
||||
essential part of this License. No use of any Covered Software is
|
||||
authorized under this License except under this disclaimer.**
|
||||
|
||||
|
||||
#7. Limitation of Liability
|
||||
|
||||
**Under no circumstances and under no legal theory, whether tort
|
||||
(including negligence), contract, or otherwise, shall any
|
||||
Contributor, or anyone who distributes Covered Software as
|
||||
permitted above, be liable to You for any direct, indirect,
|
||||
special, incidental, or consequential damages of any character
|
||||
including, without limitation, damages for lost profits, loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any
|
||||
and all other commercial damages or losses, even if such party
|
||||
shall have been informed of the possibility of such damages. This
|
||||
limitation of liability shall not apply to liability for death or
|
||||
personal injury resulting from such party's negligence to the
|
||||
extent applicable law prohibits such limitation. Some
|
||||
jurisdictions do not allow the exclusion or limitation of
|
||||
incidental or consequential damages, so this exclusion and
|
||||
limitation may not apply to You.**
|
||||
|
||||
|
||||
## 8. Litigation
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
## 9. Miscellaneous
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
## 10. Versions of the License
|
||||
|
||||
### 10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
### 10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
### 10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
### 10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
## Exhibit A - Source Code Form License Notice
|
||||
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
## Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
|
||||
8
networkmanager/Cargo.toml
Normal file
8
networkmanager/Cargo.toml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "cosmic-dbus-networkmanager"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
license = "MPL-2.0"
|
||||
|
||||
[dependencies]
|
||||
zbus = "2.0.0"
|
||||
213
networkmanager/src/interface/device.rs
Normal file
213
networkmanager/src/interface/device.rs
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
//! # DBus interface proxies for: `org.freedesktop.NetworkManager.Device.Statistics`, `org.freedesktop.NetworkManager.Device.Generic`, `org.freedesktop.NetworkManager.Device`
|
||||
//!
|
||||
//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data.
|
||||
//! Source: `Interface '/org/freedesktop/NetworkManager/Devices/1' from service 'org.freedesktop.NetworkManager' on system bus`.
|
||||
//!
|
||||
//! You may prefer to adapt it, instead of using it verbatim.
|
||||
//!
|
||||
//! More information can be found in the
|
||||
//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html)
|
||||
//! section of the zbus documentation.
|
||||
//!
|
||||
//! This DBus object implements
|
||||
//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html),
|
||||
//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used:
|
||||
//!
|
||||
//! * [`zbus::fdo::PropertiesProxy`]
|
||||
//! * [`zbus::fdo::IntrospectableProxy`]
|
||||
//! * [`zbus::fdo::PeerProxy`]
|
||||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
|
||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Statistics")]
|
||||
pub trait Statistics {
|
||||
/// RefreshRateMs property
|
||||
#[dbus_proxy(property)]
|
||||
fn refresh_rate_ms(&self) -> zbus::Result<u32>;
|
||||
#[dbus_proxy(property)]
|
||||
fn set_refresh_rate_ms(&self, value: u32) -> zbus::Result<()>;
|
||||
|
||||
/// RxBytes property
|
||||
#[dbus_proxy(property)]
|
||||
fn rx_bytes(&self) -> zbus::Result<u64>;
|
||||
|
||||
/// TxBytes property
|
||||
#[dbus_proxy(property)]
|
||||
fn tx_bytes(&self) -> zbus::Result<u64>;
|
||||
}
|
||||
|
||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Generic")]
|
||||
pub trait Generic {
|
||||
/// HwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
fn hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// TypeDescription property
|
||||
#[dbus_proxy(property)]
|
||||
fn type_description(&self) -> zbus::Result<String>;
|
||||
}
|
||||
|
||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device")]
|
||||
pub trait Device {
|
||||
/// Delete method
|
||||
fn delete(&self) -> zbus::Result<()>;
|
||||
|
||||
/// Disconnect method
|
||||
fn disconnect(&self) -> zbus::Result<()>;
|
||||
|
||||
/// GetAppliedConnection method
|
||||
fn get_applied_connection(
|
||||
&self,
|
||||
flags: u32,
|
||||
) -> zbus::Result<(
|
||||
std::collections::HashMap<
|
||||
String,
|
||||
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
|
||||
>,
|
||||
u64,
|
||||
)>;
|
||||
|
||||
/// Reapply method
|
||||
fn reapply(
|
||||
&self,
|
||||
connection: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
version_id: u64,
|
||||
flags: u32,
|
||||
) -> zbus::Result<()>;
|
||||
|
||||
/// ActiveConnection property
|
||||
#[dbus_proxy(property)]
|
||||
fn active_connection(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Autoconnect property
|
||||
#[dbus_proxy(property)]
|
||||
fn autoconnect(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
fn set_autoconnect(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// AvailableConnections property
|
||||
#[dbus_proxy(property)]
|
||||
fn available_connections(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// Capabilities property
|
||||
#[dbus_proxy(property)]
|
||||
fn capabilities(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// DeviceType property
|
||||
#[dbus_proxy(property)]
|
||||
fn device_type(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Dhcp4Config property
|
||||
#[dbus_proxy(property)]
|
||||
fn dhcp4_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Dhcp6Config property
|
||||
#[dbus_proxy(property)]
|
||||
fn dhcp6_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Driver property
|
||||
#[dbus_proxy(property)]
|
||||
fn driver(&self) -> zbus::Result<String>;
|
||||
|
||||
/// DriverVersion property
|
||||
#[dbus_proxy(property)]
|
||||
fn driver_version(&self) -> zbus::Result<String>;
|
||||
|
||||
/// FirmwareMissing property
|
||||
#[dbus_proxy(property)]
|
||||
fn firmware_missing(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// FirmwareVersion property
|
||||
#[dbus_proxy(property)]
|
||||
fn firmware_version(&self) -> zbus::Result<String>;
|
||||
|
||||
/// HwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
fn hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Interface property
|
||||
#[dbus_proxy(property)]
|
||||
fn interface(&self) -> zbus::Result<String>;
|
||||
|
||||
/// InterfaceFlags property
|
||||
#[dbus_proxy(property)]
|
||||
fn interface_flags(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Ip4Address property
|
||||
#[dbus_proxy(property)]
|
||||
fn ip4_address(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Ip4Config property
|
||||
#[dbus_proxy(property)]
|
||||
fn ip4_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Ip4Connectivity property
|
||||
#[dbus_proxy(property)]
|
||||
fn ip4_connectivity(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Ip6Config property
|
||||
#[dbus_proxy(property)]
|
||||
fn ip6_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Ip6Connectivity property
|
||||
#[dbus_proxy(property)]
|
||||
fn ip6_connectivity(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// IpInterface property
|
||||
#[dbus_proxy(property)]
|
||||
fn ip_interface(&self) -> zbus::Result<String>;
|
||||
|
||||
/// LldpNeighbors property
|
||||
#[dbus_proxy(property)]
|
||||
fn lldp_neighbors(
|
||||
&self,
|
||||
) -> zbus::Result<Vec<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>>;
|
||||
|
||||
/// Managed property
|
||||
#[dbus_proxy(property)]
|
||||
fn managed(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
fn set_managed(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// Metered property
|
||||
#[dbus_proxy(property)]
|
||||
fn metered(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Mtu property
|
||||
#[dbus_proxy(property)]
|
||||
fn mtu(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// NmPluginMissing property
|
||||
#[dbus_proxy(property)]
|
||||
fn nm_plugin_missing(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// Path property
|
||||
#[dbus_proxy(property)]
|
||||
fn path(&self) -> zbus::Result<String>;
|
||||
|
||||
/// PhysicalPortId property
|
||||
#[dbus_proxy(property)]
|
||||
fn physical_port_id(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Real property
|
||||
#[dbus_proxy(property)]
|
||||
fn real(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// State property
|
||||
#[dbus_proxy(property)]
|
||||
fn state(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// StateReason property
|
||||
#[dbus_proxy(property)]
|
||||
fn state_reason(&self) -> zbus::Result<(u32, u32)>;
|
||||
|
||||
/// Udi property
|
||||
#[dbus_proxy(property)]
|
||||
fn udi(&self) -> zbus::Result<String>;
|
||||
}
|
||||
250
networkmanager/src/interface/mod.rs
Normal file
250
networkmanager/src/interface/mod.rs
Normal file
|
|
@ -0,0 +1,250 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
//! # DBus interface proxy for: `org.freedesktop.NetworkManager`
|
||||
//!
|
||||
//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data.
|
||||
//! Source: `Interface '/org/freedesktop/NetworkManager' from service 'org.freedesktop.NetworkManager' on system bus`.
|
||||
//!
|
||||
//! You may prefer to adapt it, instead of using it verbatim.
|
||||
//!
|
||||
//! More information can be found in the
|
||||
//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html)
|
||||
//! section of the zbus documentation.
|
||||
//!
|
||||
//! This DBus object implements
|
||||
//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html),
|
||||
//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used:
|
||||
//!
|
||||
//! * [`zbus::fdo::PropertiesProxy`]
|
||||
//! * [`zbus::fdo::IntrospectableProxy`]
|
||||
//! * [`zbus::fdo::PeerProxy`]
|
||||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
pub mod device;
|
||||
pub mod settings;
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
|
||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager")]
|
||||
pub trait NetworkManager {
|
||||
/// ActivateConnection method
|
||||
fn activate_connection(
|
||||
&self,
|
||||
connection: &zbus::zvariant::ObjectPath<'_>,
|
||||
device: &zbus::zvariant::ObjectPath<'_>,
|
||||
specific_object: &zbus::zvariant::ObjectPath<'_>,
|
||||
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// AddAndActivateConnection method
|
||||
fn add_and_activate_connection(
|
||||
&self,
|
||||
connection: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
device: &zbus::zvariant::ObjectPath<'_>,
|
||||
specific_object: &zbus::zvariant::ObjectPath<'_>,
|
||||
) -> zbus::Result<(
|
||||
zbus::zvariant::OwnedObjectPath,
|
||||
zbus::zvariant::OwnedObjectPath,
|
||||
)>;
|
||||
|
||||
/// AddAndActivateConnection2 method
|
||||
fn add_and_activate_connection2(
|
||||
&self,
|
||||
connection: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
device: &zbus::zvariant::ObjectPath<'_>,
|
||||
specific_object: &zbus::zvariant::ObjectPath<'_>,
|
||||
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
) -> zbus::Result<(
|
||||
zbus::zvariant::OwnedObjectPath,
|
||||
zbus::zvariant::OwnedObjectPath,
|
||||
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
|
||||
)>;
|
||||
|
||||
/// CheckConnectivity method
|
||||
fn check_connectivity(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// CheckpointAdjustRollbackTimeout method
|
||||
fn checkpoint_adjust_rollback_timeout(
|
||||
&self,
|
||||
checkpoint: &zbus::zvariant::ObjectPath<'_>,
|
||||
add_timeout: u32,
|
||||
) -> zbus::Result<()>;
|
||||
|
||||
/// CheckpointCreate method
|
||||
fn checkpoint_create(
|
||||
&self,
|
||||
devices: &[zbus::zvariant::ObjectPath<'_>],
|
||||
rollback_timeout: u32,
|
||||
flags: u32,
|
||||
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// CheckpointDestroy method
|
||||
fn checkpoint_destroy(&self, checkpoint: &zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// CheckpointRollback method
|
||||
fn checkpoint_rollback(
|
||||
&self,
|
||||
checkpoint: &zbus::zvariant::ObjectPath<'_>,
|
||||
) -> zbus::Result<std::collections::HashMap<String, u32>>;
|
||||
|
||||
/// DeactivateConnection method
|
||||
fn deactivate_connection(
|
||||
&self,
|
||||
active_connection: &zbus::zvariant::ObjectPath<'_>,
|
||||
) -> zbus::Result<()>;
|
||||
|
||||
/// Enable method
|
||||
fn enable(&self, enable: bool) -> zbus::Result<()>;
|
||||
|
||||
/// GetAllDevices method
|
||||
fn get_all_devices(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// GetDeviceByIpIface method
|
||||
fn get_device_by_ip_iface(&self, iface: &str) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// GetDevices method
|
||||
fn get_devices(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// GetLogging method
|
||||
fn get_logging(&self) -> zbus::Result<(String, String)>;
|
||||
|
||||
/// GetPermissions method
|
||||
fn get_permissions(&self) -> zbus::Result<std::collections::HashMap<String, String>>;
|
||||
|
||||
/// Reload method
|
||||
fn reload(&self, flags: u32) -> zbus::Result<()>;
|
||||
|
||||
/// SetLogging method
|
||||
fn set_logging(&self, level: &str, domains: &str) -> zbus::Result<()>;
|
||||
|
||||
/// Sleep method
|
||||
fn sleep(&self, sleep: bool) -> zbus::Result<()>;
|
||||
|
||||
/// CheckPermissions signal
|
||||
#[dbus_proxy(signal)]
|
||||
fn check_permissions(&self) -> zbus::Result<()>;
|
||||
|
||||
/// DeviceAdded signal
|
||||
#[dbus_proxy(signal)]
|
||||
fn device_added(&self, device_path: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// DeviceRemoved signal
|
||||
#[dbus_proxy(signal)]
|
||||
fn device_removed(&self, device_path: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// ActivatingConnection property
|
||||
#[dbus_proxy(property)]
|
||||
fn activating_connection(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// ActiveConnections property
|
||||
#[dbus_proxy(property)]
|
||||
fn active_connections(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// AllDevices property
|
||||
#[dbus_proxy(property)]
|
||||
fn all_devices(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// Capabilities property
|
||||
#[dbus_proxy(property)]
|
||||
fn capabilities(&self) -> zbus::Result<Vec<u32>>;
|
||||
|
||||
/// Checkpoints property
|
||||
#[dbus_proxy(property)]
|
||||
fn checkpoints(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// Connectivity property
|
||||
#[dbus_proxy(property)]
|
||||
fn connectivity(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// ConnectivityCheckAvailable property
|
||||
#[dbus_proxy(property)]
|
||||
fn connectivity_check_available(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// ConnectivityCheckEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
fn connectivity_check_enabled(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
fn set_connectivity_check_enabled(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// ConnectivityCheckUri property
|
||||
#[dbus_proxy(property)]
|
||||
fn connectivity_check_uri(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Devices property
|
||||
#[dbus_proxy(property)]
|
||||
fn devices(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// GlobalDnsConfiguration property
|
||||
#[dbus_proxy(property)]
|
||||
fn global_dns_configuration(
|
||||
&self,
|
||||
) -> zbus::Result<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>;
|
||||
#[dbus_proxy(property)]
|
||||
fn set_global_dns_configuration(
|
||||
&self,
|
||||
value: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
) -> zbus::Result<()>;
|
||||
|
||||
/// Metered property
|
||||
#[dbus_proxy(property)]
|
||||
fn metered(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// NetworkingEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
fn networking_enabled(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// PrimaryConnection property
|
||||
#[dbus_proxy(property)]
|
||||
fn primary_connection(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// PrimaryConnectionType property
|
||||
#[dbus_proxy(property)]
|
||||
fn primary_connection_type(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Startup property
|
||||
#[dbus_proxy(property)]
|
||||
fn startup(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// State property
|
||||
#[dbus_proxy(property)]
|
||||
fn state(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Version property
|
||||
#[dbus_proxy(property)]
|
||||
fn version(&self) -> zbus::Result<String>;
|
||||
|
||||
/// WimaxEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
fn wimax_enabled(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
fn set_wimax_enabled(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// WimaxHardwareEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
fn wimax_hardware_enabled(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// WirelessEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
fn wireless_enabled(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
fn set_wireless_enabled(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// WirelessHardwareEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
fn wireless_hardware_enabled(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// WwanEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
fn wwan_enabled(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
fn set_wwan_enabled(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// WwanHardwareEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
fn wwan_hardware_enabled(&self) -> zbus::Result<bool>;
|
||||
}
|
||||
175
networkmanager/src/interface/settings.rs
Normal file
175
networkmanager/src/interface/settings.rs
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
//! # DBus interface proxy for: `org.freedesktop.NetworkManager.Settings`, `org.freedesktop.NetworkManager.Settings.Connection`
|
||||
//!
|
||||
//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data.
|
||||
//! Source: `Interface '/org/freedesktop/NetworkManager/Settings' from service 'org.freedesktop.NetworkManager' on system bus`.
|
||||
//!
|
||||
//! You may prefer to adapt it, instead of using it verbatim.
|
||||
//!
|
||||
//! More information can be found in the
|
||||
//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html)
|
||||
//! section of the zbus documentation.
|
||||
//!
|
||||
//! This DBus object implements
|
||||
//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html),
|
||||
//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used:
|
||||
//!
|
||||
//! * [`zbus::fdo::PropertiesProxy`]
|
||||
//! * [`zbus::fdo::IntrospectableProxy`]
|
||||
//! * [`zbus::fdo::PeerProxy`]
|
||||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
|
||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Settings")]
|
||||
pub trait Settings {
|
||||
/// AddConnection method
|
||||
fn add_connection(
|
||||
&self,
|
||||
connection: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// AddConnection2 method
|
||||
fn add_connection2(
|
||||
&self,
|
||||
settings: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
flags: u32,
|
||||
args: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
) -> zbus::Result<(
|
||||
zbus::zvariant::OwnedObjectPath,
|
||||
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
|
||||
)>;
|
||||
|
||||
/// AddConnectionUnsaved method
|
||||
fn add_connection_unsaved(
|
||||
&self,
|
||||
connection: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// GetConnectionByUuid method
|
||||
fn get_connection_by_uuid(&self, uuid: &str) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// ListConnections method
|
||||
fn list_connections(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// LoadConnections method
|
||||
fn load_connections(&self, filenames: &[&str]) -> zbus::Result<(bool, Vec<String>)>;
|
||||
|
||||
/// ReloadConnections method
|
||||
fn reload_connections(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// SaveHostname method
|
||||
fn save_hostname(&self, hostname: &str) -> zbus::Result<()>;
|
||||
|
||||
/// ConnectionRemoved signal
|
||||
#[dbus_proxy(signal)]
|
||||
fn connection_removed(&self, connection: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// NewConnection signal
|
||||
#[dbus_proxy(signal)]
|
||||
fn new_connection(&self, connection: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// CanModify property
|
||||
#[dbus_proxy(property)]
|
||||
fn can_modify(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// Connections property
|
||||
#[dbus_proxy(property)]
|
||||
fn connections(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// Hostname property
|
||||
#[dbus_proxy(property)]
|
||||
fn hostname(&self) -> zbus::Result<String>;
|
||||
}
|
||||
|
||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Settings.Connection")]
|
||||
pub trait Connection {
|
||||
/// ClearSecrets method
|
||||
fn clear_secrets(&self) -> zbus::Result<()>;
|
||||
|
||||
/// Delete method
|
||||
fn delete(&self) -> zbus::Result<()>;
|
||||
|
||||
/// GetSecrets method
|
||||
fn get_secrets(
|
||||
&self,
|
||||
setting_name: &str,
|
||||
) -> zbus::Result<
|
||||
std::collections::HashMap<
|
||||
String,
|
||||
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
|
||||
>,
|
||||
>;
|
||||
|
||||
/// GetSettings method
|
||||
fn get_settings(
|
||||
&self,
|
||||
) -> zbus::Result<
|
||||
std::collections::HashMap<
|
||||
String,
|
||||
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
|
||||
>,
|
||||
>;
|
||||
|
||||
/// Save method
|
||||
fn save(&self) -> zbus::Result<()>;
|
||||
|
||||
/// Update method
|
||||
fn update(
|
||||
&self,
|
||||
properties: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
) -> zbus::Result<()>;
|
||||
|
||||
/// Update2 method
|
||||
fn update2(
|
||||
&self,
|
||||
settings: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
flags: u32,
|
||||
args: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
) -> zbus::Result<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>;
|
||||
|
||||
/// UpdateUnsaved method
|
||||
fn update_unsaved(
|
||||
&self,
|
||||
properties: std::collections::HashMap<
|
||||
&str,
|
||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
>,
|
||||
) -> zbus::Result<()>;
|
||||
|
||||
/// Removed signal
|
||||
#[dbus_proxy(signal)]
|
||||
fn removed(&self) -> zbus::Result<()>;
|
||||
|
||||
/// Updated signal
|
||||
#[dbus_proxy(signal)]
|
||||
fn updated(&self) -> zbus::Result<()>;
|
||||
|
||||
/// Filename property
|
||||
#[dbus_proxy(property)]
|
||||
fn filename(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Flags property
|
||||
#[dbus_proxy(property)]
|
||||
fn flags(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Unsaved property
|
||||
#[dbus_proxy(property)]
|
||||
fn unsaved(&self) -> zbus::Result<bool>;
|
||||
}
|
||||
3
networkmanager/src/lib.rs
Normal file
3
networkmanager/src/lib.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
pub mod interface;
|
||||
Loading…
Add table
Add a link
Reference in a new issue