summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock971
-rw-r--r--Cargo.toml10
-rw-r--r--build.rs7
-rw-r--r--derivation.nix16
-rw-r--r--spec.json2
-rw-r--r--spec.nix2
-rw-r--r--src/main.rs20
-rw-r--r--src/pa_eq/dbus_api/equalizing_manager.rs291
-rw-r--r--src/pa_eq/dbus_api/mod.rs6
-rw-r--r--src/pa_eq/dbus_api/server_lookup.rs188
-rw-r--r--src/pa_eq/dbus_api/sink.rs1128
-rw-r--r--src/pa_eq/mod.rs115
-rw-r--r--src/utils.rs31
13 files changed, 356 insertions, 2431 deletions
diff --git a/Cargo.lock b/Cargo.lock
index e5b425d..24056de 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,1059 +1,764 @@
1# This file is automatically @generated by Cargo. 1# This file is automatically @generated by Cargo.
2# It is not intended for manual editing. 2# It is not intended for manual editing.
3[[package]] 3[[package]]
4name = "addr2line"
5version = "0.15.1"
6source = "registry+https://github.com/rust-lang/crates.io-index"
7checksum = "03345e98af8f3d786b6d9f656ccfa6ac316d954e92bc4841f0bba20789d5fb5a"
8dependencies = [
9 "gimli",
10]
11
12[[package]]
13name = "adler"
14version = "1.0.2"
15source = "registry+https://github.com/rust-lang/crates.io-index"
16checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
17
18[[package]]
4name = "aho-corasick" 19name = "aho-corasick"
5version = "0.7.6" 20version = "0.7.18"
6source = "registry+https://github.com/rust-lang/crates.io-index" 21source = "registry+https://github.com/rust-lang/crates.io-index"
22checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
7dependencies = [ 23dependencies = [
8 "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 24 "memchr",
9] 25]
10 26
11[[package]] 27[[package]]
12name = "ansi_term" 28name = "ansi_term"
13version = "0.11.0" 29version = "0.11.0"
14source = "registry+https://github.com/rust-lang/crates.io-index" 30source = "registry+https://github.com/rust-lang/crates.io-index"
31checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
15dependencies = [ 32dependencies = [
16 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 33 "winapi",
17] 34]
18 35
19[[package]] 36[[package]]
20name = "arrayref" 37name = "arrayref"
21version = "0.3.5" 38version = "0.3.6"
22source = "registry+https://github.com/rust-lang/crates.io-index" 39source = "registry+https://github.com/rust-lang/crates.io-index"
40checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
23 41
24[[package]] 42[[package]]
25name = "arrayvec" 43name = "arrayvec"
26version = "0.5.1" 44version = "0.5.2"
27source = "registry+https://github.com/rust-lang/crates.io-index" 45source = "registry+https://github.com/rust-lang/crates.io-index"
46checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
28 47
29[[package]] 48[[package]]
30name = "ascii-canvas" 49name = "ascii-canvas"
31version = "2.0.0" 50version = "2.0.0"
32source = "registry+https://github.com/rust-lang/crates.io-index" 51source = "registry+https://github.com/rust-lang/crates.io-index"
52checksum = "ff8eb72df928aafb99fe5d37b383f2fe25bd2a765e3e5f7c365916b6f2463a29"
33dependencies = [ 53dependencies = [
34 "term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 54 "term",
35] 55]
36 56
37[[package]] 57[[package]]
38name = "atty" 58name = "atty"
39version = "0.2.13" 59version = "0.2.14"
40source = "registry+https://github.com/rust-lang/crates.io-index" 60source = "registry+https://github.com/rust-lang/crates.io-index"
61checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
41dependencies = [ 62dependencies = [
42 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 63 "hermit-abi",
43 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 64 "libc",
65 "winapi",
44] 66]
45 67
46[[package]] 68[[package]]
47name = "autocfg" 69name = "autocfg"
48version = "0.1.7" 70version = "1.0.1"
49source = "registry+https://github.com/rust-lang/crates.io-index" 71source = "registry+https://github.com/rust-lang/crates.io-index"
72checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
50 73
51[[package]] 74[[package]]
52name = "backtrace" 75name = "backtrace"
53version = "0.3.40" 76version = "0.3.59"
54source = "registry+https://github.com/rust-lang/crates.io-index" 77source = "registry+https://github.com/rust-lang/crates.io-index"
78checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744"
55dependencies = [ 79dependencies = [
56 "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", 80 "addr2line",
57 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 81 "cc",
58 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 82 "cfg-if",
59 "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 83 "libc",
60] 84 "miniz_oxide",
61 85 "object",
62[[package]] 86 "rustc-demangle",
63name = "backtrace-sys"
64version = "0.1.32"
65source = "registry+https://github.com/rust-lang/crates.io-index"
66dependencies = [
67 "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)",
68 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
69] 87]
70 88
71[[package]] 89[[package]]
72name = "base64" 90name = "base64"
73version = "0.10.1" 91version = "0.13.0"
74source = "registry+https://github.com/rust-lang/crates.io-index" 92source = "registry+https://github.com/rust-lang/crates.io-index"
75dependencies = [ 93checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
76 "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
77]
78 94
79[[package]] 95[[package]]
80name = "bit-set" 96name = "bit-set"
81version = "0.5.1" 97version = "0.5.2"
82source = "registry+https://github.com/rust-lang/crates.io-index" 98source = "registry+https://github.com/rust-lang/crates.io-index"
99checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de"
83dependencies = [ 100dependencies = [
84 "bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 101 "bit-vec",
85] 102]
86 103
87[[package]] 104[[package]]
88name = "bit-vec" 105name = "bit-vec"
89version = "0.5.1" 106version = "0.6.3"
90source = "registry+https://github.com/rust-lang/crates.io-index" 107source = "registry+https://github.com/rust-lang/crates.io-index"
108checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
91 109
92[[package]] 110[[package]]
93name = "bitflags" 111name = "bitflags"
94version = "1.2.1" 112version = "1.2.1"
95source = "registry+https://github.com/rust-lang/crates.io-index" 113source = "registry+https://github.com/rust-lang/crates.io-index"
114checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
96 115
97[[package]] 116[[package]]
98name = "blake2b_simd" 117name = "blake2b_simd"
99version = "0.5.9" 118version = "0.5.11"
100source = "registry+https://github.com/rust-lang/crates.io-index"
101dependencies = [
102 "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
103 "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
104 "constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
105]
106
107[[package]]
108name = "block-buffer"
109version = "0.7.3"
110source = "registry+https://github.com/rust-lang/crates.io-index"
111dependencies = [
112 "block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
113 "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
114 "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
115 "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
116]
117
118[[package]]
119name = "block-padding"
120version = "0.1.5"
121source = "registry+https://github.com/rust-lang/crates.io-index" 119source = "registry+https://github.com/rust-lang/crates.io-index"
120checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587"
122dependencies = [ 121dependencies = [
123 "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 122 "arrayref",
123 "arrayvec",
124 "constant_time_eq",
124] 125]
125 126
126[[package]] 127[[package]]
127name = "byte-tools"
128version = "0.3.1"
129source = "registry+https://github.com/rust-lang/crates.io-index"
130
131[[package]]
132name = "byteorder" 128name = "byteorder"
133version = "1.3.2" 129version = "1.4.3"
134source = "registry+https://github.com/rust-lang/crates.io-index" 130source = "registry+https://github.com/rust-lang/crates.io-index"
131checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
135 132
136[[package]] 133[[package]]
137name = "cc" 134name = "cc"
138version = "1.0.48" 135version = "1.0.67"
139source = "registry+https://github.com/rust-lang/crates.io-index" 136source = "registry+https://github.com/rust-lang/crates.io-index"
137checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
140 138
141[[package]] 139[[package]]
142name = "cfg-if" 140name = "cfg-if"
143version = "0.1.10" 141version = "1.0.0"
144source = "registry+https://github.com/rust-lang/crates.io-index"
145
146[[package]]
147name = "chrono"
148version = "0.4.10"
149source = "registry+https://github.com/rust-lang/crates.io-index" 142source = "registry+https://github.com/rust-lang/crates.io-index"
150dependencies = [ 143checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
151 "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
152 "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
153 "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
154]
155 144
156[[package]] 145[[package]]
157name = "clap" 146name = "clap"
158version = "2.33.0" 147version = "2.33.3"
159source = "registry+https://github.com/rust-lang/crates.io-index" 148source = "registry+https://github.com/rust-lang/crates.io-index"
149checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
160dependencies = [ 150dependencies = [
161 "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 151 "ansi_term",
162 "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 152 "atty",
163 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 153 "bitflags",
164 "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 154 "strsim",
165 "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 155 "textwrap",
166 "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 156 "unicode-width",
167 "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 157 "vec_map",
168]
169
170[[package]]
171name = "cloudabi"
172version = "0.0.3"
173source = "registry+https://github.com/rust-lang/crates.io-index"
174dependencies = [
175 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
176] 158]
177 159
178[[package]] 160[[package]]
179name = "constant_time_eq" 161name = "constant_time_eq"
180version = "0.1.4" 162version = "0.1.5"
181source = "registry+https://github.com/rust-lang/crates.io-index" 163source = "registry+https://github.com/rust-lang/crates.io-index"
164checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
182 165
183[[package]] 166[[package]]
184name = "crossbeam-utils" 167name = "crossbeam-utils"
185version = "0.6.6" 168version = "0.8.4"
186source = "registry+https://github.com/rust-lang/crates.io-index" 169source = "registry+https://github.com/rust-lang/crates.io-index"
170checksum = "4feb231f0d4d6af81aed15928e58ecf5816aa62a2393e2c82f46973e92a9a278"
187dependencies = [ 171dependencies = [
188 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 172 "autocfg",
189 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 173 "cfg-if",
174 "lazy_static",
190] 175]
191 176
192[[package]] 177[[package]]
193name = "dbus" 178name = "crunchy"
194version = "0.6.5" 179version = "0.2.2"
195source = "registry+https://github.com/rust-lang/crates.io-index" 180source = "registry+https://github.com/rust-lang/crates.io-index"
196dependencies = [ 181checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
197 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
198 "libdbus-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
199]
200 182
201[[package]] 183[[package]]
202name = "diff" 184name = "diff"
203version = "0.1.12" 185version = "0.1.12"
204source = "registry+https://github.com/rust-lang/crates.io-index" 186source = "registry+https://github.com/rust-lang/crates.io-index"
205 187checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499"
206[[package]]
207name = "digest"
208version = "0.8.1"
209source = "registry+https://github.com/rust-lang/crates.io-index"
210dependencies = [
211 "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
212]
213 188
214[[package]] 189[[package]]
215name = "dirs" 190name = "dirs"
216version = "1.0.5" 191version = "1.0.5"
217source = "registry+https://github.com/rust-lang/crates.io-index" 192source = "registry+https://github.com/rust-lang/crates.io-index"
193checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901"
218dependencies = [ 194dependencies = [
219 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 195 "libc",
220 "redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 196 "redox_users",
221 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 197 "winapi",
222]
223
224[[package]]
225name = "docopt"
226version = "1.1.0"
227source = "registry+https://github.com/rust-lang/crates.io-index"
228dependencies = [
229 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
230 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
231 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
232 "strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)",
233] 198]
234 199
235[[package]] 200[[package]]
236name = "either" 201name = "either"
237version = "1.5.3" 202version = "1.6.1"
238source = "registry+https://github.com/rust-lang/crates.io-index" 203source = "registry+https://github.com/rust-lang/crates.io-index"
204checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
239 205
240[[package]] 206[[package]]
241name = "ena" 207name = "ena"
242version = "0.13.1" 208version = "0.14.0"
243source = "registry+https://github.com/rust-lang/crates.io-index" 209source = "registry+https://github.com/rust-lang/crates.io-index"
210checksum = "d7402b94a93c24e742487327a7cd839dc9d36fec9de9fb25b09f2dae459f36c3"
244dependencies = [ 211dependencies = [
245 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 212 "log",
246] 213]
247 214
248[[package]] 215[[package]]
249name = "env_logger" 216name = "env_logger"
250version = "0.6.2" 217version = "0.7.1"
251source = "registry+https://github.com/rust-lang/crates.io-index" 218source = "registry+https://github.com/rust-lang/crates.io-index"
219checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
252dependencies = [ 220dependencies = [
253 "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 221 "atty",
254 "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 222 "humantime",
255 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 223 "log",
256 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 224 "regex",
257 "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 225 "termcolor",
258] 226]
259 227
260[[package]] 228[[package]]
261name = "failure" 229name = "failure"
262version = "0.1.6" 230version = "0.1.8"
263source = "registry+https://github.com/rust-lang/crates.io-index" 231source = "registry+https://github.com/rust-lang/crates.io-index"
232checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86"
264dependencies = [ 233dependencies = [
265 "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", 234 "backtrace",
266 "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 235 "failure_derive",
267] 236]
268 237
269[[package]] 238[[package]]
270name = "failure_derive" 239name = "failure_derive"
271version = "0.1.6" 240version = "0.1.8"
272source = "registry+https://github.com/rust-lang/crates.io-index" 241source = "registry+https://github.com/rust-lang/crates.io-index"
242checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
273dependencies = [ 243dependencies = [
274 "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 244 "proc-macro2",
275 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 245 "quote",
276 "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", 246 "syn",
277 "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", 247 "synstructure",
278] 248]
279 249
280[[package]] 250[[package]]
281name = "fake-simd" 251name = "fixedbitset"
282version = "0.1.2" 252version = "0.2.0"
283source = "registry+https://github.com/rust-lang/crates.io-index" 253source = "registry+https://github.com/rust-lang/crates.io-index"
254checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"
284 255
285[[package]] 256[[package]]
286name = "fixedbitset" 257name = "getrandom"
287version = "0.1.9" 258version = "0.1.16"
288source = "registry+https://github.com/rust-lang/crates.io-index" 259source = "registry+https://github.com/rust-lang/crates.io-index"
260checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
261dependencies = [
262 "cfg-if",
263 "libc",
264 "wasi",
265]
289 266
290[[package]] 267[[package]]
291name = "fuchsia-cprng" 268name = "gimli"
292version = "0.1.1" 269version = "0.24.0"
270source = "registry+https://github.com/rust-lang/crates.io-index"
271checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189"
272
273[[package]]
274name = "hashbrown"
275version = "0.9.1"
293source = "registry+https://github.com/rust-lang/crates.io-index" 276source = "registry+https://github.com/rust-lang/crates.io-index"
277checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
294 278
295[[package]] 279[[package]]
296name = "generic-array" 280name = "heck"
297version = "0.12.3" 281version = "0.3.2"
298source = "registry+https://github.com/rust-lang/crates.io-index" 282source = "registry+https://github.com/rust-lang/crates.io-index"
283checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac"
299dependencies = [ 284dependencies = [
300 "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", 285 "unicode-segmentation",
301] 286]
302 287
303[[package]] 288[[package]]
304name = "heck" 289name = "hermit-abi"
305version = "0.3.1" 290version = "0.1.18"
306source = "registry+https://github.com/rust-lang/crates.io-index" 291source = "registry+https://github.com/rust-lang/crates.io-index"
292checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
307dependencies = [ 293dependencies = [
308 "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 294 "libc",
309] 295]
310 296
311[[package]] 297[[package]]
312name = "humantime" 298name = "humantime"
313version = "1.3.0" 299version = "1.3.0"
314source = "registry+https://github.com/rust-lang/crates.io-index" 300source = "registry+https://github.com/rust-lang/crates.io-index"
301checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
315dependencies = [ 302dependencies = [
316 "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 303 "quick-error",
304]
305
306[[package]]
307name = "indexmap"
308version = "1.6.2"
309source = "registry+https://github.com/rust-lang/crates.io-index"
310checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3"
311dependencies = [
312 "autocfg",
313 "hashbrown",
317] 314]
318 315
319[[package]] 316[[package]]
320name = "itertools" 317name = "itertools"
321version = "0.8.2" 318version = "0.10.0"
322source = "registry+https://github.com/rust-lang/crates.io-index" 319source = "registry+https://github.com/rust-lang/crates.io-index"
320checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319"
323dependencies = [ 321dependencies = [
324 "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 322 "either",
325] 323]
326 324
327[[package]] 325[[package]]
328name = "itoa" 326name = "itoa"
329version = "0.4.4" 327version = "0.4.7"
330source = "registry+https://github.com/rust-lang/crates.io-index" 328source = "registry+https://github.com/rust-lang/crates.io-index"
329checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
331 330
332[[package]] 331[[package]]
333name = "lalrpop" 332name = "lalrpop"
334version = "0.17.2" 333version = "0.19.5"
335source = "registry+https://github.com/rust-lang/crates.io-index" 334source = "registry+https://github.com/rust-lang/crates.io-index"
335checksum = "46962a8c71b91c3524b117dfdd70844d4265a173c4c9109f98171aebdcf1195f"
336dependencies = [ 336dependencies = [
337 "ascii-canvas 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 337 "ascii-canvas",
338 "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 338 "atty",
339 "bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 339 "bit-set",
340 "diff 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 340 "diff",
341 "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 341 "ena",
342 "ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", 342 "itertools",
343 "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", 343 "lalrpop-util",
344 "lalrpop-util 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", 344 "petgraph",
345 "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", 345 "pico-args",
346 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 346 "regex",
347 "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 347 "regex-syntax",
348 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", 348 "string_cache",
349 "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", 349 "term",
350 "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 350 "tiny-keccak",
351 "string_cache 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", 351 "unicode-xid",
352 "term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
353 "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
354] 352]
355 353
356[[package]] 354[[package]]
357name = "lalrpop-util" 355name = "lalrpop-util"
358version = "0.17.2" 356version = "0.19.5"
359source = "registry+https://github.com/rust-lang/crates.io-index" 357source = "registry+https://github.com/rust-lang/crates.io-index"
358checksum = "7a708007b751af124d09e9c5d97515257902bc6b486a56b40bcafd939e8ff467"
359dependencies = [
360 "regex",
361]
360 362
361[[package]] 363[[package]]
362name = "lazy_static" 364name = "lazy_static"
363version = "1.4.0" 365version = "1.4.0"
364source = "registry+https://github.com/rust-lang/crates.io-index" 366source = "registry+https://github.com/rust-lang/crates.io-index"
367checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
365 368
366[[package]] 369[[package]]
367name = "libc" 370name = "libc"
368version = "0.2.66" 371version = "0.2.94"
369source = "registry+https://github.com/rust-lang/crates.io-index" 372source = "registry+https://github.com/rust-lang/crates.io-index"
370 373checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e"
371[[package]]
372name = "libdbus-sys"
373version = "0.2.1"
374source = "registry+https://github.com/rust-lang/crates.io-index"
375dependencies = [
376 "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
377]
378 374
379[[package]] 375[[package]]
380name = "log" 376name = "log"
381version = "0.4.8" 377version = "0.4.14"
382source = "registry+https://github.com/rust-lang/crates.io-index" 378source = "registry+https://github.com/rust-lang/crates.io-index"
379checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
383dependencies = [ 380dependencies = [
384 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 381 "cfg-if",
385] 382]
386 383
387[[package]] 384[[package]]
388name = "memchr" 385name = "memchr"
389version = "2.2.1" 386version = "2.4.0"
390source = "registry+https://github.com/rust-lang/crates.io-index"
391
392[[package]]
393name = "new_debug_unreachable"
394version = "1.0.4"
395source = "registry+https://github.com/rust-lang/crates.io-index" 387source = "registry+https://github.com/rust-lang/crates.io-index"
388checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc"
396 389
397[[package]] 390[[package]]
398name = "num-integer" 391name = "miniz_oxide"
399version = "0.1.41" 392version = "0.4.4"
400source = "registry+https://github.com/rust-lang/crates.io-index"
401dependencies = [
402 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
403 "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
404]
405
406[[package]]
407name = "num-traits"
408version = "0.2.10"
409source = "registry+https://github.com/rust-lang/crates.io-index" 393source = "registry+https://github.com/rust-lang/crates.io-index"
394checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
410dependencies = [ 395dependencies = [
411 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 396 "adler",
397 "autocfg",
412] 398]
413 399
414[[package]] 400[[package]]
415name = "opaque-debug" 401name = "new_debug_unreachable"
416version = "0.2.3" 402version = "1.0.4"
417source = "registry+https://github.com/rust-lang/crates.io-index" 403source = "registry+https://github.com/rust-lang/crates.io-index"
404checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
418 405
419[[package]] 406[[package]]
420name = "ordermap" 407name = "object"
421version = "0.3.5" 408version = "0.24.0"
422source = "registry+https://github.com/rust-lang/crates.io-index" 409source = "registry+https://github.com/rust-lang/crates.io-index"
410checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170"
423 411
424[[package]] 412[[package]]
425name = "petgraph" 413name = "petgraph"
426version = "0.4.13" 414version = "0.5.1"
427source = "registry+https://github.com/rust-lang/crates.io-index"
428dependencies = [
429 "fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
430 "ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
431]
432
433[[package]]
434name = "phf_generator"
435version = "0.7.24"
436source = "registry+https://github.com/rust-lang/crates.io-index" 415source = "registry+https://github.com/rust-lang/crates.io-index"
416checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7"
437dependencies = [ 417dependencies = [
438 "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 418 "fixedbitset",
439 "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 419 "indexmap",
440] 420]
441 421
442[[package]] 422[[package]]
443name = "phf_shared" 423name = "phf_shared"
444version = "0.7.24" 424version = "0.8.0"
445source = "registry+https://github.com/rust-lang/crates.io-index" 425source = "registry+https://github.com/rust-lang/crates.io-index"
426checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7"
446dependencies = [ 427dependencies = [
447 "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 428 "siphasher",
448] 429]
449 430
450[[package]] 431[[package]]
451name = "pkg-config" 432name = "pico-args"
452version = "0.3.17" 433version = "0.4.1"
453source = "registry+https://github.com/rust-lang/crates.io-index" 434source = "registry+https://github.com/rust-lang/crates.io-index"
435checksum = "7d7afeb98c5a10e0bffcc7fc16e105b04d06729fac5fd6384aebf7ff5cb5a67d"
454 436
455[[package]] 437[[package]]
456name = "precomputed-hash" 438name = "precomputed-hash"
457version = "0.1.1" 439version = "0.1.1"
458source = "registry+https://github.com/rust-lang/crates.io-index" 440source = "registry+https://github.com/rust-lang/crates.io-index"
441checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
459 442
460[[package]] 443[[package]]
461name = "pretty_env_logger" 444name = "pretty_env_logger"
462version = "0.3.1" 445version = "0.4.0"
463source = "registry+https://github.com/rust-lang/crates.io-index" 446source = "registry+https://github.com/rust-lang/crates.io-index"
447checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d"
464dependencies = [ 448dependencies = [
465 "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", 449 "env_logger",
466 "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 450 "log",
467 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
468] 451]
469 452
470[[package]] 453[[package]]
471name = "proc-macro-error" 454name = "proc-macro-error"
472version = "0.4.4" 455version = "1.0.4"
473source = "registry+https://github.com/rust-lang/crates.io-index" 456source = "registry+https://github.com/rust-lang/crates.io-index"
457checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
474dependencies = [ 458dependencies = [
475 "proc-macro-error-attr 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 459 "proc-macro-error-attr",
476 "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 460 "proc-macro2",
477 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 461 "quote",
478 "rustversion 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 462 "syn",
479 "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", 463 "version_check",
480] 464]
481 465
482[[package]] 466[[package]]
483name = "proc-macro-error-attr" 467name = "proc-macro-error-attr"
484version = "0.4.3" 468version = "1.0.4"
485source = "registry+https://github.com/rust-lang/crates.io-index" 469source = "registry+https://github.com/rust-lang/crates.io-index"
470checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
486dependencies = [ 471dependencies = [
487 "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 472 "proc-macro2",
488 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 473 "quote",
489 "rustversion 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 474 "version_check",
490 "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
491 "syn-mid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
492] 475]
493 476
494[[package]] 477[[package]]
495name = "proc-macro2" 478name = "proc-macro2"
496version = "1.0.7" 479version = "1.0.27"
497source = "registry+https://github.com/rust-lang/crates.io-index" 480source = "registry+https://github.com/rust-lang/crates.io-index"
481checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
498dependencies = [ 482dependencies = [
499 "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 483 "unicode-xid",
500] 484]
501 485
502[[package]] 486[[package]]
503name = "quick-error" 487name = "quick-error"
504version = "1.2.3" 488version = "1.2.3"
505source = "registry+https://github.com/rust-lang/crates.io-index" 489source = "registry+https://github.com/rust-lang/crates.io-index"
490checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
506 491
507[[package]] 492[[package]]
508name = "quote" 493name = "quote"
509version = "1.0.2" 494version = "1.0.9"
510source = "registry+https://github.com/rust-lang/crates.io-index"
511dependencies = [
512 "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
513]
514
515[[package]]
516name = "rand"
517version = "0.6.5"
518source = "registry+https://github.com/rust-lang/crates.io-index"
519dependencies = [
520 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
521 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
522 "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
523 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
524 "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
525 "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
526 "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
527 "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
528 "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
529 "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
530 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
531]
532
533[[package]]
534name = "rand_chacha"
535version = "0.1.1"
536source = "registry+https://github.com/rust-lang/crates.io-index"
537dependencies = [
538 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
539 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
540]
541
542[[package]]
543name = "rand_core"
544version = "0.3.1"
545source = "registry+https://github.com/rust-lang/crates.io-index"
546dependencies = [
547 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
548]
549
550[[package]]
551name = "rand_core"
552version = "0.4.2"
553source = "registry+https://github.com/rust-lang/crates.io-index"
554
555[[package]]
556name = "rand_hc"
557version = "0.1.0"
558source = "registry+https://github.com/rust-lang/crates.io-index"
559dependencies = [
560 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
561]
562
563[[package]]
564name = "rand_isaac"
565version = "0.1.1"
566source = "registry+https://github.com/rust-lang/crates.io-index"
567dependencies = [
568 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
569]
570
571[[package]]
572name = "rand_jitter"
573version = "0.1.4"
574source = "registry+https://github.com/rust-lang/crates.io-index"
575dependencies = [
576 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
577 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
578 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
579]
580
581[[package]]
582name = "rand_os"
583version = "0.1.3"
584source = "registry+https://github.com/rust-lang/crates.io-index" 495source = "registry+https://github.com/rust-lang/crates.io-index"
496checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
585dependencies = [ 497dependencies = [
586 "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 498 "proc-macro2",
587 "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
588 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
589 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
590 "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
591 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
592]
593
594[[package]]
595name = "rand_pcg"
596version = "0.1.2"
597source = "registry+https://github.com/rust-lang/crates.io-index"
598dependencies = [
599 "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
600 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
601]
602
603[[package]]
604name = "rand_xorshift"
605version = "0.1.1"
606source = "registry+https://github.com/rust-lang/crates.io-index"
607dependencies = [
608 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
609]
610
611[[package]]
612name = "rdrand"
613version = "0.4.0"
614source = "registry+https://github.com/rust-lang/crates.io-index"
615dependencies = [
616 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
617] 499]
618 500
619[[package]] 501[[package]]
620name = "redox_syscall" 502name = "redox_syscall"
621version = "0.1.56" 503version = "0.1.57"
622source = "registry+https://github.com/rust-lang/crates.io-index" 504source = "registry+https://github.com/rust-lang/crates.io-index"
505checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
623 506
624[[package]] 507[[package]]
625name = "redox_users" 508name = "redox_users"
626version = "0.3.1" 509version = "0.3.5"
627source = "registry+https://github.com/rust-lang/crates.io-index" 510source = "registry+https://github.com/rust-lang/crates.io-index"
511checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
628dependencies = [ 512dependencies = [
629 "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 513 "getrandom",
630 "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 514 "redox_syscall",
631 "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 515 "rust-argon2",
632 "rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
633] 516]
634 517
635[[package]] 518[[package]]
636name = "regex" 519name = "regex"
637version = "1.3.1" 520version = "1.5.4"
638source = "registry+https://github.com/rust-lang/crates.io-index" 521source = "registry+https://github.com/rust-lang/crates.io-index"
522checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
639dependencies = [ 523dependencies = [
640 "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", 524 "aho-corasick",
641 "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 525 "memchr",
642 "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 526 "regex-syntax",
643 "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
644] 527]
645 528
646[[package]] 529[[package]]
647name = "regex-syntax" 530name = "regex-syntax"
648version = "0.6.12" 531version = "0.6.25"
649source = "registry+https://github.com/rust-lang/crates.io-index" 532source = "registry+https://github.com/rust-lang/crates.io-index"
533checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
650 534
651[[package]] 535[[package]]
652name = "rust-argon2" 536name = "rust-argon2"
653version = "0.5.1" 537version = "0.8.3"
654source = "registry+https://github.com/rust-lang/crates.io-index" 538source = "registry+https://github.com/rust-lang/crates.io-index"
539checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb"
655dependencies = [ 540dependencies = [
656 "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 541 "base64",
657 "blake2b_simd 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", 542 "blake2b_simd",
658 "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 543 "constant_time_eq",
544 "crossbeam-utils",
659] 545]
660 546
661[[package]] 547[[package]]
662name = "rustc-demangle" 548name = "rustc-demangle"
663version = "0.1.16" 549version = "0.1.19"
664source = "registry+https://github.com/rust-lang/crates.io-index" 550source = "registry+https://github.com/rust-lang/crates.io-index"
665 551checksum = "410f7acf3cb3a44527c5d9546bad4bf4e6c460915d5f9f2fc524498bfe8f70ce"
666[[package]]
667name = "rustversion"
668version = "1.0.1"
669source = "registry+https://github.com/rust-lang/crates.io-index"
670dependencies = [
671 "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
672 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
673 "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
674]
675 552
676[[package]] 553[[package]]
677name = "ryu" 554name = "ryu"
678version = "1.0.2" 555version = "1.0.5"
679source = "registry+https://github.com/rust-lang/crates.io-index" 556source = "registry+https://github.com/rust-lang/crates.io-index"
557checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
680 558
681[[package]] 559[[package]]
682name = "serde" 560name = "serde"
683version = "1.0.104" 561version = "1.0.126"
684source = "registry+https://github.com/rust-lang/crates.io-index"
685dependencies = [
686 "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
687]
688
689[[package]]
690name = "serde_derive"
691version = "1.0.104"
692source = "registry+https://github.com/rust-lang/crates.io-index" 562source = "registry+https://github.com/rust-lang/crates.io-index"
693dependencies = [ 563checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03"
694 "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
695 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
696 "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)",
697]
698 564
699[[package]] 565[[package]]
700name = "serde_json" 566name = "serde_json"
701version = "1.0.44" 567version = "1.0.64"
702source = "registry+https://github.com/rust-lang/crates.io-index" 568source = "registry+https://github.com/rust-lang/crates.io-index"
569checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79"
703dependencies = [ 570dependencies = [
704 "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 571 "itoa",
705 "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 572 "ryu",
706 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", 573 "serde",
707] 574]
708 575
709[[package]] 576[[package]]
710name = "set_eq" 577name = "set_eq"
711version = "0.1.0" 578version = "0.1.0"
712dependencies = [ 579dependencies = [
713 "dbus 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 580 "failure",
714 "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 581 "lalrpop",
715 "lalrpop 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", 582 "lalrpop-util",
716 "lalrpop-util 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", 583 "log",
717 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 584 "pretty_env_logger",
718 "pretty_env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 585 "regex",
719 "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 586 "serde_json",
720 "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", 587 "structopt",
721 "structopt 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
722]
723
724[[package]]
725name = "sha2"
726version = "0.8.0"
727source = "registry+https://github.com/rust-lang/crates.io-index"
728dependencies = [
729 "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
730 "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
731 "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
732 "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
733] 588]
734 589
735[[package]] 590[[package]]
736name = "siphasher" 591name = "siphasher"
737version = "0.2.3" 592version = "0.3.5"
738source = "registry+https://github.com/rust-lang/crates.io-index" 593source = "registry+https://github.com/rust-lang/crates.io-index"
594checksum = "cbce6d4507c7e4a3962091436e56e95290cb71fa302d0d270e32130b75fbff27"
739 595
740[[package]] 596[[package]]
741name = "string_cache" 597name = "string_cache"
742version = "0.7.5" 598version = "0.8.1"
743source = "registry+https://github.com/rust-lang/crates.io-index"
744dependencies = [
745 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
746 "new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
747 "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
748 "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
749 "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
750 "string_cache_codegen 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
751 "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
752]
753
754[[package]]
755name = "string_cache_codegen"
756version = "0.4.4"
757source = "registry+https://github.com/rust-lang/crates.io-index" 599source = "registry+https://github.com/rust-lang/crates.io-index"
600checksum = "8ddb1139b5353f96e429e1a5e19fbaf663bddedaa06d1dbd49f82e352601209a"
758dependencies = [ 601dependencies = [
759 "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 602 "lazy_static",
760 "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 603 "new_debug_unreachable",
761 "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 604 "phf_shared",
762 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 605 "precomputed-hash",
763 "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
764] 606]
765 607
766[[package]] 608[[package]]
767name = "string_cache_shared"
768version = "0.3.0"
769source = "registry+https://github.com/rust-lang/crates.io-index"
770
771[[package]]
772name = "strsim" 609name = "strsim"
773version = "0.8.0" 610version = "0.8.0"
774source = "registry+https://github.com/rust-lang/crates.io-index" 611source = "registry+https://github.com/rust-lang/crates.io-index"
775 612checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
776[[package]]
777name = "strsim"
778version = "0.9.3"
779source = "registry+https://github.com/rust-lang/crates.io-index"
780 613
781[[package]] 614[[package]]
782name = "structopt" 615name = "structopt"
783version = "0.3.7" 616version = "0.3.21"
784source = "registry+https://github.com/rust-lang/crates.io-index" 617source = "registry+https://github.com/rust-lang/crates.io-index"
618checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c"
785dependencies = [ 619dependencies = [
786 "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", 620 "clap",
787 "structopt-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 621 "lazy_static",
622 "structopt-derive",
788] 623]
789 624
790[[package]] 625[[package]]
791name = "structopt-derive" 626name = "structopt-derive"
792version = "0.4.0" 627version = "0.4.14"
793source = "registry+https://github.com/rust-lang/crates.io-index" 628source = "registry+https://github.com/rust-lang/crates.io-index"
629checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90"
794dependencies = [ 630dependencies = [
795 "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 631 "heck",
796 "proc-macro-error 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 632 "proc-macro-error",
797 "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 633 "proc-macro2",
798 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 634 "quote",
799 "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", 635 "syn",
800] 636]
801 637
802[[package]] 638[[package]]
803name = "syn" 639name = "syn"
804version = "1.0.13" 640version = "1.0.72"
805source = "registry+https://github.com/rust-lang/crates.io-index"
806dependencies = [
807 "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
808 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
809 "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
810]
811
812[[package]]
813name = "syn-mid"
814version = "0.4.0"
815source = "registry+https://github.com/rust-lang/crates.io-index" 641source = "registry+https://github.com/rust-lang/crates.io-index"
642checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82"
816dependencies = [ 643dependencies = [
817 "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 644 "proc-macro2",
818 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 645 "quote",
819 "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", 646 "unicode-xid",
820] 647]
821 648
822[[package]] 649[[package]]
823name = "synstructure" 650name = "synstructure"
824version = "0.12.3" 651version = "0.12.4"
825source = "registry+https://github.com/rust-lang/crates.io-index" 652source = "registry+https://github.com/rust-lang/crates.io-index"
653checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
826dependencies = [ 654dependencies = [
827 "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 655 "proc-macro2",
828 "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 656 "quote",
829 "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", 657 "syn",
830 "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 658 "unicode-xid",
831] 659]
832 660
833[[package]] 661[[package]]
834name = "term" 662name = "term"
835version = "0.5.2" 663version = "0.5.2"
836source = "registry+https://github.com/rust-lang/crates.io-index" 664source = "registry+https://github.com/rust-lang/crates.io-index"
665checksum = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42"
837dependencies = [ 666dependencies = [
838 "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 667 "byteorder",
839 "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 668 "dirs",
840 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 669 "winapi",
841] 670]
842 671
843[[package]] 672[[package]]
844name = "termcolor" 673name = "termcolor"
845version = "1.0.5" 674version = "1.1.2"
846source = "registry+https://github.com/rust-lang/crates.io-index" 675source = "registry+https://github.com/rust-lang/crates.io-index"
676checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
847dependencies = [ 677dependencies = [
848 "wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 678 "winapi-util",
849] 679]
850 680
851[[package]] 681[[package]]
852name = "textwrap" 682name = "textwrap"
853version = "0.11.0" 683version = "0.11.0"
854source = "registry+https://github.com/rust-lang/crates.io-index" 684source = "registry+https://github.com/rust-lang/crates.io-index"
685checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
855dependencies = [ 686dependencies = [
856 "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 687 "unicode-width",
857]
858
859[[package]]
860name = "thread_local"
861version = "0.3.6"
862source = "registry+https://github.com/rust-lang/crates.io-index"
863dependencies = [
864 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
865] 688]
866 689
867[[package]] 690[[package]]
868name = "time" 691name = "tiny-keccak"
869version = "0.1.42" 692version = "2.0.2"
870source = "registry+https://github.com/rust-lang/crates.io-index" 693source = "registry+https://github.com/rust-lang/crates.io-index"
694checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
871dependencies = [ 695dependencies = [
872 "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", 696 "crunchy",
873 "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
874 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
875] 697]
876 698
877[[package]] 699[[package]]
878name = "typenum"
879version = "1.11.2"
880source = "registry+https://github.com/rust-lang/crates.io-index"
881
882[[package]]
883name = "unicode-segmentation" 700name = "unicode-segmentation"
884version = "1.6.0" 701version = "1.7.1"
885source = "registry+https://github.com/rust-lang/crates.io-index" 702source = "registry+https://github.com/rust-lang/crates.io-index"
703checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796"
886 704
887[[package]] 705[[package]]
888name = "unicode-width" 706name = "unicode-width"
889version = "0.1.7" 707version = "0.1.8"
890source = "registry+https://github.com/rust-lang/crates.io-index" 708source = "registry+https://github.com/rust-lang/crates.io-index"
709checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
891 710
892[[package]] 711[[package]]
893name = "unicode-xid" 712name = "unicode-xid"
894version = "0.1.0" 713version = "0.2.2"
895source = "registry+https://github.com/rust-lang/crates.io-index" 714source = "registry+https://github.com/rust-lang/crates.io-index"
715checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
896 716
897[[package]] 717[[package]]
898name = "unicode-xid" 718name = "vec_map"
899version = "0.2.0" 719version = "0.8.2"
900source = "registry+https://github.com/rust-lang/crates.io-index" 720source = "registry+https://github.com/rust-lang/crates.io-index"
721checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
901 722
902[[package]] 723[[package]]
903name = "vec_map" 724name = "version_check"
904version = "0.8.1" 725version = "0.9.3"
905source = "registry+https://github.com/rust-lang/crates.io-index" 726source = "registry+https://github.com/rust-lang/crates.io-index"
727checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
728
729[[package]]
730name = "wasi"
731version = "0.9.0+wasi-snapshot-preview1"
732source = "registry+https://github.com/rust-lang/crates.io-index"
733checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
906 734
907[[package]] 735[[package]]
908name = "winapi" 736name = "winapi"
909version = "0.3.8" 737version = "0.3.9"
910source = "registry+https://github.com/rust-lang/crates.io-index" 738source = "registry+https://github.com/rust-lang/crates.io-index"
739checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
911dependencies = [ 740dependencies = [
912 "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 741 "winapi-i686-pc-windows-gnu",
913 "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 742 "winapi-x86_64-pc-windows-gnu",
914] 743]
915 744
916[[package]] 745[[package]]
917name = "winapi-i686-pc-windows-gnu" 746name = "winapi-i686-pc-windows-gnu"
918version = "0.4.0" 747version = "0.4.0"
919source = "registry+https://github.com/rust-lang/crates.io-index" 748source = "registry+https://github.com/rust-lang/crates.io-index"
749checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
920 750
921[[package]] 751[[package]]
922name = "winapi-util" 752name = "winapi-util"
923version = "0.1.2" 753version = "0.1.5"
924source = "registry+https://github.com/rust-lang/crates.io-index" 754source = "registry+https://github.com/rust-lang/crates.io-index"
755checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
925dependencies = [ 756dependencies = [
926 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 757 "winapi",
927] 758]
928 759
929[[package]] 760[[package]]
930name = "winapi-x86_64-pc-windows-gnu" 761name = "winapi-x86_64-pc-windows-gnu"
931version = "0.4.0" 762version = "0.4.0"
932source = "registry+https://github.com/rust-lang/crates.io-index" 763source = "registry+https://github.com/rust-lang/crates.io-index"
933 764checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
934[[package]]
935name = "wincolor"
936version = "1.0.2"
937source = "registry+https://github.com/rust-lang/crates.io-index"
938dependencies = [
939 "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
940 "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
941]
942
943[metadata]
944"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d"
945"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
946"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee"
947"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8"
948"checksum ascii-canvas 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8eb72df928aafb99fe5d37b383f2fe25bd2a765e3e5f7c365916b6f2463a29"
949"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90"
950"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
951"checksum backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea"
952"checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491"
953"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
954"checksum bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e84c238982c4b1e1ee668d136c510c67a13465279c0cb367ea6baf6310620a80"
955"checksum bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f59bbe95d4e52a6398ec21238d31577f2b28a9d86807f06ca59d191d8440d0bb"
956"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
957"checksum blake2b_simd 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b83b7baab1e671718d78204225800d6b170e648188ac7dc992e9d6bddf87d0c0"
958"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
959"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
960"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
961"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
962"checksum cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "f52a465a666ca3d838ebbf08b241383421412fe7ebb463527bba275526d89f76"
963"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
964"checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01"
965"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"
966"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
967"checksum constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120"
968"checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6"
969"checksum dbus 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "48b5f0f36f1eebe901b0e6bee369a77ed3396334bf3f09abd46454a576f71819"
970"checksum diff 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499"
971"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
972"checksum dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901"
973"checksum docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969"
974"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
975"checksum ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8944dc8fa28ce4a38f778bd46bf7d923fe73eed5a439398507246c8e017e6f36"
976"checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3"
977"checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9"
978"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
979"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
980"checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33"
981"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
982"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
983"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
984"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
985"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
986"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
987"checksum lalrpop 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "64dc3698e75d452867d9bd86f4a723f452ce9d01fe1d55990b79f0c790aa67db"
988"checksum lalrpop-util 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c277d18683b36349ab5cd030158b54856fca6bb2d5dc5263b06288f486958b7c"
989"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
990"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
991"checksum libdbus-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc12a3bc971424edbbf7edaf6e5740483444db63aa8e23d3751ff12a30f306f0"
992"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
993"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
994"checksum new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
995"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09"
996"checksum num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4"
997"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
998"checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063"
999"checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f"
1000"checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662"
1001"checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0"
1002"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"
1003"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
1004"checksum pretty_env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "717ee476b1690853d222af4634056d830b5197ffd747726a9a1eee6da9f49074"
1005"checksum proc-macro-error 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "53c98547ceaea14eeb26fcadf51dc70d01a2479a7839170eae133721105e4428"
1006"checksum proc-macro-error-attr 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c2bf5d493cf5d3e296beccfd61794e445e830dfc8070a9c248ad3ee071392c6c"
1007"checksum proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0319972dcae462681daf4da1adeeaa066e3ebd29c69be96c6abb1259d2ee2bcc"
1008"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
1009"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
1010"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
1011"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef"
1012"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
1013"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
1014"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4"
1015"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08"
1016"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b"
1017"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
1018"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44"
1019"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c"
1020"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
1021"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
1022"checksum redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecedbca3bf205f8d8f5c2b44d83cd0690e39ee84b951ed649e9f1841132b66d"
1023"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd"
1024"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716"
1025"checksum rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ca4eaef519b494d1f2848fc602d18816fed808a981aedf4f1f00ceb7c9d32cf"
1026"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
1027"checksum rustversion 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a0538bd897e17257b0128d2fd95c2ed6df939374073a36166051a79e2eb7986"
1028"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
1029"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
1030"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
1031"checksum serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)" = "48c575e0cc52bdd09b47f330f646cf59afc586e9c4e3ccd6fc1f625b8ea1dad7"
1032"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
1033"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac"
1034"checksum string_cache 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "89c058a82f9fd69b1becf8c274f412281038877c553182f1d02eb027045a2d67"
1035"checksum string_cache_codegen 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f45ed1b65bf9a4bf2f7b7dc59212d1926e9eaf00fa998988e420fd124467c6"
1036"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc"
1037"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
1038"checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
1039"checksum structopt 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "884ae79d6aad1e738f4a70dff314203fd498490a63ebc4d03ea83323c40b7b72"
1040"checksum structopt-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0a97f829a34a0a9d5b353a881025a23b8c9fd09d46be6045df6b22920dbd7a93"
1041"checksum syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4ff033220a41d1a57d8125eab57bf5263783dfdcc18688b1dacc6ce9651ef8"
1042"checksum syn-mid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd3937748a7eccff61ba5b90af1a20dbf610858923a9192ea0ecb0cb77db1d0"
1043"checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545"
1044"checksum term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42"
1045"checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e"
1046"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
1047"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
1048"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
1049"checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9"
1050"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0"
1051"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
1052"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
1053"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
1054"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
1055"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
1056"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1057"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9"
1058"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1059"checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9"
diff --git a/Cargo.toml b/Cargo.toml
index 54ff3b0..5871309 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,21 +8,19 @@ description = "A command-line tool to manipulate PulseAudio's equalizers"
8edition = "2018" 8edition = "2018"
9 9
10[features] 10[features]
11default = ["pa-eq", "pa-effects"] 11default = ["pa-effects"]
12 12
13pa-eq = ["dbus"]
14pa-effects = ["serde_json"] 13pa-effects = ["serde_json"]
15 14
16[dependencies] 15[dependencies]
17dbus = { version = "0.6", optional = true }
18failure = "0.1" 16failure = "0.1"
19lalrpop-util = "0.17" 17lalrpop-util = "0.19"
20log = "0.4" 18log = "0.4"
21pretty_env_logger = "0.3" 19pretty_env_logger = "0.4"
22regex = "1" 20regex = "1"
23serde_json = { version = "1", optional = true } 21serde_json = { version = "1", optional = true }
24structopt = "0.3" 22structopt = "0.3"
25 23
26[build-dependencies] 24[build-dependencies]
27lalrpop = "0.17" 25lalrpop = "0.19"
28structopt = "0.3" 26structopt = "0.3"
diff --git a/build.rs b/build.rs
index 14d9a03..2de8ee3 100644
--- a/build.rs
+++ b/build.rs
@@ -1,5 +1,3 @@
1extern crate lalrpop;
2
3#[macro_use] 1#[macro_use]
4extern crate structopt; 2extern crate structopt;
5 3
@@ -13,7 +11,10 @@ use std::env;
13mod cli; 11mod cli;
14 12
15fn main() { 13fn main() {
16 lalrpop::process_root().unwrap(); 14 lalrpop::Configuration::new()
15 .use_cargo_dir_conventions()
16 .process()
17 .unwrap();
17 18
18 let outdir = env::var_os("OUT_DIR").expect("OUT_DIR environment variable not defined"); 19 let outdir = env::var_os("OUT_DIR").expect("OUT_DIR environment variable not defined");
19 20
diff --git a/derivation.nix b/derivation.nix
index 394b1bb..738d088 100644
--- a/derivation.nix
+++ b/derivation.nix
@@ -1,19 +1,19 @@
1{ stdenv, rustPlatform, dbus, pkgconfig, ... }: 1{ stdenv, rustPlatform, dbus, installShellFiles, ... }:
2 2
3rustPlatform.buildRustPackage rec { 3rustPlatform.buildRustPackage rec {
4 name = "set_eq-${version}"; 4 name = "set_eq-${version}";
5 version = "0.1.0"; 5 version = "0.1.0";
6 6
7 buildInputs = [ dbus pkgconfig ]; 7 nativeBuildInputs = [ installShellFiles ];
8 buildInputs = [ dbus ];
8 9
9 src = ./.; 10 src = ./.;
10 cargoSha256 = "094jq6mlhdgc204xjrp233dckvwmmpbivr59jcpfrl7shchclrd2"; 11 cargoSha256 = "0639d4b5f3vxljinm59vh7kfvqqm07iah90gqb10l91xpc9lj2b5";
11 12
12 preFixup = '' 13 postInstall = ''
13 mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions} 14 installShellCompletion --bash target/release/build/set_eq-*/out/set_eq.bash
14 cp target/release/build/set_eq-*/out/set_eq.bash "$out/share/bash-completion/completions/" 15 installShellCompletion --fish target/release/build/set_eq-*/out/set_eq.fish
15 cp target/release/build/set_eq-*/out/set_eq.fish "$out/share/fish/vendor_completions.d/" 16 installShellCompletion --zsh target/release/build/set_eq-*/out/_set_eq
16 cp target/release/build/set_eq-*/out/_set_eq "$out/share/zsh/site-functions/"
17 ''; 17 '';
18 18
19 meta = with stdenv.lib; { 19 meta = with stdenv.lib; {
diff --git a/spec.json b/spec.json
index cf65cf5..1294be4 100644
--- a/spec.json
+++ b/spec.json
@@ -11,6 +11,6 @@
11 "keepnr": 3, 11 "keepnr": 3,
12 "inputs": { 12 "inputs": {
13 "src": { "type": "git", "value": "https://git.huh.gdn/set_eq/ master", "emailresponsible": false }, 13 "src": { "type": "git", "value": "https://git.huh.gdn/set_eq/ master", "emailresponsible": false },
14 "nixpkgs": { "type": "git", "value": "https://github.com/nixos/nixpkgs-channels nixos-19.03", "emailresponsible": false } 14 "nixpkgs": { "type": "git", "value": "https://github.com/nixos/nixpkgs-channels nixos-20.09", "emailresponsible": false }
15 } 15 }
16} 16}
diff --git a/spec.nix b/spec.nix
index 84df6d3..290717f 100644
--- a/spec.nix
+++ b/spec.nix
@@ -24,7 +24,7 @@ in {
24 "keepnr": 10, 24 "keepnr": 10,
25 "inputs": { 25 "inputs": {
26 "src": { "type": "git", "value": "https://git.huh.gdn/set_eq/ master", "emailresponsible": true }, 26 "src": { "type": "git", "value": "https://git.huh.gdn/set_eq/ master", "emailresponsible": true },
27 "nixpkgs": { "type": "git", "value": "https://github.com/nixos/nixpkgs-channels nixos-19.03", "emailresponsible": false } 27 "nixpkgs": { "type": "git", "value": "https://github.com/nixos/nixpkgs-channels nixos-20.09", "emailresponsible": false }
28 } 28 }
29 } 29 }
30 } 30 }
diff --git a/src/main.rs b/src/main.rs
index 062a77c..7a0d7c1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -20,8 +20,6 @@ mod cli;
20mod parsing; 20mod parsing;
21mod utils; 21mod utils;
22 22
23#[cfg(feature = "pa-eq")]
24mod pa_eq;
25#[cfg(feature = "pa-effects")] 23#[cfg(feature = "pa-effects")]
26mod pa_effects; 24mod pa_effects;
27 25
@@ -37,24 +35,6 @@ pub struct Filter {
37 coefficients: Vec<f64>, 35 coefficients: Vec<f64>,
38} 36}
39 37
40impl Filter {
41 fn pad(self, filter_rate: u32) -> Self {
42 Filter {
43 preamp: self.preamp,
44 frequencies: vec![0u32]
45 .into_iter()
46 .chain(self.frequencies.into_iter())
47 .chain(vec![filter_rate / 2u32])
48 .collect(),
49 coefficients: vec![1f64]
50 .into_iter()
51 .chain(self.coefficients.into_iter())
52 .chain(vec![1f64])
53 .collect(),
54 }
55 }
56}
57
58fn main() { 38fn main() {
59 match start() { 39 match start() {
60 Ok(()) => (), 40 Ok(()) => (),
diff --git a/src/pa_eq/dbus_api/equalizing_manager.rs b/src/pa_eq/dbus_api/equalizing_manager.rs
deleted file mode 100644
index a9eb7bc..0000000
--- a/src/pa_eq/dbus_api/equalizing_manager.rs
+++ /dev/null
@@ -1,291 +0,0 @@
1// This code was autogenerated with dbus-codegen-rust, see https://github.com/diwic/dbus-rs
2
3#![allow(dead_code)]
4use dbus as dbus;
5use dbus::arg;
6use dbus::tree;
7
8pub trait OrgPulseAudioExtEqualizing1Manager {
9 type Err;
10 fn remove_profile(&self, name: &str) -> Result<(), Self::Err>;
11 fn get_interface_revision(&self) -> Result<u32, Self::Err>;
12 fn get_equalized_sinks(&self) -> Result<Vec<dbus::Path<'static>>, Self::Err>;
13 fn get_profiles(&self) -> Result<Vec<String>, Self::Err>;
14}
15
16impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgPulseAudioExtEqualizing1Manager for dbus::ConnPath<'a, C> {
17 type Err = dbus::Error;
18
19 fn remove_profile(&self, name: &str) -> Result<(), Self::Err> {
20 let mut m = r#try!(self.method_call_with_args(&"org.PulseAudio.Ext.Equalizing1.Manager".into(), &"RemoveProfile".into(), |msg| {
21 let mut i = arg::IterAppend::new(msg);
22 i.append(name);
23 }));
24 r#try!(m.as_result());
25 Ok(())
26 }
27
28 fn get_interface_revision(&self) -> Result<u32, Self::Err> {
29 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Ext.Equalizing1.Manager", "InterfaceRevision")
30 }
31
32 fn get_equalized_sinks(&self) -> Result<Vec<dbus::Path<'static>>, Self::Err> {
33 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Ext.Equalizing1.Manager", "EqualizedSinks")
34 }
35
36 fn get_profiles(&self) -> Result<Vec<String>, Self::Err> {
37 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Ext.Equalizing1.Manager", "Profiles")
38 }
39}
40
41pub fn org_pulse_audio_ext_equalizing1_manager_server<F, T, D>(factory: &tree::Factory<tree::MTFn<D>, D>, data: D::Interface, f: F) -> tree::Interface<tree::MTFn<D>, D>
42where
43 D: tree::DataType,
44 D::Method: Default,
45 D::Property: Default,
46 T: OrgPulseAudioExtEqualizing1Manager<Err=tree::MethodErr>,
47 F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T,
48{
49 let i = factory.interface("org.PulseAudio.Ext.Equalizing1.Manager", data);
50 let f = ::std::sync::Arc::new(f);
51 let fclone = f.clone();
52 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
53 let mut i = minfo.msg.iter_init();
54 let name: &str = r#try!(i.read());
55 let d = fclone(minfo);
56 r#try!(d.remove_profile(name));
57 let rm = minfo.msg.method_return();
58 Ok(vec!(rm))
59 };
60 let m = factory.method("RemoveProfile", Default::default(), h);
61 let m = m.in_arg(("name", "s"));
62 let i = i.add_m(m);
63
64 let p = factory.property::<u32, _>("InterfaceRevision", Default::default());
65 let p = p.access(tree::Access::Read);
66 let fclone = f.clone();
67 let p = p.on_get(move |a, pinfo| {
68 let minfo = pinfo.to_method_info();
69 let d = fclone(&minfo);
70 a.append(r#try!(d.get_interface_revision()));
71 Ok(())
72 });
73 let i = i.add_p(p);
74
75 let p = factory.property::<Vec<dbus::Path<'_>>, _>("EqualizedSinks", Default::default());
76 let p = p.access(tree::Access::Read);
77 let fclone = f.clone();
78 let p = p.on_get(move |a, pinfo| {
79 let minfo = pinfo.to_method_info();
80 let d = fclone(&minfo);
81 a.append(r#try!(d.get_equalized_sinks()));
82 Ok(())
83 });
84 let i = i.add_p(p);
85
86 let p = factory.property::<Vec<&str>, _>("Profiles", Default::default());
87 let p = p.access(tree::Access::Read);
88 let fclone = f.clone();
89 let p = p.on_get(move |a, pinfo| {
90 let minfo = pinfo.to_method_info();
91 let d = fclone(&minfo);
92 a.append(r#try!(d.get_profiles()));
93 Ok(())
94 });
95 let i = i.add_p(p);
96 i
97}
98
99#[derive(Debug, Default)]
100pub struct OrgPulseAudioExtEqualizing1ManagerSinkAdded {
101 pub sink: dbus::Path<'static>,
102}
103
104impl dbus::SignalArgs for OrgPulseAudioExtEqualizing1ManagerSinkAdded {
105 const NAME: &'static str = "SinkAdded";
106 const INTERFACE: &'static str = "org.PulseAudio.Ext.Equalizing1.Manager";
107 fn append(&self, i: &mut arg::IterAppend<'_>) {
108 (&self.sink as &dyn arg::RefArg).append(i);
109 }
110 fn get(&mut self, i: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> {
111 self.sink = r#try!(i.read());
112 Ok(())
113 }
114}
115
116#[derive(Debug, Default)]
117pub struct OrgPulseAudioExtEqualizing1ManagerSinkRemoved {
118 pub sink: dbus::Path<'static>,
119}
120
121impl dbus::SignalArgs for OrgPulseAudioExtEqualizing1ManagerSinkRemoved {
122 const NAME: &'static str = "SinkRemoved";
123 const INTERFACE: &'static str = "org.PulseAudio.Ext.Equalizing1.Manager";
124 fn append(&self, i: &mut arg::IterAppend<'_>) {
125 (&self.sink as &dyn arg::RefArg).append(i);
126 }
127 fn get(&mut self, i: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> {
128 self.sink = r#try!(i.read());
129 Ok(())
130 }
131}
132
133#[derive(Debug, Default)]
134pub struct OrgPulseAudioExtEqualizing1ManagerProfilesChanged {
135}
136
137impl dbus::SignalArgs for OrgPulseAudioExtEqualizing1ManagerProfilesChanged {
138 const NAME: &'static str = "ProfilesChanged";
139 const INTERFACE: &'static str = "org.PulseAudio.Ext.Equalizing1.Manager";
140 fn append(&self, _: &mut arg::IterAppend<'_>) {
141 }
142 fn get(&mut self, _: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> {
143 Ok(())
144 }
145}
146
147pub trait OrgFreedesktopDBusIntrospectable {
148 type Err;
149 fn introspect(&self) -> Result<String, Self::Err>;
150}
151
152impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusIntrospectable for dbus::ConnPath<'a, C> {
153 type Err = dbus::Error;
154
155 fn introspect(&self) -> Result<String, Self::Err> {
156 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Introspectable".into(), &"Introspect".into(), |_| {
157 }));
158 r#try!(m.as_result());
159 let mut i = m.iter_init();
160 let data: String = r#try!(i.read());
161 Ok(data)
162 }
163}
164
165pub fn org_freedesktop_dbus_introspectable_server<F, T, D>(factory: &tree::Factory<tree::MTFn<D>, D>, data: D::Interface, f: F) -> tree::Interface<tree::MTFn<D>, D>
166where
167 D: tree::DataType,
168 D::Method: Default,
169 T: OrgFreedesktopDBusIntrospectable<Err=tree::MethodErr>,
170 F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T,
171{
172 let i = factory.interface("org.freedesktop.DBus.Introspectable", data);
173 let f = ::std::sync::Arc::new(f);
174 let fclone = f.clone();
175 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
176 let d = fclone(minfo);
177 let data = r#try!(d.introspect());
178 let rm = minfo.msg.method_return();
179 let rm = rm.append1(data);
180 Ok(vec!(rm))
181 };
182 let m = factory.method("Introspect", Default::default(), h);
183 let m = m.out_arg(("data", "s"));
184 let i = i.add_m(m);
185 i
186}
187
188pub trait OrgFreedesktopDBusProperties {
189 type Err;
190 fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<dyn arg::RefArg>>, Self::Err>;
191 fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<dyn arg::RefArg>>) -> Result<(), Self::Err>;
192 fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>>, Self::Err>;
193}
194
195impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusProperties for dbus::ConnPath<'a, C> {
196 type Err = dbus::Error;
197
198 fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<dyn arg::RefArg>>, Self::Err> {
199 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Get".into(), |msg| {
200 let mut i = arg::IterAppend::new(msg);
201 i.append(interface_name);
202 i.append(property_name);
203 }));
204 r#try!(m.as_result());
205 let mut i = m.iter_init();
206 let value: arg::Variant<Box<dyn arg::RefArg>> = r#try!(i.read());
207 Ok(value)
208 }
209
210 fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<dyn arg::RefArg>>) -> Result<(), Self::Err> {
211 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Set".into(), |msg| {
212 let mut i = arg::IterAppend::new(msg);
213 i.append(interface_name);
214 i.append(property_name);
215 i.append(value);
216 }));
217 r#try!(m.as_result());
218 Ok(())
219 }
220
221 fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>>, Self::Err> {
222 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"GetAll".into(), |msg| {
223 let mut i = arg::IterAppend::new(msg);
224 i.append(interface_name);
225 }));
226 r#try!(m.as_result());
227 let mut i = m.iter_init();
228 let props: ::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>> = r#try!(i.read());
229 Ok(props)
230 }
231}
232
233pub fn org_freedesktop_dbus_properties_server<F, T, D>(factory: &tree::Factory<tree::MTFn<D>, D>, data: D::Interface, f: F) -> tree::Interface<tree::MTFn<D>, D>
234where
235 D: tree::DataType,
236 D::Method: Default,
237 T: OrgFreedesktopDBusProperties<Err=tree::MethodErr>,
238 F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T,
239{
240 let i = factory.interface("org.freedesktop.DBus.Properties", data);
241 let f = ::std::sync::Arc::new(f);
242 let fclone = f.clone();
243 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
244 let mut i = minfo.msg.iter_init();
245 let interface_name: &str = r#try!(i.read());
246 let property_name: &str = r#try!(i.read());
247 let d = fclone(minfo);
248 let value = r#try!(d.get(interface_name, property_name));
249 let rm = minfo.msg.method_return();
250 let rm = rm.append1(value);
251 Ok(vec!(rm))
252 };
253 let m = factory.method("Get", Default::default(), h);
254 let m = m.in_arg(("interface_name", "s"));
255 let m = m.in_arg(("property_name", "s"));
256 let m = m.out_arg(("value", "v"));
257 let i = i.add_m(m);
258
259 let fclone = f.clone();
260 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
261 let mut i = minfo.msg.iter_init();
262 let interface_name: &str = r#try!(i.read());
263 let property_name: &str = r#try!(i.read());
264 let value: arg::Variant<Box<dyn arg::RefArg>> = r#try!(i.read());
265 let d = fclone(minfo);
266 r#try!(d.set(interface_name, property_name, value));
267 let rm = minfo.msg.method_return();
268 Ok(vec!(rm))
269 };
270 let m = factory.method("Set", Default::default(), h);
271 let m = m.in_arg(("interface_name", "s"));
272 let m = m.in_arg(("property_name", "s"));
273 let m = m.in_arg(("value", "v"));
274 let i = i.add_m(m);
275
276 let fclone = f.clone();
277 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
278 let mut i = minfo.msg.iter_init();
279 let interface_name: &str = r#try!(i.read());
280 let d = fclone(minfo);
281 let props = r#try!(d.get_all(interface_name));
282 let rm = minfo.msg.method_return();
283 let rm = rm.append1(props);
284 Ok(vec!(rm))
285 };
286 let m = factory.method("GetAll", Default::default(), h);
287 let m = m.in_arg(("interface_name", "s"));
288 let m = m.out_arg(("props", "a{sv}"));
289 let i = i.add_m(m);
290 i
291}
diff --git a/src/pa_eq/dbus_api/mod.rs b/src/pa_eq/dbus_api/mod.rs
deleted file mode 100644
index 79dd38a..0000000
--- a/src/pa_eq/dbus_api/mod.rs
+++ /dev/null
@@ -1,6 +0,0 @@
1#[allow(clippy::all)]
2pub mod equalizing_manager;
3#[allow(clippy::all)]
4pub mod server_lookup;
5#[allow(clippy::all)]
6pub mod sink;
diff --git a/src/pa_eq/dbus_api/server_lookup.rs b/src/pa_eq/dbus_api/server_lookup.rs
deleted file mode 100644
index c959df8..0000000
--- a/src/pa_eq/dbus_api/server_lookup.rs
+++ /dev/null
@@ -1,188 +0,0 @@
1// This code was autogenerated with dbus-codegen-rust, see https://github.com/diwic/dbus-rs
2
3#![allow(dead_code)]
4use dbus as dbus;
5use dbus::arg;
6use dbus::tree;
7
8pub trait OrgPulseAudioServerLookup1 {
9 type Err;
10 fn get_address(&self) -> Result<String, Self::Err>;
11}
12
13impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgPulseAudioServerLookup1 for dbus::ConnPath<'a, C> {
14 type Err = dbus::Error;
15
16 fn get_address(&self) -> Result<String, Self::Err> {
17 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.ServerLookup1", "Address")
18 }
19}
20
21pub fn org_pulse_audio_server_lookup1_server<F, T, D>(factory: &tree::Factory<tree::MTFn<D>, D>, data: D::Interface, f: F) -> tree::Interface<tree::MTFn<D>, D>
22where
23 D: tree::DataType,
24 D::Method: Default,
25 D::Property: Default,
26 T: OrgPulseAudioServerLookup1<Err=tree::MethodErr>,
27 F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T,
28{
29 let i = factory.interface("org.PulseAudio.ServerLookup1", data);
30 let f = ::std::sync::Arc::new(f);
31 let p = factory.property::<&str, _>("Address", Default::default());
32 let p = p.access(tree::Access::Read);
33 let fclone = f.clone();
34 let p = p.on_get(move |a, pinfo| {
35 let minfo = pinfo.to_method_info();
36 let d = fclone(&minfo);
37 a.append(r#try!(d.get_address()));
38 Ok(())
39 });
40 let i = i.add_p(p);
41 i
42}
43
44pub trait OrgFreedesktopDBusIntrospectable {
45 type Err;
46 fn introspect(&self) -> Result<String, Self::Err>;
47}
48
49impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusIntrospectable for dbus::ConnPath<'a, C> {
50 type Err = dbus::Error;
51
52 fn introspect(&self) -> Result<String, Self::Err> {
53 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Introspectable".into(), &"Introspect".into(), |_| {
54 }));
55 r#try!(m.as_result());
56 let mut i = m.iter_init();
57 let data: String = r#try!(i.read());
58 Ok(data)
59 }
60}
61
62pub fn org_freedesktop_dbus_introspectable_server<F, T, D>(factory: &tree::Factory<tree::MTFn<D>, D>, data: D::Interface, f: F) -> tree::Interface<tree::MTFn<D>, D>
63where
64 D: tree::DataType,
65 D::Method: Default,
66 T: OrgFreedesktopDBusIntrospectable<Err=tree::MethodErr>,
67 F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T,
68{
69 let i = factory.interface("org.freedesktop.DBus.Introspectable", data);
70 let f = ::std::sync::Arc::new(f);
71 let fclone = f.clone();
72 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
73 let d = fclone(minfo);
74 let data = r#try!(d.introspect());
75 let rm = minfo.msg.method_return();
76 let rm = rm.append1(data);
77 Ok(vec!(rm))
78 };
79 let m = factory.method("Introspect", Default::default(), h);
80 let m = m.out_arg(("data", "s"));
81 let i = i.add_m(m);
82 i
83}
84
85pub trait OrgFreedesktopDBusProperties {
86 type Err;
87 fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<dyn arg::RefArg>>, Self::Err>;
88 fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<dyn arg::RefArg>>) -> Result<(), Self::Err>;
89 fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>>, Self::Err>;
90}
91
92impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusProperties for dbus::ConnPath<'a, C> {
93 type Err = dbus::Error;
94
95 fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<dyn arg::RefArg>>, Self::Err> {
96 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Get".into(), |msg| {
97 let mut i = arg::IterAppend::new(msg);
98 i.append(interface_name);
99 i.append(property_name);
100 }));
101 r#try!(m.as_result());
102 let mut i = m.iter_init();
103 let value: arg::Variant<Box<dyn arg::RefArg>> = r#try!(i.read());
104 Ok(value)
105 }
106
107 fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<dyn arg::RefArg>>) -> Result<(), Self::Err> {
108 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Set".into(), |msg| {
109 let mut i = arg::IterAppend::new(msg);
110 i.append(interface_name);
111 i.append(property_name);
112 i.append(value);
113 }));
114 r#try!(m.as_result());
115 Ok(())
116 }
117
118 fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>>, Self::Err> {
119 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"GetAll".into(), |msg| {
120 let mut i = arg::IterAppend::new(msg);
121 i.append(interface_name);
122 }));
123 r#try!(m.as_result());
124 let mut i = m.iter_init();
125 let props: ::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>> = r#try!(i.read());
126 Ok(props)
127 }
128}
129
130pub fn org_freedesktop_dbus_properties_server<F, T, D>(factory: &tree::Factory<tree::MTFn<D>, D>, data: D::Interface, f: F) -> tree::Interface<tree::MTFn<D>, D>
131where
132 D: tree::DataType,
133 D::Method: Default,
134 T: OrgFreedesktopDBusProperties<Err=tree::MethodErr>,
135 F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T,
136{
137 let i = factory.interface("org.freedesktop.DBus.Properties", data);
138 let f = ::std::sync::Arc::new(f);
139 let fclone = f.clone();
140 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
141 let mut i = minfo.msg.iter_init();
142 let interface_name: &str = r#try!(i.read());
143 let property_name: &str = r#try!(i.read());
144 let d = fclone(minfo);
145 let value = r#try!(d.get(interface_name, property_name));
146 let rm = minfo.msg.method_return();
147 let rm = rm.append1(value);
148 Ok(vec!(rm))
149 };
150 let m = factory.method("Get", Default::default(), h);
151 let m = m.in_arg(("interface_name", "s"));
152 let m = m.in_arg(("property_name", "s"));
153 let m = m.out_arg(("value", "v"));
154 let i = i.add_m(m);
155
156 let fclone = f.clone();
157 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
158 let mut i = minfo.msg.iter_init();
159 let interface_name: &str = r#try!(i.read());
160 let property_name: &str = r#try!(i.read());
161 let value: arg::Variant<Box<dyn arg::RefArg>> = r#try!(i.read());
162 let d = fclone(minfo);
163 r#try!(d.set(interface_name, property_name, value));
164 let rm = minfo.msg.method_return();
165 Ok(vec!(rm))
166 };
167 let m = factory.method("Set", Default::default(), h);
168 let m = m.in_arg(("interface_name", "s"));
169 let m = m.in_arg(("property_name", "s"));
170 let m = m.in_arg(("value", "v"));
171 let i = i.add_m(m);
172
173 let fclone = f.clone();
174 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
175 let mut i = minfo.msg.iter_init();
176 let interface_name: &str = r#try!(i.read());
177 let d = fclone(minfo);
178 let props = r#try!(d.get_all(interface_name));
179 let rm = minfo.msg.method_return();
180 let rm = rm.append1(props);
181 Ok(vec!(rm))
182 };
183 let m = factory.method("GetAll", Default::default(), h);
184 let m = m.in_arg(("interface_name", "s"));
185 let m = m.out_arg(("props", "a{sv}"));
186 let i = i.add_m(m);
187 i
188}
diff --git a/src/pa_eq/dbus_api/sink.rs b/src/pa_eq/dbus_api/sink.rs
deleted file mode 100644
index d902e64..0000000
--- a/src/pa_eq/dbus_api/sink.rs
+++ /dev/null
@@ -1,1128 +0,0 @@
1// This code was autogenerated with dbus-codegen-rust, see https://github.com/diwic/dbus-rs
2
3#![allow(dead_code)]
4use dbus as dbus;
5use dbus::arg;
6use dbus::tree;
7
8pub trait OrgPulseAudioExtEqualizing1Equalizer {
9 type Err;
10 fn filter_at_points(&self, channel: u32, xs: Vec<u32>) -> Result<(Vec<f64>, f64), Self::Err>;
11 fn seed_filter(&self, channel: u32, xs: Vec<u32>, ys: Vec<f64>, preamp: f64) -> Result<(), Self::Err>;
12 fn save_profile(&self, channel: u32, name: &str) -> Result<(), Self::Err>;
13 fn load_profile(&self, channel: u32, name: &str) -> Result<(), Self::Err>;
14 fn set_filter(&self, channel: u32, ys: Vec<f64>, preamp: f64) -> Result<(), Self::Err>;
15 fn get_filter(&self, channel: u32) -> Result<(Vec<f64>, f64), Self::Err>;
16 fn save_state(&self) -> Result<(), Self::Err>;
17 fn base_profile(&self, channel: u32) -> Result<String, Self::Err>;
18 fn get_interface_revision(&self) -> Result<u32, Self::Err>;
19 fn get_sample_rate(&self) -> Result<u32, Self::Err>;
20 fn get_filter_sample_rate(&self) -> Result<u32, Self::Err>;
21 fn get_nfilter_coefficients(&self) -> Result<u32, Self::Err>;
22 fn get_nchannels(&self) -> Result<u32, Self::Err>;
23}
24
25impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgPulseAudioExtEqualizing1Equalizer for dbus::ConnPath<'a, C> {
26 type Err = dbus::Error;
27
28 fn filter_at_points(&self, channel: u32, xs: Vec<u32>) -> Result<(Vec<f64>, f64), Self::Err> {
29 let mut m = r#try!(self.method_call_with_args(&"org.PulseAudio.Ext.Equalizing1.Equalizer".into(), &"FilterAtPoints".into(), |msg| {
30 let mut i = arg::IterAppend::new(msg);
31 i.append(channel);
32 i.append(xs);
33 }));
34 r#try!(m.as_result());
35 let mut i = m.iter_init();
36 let ys: Vec<f64> = r#try!(i.read());
37 let preamp: f64 = r#try!(i.read());
38 Ok((ys, preamp))
39 }
40
41 fn seed_filter(&self, channel: u32, xs: Vec<u32>, ys: Vec<f64>, preamp: f64) -> Result<(), Self::Err> {
42 let mut m = r#try!(self.method_call_with_args(&"org.PulseAudio.Ext.Equalizing1.Equalizer".into(), &"SeedFilter".into(), |msg| {
43 let mut i = arg::IterAppend::new(msg);
44 i.append(channel);
45 i.append(xs);
46 i.append(ys);
47 i.append(preamp);
48 }));
49 r#try!(m.as_result());
50 Ok(())
51 }
52
53 fn save_profile(&self, channel: u32, name: &str) -> Result<(), Self::Err> {
54 let mut m = r#try!(self.method_call_with_args(&"org.PulseAudio.Ext.Equalizing1.Equalizer".into(), &"SaveProfile".into(), |msg| {
55 let mut i = arg::IterAppend::new(msg);
56 i.append(channel);
57 i.append(name);
58 }));
59 r#try!(m.as_result());
60 Ok(())
61 }
62
63 fn load_profile(&self, channel: u32, name: &str) -> Result<(), Self::Err> {
64 let mut m = r#try!(self.method_call_with_args(&"org.PulseAudio.Ext.Equalizing1.Equalizer".into(), &"LoadProfile".into(), |msg| {
65 let mut i = arg::IterAppend::new(msg);
66 i.append(channel);
67 i.append(name);
68 }));
69 r#try!(m.as_result());
70 Ok(())
71 }
72
73 fn set_filter(&self, channel: u32, ys: Vec<f64>, preamp: f64) -> Result<(), Self::Err> {
74 let mut m = r#try!(self.method_call_with_args(&"org.PulseAudio.Ext.Equalizing1.Equalizer".into(), &"SetFilter".into(), |msg| {
75 let mut i = arg::IterAppend::new(msg);
76 i.append(channel);
77 i.append(ys);
78 i.append(preamp);
79 }));
80 r#try!(m.as_result());
81 Ok(())
82 }
83
84 fn get_filter(&self, channel: u32) -> Result<(Vec<f64>, f64), Self::Err> {
85 let mut m = r#try!(self.method_call_with_args(&"org.PulseAudio.Ext.Equalizing1.Equalizer".into(), &"GetFilter".into(), |msg| {
86 let mut i = arg::IterAppend::new(msg);
87 i.append(channel);
88 }));
89 r#try!(m.as_result());
90 let mut i = m.iter_init();
91 let ys: Vec<f64> = r#try!(i.read());
92 let preamp: f64 = r#try!(i.read());
93 Ok((ys, preamp))
94 }
95
96 fn save_state(&self) -> Result<(), Self::Err> {
97 let mut m = r#try!(self.method_call_with_args(&"org.PulseAudio.Ext.Equalizing1.Equalizer".into(), &"SaveState".into(), |_| {
98 }));
99 r#try!(m.as_result());
100 Ok(())
101 }
102
103 fn base_profile(&self, channel: u32) -> Result<String, Self::Err> {
104 let mut m = r#try!(self.method_call_with_args(&"org.PulseAudio.Ext.Equalizing1.Equalizer".into(), &"BaseProfile".into(), |msg| {
105 let mut i = arg::IterAppend::new(msg);
106 i.append(channel);
107 }));
108 r#try!(m.as_result());
109 let mut i = m.iter_init();
110 let name: String = r#try!(i.read());
111 Ok(name)
112 }
113
114 fn get_interface_revision(&self) -> Result<u32, Self::Err> {
115 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Ext.Equalizing1.Equalizer", "InterfaceRevision")
116 }
117
118 fn get_sample_rate(&self) -> Result<u32, Self::Err> {
119 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Ext.Equalizing1.Equalizer", "SampleRate")
120 }
121
122 fn get_filter_sample_rate(&self) -> Result<u32, Self::Err> {
123 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Ext.Equalizing1.Equalizer", "FilterSampleRate")
124 }
125
126 fn get_nfilter_coefficients(&self) -> Result<u32, Self::Err> {
127 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Ext.Equalizing1.Equalizer", "NFilterCoefficients")
128 }
129
130 fn get_nchannels(&self) -> Result<u32, Self::Err> {
131 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Ext.Equalizing1.Equalizer", "NChannels")
132 }
133}
134
135pub fn org_pulse_audio_ext_equalizing1_equalizer_server<F, T, D>(factory: &tree::Factory<tree::MTFn<D>, D>, data: D::Interface, f: F) -> tree::Interface<tree::MTFn<D>, D>
136where
137 D: tree::DataType,
138 D::Method: Default,
139 D::Property: Default,
140 T: OrgPulseAudioExtEqualizing1Equalizer<Err=tree::MethodErr>,
141 F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T,
142{
143 let i = factory.interface("org.PulseAudio.Ext.Equalizing1.Equalizer", data);
144 let f = ::std::sync::Arc::new(f);
145 let fclone = f.clone();
146 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
147 let mut i = minfo.msg.iter_init();
148 let channel: u32 = r#try!(i.read());
149 let xs: Vec<u32> = r#try!(i.read());
150 let d = fclone(minfo);
151 let (ys, preamp) = r#try!(d.filter_at_points(channel, xs));
152 let rm = minfo.msg.method_return();
153 let rm = rm.append1(ys);
154 let rm = rm.append1(preamp);
155 Ok(vec!(rm))
156 };
157 let m = factory.method("FilterAtPoints", Default::default(), h);
158 let m = m.in_arg(("channel", "u"));
159 let m = m.in_arg(("xs", "au"));
160 let m = m.out_arg(("ys", "ad"));
161 let m = m.out_arg(("preamp", "d"));
162 let i = i.add_m(m);
163
164 let fclone = f.clone();
165 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
166 let mut i = minfo.msg.iter_init();
167 let channel: u32 = r#try!(i.read());
168 let xs: Vec<u32> = r#try!(i.read());
169 let ys: Vec<f64> = r#try!(i.read());
170 let preamp: f64 = r#try!(i.read());
171 let d = fclone(minfo);
172 r#try!(d.seed_filter(channel, xs, ys, preamp));
173 let rm = minfo.msg.method_return();
174 Ok(vec!(rm))
175 };
176 let m = factory.method("SeedFilter", Default::default(), h);
177 let m = m.in_arg(("channel", "u"));
178 let m = m.in_arg(("xs", "au"));
179 let m = m.in_arg(("ys", "ad"));
180 let m = m.in_arg(("preamp", "d"));
181 let i = i.add_m(m);
182
183 let fclone = f.clone();
184 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
185 let mut i = minfo.msg.iter_init();
186 let channel: u32 = r#try!(i.read());
187 let name: &str = r#try!(i.read());
188 let d = fclone(minfo);
189 r#try!(d.save_profile(channel, name));
190 let rm = minfo.msg.method_return();
191 Ok(vec!(rm))
192 };
193 let m = factory.method("SaveProfile", Default::default(), h);
194 let m = m.in_arg(("channel", "u"));
195 let m = m.in_arg(("name", "s"));
196 let i = i.add_m(m);
197
198 let fclone = f.clone();
199 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
200 let mut i = minfo.msg.iter_init();
201 let channel: u32 = r#try!(i.read());
202 let name: &str = r#try!(i.read());
203 let d = fclone(minfo);
204 r#try!(d.load_profile(channel, name));
205 let rm = minfo.msg.method_return();
206 Ok(vec!(rm))
207 };
208 let m = factory.method("LoadProfile", Default::default(), h);
209 let m = m.in_arg(("channel", "u"));
210 let m = m.in_arg(("name", "s"));
211 let i = i.add_m(m);
212
213 let fclone = f.clone();
214 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
215 let mut i = minfo.msg.iter_init();
216 let channel: u32 = r#try!(i.read());
217 let ys: Vec<f64> = r#try!(i.read());
218 let preamp: f64 = r#try!(i.read());
219 let d = fclone(minfo);
220 r#try!(d.set_filter(channel, ys, preamp));
221 let rm = minfo.msg.method_return();
222 Ok(vec!(rm))
223 };
224 let m = factory.method("SetFilter", Default::default(), h);
225 let m = m.in_arg(("channel", "u"));
226 let m = m.in_arg(("ys", "ad"));
227 let m = m.in_arg(("preamp", "d"));
228 let i = i.add_m(m);
229
230 let fclone = f.clone();
231 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
232 let mut i = minfo.msg.iter_init();
233 let channel: u32 = r#try!(i.read());
234 let d = fclone(minfo);
235 let (ys, preamp) = r#try!(d.get_filter(channel));
236 let rm = minfo.msg.method_return();
237 let rm = rm.append1(ys);
238 let rm = rm.append1(preamp);
239 Ok(vec!(rm))
240 };
241 let m = factory.method("GetFilter", Default::default(), h);
242 let m = m.in_arg(("channel", "u"));
243 let m = m.out_arg(("ys", "ad"));
244 let m = m.out_arg(("preamp", "d"));
245 let i = i.add_m(m);
246
247 let fclone = f.clone();
248 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
249 let d = fclone(minfo);
250 r#try!(d.save_state());
251 let rm = minfo.msg.method_return();
252 Ok(vec!(rm))
253 };
254 let m = factory.method("SaveState", Default::default(), h);
255 let i = i.add_m(m);
256
257 let fclone = f.clone();
258 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
259 let mut i = minfo.msg.iter_init();
260 let channel: u32 = r#try!(i.read());
261 let d = fclone(minfo);
262 let name = r#try!(d.base_profile(channel));
263 let rm = minfo.msg.method_return();
264 let rm = rm.append1(name);
265 Ok(vec!(rm))
266 };
267 let m = factory.method("BaseProfile", Default::default(), h);
268 let m = m.in_arg(("channel", "u"));
269 let m = m.out_arg(("name", "s"));
270 let i = i.add_m(m);
271
272 let p = factory.property::<u32, _>("InterfaceRevision", Default::default());
273 let p = p.access(tree::Access::Read);
274 let fclone = f.clone();
275 let p = p.on_get(move |a, pinfo| {
276 let minfo = pinfo.to_method_info();
277 let d = fclone(&minfo);
278 a.append(r#try!(d.get_interface_revision()));
279 Ok(())
280 });
281 let i = i.add_p(p);
282
283 let p = factory.property::<u32, _>("SampleRate", Default::default());
284 let p = p.access(tree::Access::Read);
285 let fclone = f.clone();
286 let p = p.on_get(move |a, pinfo| {
287 let minfo = pinfo.to_method_info();
288 let d = fclone(&minfo);
289 a.append(r#try!(d.get_sample_rate()));
290 Ok(())
291 });
292 let i = i.add_p(p);
293
294 let p = factory.property::<u32, _>("FilterSampleRate", Default::default());
295 let p = p.access(tree::Access::Read);
296 let fclone = f.clone();
297 let p = p.on_get(move |a, pinfo| {
298 let minfo = pinfo.to_method_info();
299 let d = fclone(&minfo);
300 a.append(r#try!(d.get_filter_sample_rate()));
301 Ok(())
302 });
303 let i = i.add_p(p);
304
305 let p = factory.property::<u32, _>("NFilterCoefficients", Default::default());
306 let p = p.access(tree::Access::Read);
307 let fclone = f.clone();
308 let p = p.on_get(move |a, pinfo| {
309 let minfo = pinfo.to_method_info();
310 let d = fclone(&minfo);
311 a.append(r#try!(d.get_nfilter_coefficients()));
312 Ok(())
313 });
314 let i = i.add_p(p);
315
316 let p = factory.property::<u32, _>("NChannels", Default::default());
317 let p = p.access(tree::Access::Read);
318 let fclone = f.clone();
319 let p = p.on_get(move |a, pinfo| {
320 let minfo = pinfo.to_method_info();
321 let d = fclone(&minfo);
322 a.append(r#try!(d.get_nchannels()));
323 Ok(())
324 });
325 let i = i.add_p(p);
326 i
327}
328
329#[derive(Debug, Default)]
330pub struct OrgPulseAudioExtEqualizing1EqualizerFilterChanged {
331}
332
333impl dbus::SignalArgs for OrgPulseAudioExtEqualizing1EqualizerFilterChanged {
334 const NAME: &'static str = "FilterChanged";
335 const INTERFACE: &'static str = "org.PulseAudio.Ext.Equalizing1.Equalizer";
336 fn append(&self, _: &mut arg::IterAppend<'_>) {
337 }
338 fn get(&mut self, _: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> {
339 Ok(())
340 }
341}
342
343#[derive(Debug, Default)]
344pub struct OrgPulseAudioExtEqualizing1EqualizerSinkReconfigured {
345}
346
347impl dbus::SignalArgs for OrgPulseAudioExtEqualizing1EqualizerSinkReconfigured {
348 const NAME: &'static str = "SinkReconfigured";
349 const INTERFACE: &'static str = "org.PulseAudio.Ext.Equalizing1.Equalizer";
350 fn append(&self, _: &mut arg::IterAppend<'_>) {
351 }
352 fn get(&mut self, _: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> {
353 Ok(())
354 }
355}
356
357pub trait OrgPulseAudioCore1Device {
358 type Err;
359 fn suspend(&self, suspend: bool) -> Result<(), Self::Err>;
360 fn get_port_by_name(&self, name: &str) -> Result<dbus::Path<'static>, Self::Err>;
361 fn get_index(&self) -> Result<u32, Self::Err>;
362 fn get_name(&self) -> Result<String, Self::Err>;
363 fn get_driver(&self) -> Result<String, Self::Err>;
364 fn get_owner_module(&self) -> Result<dbus::Path<'static>, Self::Err>;
365 fn get_card(&self) -> Result<dbus::Path<'static>, Self::Err>;
366 fn get_sample_format(&self) -> Result<u32, Self::Err>;
367 fn get_sample_rate(&self) -> Result<u32, Self::Err>;
368 fn get_channels(&self) -> Result<Vec<u32>, Self::Err>;
369 fn get_volume(&self) -> Result<Vec<u32>, Self::Err>;
370 fn set_volume(&self, value: Vec<u32>) -> Result<(), Self::Err>;
371 fn get_has_flat_volume(&self) -> Result<bool, Self::Err>;
372 fn get_has_convertible_to_decibel_volume(&self) -> Result<bool, Self::Err>;
373 fn get_base_volume(&self) -> Result<u32, Self::Err>;
374 fn get_volume_steps(&self) -> Result<u32, Self::Err>;
375 fn get_mute(&self) -> Result<bool, Self::Err>;
376 fn set_mute(&self, value: bool) -> Result<(), Self::Err>;
377 fn get_has_hardware_volume(&self) -> Result<bool, Self::Err>;
378 fn get_has_hardware_mute(&self) -> Result<bool, Self::Err>;
379 fn get_configured_latency(&self) -> Result<u64, Self::Err>;
380 fn get_has_dynamic_latency(&self) -> Result<bool, Self::Err>;
381 fn get_latency(&self) -> Result<u64, Self::Err>;
382 fn get_is_hardware_device(&self) -> Result<bool, Self::Err>;
383 fn get_is_network_device(&self) -> Result<bool, Self::Err>;
384 fn get_state(&self) -> Result<u32, Self::Err>;
385 fn get_ports(&self) -> Result<Vec<dbus::Path<'static>>, Self::Err>;
386 fn get_active_port(&self) -> Result<dbus::Path<'static>, Self::Err>;
387 fn set_active_port(&self, value: dbus::Path<'static>) -> Result<(), Self::Err>;
388 fn get_property_list(&self) -> Result<::std::collections::HashMap<String, Vec<u8>>, Self::Err>;
389}
390
391impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgPulseAudioCore1Device for dbus::ConnPath<'a, C> {
392 type Err = dbus::Error;
393
394 fn suspend(&self, suspend: bool) -> Result<(), Self::Err> {
395 let mut m = r#try!(self.method_call_with_args(&"org.PulseAudio.Core1.Device".into(), &"Suspend".into(), |msg| {
396 let mut i = arg::IterAppend::new(msg);
397 i.append(suspend);
398 }));
399 r#try!(m.as_result());
400 Ok(())
401 }
402
403 fn get_port_by_name(&self, name: &str) -> Result<dbus::Path<'static>, Self::Err> {
404 let mut m = r#try!(self.method_call_with_args(&"org.PulseAudio.Core1.Device".into(), &"GetPortByName".into(), |msg| {
405 let mut i = arg::IterAppend::new(msg);
406 i.append(name);
407 }));
408 r#try!(m.as_result());
409 let mut i = m.iter_init();
410 let port: dbus::Path<'static> = r#try!(i.read());
411 Ok(port)
412 }
413
414 fn get_index(&self) -> Result<u32, Self::Err> {
415 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "Index")
416 }
417
418 fn get_name(&self) -> Result<String, Self::Err> {
419 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "Name")
420 }
421
422 fn get_driver(&self) -> Result<String, Self::Err> {
423 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "Driver")
424 }
425
426 fn get_owner_module(&self) -> Result<dbus::Path<'static>, Self::Err> {
427 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "OwnerModule")
428 }
429
430 fn get_card(&self) -> Result<dbus::Path<'static>, Self::Err> {
431 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "Card")
432 }
433
434 fn get_sample_format(&self) -> Result<u32, Self::Err> {
435 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "SampleFormat")
436 }
437
438 fn get_sample_rate(&self) -> Result<u32, Self::Err> {
439 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "SampleRate")
440 }
441
442 fn get_channels(&self) -> Result<Vec<u32>, Self::Err> {
443 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "Channels")
444 }
445
446 fn get_volume(&self) -> Result<Vec<u32>, Self::Err> {
447 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "Volume")
448 }
449
450 fn get_has_flat_volume(&self) -> Result<bool, Self::Err> {
451 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "HasFlatVolume")
452 }
453
454 fn get_has_convertible_to_decibel_volume(&self) -> Result<bool, Self::Err> {
455 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "HasConvertibleToDecibelVolume")
456 }
457
458 fn get_base_volume(&self) -> Result<u32, Self::Err> {
459 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "BaseVolume")
460 }
461
462 fn get_volume_steps(&self) -> Result<u32, Self::Err> {
463 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "VolumeSteps")
464 }
465
466 fn get_mute(&self) -> Result<bool, Self::Err> {
467 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "Mute")
468 }
469
470 fn get_has_hardware_volume(&self) -> Result<bool, Self::Err> {
471 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "HasHardwareVolume")
472 }
473
474 fn get_has_hardware_mute(&self) -> Result<bool, Self::Err> {
475 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "HasHardwareMute")
476 }
477
478 fn get_configured_latency(&self) -> Result<u64, Self::Err> {
479 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "ConfiguredLatency")
480 }
481
482 fn get_has_dynamic_latency(&self) -> Result<bool, Self::Err> {
483 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "HasDynamicLatency")
484 }
485
486 fn get_latency(&self) -> Result<u64, Self::Err> {
487 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "Latency")
488 }
489
490 fn get_is_hardware_device(&self) -> Result<bool, Self::Err> {
491 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "IsHardwareDevice")
492 }
493
494 fn get_is_network_device(&self) -> Result<bool, Self::Err> {
495 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "IsNetworkDevice")
496 }
497
498 fn get_state(&self) -> Result<u32, Self::Err> {
499 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "State")
500 }
501
502 fn get_ports(&self) -> Result<Vec<dbus::Path<'static>>, Self::Err> {
503 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "Ports")
504 }
505
506 fn get_active_port(&self) -> Result<dbus::Path<'static>, Self::Err> {
507 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "ActivePort")
508 }
509
510 fn get_property_list(&self) -> Result<::std::collections::HashMap<String, Vec<u8>>, Self::Err> {
511 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Device", "PropertyList")
512 }
513
514 fn set_volume(&self, value: Vec<u32>) -> Result<(), Self::Err> {
515 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::set(&self, "org.PulseAudio.Core1.Device", "Volume", value)
516 }
517
518 fn set_mute(&self, value: bool) -> Result<(), Self::Err> {
519 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::set(&self, "org.PulseAudio.Core1.Device", "Mute", value)
520 }
521
522 fn set_active_port(&self, value: dbus::Path<'static>) -> Result<(), Self::Err> {
523 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::set(&self, "org.PulseAudio.Core1.Device", "ActivePort", value)
524 }
525}
526
527pub fn org_pulse_audio_core1_device_server<F, T, D>(factory: &tree::Factory<tree::MTFn<D>, D>, data: D::Interface, f: F) -> tree::Interface<tree::MTFn<D>, D>
528where
529 D: tree::DataType,
530 D::Method: Default,
531 D::Property: Default,
532 T: OrgPulseAudioCore1Device<Err=tree::MethodErr>,
533 F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T,
534{
535 let i = factory.interface("org.PulseAudio.Core1.Device", data);
536 let f = ::std::sync::Arc::new(f);
537 let fclone = f.clone();
538 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
539 let mut i = minfo.msg.iter_init();
540 let suspend: bool = r#try!(i.read());
541 let d = fclone(minfo);
542 r#try!(d.suspend(suspend));
543 let rm = minfo.msg.method_return();
544 Ok(vec!(rm))
545 };
546 let m = factory.method("Suspend", Default::default(), h);
547 let m = m.in_arg(("suspend", "b"));
548 let i = i.add_m(m);
549
550 let fclone = f.clone();
551 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
552 let mut i = minfo.msg.iter_init();
553 let name: &str = r#try!(i.read());
554 let d = fclone(minfo);
555 let port = r#try!(d.get_port_by_name(name));
556 let rm = minfo.msg.method_return();
557 let rm = rm.append1(port);
558 Ok(vec!(rm))
559 };
560 let m = factory.method("GetPortByName", Default::default(), h);
561 let m = m.in_arg(("name", "s"));
562 let m = m.out_arg(("port", "o"));
563 let i = i.add_m(m);
564
565 let p = factory.property::<u32, _>("Index", Default::default());
566 let p = p.access(tree::Access::Read);
567 let fclone = f.clone();
568 let p = p.on_get(move |a, pinfo| {
569 let minfo = pinfo.to_method_info();
570 let d = fclone(&minfo);
571 a.append(r#try!(d.get_index()));
572 Ok(())
573 });
574 let i = i.add_p(p);
575
576 let p = factory.property::<&str, _>("Name", Default::default());
577 let p = p.access(tree::Access::Read);
578 let fclone = f.clone();
579 let p = p.on_get(move |a, pinfo| {
580 let minfo = pinfo.to_method_info();
581 let d = fclone(&minfo);
582 a.append(r#try!(d.get_name()));
583 Ok(())
584 });
585 let i = i.add_p(p);
586
587 let p = factory.property::<&str, _>("Driver", Default::default());
588 let p = p.access(tree::Access::Read);
589 let fclone = f.clone();
590 let p = p.on_get(move |a, pinfo| {
591 let minfo = pinfo.to_method_info();
592 let d = fclone(&minfo);
593 a.append(r#try!(d.get_driver()));
594 Ok(())
595 });
596 let i = i.add_p(p);
597
598 let p = factory.property::<dbus::Path<'_>, _>("OwnerModule", Default::default());
599 let p = p.access(tree::Access::Read);
600 let fclone = f.clone();
601 let p = p.on_get(move |a, pinfo| {
602 let minfo = pinfo.to_method_info();
603 let d = fclone(&minfo);
604 a.append(r#try!(d.get_owner_module()));
605 Ok(())
606 });
607 let i = i.add_p(p);
608
609 let p = factory.property::<dbus::Path<'_>, _>("Card", Default::default());
610 let p = p.access(tree::Access::Read);
611 let fclone = f.clone();
612 let p = p.on_get(move |a, pinfo| {
613 let minfo = pinfo.to_method_info();
614 let d = fclone(&minfo);
615 a.append(r#try!(d.get_card()));
616 Ok(())
617 });
618 let i = i.add_p(p);
619
620 let p = factory.property::<u32, _>("SampleFormat", Default::default());
621 let p = p.access(tree::Access::Read);
622 let fclone = f.clone();
623 let p = p.on_get(move |a, pinfo| {
624 let minfo = pinfo.to_method_info();
625 let d = fclone(&minfo);
626 a.append(r#try!(d.get_sample_format()));
627 Ok(())
628 });
629 let i = i.add_p(p);
630
631 let p = factory.property::<u32, _>("SampleRate", Default::default());
632 let p = p.access(tree::Access::Read);
633 let fclone = f.clone();
634 let p = p.on_get(move |a, pinfo| {
635 let minfo = pinfo.to_method_info();
636 let d = fclone(&minfo);
637 a.append(r#try!(d.get_sample_rate()));
638 Ok(())
639 });
640 let i = i.add_p(p);
641
642 let p = factory.property::<Vec<u32>, _>("Channels", Default::default());
643 let p = p.access(tree::Access::Read);
644 let fclone = f.clone();
645 let p = p.on_get(move |a, pinfo| {
646 let minfo = pinfo.to_method_info();
647 let d = fclone(&minfo);
648 a.append(r#try!(d.get_channels()));
649 Ok(())
650 });
651 let i = i.add_p(p);
652
653 let p = factory.property::<Vec<u32>, _>("Volume", Default::default());
654 let p = p.access(tree::Access::ReadWrite);
655 let fclone = f.clone();
656 let p = p.on_get(move |a, pinfo| {
657 let minfo = pinfo.to_method_info();
658 let d = fclone(&minfo);
659 a.append(r#try!(d.get_volume()));
660 Ok(())
661 });
662 let fclone = f.clone();
663 let p = p.on_set(move |iter, pinfo| {
664 let minfo = pinfo.to_method_info();
665 let d = fclone(&minfo);
666 r#try!(d.set_volume(r#try!(iter.read())));
667 Ok(())
668 });
669 let i = i.add_p(p);
670
671 let p = factory.property::<bool, _>("HasFlatVolume", Default::default());
672 let p = p.access(tree::Access::Read);
673 let fclone = f.clone();
674 let p = p.on_get(move |a, pinfo| {
675 let minfo = pinfo.to_method_info();
676 let d = fclone(&minfo);
677 a.append(r#try!(d.get_has_flat_volume()));
678 Ok(())
679 });
680 let i = i.add_p(p);
681
682 let p = factory.property::<bool, _>("HasConvertibleToDecibelVolume", Default::default());
683 let p = p.access(tree::Access::Read);
684 let fclone = f.clone();
685 let p = p.on_get(move |a, pinfo| {
686 let minfo = pinfo.to_method_info();
687 let d = fclone(&minfo);
688 a.append(r#try!(d.get_has_convertible_to_decibel_volume()));
689 Ok(())
690 });
691 let i = i.add_p(p);
692
693 let p = factory.property::<u32, _>("BaseVolume", Default::default());
694 let p = p.access(tree::Access::Read);
695 let fclone = f.clone();
696 let p = p.on_get(move |a, pinfo| {
697 let minfo = pinfo.to_method_info();
698 let d = fclone(&minfo);
699 a.append(r#try!(d.get_base_volume()));
700 Ok(())
701 });
702 let i = i.add_p(p);
703
704 let p = factory.property::<u32, _>("VolumeSteps", Default::default());
705 let p = p.access(tree::Access::Read);
706 let fclone = f.clone();
707 let p = p.on_get(move |a, pinfo| {
708 let minfo = pinfo.to_method_info();
709 let d = fclone(&minfo);
710 a.append(r#try!(d.get_volume_steps()));
711 Ok(())
712 });
713 let i = i.add_p(p);
714
715 let p = factory.property::<bool, _>("Mute", Default::default());
716 let p = p.access(tree::Access::ReadWrite);
717 let fclone = f.clone();
718 let p = p.on_get(move |a, pinfo| {
719 let minfo = pinfo.to_method_info();
720 let d = fclone(&minfo);
721 a.append(r#try!(d.get_mute()));
722 Ok(())
723 });
724 let fclone = f.clone();
725 let p = p.on_set(move |iter, pinfo| {
726 let minfo = pinfo.to_method_info();
727 let d = fclone(&minfo);
728 r#try!(d.set_mute(r#try!(iter.read())));
729 Ok(())
730 });
731 let i = i.add_p(p);
732
733 let p = factory.property::<bool, _>("HasHardwareVolume", Default::default());
734 let p = p.access(tree::Access::Read);
735 let fclone = f.clone();
736 let p = p.on_get(move |a, pinfo| {
737 let minfo = pinfo.to_method_info();
738 let d = fclone(&minfo);
739 a.append(r#try!(d.get_has_hardware_volume()));
740 Ok(())
741 });
742 let i = i.add_p(p);
743
744 let p = factory.property::<bool, _>("HasHardwareMute", Default::default());
745 let p = p.access(tree::Access::Read);
746 let fclone = f.clone();
747 let p = p.on_get(move |a, pinfo| {
748 let minfo = pinfo.to_method_info();
749 let d = fclone(&minfo);
750 a.append(r#try!(d.get_has_hardware_mute()));
751 Ok(())
752 });
753 let i = i.add_p(p);
754
755 let p = factory.property::<u64, _>("ConfiguredLatency", Default::default());
756 let p = p.access(tree::Access::Read);
757 let fclone = f.clone();
758 let p = p.on_get(move |a, pinfo| {
759 let minfo = pinfo.to_method_info();
760 let d = fclone(&minfo);
761 a.append(r#try!(d.get_configured_latency()));
762 Ok(())
763 });
764 let i = i.add_p(p);
765
766 let p = factory.property::<bool, _>("HasDynamicLatency", Default::default());
767 let p = p.access(tree::Access::Read);
768 let fclone = f.clone();
769 let p = p.on_get(move |a, pinfo| {
770 let minfo = pinfo.to_method_info();
771 let d = fclone(&minfo);
772 a.append(r#try!(d.get_has_dynamic_latency()));
773 Ok(())
774 });
775 let i = i.add_p(p);
776
777 let p = factory.property::<u64, _>("Latency", Default::default());
778 let p = p.access(tree::Access::Read);
779 let fclone = f.clone();
780 let p = p.on_get(move |a, pinfo| {
781 let minfo = pinfo.to_method_info();
782 let d = fclone(&minfo);
783 a.append(r#try!(d.get_latency()));
784 Ok(())
785 });
786 let i = i.add_p(p);
787
788 let p = factory.property::<bool, _>("IsHardwareDevice", Default::default());
789 let p = p.access(tree::Access::Read);
790 let fclone = f.clone();
791 let p = p.on_get(move |a, pinfo| {
792 let minfo = pinfo.to_method_info();
793 let d = fclone(&minfo);
794 a.append(r#try!(d.get_is_hardware_device()));
795 Ok(())
796 });
797 let i = i.add_p(p);
798
799 let p = factory.property::<bool, _>("IsNetworkDevice", Default::default());
800 let p = p.access(tree::Access::Read);
801 let fclone = f.clone();
802 let p = p.on_get(move |a, pinfo| {
803 let minfo = pinfo.to_method_info();
804 let d = fclone(&minfo);
805 a.append(r#try!(d.get_is_network_device()));
806 Ok(())
807 });
808 let i = i.add_p(p);
809
810 let p = factory.property::<u32, _>("State", Default::default());
811 let p = p.access(tree::Access::Read);
812 let fclone = f.clone();
813 let p = p.on_get(move |a, pinfo| {
814 let minfo = pinfo.to_method_info();
815 let d = fclone(&minfo);
816 a.append(r#try!(d.get_state()));
817 Ok(())
818 });
819 let i = i.add_p(p);
820
821 let p = factory.property::<Vec<dbus::Path<'_>>, _>("Ports", Default::default());
822 let p = p.access(tree::Access::Read);
823 let fclone = f.clone();
824 let p = p.on_get(move |a, pinfo| {
825 let minfo = pinfo.to_method_info();
826 let d = fclone(&minfo);
827 a.append(r#try!(d.get_ports()));
828 Ok(())
829 });
830 let i = i.add_p(p);
831
832 let p = factory.property::<dbus::Path<'_>, _>("ActivePort", Default::default());
833 let p = p.access(tree::Access::ReadWrite);
834 let fclone = f.clone();
835 let p = p.on_get(move |a, pinfo| {
836 let minfo = pinfo.to_method_info();
837 let d = fclone(&minfo);
838 a.append(r#try!(d.get_active_port()));
839 Ok(())
840 });
841 let fclone = f.clone();
842 let p = p.on_set(move |iter, pinfo| {
843 let minfo = pinfo.to_method_info();
844 let d = fclone(&minfo);
845 r#try!(d.set_active_port(r#try!(iter.read())));
846 Ok(())
847 });
848 let i = i.add_p(p);
849
850 let p = factory.property::<::std::collections::HashMap<&str, Vec<u8>>, _>("PropertyList", Default::default());
851 let p = p.access(tree::Access::Read);
852 let fclone = f.clone();
853 let p = p.on_get(move |a, pinfo| {
854 let minfo = pinfo.to_method_info();
855 let d = fclone(&minfo);
856 a.append(r#try!(d.get_property_list()));
857 Ok(())
858 });
859 let i = i.add_p(p);
860 i
861}
862
863#[derive(Debug, Default)]
864pub struct OrgPulseAudioCore1DeviceVolumeUpdated {
865 pub volume: Vec<u32>,
866}
867
868impl dbus::SignalArgs for OrgPulseAudioCore1DeviceVolumeUpdated {
869 const NAME: &'static str = "VolumeUpdated";
870 const INTERFACE: &'static str = "org.PulseAudio.Core1.Device";
871 fn append(&self, i: &mut arg::IterAppend<'_>) {
872 (&self.volume as &dyn arg::RefArg).append(i);
873 }
874 fn get(&mut self, i: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> {
875 self.volume = r#try!(i.read());
876 Ok(())
877 }
878}
879
880#[derive(Debug, Default)]
881pub struct OrgPulseAudioCore1DeviceMuteUpdated {
882 pub muted: bool,
883}
884
885impl dbus::SignalArgs for OrgPulseAudioCore1DeviceMuteUpdated {
886 const NAME: &'static str = "MuteUpdated";
887 const INTERFACE: &'static str = "org.PulseAudio.Core1.Device";
888 fn append(&self, i: &mut arg::IterAppend<'_>) {
889 (&self.muted as &dyn arg::RefArg).append(i);
890 }
891 fn get(&mut self, i: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> {
892 self.muted = r#try!(i.read());
893 Ok(())
894 }
895}
896
897#[derive(Debug, Default)]
898pub struct OrgPulseAudioCore1DeviceStateUpdated {
899 pub state: u32,
900}
901
902impl dbus::SignalArgs for OrgPulseAudioCore1DeviceStateUpdated {
903 const NAME: &'static str = "StateUpdated";
904 const INTERFACE: &'static str = "org.PulseAudio.Core1.Device";
905 fn append(&self, i: &mut arg::IterAppend<'_>) {
906 (&self.state as &dyn arg::RefArg).append(i);
907 }
908 fn get(&mut self, i: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> {
909 self.state = r#try!(i.read());
910 Ok(())
911 }
912}
913
914#[derive(Debug, Default)]
915pub struct OrgPulseAudioCore1DeviceActivePortUpdated {
916 pub port: dbus::Path<'static>,
917}
918
919impl dbus::SignalArgs for OrgPulseAudioCore1DeviceActivePortUpdated {
920 const NAME: &'static str = "ActivePortUpdated";
921 const INTERFACE: &'static str = "org.PulseAudio.Core1.Device";
922 fn append(&self, i: &mut arg::IterAppend<'_>) {
923 (&self.port as &dyn arg::RefArg).append(i);
924 }
925 fn get(&mut self, i: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> {
926 self.port = r#try!(i.read());
927 Ok(())
928 }
929}
930
931#[derive(Debug, Default)]
932pub struct OrgPulseAudioCore1DevicePropertyListUpdated {
933 pub property_list: ::std::collections::HashMap<String, Vec<u8>>,
934}
935
936impl dbus::SignalArgs for OrgPulseAudioCore1DevicePropertyListUpdated {
937 const NAME: &'static str = "PropertyListUpdated";
938 const INTERFACE: &'static str = "org.PulseAudio.Core1.Device";
939 fn append(&self, i: &mut arg::IterAppend<'_>) {
940 (&self.property_list as &dyn arg::RefArg).append(i);
941 }
942 fn get(&mut self, i: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> {
943 self.property_list = r#try!(i.read());
944 Ok(())
945 }
946}
947
948pub trait OrgPulseAudioCore1Sink {
949 type Err;
950 fn get_monitor_source(&self) -> Result<dbus::Path<'static>, Self::Err>;
951}
952
953impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgPulseAudioCore1Sink for dbus::ConnPath<'a, C> {
954 type Err = dbus::Error;
955
956 fn get_monitor_source(&self) -> Result<dbus::Path<'static>, Self::Err> {
957 <Self as dbus::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.PulseAudio.Core1.Sink", "MonitorSource")
958 }
959}
960
961pub fn org_pulse_audio_core1_sink_server<F, T, D>(factory: &tree::Factory<tree::MTFn<D>, D>, data: D::Interface, f: F) -> tree::Interface<tree::MTFn<D>, D>
962where
963 D: tree::DataType,
964 D::Method: Default,
965 D::Property: Default,
966 T: OrgPulseAudioCore1Sink<Err=tree::MethodErr>,
967 F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T,
968{
969 let i = factory.interface("org.PulseAudio.Core1.Sink", data);
970 let f = ::std::sync::Arc::new(f);
971 let p = factory.property::<dbus::Path<'_>, _>("MonitorSource", Default::default());
972 let p = p.access(tree::Access::Read);
973 let fclone = f.clone();
974 let p = p.on_get(move |a, pinfo| {
975 let minfo = pinfo.to_method_info();
976 let d = fclone(&minfo);
977 a.append(r#try!(d.get_monitor_source()));
978 Ok(())
979 });
980 let i = i.add_p(p);
981 i
982}
983
984pub trait OrgFreedesktopDBusIntrospectable {
985 type Err;
986 fn introspect(&self) -> Result<String, Self::Err>;
987}
988
989impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusIntrospectable for dbus::ConnPath<'a, C> {
990 type Err = dbus::Error;
991
992 fn introspect(&self) -> Result<String, Self::Err> {
993 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Introspectable".into(), &"Introspect".into(), |_| {
994 }));
995 r#try!(m.as_result());
996 let mut i = m.iter_init();
997 let data: String = r#try!(i.read());
998 Ok(data)
999 }
1000}
1001
1002pub fn org_freedesktop_dbus_introspectable_server<F, T, D>(factory: &tree::Factory<tree::MTFn<D>, D>, data: D::Interface, f: F) -> tree::Interface<tree::MTFn<D>, D>
1003where
1004 D: tree::DataType,
1005 D::Method: Default,
1006 T: OrgFreedesktopDBusIntrospectable<Err=tree::MethodErr>,
1007 F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T,
1008{
1009 let i = factory.interface("org.freedesktop.DBus.Introspectable", data);
1010 let f = ::std::sync::Arc::new(f);
1011 let fclone = f.clone();
1012 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
1013 let d = fclone(minfo);
1014 let data = r#try!(d.introspect());
1015 let rm = minfo.msg.method_return();
1016 let rm = rm.append1(data);
1017 Ok(vec!(rm))
1018 };
1019 let m = factory.method("Introspect", Default::default(), h);
1020 let m = m.out_arg(("data", "s"));
1021 let i = i.add_m(m);
1022 i
1023}
1024
1025pub trait OrgFreedesktopDBusProperties {
1026 type Err;
1027 fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<dyn arg::RefArg>>, Self::Err>;
1028 fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<dyn arg::RefArg>>) -> Result<(), Self::Err>;
1029 fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>>, Self::Err>;
1030}
1031
1032impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusProperties for dbus::ConnPath<'a, C> {
1033 type Err = dbus::Error;
1034
1035 fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<dyn arg::RefArg>>, Self::Err> {
1036 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Get".into(), |msg| {
1037 let mut i = arg::IterAppend::new(msg);
1038 i.append(interface_name);
1039 i.append(property_name);
1040 }));
1041 r#try!(m.as_result());
1042 let mut i = m.iter_init();
1043 let value: arg::Variant<Box<dyn arg::RefArg>> = r#try!(i.read());
1044 Ok(value)
1045 }
1046
1047 fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<dyn arg::RefArg>>) -> Result<(), Self::Err> {
1048 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Set".into(), |msg| {
1049 let mut i = arg::IterAppend::new(msg);
1050 i.append(interface_name);
1051 i.append(property_name);
1052 i.append(value);
1053 }));
1054 r#try!(m.as_result());
1055 Ok(())
1056 }
1057
1058 fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>>, Self::Err> {
1059 let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"GetAll".into(), |msg| {
1060 let mut i = arg::IterAppend::new(msg);
1061 i.append(interface_name);
1062 }));
1063 r#try!(m.as_result());
1064 let mut i = m.iter_init();
1065 let props: ::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>> = r#try!(i.read());
1066 Ok(props)
1067 }
1068}
1069
1070pub fn org_freedesktop_dbus_properties_server<F, T, D>(factory: &tree::Factory<tree::MTFn<D>, D>, data: D::Interface, f: F) -> tree::Interface<tree::MTFn<D>, D>
1071where
1072 D: tree::DataType,
1073 D::Method: Default,
1074 T: OrgFreedesktopDBusProperties<Err=tree::MethodErr>,
1075 F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T,
1076{
1077 let i = factory.interface("org.freedesktop.DBus.Properties", data);
1078 let f = ::std::sync::Arc::new(f);
1079 let fclone = f.clone();
1080 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
1081 let mut i = minfo.msg.iter_init();
1082 let interface_name: &str = r#try!(i.read());
1083 let property_name: &str = r#try!(i.read());
1084 let d = fclone(minfo);
1085 let value = r#try!(d.get(interface_name, property_name));
1086 let rm = minfo.msg.method_return();
1087 let rm = rm.append1(value);
1088 Ok(vec!(rm))
1089 };
1090 let m = factory.method("Get", Default::default(), h);
1091 let m = m.in_arg(("interface_name", "s"));
1092 let m = m.in_arg(("property_name", "s"));
1093 let m = m.out_arg(("value", "v"));
1094 let i = i.add_m(m);
1095
1096 let fclone = f.clone();
1097 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
1098 let mut i = minfo.msg.iter_init();
1099 let interface_name: &str = r#try!(i.read());
1100 let property_name: &str = r#try!(i.read());
1101 let value: arg::Variant<Box<dyn arg::RefArg>> = r#try!(i.read());
1102 let d = fclone(minfo);
1103 r#try!(d.set(interface_name, property_name, value));
1104 let rm = minfo.msg.method_return();
1105 Ok(vec!(rm))
1106 };
1107 let m = factory.method("Set", Default::default(), h);
1108 let m = m.in_arg(("interface_name", "s"));
1109 let m = m.in_arg(("property_name", "s"));
1110 let m = m.in_arg(("value", "v"));
1111 let i = i.add_m(m);
1112
1113 let fclone = f.clone();
1114 let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| {
1115 let mut i = minfo.msg.iter_init();
1116 let interface_name: &str = r#try!(i.read());
1117 let d = fclone(minfo);
1118 let props = r#try!(d.get_all(interface_name));
1119 let rm = minfo.msg.method_return();
1120 let rm = rm.append1(props);
1121 Ok(vec!(rm))
1122 };
1123 let m = factory.method("GetAll", Default::default(), h);
1124 let m = m.in_arg(("interface_name", "s"));
1125 let m = m.out_arg(("props", "a{sv}"));
1126 let i = i.add_m(m);
1127 i
1128}
diff --git a/src/pa_eq/mod.rs b/src/pa_eq/mod.rs
deleted file mode 100644
index 09b2039..0000000
--- a/src/pa_eq/mod.rs
+++ /dev/null
@@ -1,115 +0,0 @@
1mod dbus_api;
2
3use crate::cli::pa_eq::*;
4use crate::utils::*;
5use crate::Filter;
6
7use self::dbus_api::equalizing_manager::OrgPulseAudioExtEqualizing1Manager;
8use self::dbus_api::server_lookup::OrgPulseAudioServerLookup1;
9use self::dbus_api::sink::OrgPulseAudioExtEqualizing1Equalizer;
10
11use dbus::{BusType, ConnPath, Connection};
12
13use failure::{Error, ResultExt};
14
15#[derive(Fail, Debug)]
16#[fail(display = "No equalized sink found")]
17struct NoEqualizedSink;
18
19pub fn main(cmd: Command) -> Result<(), Error> {
20 use crate::cli::pa_eq::Command::*;
21
22 warn!("The PulseAudio equalizer has been deprecated for a while, and is known to sometimes cause crashes, latency or audible artifacts");
23
24 match cmd {
25 Load(args) => load(args),
26 Reset(args) => reset(args),
27 }
28}
29
30pub fn reset(_args: ResetCli) -> Result<(), Error> {
31 let conn = connect()?;
32 let conn_sink = get_equalized_sink(&conn)?;
33 let filter_rate = conn_sink.get_filter_sample_rate()?;
34 let filter = Filter {
35 preamp: 1f64,
36 frequencies: vec![],
37 coefficients: vec![],
38 }
39 .pad(filter_rate);
40
41 send_filter(&conn_sink, filter)?;
42
43 Ok(())
44}
45
46pub fn load(args: LoadCli) -> Result<(), Error> {
47 let conn = connect()?;
48 let conn_sink = get_equalized_sink(&conn)?;
49
50 let filter = read_filter_from_arg(&args.file)?;
51
52 let filter_rate = conn_sink.get_filter_sample_rate()?;
53 send_filter(&conn_sink, filter.pad(filter_rate))?;
54
55 Ok(())
56}
57
58fn connect() -> Result<Connection, Error> {
59 Ok(connect_impl().context(
60 "Could not connect to PulseAudio's D-Bus socket. Have you loaded the 'module-dbus-protocol' module?"
61 )?)
62}
63
64fn connect_impl() -> Result<Connection, Error> {
65 let pulse_sock_path = get_pulse_dbus_sock()?;
66 info!("PulseAudio's D-Bus socket path is: {}", pulse_sock_path);
67
68 trace!("Connecting to PulseAudio's D-Bus socket");
69 Ok(Connection::open_private(&pulse_sock_path)?)
70}
71
72fn get_equalized_sink(conn: &Connection) -> Result<ConnPath<'_, &Connection>, Error> {
73 Ok(get_equalized_sink_impl(conn).context(
74 "Could not find an equalized sink. Have you loaded the 'module-equalizer-sink' module?",
75 )?)
76}
77
78fn get_equalized_sink_impl(conn: &Connection) -> Result<ConnPath<'_, &Connection>, Error> {
79 let conn_manager = conn.with_path("org.PulseAudio.Core1", "/org/pulseaudio/equalizing1", 2000);
80
81 // TODO: make that a command-line option
82 trace!("Getting (one of) the equalized sink(s)");
83 let mut sinks = conn_manager.get_equalized_sinks()?;
84 let sink_path = sinks.pop().ok_or(NoEqualizedSink {})?;
85 info!("Using equalized sink: {:?}", sink_path.as_cstr());
86
87 trace!("Connecting to equalized sink");
88 Ok(conn.with_path("org.PulseAudio.Core1", sink_path, 2000))
89}
90
91fn send_filter(conn_sink: &ConnPath<'_, &Connection>, filter: Filter) -> Result<(), Error> {
92 let channel = conn_sink.get_nchannels()?;
93 info!("Using channel: {}", channel);
94 trace!("Sending filter: {:?}", filter);
95 conn_sink.seed_filter(
96 channel,
97 filter.frequencies,
98 filter
99 .coefficients
100 .into_iter()
101 .map(decibel_to_ratio)
102 .collect(),
103 decibel_to_ratio(filter.preamp),
104 )?;
105 Ok(())
106}
107
108fn get_pulse_dbus_sock() -> Result<String, Error> {
109 trace!("Connecting to the D-Bus' session bus");
110 let conn = Connection::get_private(BusType::Session)?;
111 let conn = conn.with_path("org.PulseAudio1", "/org/pulseaudio/server_lookup1", 2000);
112
113 trace!("Checking PulseAudio's D-Bus socket path");
114 Ok(conn.get_address()?)
115}
diff --git a/src/utils.rs b/src/utils.rs
index 2e585b0..4596b3f 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -67,34 +67,3 @@ where
67 message: format!("{}", error), 67 message: format!("{}", error),
68 } 68 }
69} 69}
70
71pub fn decibel_to_ratio(decibel: f64) -> f64 {
72 10f64.powf(decibel / 10f64).sqrt()
73}
74
75/*
76fn introspect(conn: &dbus::ConnPath<&Connection>) {
77 let mut thing = conn
78 .method_call_with_args(
79 &"org.freedesktop.DBus.Introspectable".into(),
80 &"Introspect".into(),
81 |_| {},
82 ).unwrap();
83 thing.as_result().unwrap();
84
85 println!("{}", thing.iter_init().read::<String>().unwrap());
86}
87*/
88
89#[cfg(test)]
90mod tests {
91
92 #[test]
93 fn decibel_to_ratio() {
94 assert_eq!(super::decibel_to_ratio(0f64), 1f64);
95 assert_eq!(super::decibel_to_ratio(20f64), 10f64);
96 assert_eq!(super::decibel_to_ratio(40f64), 100f64);
97 assert_eq!(super::decibel_to_ratio(60f64), 1000f64);
98 }
99
100}