Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

setup gRPC and GraphQL server

+10186 -376
+2430 -3
Cargo.lock
··· 3 3 version = 3 4 4 5 5 [[package]] 6 + name = "Inflector" 7 + version = "0.11.4" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" 10 + dependencies = [ 11 + "lazy_static", 12 + "regex", 13 + ] 14 + 15 + [[package]] 16 + name = "actix" 17 + version = "0.13.5" 18 + source = "registry+https://github.com/rust-lang/crates.io-index" 19 + checksum = "de7fa236829ba0841304542f7614c42b80fca007455315c45c785ccfa873a85b" 20 + dependencies = [ 21 + "actix-macros", 22 + "actix-rt", 23 + "actix_derive", 24 + "bitflags", 25 + "bytes", 26 + "crossbeam-channel", 27 + "futures-core", 28 + "futures-sink", 29 + "futures-task", 30 + "futures-util", 31 + "log", 32 + "once_cell", 33 + "parking_lot", 34 + "pin-project-lite", 35 + "smallvec", 36 + "tokio", 37 + "tokio-util", 38 + ] 39 + 40 + [[package]] 41 + name = "actix-codec" 42 + version = "0.5.2" 43 + source = "registry+https://github.com/rust-lang/crates.io-index" 44 + checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" 45 + dependencies = [ 46 + "bitflags", 47 + "bytes", 48 + "futures-core", 49 + "futures-sink", 50 + "memchr", 51 + "pin-project-lite", 52 + "tokio", 53 + "tokio-util", 54 + "tracing", 55 + ] 56 + 57 + [[package]] 58 + name = "actix-cors" 59 + version = "0.7.0" 60 + source = "registry+https://github.com/rust-lang/crates.io-index" 61 + checksum = "f9e772b3bcafe335042b5db010ab7c09013dad6eac4915c91d8d50902769f331" 62 + dependencies = [ 63 + "actix-utils", 64 + "actix-web", 65 + "derive_more", 66 + "futures-util", 67 + "log", 68 + "once_cell", 69 + "smallvec", 70 + ] 71 + 72 + [[package]] 73 + name = "actix-http" 74 + version = "3.9.0" 75 + source = "registry+https://github.com/rust-lang/crates.io-index" 76 + checksum = "d48f96fc3003717aeb9856ca3d02a8c7de502667ad76eeacd830b48d2e91fac4" 77 + dependencies = [ 78 + "actix-codec", 79 + "actix-rt", 80 + "actix-service", 81 + "actix-utils", 82 + "ahash", 83 + "base64", 84 + "bitflags", 85 + "brotli", 86 + "bytes", 87 + "bytestring", 88 + "derive_more", 89 + "encoding_rs", 90 + "flate2", 91 + "futures-core", 92 + "h2 0.3.26", 93 + "http 0.2.12", 94 + "httparse", 95 + "httpdate", 96 + "itoa", 97 + "language-tags", 98 + "local-channel", 99 + "mime", 100 + "percent-encoding", 101 + "pin-project-lite", 102 + "rand", 103 + "sha1", 104 + "smallvec", 105 + "tokio", 106 + "tokio-util", 107 + "tracing", 108 + "zstd", 109 + ] 110 + 111 + [[package]] 112 + name = "actix-macros" 113 + version = "0.2.4" 114 + source = "registry+https://github.com/rust-lang/crates.io-index" 115 + checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" 116 + dependencies = [ 117 + "quote", 118 + "syn", 119 + ] 120 + 121 + [[package]] 122 + name = "actix-router" 123 + version = "0.5.3" 124 + source = "registry+https://github.com/rust-lang/crates.io-index" 125 + checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" 126 + dependencies = [ 127 + "bytestring", 128 + "cfg-if", 129 + "http 0.2.12", 130 + "regex", 131 + "regex-lite", 132 + "serde", 133 + "tracing", 134 + ] 135 + 136 + [[package]] 137 + name = "actix-rt" 138 + version = "2.10.0" 139 + source = "registry+https://github.com/rust-lang/crates.io-index" 140 + checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" 141 + dependencies = [ 142 + "futures-core", 143 + "tokio", 144 + ] 145 + 146 + [[package]] 147 + name = "actix-server" 148 + version = "2.5.0" 149 + source = "registry+https://github.com/rust-lang/crates.io-index" 150 + checksum = "7ca2549781d8dd6d75c40cf6b6051260a2cc2f3c62343d761a969a0640646894" 151 + dependencies = [ 152 + "actix-rt", 153 + "actix-service", 154 + "actix-utils", 155 + "futures-core", 156 + "futures-util", 157 + "mio", 158 + "socket2", 159 + "tokio", 160 + "tracing", 161 + ] 162 + 163 + [[package]] 164 + name = "actix-service" 165 + version = "2.0.2" 166 + source = "registry+https://github.com/rust-lang/crates.io-index" 167 + checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" 168 + dependencies = [ 169 + "futures-core", 170 + "paste", 171 + "pin-project-lite", 172 + ] 173 + 174 + [[package]] 175 + name = "actix-utils" 176 + version = "3.0.1" 177 + source = "registry+https://github.com/rust-lang/crates.io-index" 178 + checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" 179 + dependencies = [ 180 + "local-waker", 181 + "pin-project-lite", 182 + ] 183 + 184 + [[package]] 185 + name = "actix-web" 186 + version = "4.9.0" 187 + source = "registry+https://github.com/rust-lang/crates.io-index" 188 + checksum = "9180d76e5cc7ccbc4d60a506f2c727730b154010262df5b910eb17dbe4b8cb38" 189 + dependencies = [ 190 + "actix-codec", 191 + "actix-http", 192 + "actix-macros", 193 + "actix-router", 194 + "actix-rt", 195 + "actix-server", 196 + "actix-service", 197 + "actix-utils", 198 + "actix-web-codegen", 199 + "ahash", 200 + "bytes", 201 + "bytestring", 202 + "cfg-if", 203 + "cookie", 204 + "derive_more", 205 + "encoding_rs", 206 + "futures-core", 207 + "futures-util", 208 + "impl-more", 209 + "itoa", 210 + "language-tags", 211 + "log", 212 + "mime", 213 + "once_cell", 214 + "pin-project-lite", 215 + "regex", 216 + "regex-lite", 217 + "serde", 218 + "serde_json", 219 + "serde_urlencoded", 220 + "smallvec", 221 + "socket2", 222 + "time", 223 + "url", 224 + ] 225 + 226 + [[package]] 227 + name = "actix-web-actors" 228 + version = "4.3.1+deprecated" 229 + source = "registry+https://github.com/rust-lang/crates.io-index" 230 + checksum = "f98c5300b38fd004fe7d2a964f9a90813fdbe8a81fed500587e78b1b71c6f980" 231 + dependencies = [ 232 + "actix", 233 + "actix-codec", 234 + "actix-http", 235 + "actix-web", 236 + "bytes", 237 + "bytestring", 238 + "futures-core", 239 + "pin-project-lite", 240 + "tokio", 241 + "tokio-util", 242 + ] 243 + 244 + [[package]] 245 + name = "actix-web-codegen" 246 + version = "4.3.0" 247 + source = "registry+https://github.com/rust-lang/crates.io-index" 248 + checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" 249 + dependencies = [ 250 + "actix-router", 251 + "proc-macro2", 252 + "quote", 253 + "syn", 254 + ] 255 + 256 + [[package]] 257 + name = "actix_derive" 258 + version = "0.6.1" 259 + source = "registry+https://github.com/rust-lang/crates.io-index" 260 + checksum = "7c7db3d5a9718568e4cf4a537cfd7070e6e6ff7481510d0237fb529ac850f6d3" 261 + dependencies = [ 262 + "proc-macro2", 263 + "quote", 264 + "syn", 265 + ] 266 + 267 + [[package]] 268 + name = "addr2line" 269 + version = "0.24.1" 270 + source = "registry+https://github.com/rust-lang/crates.io-index" 271 + checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" 272 + dependencies = [ 273 + "gimli", 274 + ] 275 + 276 + [[package]] 277 + name = "adler2" 278 + version = "2.0.0" 279 + source = "registry+https://github.com/rust-lang/crates.io-index" 280 + checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 281 + 282 + [[package]] 283 + name = "ahash" 284 + version = "0.8.11" 285 + source = "registry+https://github.com/rust-lang/crates.io-index" 286 + checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" 287 + dependencies = [ 288 + "cfg-if", 289 + "getrandom", 290 + "once_cell", 291 + "version_check", 292 + "zerocopy", 293 + ] 294 + 295 + [[package]] 296 + name = "aho-corasick" 297 + version = "1.1.3" 298 + source = "registry+https://github.com/rust-lang/crates.io-index" 299 + checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 300 + dependencies = [ 301 + "memchr", 302 + ] 303 + 304 + [[package]] 305 + name = "alloc-no-stdlib" 306 + version = "2.0.4" 307 + source = "registry+https://github.com/rust-lang/crates.io-index" 308 + checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" 309 + 310 + [[package]] 311 + name = "alloc-stdlib" 312 + version = "0.2.2" 313 + source = "registry+https://github.com/rust-lang/crates.io-index" 314 + checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" 315 + dependencies = [ 316 + "alloc-no-stdlib", 317 + ] 318 + 319 + [[package]] 320 + name = "anyhow" 321 + version = "1.0.87" 322 + source = "registry+https://github.com/rust-lang/crates.io-index" 323 + checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" 324 + 325 + [[package]] 326 + name = "ascii_utils" 327 + version = "0.9.3" 328 + source = "registry+https://github.com/rust-lang/crates.io-index" 329 + checksum = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a" 330 + 331 + [[package]] 332 + name = "async-channel" 333 + version = "2.3.1" 334 + source = "registry+https://github.com/rust-lang/crates.io-index" 335 + checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" 336 + dependencies = [ 337 + "concurrent-queue", 338 + "event-listener-strategy", 339 + "futures-core", 340 + "pin-project-lite", 341 + ] 342 + 343 + [[package]] 344 + name = "async-graphql" 345 + version = "7.0.9" 346 + source = "registry+https://github.com/rust-lang/crates.io-index" 347 + checksum = "9d37c3e9ba322eb00e9e5e997d58f08e8b6de037325b9367ac59bca8e3cd46af" 348 + dependencies = [ 349 + "async-graphql-derive", 350 + "async-graphql-parser", 351 + "async-graphql-value", 352 + "async-stream", 353 + "async-trait", 354 + "base64", 355 + "bytes", 356 + "fast_chemail", 357 + "fnv", 358 + "futures-timer", 359 + "futures-util", 360 + "handlebars", 361 + "http 1.1.0", 362 + "indexmap 2.5.0", 363 + "mime", 364 + "multer", 365 + "num-traits", 366 + "once_cell", 367 + "pin-project-lite", 368 + "regex", 369 + "serde", 370 + "serde_json", 371 + "serde_urlencoded", 372 + "static_assertions_next", 373 + "tempfile", 374 + "thiserror", 375 + ] 376 + 377 + [[package]] 378 + name = "async-graphql-actix-web" 379 + version = "7.0.9" 380 + source = "registry+https://github.com/rust-lang/crates.io-index" 381 + checksum = "b84194aa7c13d234db9eb496945a345f2e76cf14b60de15ce95610207df2e93d" 382 + dependencies = [ 383 + "actix", 384 + "actix-http", 385 + "actix-web", 386 + "actix-web-actors", 387 + "async-channel", 388 + "async-graphql", 389 + "async-stream", 390 + "futures-channel", 391 + "futures-util", 392 + "serde_json", 393 + "thiserror", 394 + ] 395 + 396 + [[package]] 397 + name = "async-graphql-derive" 398 + version = "7.0.9" 399 + source = "registry+https://github.com/rust-lang/crates.io-index" 400 + checksum = "f1141703c11c6ad4fa9b3b0e1e476dea01dbd18a44db00f949b804afaab2f344" 401 + dependencies = [ 402 + "Inflector", 403 + "async-graphql-parser", 404 + "darling", 405 + "proc-macro-crate", 406 + "proc-macro2", 407 + "quote", 408 + "strum", 409 + "syn", 410 + "thiserror", 411 + ] 412 + 413 + [[package]] 414 + name = "async-graphql-parser" 415 + version = "7.0.9" 416 + source = "registry+https://github.com/rust-lang/crates.io-index" 417 + checksum = "2f66edcce4c38c18f7eb181fdf561c3d3aa2d644ce7358fc7a928c00a4ffef17" 418 + dependencies = [ 419 + "async-graphql-value", 420 + "pest", 421 + "serde", 422 + "serde_json", 423 + ] 424 + 425 + [[package]] 426 + name = "async-graphql-value" 427 + version = "7.0.9" 428 + source = "registry+https://github.com/rust-lang/crates.io-index" 429 + checksum = "3b0206011cad065420c27988f17dd7fe201a0e056b20c262209b7bffcd6fa176" 430 + dependencies = [ 431 + "bytes", 432 + "indexmap 2.5.0", 433 + "serde", 434 + "serde_json", 435 + ] 436 + 437 + [[package]] 438 + name = "async-stream" 439 + version = "0.3.5" 440 + source = "registry+https://github.com/rust-lang/crates.io-index" 441 + checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" 442 + dependencies = [ 443 + "async-stream-impl", 444 + "futures-core", 445 + "pin-project-lite", 446 + ] 447 + 448 + [[package]] 449 + name = "async-stream-impl" 450 + version = "0.3.5" 451 + source = "registry+https://github.com/rust-lang/crates.io-index" 452 + checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" 453 + dependencies = [ 454 + "proc-macro2", 455 + "quote", 456 + "syn", 457 + ] 458 + 459 + [[package]] 460 + name = "async-trait" 461 + version = "0.1.82" 462 + source = "registry+https://github.com/rust-lang/crates.io-index" 463 + checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" 464 + dependencies = [ 465 + "proc-macro2", 466 + "quote", 467 + "syn", 468 + ] 469 + 470 + [[package]] 471 + name = "atomic-waker" 472 + version = "1.1.2" 473 + source = "registry+https://github.com/rust-lang/crates.io-index" 474 + checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 475 + 476 + [[package]] 477 + name = "autocfg" 478 + version = "1.3.0" 479 + source = "registry+https://github.com/rust-lang/crates.io-index" 480 + checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" 481 + 482 + [[package]] 483 + name = "axum" 484 + version = "0.7.5" 485 + source = "registry+https://github.com/rust-lang/crates.io-index" 486 + checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" 487 + dependencies = [ 488 + "async-trait", 489 + "axum-core", 490 + "bytes", 491 + "futures-util", 492 + "http 1.1.0", 493 + "http-body", 494 + "http-body-util", 495 + "itoa", 496 + "matchit", 497 + "memchr", 498 + "mime", 499 + "percent-encoding", 500 + "pin-project-lite", 501 + "rustversion", 502 + "serde", 503 + "sync_wrapper 1.0.1", 504 + "tower", 505 + "tower-layer", 506 + "tower-service", 507 + ] 508 + 509 + [[package]] 510 + name = "axum-core" 511 + version = "0.4.3" 512 + source = "registry+https://github.com/rust-lang/crates.io-index" 513 + checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" 514 + dependencies = [ 515 + "async-trait", 516 + "bytes", 517 + "futures-util", 518 + "http 1.1.0", 519 + "http-body", 520 + "http-body-util", 521 + "mime", 522 + "pin-project-lite", 523 + "rustversion", 524 + "sync_wrapper 0.1.2", 525 + "tower-layer", 526 + "tower-service", 527 + ] 528 + 529 + [[package]] 530 + name = "backtrace" 531 + version = "0.3.74" 532 + source = "registry+https://github.com/rust-lang/crates.io-index" 533 + checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" 534 + dependencies = [ 535 + "addr2line", 536 + "cfg-if", 537 + "libc", 538 + "miniz_oxide", 539 + "object", 540 + "rustc-demangle", 541 + "windows-targets", 542 + ] 543 + 544 + [[package]] 545 + name = "base64" 546 + version = "0.22.1" 547 + source = "registry+https://github.com/rust-lang/crates.io-index" 548 + checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 549 + 550 + [[package]] 551 + name = "bitflags" 552 + version = "2.6.0" 553 + source = "registry+https://github.com/rust-lang/crates.io-index" 554 + checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 555 + 556 + [[package]] 557 + name = "block-buffer" 558 + version = "0.10.4" 559 + source = "registry+https://github.com/rust-lang/crates.io-index" 560 + checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 561 + dependencies = [ 562 + "generic-array", 563 + ] 564 + 565 + [[package]] 566 + name = "brotli" 567 + version = "6.0.0" 568 + source = "registry+https://github.com/rust-lang/crates.io-index" 569 + checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" 570 + dependencies = [ 571 + "alloc-no-stdlib", 572 + "alloc-stdlib", 573 + "brotli-decompressor", 574 + ] 575 + 576 + [[package]] 577 + name = "brotli-decompressor" 578 + version = "4.0.1" 579 + source = "registry+https://github.com/rust-lang/crates.io-index" 580 + checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" 581 + dependencies = [ 582 + "alloc-no-stdlib", 583 + "alloc-stdlib", 584 + ] 585 + 586 + [[package]] 587 + name = "byteorder" 588 + version = "1.5.0" 589 + source = "registry+https://github.com/rust-lang/crates.io-index" 590 + checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 591 + 592 + [[package]] 593 + name = "bytes" 594 + version = "1.7.1" 595 + source = "registry+https://github.com/rust-lang/crates.io-index" 596 + checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" 597 + dependencies = [ 598 + "serde", 599 + ] 600 + 601 + [[package]] 602 + name = "bytestring" 603 + version = "1.3.1" 604 + source = "registry+https://github.com/rust-lang/crates.io-index" 605 + checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" 606 + dependencies = [ 607 + "bytes", 608 + ] 609 + 610 + [[package]] 611 + name = "cc" 612 + version = "1.1.18" 613 + source = "registry+https://github.com/rust-lang/crates.io-index" 614 + checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" 615 + dependencies = [ 616 + "jobserver", 617 + "libc", 618 + "shlex", 619 + ] 620 + 621 + [[package]] 622 + name = "cfg-if" 623 + version = "1.0.0" 624 + source = "registry+https://github.com/rust-lang/crates.io-index" 625 + checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 626 + 627 + [[package]] 628 + name = "concurrent-queue" 629 + version = "2.5.0" 630 + source = "registry+https://github.com/rust-lang/crates.io-index" 631 + checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" 632 + dependencies = [ 633 + "crossbeam-utils", 634 + ] 635 + 636 + [[package]] 637 + name = "convert_case" 638 + version = "0.4.0" 639 + source = "registry+https://github.com/rust-lang/crates.io-index" 640 + checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 641 + 642 + [[package]] 643 + name = "cookie" 644 + version = "0.16.2" 645 + source = "registry+https://github.com/rust-lang/crates.io-index" 646 + checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" 647 + dependencies = [ 648 + "percent-encoding", 649 + "time", 650 + "version_check", 651 + ] 652 + 653 + [[package]] 654 + name = "cpufeatures" 655 + version = "0.2.14" 656 + source = "registry+https://github.com/rust-lang/crates.io-index" 657 + checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" 658 + dependencies = [ 659 + "libc", 660 + ] 661 + 662 + [[package]] 663 + name = "crc32fast" 664 + version = "1.4.2" 665 + source = "registry+https://github.com/rust-lang/crates.io-index" 666 + checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 667 + dependencies = [ 668 + "cfg-if", 669 + ] 670 + 671 + [[package]] 672 + name = "crossbeam-channel" 673 + version = "0.5.13" 674 + source = "registry+https://github.com/rust-lang/crates.io-index" 675 + checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" 676 + dependencies = [ 677 + "crossbeam-utils", 678 + ] 679 + 680 + [[package]] 681 + name = "crossbeam-utils" 682 + version = "0.8.20" 683 + source = "registry+https://github.com/rust-lang/crates.io-index" 684 + checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" 685 + 686 + [[package]] 687 + name = "crypto-common" 688 + version = "0.1.6" 689 + source = "registry+https://github.com/rust-lang/crates.io-index" 690 + checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 691 + dependencies = [ 692 + "generic-array", 693 + "typenum", 694 + ] 695 + 696 + [[package]] 697 + name = "darling" 698 + version = "0.20.10" 699 + source = "registry+https://github.com/rust-lang/crates.io-index" 700 + checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" 701 + dependencies = [ 702 + "darling_core", 703 + "darling_macro", 704 + ] 705 + 706 + [[package]] 707 + name = "darling_core" 708 + version = "0.20.10" 709 + source = "registry+https://github.com/rust-lang/crates.io-index" 710 + checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" 711 + dependencies = [ 712 + "fnv", 713 + "ident_case", 714 + "proc-macro2", 715 + "quote", 716 + "strsim", 717 + "syn", 718 + ] 719 + 720 + [[package]] 721 + name = "darling_macro" 722 + version = "0.20.10" 723 + source = "registry+https://github.com/rust-lang/crates.io-index" 724 + checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" 725 + dependencies = [ 726 + "darling_core", 727 + "quote", 728 + "syn", 729 + ] 730 + 731 + [[package]] 732 + name = "deranged" 733 + version = "0.3.11" 734 + source = "registry+https://github.com/rust-lang/crates.io-index" 735 + checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 736 + dependencies = [ 737 + "powerfmt", 738 + ] 739 + 740 + [[package]] 741 + name = "derive_more" 742 + version = "0.99.18" 743 + source = "registry+https://github.com/rust-lang/crates.io-index" 744 + checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" 745 + dependencies = [ 746 + "convert_case", 747 + "proc-macro2", 748 + "quote", 749 + "rustc_version", 750 + "syn", 751 + ] 752 + 753 + [[package]] 754 + name = "digest" 755 + version = "0.10.7" 756 + source = "registry+https://github.com/rust-lang/crates.io-index" 757 + checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 758 + dependencies = [ 759 + "block-buffer", 760 + "crypto-common", 761 + ] 762 + 763 + [[package]] 764 + name = "either" 765 + version = "1.13.0" 766 + source = "registry+https://github.com/rust-lang/crates.io-index" 767 + checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" 768 + 769 + [[package]] 770 + name = "encoding_rs" 771 + version = "0.8.34" 772 + source = "registry+https://github.com/rust-lang/crates.io-index" 773 + checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" 774 + dependencies = [ 775 + "cfg-if", 776 + ] 777 + 778 + [[package]] 779 + name = "equivalent" 780 + version = "1.0.1" 781 + source = "registry+https://github.com/rust-lang/crates.io-index" 782 + checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 783 + 784 + [[package]] 785 + name = "errno" 786 + version = "0.3.9" 787 + source = "registry+https://github.com/rust-lang/crates.io-index" 788 + checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" 789 + dependencies = [ 790 + "libc", 791 + "windows-sys 0.52.0", 792 + ] 793 + 794 + [[package]] 795 + name = "event-listener" 796 + version = "5.3.1" 797 + source = "registry+https://github.com/rust-lang/crates.io-index" 798 + checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" 799 + dependencies = [ 800 + "concurrent-queue", 801 + "parking", 802 + "pin-project-lite", 803 + ] 804 + 805 + [[package]] 806 + name = "event-listener-strategy" 807 + version = "0.5.2" 808 + source = "registry+https://github.com/rust-lang/crates.io-index" 809 + checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" 810 + dependencies = [ 811 + "event-listener", 812 + "pin-project-lite", 813 + ] 814 + 815 + [[package]] 816 + name = "fast_chemail" 817 + version = "0.9.6" 818 + source = "registry+https://github.com/rust-lang/crates.io-index" 819 + checksum = "495a39d30d624c2caabe6312bfead73e7717692b44e0b32df168c275a2e8e9e4" 820 + dependencies = [ 821 + "ascii_utils", 822 + ] 823 + 824 + [[package]] 825 + name = "fastrand" 826 + version = "2.1.1" 827 + source = "registry+https://github.com/rust-lang/crates.io-index" 828 + checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" 829 + 830 + [[package]] 831 + name = "fixedbitset" 832 + version = "0.4.2" 833 + source = "registry+https://github.com/rust-lang/crates.io-index" 834 + checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" 835 + 836 + [[package]] 837 + name = "flate2" 838 + version = "1.0.33" 839 + source = "registry+https://github.com/rust-lang/crates.io-index" 840 + checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" 841 + dependencies = [ 842 + "crc32fast", 843 + "miniz_oxide", 844 + ] 845 + 846 + [[package]] 847 + name = "fnv" 848 + version = "1.0.7" 849 + source = "registry+https://github.com/rust-lang/crates.io-index" 850 + checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 851 + 852 + [[package]] 853 + name = "form_urlencoded" 854 + version = "1.2.1" 855 + source = "registry+https://github.com/rust-lang/crates.io-index" 856 + checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 857 + dependencies = [ 858 + "percent-encoding", 859 + ] 860 + 861 + [[package]] 862 + name = "futures-channel" 863 + version = "0.3.30" 864 + source = "registry+https://github.com/rust-lang/crates.io-index" 865 + checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" 866 + dependencies = [ 867 + "futures-core", 868 + ] 869 + 870 + [[package]] 871 + name = "futures-core" 872 + version = "0.3.30" 873 + source = "registry+https://github.com/rust-lang/crates.io-index" 874 + checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 875 + 876 + [[package]] 877 + name = "futures-io" 878 + version = "0.3.30" 879 + source = "registry+https://github.com/rust-lang/crates.io-index" 880 + checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" 881 + 882 + [[package]] 883 + name = "futures-macro" 884 + version = "0.3.30" 885 + source = "registry+https://github.com/rust-lang/crates.io-index" 886 + checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" 887 + dependencies = [ 888 + "proc-macro2", 889 + "quote", 890 + "syn", 891 + ] 892 + 893 + [[package]] 894 + name = "futures-sink" 895 + version = "0.3.30" 896 + source = "registry+https://github.com/rust-lang/crates.io-index" 897 + checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" 898 + 899 + [[package]] 900 + name = "futures-task" 901 + version = "0.3.30" 902 + source = "registry+https://github.com/rust-lang/crates.io-index" 903 + checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" 904 + 905 + [[package]] 906 + name = "futures-timer" 907 + version = "3.0.3" 908 + source = "registry+https://github.com/rust-lang/crates.io-index" 909 + checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" 910 + 911 + [[package]] 912 + name = "futures-util" 913 + version = "0.3.30" 914 + source = "registry+https://github.com/rust-lang/crates.io-index" 915 + checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" 916 + dependencies = [ 917 + "futures-core", 918 + "futures-io", 919 + "futures-macro", 920 + "futures-sink", 921 + "futures-task", 922 + "memchr", 923 + "pin-project-lite", 924 + "pin-utils", 925 + "slab", 926 + ] 927 + 928 + [[package]] 929 + name = "generic-array" 930 + version = "0.14.7" 931 + source = "registry+https://github.com/rust-lang/crates.io-index" 932 + checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 933 + dependencies = [ 934 + "typenum", 935 + "version_check", 936 + ] 937 + 938 + [[package]] 939 + name = "getrandom" 940 + version = "0.2.15" 941 + source = "registry+https://github.com/rust-lang/crates.io-index" 942 + checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 943 + dependencies = [ 944 + "cfg-if", 945 + "libc", 946 + "wasi", 947 + ] 948 + 949 + [[package]] 950 + name = "gimli" 951 + version = "0.31.0" 952 + source = "registry+https://github.com/rust-lang/crates.io-index" 953 + checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" 954 + 955 + [[package]] 956 + name = "h2" 957 + version = "0.3.26" 958 + source = "registry+https://github.com/rust-lang/crates.io-index" 959 + checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" 960 + dependencies = [ 961 + "bytes", 962 + "fnv", 963 + "futures-core", 964 + "futures-sink", 965 + "futures-util", 966 + "http 0.2.12", 967 + "indexmap 2.5.0", 968 + "slab", 969 + "tokio", 970 + "tokio-util", 971 + "tracing", 972 + ] 973 + 974 + [[package]] 975 + name = "h2" 976 + version = "0.4.6" 977 + source = "registry+https://github.com/rust-lang/crates.io-index" 978 + checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" 979 + dependencies = [ 980 + "atomic-waker", 981 + "bytes", 982 + "fnv", 983 + "futures-core", 984 + "futures-sink", 985 + "http 1.1.0", 986 + "indexmap 2.5.0", 987 + "slab", 988 + "tokio", 989 + "tokio-util", 990 + "tracing", 991 + ] 992 + 993 + [[package]] 994 + name = "handlebars" 995 + version = "5.1.2" 996 + source = "registry+https://github.com/rust-lang/crates.io-index" 997 + checksum = "d08485b96a0e6393e9e4d1b8d48cf74ad6c063cd905eb33f42c1ce3f0377539b" 998 + dependencies = [ 999 + "log", 1000 + "pest", 1001 + "pest_derive", 1002 + "serde", 1003 + "serde_json", 1004 + "thiserror", 1005 + ] 1006 + 1007 + [[package]] 1008 + name = "hashbrown" 1009 + version = "0.12.3" 1010 + source = "registry+https://github.com/rust-lang/crates.io-index" 1011 + checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 1012 + 1013 + [[package]] 1014 + name = "hashbrown" 1015 + version = "0.14.5" 1016 + source = "registry+https://github.com/rust-lang/crates.io-index" 1017 + checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 1018 + 1019 + [[package]] 1020 + name = "heck" 1021 + version = "0.5.0" 1022 + source = "registry+https://github.com/rust-lang/crates.io-index" 1023 + checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 1024 + 1025 + [[package]] 1026 + name = "hermit-abi" 1027 + version = "0.3.9" 1028 + source = "registry+https://github.com/rust-lang/crates.io-index" 1029 + checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 1030 + 1031 + [[package]] 1032 + name = "http" 1033 + version = "0.2.12" 1034 + source = "registry+https://github.com/rust-lang/crates.io-index" 1035 + checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" 1036 + dependencies = [ 1037 + "bytes", 1038 + "fnv", 1039 + "itoa", 1040 + ] 1041 + 1042 + [[package]] 1043 + name = "http" 1044 + version = "1.1.0" 1045 + source = "registry+https://github.com/rust-lang/crates.io-index" 1046 + checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" 1047 + dependencies = [ 1048 + "bytes", 1049 + "fnv", 1050 + "itoa", 1051 + ] 1052 + 1053 + [[package]] 1054 + name = "http-body" 1055 + version = "1.0.1" 1056 + source = "registry+https://github.com/rust-lang/crates.io-index" 1057 + checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" 1058 + dependencies = [ 1059 + "bytes", 1060 + "http 1.1.0", 1061 + ] 1062 + 1063 + [[package]] 1064 + name = "http-body-util" 1065 + version = "0.1.2" 1066 + source = "registry+https://github.com/rust-lang/crates.io-index" 1067 + checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" 1068 + dependencies = [ 1069 + "bytes", 1070 + "futures-util", 1071 + "http 1.1.0", 1072 + "http-body", 1073 + "pin-project-lite", 1074 + ] 1075 + 1076 + [[package]] 1077 + name = "httparse" 1078 + version = "1.9.4" 1079 + source = "registry+https://github.com/rust-lang/crates.io-index" 1080 + checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" 1081 + 1082 + [[package]] 1083 + name = "httpdate" 1084 + version = "1.0.3" 1085 + source = "registry+https://github.com/rust-lang/crates.io-index" 1086 + checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 1087 + 1088 + [[package]] 1089 + name = "hyper" 1090 + version = "1.4.1" 1091 + source = "registry+https://github.com/rust-lang/crates.io-index" 1092 + checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" 1093 + dependencies = [ 1094 + "bytes", 1095 + "futures-channel", 1096 + "futures-util", 1097 + "h2 0.4.6", 1098 + "http 1.1.0", 1099 + "http-body", 1100 + "httparse", 1101 + "httpdate", 1102 + "itoa", 1103 + "pin-project-lite", 1104 + "smallvec", 1105 + "tokio", 1106 + "want", 1107 + ] 1108 + 1109 + [[package]] 1110 + name = "hyper-timeout" 1111 + version = "0.5.1" 1112 + source = "registry+https://github.com/rust-lang/crates.io-index" 1113 + checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" 1114 + dependencies = [ 1115 + "hyper", 1116 + "hyper-util", 1117 + "pin-project-lite", 1118 + "tokio", 1119 + "tower-service", 1120 + ] 1121 + 1122 + [[package]] 1123 + name = "hyper-util" 1124 + version = "0.1.8" 1125 + source = "registry+https://github.com/rust-lang/crates.io-index" 1126 + checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" 1127 + dependencies = [ 1128 + "bytes", 1129 + "futures-channel", 1130 + "futures-util", 1131 + "http 1.1.0", 1132 + "http-body", 1133 + "hyper", 1134 + "pin-project-lite", 1135 + "socket2", 1136 + "tokio", 1137 + "tower", 1138 + "tower-service", 1139 + "tracing", 1140 + ] 1141 + 1142 + [[package]] 1143 + name = "ident_case" 1144 + version = "1.0.1" 1145 + source = "registry+https://github.com/rust-lang/crates.io-index" 1146 + checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1147 + 1148 + [[package]] 1149 + name = "idna" 1150 + version = "0.5.0" 1151 + source = "registry+https://github.com/rust-lang/crates.io-index" 1152 + checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 1153 + dependencies = [ 1154 + "unicode-bidi", 1155 + "unicode-normalization", 1156 + ] 1157 + 1158 + [[package]] 1159 + name = "impl-more" 1160 + version = "0.1.6" 1161 + source = "registry+https://github.com/rust-lang/crates.io-index" 1162 + checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" 1163 + 1164 + [[package]] 1165 + name = "indexmap" 1166 + version = "1.9.3" 1167 + source = "registry+https://github.com/rust-lang/crates.io-index" 1168 + checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 1169 + dependencies = [ 1170 + "autocfg", 1171 + "hashbrown 0.12.3", 1172 + ] 1173 + 1174 + [[package]] 1175 + name = "indexmap" 1176 + version = "2.5.0" 1177 + source = "registry+https://github.com/rust-lang/crates.io-index" 1178 + checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" 1179 + dependencies = [ 1180 + "equivalent", 1181 + "hashbrown 0.14.5", 1182 + "serde", 1183 + ] 1184 + 1185 + [[package]] 1186 + name = "itertools" 1187 + version = "0.13.0" 1188 + source = "registry+https://github.com/rust-lang/crates.io-index" 1189 + checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" 1190 + dependencies = [ 1191 + "either", 1192 + ] 1193 + 1194 + [[package]] 1195 + name = "itoa" 1196 + version = "1.0.11" 1197 + source = "registry+https://github.com/rust-lang/crates.io-index" 1198 + checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 1199 + 1200 + [[package]] 1201 + name = "jobserver" 1202 + version = "0.1.32" 1203 + source = "registry+https://github.com/rust-lang/crates.io-index" 1204 + checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" 1205 + dependencies = [ 1206 + "libc", 1207 + ] 1208 + 1209 + [[package]] 1210 + name = "language-tags" 1211 + version = "0.3.2" 1212 + source = "registry+https://github.com/rust-lang/crates.io-index" 1213 + checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" 1214 + 1215 + [[package]] 1216 + name = "lazy_static" 1217 + version = "1.5.0" 1218 + source = "registry+https://github.com/rust-lang/crates.io-index" 1219 + checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 1220 + 1221 + [[package]] 1222 + name = "libc" 1223 + version = "0.2.158" 1224 + source = "registry+https://github.com/rust-lang/crates.io-index" 1225 + checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" 1226 + 1227 + [[package]] 1228 + name = "linux-raw-sys" 1229 + version = "0.4.14" 1230 + source = "registry+https://github.com/rust-lang/crates.io-index" 1231 + checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 1232 + 1233 + [[package]] 1234 + name = "local-channel" 1235 + version = "0.1.5" 1236 + source = "registry+https://github.com/rust-lang/crates.io-index" 1237 + checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" 1238 + dependencies = [ 1239 + "futures-core", 1240 + "futures-sink", 1241 + "local-waker", 1242 + ] 1243 + 1244 + [[package]] 1245 + name = "local-waker" 1246 + version = "0.1.4" 1247 + source = "registry+https://github.com/rust-lang/crates.io-index" 1248 + checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" 1249 + 1250 + [[package]] 1251 + name = "lock_api" 1252 + version = "0.4.12" 1253 + source = "registry+https://github.com/rust-lang/crates.io-index" 1254 + checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 1255 + dependencies = [ 1256 + "autocfg", 1257 + "scopeguard", 1258 + ] 1259 + 1260 + [[package]] 1261 + name = "log" 1262 + version = "0.4.22" 1263 + source = "registry+https://github.com/rust-lang/crates.io-index" 1264 + checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 1265 + 1266 + [[package]] 1267 + name = "matchit" 1268 + version = "0.7.3" 1269 + source = "registry+https://github.com/rust-lang/crates.io-index" 1270 + checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" 1271 + 1272 + [[package]] 1273 + name = "memchr" 1274 + version = "2.7.4" 1275 + source = "registry+https://github.com/rust-lang/crates.io-index" 1276 + checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 1277 + 1278 + [[package]] 1279 + name = "mime" 1280 + version = "0.3.17" 1281 + source = "registry+https://github.com/rust-lang/crates.io-index" 1282 + checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1283 + 1284 + [[package]] 1285 + name = "miniz_oxide" 1286 + version = "0.8.0" 1287 + source = "registry+https://github.com/rust-lang/crates.io-index" 1288 + checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" 1289 + dependencies = [ 1290 + "adler2", 1291 + ] 1292 + 1293 + [[package]] 1294 + name = "mio" 1295 + version = "1.0.2" 1296 + source = "registry+https://github.com/rust-lang/crates.io-index" 1297 + checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" 1298 + dependencies = [ 1299 + "hermit-abi", 1300 + "libc", 1301 + "log", 1302 + "wasi", 1303 + "windows-sys 0.52.0", 1304 + ] 1305 + 1306 + [[package]] 1307 + name = "multer" 1308 + version = "3.1.0" 1309 + source = "registry+https://github.com/rust-lang/crates.io-index" 1310 + checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" 1311 + dependencies = [ 1312 + "bytes", 1313 + "encoding_rs", 1314 + "futures-util", 1315 + "http 1.1.0", 1316 + "httparse", 1317 + "memchr", 1318 + "mime", 1319 + "spin", 1320 + "version_check", 1321 + ] 1322 + 1323 + [[package]] 1324 + name = "multimap" 1325 + version = "0.10.0" 1326 + source = "registry+https://github.com/rust-lang/crates.io-index" 1327 + checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" 1328 + 1329 + [[package]] 1330 + name = "num-conv" 1331 + version = "0.1.0" 1332 + source = "registry+https://github.com/rust-lang/crates.io-index" 1333 + checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 1334 + 1335 + [[package]] 1336 + name = "num-traits" 1337 + version = "0.2.19" 1338 + source = "registry+https://github.com/rust-lang/crates.io-index" 1339 + checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1340 + dependencies = [ 1341 + "autocfg", 1342 + ] 1343 + 1344 + [[package]] 1345 + name = "object" 1346 + version = "0.36.4" 1347 + source = "registry+https://github.com/rust-lang/crates.io-index" 1348 + checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" 1349 + dependencies = [ 1350 + "memchr", 1351 + ] 1352 + 1353 + [[package]] 1354 + name = "once_cell" 1355 + version = "1.19.0" 1356 + source = "registry+https://github.com/rust-lang/crates.io-index" 1357 + checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 1358 + 1359 + [[package]] 1360 + name = "owo-colors" 1361 + version = "4.1.0" 1362 + source = "registry+https://github.com/rust-lang/crates.io-index" 1363 + checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56" 1364 + 1365 + [[package]] 6 1366 name = "owo-colors" 7 - version = "4.0.0" 1367 + version = "5.0.0" 8 1368 source = "registry+https://github.com/rust-lang/crates.io-index" 9 - checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" 1369 + checksum = "8f1fd1e2f6b8c2caa4ede09a3c1b8fcab7b8b3c0c82987e685eb0df047b044f5" 1370 + 1371 + [[package]] 1372 + name = "parking" 1373 + version = "2.2.1" 1374 + source = "registry+https://github.com/rust-lang/crates.io-index" 1375 + checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" 1376 + 1377 + [[package]] 1378 + name = "parking_lot" 1379 + version = "0.12.3" 1380 + source = "registry+https://github.com/rust-lang/crates.io-index" 1381 + checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 1382 + dependencies = [ 1383 + "lock_api", 1384 + "parking_lot_core", 1385 + ] 1386 + 1387 + [[package]] 1388 + name = "parking_lot_core" 1389 + version = "0.9.10" 1390 + source = "registry+https://github.com/rust-lang/crates.io-index" 1391 + checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 1392 + dependencies = [ 1393 + "cfg-if", 1394 + "libc", 1395 + "redox_syscall", 1396 + "smallvec", 1397 + "windows-targets", 1398 + ] 1399 + 1400 + [[package]] 1401 + name = "paste" 1402 + version = "1.0.15" 1403 + source = "registry+https://github.com/rust-lang/crates.io-index" 1404 + checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 1405 + 1406 + [[package]] 1407 + name = "percent-encoding" 1408 + version = "2.3.1" 1409 + source = "registry+https://github.com/rust-lang/crates.io-index" 1410 + checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1411 + 1412 + [[package]] 1413 + name = "pest" 1414 + version = "2.7.12" 1415 + source = "registry+https://github.com/rust-lang/crates.io-index" 1416 + checksum = "9c73c26c01b8c87956cea613c907c9d6ecffd8d18a2a5908e5de0adfaa185cea" 1417 + dependencies = [ 1418 + "memchr", 1419 + "thiserror", 1420 + "ucd-trie", 1421 + ] 1422 + 1423 + [[package]] 1424 + name = "pest_derive" 1425 + version = "2.7.12" 1426 + source = "registry+https://github.com/rust-lang/crates.io-index" 1427 + checksum = "664d22978e2815783adbdd2c588b455b1bd625299ce36b2a99881ac9627e6d8d" 1428 + dependencies = [ 1429 + "pest", 1430 + "pest_generator", 1431 + ] 1432 + 1433 + [[package]] 1434 + name = "pest_generator" 1435 + version = "2.7.12" 1436 + source = "registry+https://github.com/rust-lang/crates.io-index" 1437 + checksum = "a2d5487022d5d33f4c30d91c22afa240ce2a644e87fe08caad974d4eab6badbe" 1438 + dependencies = [ 1439 + "pest", 1440 + "pest_meta", 1441 + "proc-macro2", 1442 + "quote", 1443 + "syn", 1444 + ] 1445 + 1446 + [[package]] 1447 + name = "pest_meta" 1448 + version = "2.7.12" 1449 + source = "registry+https://github.com/rust-lang/crates.io-index" 1450 + checksum = "0091754bbd0ea592c4deb3a122ce8ecbb0753b738aa82bc055fcc2eccc8d8174" 1451 + dependencies = [ 1452 + "once_cell", 1453 + "pest", 1454 + "sha2", 1455 + ] 1456 + 1457 + [[package]] 1458 + name = "petgraph" 1459 + version = "0.6.5" 1460 + source = "registry+https://github.com/rust-lang/crates.io-index" 1461 + checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" 1462 + dependencies = [ 1463 + "fixedbitset", 1464 + "indexmap 2.5.0", 1465 + ] 1466 + 1467 + [[package]] 1468 + name = "pin-project" 1469 + version = "1.1.5" 1470 + source = "registry+https://github.com/rust-lang/crates.io-index" 1471 + checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" 1472 + dependencies = [ 1473 + "pin-project-internal", 1474 + ] 1475 + 1476 + [[package]] 1477 + name = "pin-project-internal" 1478 + version = "1.1.5" 1479 + source = "registry+https://github.com/rust-lang/crates.io-index" 1480 + checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" 1481 + dependencies = [ 1482 + "proc-macro2", 1483 + "quote", 1484 + "syn", 1485 + ] 1486 + 1487 + [[package]] 1488 + name = "pin-project-lite" 1489 + version = "0.2.14" 1490 + source = "registry+https://github.com/rust-lang/crates.io-index" 1491 + checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" 1492 + 1493 + [[package]] 1494 + name = "pin-utils" 1495 + version = "0.1.0" 1496 + source = "registry+https://github.com/rust-lang/crates.io-index" 1497 + checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1498 + 1499 + [[package]] 1500 + name = "pkg-config" 1501 + version = "0.3.30" 1502 + source = "registry+https://github.com/rust-lang/crates.io-index" 1503 + checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" 1504 + 1505 + [[package]] 1506 + name = "powerfmt" 1507 + version = "0.2.0" 1508 + source = "registry+https://github.com/rust-lang/crates.io-index" 1509 + checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 1510 + 1511 + [[package]] 1512 + name = "ppv-lite86" 1513 + version = "0.2.20" 1514 + source = "registry+https://github.com/rust-lang/crates.io-index" 1515 + checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" 1516 + dependencies = [ 1517 + "zerocopy", 1518 + ] 1519 + 1520 + [[package]] 1521 + name = "prettyplease" 1522 + version = "0.2.22" 1523 + source = "registry+https://github.com/rust-lang/crates.io-index" 1524 + checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" 1525 + dependencies = [ 1526 + "proc-macro2", 1527 + "syn", 1528 + ] 1529 + 1530 + [[package]] 1531 + name = "proc-macro-crate" 1532 + version = "3.2.0" 1533 + source = "registry+https://github.com/rust-lang/crates.io-index" 1534 + checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" 1535 + dependencies = [ 1536 + "toml_edit", 1537 + ] 1538 + 1539 + [[package]] 1540 + name = "proc-macro2" 1541 + version = "1.0.86" 1542 + source = "registry+https://github.com/rust-lang/crates.io-index" 1543 + checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" 1544 + dependencies = [ 1545 + "unicode-ident", 1546 + ] 1547 + 1548 + [[package]] 1549 + name = "prost" 1550 + version = "0.13.2" 1551 + source = "registry+https://github.com/rust-lang/crates.io-index" 1552 + checksum = "3b2ecbe40f08db5c006b5764a2645f7f3f141ce756412ac9e1dd6087e6d32995" 1553 + dependencies = [ 1554 + "bytes", 1555 + "prost-derive", 1556 + ] 1557 + 1558 + [[package]] 1559 + name = "prost-build" 1560 + version = "0.13.2" 1561 + source = "registry+https://github.com/rust-lang/crates.io-index" 1562 + checksum = "f8650aabb6c35b860610e9cff5dc1af886c9e25073b7b1712a68972af4281302" 1563 + dependencies = [ 1564 + "bytes", 1565 + "heck", 1566 + "itertools", 1567 + "log", 1568 + "multimap", 1569 + "once_cell", 1570 + "petgraph", 1571 + "prettyplease", 1572 + "prost", 1573 + "prost-types", 1574 + "regex", 1575 + "syn", 1576 + "tempfile", 1577 + ] 1578 + 1579 + [[package]] 1580 + name = "prost-derive" 1581 + version = "0.13.2" 1582 + source = "registry+https://github.com/rust-lang/crates.io-index" 1583 + checksum = "acf0c195eebb4af52c752bec4f52f645da98b6e92077a04110c7f349477ae5ac" 1584 + dependencies = [ 1585 + "anyhow", 1586 + "itertools", 1587 + "proc-macro2", 1588 + "quote", 1589 + "syn", 1590 + ] 1591 + 1592 + [[package]] 1593 + name = "prost-types" 1594 + version = "0.13.2" 1595 + source = "registry+https://github.com/rust-lang/crates.io-index" 1596 + checksum = "60caa6738c7369b940c3d49246a8d1749323674c65cb13010134f5c9bad5b519" 1597 + dependencies = [ 1598 + "prost", 1599 + ] 1600 + 1601 + [[package]] 1602 + name = "quote" 1603 + version = "1.0.37" 1604 + source = "registry+https://github.com/rust-lang/crates.io-index" 1605 + checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 1606 + dependencies = [ 1607 + "proc-macro2", 1608 + ] 1609 + 1610 + [[package]] 1611 + name = "rand" 1612 + version = "0.8.5" 1613 + source = "registry+https://github.com/rust-lang/crates.io-index" 1614 + checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1615 + dependencies = [ 1616 + "libc", 1617 + "rand_chacha", 1618 + "rand_core", 1619 + ] 1620 + 1621 + [[package]] 1622 + name = "rand_chacha" 1623 + version = "0.3.1" 1624 + source = "registry+https://github.com/rust-lang/crates.io-index" 1625 + checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1626 + dependencies = [ 1627 + "ppv-lite86", 1628 + "rand_core", 1629 + ] 1630 + 1631 + [[package]] 1632 + name = "rand_core" 1633 + version = "0.6.4" 1634 + source = "registry+https://github.com/rust-lang/crates.io-index" 1635 + checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1636 + dependencies = [ 1637 + "getrandom", 1638 + ] 1639 + 1640 + [[package]] 1641 + name = "redox_syscall" 1642 + version = "0.5.3" 1643 + source = "registry+https://github.com/rust-lang/crates.io-index" 1644 + checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" 1645 + dependencies = [ 1646 + "bitflags", 1647 + ] 1648 + 1649 + [[package]] 1650 + name = "regex" 1651 + version = "1.10.6" 1652 + source = "registry+https://github.com/rust-lang/crates.io-index" 1653 + checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" 1654 + dependencies = [ 1655 + "aho-corasick", 1656 + "memchr", 1657 + "regex-automata", 1658 + "regex-syntax", 1659 + ] 1660 + 1661 + [[package]] 1662 + name = "regex-automata" 1663 + version = "0.4.7" 1664 + source = "registry+https://github.com/rust-lang/crates.io-index" 1665 + checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" 1666 + dependencies = [ 1667 + "aho-corasick", 1668 + "memchr", 1669 + "regex-syntax", 1670 + ] 1671 + 1672 + [[package]] 1673 + name = "regex-lite" 1674 + version = "0.1.6" 1675 + source = "registry+https://github.com/rust-lang/crates.io-index" 1676 + checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" 1677 + 1678 + [[package]] 1679 + name = "regex-syntax" 1680 + version = "0.8.4" 1681 + source = "registry+https://github.com/rust-lang/crates.io-index" 1682 + checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" 10 1683 11 1684 [[package]] 12 1685 name = "rockbox-graphql" 13 1686 version = "0.1.0" 14 1687 dependencies = [ 1688 + "actix-cors", 1689 + "actix-web", 1690 + "anyhow", 1691 + "async-graphql", 1692 + "async-graphql-actix-web", 1693 + "owo-colors 4.1.0", 15 1694 "rockbox-sys", 1695 + "serde", 1696 + "tokio", 16 1697 ] 17 1698 18 1699 [[package]] 19 1700 name = "rockbox-rpc" 20 1701 version = "0.1.0" 21 1702 dependencies = [ 1703 + "owo-colors 5.0.0", 1704 + "prost", 22 1705 "rockbox-sys", 1706 + "serde", 1707 + "tokio", 1708 + "tonic", 1709 + "tonic-build", 1710 + "tonic-reflection", 1711 + "tonic-web", 23 1712 ] 24 1713 25 1714 [[package]] 26 1715 name = "rockbox-server" 27 1716 version = "0.1.0" 28 1717 dependencies = [ 29 - "owo-colors", 1718 + "owo-colors 4.1.0", 30 1719 "rockbox-graphql", 31 1720 "rockbox-rpc", 32 1721 "rockbox-sys", 1722 + "tokio", 33 1723 ] 34 1724 35 1725 [[package]] 36 1726 name = "rockbox-sys" 37 1727 version = "0.1.0" 1728 + 1729 + [[package]] 1730 + name = "rustc-demangle" 1731 + version = "0.1.24" 1732 + source = "registry+https://github.com/rust-lang/crates.io-index" 1733 + checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 1734 + 1735 + [[package]] 1736 + name = "rustc_version" 1737 + version = "0.4.1" 1738 + source = "registry+https://github.com/rust-lang/crates.io-index" 1739 + checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" 1740 + dependencies = [ 1741 + "semver", 1742 + ] 1743 + 1744 + [[package]] 1745 + name = "rustix" 1746 + version = "0.38.36" 1747 + source = "registry+https://github.com/rust-lang/crates.io-index" 1748 + checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" 1749 + dependencies = [ 1750 + "bitflags", 1751 + "errno", 1752 + "libc", 1753 + "linux-raw-sys", 1754 + "windows-sys 0.52.0", 1755 + ] 1756 + 1757 + [[package]] 1758 + name = "rustversion" 1759 + version = "1.0.17" 1760 + source = "registry+https://github.com/rust-lang/crates.io-index" 1761 + checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" 1762 + 1763 + [[package]] 1764 + name = "ryu" 1765 + version = "1.0.18" 1766 + source = "registry+https://github.com/rust-lang/crates.io-index" 1767 + checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 1768 + 1769 + [[package]] 1770 + name = "scopeguard" 1771 + version = "1.2.0" 1772 + source = "registry+https://github.com/rust-lang/crates.io-index" 1773 + checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1774 + 1775 + [[package]] 1776 + name = "semver" 1777 + version = "1.0.23" 1778 + source = "registry+https://github.com/rust-lang/crates.io-index" 1779 + checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" 1780 + 1781 + [[package]] 1782 + name = "serde" 1783 + version = "1.0.210" 1784 + source = "registry+https://github.com/rust-lang/crates.io-index" 1785 + checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" 1786 + dependencies = [ 1787 + "serde_derive", 1788 + ] 1789 + 1790 + [[package]] 1791 + name = "serde_derive" 1792 + version = "1.0.210" 1793 + source = "registry+https://github.com/rust-lang/crates.io-index" 1794 + checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" 1795 + dependencies = [ 1796 + "proc-macro2", 1797 + "quote", 1798 + "syn", 1799 + ] 1800 + 1801 + [[package]] 1802 + name = "serde_json" 1803 + version = "1.0.128" 1804 + source = "registry+https://github.com/rust-lang/crates.io-index" 1805 + checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" 1806 + dependencies = [ 1807 + "itoa", 1808 + "memchr", 1809 + "ryu", 1810 + "serde", 1811 + ] 1812 + 1813 + [[package]] 1814 + name = "serde_urlencoded" 1815 + version = "0.7.1" 1816 + source = "registry+https://github.com/rust-lang/crates.io-index" 1817 + checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1818 + dependencies = [ 1819 + "form_urlencoded", 1820 + "itoa", 1821 + "ryu", 1822 + "serde", 1823 + ] 1824 + 1825 + [[package]] 1826 + name = "sha1" 1827 + version = "0.10.6" 1828 + source = "registry+https://github.com/rust-lang/crates.io-index" 1829 + checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 1830 + dependencies = [ 1831 + "cfg-if", 1832 + "cpufeatures", 1833 + "digest", 1834 + ] 1835 + 1836 + [[package]] 1837 + name = "sha2" 1838 + version = "0.10.8" 1839 + source = "registry+https://github.com/rust-lang/crates.io-index" 1840 + checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 1841 + dependencies = [ 1842 + "cfg-if", 1843 + "cpufeatures", 1844 + "digest", 1845 + ] 1846 + 1847 + [[package]] 1848 + name = "shlex" 1849 + version = "1.3.0" 1850 + source = "registry+https://github.com/rust-lang/crates.io-index" 1851 + checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1852 + 1853 + [[package]] 1854 + name = "signal-hook-registry" 1855 + version = "1.4.2" 1856 + source = "registry+https://github.com/rust-lang/crates.io-index" 1857 + checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" 1858 + dependencies = [ 1859 + "libc", 1860 + ] 1861 + 1862 + [[package]] 1863 + name = "slab" 1864 + version = "0.4.9" 1865 + source = "registry+https://github.com/rust-lang/crates.io-index" 1866 + checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 1867 + dependencies = [ 1868 + "autocfg", 1869 + ] 1870 + 1871 + [[package]] 1872 + name = "smallvec" 1873 + version = "1.13.2" 1874 + source = "registry+https://github.com/rust-lang/crates.io-index" 1875 + checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 1876 + 1877 + [[package]] 1878 + name = "socket2" 1879 + version = "0.5.7" 1880 + source = "registry+https://github.com/rust-lang/crates.io-index" 1881 + checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" 1882 + dependencies = [ 1883 + "libc", 1884 + "windows-sys 0.52.0", 1885 + ] 1886 + 1887 + [[package]] 1888 + name = "spin" 1889 + version = "0.9.8" 1890 + source = "registry+https://github.com/rust-lang/crates.io-index" 1891 + checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 1892 + 1893 + [[package]] 1894 + name = "static_assertions_next" 1895 + version = "1.1.2" 1896 + source = "registry+https://github.com/rust-lang/crates.io-index" 1897 + checksum = "d7beae5182595e9a8b683fa98c4317f956c9a2dec3b9716990d20023cc60c766" 1898 + 1899 + [[package]] 1900 + name = "strsim" 1901 + version = "0.11.1" 1902 + source = "registry+https://github.com/rust-lang/crates.io-index" 1903 + checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 1904 + 1905 + [[package]] 1906 + name = "strum" 1907 + version = "0.26.3" 1908 + source = "registry+https://github.com/rust-lang/crates.io-index" 1909 + checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" 1910 + dependencies = [ 1911 + "strum_macros", 1912 + ] 1913 + 1914 + [[package]] 1915 + name = "strum_macros" 1916 + version = "0.26.4" 1917 + source = "registry+https://github.com/rust-lang/crates.io-index" 1918 + checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" 1919 + dependencies = [ 1920 + "heck", 1921 + "proc-macro2", 1922 + "quote", 1923 + "rustversion", 1924 + "syn", 1925 + ] 1926 + 1927 + [[package]] 1928 + name = "syn" 1929 + version = "2.0.77" 1930 + source = "registry+https://github.com/rust-lang/crates.io-index" 1931 + checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" 1932 + dependencies = [ 1933 + "proc-macro2", 1934 + "quote", 1935 + "unicode-ident", 1936 + ] 1937 + 1938 + [[package]] 1939 + name = "sync_wrapper" 1940 + version = "0.1.2" 1941 + source = "registry+https://github.com/rust-lang/crates.io-index" 1942 + checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" 1943 + 1944 + [[package]] 1945 + name = "sync_wrapper" 1946 + version = "1.0.1" 1947 + source = "registry+https://github.com/rust-lang/crates.io-index" 1948 + checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" 1949 + 1950 + [[package]] 1951 + name = "tempfile" 1952 + version = "3.12.0" 1953 + source = "registry+https://github.com/rust-lang/crates.io-index" 1954 + checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" 1955 + dependencies = [ 1956 + "cfg-if", 1957 + "fastrand", 1958 + "once_cell", 1959 + "rustix", 1960 + "windows-sys 0.59.0", 1961 + ] 1962 + 1963 + [[package]] 1964 + name = "thiserror" 1965 + version = "1.0.63" 1966 + source = "registry+https://github.com/rust-lang/crates.io-index" 1967 + checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" 1968 + dependencies = [ 1969 + "thiserror-impl", 1970 + ] 1971 + 1972 + [[package]] 1973 + name = "thiserror-impl" 1974 + version = "1.0.63" 1975 + source = "registry+https://github.com/rust-lang/crates.io-index" 1976 + checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" 1977 + dependencies = [ 1978 + "proc-macro2", 1979 + "quote", 1980 + "syn", 1981 + ] 1982 + 1983 + [[package]] 1984 + name = "time" 1985 + version = "0.3.36" 1986 + source = "registry+https://github.com/rust-lang/crates.io-index" 1987 + checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" 1988 + dependencies = [ 1989 + "deranged", 1990 + "itoa", 1991 + "num-conv", 1992 + "powerfmt", 1993 + "serde", 1994 + "time-core", 1995 + "time-macros", 1996 + ] 1997 + 1998 + [[package]] 1999 + name = "time-core" 2000 + version = "0.1.2" 2001 + source = "registry+https://github.com/rust-lang/crates.io-index" 2002 + checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 2003 + 2004 + [[package]] 2005 + name = "time-macros" 2006 + version = "0.2.18" 2007 + source = "registry+https://github.com/rust-lang/crates.io-index" 2008 + checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" 2009 + dependencies = [ 2010 + "num-conv", 2011 + "time-core", 2012 + ] 2013 + 2014 + [[package]] 2015 + name = "tinyvec" 2016 + version = "1.8.0" 2017 + source = "registry+https://github.com/rust-lang/crates.io-index" 2018 + checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" 2019 + dependencies = [ 2020 + "tinyvec_macros", 2021 + ] 2022 + 2023 + [[package]] 2024 + name = "tinyvec_macros" 2025 + version = "0.1.1" 2026 + source = "registry+https://github.com/rust-lang/crates.io-index" 2027 + checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2028 + 2029 + [[package]] 2030 + name = "tokio" 2031 + version = "1.40.0" 2032 + source = "registry+https://github.com/rust-lang/crates.io-index" 2033 + checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" 2034 + dependencies = [ 2035 + "backtrace", 2036 + "bytes", 2037 + "libc", 2038 + "mio", 2039 + "parking_lot", 2040 + "pin-project-lite", 2041 + "signal-hook-registry", 2042 + "socket2", 2043 + "tokio-macros", 2044 + "windows-sys 0.52.0", 2045 + ] 2046 + 2047 + [[package]] 2048 + name = "tokio-macros" 2049 + version = "2.4.0" 2050 + source = "registry+https://github.com/rust-lang/crates.io-index" 2051 + checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" 2052 + dependencies = [ 2053 + "proc-macro2", 2054 + "quote", 2055 + "syn", 2056 + ] 2057 + 2058 + [[package]] 2059 + name = "tokio-stream" 2060 + version = "0.1.16" 2061 + source = "registry+https://github.com/rust-lang/crates.io-index" 2062 + checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" 2063 + dependencies = [ 2064 + "futures-core", 2065 + "pin-project-lite", 2066 + "tokio", 2067 + ] 2068 + 2069 + [[package]] 2070 + name = "tokio-util" 2071 + version = "0.7.12" 2072 + source = "registry+https://github.com/rust-lang/crates.io-index" 2073 + checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" 2074 + dependencies = [ 2075 + "bytes", 2076 + "futures-core", 2077 + "futures-sink", 2078 + "pin-project-lite", 2079 + "tokio", 2080 + ] 2081 + 2082 + [[package]] 2083 + name = "toml_datetime" 2084 + version = "0.6.8" 2085 + source = "registry+https://github.com/rust-lang/crates.io-index" 2086 + checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" 2087 + 2088 + [[package]] 2089 + name = "toml_edit" 2090 + version = "0.22.20" 2091 + source = "registry+https://github.com/rust-lang/crates.io-index" 2092 + checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" 2093 + dependencies = [ 2094 + "indexmap 2.5.0", 2095 + "toml_datetime", 2096 + "winnow", 2097 + ] 2098 + 2099 + [[package]] 2100 + name = "tonic" 2101 + version = "0.12.2" 2102 + source = "registry+https://github.com/rust-lang/crates.io-index" 2103 + checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" 2104 + dependencies = [ 2105 + "async-stream", 2106 + "async-trait", 2107 + "axum", 2108 + "base64", 2109 + "bytes", 2110 + "h2 0.4.6", 2111 + "http 1.1.0", 2112 + "http-body", 2113 + "http-body-util", 2114 + "hyper", 2115 + "hyper-timeout", 2116 + "hyper-util", 2117 + "percent-encoding", 2118 + "pin-project", 2119 + "prost", 2120 + "socket2", 2121 + "tokio", 2122 + "tokio-stream", 2123 + "tower", 2124 + "tower-layer", 2125 + "tower-service", 2126 + "tracing", 2127 + ] 2128 + 2129 + [[package]] 2130 + name = "tonic-build" 2131 + version = "0.12.2" 2132 + source = "registry+https://github.com/rust-lang/crates.io-index" 2133 + checksum = "fe4ee8877250136bd7e3d2331632810a4df4ea5e004656990d8d66d2f5ee8a67" 2134 + dependencies = [ 2135 + "prettyplease", 2136 + "proc-macro2", 2137 + "prost-build", 2138 + "quote", 2139 + "syn", 2140 + ] 2141 + 2142 + [[package]] 2143 + name = "tonic-reflection" 2144 + version = "0.12.2" 2145 + source = "registry+https://github.com/rust-lang/crates.io-index" 2146 + checksum = "7b56b874eedb04f89907573b408eab1e87c1c1dce43aac6ad63742f57faa99ff" 2147 + dependencies = [ 2148 + "prost", 2149 + "prost-types", 2150 + "tokio", 2151 + "tokio-stream", 2152 + "tonic", 2153 + ] 2154 + 2155 + [[package]] 2156 + name = "tonic-web" 2157 + version = "0.12.2" 2158 + source = "registry+https://github.com/rust-lang/crates.io-index" 2159 + checksum = "b904b18f914fe88913a9f0d750065b39c9c497e4b2aa05148f2c29a724145541" 2160 + dependencies = [ 2161 + "base64", 2162 + "bytes", 2163 + "http 1.1.0", 2164 + "http-body", 2165 + "http-body-util", 2166 + "pin-project", 2167 + "tokio-stream", 2168 + "tonic", 2169 + "tower-http", 2170 + "tower-layer", 2171 + "tower-service", 2172 + "tracing", 2173 + ] 2174 + 2175 + [[package]] 2176 + name = "tower" 2177 + version = "0.4.13" 2178 + source = "registry+https://github.com/rust-lang/crates.io-index" 2179 + checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 2180 + dependencies = [ 2181 + "futures-core", 2182 + "futures-util", 2183 + "indexmap 1.9.3", 2184 + "pin-project", 2185 + "pin-project-lite", 2186 + "rand", 2187 + "slab", 2188 + "tokio", 2189 + "tokio-util", 2190 + "tower-layer", 2191 + "tower-service", 2192 + "tracing", 2193 + ] 2194 + 2195 + [[package]] 2196 + name = "tower-http" 2197 + version = "0.5.2" 2198 + source = "registry+https://github.com/rust-lang/crates.io-index" 2199 + checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" 2200 + dependencies = [ 2201 + "bitflags", 2202 + "bytes", 2203 + "http 1.1.0", 2204 + "http-body", 2205 + "http-body-util", 2206 + "pin-project-lite", 2207 + "tower-layer", 2208 + "tower-service", 2209 + ] 2210 + 2211 + [[package]] 2212 + name = "tower-layer" 2213 + version = "0.3.3" 2214 + source = "registry+https://github.com/rust-lang/crates.io-index" 2215 + checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 2216 + 2217 + [[package]] 2218 + name = "tower-service" 2219 + version = "0.3.3" 2220 + source = "registry+https://github.com/rust-lang/crates.io-index" 2221 + checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 2222 + 2223 + [[package]] 2224 + name = "tracing" 2225 + version = "0.1.40" 2226 + source = "registry+https://github.com/rust-lang/crates.io-index" 2227 + checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 2228 + dependencies = [ 2229 + "log", 2230 + "pin-project-lite", 2231 + "tracing-attributes", 2232 + "tracing-core", 2233 + ] 2234 + 2235 + [[package]] 2236 + name = "tracing-attributes" 2237 + version = "0.1.27" 2238 + source = "registry+https://github.com/rust-lang/crates.io-index" 2239 + checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" 2240 + dependencies = [ 2241 + "proc-macro2", 2242 + "quote", 2243 + "syn", 2244 + ] 2245 + 2246 + [[package]] 2247 + name = "tracing-core" 2248 + version = "0.1.32" 2249 + source = "registry+https://github.com/rust-lang/crates.io-index" 2250 + checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 2251 + dependencies = [ 2252 + "once_cell", 2253 + ] 2254 + 2255 + [[package]] 2256 + name = "try-lock" 2257 + version = "0.2.5" 2258 + source = "registry+https://github.com/rust-lang/crates.io-index" 2259 + checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 2260 + 2261 + [[package]] 2262 + name = "typenum" 2263 + version = "1.17.0" 2264 + source = "registry+https://github.com/rust-lang/crates.io-index" 2265 + checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 2266 + 2267 + [[package]] 2268 + name = "ucd-trie" 2269 + version = "0.1.6" 2270 + source = "registry+https://github.com/rust-lang/crates.io-index" 2271 + checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" 2272 + 2273 + [[package]] 2274 + name = "unicode-bidi" 2275 + version = "0.3.15" 2276 + source = "registry+https://github.com/rust-lang/crates.io-index" 2277 + checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" 2278 + 2279 + [[package]] 2280 + name = "unicode-ident" 2281 + version = "1.0.12" 2282 + source = "registry+https://github.com/rust-lang/crates.io-index" 2283 + checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 2284 + 2285 + [[package]] 2286 + name = "unicode-normalization" 2287 + version = "0.1.23" 2288 + source = "registry+https://github.com/rust-lang/crates.io-index" 2289 + checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" 2290 + dependencies = [ 2291 + "tinyvec", 2292 + ] 2293 + 2294 + [[package]] 2295 + name = "url" 2296 + version = "2.5.2" 2297 + source = "registry+https://github.com/rust-lang/crates.io-index" 2298 + checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" 2299 + dependencies = [ 2300 + "form_urlencoded", 2301 + "idna", 2302 + "percent-encoding", 2303 + ] 2304 + 2305 + [[package]] 2306 + name = "version_check" 2307 + version = "0.9.5" 2308 + source = "registry+https://github.com/rust-lang/crates.io-index" 2309 + checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 2310 + 2311 + [[package]] 2312 + name = "want" 2313 + version = "0.3.1" 2314 + source = "registry+https://github.com/rust-lang/crates.io-index" 2315 + checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 2316 + dependencies = [ 2317 + "try-lock", 2318 + ] 2319 + 2320 + [[package]] 2321 + name = "wasi" 2322 + version = "0.11.0+wasi-snapshot-preview1" 2323 + source = "registry+https://github.com/rust-lang/crates.io-index" 2324 + checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2325 + 2326 + [[package]] 2327 + name = "windows-sys" 2328 + version = "0.52.0" 2329 + source = "registry+https://github.com/rust-lang/crates.io-index" 2330 + checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2331 + dependencies = [ 2332 + "windows-targets", 2333 + ] 2334 + 2335 + [[package]] 2336 + name = "windows-sys" 2337 + version = "0.59.0" 2338 + source = "registry+https://github.com/rust-lang/crates.io-index" 2339 + checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 2340 + dependencies = [ 2341 + "windows-targets", 2342 + ] 2343 + 2344 + [[package]] 2345 + name = "windows-targets" 2346 + version = "0.52.6" 2347 + source = "registry+https://github.com/rust-lang/crates.io-index" 2348 + checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 2349 + dependencies = [ 2350 + "windows_aarch64_gnullvm", 2351 + "windows_aarch64_msvc", 2352 + "windows_i686_gnu", 2353 + "windows_i686_gnullvm", 2354 + "windows_i686_msvc", 2355 + "windows_x86_64_gnu", 2356 + "windows_x86_64_gnullvm", 2357 + "windows_x86_64_msvc", 2358 + ] 2359 + 2360 + [[package]] 2361 + name = "windows_aarch64_gnullvm" 2362 + version = "0.52.6" 2363 + source = "registry+https://github.com/rust-lang/crates.io-index" 2364 + checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2365 + 2366 + [[package]] 2367 + name = "windows_aarch64_msvc" 2368 + version = "0.52.6" 2369 + source = "registry+https://github.com/rust-lang/crates.io-index" 2370 + checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2371 + 2372 + [[package]] 2373 + name = "windows_i686_gnu" 2374 + version = "0.52.6" 2375 + source = "registry+https://github.com/rust-lang/crates.io-index" 2376 + checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2377 + 2378 + [[package]] 2379 + name = "windows_i686_gnullvm" 2380 + version = "0.52.6" 2381 + source = "registry+https://github.com/rust-lang/crates.io-index" 2382 + checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2383 + 2384 + [[package]] 2385 + name = "windows_i686_msvc" 2386 + version = "0.52.6" 2387 + source = "registry+https://github.com/rust-lang/crates.io-index" 2388 + checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2389 + 2390 + [[package]] 2391 + name = "windows_x86_64_gnu" 2392 + version = "0.52.6" 2393 + source = "registry+https://github.com/rust-lang/crates.io-index" 2394 + checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2395 + 2396 + [[package]] 2397 + name = "windows_x86_64_gnullvm" 2398 + version = "0.52.6" 2399 + source = "registry+https://github.com/rust-lang/crates.io-index" 2400 + checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2401 + 2402 + [[package]] 2403 + name = "windows_x86_64_msvc" 2404 + version = "0.52.6" 2405 + source = "registry+https://github.com/rust-lang/crates.io-index" 2406 + checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2407 + 2408 + [[package]] 2409 + name = "winnow" 2410 + version = "0.6.18" 2411 + source = "registry+https://github.com/rust-lang/crates.io-index" 2412 + checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" 2413 + dependencies = [ 2414 + "memchr", 2415 + ] 2416 + 2417 + [[package]] 2418 + name = "zerocopy" 2419 + version = "0.7.35" 2420 + source = "registry+https://github.com/rust-lang/crates.io-index" 2421 + checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" 2422 + dependencies = [ 2423 + "byteorder", 2424 + "zerocopy-derive", 2425 + ] 2426 + 2427 + [[package]] 2428 + name = "zerocopy-derive" 2429 + version = "0.7.35" 2430 + source = "registry+https://github.com/rust-lang/crates.io-index" 2431 + checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 2432 + dependencies = [ 2433 + "proc-macro2", 2434 + "quote", 2435 + "syn", 2436 + ] 2437 + 2438 + [[package]] 2439 + name = "zstd" 2440 + version = "0.13.2" 2441 + source = "registry+https://github.com/rust-lang/crates.io-index" 2442 + checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" 2443 + dependencies = [ 2444 + "zstd-safe", 2445 + ] 2446 + 2447 + [[package]] 2448 + name = "zstd-safe" 2449 + version = "7.2.1" 2450 + source = "registry+https://github.com/rust-lang/crates.io-index" 2451 + checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" 2452 + dependencies = [ 2453 + "zstd-sys", 2454 + ] 2455 + 2456 + [[package]] 2457 + name = "zstd-sys" 2458 + version = "2.0.13+zstd.1.5.6" 2459 + source = "registry+https://github.com/rust-lang/crates.io-index" 2460 + checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" 2461 + dependencies = [ 2462 + "cc", 2463 + "pkg-config", 2464 + ]
+1
bin/.buf-1.40.1.pkg
··· 1 + hermit
+1
bin/.grpcurl-1.9.1.pkg
··· 1 + hermit
+1
bin/.protoc-28.0.pkg
··· 1 + hermit
+1
bin/buf
··· 1 + .buf-1.40.1.pkg
+1
bin/grpcurl
··· 1 + .grpcurl-1.9.1.pkg
+1
bin/protoc
··· 1 + .protoc-28.0.pkg
+1
bin/protoc-gen-buf-breaking
··· 1 + .buf-1.40.1.pkg
+1
bin/protoc-gen-buf-lint
··· 1 + .buf-1.40.1.pkg
+8
crates/graphql/Cargo.toml
··· 4 4 version = "0.1.0" 5 5 6 6 [dependencies] 7 + actix-cors = "0.7.0" 8 + actix-web = "4.9.0" 9 + anyhow = "1.0.87" 10 + async-graphql = "7.0.9" 11 + async-graphql-actix-web = "7.0.9" 12 + owo-colors = "4.1.0" 7 13 rockbox-sys = {path = "../sys"} 14 + serde = "1.0.210" 15 + tokio = {version = "1.40.0", features = ["full"]}
+5 -13
crates/graphql/src/lib.rs
··· 1 - pub fn add(left: u64, right: u64) -> u64 { 2 - left + right 3 - } 4 - 5 - #[cfg(test)] 6 - mod tests { 7 - use super::*; 1 + use async_graphql::{EmptySubscription, Schema}; 2 + use schema::{Mutation, Query}; 8 3 9 - #[test] 10 - fn it_works() { 11 - let result = add(2, 2); 12 - assert_eq!(result, 4); 13 - } 14 - } 4 + pub mod schema; 5 + pub mod server; 6 + pub type RockboxSchema = Schema<Query, Mutation, EmptySubscription>;
+23
crates/graphql/src/schema/browse.rs
··· 1 + use async_graphql::*; 2 + 3 + #[derive(Default)] 4 + pub struct BrowseQuery; 5 + 6 + #[Object] 7 + impl BrowseQuery { 8 + async fn browse_id3(&self) -> String { 9 + "browse id3".to_string() 10 + } 11 + 12 + async fn tree_get_context(&self) -> String { 13 + "tree get context".to_string() 14 + } 15 + 16 + async fn tree_get_entry_at(&self) -> String { 17 + "tree get entry at".to_string() 18 + } 19 + 20 + async fn rockbox_browse(&self) -> String { 21 + "rockbox browse".to_string() 22 + } 23 + }
crates/graphql/src/schema/metadata.rs

This is a binary file and will not be displayed.

+19
crates/graphql/src/schema/mod.rs
··· 1 + use async_graphql::MergedObject; 2 + use browse::BrowseQuery; 3 + use playback::{PlaybackMutation, PlaybackQuery}; 4 + use playlist::{PlaylistMutation, PlaylistQuery}; 5 + use sound::{SoundMutation, SoundQuery}; 6 + 7 + pub mod browse; 8 + pub mod metadata; 9 + pub mod playback; 10 + pub mod playlist; 11 + pub mod settings; 12 + pub mod sound; 13 + pub mod tagcache; 14 + 15 + #[derive(MergedObject, Default)] 16 + pub struct Query(BrowseQuery, PlaybackQuery, PlaylistQuery, SoundQuery); 17 + 18 + #[derive(MergedObject, Default)] 19 + pub struct Mutation(PlaybackMutation, PlaylistMutation, SoundMutation);
+57
crates/graphql/src/schema/playback.rs
··· 1 + use async_graphql::*; 2 + 3 + #[derive(Default)] 4 + pub struct PlaybackQuery; 5 + 6 + #[Object] 7 + impl PlaybackQuery { 8 + async fn status(&self) -> String { 9 + "status".to_string() 10 + } 11 + 12 + async fn current_track(&self) -> String { 13 + "current_track".to_string() 14 + } 15 + 16 + async fn get_file_position(&self) -> String { 17 + "get_file_position".to_string() 18 + } 19 + } 20 + 21 + #[derive(Default)] 22 + pub struct PlaybackMutation; 23 + 24 + #[Object] 25 + impl PlaybackMutation { 26 + async fn play(&self) -> String { 27 + "play".to_string() 28 + } 29 + 30 + async fn pause(&self) -> String { 31 + "pause".to_string() 32 + } 33 + 34 + async fn resume(&self) -> String { 35 + "resume".to_string() 36 + } 37 + 38 + async fn next(&self) -> String { 39 + "next".to_string() 40 + } 41 + 42 + async fn previous(&self) -> String { 43 + "previous".to_string() 44 + } 45 + 46 + async fn fast_forward_rewind(&self) -> String { 47 + "fast_forward_rewind".to_string() 48 + } 49 + 50 + async fn flush_and_reload_tracks(&self) -> String { 51 + "flush_and_reload_tracks".to_string() 52 + } 53 + 54 + async fn hard_stop(&self) -> String { 55 + "hard_stop".to_string() 56 + } 57 + }
+81
crates/graphql/src/schema/playlist.rs
··· 1 + use async_graphql::*; 2 + 3 + #[derive(Default)] 4 + pub struct PlaylistQuery; 5 + 6 + #[Object] 7 + impl PlaylistQuery { 8 + async fn playlist_get_current(&self) -> String { 9 + "playlist get current".to_string() 10 + } 11 + 12 + async fn get_resume_info(&self) -> String { 13 + "get resume info".to_string() 14 + } 15 + 16 + async fn get_track_info(&self) -> String { 17 + "get track info".to_string() 18 + } 19 + 20 + async fn get_first_index(&self) -> String { 21 + "get first index".to_string() 22 + } 23 + 24 + async fn get_display_index(&self) -> String { 25 + "get display index".to_string() 26 + } 27 + 28 + async fn playlist_amount(&self) -> String { 29 + "playlist amount".to_string() 30 + } 31 + } 32 + 33 + #[derive(Default)] 34 + pub struct PlaylistMutation; 35 + 36 + #[Object] 37 + impl PlaylistMutation { 38 + async fn playlist_resume(&self) -> String { 39 + "playlist resume".to_string() 40 + } 41 + 42 + async fn resume_track(&self) -> String { 43 + "resume track".to_string() 44 + } 45 + 46 + async fn playlist_set_modified(&self) -> String { 47 + "set modified".to_string() 48 + } 49 + 50 + async fn playlist_start(&self) -> String { 51 + "playlist start".to_string() 52 + } 53 + 54 + async fn playlist_sync(&self) -> String { 55 + "playlist sync".to_string() 56 + } 57 + 58 + async fn playlist_remove_all_tracks(&self) -> String { 59 + "playlist remove all tracks".to_string() 60 + } 61 + 62 + async fn playlist_create(&self) -> String { 63 + "playlist create".to_string() 64 + } 65 + 66 + async fn playlist_insert_track(&self) -> String { 67 + "playlist insert track".to_string() 68 + } 69 + 70 + async fn playlist_insert_directory(&self) -> String { 71 + "playlist insert directory".to_string() 72 + } 73 + 74 + async fn shuffle_playlist(&self) -> String { 75 + "shuffle playlist".to_string() 76 + } 77 + 78 + async fn warn_on_playlist_erase(&self) -> String { 79 + "warn on playlist erase".to_string() 80 + } 81 + }
crates/graphql/src/schema/settings.rs

This is a binary file and will not be displayed.

+77
crates/graphql/src/schema/sound.rs
··· 1 + use async_graphql::*; 2 + 3 + #[derive(Default)] 4 + pub struct SoundQuery; 5 + 6 + #[Object] 7 + impl SoundQuery { 8 + async fn sound_current(&self) -> String { 9 + "sound".to_string() 10 + } 11 + 12 + async fn sound_default(&self) -> String { 13 + "sound default".to_string() 14 + } 15 + 16 + async fn sound_val_2_phys(&self) -> String { 17 + "sound val 2 phys".to_string() 18 + } 19 + 20 + async fn get_pitch(&self) -> String { 21 + "get pitch".to_string() 22 + } 23 + } 24 + 25 + #[derive(Default)] 26 + pub struct SoundMutation; 27 + 28 + #[Object] 29 + impl SoundMutation { 30 + async fn adjust_volume(&self) -> String { 31 + "adjust volume".to_string() 32 + } 33 + 34 + async fn sound_set(&self) -> String { 35 + "sound set".to_string() 36 + } 37 + 38 + async fn sound_min(&self) -> String { 39 + "sound min".to_string() 40 + } 41 + 42 + async fn sound_max(&self) -> String { 43 + "sound max".to_string() 44 + } 45 + 46 + async fn sound_unit(&self) -> String { 47 + "sound unit".to_string() 48 + } 49 + 50 + async fn set_pitch(&self) -> String { 51 + "set pitch".to_string() 52 + } 53 + 54 + async fn beep_play(&self) -> String { 55 + "beep play".to_string() 56 + } 57 + 58 + async fn pcmbuf_play(&self) -> String { 59 + "pcmbuf play".to_string() 60 + } 61 + 62 + async fn pcmbuf_fade(&self) -> String { 63 + "pcmbuf fade".to_string() 64 + } 65 + 66 + async fn pcmbuf_set_low_latency(&self) -> String { 67 + "pcmbuf set low latency".to_string() 68 + } 69 + 70 + async fn system_sound_play(&self) -> String { 71 + "system sound play".to_string() 72 + } 73 + 74 + async fn keyclick_click(&self) -> String { 75 + "keyclick click".to_string() 76 + } 77 + }
crates/graphql/src/schema/tagcache.rs

This is a binary file and will not be displayed.

+69
crates/graphql/src/server.rs
··· 1 + use actix_cors::Cors; 2 + use actix_web::{ 3 + http::header::HOST, 4 + web::{self, Data}, 5 + App, HttpRequest, HttpResponse, HttpServer, Result, 6 + }; 7 + use async_graphql::{http::GraphiQLSource, EmptySubscription, Schema}; 8 + use async_graphql_actix_web::{GraphQLRequest, GraphQLResponse}; 9 + use owo_colors::OwoColorize; 10 + 11 + use crate::{ 12 + schema::{Mutation, Query}, 13 + RockboxSchema, 14 + }; 15 + 16 + #[actix_web::post("/graphql")] 17 + async fn index_graphql(schema: web::Data<RockboxSchema>, req: GraphQLRequest) -> GraphQLResponse { 18 + schema.execute(req.into_inner()).await.into() 19 + } 20 + 21 + #[actix_web::get("/graphiql")] 22 + async fn index_graphiql(req: HttpRequest) -> Result<HttpResponse> { 23 + let host = req 24 + .headers() 25 + .get(HOST) 26 + .unwrap() 27 + .to_str() 28 + .unwrap() 29 + .split(":") 30 + .next() 31 + .unwrap(); 32 + 33 + let http_port = std::env::var("ROCKBOX_GRAPHQL_PORT").unwrap_or("6062".to_string()); 34 + let graphql_endpoint = format!("http://{}:{}/graphql", host, http_port); 35 + let ws_endpoint = format!("ws://{}:{}/graphql", host, http_port); 36 + Ok(HttpResponse::Ok() 37 + .content_type("text/html; charset=utf-8") 38 + .body( 39 + GraphiQLSource::build() 40 + .endpoint(&graphql_endpoint) 41 + .subscription_endpoint(&ws_endpoint) 42 + .finish(), 43 + )) 44 + } 45 + 46 + pub async fn start() -> std::io::Result<()> { 47 + let schema = Schema::build( 48 + Query::default(), 49 + Mutation::default(), 50 + EmptySubscription::default(), 51 + ) 52 + .finish(); 53 + let graphql_port = std::env::var("ROCKBOX_GRAPHQL_PORT").unwrap_or("6062".to_string()); 54 + let addr = format!("{}:{}", "0.0.0.0", graphql_port); 55 + 56 + println!( 57 + "{} server running on {}", 58 + "Rockbox GraphQL".bright_purple(), 59 + format!("http://{}", addr).bright_green() 60 + ); 61 + 62 + HttpServer::new(move || { 63 + let cors = Cors::permissive(); 64 + App::new().app_data(Data::new(schema.clone())).wrap(cors) 65 + }) 66 + .bind(addr)? 67 + .run() 68 + .await 69 + }
+10
crates/rpc/Cargo.toml
··· 4 4 version = "0.1.0" 5 5 6 6 [dependencies] 7 + owo-colors = "5.0.0" 8 + prost = "0.13.2" 7 9 rockbox-sys = {path = "../sys"} 10 + serde = "1.0.210" 11 + tokio = {version = "1.40.0", features = ["full"]} 12 + tonic = "0.12.2" 13 + tonic-reflection = "0.12.2" 14 + tonic-web = "0.12.2" 15 + 16 + [build-dependencies] 17 + tonic-build = "0.12.2"
+18
crates/rpc/build.rs
··· 1 + fn main() -> Result<(), Box<dyn std::error::Error>> { 2 + tonic_build::configure() 3 + .out_dir("src/api") 4 + .file_descriptor_set_path("src/api/rockbox_descriptor.bin") 5 + .compile( 6 + &[ 7 + "proto/rockbox/v1alpha1/browse.proto", 8 + "proto/rockbox/v1alpha1/metadata.proto", 9 + "proto/rockbox/v1alpha1/playback.proto", 10 + "proto/rockbox/v1alpha1/playlist.proto", 11 + "proto/rockbox/v1alpha1/settings.proto", 12 + "proto/rockbox/v1alpha1/sound.proto", 13 + "proto/rockbox/v1alpha1/tagcache.proto", 14 + ], 15 + &["proto"], 16 + )?; 17 + Ok(()) 18 + }
+8
crates/rpc/proto/buf.yaml
··· 1 + # For details on buf.yaml configuration, visit https://buf.build/docs/configuration/v2/buf-yaml 2 + version: v2 3 + lint: 4 + use: 5 + - DEFAULT 6 + breaking: 7 + use: 8 + - FILE
+44
crates/rpc/proto/rockbox/v1alpha1/browse.proto
··· 1 + syntax = "proto3"; 2 + 3 + package rockbox.v1alpha1; 4 + 5 + message RockboxBrowseRequest { 6 + } 7 + 8 + message RockboxBrowseResponse { 9 + } 10 + 11 + message TreeGetContextRequest { 12 + } 13 + 14 + message TreeGetContextResponse { 15 + } 16 + 17 + message TreeGetEntriesRequest { 18 + } 19 + 20 + message TreeGetEntriesResponse { 21 + } 22 + 23 + 24 + message TreeGetEntryAtRequest { 25 + } 26 + 27 + message TreeGetEntryAtResponse { 28 + } 29 + 30 + message BrowseId3Request { 31 + 32 + } 33 + 34 + message BrowseId3Response { 35 + 36 + } 37 + 38 + service BrowseService { 39 + rpc RockboxBrowse(RockboxBrowseRequest) returns (RockboxBrowseResponse); 40 + rpc TreeGetContext(TreeGetContextRequest) returns (TreeGetContextResponse); 41 + rpc TreeGetEntries(TreeGetEntriesRequest) returns (TreeGetEntriesResponse); 42 + rpc TreeGetEntryAt(TreeGetEntryAtRequest) returns (TreeGetEntryAtResponse); 43 + rpc BrowseId3(BrowseId3Request) returns (BrowseId3Response); 44 + }
+7
crates/rpc/proto/rockbox/v1alpha1/metadata.proto
··· 1 + syntax = "proto3"; 2 + 3 + package rockbox.v1alpha1; 4 + 5 + service MetadataService { 6 + 7 + }
+87
crates/rpc/proto/rockbox/v1alpha1/playback.proto
··· 1 + syntax = "proto3"; 2 + 3 + package rockbox.v1alpha1; 4 + 5 + message PlayRequest { 6 + int64 elapsed = 1; 7 + int64 offset = 2; 8 + } 9 + 10 + message PlayResponse { 11 + } 12 + 13 + message PauseRequest { 14 + } 15 + 16 + message PauseResponse { 17 + } 18 + 19 + message ResumeRequest { 20 + } 21 + 22 + message ResumeResponse { 23 + } 24 + 25 + message NextRequest { 26 + } 27 + 28 + message NextResponse { 29 + } 30 + 31 + message PreviousRequest { 32 + } 33 + 34 + message PreviousResponse { 35 + } 36 + 37 + message FastForwardRewindRequest { 38 + int32 new_time = 1; 39 + } 40 + 41 + message FastForwardRewindResponse { 42 + } 43 + 44 + message StatusRequest { 45 + } 46 + 47 + message StatusResponse { 48 + } 49 + 50 + message CurrentTrackRequest { 51 + } 52 + 53 + message CurrentTrackResponse { 54 + } 55 + 56 + message FlushAndReloadTracksRequest { 57 + } 58 + 59 + message FlushAndReloadTracksResponse { 60 + } 61 + 62 + message GetFilePositionRequest { 63 + } 64 + 65 + message GetFilePositionResponse { 66 + int32 position = 1; 67 + } 68 + 69 + message HardStopRequest { 70 + } 71 + 72 + message HardStopResponse { 73 + } 74 + 75 + service PlaybackService { 76 + rpc Play(PlayRequest) returns (PlayResponse) {} 77 + rpc Pause(PauseRequest) returns (PauseResponse) {} 78 + rpc Resume(ResumeRequest) returns (ResumeResponse) {} 79 + rpc Next(NextRequest) returns (NextResponse) {} 80 + rpc Previous(PreviousRequest) returns (PreviousResponse) {} 81 + rpc FastForwardRewind(FastForwardRewindRequest) returns (FastForwardRewindResponse) {} 82 + rpc Status(StatusRequest) returns (StatusResponse) {} 83 + rpc CurrentTrack(CurrentTrackRequest) returns (CurrentTrackResponse) {} 84 + rpc FlushAndReloadTracks(FlushAndReloadTracksRequest) returns (FlushAndReloadTracksResponse) {} 85 + rpc GetFilePosition(GetFilePositionRequest) returns (GetFilePositionResponse) {} 86 + rpc HardStop(HardStopRequest) returns (HardStopResponse) {} 87 + }
+133
crates/rpc/proto/rockbox/v1alpha1/playlist.proto
··· 1 + syntax = "proto3"; 2 + 3 + package rockbox.v1alpha1; 4 + 5 + message GetCurrentRequest { 6 + } 7 + 8 + message GetCurrentResponse { 9 + } 10 + 11 + message GetResumeInfoRequest { 12 + } 13 + 14 + message GetResumeInfoResponse { 15 + } 16 + 17 + message GetTrackInfoRequest { 18 + } 19 + 20 + message GetTrackInfoResponse { 21 + } 22 + 23 + message GetFirstIndexRequest { 24 + } 25 + 26 + message GetFirstIndexResponse { 27 + } 28 + 29 + message GetDisplayIndexRequest { 30 + } 31 + 32 + message GetDisplayIndexResponse { 33 + } 34 + 35 + message AmountRequest { 36 + } 37 + 38 + message AmountResponse { 39 + } 40 + 41 + message PlaylistResumeRequest { 42 + } 43 + 44 + message PlaylistResumeResponse { 45 + } 46 + 47 + message ResumeTrackRequest { 48 + } 49 + 50 + message ResumeTrackResponse { 51 + } 52 + 53 + message SetModifiedRequest { 54 + } 55 + 56 + message SetModifiedResponse { 57 + } 58 + 59 + message StartRequest { 60 + } 61 + 62 + message StartResponse { 63 + } 64 + 65 + message SyncRequest { 66 + } 67 + 68 + message SyncResponse { 69 + } 70 + 71 + message RemoveAllTracksRequest { 72 + } 73 + 74 + message RemoveAllTracksResponse { 75 + } 76 + 77 + message CreatePlaylistRequest { 78 + } 79 + 80 + message CreatePlaylistResponse { 81 + } 82 + 83 + message InsertTrackRequest { 84 + } 85 + 86 + message InsertTrackResponse { 87 + } 88 + 89 + message InsertDirectoryRequest { 90 + } 91 + 92 + message InsertDirectoryResponse { 93 + } 94 + 95 + message InsertPlaylistRequest { 96 + } 97 + 98 + message InsertPlaylistResponse { 99 + } 100 + 101 + message ShufflePlaylistRequest { 102 + } 103 + 104 + message ShufflePlaylistResponse { 105 + } 106 + 107 + message WarnOnPlaylistEraseRequest { 108 + } 109 + 110 + message WarnOnPlaylistEraseResponse { 111 + } 112 + 113 + 114 + service PlaylistService { 115 + rpc GetCurrent(GetCurrentRequest) returns (GetCurrentResponse) {} 116 + rpc GetResumeInfo(GetResumeInfoRequest) returns (GetResumeInfoResponse) {} 117 + rpc GetTrackInfo(GetTrackInfoRequest) returns (GetTrackInfoResponse) {} 118 + rpc GetFirstIndex(GetFirstIndexRequest) returns (GetFirstIndexResponse) {} 119 + rpc GetDisplayIndex(GetDisplayIndexRequest) returns (GetDisplayIndexResponse) {} 120 + rpc Amount(AmountRequest) returns (AmountResponse) {} 121 + rpc PlaylistResume(PlaylistResumeRequest) returns (PlaylistResumeResponse) {} 122 + rpc ResumeTrack(ResumeTrackRequest) returns (ResumeTrackResponse) {} 123 + rpc SetModified(SetModifiedRequest) returns (SetModifiedResponse) {} 124 + rpc Start(StartRequest) returns (StartResponse) {} 125 + rpc Sync(SyncRequest) returns (SyncResponse) {} 126 + rpc RemoveAllTracks(RemoveAllTracksRequest) returns (RemoveAllTracksResponse) {} 127 + rpc CreatePlaylist(CreatePlaylistRequest) returns (CreatePlaylistResponse) {} 128 + rpc InsertTrack(InsertTrackRequest) returns (InsertTrackResponse) {} 129 + rpc InsertDirectory(InsertDirectoryRequest) returns (InsertDirectoryResponse) {} 130 + rpc InsertPlaylist(InsertPlaylistRequest) returns (InsertPlaylistResponse) {} 131 + rpc ShufflePlaylist(ShufflePlaylistRequest) returns (ShufflePlaylistResponse) {} 132 + rpc WarnOnPlaylistErase(WarnOnPlaylistEraseRequest) returns (WarnOnPlaylistEraseResponse) {} 133 + }
+14
crates/rpc/proto/rockbox/v1alpha1/settings.proto
··· 1 + syntax = "proto3"; 2 + 3 + package rockbox.v1alpha1; 4 + 5 + message GetSettingsListRequest { 6 + int32 count = 1; 7 + } 8 + 9 + message GetSettingsListResponse { 10 + } 11 + 12 + service SettingsService { 13 + rpc GetSettingsList(GetSettingsListRequest) returns (GetSettingsListResponse); 14 + }
+126
crates/rpc/proto/rockbox/v1alpha1/sound.proto
··· 1 + syntax = "proto3"; 2 + 3 + package rockbox.v1alpha1; 4 + 5 + message AdjustVolumeRequest { 6 + int32 steps = 1; 7 + } 8 + 9 + message AdjustVolumeResponse { 10 + } 11 + 12 + message SoundSetRequest { 13 + int32 setting = 1; 14 + int32 value = 2; 15 + } 16 + 17 + message SoundSetResponse {} 18 + 19 + message SoundCurrentRequest { 20 + int32 setting = 1; 21 + } 22 + 23 + message SoundCurrentResponse { 24 + int32 value = 1; 25 + } 26 + 27 + message SoundDefaultRequest { 28 + int32 setting = 1; 29 + } 30 + 31 + message SoundDefaultResponse { 32 + int32 value = 1; 33 + } 34 + 35 + message SoundMinRequest { 36 + int32 setting = 1; 37 + } 38 + 39 + message SoundMinResponse { 40 + int32 value = 1; 41 + } 42 + 43 + message SoundMaxRequest { 44 + int32 setting = 1; 45 + } 46 + 47 + message SoundMaxResponse { 48 + int32 value = 1; 49 + } 50 + 51 + message SoundUnitRequest { } 52 + 53 + message SoundUnitResponse { } 54 + 55 + message SoundVal2PhysRequest { 56 + int32 setting = 1; 57 + int32 value = 2; 58 + } 59 + 60 + message SoundVal2PhysResponse { 61 + int32 value = 1; 62 + } 63 + 64 + message GetPitchRequest { } 65 + 66 + message GetPitchResponse { 67 + int32 value = 1; 68 + } 69 + 70 + message SetPitchRequest { 71 + int32 value = 1; 72 + } 73 + 74 + message SetPitchResponse { } 75 + 76 + message BeepPlayRequest { 77 + uint32 frequency = 1; 78 + uint32 duration = 2; 79 + uint32 amplitude = 3; 80 + } 81 + 82 + message BeepPlayResponse { } 83 + 84 + message PcmbufFadeRequest { 85 + int32 fade = 1; 86 + bool in = 2; 87 + } 88 + 89 + message PcmbufFadeResponse { } 90 + 91 + message PcmbufSetLowLatencyRequest { 92 + bool state = 1; 93 + } 94 + 95 + message PcmbufSetLowLatencyResponse { } 96 + 97 + message SystemSoundPlayRequest { 98 + uint32 sound = 1; 99 + } 100 + 101 + message SystemSoundPlayResponse { } 102 + 103 + message KeyclickClickRequest { 104 + bool rawbutton = 1; 105 + int32 action = 2; 106 + } 107 + 108 + message KeyclickClickResponse { } 109 + 110 + service SoundService { 111 + rpc AdjustVolume(AdjustVolumeRequest) returns (AdjustVolumeResponse); 112 + rpc SoundSet(SoundSetRequest) returns (SoundSetResponse); 113 + rpc SoundCurrent(SoundCurrentRequest) returns (SoundCurrentResponse); 114 + rpc SoundDefault(SoundDefaultRequest) returns (SoundDefaultResponse); 115 + rpc SoundMin(SoundMinRequest) returns (SoundMinResponse); 116 + rpc SoundMax(SoundMaxRequest) returns (SoundMaxResponse); 117 + rpc SoundUnit(SoundUnitRequest) returns (SoundUnitResponse); 118 + rpc SoundVal2Phys(SoundVal2PhysRequest) returns (SoundVal2PhysResponse); 119 + rpc GetPitch(GetPitchRequest) returns (GetPitchResponse); 120 + rpc SetPitch(SetPitchRequest) returns (SetPitchResponse); 121 + rpc BeepPlay(BeepPlayRequest) returns (BeepPlayResponse); 122 + rpc PcmbufFade(PcmbufFadeRequest) returns (PcmbufFadeResponse); 123 + rpc PcmbufSetLowLatency(PcmbufSetLowLatencyRequest) returns (PcmbufSetLowLatencyResponse); 124 + rpc SystemSoundPlay(SystemSoundPlayRequest) returns (SystemSoundPlayResponse); 125 + rpc KeyclickClick(KeyclickClickRequest) returns (KeyclickClickResponse); 126 + }
+5
crates/rpc/proto/rockbox/v1alpha1/tagcache.proto
··· 1 + syntax = "proto3"; 2 + 3 + package rockbox.v1alpha1; 4 + 5 + service TagcacheService {}
+5646
crates/rpc/src/api/rockbox.v1alpha1.rs
··· 1 + // This file is @generated by prost-build. 2 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3 + pub struct RockboxBrowseRequest {} 4 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 5 + pub struct RockboxBrowseResponse {} 6 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 7 + pub struct TreeGetContextRequest {} 8 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 9 + pub struct TreeGetContextResponse {} 10 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 11 + pub struct TreeGetEntriesRequest {} 12 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 13 + pub struct TreeGetEntriesResponse {} 14 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 15 + pub struct TreeGetEntryAtRequest {} 16 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 17 + pub struct TreeGetEntryAtResponse {} 18 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 19 + pub struct BrowseId3Request {} 20 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 21 + pub struct BrowseId3Response {} 22 + /// Generated client implementations. 23 + pub mod browse_service_client { 24 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 25 + use tonic::codegen::*; 26 + use tonic::codegen::http::Uri; 27 + #[derive(Debug, Clone)] 28 + pub struct BrowseServiceClient<T> { 29 + inner: tonic::client::Grpc<T>, 30 + } 31 + impl BrowseServiceClient<tonic::transport::Channel> { 32 + /// Attempt to create a new client by connecting to a given endpoint. 33 + pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> 34 + where 35 + D: TryInto<tonic::transport::Endpoint>, 36 + D::Error: Into<StdError>, 37 + { 38 + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; 39 + Ok(Self::new(conn)) 40 + } 41 + } 42 + impl<T> BrowseServiceClient<T> 43 + where 44 + T: tonic::client::GrpcService<tonic::body::BoxBody>, 45 + T::Error: Into<StdError>, 46 + T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static, 47 + <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send, 48 + { 49 + pub fn new(inner: T) -> Self { 50 + let inner = tonic::client::Grpc::new(inner); 51 + Self { inner } 52 + } 53 + pub fn with_origin(inner: T, origin: Uri) -> Self { 54 + let inner = tonic::client::Grpc::with_origin(inner, origin); 55 + Self { inner } 56 + } 57 + pub fn with_interceptor<F>( 58 + inner: T, 59 + interceptor: F, 60 + ) -> BrowseServiceClient<InterceptedService<T, F>> 61 + where 62 + F: tonic::service::Interceptor, 63 + T::ResponseBody: Default, 64 + T: tonic::codegen::Service< 65 + http::Request<tonic::body::BoxBody>, 66 + Response = http::Response< 67 + <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 68 + >, 69 + >, 70 + <T as tonic::codegen::Service< 71 + http::Request<tonic::body::BoxBody>, 72 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 73 + { 74 + BrowseServiceClient::new(InterceptedService::new(inner, interceptor)) 75 + } 76 + /// Compress requests with the given encoding. 77 + /// 78 + /// This requires the server to support it otherwise it might respond with an 79 + /// error. 80 + #[must_use] 81 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 82 + self.inner = self.inner.send_compressed(encoding); 83 + self 84 + } 85 + /// Enable decompressing responses. 86 + #[must_use] 87 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 88 + self.inner = self.inner.accept_compressed(encoding); 89 + self 90 + } 91 + /// Limits the maximum size of a decoded message. 92 + /// 93 + /// Default: `4MB` 94 + #[must_use] 95 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 96 + self.inner = self.inner.max_decoding_message_size(limit); 97 + self 98 + } 99 + /// Limits the maximum size of an encoded message. 100 + /// 101 + /// Default: `usize::MAX` 102 + #[must_use] 103 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 104 + self.inner = self.inner.max_encoding_message_size(limit); 105 + self 106 + } 107 + pub async fn rockbox_browse( 108 + &mut self, 109 + request: impl tonic::IntoRequest<super::RockboxBrowseRequest>, 110 + ) -> std::result::Result< 111 + tonic::Response<super::RockboxBrowseResponse>, 112 + tonic::Status, 113 + > { 114 + self.inner 115 + .ready() 116 + .await 117 + .map_err(|e| { 118 + tonic::Status::new( 119 + tonic::Code::Unknown, 120 + format!("Service was not ready: {}", e.into()), 121 + ) 122 + })?; 123 + let codec = tonic::codec::ProstCodec::default(); 124 + let path = http::uri::PathAndQuery::from_static( 125 + "/rockbox.v1alpha1.BrowseService/RockboxBrowse", 126 + ); 127 + let mut req = request.into_request(); 128 + req.extensions_mut() 129 + .insert( 130 + GrpcMethod::new("rockbox.v1alpha1.BrowseService", "RockboxBrowse"), 131 + ); 132 + self.inner.unary(req, path, codec).await 133 + } 134 + pub async fn tree_get_context( 135 + &mut self, 136 + request: impl tonic::IntoRequest<super::TreeGetContextRequest>, 137 + ) -> std::result::Result< 138 + tonic::Response<super::TreeGetContextResponse>, 139 + tonic::Status, 140 + > { 141 + self.inner 142 + .ready() 143 + .await 144 + .map_err(|e| { 145 + tonic::Status::new( 146 + tonic::Code::Unknown, 147 + format!("Service was not ready: {}", e.into()), 148 + ) 149 + })?; 150 + let codec = tonic::codec::ProstCodec::default(); 151 + let path = http::uri::PathAndQuery::from_static( 152 + "/rockbox.v1alpha1.BrowseService/TreeGetContext", 153 + ); 154 + let mut req = request.into_request(); 155 + req.extensions_mut() 156 + .insert( 157 + GrpcMethod::new("rockbox.v1alpha1.BrowseService", "TreeGetContext"), 158 + ); 159 + self.inner.unary(req, path, codec).await 160 + } 161 + pub async fn tree_get_entries( 162 + &mut self, 163 + request: impl tonic::IntoRequest<super::TreeGetEntriesRequest>, 164 + ) -> std::result::Result< 165 + tonic::Response<super::TreeGetEntriesResponse>, 166 + tonic::Status, 167 + > { 168 + self.inner 169 + .ready() 170 + .await 171 + .map_err(|e| { 172 + tonic::Status::new( 173 + tonic::Code::Unknown, 174 + format!("Service was not ready: {}", e.into()), 175 + ) 176 + })?; 177 + let codec = tonic::codec::ProstCodec::default(); 178 + let path = http::uri::PathAndQuery::from_static( 179 + "/rockbox.v1alpha1.BrowseService/TreeGetEntries", 180 + ); 181 + let mut req = request.into_request(); 182 + req.extensions_mut() 183 + .insert( 184 + GrpcMethod::new("rockbox.v1alpha1.BrowseService", "TreeGetEntries"), 185 + ); 186 + self.inner.unary(req, path, codec).await 187 + } 188 + pub async fn tree_get_entry_at( 189 + &mut self, 190 + request: impl tonic::IntoRequest<super::TreeGetEntryAtRequest>, 191 + ) -> std::result::Result< 192 + tonic::Response<super::TreeGetEntryAtResponse>, 193 + tonic::Status, 194 + > { 195 + self.inner 196 + .ready() 197 + .await 198 + .map_err(|e| { 199 + tonic::Status::new( 200 + tonic::Code::Unknown, 201 + format!("Service was not ready: {}", e.into()), 202 + ) 203 + })?; 204 + let codec = tonic::codec::ProstCodec::default(); 205 + let path = http::uri::PathAndQuery::from_static( 206 + "/rockbox.v1alpha1.BrowseService/TreeGetEntryAt", 207 + ); 208 + let mut req = request.into_request(); 209 + req.extensions_mut() 210 + .insert( 211 + GrpcMethod::new("rockbox.v1alpha1.BrowseService", "TreeGetEntryAt"), 212 + ); 213 + self.inner.unary(req, path, codec).await 214 + } 215 + pub async fn browse_id3( 216 + &mut self, 217 + request: impl tonic::IntoRequest<super::BrowseId3Request>, 218 + ) -> std::result::Result< 219 + tonic::Response<super::BrowseId3Response>, 220 + tonic::Status, 221 + > { 222 + self.inner 223 + .ready() 224 + .await 225 + .map_err(|e| { 226 + tonic::Status::new( 227 + tonic::Code::Unknown, 228 + format!("Service was not ready: {}", e.into()), 229 + ) 230 + })?; 231 + let codec = tonic::codec::ProstCodec::default(); 232 + let path = http::uri::PathAndQuery::from_static( 233 + "/rockbox.v1alpha1.BrowseService/BrowseId3", 234 + ); 235 + let mut req = request.into_request(); 236 + req.extensions_mut() 237 + .insert(GrpcMethod::new("rockbox.v1alpha1.BrowseService", "BrowseId3")); 238 + self.inner.unary(req, path, codec).await 239 + } 240 + } 241 + } 242 + /// Generated server implementations. 243 + pub mod browse_service_server { 244 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 245 + use tonic::codegen::*; 246 + /// Generated trait containing gRPC methods that should be implemented for use with BrowseServiceServer. 247 + #[async_trait] 248 + pub trait BrowseService: std::marker::Send + std::marker::Sync + 'static { 249 + async fn rockbox_browse( 250 + &self, 251 + request: tonic::Request<super::RockboxBrowseRequest>, 252 + ) -> std::result::Result< 253 + tonic::Response<super::RockboxBrowseResponse>, 254 + tonic::Status, 255 + >; 256 + async fn tree_get_context( 257 + &self, 258 + request: tonic::Request<super::TreeGetContextRequest>, 259 + ) -> std::result::Result< 260 + tonic::Response<super::TreeGetContextResponse>, 261 + tonic::Status, 262 + >; 263 + async fn tree_get_entries( 264 + &self, 265 + request: tonic::Request<super::TreeGetEntriesRequest>, 266 + ) -> std::result::Result< 267 + tonic::Response<super::TreeGetEntriesResponse>, 268 + tonic::Status, 269 + >; 270 + async fn tree_get_entry_at( 271 + &self, 272 + request: tonic::Request<super::TreeGetEntryAtRequest>, 273 + ) -> std::result::Result< 274 + tonic::Response<super::TreeGetEntryAtResponse>, 275 + tonic::Status, 276 + >; 277 + async fn browse_id3( 278 + &self, 279 + request: tonic::Request<super::BrowseId3Request>, 280 + ) -> std::result::Result< 281 + tonic::Response<super::BrowseId3Response>, 282 + tonic::Status, 283 + >; 284 + } 285 + #[derive(Debug)] 286 + pub struct BrowseServiceServer<T> { 287 + inner: Arc<T>, 288 + accept_compression_encodings: EnabledCompressionEncodings, 289 + send_compression_encodings: EnabledCompressionEncodings, 290 + max_decoding_message_size: Option<usize>, 291 + max_encoding_message_size: Option<usize>, 292 + } 293 + impl<T> BrowseServiceServer<T> { 294 + pub fn new(inner: T) -> Self { 295 + Self::from_arc(Arc::new(inner)) 296 + } 297 + pub fn from_arc(inner: Arc<T>) -> Self { 298 + Self { 299 + inner, 300 + accept_compression_encodings: Default::default(), 301 + send_compression_encodings: Default::default(), 302 + max_decoding_message_size: None, 303 + max_encoding_message_size: None, 304 + } 305 + } 306 + pub fn with_interceptor<F>( 307 + inner: T, 308 + interceptor: F, 309 + ) -> InterceptedService<Self, F> 310 + where 311 + F: tonic::service::Interceptor, 312 + { 313 + InterceptedService::new(Self::new(inner), interceptor) 314 + } 315 + /// Enable decompressing requests with the given encoding. 316 + #[must_use] 317 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 318 + self.accept_compression_encodings.enable(encoding); 319 + self 320 + } 321 + /// Compress responses with the given encoding, if the client supports it. 322 + #[must_use] 323 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 324 + self.send_compression_encodings.enable(encoding); 325 + self 326 + } 327 + /// Limits the maximum size of a decoded message. 328 + /// 329 + /// Default: `4MB` 330 + #[must_use] 331 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 332 + self.max_decoding_message_size = Some(limit); 333 + self 334 + } 335 + /// Limits the maximum size of an encoded message. 336 + /// 337 + /// Default: `usize::MAX` 338 + #[must_use] 339 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 340 + self.max_encoding_message_size = Some(limit); 341 + self 342 + } 343 + } 344 + impl<T, B> tonic::codegen::Service<http::Request<B>> for BrowseServiceServer<T> 345 + where 346 + T: BrowseService, 347 + B: Body + std::marker::Send + 'static, 348 + B::Error: Into<StdError> + std::marker::Send + 'static, 349 + { 350 + type Response = http::Response<tonic::body::BoxBody>; 351 + type Error = std::convert::Infallible; 352 + type Future = BoxFuture<Self::Response, Self::Error>; 353 + fn poll_ready( 354 + &mut self, 355 + _cx: &mut Context<'_>, 356 + ) -> Poll<std::result::Result<(), Self::Error>> { 357 + Poll::Ready(Ok(())) 358 + } 359 + fn call(&mut self, req: http::Request<B>) -> Self::Future { 360 + match req.uri().path() { 361 + "/rockbox.v1alpha1.BrowseService/RockboxBrowse" => { 362 + #[allow(non_camel_case_types)] 363 + struct RockboxBrowseSvc<T: BrowseService>(pub Arc<T>); 364 + impl< 365 + T: BrowseService, 366 + > tonic::server::UnaryService<super::RockboxBrowseRequest> 367 + for RockboxBrowseSvc<T> { 368 + type Response = super::RockboxBrowseResponse; 369 + type Future = BoxFuture< 370 + tonic::Response<Self::Response>, 371 + tonic::Status, 372 + >; 373 + fn call( 374 + &mut self, 375 + request: tonic::Request<super::RockboxBrowseRequest>, 376 + ) -> Self::Future { 377 + let inner = Arc::clone(&self.0); 378 + let fut = async move { 379 + <T as BrowseService>::rockbox_browse(&inner, request).await 380 + }; 381 + Box::pin(fut) 382 + } 383 + } 384 + let accept_compression_encodings = self.accept_compression_encodings; 385 + let send_compression_encodings = self.send_compression_encodings; 386 + let max_decoding_message_size = self.max_decoding_message_size; 387 + let max_encoding_message_size = self.max_encoding_message_size; 388 + let inner = self.inner.clone(); 389 + let fut = async move { 390 + let method = RockboxBrowseSvc(inner); 391 + let codec = tonic::codec::ProstCodec::default(); 392 + let mut grpc = tonic::server::Grpc::new(codec) 393 + .apply_compression_config( 394 + accept_compression_encodings, 395 + send_compression_encodings, 396 + ) 397 + .apply_max_message_size_config( 398 + max_decoding_message_size, 399 + max_encoding_message_size, 400 + ); 401 + let res = grpc.unary(method, req).await; 402 + Ok(res) 403 + }; 404 + Box::pin(fut) 405 + } 406 + "/rockbox.v1alpha1.BrowseService/TreeGetContext" => { 407 + #[allow(non_camel_case_types)] 408 + struct TreeGetContextSvc<T: BrowseService>(pub Arc<T>); 409 + impl< 410 + T: BrowseService, 411 + > tonic::server::UnaryService<super::TreeGetContextRequest> 412 + for TreeGetContextSvc<T> { 413 + type Response = super::TreeGetContextResponse; 414 + type Future = BoxFuture< 415 + tonic::Response<Self::Response>, 416 + tonic::Status, 417 + >; 418 + fn call( 419 + &mut self, 420 + request: tonic::Request<super::TreeGetContextRequest>, 421 + ) -> Self::Future { 422 + let inner = Arc::clone(&self.0); 423 + let fut = async move { 424 + <T as BrowseService>::tree_get_context(&inner, request) 425 + .await 426 + }; 427 + Box::pin(fut) 428 + } 429 + } 430 + let accept_compression_encodings = self.accept_compression_encodings; 431 + let send_compression_encodings = self.send_compression_encodings; 432 + let max_decoding_message_size = self.max_decoding_message_size; 433 + let max_encoding_message_size = self.max_encoding_message_size; 434 + let inner = self.inner.clone(); 435 + let fut = async move { 436 + let method = TreeGetContextSvc(inner); 437 + let codec = tonic::codec::ProstCodec::default(); 438 + let mut grpc = tonic::server::Grpc::new(codec) 439 + .apply_compression_config( 440 + accept_compression_encodings, 441 + send_compression_encodings, 442 + ) 443 + .apply_max_message_size_config( 444 + max_decoding_message_size, 445 + max_encoding_message_size, 446 + ); 447 + let res = grpc.unary(method, req).await; 448 + Ok(res) 449 + }; 450 + Box::pin(fut) 451 + } 452 + "/rockbox.v1alpha1.BrowseService/TreeGetEntries" => { 453 + #[allow(non_camel_case_types)] 454 + struct TreeGetEntriesSvc<T: BrowseService>(pub Arc<T>); 455 + impl< 456 + T: BrowseService, 457 + > tonic::server::UnaryService<super::TreeGetEntriesRequest> 458 + for TreeGetEntriesSvc<T> { 459 + type Response = super::TreeGetEntriesResponse; 460 + type Future = BoxFuture< 461 + tonic::Response<Self::Response>, 462 + tonic::Status, 463 + >; 464 + fn call( 465 + &mut self, 466 + request: tonic::Request<super::TreeGetEntriesRequest>, 467 + ) -> Self::Future { 468 + let inner = Arc::clone(&self.0); 469 + let fut = async move { 470 + <T as BrowseService>::tree_get_entries(&inner, request) 471 + .await 472 + }; 473 + Box::pin(fut) 474 + } 475 + } 476 + let accept_compression_encodings = self.accept_compression_encodings; 477 + let send_compression_encodings = self.send_compression_encodings; 478 + let max_decoding_message_size = self.max_decoding_message_size; 479 + let max_encoding_message_size = self.max_encoding_message_size; 480 + let inner = self.inner.clone(); 481 + let fut = async move { 482 + let method = TreeGetEntriesSvc(inner); 483 + let codec = tonic::codec::ProstCodec::default(); 484 + let mut grpc = tonic::server::Grpc::new(codec) 485 + .apply_compression_config( 486 + accept_compression_encodings, 487 + send_compression_encodings, 488 + ) 489 + .apply_max_message_size_config( 490 + max_decoding_message_size, 491 + max_encoding_message_size, 492 + ); 493 + let res = grpc.unary(method, req).await; 494 + Ok(res) 495 + }; 496 + Box::pin(fut) 497 + } 498 + "/rockbox.v1alpha1.BrowseService/TreeGetEntryAt" => { 499 + #[allow(non_camel_case_types)] 500 + struct TreeGetEntryAtSvc<T: BrowseService>(pub Arc<T>); 501 + impl< 502 + T: BrowseService, 503 + > tonic::server::UnaryService<super::TreeGetEntryAtRequest> 504 + for TreeGetEntryAtSvc<T> { 505 + type Response = super::TreeGetEntryAtResponse; 506 + type Future = BoxFuture< 507 + tonic::Response<Self::Response>, 508 + tonic::Status, 509 + >; 510 + fn call( 511 + &mut self, 512 + request: tonic::Request<super::TreeGetEntryAtRequest>, 513 + ) -> Self::Future { 514 + let inner = Arc::clone(&self.0); 515 + let fut = async move { 516 + <T as BrowseService>::tree_get_entry_at(&inner, request) 517 + .await 518 + }; 519 + Box::pin(fut) 520 + } 521 + } 522 + let accept_compression_encodings = self.accept_compression_encodings; 523 + let send_compression_encodings = self.send_compression_encodings; 524 + let max_decoding_message_size = self.max_decoding_message_size; 525 + let max_encoding_message_size = self.max_encoding_message_size; 526 + let inner = self.inner.clone(); 527 + let fut = async move { 528 + let method = TreeGetEntryAtSvc(inner); 529 + let codec = tonic::codec::ProstCodec::default(); 530 + let mut grpc = tonic::server::Grpc::new(codec) 531 + .apply_compression_config( 532 + accept_compression_encodings, 533 + send_compression_encodings, 534 + ) 535 + .apply_max_message_size_config( 536 + max_decoding_message_size, 537 + max_encoding_message_size, 538 + ); 539 + let res = grpc.unary(method, req).await; 540 + Ok(res) 541 + }; 542 + Box::pin(fut) 543 + } 544 + "/rockbox.v1alpha1.BrowseService/BrowseId3" => { 545 + #[allow(non_camel_case_types)] 546 + struct BrowseId3Svc<T: BrowseService>(pub Arc<T>); 547 + impl< 548 + T: BrowseService, 549 + > tonic::server::UnaryService<super::BrowseId3Request> 550 + for BrowseId3Svc<T> { 551 + type Response = super::BrowseId3Response; 552 + type Future = BoxFuture< 553 + tonic::Response<Self::Response>, 554 + tonic::Status, 555 + >; 556 + fn call( 557 + &mut self, 558 + request: tonic::Request<super::BrowseId3Request>, 559 + ) -> Self::Future { 560 + let inner = Arc::clone(&self.0); 561 + let fut = async move { 562 + <T as BrowseService>::browse_id3(&inner, request).await 563 + }; 564 + Box::pin(fut) 565 + } 566 + } 567 + let accept_compression_encodings = self.accept_compression_encodings; 568 + let send_compression_encodings = self.send_compression_encodings; 569 + let max_decoding_message_size = self.max_decoding_message_size; 570 + let max_encoding_message_size = self.max_encoding_message_size; 571 + let inner = self.inner.clone(); 572 + let fut = async move { 573 + let method = BrowseId3Svc(inner); 574 + let codec = tonic::codec::ProstCodec::default(); 575 + let mut grpc = tonic::server::Grpc::new(codec) 576 + .apply_compression_config( 577 + accept_compression_encodings, 578 + send_compression_encodings, 579 + ) 580 + .apply_max_message_size_config( 581 + max_decoding_message_size, 582 + max_encoding_message_size, 583 + ); 584 + let res = grpc.unary(method, req).await; 585 + Ok(res) 586 + }; 587 + Box::pin(fut) 588 + } 589 + _ => { 590 + Box::pin(async move { 591 + Ok( 592 + http::Response::builder() 593 + .status(200) 594 + .header("grpc-status", tonic::Code::Unimplemented as i32) 595 + .header( 596 + http::header::CONTENT_TYPE, 597 + tonic::metadata::GRPC_CONTENT_TYPE, 598 + ) 599 + .body(empty_body()) 600 + .unwrap(), 601 + ) 602 + }) 603 + } 604 + } 605 + } 606 + } 607 + impl<T> Clone for BrowseServiceServer<T> { 608 + fn clone(&self) -> Self { 609 + let inner = self.inner.clone(); 610 + Self { 611 + inner, 612 + accept_compression_encodings: self.accept_compression_encodings, 613 + send_compression_encodings: self.send_compression_encodings, 614 + max_decoding_message_size: self.max_decoding_message_size, 615 + max_encoding_message_size: self.max_encoding_message_size, 616 + } 617 + } 618 + } 619 + /// Generated gRPC service name 620 + pub const SERVICE_NAME: &str = "rockbox.v1alpha1.BrowseService"; 621 + impl<T> tonic::server::NamedService for BrowseServiceServer<T> { 622 + const NAME: &'static str = SERVICE_NAME; 623 + } 624 + } 625 + /// Generated client implementations. 626 + pub mod metadata_service_client { 627 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 628 + use tonic::codegen::*; 629 + use tonic::codegen::http::Uri; 630 + #[derive(Debug, Clone)] 631 + pub struct MetadataServiceClient<T> { 632 + inner: tonic::client::Grpc<T>, 633 + } 634 + impl MetadataServiceClient<tonic::transport::Channel> { 635 + /// Attempt to create a new client by connecting to a given endpoint. 636 + pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> 637 + where 638 + D: TryInto<tonic::transport::Endpoint>, 639 + D::Error: Into<StdError>, 640 + { 641 + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; 642 + Ok(Self::new(conn)) 643 + } 644 + } 645 + impl<T> MetadataServiceClient<T> 646 + where 647 + T: tonic::client::GrpcService<tonic::body::BoxBody>, 648 + T::Error: Into<StdError>, 649 + T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static, 650 + <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send, 651 + { 652 + pub fn new(inner: T) -> Self { 653 + let inner = tonic::client::Grpc::new(inner); 654 + Self { inner } 655 + } 656 + pub fn with_origin(inner: T, origin: Uri) -> Self { 657 + let inner = tonic::client::Grpc::with_origin(inner, origin); 658 + Self { inner } 659 + } 660 + pub fn with_interceptor<F>( 661 + inner: T, 662 + interceptor: F, 663 + ) -> MetadataServiceClient<InterceptedService<T, F>> 664 + where 665 + F: tonic::service::Interceptor, 666 + T::ResponseBody: Default, 667 + T: tonic::codegen::Service< 668 + http::Request<tonic::body::BoxBody>, 669 + Response = http::Response< 670 + <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 671 + >, 672 + >, 673 + <T as tonic::codegen::Service< 674 + http::Request<tonic::body::BoxBody>, 675 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 676 + { 677 + MetadataServiceClient::new(InterceptedService::new(inner, interceptor)) 678 + } 679 + /// Compress requests with the given encoding. 680 + /// 681 + /// This requires the server to support it otherwise it might respond with an 682 + /// error. 683 + #[must_use] 684 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 685 + self.inner = self.inner.send_compressed(encoding); 686 + self 687 + } 688 + /// Enable decompressing responses. 689 + #[must_use] 690 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 691 + self.inner = self.inner.accept_compressed(encoding); 692 + self 693 + } 694 + /// Limits the maximum size of a decoded message. 695 + /// 696 + /// Default: `4MB` 697 + #[must_use] 698 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 699 + self.inner = self.inner.max_decoding_message_size(limit); 700 + self 701 + } 702 + /// Limits the maximum size of an encoded message. 703 + /// 704 + /// Default: `usize::MAX` 705 + #[must_use] 706 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 707 + self.inner = self.inner.max_encoding_message_size(limit); 708 + self 709 + } 710 + } 711 + } 712 + /// Generated server implementations. 713 + pub mod metadata_service_server { 714 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 715 + use tonic::codegen::*; 716 + /// Generated trait containing gRPC methods that should be implemented for use with MetadataServiceServer. 717 + #[async_trait] 718 + pub trait MetadataService: std::marker::Send + std::marker::Sync + 'static {} 719 + #[derive(Debug)] 720 + pub struct MetadataServiceServer<T> { 721 + inner: Arc<T>, 722 + accept_compression_encodings: EnabledCompressionEncodings, 723 + send_compression_encodings: EnabledCompressionEncodings, 724 + max_decoding_message_size: Option<usize>, 725 + max_encoding_message_size: Option<usize>, 726 + } 727 + impl<T> MetadataServiceServer<T> { 728 + pub fn new(inner: T) -> Self { 729 + Self::from_arc(Arc::new(inner)) 730 + } 731 + pub fn from_arc(inner: Arc<T>) -> Self { 732 + Self { 733 + inner, 734 + accept_compression_encodings: Default::default(), 735 + send_compression_encodings: Default::default(), 736 + max_decoding_message_size: None, 737 + max_encoding_message_size: None, 738 + } 739 + } 740 + pub fn with_interceptor<F>( 741 + inner: T, 742 + interceptor: F, 743 + ) -> InterceptedService<Self, F> 744 + where 745 + F: tonic::service::Interceptor, 746 + { 747 + InterceptedService::new(Self::new(inner), interceptor) 748 + } 749 + /// Enable decompressing requests with the given encoding. 750 + #[must_use] 751 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 752 + self.accept_compression_encodings.enable(encoding); 753 + self 754 + } 755 + /// Compress responses with the given encoding, if the client supports it. 756 + #[must_use] 757 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 758 + self.send_compression_encodings.enable(encoding); 759 + self 760 + } 761 + /// Limits the maximum size of a decoded message. 762 + /// 763 + /// Default: `4MB` 764 + #[must_use] 765 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 766 + self.max_decoding_message_size = Some(limit); 767 + self 768 + } 769 + /// Limits the maximum size of an encoded message. 770 + /// 771 + /// Default: `usize::MAX` 772 + #[must_use] 773 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 774 + self.max_encoding_message_size = Some(limit); 775 + self 776 + } 777 + } 778 + impl<T, B> tonic::codegen::Service<http::Request<B>> for MetadataServiceServer<T> 779 + where 780 + T: MetadataService, 781 + B: Body + std::marker::Send + 'static, 782 + B::Error: Into<StdError> + std::marker::Send + 'static, 783 + { 784 + type Response = http::Response<tonic::body::BoxBody>; 785 + type Error = std::convert::Infallible; 786 + type Future = BoxFuture<Self::Response, Self::Error>; 787 + fn poll_ready( 788 + &mut self, 789 + _cx: &mut Context<'_>, 790 + ) -> Poll<std::result::Result<(), Self::Error>> { 791 + Poll::Ready(Ok(())) 792 + } 793 + fn call(&mut self, req: http::Request<B>) -> Self::Future { 794 + match req.uri().path() { 795 + _ => { 796 + Box::pin(async move { 797 + Ok( 798 + http::Response::builder() 799 + .status(200) 800 + .header("grpc-status", tonic::Code::Unimplemented as i32) 801 + .header( 802 + http::header::CONTENT_TYPE, 803 + tonic::metadata::GRPC_CONTENT_TYPE, 804 + ) 805 + .body(empty_body()) 806 + .unwrap(), 807 + ) 808 + }) 809 + } 810 + } 811 + } 812 + } 813 + impl<T> Clone for MetadataServiceServer<T> { 814 + fn clone(&self) -> Self { 815 + let inner = self.inner.clone(); 816 + Self { 817 + inner, 818 + accept_compression_encodings: self.accept_compression_encodings, 819 + send_compression_encodings: self.send_compression_encodings, 820 + max_decoding_message_size: self.max_decoding_message_size, 821 + max_encoding_message_size: self.max_encoding_message_size, 822 + } 823 + } 824 + } 825 + /// Generated gRPC service name 826 + pub const SERVICE_NAME: &str = "rockbox.v1alpha1.MetadataService"; 827 + impl<T> tonic::server::NamedService for MetadataServiceServer<T> { 828 + const NAME: &'static str = SERVICE_NAME; 829 + } 830 + } 831 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 832 + pub struct PlayRequest { 833 + #[prost(int64, tag = "1")] 834 + pub elapsed: i64, 835 + #[prost(int64, tag = "2")] 836 + pub offset: i64, 837 + } 838 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 839 + pub struct PlayResponse {} 840 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 841 + pub struct PauseRequest {} 842 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 843 + pub struct PauseResponse {} 844 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 845 + pub struct ResumeRequest {} 846 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 847 + pub struct ResumeResponse {} 848 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 849 + pub struct NextRequest {} 850 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 851 + pub struct NextResponse {} 852 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 853 + pub struct PreviousRequest {} 854 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 855 + pub struct PreviousResponse {} 856 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 857 + pub struct FastForwardRewindRequest { 858 + #[prost(int32, tag = "1")] 859 + pub new_time: i32, 860 + } 861 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 862 + pub struct FastForwardRewindResponse {} 863 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 864 + pub struct StatusRequest {} 865 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 866 + pub struct StatusResponse {} 867 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 868 + pub struct CurrentTrackRequest {} 869 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 870 + pub struct CurrentTrackResponse {} 871 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 872 + pub struct FlushAndReloadTracksRequest {} 873 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 874 + pub struct FlushAndReloadTracksResponse {} 875 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 876 + pub struct GetFilePositionRequest {} 877 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 878 + pub struct GetFilePositionResponse { 879 + #[prost(int32, tag = "1")] 880 + pub position: i32, 881 + } 882 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 883 + pub struct HardStopRequest {} 884 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 885 + pub struct HardStopResponse {} 886 + /// Generated client implementations. 887 + pub mod playback_service_client { 888 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 889 + use tonic::codegen::*; 890 + use tonic::codegen::http::Uri; 891 + #[derive(Debug, Clone)] 892 + pub struct PlaybackServiceClient<T> { 893 + inner: tonic::client::Grpc<T>, 894 + } 895 + impl PlaybackServiceClient<tonic::transport::Channel> { 896 + /// Attempt to create a new client by connecting to a given endpoint. 897 + pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> 898 + where 899 + D: TryInto<tonic::transport::Endpoint>, 900 + D::Error: Into<StdError>, 901 + { 902 + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; 903 + Ok(Self::new(conn)) 904 + } 905 + } 906 + impl<T> PlaybackServiceClient<T> 907 + where 908 + T: tonic::client::GrpcService<tonic::body::BoxBody>, 909 + T::Error: Into<StdError>, 910 + T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static, 911 + <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send, 912 + { 913 + pub fn new(inner: T) -> Self { 914 + let inner = tonic::client::Grpc::new(inner); 915 + Self { inner } 916 + } 917 + pub fn with_origin(inner: T, origin: Uri) -> Self { 918 + let inner = tonic::client::Grpc::with_origin(inner, origin); 919 + Self { inner } 920 + } 921 + pub fn with_interceptor<F>( 922 + inner: T, 923 + interceptor: F, 924 + ) -> PlaybackServiceClient<InterceptedService<T, F>> 925 + where 926 + F: tonic::service::Interceptor, 927 + T::ResponseBody: Default, 928 + T: tonic::codegen::Service< 929 + http::Request<tonic::body::BoxBody>, 930 + Response = http::Response< 931 + <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 932 + >, 933 + >, 934 + <T as tonic::codegen::Service< 935 + http::Request<tonic::body::BoxBody>, 936 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 937 + { 938 + PlaybackServiceClient::new(InterceptedService::new(inner, interceptor)) 939 + } 940 + /// Compress requests with the given encoding. 941 + /// 942 + /// This requires the server to support it otherwise it might respond with an 943 + /// error. 944 + #[must_use] 945 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 946 + self.inner = self.inner.send_compressed(encoding); 947 + self 948 + } 949 + /// Enable decompressing responses. 950 + #[must_use] 951 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 952 + self.inner = self.inner.accept_compressed(encoding); 953 + self 954 + } 955 + /// Limits the maximum size of a decoded message. 956 + /// 957 + /// Default: `4MB` 958 + #[must_use] 959 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 960 + self.inner = self.inner.max_decoding_message_size(limit); 961 + self 962 + } 963 + /// Limits the maximum size of an encoded message. 964 + /// 965 + /// Default: `usize::MAX` 966 + #[must_use] 967 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 968 + self.inner = self.inner.max_encoding_message_size(limit); 969 + self 970 + } 971 + pub async fn play( 972 + &mut self, 973 + request: impl tonic::IntoRequest<super::PlayRequest>, 974 + ) -> std::result::Result<tonic::Response<super::PlayResponse>, tonic::Status> { 975 + self.inner 976 + .ready() 977 + .await 978 + .map_err(|e| { 979 + tonic::Status::new( 980 + tonic::Code::Unknown, 981 + format!("Service was not ready: {}", e.into()), 982 + ) 983 + })?; 984 + let codec = tonic::codec::ProstCodec::default(); 985 + let path = http::uri::PathAndQuery::from_static( 986 + "/rockbox.v1alpha1.PlaybackService/Play", 987 + ); 988 + let mut req = request.into_request(); 989 + req.extensions_mut() 990 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Play")); 991 + self.inner.unary(req, path, codec).await 992 + } 993 + pub async fn pause( 994 + &mut self, 995 + request: impl tonic::IntoRequest<super::PauseRequest>, 996 + ) -> std::result::Result<tonic::Response<super::PauseResponse>, tonic::Status> { 997 + self.inner 998 + .ready() 999 + .await 1000 + .map_err(|e| { 1001 + tonic::Status::new( 1002 + tonic::Code::Unknown, 1003 + format!("Service was not ready: {}", e.into()), 1004 + ) 1005 + })?; 1006 + let codec = tonic::codec::ProstCodec::default(); 1007 + let path = http::uri::PathAndQuery::from_static( 1008 + "/rockbox.v1alpha1.PlaybackService/Pause", 1009 + ); 1010 + let mut req = request.into_request(); 1011 + req.extensions_mut() 1012 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Pause")); 1013 + self.inner.unary(req, path, codec).await 1014 + } 1015 + pub async fn resume( 1016 + &mut self, 1017 + request: impl tonic::IntoRequest<super::ResumeRequest>, 1018 + ) -> std::result::Result<tonic::Response<super::ResumeResponse>, tonic::Status> { 1019 + self.inner 1020 + .ready() 1021 + .await 1022 + .map_err(|e| { 1023 + tonic::Status::new( 1024 + tonic::Code::Unknown, 1025 + format!("Service was not ready: {}", e.into()), 1026 + ) 1027 + })?; 1028 + let codec = tonic::codec::ProstCodec::default(); 1029 + let path = http::uri::PathAndQuery::from_static( 1030 + "/rockbox.v1alpha1.PlaybackService/Resume", 1031 + ); 1032 + let mut req = request.into_request(); 1033 + req.extensions_mut() 1034 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Resume")); 1035 + self.inner.unary(req, path, codec).await 1036 + } 1037 + pub async fn next( 1038 + &mut self, 1039 + request: impl tonic::IntoRequest<super::NextRequest>, 1040 + ) -> std::result::Result<tonic::Response<super::NextResponse>, tonic::Status> { 1041 + self.inner 1042 + .ready() 1043 + .await 1044 + .map_err(|e| { 1045 + tonic::Status::new( 1046 + tonic::Code::Unknown, 1047 + format!("Service was not ready: {}", e.into()), 1048 + ) 1049 + })?; 1050 + let codec = tonic::codec::ProstCodec::default(); 1051 + let path = http::uri::PathAndQuery::from_static( 1052 + "/rockbox.v1alpha1.PlaybackService/Next", 1053 + ); 1054 + let mut req = request.into_request(); 1055 + req.extensions_mut() 1056 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Next")); 1057 + self.inner.unary(req, path, codec).await 1058 + } 1059 + pub async fn previous( 1060 + &mut self, 1061 + request: impl tonic::IntoRequest<super::PreviousRequest>, 1062 + ) -> std::result::Result< 1063 + tonic::Response<super::PreviousResponse>, 1064 + tonic::Status, 1065 + > { 1066 + self.inner 1067 + .ready() 1068 + .await 1069 + .map_err(|e| { 1070 + tonic::Status::new( 1071 + tonic::Code::Unknown, 1072 + format!("Service was not ready: {}", e.into()), 1073 + ) 1074 + })?; 1075 + let codec = tonic::codec::ProstCodec::default(); 1076 + let path = http::uri::PathAndQuery::from_static( 1077 + "/rockbox.v1alpha1.PlaybackService/Previous", 1078 + ); 1079 + let mut req = request.into_request(); 1080 + req.extensions_mut() 1081 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Previous")); 1082 + self.inner.unary(req, path, codec).await 1083 + } 1084 + pub async fn fast_forward_rewind( 1085 + &mut self, 1086 + request: impl tonic::IntoRequest<super::FastForwardRewindRequest>, 1087 + ) -> std::result::Result< 1088 + tonic::Response<super::FastForwardRewindResponse>, 1089 + tonic::Status, 1090 + > { 1091 + self.inner 1092 + .ready() 1093 + .await 1094 + .map_err(|e| { 1095 + tonic::Status::new( 1096 + tonic::Code::Unknown, 1097 + format!("Service was not ready: {}", e.into()), 1098 + ) 1099 + })?; 1100 + let codec = tonic::codec::ProstCodec::default(); 1101 + let path = http::uri::PathAndQuery::from_static( 1102 + "/rockbox.v1alpha1.PlaybackService/FastForwardRewind", 1103 + ); 1104 + let mut req = request.into_request(); 1105 + req.extensions_mut() 1106 + .insert( 1107 + GrpcMethod::new( 1108 + "rockbox.v1alpha1.PlaybackService", 1109 + "FastForwardRewind", 1110 + ), 1111 + ); 1112 + self.inner.unary(req, path, codec).await 1113 + } 1114 + pub async fn status( 1115 + &mut self, 1116 + request: impl tonic::IntoRequest<super::StatusRequest>, 1117 + ) -> std::result::Result<tonic::Response<super::StatusResponse>, tonic::Status> { 1118 + self.inner 1119 + .ready() 1120 + .await 1121 + .map_err(|e| { 1122 + tonic::Status::new( 1123 + tonic::Code::Unknown, 1124 + format!("Service was not ready: {}", e.into()), 1125 + ) 1126 + })?; 1127 + let codec = tonic::codec::ProstCodec::default(); 1128 + let path = http::uri::PathAndQuery::from_static( 1129 + "/rockbox.v1alpha1.PlaybackService/Status", 1130 + ); 1131 + let mut req = request.into_request(); 1132 + req.extensions_mut() 1133 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Status")); 1134 + self.inner.unary(req, path, codec).await 1135 + } 1136 + pub async fn current_track( 1137 + &mut self, 1138 + request: impl tonic::IntoRequest<super::CurrentTrackRequest>, 1139 + ) -> std::result::Result< 1140 + tonic::Response<super::CurrentTrackResponse>, 1141 + tonic::Status, 1142 + > { 1143 + self.inner 1144 + .ready() 1145 + .await 1146 + .map_err(|e| { 1147 + tonic::Status::new( 1148 + tonic::Code::Unknown, 1149 + format!("Service was not ready: {}", e.into()), 1150 + ) 1151 + })?; 1152 + let codec = tonic::codec::ProstCodec::default(); 1153 + let path = http::uri::PathAndQuery::from_static( 1154 + "/rockbox.v1alpha1.PlaybackService/CurrentTrack", 1155 + ); 1156 + let mut req = request.into_request(); 1157 + req.extensions_mut() 1158 + .insert( 1159 + GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "CurrentTrack"), 1160 + ); 1161 + self.inner.unary(req, path, codec).await 1162 + } 1163 + pub async fn flush_and_reload_tracks( 1164 + &mut self, 1165 + request: impl tonic::IntoRequest<super::FlushAndReloadTracksRequest>, 1166 + ) -> std::result::Result< 1167 + tonic::Response<super::FlushAndReloadTracksResponse>, 1168 + tonic::Status, 1169 + > { 1170 + self.inner 1171 + .ready() 1172 + .await 1173 + .map_err(|e| { 1174 + tonic::Status::new( 1175 + tonic::Code::Unknown, 1176 + format!("Service was not ready: {}", e.into()), 1177 + ) 1178 + })?; 1179 + let codec = tonic::codec::ProstCodec::default(); 1180 + let path = http::uri::PathAndQuery::from_static( 1181 + "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks", 1182 + ); 1183 + let mut req = request.into_request(); 1184 + req.extensions_mut() 1185 + .insert( 1186 + GrpcMethod::new( 1187 + "rockbox.v1alpha1.PlaybackService", 1188 + "FlushAndReloadTracks", 1189 + ), 1190 + ); 1191 + self.inner.unary(req, path, codec).await 1192 + } 1193 + pub async fn get_file_position( 1194 + &mut self, 1195 + request: impl tonic::IntoRequest<super::GetFilePositionRequest>, 1196 + ) -> std::result::Result< 1197 + tonic::Response<super::GetFilePositionResponse>, 1198 + tonic::Status, 1199 + > { 1200 + self.inner 1201 + .ready() 1202 + .await 1203 + .map_err(|e| { 1204 + tonic::Status::new( 1205 + tonic::Code::Unknown, 1206 + format!("Service was not ready: {}", e.into()), 1207 + ) 1208 + })?; 1209 + let codec = tonic::codec::ProstCodec::default(); 1210 + let path = http::uri::PathAndQuery::from_static( 1211 + "/rockbox.v1alpha1.PlaybackService/GetFilePosition", 1212 + ); 1213 + let mut req = request.into_request(); 1214 + req.extensions_mut() 1215 + .insert( 1216 + GrpcMethod::new( 1217 + "rockbox.v1alpha1.PlaybackService", 1218 + "GetFilePosition", 1219 + ), 1220 + ); 1221 + self.inner.unary(req, path, codec).await 1222 + } 1223 + pub async fn hard_stop( 1224 + &mut self, 1225 + request: impl tonic::IntoRequest<super::HardStopRequest>, 1226 + ) -> std::result::Result< 1227 + tonic::Response<super::HardStopResponse>, 1228 + tonic::Status, 1229 + > { 1230 + self.inner 1231 + .ready() 1232 + .await 1233 + .map_err(|e| { 1234 + tonic::Status::new( 1235 + tonic::Code::Unknown, 1236 + format!("Service was not ready: {}", e.into()), 1237 + ) 1238 + })?; 1239 + let codec = tonic::codec::ProstCodec::default(); 1240 + let path = http::uri::PathAndQuery::from_static( 1241 + "/rockbox.v1alpha1.PlaybackService/HardStop", 1242 + ); 1243 + let mut req = request.into_request(); 1244 + req.extensions_mut() 1245 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "HardStop")); 1246 + self.inner.unary(req, path, codec).await 1247 + } 1248 + } 1249 + } 1250 + /// Generated server implementations. 1251 + pub mod playback_service_server { 1252 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 1253 + use tonic::codegen::*; 1254 + /// Generated trait containing gRPC methods that should be implemented for use with PlaybackServiceServer. 1255 + #[async_trait] 1256 + pub trait PlaybackService: std::marker::Send + std::marker::Sync + 'static { 1257 + async fn play( 1258 + &self, 1259 + request: tonic::Request<super::PlayRequest>, 1260 + ) -> std::result::Result<tonic::Response<super::PlayResponse>, tonic::Status>; 1261 + async fn pause( 1262 + &self, 1263 + request: tonic::Request<super::PauseRequest>, 1264 + ) -> std::result::Result<tonic::Response<super::PauseResponse>, tonic::Status>; 1265 + async fn resume( 1266 + &self, 1267 + request: tonic::Request<super::ResumeRequest>, 1268 + ) -> std::result::Result<tonic::Response<super::ResumeResponse>, tonic::Status>; 1269 + async fn next( 1270 + &self, 1271 + request: tonic::Request<super::NextRequest>, 1272 + ) -> std::result::Result<tonic::Response<super::NextResponse>, tonic::Status>; 1273 + async fn previous( 1274 + &self, 1275 + request: tonic::Request<super::PreviousRequest>, 1276 + ) -> std::result::Result< 1277 + tonic::Response<super::PreviousResponse>, 1278 + tonic::Status, 1279 + >; 1280 + async fn fast_forward_rewind( 1281 + &self, 1282 + request: tonic::Request<super::FastForwardRewindRequest>, 1283 + ) -> std::result::Result< 1284 + tonic::Response<super::FastForwardRewindResponse>, 1285 + tonic::Status, 1286 + >; 1287 + async fn status( 1288 + &self, 1289 + request: tonic::Request<super::StatusRequest>, 1290 + ) -> std::result::Result<tonic::Response<super::StatusResponse>, tonic::Status>; 1291 + async fn current_track( 1292 + &self, 1293 + request: tonic::Request<super::CurrentTrackRequest>, 1294 + ) -> std::result::Result< 1295 + tonic::Response<super::CurrentTrackResponse>, 1296 + tonic::Status, 1297 + >; 1298 + async fn flush_and_reload_tracks( 1299 + &self, 1300 + request: tonic::Request<super::FlushAndReloadTracksRequest>, 1301 + ) -> std::result::Result< 1302 + tonic::Response<super::FlushAndReloadTracksResponse>, 1303 + tonic::Status, 1304 + >; 1305 + async fn get_file_position( 1306 + &self, 1307 + request: tonic::Request<super::GetFilePositionRequest>, 1308 + ) -> std::result::Result< 1309 + tonic::Response<super::GetFilePositionResponse>, 1310 + tonic::Status, 1311 + >; 1312 + async fn hard_stop( 1313 + &self, 1314 + request: tonic::Request<super::HardStopRequest>, 1315 + ) -> std::result::Result< 1316 + tonic::Response<super::HardStopResponse>, 1317 + tonic::Status, 1318 + >; 1319 + } 1320 + #[derive(Debug)] 1321 + pub struct PlaybackServiceServer<T> { 1322 + inner: Arc<T>, 1323 + accept_compression_encodings: EnabledCompressionEncodings, 1324 + send_compression_encodings: EnabledCompressionEncodings, 1325 + max_decoding_message_size: Option<usize>, 1326 + max_encoding_message_size: Option<usize>, 1327 + } 1328 + impl<T> PlaybackServiceServer<T> { 1329 + pub fn new(inner: T) -> Self { 1330 + Self::from_arc(Arc::new(inner)) 1331 + } 1332 + pub fn from_arc(inner: Arc<T>) -> Self { 1333 + Self { 1334 + inner, 1335 + accept_compression_encodings: Default::default(), 1336 + send_compression_encodings: Default::default(), 1337 + max_decoding_message_size: None, 1338 + max_encoding_message_size: None, 1339 + } 1340 + } 1341 + pub fn with_interceptor<F>( 1342 + inner: T, 1343 + interceptor: F, 1344 + ) -> InterceptedService<Self, F> 1345 + where 1346 + F: tonic::service::Interceptor, 1347 + { 1348 + InterceptedService::new(Self::new(inner), interceptor) 1349 + } 1350 + /// Enable decompressing requests with the given encoding. 1351 + #[must_use] 1352 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 1353 + self.accept_compression_encodings.enable(encoding); 1354 + self 1355 + } 1356 + /// Compress responses with the given encoding, if the client supports it. 1357 + #[must_use] 1358 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 1359 + self.send_compression_encodings.enable(encoding); 1360 + self 1361 + } 1362 + /// Limits the maximum size of a decoded message. 1363 + /// 1364 + /// Default: `4MB` 1365 + #[must_use] 1366 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 1367 + self.max_decoding_message_size = Some(limit); 1368 + self 1369 + } 1370 + /// Limits the maximum size of an encoded message. 1371 + /// 1372 + /// Default: `usize::MAX` 1373 + #[must_use] 1374 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 1375 + self.max_encoding_message_size = Some(limit); 1376 + self 1377 + } 1378 + } 1379 + impl<T, B> tonic::codegen::Service<http::Request<B>> for PlaybackServiceServer<T> 1380 + where 1381 + T: PlaybackService, 1382 + B: Body + std::marker::Send + 'static, 1383 + B::Error: Into<StdError> + std::marker::Send + 'static, 1384 + { 1385 + type Response = http::Response<tonic::body::BoxBody>; 1386 + type Error = std::convert::Infallible; 1387 + type Future = BoxFuture<Self::Response, Self::Error>; 1388 + fn poll_ready( 1389 + &mut self, 1390 + _cx: &mut Context<'_>, 1391 + ) -> Poll<std::result::Result<(), Self::Error>> { 1392 + Poll::Ready(Ok(())) 1393 + } 1394 + fn call(&mut self, req: http::Request<B>) -> Self::Future { 1395 + match req.uri().path() { 1396 + "/rockbox.v1alpha1.PlaybackService/Play" => { 1397 + #[allow(non_camel_case_types)] 1398 + struct PlaySvc<T: PlaybackService>(pub Arc<T>); 1399 + impl< 1400 + T: PlaybackService, 1401 + > tonic::server::UnaryService<super::PlayRequest> for PlaySvc<T> { 1402 + type Response = super::PlayResponse; 1403 + type Future = BoxFuture< 1404 + tonic::Response<Self::Response>, 1405 + tonic::Status, 1406 + >; 1407 + fn call( 1408 + &mut self, 1409 + request: tonic::Request<super::PlayRequest>, 1410 + ) -> Self::Future { 1411 + let inner = Arc::clone(&self.0); 1412 + let fut = async move { 1413 + <T as PlaybackService>::play(&inner, request).await 1414 + }; 1415 + Box::pin(fut) 1416 + } 1417 + } 1418 + let accept_compression_encodings = self.accept_compression_encodings; 1419 + let send_compression_encodings = self.send_compression_encodings; 1420 + let max_decoding_message_size = self.max_decoding_message_size; 1421 + let max_encoding_message_size = self.max_encoding_message_size; 1422 + let inner = self.inner.clone(); 1423 + let fut = async move { 1424 + let method = PlaySvc(inner); 1425 + let codec = tonic::codec::ProstCodec::default(); 1426 + let mut grpc = tonic::server::Grpc::new(codec) 1427 + .apply_compression_config( 1428 + accept_compression_encodings, 1429 + send_compression_encodings, 1430 + ) 1431 + .apply_max_message_size_config( 1432 + max_decoding_message_size, 1433 + max_encoding_message_size, 1434 + ); 1435 + let res = grpc.unary(method, req).await; 1436 + Ok(res) 1437 + }; 1438 + Box::pin(fut) 1439 + } 1440 + "/rockbox.v1alpha1.PlaybackService/Pause" => { 1441 + #[allow(non_camel_case_types)] 1442 + struct PauseSvc<T: PlaybackService>(pub Arc<T>); 1443 + impl< 1444 + T: PlaybackService, 1445 + > tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> { 1446 + type Response = super::PauseResponse; 1447 + type Future = BoxFuture< 1448 + tonic::Response<Self::Response>, 1449 + tonic::Status, 1450 + >; 1451 + fn call( 1452 + &mut self, 1453 + request: tonic::Request<super::PauseRequest>, 1454 + ) -> Self::Future { 1455 + let inner = Arc::clone(&self.0); 1456 + let fut = async move { 1457 + <T as PlaybackService>::pause(&inner, request).await 1458 + }; 1459 + Box::pin(fut) 1460 + } 1461 + } 1462 + let accept_compression_encodings = self.accept_compression_encodings; 1463 + let send_compression_encodings = self.send_compression_encodings; 1464 + let max_decoding_message_size = self.max_decoding_message_size; 1465 + let max_encoding_message_size = self.max_encoding_message_size; 1466 + let inner = self.inner.clone(); 1467 + let fut = async move { 1468 + let method = PauseSvc(inner); 1469 + let codec = tonic::codec::ProstCodec::default(); 1470 + let mut grpc = tonic::server::Grpc::new(codec) 1471 + .apply_compression_config( 1472 + accept_compression_encodings, 1473 + send_compression_encodings, 1474 + ) 1475 + .apply_max_message_size_config( 1476 + max_decoding_message_size, 1477 + max_encoding_message_size, 1478 + ); 1479 + let res = grpc.unary(method, req).await; 1480 + Ok(res) 1481 + }; 1482 + Box::pin(fut) 1483 + } 1484 + "/rockbox.v1alpha1.PlaybackService/Resume" => { 1485 + #[allow(non_camel_case_types)] 1486 + struct ResumeSvc<T: PlaybackService>(pub Arc<T>); 1487 + impl< 1488 + T: PlaybackService, 1489 + > tonic::server::UnaryService<super::ResumeRequest> 1490 + for ResumeSvc<T> { 1491 + type Response = super::ResumeResponse; 1492 + type Future = BoxFuture< 1493 + tonic::Response<Self::Response>, 1494 + tonic::Status, 1495 + >; 1496 + fn call( 1497 + &mut self, 1498 + request: tonic::Request<super::ResumeRequest>, 1499 + ) -> Self::Future { 1500 + let inner = Arc::clone(&self.0); 1501 + let fut = async move { 1502 + <T as PlaybackService>::resume(&inner, request).await 1503 + }; 1504 + Box::pin(fut) 1505 + } 1506 + } 1507 + let accept_compression_encodings = self.accept_compression_encodings; 1508 + let send_compression_encodings = self.send_compression_encodings; 1509 + let max_decoding_message_size = self.max_decoding_message_size; 1510 + let max_encoding_message_size = self.max_encoding_message_size; 1511 + let inner = self.inner.clone(); 1512 + let fut = async move { 1513 + let method = ResumeSvc(inner); 1514 + let codec = tonic::codec::ProstCodec::default(); 1515 + let mut grpc = tonic::server::Grpc::new(codec) 1516 + .apply_compression_config( 1517 + accept_compression_encodings, 1518 + send_compression_encodings, 1519 + ) 1520 + .apply_max_message_size_config( 1521 + max_decoding_message_size, 1522 + max_encoding_message_size, 1523 + ); 1524 + let res = grpc.unary(method, req).await; 1525 + Ok(res) 1526 + }; 1527 + Box::pin(fut) 1528 + } 1529 + "/rockbox.v1alpha1.PlaybackService/Next" => { 1530 + #[allow(non_camel_case_types)] 1531 + struct NextSvc<T: PlaybackService>(pub Arc<T>); 1532 + impl< 1533 + T: PlaybackService, 1534 + > tonic::server::UnaryService<super::NextRequest> for NextSvc<T> { 1535 + type Response = super::NextResponse; 1536 + type Future = BoxFuture< 1537 + tonic::Response<Self::Response>, 1538 + tonic::Status, 1539 + >; 1540 + fn call( 1541 + &mut self, 1542 + request: tonic::Request<super::NextRequest>, 1543 + ) -> Self::Future { 1544 + let inner = Arc::clone(&self.0); 1545 + let fut = async move { 1546 + <T as PlaybackService>::next(&inner, request).await 1547 + }; 1548 + Box::pin(fut) 1549 + } 1550 + } 1551 + let accept_compression_encodings = self.accept_compression_encodings; 1552 + let send_compression_encodings = self.send_compression_encodings; 1553 + let max_decoding_message_size = self.max_decoding_message_size; 1554 + let max_encoding_message_size = self.max_encoding_message_size; 1555 + let inner = self.inner.clone(); 1556 + let fut = async move { 1557 + let method = NextSvc(inner); 1558 + let codec = tonic::codec::ProstCodec::default(); 1559 + let mut grpc = tonic::server::Grpc::new(codec) 1560 + .apply_compression_config( 1561 + accept_compression_encodings, 1562 + send_compression_encodings, 1563 + ) 1564 + .apply_max_message_size_config( 1565 + max_decoding_message_size, 1566 + max_encoding_message_size, 1567 + ); 1568 + let res = grpc.unary(method, req).await; 1569 + Ok(res) 1570 + }; 1571 + Box::pin(fut) 1572 + } 1573 + "/rockbox.v1alpha1.PlaybackService/Previous" => { 1574 + #[allow(non_camel_case_types)] 1575 + struct PreviousSvc<T: PlaybackService>(pub Arc<T>); 1576 + impl< 1577 + T: PlaybackService, 1578 + > tonic::server::UnaryService<super::PreviousRequest> 1579 + for PreviousSvc<T> { 1580 + type Response = super::PreviousResponse; 1581 + type Future = BoxFuture< 1582 + tonic::Response<Self::Response>, 1583 + tonic::Status, 1584 + >; 1585 + fn call( 1586 + &mut self, 1587 + request: tonic::Request<super::PreviousRequest>, 1588 + ) -> Self::Future { 1589 + let inner = Arc::clone(&self.0); 1590 + let fut = async move { 1591 + <T as PlaybackService>::previous(&inner, request).await 1592 + }; 1593 + Box::pin(fut) 1594 + } 1595 + } 1596 + let accept_compression_encodings = self.accept_compression_encodings; 1597 + let send_compression_encodings = self.send_compression_encodings; 1598 + let max_decoding_message_size = self.max_decoding_message_size; 1599 + let max_encoding_message_size = self.max_encoding_message_size; 1600 + let inner = self.inner.clone(); 1601 + let fut = async move { 1602 + let method = PreviousSvc(inner); 1603 + let codec = tonic::codec::ProstCodec::default(); 1604 + let mut grpc = tonic::server::Grpc::new(codec) 1605 + .apply_compression_config( 1606 + accept_compression_encodings, 1607 + send_compression_encodings, 1608 + ) 1609 + .apply_max_message_size_config( 1610 + max_decoding_message_size, 1611 + max_encoding_message_size, 1612 + ); 1613 + let res = grpc.unary(method, req).await; 1614 + Ok(res) 1615 + }; 1616 + Box::pin(fut) 1617 + } 1618 + "/rockbox.v1alpha1.PlaybackService/FastForwardRewind" => { 1619 + #[allow(non_camel_case_types)] 1620 + struct FastForwardRewindSvc<T: PlaybackService>(pub Arc<T>); 1621 + impl< 1622 + T: PlaybackService, 1623 + > tonic::server::UnaryService<super::FastForwardRewindRequest> 1624 + for FastForwardRewindSvc<T> { 1625 + type Response = super::FastForwardRewindResponse; 1626 + type Future = BoxFuture< 1627 + tonic::Response<Self::Response>, 1628 + tonic::Status, 1629 + >; 1630 + fn call( 1631 + &mut self, 1632 + request: tonic::Request<super::FastForwardRewindRequest>, 1633 + ) -> Self::Future { 1634 + let inner = Arc::clone(&self.0); 1635 + let fut = async move { 1636 + <T as PlaybackService>::fast_forward_rewind(&inner, request) 1637 + .await 1638 + }; 1639 + Box::pin(fut) 1640 + } 1641 + } 1642 + let accept_compression_encodings = self.accept_compression_encodings; 1643 + let send_compression_encodings = self.send_compression_encodings; 1644 + let max_decoding_message_size = self.max_decoding_message_size; 1645 + let max_encoding_message_size = self.max_encoding_message_size; 1646 + let inner = self.inner.clone(); 1647 + let fut = async move { 1648 + let method = FastForwardRewindSvc(inner); 1649 + let codec = tonic::codec::ProstCodec::default(); 1650 + let mut grpc = tonic::server::Grpc::new(codec) 1651 + .apply_compression_config( 1652 + accept_compression_encodings, 1653 + send_compression_encodings, 1654 + ) 1655 + .apply_max_message_size_config( 1656 + max_decoding_message_size, 1657 + max_encoding_message_size, 1658 + ); 1659 + let res = grpc.unary(method, req).await; 1660 + Ok(res) 1661 + }; 1662 + Box::pin(fut) 1663 + } 1664 + "/rockbox.v1alpha1.PlaybackService/Status" => { 1665 + #[allow(non_camel_case_types)] 1666 + struct StatusSvc<T: PlaybackService>(pub Arc<T>); 1667 + impl< 1668 + T: PlaybackService, 1669 + > tonic::server::UnaryService<super::StatusRequest> 1670 + for StatusSvc<T> { 1671 + type Response = super::StatusResponse; 1672 + type Future = BoxFuture< 1673 + tonic::Response<Self::Response>, 1674 + tonic::Status, 1675 + >; 1676 + fn call( 1677 + &mut self, 1678 + request: tonic::Request<super::StatusRequest>, 1679 + ) -> Self::Future { 1680 + let inner = Arc::clone(&self.0); 1681 + let fut = async move { 1682 + <T as PlaybackService>::status(&inner, request).await 1683 + }; 1684 + Box::pin(fut) 1685 + } 1686 + } 1687 + let accept_compression_encodings = self.accept_compression_encodings; 1688 + let send_compression_encodings = self.send_compression_encodings; 1689 + let max_decoding_message_size = self.max_decoding_message_size; 1690 + let max_encoding_message_size = self.max_encoding_message_size; 1691 + let inner = self.inner.clone(); 1692 + let fut = async move { 1693 + let method = StatusSvc(inner); 1694 + let codec = tonic::codec::ProstCodec::default(); 1695 + let mut grpc = tonic::server::Grpc::new(codec) 1696 + .apply_compression_config( 1697 + accept_compression_encodings, 1698 + send_compression_encodings, 1699 + ) 1700 + .apply_max_message_size_config( 1701 + max_decoding_message_size, 1702 + max_encoding_message_size, 1703 + ); 1704 + let res = grpc.unary(method, req).await; 1705 + Ok(res) 1706 + }; 1707 + Box::pin(fut) 1708 + } 1709 + "/rockbox.v1alpha1.PlaybackService/CurrentTrack" => { 1710 + #[allow(non_camel_case_types)] 1711 + struct CurrentTrackSvc<T: PlaybackService>(pub Arc<T>); 1712 + impl< 1713 + T: PlaybackService, 1714 + > tonic::server::UnaryService<super::CurrentTrackRequest> 1715 + for CurrentTrackSvc<T> { 1716 + type Response = super::CurrentTrackResponse; 1717 + type Future = BoxFuture< 1718 + tonic::Response<Self::Response>, 1719 + tonic::Status, 1720 + >; 1721 + fn call( 1722 + &mut self, 1723 + request: tonic::Request<super::CurrentTrackRequest>, 1724 + ) -> Self::Future { 1725 + let inner = Arc::clone(&self.0); 1726 + let fut = async move { 1727 + <T as PlaybackService>::current_track(&inner, request).await 1728 + }; 1729 + Box::pin(fut) 1730 + } 1731 + } 1732 + let accept_compression_encodings = self.accept_compression_encodings; 1733 + let send_compression_encodings = self.send_compression_encodings; 1734 + let max_decoding_message_size = self.max_decoding_message_size; 1735 + let max_encoding_message_size = self.max_encoding_message_size; 1736 + let inner = self.inner.clone(); 1737 + let fut = async move { 1738 + let method = CurrentTrackSvc(inner); 1739 + let codec = tonic::codec::ProstCodec::default(); 1740 + let mut grpc = tonic::server::Grpc::new(codec) 1741 + .apply_compression_config( 1742 + accept_compression_encodings, 1743 + send_compression_encodings, 1744 + ) 1745 + .apply_max_message_size_config( 1746 + max_decoding_message_size, 1747 + max_encoding_message_size, 1748 + ); 1749 + let res = grpc.unary(method, req).await; 1750 + Ok(res) 1751 + }; 1752 + Box::pin(fut) 1753 + } 1754 + "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks" => { 1755 + #[allow(non_camel_case_types)] 1756 + struct FlushAndReloadTracksSvc<T: PlaybackService>(pub Arc<T>); 1757 + impl< 1758 + T: PlaybackService, 1759 + > tonic::server::UnaryService<super::FlushAndReloadTracksRequest> 1760 + for FlushAndReloadTracksSvc<T> { 1761 + type Response = super::FlushAndReloadTracksResponse; 1762 + type Future = BoxFuture< 1763 + tonic::Response<Self::Response>, 1764 + tonic::Status, 1765 + >; 1766 + fn call( 1767 + &mut self, 1768 + request: tonic::Request<super::FlushAndReloadTracksRequest>, 1769 + ) -> Self::Future { 1770 + let inner = Arc::clone(&self.0); 1771 + let fut = async move { 1772 + <T as PlaybackService>::flush_and_reload_tracks( 1773 + &inner, 1774 + request, 1775 + ) 1776 + .await 1777 + }; 1778 + Box::pin(fut) 1779 + } 1780 + } 1781 + let accept_compression_encodings = self.accept_compression_encodings; 1782 + let send_compression_encodings = self.send_compression_encodings; 1783 + let max_decoding_message_size = self.max_decoding_message_size; 1784 + let max_encoding_message_size = self.max_encoding_message_size; 1785 + let inner = self.inner.clone(); 1786 + let fut = async move { 1787 + let method = FlushAndReloadTracksSvc(inner); 1788 + let codec = tonic::codec::ProstCodec::default(); 1789 + let mut grpc = tonic::server::Grpc::new(codec) 1790 + .apply_compression_config( 1791 + accept_compression_encodings, 1792 + send_compression_encodings, 1793 + ) 1794 + .apply_max_message_size_config( 1795 + max_decoding_message_size, 1796 + max_encoding_message_size, 1797 + ); 1798 + let res = grpc.unary(method, req).await; 1799 + Ok(res) 1800 + }; 1801 + Box::pin(fut) 1802 + } 1803 + "/rockbox.v1alpha1.PlaybackService/GetFilePosition" => { 1804 + #[allow(non_camel_case_types)] 1805 + struct GetFilePositionSvc<T: PlaybackService>(pub Arc<T>); 1806 + impl< 1807 + T: PlaybackService, 1808 + > tonic::server::UnaryService<super::GetFilePositionRequest> 1809 + for GetFilePositionSvc<T> { 1810 + type Response = super::GetFilePositionResponse; 1811 + type Future = BoxFuture< 1812 + tonic::Response<Self::Response>, 1813 + tonic::Status, 1814 + >; 1815 + fn call( 1816 + &mut self, 1817 + request: tonic::Request<super::GetFilePositionRequest>, 1818 + ) -> Self::Future { 1819 + let inner = Arc::clone(&self.0); 1820 + let fut = async move { 1821 + <T as PlaybackService>::get_file_position(&inner, request) 1822 + .await 1823 + }; 1824 + Box::pin(fut) 1825 + } 1826 + } 1827 + let accept_compression_encodings = self.accept_compression_encodings; 1828 + let send_compression_encodings = self.send_compression_encodings; 1829 + let max_decoding_message_size = self.max_decoding_message_size; 1830 + let max_encoding_message_size = self.max_encoding_message_size; 1831 + let inner = self.inner.clone(); 1832 + let fut = async move { 1833 + let method = GetFilePositionSvc(inner); 1834 + let codec = tonic::codec::ProstCodec::default(); 1835 + let mut grpc = tonic::server::Grpc::new(codec) 1836 + .apply_compression_config( 1837 + accept_compression_encodings, 1838 + send_compression_encodings, 1839 + ) 1840 + .apply_max_message_size_config( 1841 + max_decoding_message_size, 1842 + max_encoding_message_size, 1843 + ); 1844 + let res = grpc.unary(method, req).await; 1845 + Ok(res) 1846 + }; 1847 + Box::pin(fut) 1848 + } 1849 + "/rockbox.v1alpha1.PlaybackService/HardStop" => { 1850 + #[allow(non_camel_case_types)] 1851 + struct HardStopSvc<T: PlaybackService>(pub Arc<T>); 1852 + impl< 1853 + T: PlaybackService, 1854 + > tonic::server::UnaryService<super::HardStopRequest> 1855 + for HardStopSvc<T> { 1856 + type Response = super::HardStopResponse; 1857 + type Future = BoxFuture< 1858 + tonic::Response<Self::Response>, 1859 + tonic::Status, 1860 + >; 1861 + fn call( 1862 + &mut self, 1863 + request: tonic::Request<super::HardStopRequest>, 1864 + ) -> Self::Future { 1865 + let inner = Arc::clone(&self.0); 1866 + let fut = async move { 1867 + <T as PlaybackService>::hard_stop(&inner, request).await 1868 + }; 1869 + Box::pin(fut) 1870 + } 1871 + } 1872 + let accept_compression_encodings = self.accept_compression_encodings; 1873 + let send_compression_encodings = self.send_compression_encodings; 1874 + let max_decoding_message_size = self.max_decoding_message_size; 1875 + let max_encoding_message_size = self.max_encoding_message_size; 1876 + let inner = self.inner.clone(); 1877 + let fut = async move { 1878 + let method = HardStopSvc(inner); 1879 + let codec = tonic::codec::ProstCodec::default(); 1880 + let mut grpc = tonic::server::Grpc::new(codec) 1881 + .apply_compression_config( 1882 + accept_compression_encodings, 1883 + send_compression_encodings, 1884 + ) 1885 + .apply_max_message_size_config( 1886 + max_decoding_message_size, 1887 + max_encoding_message_size, 1888 + ); 1889 + let res = grpc.unary(method, req).await; 1890 + Ok(res) 1891 + }; 1892 + Box::pin(fut) 1893 + } 1894 + _ => { 1895 + Box::pin(async move { 1896 + Ok( 1897 + http::Response::builder() 1898 + .status(200) 1899 + .header("grpc-status", tonic::Code::Unimplemented as i32) 1900 + .header( 1901 + http::header::CONTENT_TYPE, 1902 + tonic::metadata::GRPC_CONTENT_TYPE, 1903 + ) 1904 + .body(empty_body()) 1905 + .unwrap(), 1906 + ) 1907 + }) 1908 + } 1909 + } 1910 + } 1911 + } 1912 + impl<T> Clone for PlaybackServiceServer<T> { 1913 + fn clone(&self) -> Self { 1914 + let inner = self.inner.clone(); 1915 + Self { 1916 + inner, 1917 + accept_compression_encodings: self.accept_compression_encodings, 1918 + send_compression_encodings: self.send_compression_encodings, 1919 + max_decoding_message_size: self.max_decoding_message_size, 1920 + max_encoding_message_size: self.max_encoding_message_size, 1921 + } 1922 + } 1923 + } 1924 + /// Generated gRPC service name 1925 + pub const SERVICE_NAME: &str = "rockbox.v1alpha1.PlaybackService"; 1926 + impl<T> tonic::server::NamedService for PlaybackServiceServer<T> { 1927 + const NAME: &'static str = SERVICE_NAME; 1928 + } 1929 + } 1930 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1931 + pub struct GetCurrentRequest {} 1932 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1933 + pub struct GetCurrentResponse {} 1934 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1935 + pub struct GetResumeInfoRequest {} 1936 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1937 + pub struct GetResumeInfoResponse {} 1938 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1939 + pub struct GetTrackInfoRequest {} 1940 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1941 + pub struct GetTrackInfoResponse {} 1942 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1943 + pub struct GetFirstIndexRequest {} 1944 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1945 + pub struct GetFirstIndexResponse {} 1946 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1947 + pub struct GetDisplayIndexRequest {} 1948 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1949 + pub struct GetDisplayIndexResponse {} 1950 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1951 + pub struct AmountRequest {} 1952 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1953 + pub struct AmountResponse {} 1954 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1955 + pub struct PlaylistResumeRequest {} 1956 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1957 + pub struct PlaylistResumeResponse {} 1958 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1959 + pub struct ResumeTrackRequest {} 1960 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1961 + pub struct ResumeTrackResponse {} 1962 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1963 + pub struct SetModifiedRequest {} 1964 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1965 + pub struct SetModifiedResponse {} 1966 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1967 + pub struct StartRequest {} 1968 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1969 + pub struct StartResponse {} 1970 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1971 + pub struct SyncRequest {} 1972 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1973 + pub struct SyncResponse {} 1974 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1975 + pub struct RemoveAllTracksRequest {} 1976 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1977 + pub struct RemoveAllTracksResponse {} 1978 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1979 + pub struct CreatePlaylistRequest {} 1980 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1981 + pub struct CreatePlaylistResponse {} 1982 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1983 + pub struct InsertTrackRequest {} 1984 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1985 + pub struct InsertTrackResponse {} 1986 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1987 + pub struct InsertDirectoryRequest {} 1988 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1989 + pub struct InsertDirectoryResponse {} 1990 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1991 + pub struct InsertPlaylistRequest {} 1992 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1993 + pub struct InsertPlaylistResponse {} 1994 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1995 + pub struct ShufflePlaylistRequest {} 1996 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1997 + pub struct ShufflePlaylistResponse {} 1998 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 1999 + pub struct WarnOnPlaylistEraseRequest {} 2000 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 2001 + pub struct WarnOnPlaylistEraseResponse {} 2002 + /// Generated client implementations. 2003 + pub mod playlist_service_client { 2004 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 2005 + use tonic::codegen::*; 2006 + use tonic::codegen::http::Uri; 2007 + #[derive(Debug, Clone)] 2008 + pub struct PlaylistServiceClient<T> { 2009 + inner: tonic::client::Grpc<T>, 2010 + } 2011 + impl PlaylistServiceClient<tonic::transport::Channel> { 2012 + /// Attempt to create a new client by connecting to a given endpoint. 2013 + pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> 2014 + where 2015 + D: TryInto<tonic::transport::Endpoint>, 2016 + D::Error: Into<StdError>, 2017 + { 2018 + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; 2019 + Ok(Self::new(conn)) 2020 + } 2021 + } 2022 + impl<T> PlaylistServiceClient<T> 2023 + where 2024 + T: tonic::client::GrpcService<tonic::body::BoxBody>, 2025 + T::Error: Into<StdError>, 2026 + T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static, 2027 + <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send, 2028 + { 2029 + pub fn new(inner: T) -> Self { 2030 + let inner = tonic::client::Grpc::new(inner); 2031 + Self { inner } 2032 + } 2033 + pub fn with_origin(inner: T, origin: Uri) -> Self { 2034 + let inner = tonic::client::Grpc::with_origin(inner, origin); 2035 + Self { inner } 2036 + } 2037 + pub fn with_interceptor<F>( 2038 + inner: T, 2039 + interceptor: F, 2040 + ) -> PlaylistServiceClient<InterceptedService<T, F>> 2041 + where 2042 + F: tonic::service::Interceptor, 2043 + T::ResponseBody: Default, 2044 + T: tonic::codegen::Service< 2045 + http::Request<tonic::body::BoxBody>, 2046 + Response = http::Response< 2047 + <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 2048 + >, 2049 + >, 2050 + <T as tonic::codegen::Service< 2051 + http::Request<tonic::body::BoxBody>, 2052 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 2053 + { 2054 + PlaylistServiceClient::new(InterceptedService::new(inner, interceptor)) 2055 + } 2056 + /// Compress requests with the given encoding. 2057 + /// 2058 + /// This requires the server to support it otherwise it might respond with an 2059 + /// error. 2060 + #[must_use] 2061 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 2062 + self.inner = self.inner.send_compressed(encoding); 2063 + self 2064 + } 2065 + /// Enable decompressing responses. 2066 + #[must_use] 2067 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 2068 + self.inner = self.inner.accept_compressed(encoding); 2069 + self 2070 + } 2071 + /// Limits the maximum size of a decoded message. 2072 + /// 2073 + /// Default: `4MB` 2074 + #[must_use] 2075 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 2076 + self.inner = self.inner.max_decoding_message_size(limit); 2077 + self 2078 + } 2079 + /// Limits the maximum size of an encoded message. 2080 + /// 2081 + /// Default: `usize::MAX` 2082 + #[must_use] 2083 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 2084 + self.inner = self.inner.max_encoding_message_size(limit); 2085 + self 2086 + } 2087 + pub async fn get_current( 2088 + &mut self, 2089 + request: impl tonic::IntoRequest<super::GetCurrentRequest>, 2090 + ) -> std::result::Result< 2091 + tonic::Response<super::GetCurrentResponse>, 2092 + tonic::Status, 2093 + > { 2094 + self.inner 2095 + .ready() 2096 + .await 2097 + .map_err(|e| { 2098 + tonic::Status::new( 2099 + tonic::Code::Unknown, 2100 + format!("Service was not ready: {}", e.into()), 2101 + ) 2102 + })?; 2103 + let codec = tonic::codec::ProstCodec::default(); 2104 + let path = http::uri::PathAndQuery::from_static( 2105 + "/rockbox.v1alpha1.PlaylistService/GetCurrent", 2106 + ); 2107 + let mut req = request.into_request(); 2108 + req.extensions_mut() 2109 + .insert( 2110 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetCurrent"), 2111 + ); 2112 + self.inner.unary(req, path, codec).await 2113 + } 2114 + pub async fn get_resume_info( 2115 + &mut self, 2116 + request: impl tonic::IntoRequest<super::GetResumeInfoRequest>, 2117 + ) -> std::result::Result< 2118 + tonic::Response<super::GetResumeInfoResponse>, 2119 + tonic::Status, 2120 + > { 2121 + self.inner 2122 + .ready() 2123 + .await 2124 + .map_err(|e| { 2125 + tonic::Status::new( 2126 + tonic::Code::Unknown, 2127 + format!("Service was not ready: {}", e.into()), 2128 + ) 2129 + })?; 2130 + let codec = tonic::codec::ProstCodec::default(); 2131 + let path = http::uri::PathAndQuery::from_static( 2132 + "/rockbox.v1alpha1.PlaylistService/GetResumeInfo", 2133 + ); 2134 + let mut req = request.into_request(); 2135 + req.extensions_mut() 2136 + .insert( 2137 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetResumeInfo"), 2138 + ); 2139 + self.inner.unary(req, path, codec).await 2140 + } 2141 + pub async fn get_track_info( 2142 + &mut self, 2143 + request: impl tonic::IntoRequest<super::GetTrackInfoRequest>, 2144 + ) -> std::result::Result< 2145 + tonic::Response<super::GetTrackInfoResponse>, 2146 + tonic::Status, 2147 + > { 2148 + self.inner 2149 + .ready() 2150 + .await 2151 + .map_err(|e| { 2152 + tonic::Status::new( 2153 + tonic::Code::Unknown, 2154 + format!("Service was not ready: {}", e.into()), 2155 + ) 2156 + })?; 2157 + let codec = tonic::codec::ProstCodec::default(); 2158 + let path = http::uri::PathAndQuery::from_static( 2159 + "/rockbox.v1alpha1.PlaylistService/GetTrackInfo", 2160 + ); 2161 + let mut req = request.into_request(); 2162 + req.extensions_mut() 2163 + .insert( 2164 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetTrackInfo"), 2165 + ); 2166 + self.inner.unary(req, path, codec).await 2167 + } 2168 + pub async fn get_first_index( 2169 + &mut self, 2170 + request: impl tonic::IntoRequest<super::GetFirstIndexRequest>, 2171 + ) -> std::result::Result< 2172 + tonic::Response<super::GetFirstIndexResponse>, 2173 + tonic::Status, 2174 + > { 2175 + self.inner 2176 + .ready() 2177 + .await 2178 + .map_err(|e| { 2179 + tonic::Status::new( 2180 + tonic::Code::Unknown, 2181 + format!("Service was not ready: {}", e.into()), 2182 + ) 2183 + })?; 2184 + let codec = tonic::codec::ProstCodec::default(); 2185 + let path = http::uri::PathAndQuery::from_static( 2186 + "/rockbox.v1alpha1.PlaylistService/GetFirstIndex", 2187 + ); 2188 + let mut req = request.into_request(); 2189 + req.extensions_mut() 2190 + .insert( 2191 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetFirstIndex"), 2192 + ); 2193 + self.inner.unary(req, path, codec).await 2194 + } 2195 + pub async fn get_display_index( 2196 + &mut self, 2197 + request: impl tonic::IntoRequest<super::GetDisplayIndexRequest>, 2198 + ) -> std::result::Result< 2199 + tonic::Response<super::GetDisplayIndexResponse>, 2200 + tonic::Status, 2201 + > { 2202 + self.inner 2203 + .ready() 2204 + .await 2205 + .map_err(|e| { 2206 + tonic::Status::new( 2207 + tonic::Code::Unknown, 2208 + format!("Service was not ready: {}", e.into()), 2209 + ) 2210 + })?; 2211 + let codec = tonic::codec::ProstCodec::default(); 2212 + let path = http::uri::PathAndQuery::from_static( 2213 + "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex", 2214 + ); 2215 + let mut req = request.into_request(); 2216 + req.extensions_mut() 2217 + .insert( 2218 + GrpcMethod::new( 2219 + "rockbox.v1alpha1.PlaylistService", 2220 + "GetDisplayIndex", 2221 + ), 2222 + ); 2223 + self.inner.unary(req, path, codec).await 2224 + } 2225 + pub async fn amount( 2226 + &mut self, 2227 + request: impl tonic::IntoRequest<super::AmountRequest>, 2228 + ) -> std::result::Result<tonic::Response<super::AmountResponse>, tonic::Status> { 2229 + self.inner 2230 + .ready() 2231 + .await 2232 + .map_err(|e| { 2233 + tonic::Status::new( 2234 + tonic::Code::Unknown, 2235 + format!("Service was not ready: {}", e.into()), 2236 + ) 2237 + })?; 2238 + let codec = tonic::codec::ProstCodec::default(); 2239 + let path = http::uri::PathAndQuery::from_static( 2240 + "/rockbox.v1alpha1.PlaylistService/Amount", 2241 + ); 2242 + let mut req = request.into_request(); 2243 + req.extensions_mut() 2244 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Amount")); 2245 + self.inner.unary(req, path, codec).await 2246 + } 2247 + pub async fn playlist_resume( 2248 + &mut self, 2249 + request: impl tonic::IntoRequest<super::PlaylistResumeRequest>, 2250 + ) -> std::result::Result< 2251 + tonic::Response<super::PlaylistResumeResponse>, 2252 + tonic::Status, 2253 + > { 2254 + self.inner 2255 + .ready() 2256 + .await 2257 + .map_err(|e| { 2258 + tonic::Status::new( 2259 + tonic::Code::Unknown, 2260 + format!("Service was not ready: {}", e.into()), 2261 + ) 2262 + })?; 2263 + let codec = tonic::codec::ProstCodec::default(); 2264 + let path = http::uri::PathAndQuery::from_static( 2265 + "/rockbox.v1alpha1.PlaylistService/PlaylistResume", 2266 + ); 2267 + let mut req = request.into_request(); 2268 + req.extensions_mut() 2269 + .insert( 2270 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "PlaylistResume"), 2271 + ); 2272 + self.inner.unary(req, path, codec).await 2273 + } 2274 + pub async fn resume_track( 2275 + &mut self, 2276 + request: impl tonic::IntoRequest<super::ResumeTrackRequest>, 2277 + ) -> std::result::Result< 2278 + tonic::Response<super::ResumeTrackResponse>, 2279 + tonic::Status, 2280 + > { 2281 + self.inner 2282 + .ready() 2283 + .await 2284 + .map_err(|e| { 2285 + tonic::Status::new( 2286 + tonic::Code::Unknown, 2287 + format!("Service was not ready: {}", e.into()), 2288 + ) 2289 + })?; 2290 + let codec = tonic::codec::ProstCodec::default(); 2291 + let path = http::uri::PathAndQuery::from_static( 2292 + "/rockbox.v1alpha1.PlaylistService/ResumeTrack", 2293 + ); 2294 + let mut req = request.into_request(); 2295 + req.extensions_mut() 2296 + .insert( 2297 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "ResumeTrack"), 2298 + ); 2299 + self.inner.unary(req, path, codec).await 2300 + } 2301 + pub async fn set_modified( 2302 + &mut self, 2303 + request: impl tonic::IntoRequest<super::SetModifiedRequest>, 2304 + ) -> std::result::Result< 2305 + tonic::Response<super::SetModifiedResponse>, 2306 + tonic::Status, 2307 + > { 2308 + self.inner 2309 + .ready() 2310 + .await 2311 + .map_err(|e| { 2312 + tonic::Status::new( 2313 + tonic::Code::Unknown, 2314 + format!("Service was not ready: {}", e.into()), 2315 + ) 2316 + })?; 2317 + let codec = tonic::codec::ProstCodec::default(); 2318 + let path = http::uri::PathAndQuery::from_static( 2319 + "/rockbox.v1alpha1.PlaylistService/SetModified", 2320 + ); 2321 + let mut req = request.into_request(); 2322 + req.extensions_mut() 2323 + .insert( 2324 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "SetModified"), 2325 + ); 2326 + self.inner.unary(req, path, codec).await 2327 + } 2328 + pub async fn start( 2329 + &mut self, 2330 + request: impl tonic::IntoRequest<super::StartRequest>, 2331 + ) -> std::result::Result<tonic::Response<super::StartResponse>, tonic::Status> { 2332 + self.inner 2333 + .ready() 2334 + .await 2335 + .map_err(|e| { 2336 + tonic::Status::new( 2337 + tonic::Code::Unknown, 2338 + format!("Service was not ready: {}", e.into()), 2339 + ) 2340 + })?; 2341 + let codec = tonic::codec::ProstCodec::default(); 2342 + let path = http::uri::PathAndQuery::from_static( 2343 + "/rockbox.v1alpha1.PlaylistService/Start", 2344 + ); 2345 + let mut req = request.into_request(); 2346 + req.extensions_mut() 2347 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Start")); 2348 + self.inner.unary(req, path, codec).await 2349 + } 2350 + pub async fn sync( 2351 + &mut self, 2352 + request: impl tonic::IntoRequest<super::SyncRequest>, 2353 + ) -> std::result::Result<tonic::Response<super::SyncResponse>, tonic::Status> { 2354 + self.inner 2355 + .ready() 2356 + .await 2357 + .map_err(|e| { 2358 + tonic::Status::new( 2359 + tonic::Code::Unknown, 2360 + format!("Service was not ready: {}", e.into()), 2361 + ) 2362 + })?; 2363 + let codec = tonic::codec::ProstCodec::default(); 2364 + let path = http::uri::PathAndQuery::from_static( 2365 + "/rockbox.v1alpha1.PlaylistService/Sync", 2366 + ); 2367 + let mut req = request.into_request(); 2368 + req.extensions_mut() 2369 + .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Sync")); 2370 + self.inner.unary(req, path, codec).await 2371 + } 2372 + pub async fn remove_all_tracks( 2373 + &mut self, 2374 + request: impl tonic::IntoRequest<super::RemoveAllTracksRequest>, 2375 + ) -> std::result::Result< 2376 + tonic::Response<super::RemoveAllTracksResponse>, 2377 + tonic::Status, 2378 + > { 2379 + self.inner 2380 + .ready() 2381 + .await 2382 + .map_err(|e| { 2383 + tonic::Status::new( 2384 + tonic::Code::Unknown, 2385 + format!("Service was not ready: {}", e.into()), 2386 + ) 2387 + })?; 2388 + let codec = tonic::codec::ProstCodec::default(); 2389 + let path = http::uri::PathAndQuery::from_static( 2390 + "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks", 2391 + ); 2392 + let mut req = request.into_request(); 2393 + req.extensions_mut() 2394 + .insert( 2395 + GrpcMethod::new( 2396 + "rockbox.v1alpha1.PlaylistService", 2397 + "RemoveAllTracks", 2398 + ), 2399 + ); 2400 + self.inner.unary(req, path, codec).await 2401 + } 2402 + pub async fn create_playlist( 2403 + &mut self, 2404 + request: impl tonic::IntoRequest<super::CreatePlaylistRequest>, 2405 + ) -> std::result::Result< 2406 + tonic::Response<super::CreatePlaylistResponse>, 2407 + tonic::Status, 2408 + > { 2409 + self.inner 2410 + .ready() 2411 + .await 2412 + .map_err(|e| { 2413 + tonic::Status::new( 2414 + tonic::Code::Unknown, 2415 + format!("Service was not ready: {}", e.into()), 2416 + ) 2417 + })?; 2418 + let codec = tonic::codec::ProstCodec::default(); 2419 + let path = http::uri::PathAndQuery::from_static( 2420 + "/rockbox.v1alpha1.PlaylistService/CreatePlaylist", 2421 + ); 2422 + let mut req = request.into_request(); 2423 + req.extensions_mut() 2424 + .insert( 2425 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "CreatePlaylist"), 2426 + ); 2427 + self.inner.unary(req, path, codec).await 2428 + } 2429 + pub async fn insert_track( 2430 + &mut self, 2431 + request: impl tonic::IntoRequest<super::InsertTrackRequest>, 2432 + ) -> std::result::Result< 2433 + tonic::Response<super::InsertTrackResponse>, 2434 + tonic::Status, 2435 + > { 2436 + self.inner 2437 + .ready() 2438 + .await 2439 + .map_err(|e| { 2440 + tonic::Status::new( 2441 + tonic::Code::Unknown, 2442 + format!("Service was not ready: {}", e.into()), 2443 + ) 2444 + })?; 2445 + let codec = tonic::codec::ProstCodec::default(); 2446 + let path = http::uri::PathAndQuery::from_static( 2447 + "/rockbox.v1alpha1.PlaylistService/InsertTrack", 2448 + ); 2449 + let mut req = request.into_request(); 2450 + req.extensions_mut() 2451 + .insert( 2452 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertTrack"), 2453 + ); 2454 + self.inner.unary(req, path, codec).await 2455 + } 2456 + pub async fn insert_directory( 2457 + &mut self, 2458 + request: impl tonic::IntoRequest<super::InsertDirectoryRequest>, 2459 + ) -> std::result::Result< 2460 + tonic::Response<super::InsertDirectoryResponse>, 2461 + tonic::Status, 2462 + > { 2463 + self.inner 2464 + .ready() 2465 + .await 2466 + .map_err(|e| { 2467 + tonic::Status::new( 2468 + tonic::Code::Unknown, 2469 + format!("Service was not ready: {}", e.into()), 2470 + ) 2471 + })?; 2472 + let codec = tonic::codec::ProstCodec::default(); 2473 + let path = http::uri::PathAndQuery::from_static( 2474 + "/rockbox.v1alpha1.PlaylistService/InsertDirectory", 2475 + ); 2476 + let mut req = request.into_request(); 2477 + req.extensions_mut() 2478 + .insert( 2479 + GrpcMethod::new( 2480 + "rockbox.v1alpha1.PlaylistService", 2481 + "InsertDirectory", 2482 + ), 2483 + ); 2484 + self.inner.unary(req, path, codec).await 2485 + } 2486 + pub async fn insert_playlist( 2487 + &mut self, 2488 + request: impl tonic::IntoRequest<super::InsertPlaylistRequest>, 2489 + ) -> std::result::Result< 2490 + tonic::Response<super::InsertPlaylistResponse>, 2491 + tonic::Status, 2492 + > { 2493 + self.inner 2494 + .ready() 2495 + .await 2496 + .map_err(|e| { 2497 + tonic::Status::new( 2498 + tonic::Code::Unknown, 2499 + format!("Service was not ready: {}", e.into()), 2500 + ) 2501 + })?; 2502 + let codec = tonic::codec::ProstCodec::default(); 2503 + let path = http::uri::PathAndQuery::from_static( 2504 + "/rockbox.v1alpha1.PlaylistService/InsertPlaylist", 2505 + ); 2506 + let mut req = request.into_request(); 2507 + req.extensions_mut() 2508 + .insert( 2509 + GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertPlaylist"), 2510 + ); 2511 + self.inner.unary(req, path, codec).await 2512 + } 2513 + pub async fn shuffle_playlist( 2514 + &mut self, 2515 + request: impl tonic::IntoRequest<super::ShufflePlaylistRequest>, 2516 + ) -> std::result::Result< 2517 + tonic::Response<super::ShufflePlaylistResponse>, 2518 + tonic::Status, 2519 + > { 2520 + self.inner 2521 + .ready() 2522 + .await 2523 + .map_err(|e| { 2524 + tonic::Status::new( 2525 + tonic::Code::Unknown, 2526 + format!("Service was not ready: {}", e.into()), 2527 + ) 2528 + })?; 2529 + let codec = tonic::codec::ProstCodec::default(); 2530 + let path = http::uri::PathAndQuery::from_static( 2531 + "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist", 2532 + ); 2533 + let mut req = request.into_request(); 2534 + req.extensions_mut() 2535 + .insert( 2536 + GrpcMethod::new( 2537 + "rockbox.v1alpha1.PlaylistService", 2538 + "ShufflePlaylist", 2539 + ), 2540 + ); 2541 + self.inner.unary(req, path, codec).await 2542 + } 2543 + pub async fn warn_on_playlist_erase( 2544 + &mut self, 2545 + request: impl tonic::IntoRequest<super::WarnOnPlaylistEraseRequest>, 2546 + ) -> std::result::Result< 2547 + tonic::Response<super::WarnOnPlaylistEraseResponse>, 2548 + tonic::Status, 2549 + > { 2550 + self.inner 2551 + .ready() 2552 + .await 2553 + .map_err(|e| { 2554 + tonic::Status::new( 2555 + tonic::Code::Unknown, 2556 + format!("Service was not ready: {}", e.into()), 2557 + ) 2558 + })?; 2559 + let codec = tonic::codec::ProstCodec::default(); 2560 + let path = http::uri::PathAndQuery::from_static( 2561 + "/rockbox.v1alpha1.PlaylistService/WarnOnPlaylistErase", 2562 + ); 2563 + let mut req = request.into_request(); 2564 + req.extensions_mut() 2565 + .insert( 2566 + GrpcMethod::new( 2567 + "rockbox.v1alpha1.PlaylistService", 2568 + "WarnOnPlaylistErase", 2569 + ), 2570 + ); 2571 + self.inner.unary(req, path, codec).await 2572 + } 2573 + } 2574 + } 2575 + /// Generated server implementations. 2576 + pub mod playlist_service_server { 2577 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 2578 + use tonic::codegen::*; 2579 + /// Generated trait containing gRPC methods that should be implemented for use with PlaylistServiceServer. 2580 + #[async_trait] 2581 + pub trait PlaylistService: std::marker::Send + std::marker::Sync + 'static { 2582 + async fn get_current( 2583 + &self, 2584 + request: tonic::Request<super::GetCurrentRequest>, 2585 + ) -> std::result::Result< 2586 + tonic::Response<super::GetCurrentResponse>, 2587 + tonic::Status, 2588 + >; 2589 + async fn get_resume_info( 2590 + &self, 2591 + request: tonic::Request<super::GetResumeInfoRequest>, 2592 + ) -> std::result::Result< 2593 + tonic::Response<super::GetResumeInfoResponse>, 2594 + tonic::Status, 2595 + >; 2596 + async fn get_track_info( 2597 + &self, 2598 + request: tonic::Request<super::GetTrackInfoRequest>, 2599 + ) -> std::result::Result< 2600 + tonic::Response<super::GetTrackInfoResponse>, 2601 + tonic::Status, 2602 + >; 2603 + async fn get_first_index( 2604 + &self, 2605 + request: tonic::Request<super::GetFirstIndexRequest>, 2606 + ) -> std::result::Result< 2607 + tonic::Response<super::GetFirstIndexResponse>, 2608 + tonic::Status, 2609 + >; 2610 + async fn get_display_index( 2611 + &self, 2612 + request: tonic::Request<super::GetDisplayIndexRequest>, 2613 + ) -> std::result::Result< 2614 + tonic::Response<super::GetDisplayIndexResponse>, 2615 + tonic::Status, 2616 + >; 2617 + async fn amount( 2618 + &self, 2619 + request: tonic::Request<super::AmountRequest>, 2620 + ) -> std::result::Result<tonic::Response<super::AmountResponse>, tonic::Status>; 2621 + async fn playlist_resume( 2622 + &self, 2623 + request: tonic::Request<super::PlaylistResumeRequest>, 2624 + ) -> std::result::Result< 2625 + tonic::Response<super::PlaylistResumeResponse>, 2626 + tonic::Status, 2627 + >; 2628 + async fn resume_track( 2629 + &self, 2630 + request: tonic::Request<super::ResumeTrackRequest>, 2631 + ) -> std::result::Result< 2632 + tonic::Response<super::ResumeTrackResponse>, 2633 + tonic::Status, 2634 + >; 2635 + async fn set_modified( 2636 + &self, 2637 + request: tonic::Request<super::SetModifiedRequest>, 2638 + ) -> std::result::Result< 2639 + tonic::Response<super::SetModifiedResponse>, 2640 + tonic::Status, 2641 + >; 2642 + async fn start( 2643 + &self, 2644 + request: tonic::Request<super::StartRequest>, 2645 + ) -> std::result::Result<tonic::Response<super::StartResponse>, tonic::Status>; 2646 + async fn sync( 2647 + &self, 2648 + request: tonic::Request<super::SyncRequest>, 2649 + ) -> std::result::Result<tonic::Response<super::SyncResponse>, tonic::Status>; 2650 + async fn remove_all_tracks( 2651 + &self, 2652 + request: tonic::Request<super::RemoveAllTracksRequest>, 2653 + ) -> std::result::Result< 2654 + tonic::Response<super::RemoveAllTracksResponse>, 2655 + tonic::Status, 2656 + >; 2657 + async fn create_playlist( 2658 + &self, 2659 + request: tonic::Request<super::CreatePlaylistRequest>, 2660 + ) -> std::result::Result< 2661 + tonic::Response<super::CreatePlaylistResponse>, 2662 + tonic::Status, 2663 + >; 2664 + async fn insert_track( 2665 + &self, 2666 + request: tonic::Request<super::InsertTrackRequest>, 2667 + ) -> std::result::Result< 2668 + tonic::Response<super::InsertTrackResponse>, 2669 + tonic::Status, 2670 + >; 2671 + async fn insert_directory( 2672 + &self, 2673 + request: tonic::Request<super::InsertDirectoryRequest>, 2674 + ) -> std::result::Result< 2675 + tonic::Response<super::InsertDirectoryResponse>, 2676 + tonic::Status, 2677 + >; 2678 + async fn insert_playlist( 2679 + &self, 2680 + request: tonic::Request<super::InsertPlaylistRequest>, 2681 + ) -> std::result::Result< 2682 + tonic::Response<super::InsertPlaylistResponse>, 2683 + tonic::Status, 2684 + >; 2685 + async fn shuffle_playlist( 2686 + &self, 2687 + request: tonic::Request<super::ShufflePlaylistRequest>, 2688 + ) -> std::result::Result< 2689 + tonic::Response<super::ShufflePlaylistResponse>, 2690 + tonic::Status, 2691 + >; 2692 + async fn warn_on_playlist_erase( 2693 + &self, 2694 + request: tonic::Request<super::WarnOnPlaylistEraseRequest>, 2695 + ) -> std::result::Result< 2696 + tonic::Response<super::WarnOnPlaylistEraseResponse>, 2697 + tonic::Status, 2698 + >; 2699 + } 2700 + #[derive(Debug)] 2701 + pub struct PlaylistServiceServer<T> { 2702 + inner: Arc<T>, 2703 + accept_compression_encodings: EnabledCompressionEncodings, 2704 + send_compression_encodings: EnabledCompressionEncodings, 2705 + max_decoding_message_size: Option<usize>, 2706 + max_encoding_message_size: Option<usize>, 2707 + } 2708 + impl<T> PlaylistServiceServer<T> { 2709 + pub fn new(inner: T) -> Self { 2710 + Self::from_arc(Arc::new(inner)) 2711 + } 2712 + pub fn from_arc(inner: Arc<T>) -> Self { 2713 + Self { 2714 + inner, 2715 + accept_compression_encodings: Default::default(), 2716 + send_compression_encodings: Default::default(), 2717 + max_decoding_message_size: None, 2718 + max_encoding_message_size: None, 2719 + } 2720 + } 2721 + pub fn with_interceptor<F>( 2722 + inner: T, 2723 + interceptor: F, 2724 + ) -> InterceptedService<Self, F> 2725 + where 2726 + F: tonic::service::Interceptor, 2727 + { 2728 + InterceptedService::new(Self::new(inner), interceptor) 2729 + } 2730 + /// Enable decompressing requests with the given encoding. 2731 + #[must_use] 2732 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 2733 + self.accept_compression_encodings.enable(encoding); 2734 + self 2735 + } 2736 + /// Compress responses with the given encoding, if the client supports it. 2737 + #[must_use] 2738 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 2739 + self.send_compression_encodings.enable(encoding); 2740 + self 2741 + } 2742 + /// Limits the maximum size of a decoded message. 2743 + /// 2744 + /// Default: `4MB` 2745 + #[must_use] 2746 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 2747 + self.max_decoding_message_size = Some(limit); 2748 + self 2749 + } 2750 + /// Limits the maximum size of an encoded message. 2751 + /// 2752 + /// Default: `usize::MAX` 2753 + #[must_use] 2754 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 2755 + self.max_encoding_message_size = Some(limit); 2756 + self 2757 + } 2758 + } 2759 + impl<T, B> tonic::codegen::Service<http::Request<B>> for PlaylistServiceServer<T> 2760 + where 2761 + T: PlaylistService, 2762 + B: Body + std::marker::Send + 'static, 2763 + B::Error: Into<StdError> + std::marker::Send + 'static, 2764 + { 2765 + type Response = http::Response<tonic::body::BoxBody>; 2766 + type Error = std::convert::Infallible; 2767 + type Future = BoxFuture<Self::Response, Self::Error>; 2768 + fn poll_ready( 2769 + &mut self, 2770 + _cx: &mut Context<'_>, 2771 + ) -> Poll<std::result::Result<(), Self::Error>> { 2772 + Poll::Ready(Ok(())) 2773 + } 2774 + fn call(&mut self, req: http::Request<B>) -> Self::Future { 2775 + match req.uri().path() { 2776 + "/rockbox.v1alpha1.PlaylistService/GetCurrent" => { 2777 + #[allow(non_camel_case_types)] 2778 + struct GetCurrentSvc<T: PlaylistService>(pub Arc<T>); 2779 + impl< 2780 + T: PlaylistService, 2781 + > tonic::server::UnaryService<super::GetCurrentRequest> 2782 + for GetCurrentSvc<T> { 2783 + type Response = super::GetCurrentResponse; 2784 + type Future = BoxFuture< 2785 + tonic::Response<Self::Response>, 2786 + tonic::Status, 2787 + >; 2788 + fn call( 2789 + &mut self, 2790 + request: tonic::Request<super::GetCurrentRequest>, 2791 + ) -> Self::Future { 2792 + let inner = Arc::clone(&self.0); 2793 + let fut = async move { 2794 + <T as PlaylistService>::get_current(&inner, request).await 2795 + }; 2796 + Box::pin(fut) 2797 + } 2798 + } 2799 + let accept_compression_encodings = self.accept_compression_encodings; 2800 + let send_compression_encodings = self.send_compression_encodings; 2801 + let max_decoding_message_size = self.max_decoding_message_size; 2802 + let max_encoding_message_size = self.max_encoding_message_size; 2803 + let inner = self.inner.clone(); 2804 + let fut = async move { 2805 + let method = GetCurrentSvc(inner); 2806 + let codec = tonic::codec::ProstCodec::default(); 2807 + let mut grpc = tonic::server::Grpc::new(codec) 2808 + .apply_compression_config( 2809 + accept_compression_encodings, 2810 + send_compression_encodings, 2811 + ) 2812 + .apply_max_message_size_config( 2813 + max_decoding_message_size, 2814 + max_encoding_message_size, 2815 + ); 2816 + let res = grpc.unary(method, req).await; 2817 + Ok(res) 2818 + }; 2819 + Box::pin(fut) 2820 + } 2821 + "/rockbox.v1alpha1.PlaylistService/GetResumeInfo" => { 2822 + #[allow(non_camel_case_types)] 2823 + struct GetResumeInfoSvc<T: PlaylistService>(pub Arc<T>); 2824 + impl< 2825 + T: PlaylistService, 2826 + > tonic::server::UnaryService<super::GetResumeInfoRequest> 2827 + for GetResumeInfoSvc<T> { 2828 + type Response = super::GetResumeInfoResponse; 2829 + type Future = BoxFuture< 2830 + tonic::Response<Self::Response>, 2831 + tonic::Status, 2832 + >; 2833 + fn call( 2834 + &mut self, 2835 + request: tonic::Request<super::GetResumeInfoRequest>, 2836 + ) -> Self::Future { 2837 + let inner = Arc::clone(&self.0); 2838 + let fut = async move { 2839 + <T as PlaylistService>::get_resume_info(&inner, request) 2840 + .await 2841 + }; 2842 + Box::pin(fut) 2843 + } 2844 + } 2845 + let accept_compression_encodings = self.accept_compression_encodings; 2846 + let send_compression_encodings = self.send_compression_encodings; 2847 + let max_decoding_message_size = self.max_decoding_message_size; 2848 + let max_encoding_message_size = self.max_encoding_message_size; 2849 + let inner = self.inner.clone(); 2850 + let fut = async move { 2851 + let method = GetResumeInfoSvc(inner); 2852 + let codec = tonic::codec::ProstCodec::default(); 2853 + let mut grpc = tonic::server::Grpc::new(codec) 2854 + .apply_compression_config( 2855 + accept_compression_encodings, 2856 + send_compression_encodings, 2857 + ) 2858 + .apply_max_message_size_config( 2859 + max_decoding_message_size, 2860 + max_encoding_message_size, 2861 + ); 2862 + let res = grpc.unary(method, req).await; 2863 + Ok(res) 2864 + }; 2865 + Box::pin(fut) 2866 + } 2867 + "/rockbox.v1alpha1.PlaylistService/GetTrackInfo" => { 2868 + #[allow(non_camel_case_types)] 2869 + struct GetTrackInfoSvc<T: PlaylistService>(pub Arc<T>); 2870 + impl< 2871 + T: PlaylistService, 2872 + > tonic::server::UnaryService<super::GetTrackInfoRequest> 2873 + for GetTrackInfoSvc<T> { 2874 + type Response = super::GetTrackInfoResponse; 2875 + type Future = BoxFuture< 2876 + tonic::Response<Self::Response>, 2877 + tonic::Status, 2878 + >; 2879 + fn call( 2880 + &mut self, 2881 + request: tonic::Request<super::GetTrackInfoRequest>, 2882 + ) -> Self::Future { 2883 + let inner = Arc::clone(&self.0); 2884 + let fut = async move { 2885 + <T as PlaylistService>::get_track_info(&inner, request) 2886 + .await 2887 + }; 2888 + Box::pin(fut) 2889 + } 2890 + } 2891 + let accept_compression_encodings = self.accept_compression_encodings; 2892 + let send_compression_encodings = self.send_compression_encodings; 2893 + let max_decoding_message_size = self.max_decoding_message_size; 2894 + let max_encoding_message_size = self.max_encoding_message_size; 2895 + let inner = self.inner.clone(); 2896 + let fut = async move { 2897 + let method = GetTrackInfoSvc(inner); 2898 + let codec = tonic::codec::ProstCodec::default(); 2899 + let mut grpc = tonic::server::Grpc::new(codec) 2900 + .apply_compression_config( 2901 + accept_compression_encodings, 2902 + send_compression_encodings, 2903 + ) 2904 + .apply_max_message_size_config( 2905 + max_decoding_message_size, 2906 + max_encoding_message_size, 2907 + ); 2908 + let res = grpc.unary(method, req).await; 2909 + Ok(res) 2910 + }; 2911 + Box::pin(fut) 2912 + } 2913 + "/rockbox.v1alpha1.PlaylistService/GetFirstIndex" => { 2914 + #[allow(non_camel_case_types)] 2915 + struct GetFirstIndexSvc<T: PlaylistService>(pub Arc<T>); 2916 + impl< 2917 + T: PlaylistService, 2918 + > tonic::server::UnaryService<super::GetFirstIndexRequest> 2919 + for GetFirstIndexSvc<T> { 2920 + type Response = super::GetFirstIndexResponse; 2921 + type Future = BoxFuture< 2922 + tonic::Response<Self::Response>, 2923 + tonic::Status, 2924 + >; 2925 + fn call( 2926 + &mut self, 2927 + request: tonic::Request<super::GetFirstIndexRequest>, 2928 + ) -> Self::Future { 2929 + let inner = Arc::clone(&self.0); 2930 + let fut = async move { 2931 + <T as PlaylistService>::get_first_index(&inner, request) 2932 + .await 2933 + }; 2934 + Box::pin(fut) 2935 + } 2936 + } 2937 + let accept_compression_encodings = self.accept_compression_encodings; 2938 + let send_compression_encodings = self.send_compression_encodings; 2939 + let max_decoding_message_size = self.max_decoding_message_size; 2940 + let max_encoding_message_size = self.max_encoding_message_size; 2941 + let inner = self.inner.clone(); 2942 + let fut = async move { 2943 + let method = GetFirstIndexSvc(inner); 2944 + let codec = tonic::codec::ProstCodec::default(); 2945 + let mut grpc = tonic::server::Grpc::new(codec) 2946 + .apply_compression_config( 2947 + accept_compression_encodings, 2948 + send_compression_encodings, 2949 + ) 2950 + .apply_max_message_size_config( 2951 + max_decoding_message_size, 2952 + max_encoding_message_size, 2953 + ); 2954 + let res = grpc.unary(method, req).await; 2955 + Ok(res) 2956 + }; 2957 + Box::pin(fut) 2958 + } 2959 + "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex" => { 2960 + #[allow(non_camel_case_types)] 2961 + struct GetDisplayIndexSvc<T: PlaylistService>(pub Arc<T>); 2962 + impl< 2963 + T: PlaylistService, 2964 + > tonic::server::UnaryService<super::GetDisplayIndexRequest> 2965 + for GetDisplayIndexSvc<T> { 2966 + type Response = super::GetDisplayIndexResponse; 2967 + type Future = BoxFuture< 2968 + tonic::Response<Self::Response>, 2969 + tonic::Status, 2970 + >; 2971 + fn call( 2972 + &mut self, 2973 + request: tonic::Request<super::GetDisplayIndexRequest>, 2974 + ) -> Self::Future { 2975 + let inner = Arc::clone(&self.0); 2976 + let fut = async move { 2977 + <T as PlaylistService>::get_display_index(&inner, request) 2978 + .await 2979 + }; 2980 + Box::pin(fut) 2981 + } 2982 + } 2983 + let accept_compression_encodings = self.accept_compression_encodings; 2984 + let send_compression_encodings = self.send_compression_encodings; 2985 + let max_decoding_message_size = self.max_decoding_message_size; 2986 + let max_encoding_message_size = self.max_encoding_message_size; 2987 + let inner = self.inner.clone(); 2988 + let fut = async move { 2989 + let method = GetDisplayIndexSvc(inner); 2990 + let codec = tonic::codec::ProstCodec::default(); 2991 + let mut grpc = tonic::server::Grpc::new(codec) 2992 + .apply_compression_config( 2993 + accept_compression_encodings, 2994 + send_compression_encodings, 2995 + ) 2996 + .apply_max_message_size_config( 2997 + max_decoding_message_size, 2998 + max_encoding_message_size, 2999 + ); 3000 + let res = grpc.unary(method, req).await; 3001 + Ok(res) 3002 + }; 3003 + Box::pin(fut) 3004 + } 3005 + "/rockbox.v1alpha1.PlaylistService/Amount" => { 3006 + #[allow(non_camel_case_types)] 3007 + struct AmountSvc<T: PlaylistService>(pub Arc<T>); 3008 + impl< 3009 + T: PlaylistService, 3010 + > tonic::server::UnaryService<super::AmountRequest> 3011 + for AmountSvc<T> { 3012 + type Response = super::AmountResponse; 3013 + type Future = BoxFuture< 3014 + tonic::Response<Self::Response>, 3015 + tonic::Status, 3016 + >; 3017 + fn call( 3018 + &mut self, 3019 + request: tonic::Request<super::AmountRequest>, 3020 + ) -> Self::Future { 3021 + let inner = Arc::clone(&self.0); 3022 + let fut = async move { 3023 + <T as PlaylistService>::amount(&inner, request).await 3024 + }; 3025 + Box::pin(fut) 3026 + } 3027 + } 3028 + let accept_compression_encodings = self.accept_compression_encodings; 3029 + let send_compression_encodings = self.send_compression_encodings; 3030 + let max_decoding_message_size = self.max_decoding_message_size; 3031 + let max_encoding_message_size = self.max_encoding_message_size; 3032 + let inner = self.inner.clone(); 3033 + let fut = async move { 3034 + let method = AmountSvc(inner); 3035 + let codec = tonic::codec::ProstCodec::default(); 3036 + let mut grpc = tonic::server::Grpc::new(codec) 3037 + .apply_compression_config( 3038 + accept_compression_encodings, 3039 + send_compression_encodings, 3040 + ) 3041 + .apply_max_message_size_config( 3042 + max_decoding_message_size, 3043 + max_encoding_message_size, 3044 + ); 3045 + let res = grpc.unary(method, req).await; 3046 + Ok(res) 3047 + }; 3048 + Box::pin(fut) 3049 + } 3050 + "/rockbox.v1alpha1.PlaylistService/PlaylistResume" => { 3051 + #[allow(non_camel_case_types)] 3052 + struct PlaylistResumeSvc<T: PlaylistService>(pub Arc<T>); 3053 + impl< 3054 + T: PlaylistService, 3055 + > tonic::server::UnaryService<super::PlaylistResumeRequest> 3056 + for PlaylistResumeSvc<T> { 3057 + type Response = super::PlaylistResumeResponse; 3058 + type Future = BoxFuture< 3059 + tonic::Response<Self::Response>, 3060 + tonic::Status, 3061 + >; 3062 + fn call( 3063 + &mut self, 3064 + request: tonic::Request<super::PlaylistResumeRequest>, 3065 + ) -> Self::Future { 3066 + let inner = Arc::clone(&self.0); 3067 + let fut = async move { 3068 + <T as PlaylistService>::playlist_resume(&inner, request) 3069 + .await 3070 + }; 3071 + Box::pin(fut) 3072 + } 3073 + } 3074 + let accept_compression_encodings = self.accept_compression_encodings; 3075 + let send_compression_encodings = self.send_compression_encodings; 3076 + let max_decoding_message_size = self.max_decoding_message_size; 3077 + let max_encoding_message_size = self.max_encoding_message_size; 3078 + let inner = self.inner.clone(); 3079 + let fut = async move { 3080 + let method = PlaylistResumeSvc(inner); 3081 + let codec = tonic::codec::ProstCodec::default(); 3082 + let mut grpc = tonic::server::Grpc::new(codec) 3083 + .apply_compression_config( 3084 + accept_compression_encodings, 3085 + send_compression_encodings, 3086 + ) 3087 + .apply_max_message_size_config( 3088 + max_decoding_message_size, 3089 + max_encoding_message_size, 3090 + ); 3091 + let res = grpc.unary(method, req).await; 3092 + Ok(res) 3093 + }; 3094 + Box::pin(fut) 3095 + } 3096 + "/rockbox.v1alpha1.PlaylistService/ResumeTrack" => { 3097 + #[allow(non_camel_case_types)] 3098 + struct ResumeTrackSvc<T: PlaylistService>(pub Arc<T>); 3099 + impl< 3100 + T: PlaylistService, 3101 + > tonic::server::UnaryService<super::ResumeTrackRequest> 3102 + for ResumeTrackSvc<T> { 3103 + type Response = super::ResumeTrackResponse; 3104 + type Future = BoxFuture< 3105 + tonic::Response<Self::Response>, 3106 + tonic::Status, 3107 + >; 3108 + fn call( 3109 + &mut self, 3110 + request: tonic::Request<super::ResumeTrackRequest>, 3111 + ) -> Self::Future { 3112 + let inner = Arc::clone(&self.0); 3113 + let fut = async move { 3114 + <T as PlaylistService>::resume_track(&inner, request).await 3115 + }; 3116 + Box::pin(fut) 3117 + } 3118 + } 3119 + let accept_compression_encodings = self.accept_compression_encodings; 3120 + let send_compression_encodings = self.send_compression_encodings; 3121 + let max_decoding_message_size = self.max_decoding_message_size; 3122 + let max_encoding_message_size = self.max_encoding_message_size; 3123 + let inner = self.inner.clone(); 3124 + let fut = async move { 3125 + let method = ResumeTrackSvc(inner); 3126 + let codec = tonic::codec::ProstCodec::default(); 3127 + let mut grpc = tonic::server::Grpc::new(codec) 3128 + .apply_compression_config( 3129 + accept_compression_encodings, 3130 + send_compression_encodings, 3131 + ) 3132 + .apply_max_message_size_config( 3133 + max_decoding_message_size, 3134 + max_encoding_message_size, 3135 + ); 3136 + let res = grpc.unary(method, req).await; 3137 + Ok(res) 3138 + }; 3139 + Box::pin(fut) 3140 + } 3141 + "/rockbox.v1alpha1.PlaylistService/SetModified" => { 3142 + #[allow(non_camel_case_types)] 3143 + struct SetModifiedSvc<T: PlaylistService>(pub Arc<T>); 3144 + impl< 3145 + T: PlaylistService, 3146 + > tonic::server::UnaryService<super::SetModifiedRequest> 3147 + for SetModifiedSvc<T> { 3148 + type Response = super::SetModifiedResponse; 3149 + type Future = BoxFuture< 3150 + tonic::Response<Self::Response>, 3151 + tonic::Status, 3152 + >; 3153 + fn call( 3154 + &mut self, 3155 + request: tonic::Request<super::SetModifiedRequest>, 3156 + ) -> Self::Future { 3157 + let inner = Arc::clone(&self.0); 3158 + let fut = async move { 3159 + <T as PlaylistService>::set_modified(&inner, request).await 3160 + }; 3161 + Box::pin(fut) 3162 + } 3163 + } 3164 + let accept_compression_encodings = self.accept_compression_encodings; 3165 + let send_compression_encodings = self.send_compression_encodings; 3166 + let max_decoding_message_size = self.max_decoding_message_size; 3167 + let max_encoding_message_size = self.max_encoding_message_size; 3168 + let inner = self.inner.clone(); 3169 + let fut = async move { 3170 + let method = SetModifiedSvc(inner); 3171 + let codec = tonic::codec::ProstCodec::default(); 3172 + let mut grpc = tonic::server::Grpc::new(codec) 3173 + .apply_compression_config( 3174 + accept_compression_encodings, 3175 + send_compression_encodings, 3176 + ) 3177 + .apply_max_message_size_config( 3178 + max_decoding_message_size, 3179 + max_encoding_message_size, 3180 + ); 3181 + let res = grpc.unary(method, req).await; 3182 + Ok(res) 3183 + }; 3184 + Box::pin(fut) 3185 + } 3186 + "/rockbox.v1alpha1.PlaylistService/Start" => { 3187 + #[allow(non_camel_case_types)] 3188 + struct StartSvc<T: PlaylistService>(pub Arc<T>); 3189 + impl< 3190 + T: PlaylistService, 3191 + > tonic::server::UnaryService<super::StartRequest> for StartSvc<T> { 3192 + type Response = super::StartResponse; 3193 + type Future = BoxFuture< 3194 + tonic::Response<Self::Response>, 3195 + tonic::Status, 3196 + >; 3197 + fn call( 3198 + &mut self, 3199 + request: tonic::Request<super::StartRequest>, 3200 + ) -> Self::Future { 3201 + let inner = Arc::clone(&self.0); 3202 + let fut = async move { 3203 + <T as PlaylistService>::start(&inner, request).await 3204 + }; 3205 + Box::pin(fut) 3206 + } 3207 + } 3208 + let accept_compression_encodings = self.accept_compression_encodings; 3209 + let send_compression_encodings = self.send_compression_encodings; 3210 + let max_decoding_message_size = self.max_decoding_message_size; 3211 + let max_encoding_message_size = self.max_encoding_message_size; 3212 + let inner = self.inner.clone(); 3213 + let fut = async move { 3214 + let method = StartSvc(inner); 3215 + let codec = tonic::codec::ProstCodec::default(); 3216 + let mut grpc = tonic::server::Grpc::new(codec) 3217 + .apply_compression_config( 3218 + accept_compression_encodings, 3219 + send_compression_encodings, 3220 + ) 3221 + .apply_max_message_size_config( 3222 + max_decoding_message_size, 3223 + max_encoding_message_size, 3224 + ); 3225 + let res = grpc.unary(method, req).await; 3226 + Ok(res) 3227 + }; 3228 + Box::pin(fut) 3229 + } 3230 + "/rockbox.v1alpha1.PlaylistService/Sync" => { 3231 + #[allow(non_camel_case_types)] 3232 + struct SyncSvc<T: PlaylistService>(pub Arc<T>); 3233 + impl< 3234 + T: PlaylistService, 3235 + > tonic::server::UnaryService<super::SyncRequest> for SyncSvc<T> { 3236 + type Response = super::SyncResponse; 3237 + type Future = BoxFuture< 3238 + tonic::Response<Self::Response>, 3239 + tonic::Status, 3240 + >; 3241 + fn call( 3242 + &mut self, 3243 + request: tonic::Request<super::SyncRequest>, 3244 + ) -> Self::Future { 3245 + let inner = Arc::clone(&self.0); 3246 + let fut = async move { 3247 + <T as PlaylistService>::sync(&inner, request).await 3248 + }; 3249 + Box::pin(fut) 3250 + } 3251 + } 3252 + let accept_compression_encodings = self.accept_compression_encodings; 3253 + let send_compression_encodings = self.send_compression_encodings; 3254 + let max_decoding_message_size = self.max_decoding_message_size; 3255 + let max_encoding_message_size = self.max_encoding_message_size; 3256 + let inner = self.inner.clone(); 3257 + let fut = async move { 3258 + let method = SyncSvc(inner); 3259 + let codec = tonic::codec::ProstCodec::default(); 3260 + let mut grpc = tonic::server::Grpc::new(codec) 3261 + .apply_compression_config( 3262 + accept_compression_encodings, 3263 + send_compression_encodings, 3264 + ) 3265 + .apply_max_message_size_config( 3266 + max_decoding_message_size, 3267 + max_encoding_message_size, 3268 + ); 3269 + let res = grpc.unary(method, req).await; 3270 + Ok(res) 3271 + }; 3272 + Box::pin(fut) 3273 + } 3274 + "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks" => { 3275 + #[allow(non_camel_case_types)] 3276 + struct RemoveAllTracksSvc<T: PlaylistService>(pub Arc<T>); 3277 + impl< 3278 + T: PlaylistService, 3279 + > tonic::server::UnaryService<super::RemoveAllTracksRequest> 3280 + for RemoveAllTracksSvc<T> { 3281 + type Response = super::RemoveAllTracksResponse; 3282 + type Future = BoxFuture< 3283 + tonic::Response<Self::Response>, 3284 + tonic::Status, 3285 + >; 3286 + fn call( 3287 + &mut self, 3288 + request: tonic::Request<super::RemoveAllTracksRequest>, 3289 + ) -> Self::Future { 3290 + let inner = Arc::clone(&self.0); 3291 + let fut = async move { 3292 + <T as PlaylistService>::remove_all_tracks(&inner, request) 3293 + .await 3294 + }; 3295 + Box::pin(fut) 3296 + } 3297 + } 3298 + let accept_compression_encodings = self.accept_compression_encodings; 3299 + let send_compression_encodings = self.send_compression_encodings; 3300 + let max_decoding_message_size = self.max_decoding_message_size; 3301 + let max_encoding_message_size = self.max_encoding_message_size; 3302 + let inner = self.inner.clone(); 3303 + let fut = async move { 3304 + let method = RemoveAllTracksSvc(inner); 3305 + let codec = tonic::codec::ProstCodec::default(); 3306 + let mut grpc = tonic::server::Grpc::new(codec) 3307 + .apply_compression_config( 3308 + accept_compression_encodings, 3309 + send_compression_encodings, 3310 + ) 3311 + .apply_max_message_size_config( 3312 + max_decoding_message_size, 3313 + max_encoding_message_size, 3314 + ); 3315 + let res = grpc.unary(method, req).await; 3316 + Ok(res) 3317 + }; 3318 + Box::pin(fut) 3319 + } 3320 + "/rockbox.v1alpha1.PlaylistService/CreatePlaylist" => { 3321 + #[allow(non_camel_case_types)] 3322 + struct CreatePlaylistSvc<T: PlaylistService>(pub Arc<T>); 3323 + impl< 3324 + T: PlaylistService, 3325 + > tonic::server::UnaryService<super::CreatePlaylistRequest> 3326 + for CreatePlaylistSvc<T> { 3327 + type Response = super::CreatePlaylistResponse; 3328 + type Future = BoxFuture< 3329 + tonic::Response<Self::Response>, 3330 + tonic::Status, 3331 + >; 3332 + fn call( 3333 + &mut self, 3334 + request: tonic::Request<super::CreatePlaylistRequest>, 3335 + ) -> Self::Future { 3336 + let inner = Arc::clone(&self.0); 3337 + let fut = async move { 3338 + <T as PlaylistService>::create_playlist(&inner, request) 3339 + .await 3340 + }; 3341 + Box::pin(fut) 3342 + } 3343 + } 3344 + let accept_compression_encodings = self.accept_compression_encodings; 3345 + let send_compression_encodings = self.send_compression_encodings; 3346 + let max_decoding_message_size = self.max_decoding_message_size; 3347 + let max_encoding_message_size = self.max_encoding_message_size; 3348 + let inner = self.inner.clone(); 3349 + let fut = async move { 3350 + let method = CreatePlaylistSvc(inner); 3351 + let codec = tonic::codec::ProstCodec::default(); 3352 + let mut grpc = tonic::server::Grpc::new(codec) 3353 + .apply_compression_config( 3354 + accept_compression_encodings, 3355 + send_compression_encodings, 3356 + ) 3357 + .apply_max_message_size_config( 3358 + max_decoding_message_size, 3359 + max_encoding_message_size, 3360 + ); 3361 + let res = grpc.unary(method, req).await; 3362 + Ok(res) 3363 + }; 3364 + Box::pin(fut) 3365 + } 3366 + "/rockbox.v1alpha1.PlaylistService/InsertTrack" => { 3367 + #[allow(non_camel_case_types)] 3368 + struct InsertTrackSvc<T: PlaylistService>(pub Arc<T>); 3369 + impl< 3370 + T: PlaylistService, 3371 + > tonic::server::UnaryService<super::InsertTrackRequest> 3372 + for InsertTrackSvc<T> { 3373 + type Response = super::InsertTrackResponse; 3374 + type Future = BoxFuture< 3375 + tonic::Response<Self::Response>, 3376 + tonic::Status, 3377 + >; 3378 + fn call( 3379 + &mut self, 3380 + request: tonic::Request<super::InsertTrackRequest>, 3381 + ) -> Self::Future { 3382 + let inner = Arc::clone(&self.0); 3383 + let fut = async move { 3384 + <T as PlaylistService>::insert_track(&inner, request).await 3385 + }; 3386 + Box::pin(fut) 3387 + } 3388 + } 3389 + let accept_compression_encodings = self.accept_compression_encodings; 3390 + let send_compression_encodings = self.send_compression_encodings; 3391 + let max_decoding_message_size = self.max_decoding_message_size; 3392 + let max_encoding_message_size = self.max_encoding_message_size; 3393 + let inner = self.inner.clone(); 3394 + let fut = async move { 3395 + let method = InsertTrackSvc(inner); 3396 + let codec = tonic::codec::ProstCodec::default(); 3397 + let mut grpc = tonic::server::Grpc::new(codec) 3398 + .apply_compression_config( 3399 + accept_compression_encodings, 3400 + send_compression_encodings, 3401 + ) 3402 + .apply_max_message_size_config( 3403 + max_decoding_message_size, 3404 + max_encoding_message_size, 3405 + ); 3406 + let res = grpc.unary(method, req).await; 3407 + Ok(res) 3408 + }; 3409 + Box::pin(fut) 3410 + } 3411 + "/rockbox.v1alpha1.PlaylistService/InsertDirectory" => { 3412 + #[allow(non_camel_case_types)] 3413 + struct InsertDirectorySvc<T: PlaylistService>(pub Arc<T>); 3414 + impl< 3415 + T: PlaylistService, 3416 + > tonic::server::UnaryService<super::InsertDirectoryRequest> 3417 + for InsertDirectorySvc<T> { 3418 + type Response = super::InsertDirectoryResponse; 3419 + type Future = BoxFuture< 3420 + tonic::Response<Self::Response>, 3421 + tonic::Status, 3422 + >; 3423 + fn call( 3424 + &mut self, 3425 + request: tonic::Request<super::InsertDirectoryRequest>, 3426 + ) -> Self::Future { 3427 + let inner = Arc::clone(&self.0); 3428 + let fut = async move { 3429 + <T as PlaylistService>::insert_directory(&inner, request) 3430 + .await 3431 + }; 3432 + Box::pin(fut) 3433 + } 3434 + } 3435 + let accept_compression_encodings = self.accept_compression_encodings; 3436 + let send_compression_encodings = self.send_compression_encodings; 3437 + let max_decoding_message_size = self.max_decoding_message_size; 3438 + let max_encoding_message_size = self.max_encoding_message_size; 3439 + let inner = self.inner.clone(); 3440 + let fut = async move { 3441 + let method = InsertDirectorySvc(inner); 3442 + let codec = tonic::codec::ProstCodec::default(); 3443 + let mut grpc = tonic::server::Grpc::new(codec) 3444 + .apply_compression_config( 3445 + accept_compression_encodings, 3446 + send_compression_encodings, 3447 + ) 3448 + .apply_max_message_size_config( 3449 + max_decoding_message_size, 3450 + max_encoding_message_size, 3451 + ); 3452 + let res = grpc.unary(method, req).await; 3453 + Ok(res) 3454 + }; 3455 + Box::pin(fut) 3456 + } 3457 + "/rockbox.v1alpha1.PlaylistService/InsertPlaylist" => { 3458 + #[allow(non_camel_case_types)] 3459 + struct InsertPlaylistSvc<T: PlaylistService>(pub Arc<T>); 3460 + impl< 3461 + T: PlaylistService, 3462 + > tonic::server::UnaryService<super::InsertPlaylistRequest> 3463 + for InsertPlaylistSvc<T> { 3464 + type Response = super::InsertPlaylistResponse; 3465 + type Future = BoxFuture< 3466 + tonic::Response<Self::Response>, 3467 + tonic::Status, 3468 + >; 3469 + fn call( 3470 + &mut self, 3471 + request: tonic::Request<super::InsertPlaylistRequest>, 3472 + ) -> Self::Future { 3473 + let inner = Arc::clone(&self.0); 3474 + let fut = async move { 3475 + <T as PlaylistService>::insert_playlist(&inner, request) 3476 + .await 3477 + }; 3478 + Box::pin(fut) 3479 + } 3480 + } 3481 + let accept_compression_encodings = self.accept_compression_encodings; 3482 + let send_compression_encodings = self.send_compression_encodings; 3483 + let max_decoding_message_size = self.max_decoding_message_size; 3484 + let max_encoding_message_size = self.max_encoding_message_size; 3485 + let inner = self.inner.clone(); 3486 + let fut = async move { 3487 + let method = InsertPlaylistSvc(inner); 3488 + let codec = tonic::codec::ProstCodec::default(); 3489 + let mut grpc = tonic::server::Grpc::new(codec) 3490 + .apply_compression_config( 3491 + accept_compression_encodings, 3492 + send_compression_encodings, 3493 + ) 3494 + .apply_max_message_size_config( 3495 + max_decoding_message_size, 3496 + max_encoding_message_size, 3497 + ); 3498 + let res = grpc.unary(method, req).await; 3499 + Ok(res) 3500 + }; 3501 + Box::pin(fut) 3502 + } 3503 + "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist" => { 3504 + #[allow(non_camel_case_types)] 3505 + struct ShufflePlaylistSvc<T: PlaylistService>(pub Arc<T>); 3506 + impl< 3507 + T: PlaylistService, 3508 + > tonic::server::UnaryService<super::ShufflePlaylistRequest> 3509 + for ShufflePlaylistSvc<T> { 3510 + type Response = super::ShufflePlaylistResponse; 3511 + type Future = BoxFuture< 3512 + tonic::Response<Self::Response>, 3513 + tonic::Status, 3514 + >; 3515 + fn call( 3516 + &mut self, 3517 + request: tonic::Request<super::ShufflePlaylistRequest>, 3518 + ) -> Self::Future { 3519 + let inner = Arc::clone(&self.0); 3520 + let fut = async move { 3521 + <T as PlaylistService>::shuffle_playlist(&inner, request) 3522 + .await 3523 + }; 3524 + Box::pin(fut) 3525 + } 3526 + } 3527 + let accept_compression_encodings = self.accept_compression_encodings; 3528 + let send_compression_encodings = self.send_compression_encodings; 3529 + let max_decoding_message_size = self.max_decoding_message_size; 3530 + let max_encoding_message_size = self.max_encoding_message_size; 3531 + let inner = self.inner.clone(); 3532 + let fut = async move { 3533 + let method = ShufflePlaylistSvc(inner); 3534 + let codec = tonic::codec::ProstCodec::default(); 3535 + let mut grpc = tonic::server::Grpc::new(codec) 3536 + .apply_compression_config( 3537 + accept_compression_encodings, 3538 + send_compression_encodings, 3539 + ) 3540 + .apply_max_message_size_config( 3541 + max_decoding_message_size, 3542 + max_encoding_message_size, 3543 + ); 3544 + let res = grpc.unary(method, req).await; 3545 + Ok(res) 3546 + }; 3547 + Box::pin(fut) 3548 + } 3549 + "/rockbox.v1alpha1.PlaylistService/WarnOnPlaylistErase" => { 3550 + #[allow(non_camel_case_types)] 3551 + struct WarnOnPlaylistEraseSvc<T: PlaylistService>(pub Arc<T>); 3552 + impl< 3553 + T: PlaylistService, 3554 + > tonic::server::UnaryService<super::WarnOnPlaylistEraseRequest> 3555 + for WarnOnPlaylistEraseSvc<T> { 3556 + type Response = super::WarnOnPlaylistEraseResponse; 3557 + type Future = BoxFuture< 3558 + tonic::Response<Self::Response>, 3559 + tonic::Status, 3560 + >; 3561 + fn call( 3562 + &mut self, 3563 + request: tonic::Request<super::WarnOnPlaylistEraseRequest>, 3564 + ) -> Self::Future { 3565 + let inner = Arc::clone(&self.0); 3566 + let fut = async move { 3567 + <T as PlaylistService>::warn_on_playlist_erase( 3568 + &inner, 3569 + request, 3570 + ) 3571 + .await 3572 + }; 3573 + Box::pin(fut) 3574 + } 3575 + } 3576 + let accept_compression_encodings = self.accept_compression_encodings; 3577 + let send_compression_encodings = self.send_compression_encodings; 3578 + let max_decoding_message_size = self.max_decoding_message_size; 3579 + let max_encoding_message_size = self.max_encoding_message_size; 3580 + let inner = self.inner.clone(); 3581 + let fut = async move { 3582 + let method = WarnOnPlaylistEraseSvc(inner); 3583 + let codec = tonic::codec::ProstCodec::default(); 3584 + let mut grpc = tonic::server::Grpc::new(codec) 3585 + .apply_compression_config( 3586 + accept_compression_encodings, 3587 + send_compression_encodings, 3588 + ) 3589 + .apply_max_message_size_config( 3590 + max_decoding_message_size, 3591 + max_encoding_message_size, 3592 + ); 3593 + let res = grpc.unary(method, req).await; 3594 + Ok(res) 3595 + }; 3596 + Box::pin(fut) 3597 + } 3598 + _ => { 3599 + Box::pin(async move { 3600 + Ok( 3601 + http::Response::builder() 3602 + .status(200) 3603 + .header("grpc-status", tonic::Code::Unimplemented as i32) 3604 + .header( 3605 + http::header::CONTENT_TYPE, 3606 + tonic::metadata::GRPC_CONTENT_TYPE, 3607 + ) 3608 + .body(empty_body()) 3609 + .unwrap(), 3610 + ) 3611 + }) 3612 + } 3613 + } 3614 + } 3615 + } 3616 + impl<T> Clone for PlaylistServiceServer<T> { 3617 + fn clone(&self) -> Self { 3618 + let inner = self.inner.clone(); 3619 + Self { 3620 + inner, 3621 + accept_compression_encodings: self.accept_compression_encodings, 3622 + send_compression_encodings: self.send_compression_encodings, 3623 + max_decoding_message_size: self.max_decoding_message_size, 3624 + max_encoding_message_size: self.max_encoding_message_size, 3625 + } 3626 + } 3627 + } 3628 + /// Generated gRPC service name 3629 + pub const SERVICE_NAME: &str = "rockbox.v1alpha1.PlaylistService"; 3630 + impl<T> tonic::server::NamedService for PlaylistServiceServer<T> { 3631 + const NAME: &'static str = SERVICE_NAME; 3632 + } 3633 + } 3634 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3635 + pub struct GetSettingsListRequest { 3636 + #[prost(int32, tag = "1")] 3637 + pub count: i32, 3638 + } 3639 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3640 + pub struct GetSettingsListResponse {} 3641 + /// Generated client implementations. 3642 + pub mod settings_service_client { 3643 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 3644 + use tonic::codegen::*; 3645 + use tonic::codegen::http::Uri; 3646 + #[derive(Debug, Clone)] 3647 + pub struct SettingsServiceClient<T> { 3648 + inner: tonic::client::Grpc<T>, 3649 + } 3650 + impl SettingsServiceClient<tonic::transport::Channel> { 3651 + /// Attempt to create a new client by connecting to a given endpoint. 3652 + pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> 3653 + where 3654 + D: TryInto<tonic::transport::Endpoint>, 3655 + D::Error: Into<StdError>, 3656 + { 3657 + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; 3658 + Ok(Self::new(conn)) 3659 + } 3660 + } 3661 + impl<T> SettingsServiceClient<T> 3662 + where 3663 + T: tonic::client::GrpcService<tonic::body::BoxBody>, 3664 + T::Error: Into<StdError>, 3665 + T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static, 3666 + <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send, 3667 + { 3668 + pub fn new(inner: T) -> Self { 3669 + let inner = tonic::client::Grpc::new(inner); 3670 + Self { inner } 3671 + } 3672 + pub fn with_origin(inner: T, origin: Uri) -> Self { 3673 + let inner = tonic::client::Grpc::with_origin(inner, origin); 3674 + Self { inner } 3675 + } 3676 + pub fn with_interceptor<F>( 3677 + inner: T, 3678 + interceptor: F, 3679 + ) -> SettingsServiceClient<InterceptedService<T, F>> 3680 + where 3681 + F: tonic::service::Interceptor, 3682 + T::ResponseBody: Default, 3683 + T: tonic::codegen::Service< 3684 + http::Request<tonic::body::BoxBody>, 3685 + Response = http::Response< 3686 + <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 3687 + >, 3688 + >, 3689 + <T as tonic::codegen::Service< 3690 + http::Request<tonic::body::BoxBody>, 3691 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 3692 + { 3693 + SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) 3694 + } 3695 + /// Compress requests with the given encoding. 3696 + /// 3697 + /// This requires the server to support it otherwise it might respond with an 3698 + /// error. 3699 + #[must_use] 3700 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 3701 + self.inner = self.inner.send_compressed(encoding); 3702 + self 3703 + } 3704 + /// Enable decompressing responses. 3705 + #[must_use] 3706 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 3707 + self.inner = self.inner.accept_compressed(encoding); 3708 + self 3709 + } 3710 + /// Limits the maximum size of a decoded message. 3711 + /// 3712 + /// Default: `4MB` 3713 + #[must_use] 3714 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 3715 + self.inner = self.inner.max_decoding_message_size(limit); 3716 + self 3717 + } 3718 + /// Limits the maximum size of an encoded message. 3719 + /// 3720 + /// Default: `usize::MAX` 3721 + #[must_use] 3722 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 3723 + self.inner = self.inner.max_encoding_message_size(limit); 3724 + self 3725 + } 3726 + pub async fn get_settings_list( 3727 + &mut self, 3728 + request: impl tonic::IntoRequest<super::GetSettingsListRequest>, 3729 + ) -> std::result::Result< 3730 + tonic::Response<super::GetSettingsListResponse>, 3731 + tonic::Status, 3732 + > { 3733 + self.inner 3734 + .ready() 3735 + .await 3736 + .map_err(|e| { 3737 + tonic::Status::new( 3738 + tonic::Code::Unknown, 3739 + format!("Service was not ready: {}", e.into()), 3740 + ) 3741 + })?; 3742 + let codec = tonic::codec::ProstCodec::default(); 3743 + let path = http::uri::PathAndQuery::from_static( 3744 + "/rockbox.v1alpha1.SettingsService/GetSettingsList", 3745 + ); 3746 + let mut req = request.into_request(); 3747 + req.extensions_mut() 3748 + .insert( 3749 + GrpcMethod::new( 3750 + "rockbox.v1alpha1.SettingsService", 3751 + "GetSettingsList", 3752 + ), 3753 + ); 3754 + self.inner.unary(req, path, codec).await 3755 + } 3756 + } 3757 + } 3758 + /// Generated server implementations. 3759 + pub mod settings_service_server { 3760 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 3761 + use tonic::codegen::*; 3762 + /// Generated trait containing gRPC methods that should be implemented for use with SettingsServiceServer. 3763 + #[async_trait] 3764 + pub trait SettingsService: std::marker::Send + std::marker::Sync + 'static { 3765 + async fn get_settings_list( 3766 + &self, 3767 + request: tonic::Request<super::GetSettingsListRequest>, 3768 + ) -> std::result::Result< 3769 + tonic::Response<super::GetSettingsListResponse>, 3770 + tonic::Status, 3771 + >; 3772 + } 3773 + #[derive(Debug)] 3774 + pub struct SettingsServiceServer<T> { 3775 + inner: Arc<T>, 3776 + accept_compression_encodings: EnabledCompressionEncodings, 3777 + send_compression_encodings: EnabledCompressionEncodings, 3778 + max_decoding_message_size: Option<usize>, 3779 + max_encoding_message_size: Option<usize>, 3780 + } 3781 + impl<T> SettingsServiceServer<T> { 3782 + pub fn new(inner: T) -> Self { 3783 + Self::from_arc(Arc::new(inner)) 3784 + } 3785 + pub fn from_arc(inner: Arc<T>) -> Self { 3786 + Self { 3787 + inner, 3788 + accept_compression_encodings: Default::default(), 3789 + send_compression_encodings: Default::default(), 3790 + max_decoding_message_size: None, 3791 + max_encoding_message_size: None, 3792 + } 3793 + } 3794 + pub fn with_interceptor<F>( 3795 + inner: T, 3796 + interceptor: F, 3797 + ) -> InterceptedService<Self, F> 3798 + where 3799 + F: tonic::service::Interceptor, 3800 + { 3801 + InterceptedService::new(Self::new(inner), interceptor) 3802 + } 3803 + /// Enable decompressing requests with the given encoding. 3804 + #[must_use] 3805 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 3806 + self.accept_compression_encodings.enable(encoding); 3807 + self 3808 + } 3809 + /// Compress responses with the given encoding, if the client supports it. 3810 + #[must_use] 3811 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 3812 + self.send_compression_encodings.enable(encoding); 3813 + self 3814 + } 3815 + /// Limits the maximum size of a decoded message. 3816 + /// 3817 + /// Default: `4MB` 3818 + #[must_use] 3819 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 3820 + self.max_decoding_message_size = Some(limit); 3821 + self 3822 + } 3823 + /// Limits the maximum size of an encoded message. 3824 + /// 3825 + /// Default: `usize::MAX` 3826 + #[must_use] 3827 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 3828 + self.max_encoding_message_size = Some(limit); 3829 + self 3830 + } 3831 + } 3832 + impl<T, B> tonic::codegen::Service<http::Request<B>> for SettingsServiceServer<T> 3833 + where 3834 + T: SettingsService, 3835 + B: Body + std::marker::Send + 'static, 3836 + B::Error: Into<StdError> + std::marker::Send + 'static, 3837 + { 3838 + type Response = http::Response<tonic::body::BoxBody>; 3839 + type Error = std::convert::Infallible; 3840 + type Future = BoxFuture<Self::Response, Self::Error>; 3841 + fn poll_ready( 3842 + &mut self, 3843 + _cx: &mut Context<'_>, 3844 + ) -> Poll<std::result::Result<(), Self::Error>> { 3845 + Poll::Ready(Ok(())) 3846 + } 3847 + fn call(&mut self, req: http::Request<B>) -> Self::Future { 3848 + match req.uri().path() { 3849 + "/rockbox.v1alpha1.SettingsService/GetSettingsList" => { 3850 + #[allow(non_camel_case_types)] 3851 + struct GetSettingsListSvc<T: SettingsService>(pub Arc<T>); 3852 + impl< 3853 + T: SettingsService, 3854 + > tonic::server::UnaryService<super::GetSettingsListRequest> 3855 + for GetSettingsListSvc<T> { 3856 + type Response = super::GetSettingsListResponse; 3857 + type Future = BoxFuture< 3858 + tonic::Response<Self::Response>, 3859 + tonic::Status, 3860 + >; 3861 + fn call( 3862 + &mut self, 3863 + request: tonic::Request<super::GetSettingsListRequest>, 3864 + ) -> Self::Future { 3865 + let inner = Arc::clone(&self.0); 3866 + let fut = async move { 3867 + <T as SettingsService>::get_settings_list(&inner, request) 3868 + .await 3869 + }; 3870 + Box::pin(fut) 3871 + } 3872 + } 3873 + let accept_compression_encodings = self.accept_compression_encodings; 3874 + let send_compression_encodings = self.send_compression_encodings; 3875 + let max_decoding_message_size = self.max_decoding_message_size; 3876 + let max_encoding_message_size = self.max_encoding_message_size; 3877 + let inner = self.inner.clone(); 3878 + let fut = async move { 3879 + let method = GetSettingsListSvc(inner); 3880 + let codec = tonic::codec::ProstCodec::default(); 3881 + let mut grpc = tonic::server::Grpc::new(codec) 3882 + .apply_compression_config( 3883 + accept_compression_encodings, 3884 + send_compression_encodings, 3885 + ) 3886 + .apply_max_message_size_config( 3887 + max_decoding_message_size, 3888 + max_encoding_message_size, 3889 + ); 3890 + let res = grpc.unary(method, req).await; 3891 + Ok(res) 3892 + }; 3893 + Box::pin(fut) 3894 + } 3895 + _ => { 3896 + Box::pin(async move { 3897 + Ok( 3898 + http::Response::builder() 3899 + .status(200) 3900 + .header("grpc-status", tonic::Code::Unimplemented as i32) 3901 + .header( 3902 + http::header::CONTENT_TYPE, 3903 + tonic::metadata::GRPC_CONTENT_TYPE, 3904 + ) 3905 + .body(empty_body()) 3906 + .unwrap(), 3907 + ) 3908 + }) 3909 + } 3910 + } 3911 + } 3912 + } 3913 + impl<T> Clone for SettingsServiceServer<T> { 3914 + fn clone(&self) -> Self { 3915 + let inner = self.inner.clone(); 3916 + Self { 3917 + inner, 3918 + accept_compression_encodings: self.accept_compression_encodings, 3919 + send_compression_encodings: self.send_compression_encodings, 3920 + max_decoding_message_size: self.max_decoding_message_size, 3921 + max_encoding_message_size: self.max_encoding_message_size, 3922 + } 3923 + } 3924 + } 3925 + /// Generated gRPC service name 3926 + pub const SERVICE_NAME: &str = "rockbox.v1alpha1.SettingsService"; 3927 + impl<T> tonic::server::NamedService for SettingsServiceServer<T> { 3928 + const NAME: &'static str = SERVICE_NAME; 3929 + } 3930 + } 3931 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3932 + pub struct AdjustVolumeRequest { 3933 + #[prost(int32, tag = "1")] 3934 + pub steps: i32, 3935 + } 3936 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3937 + pub struct AdjustVolumeResponse {} 3938 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3939 + pub struct SoundSetRequest { 3940 + #[prost(int32, tag = "1")] 3941 + pub setting: i32, 3942 + #[prost(int32, tag = "2")] 3943 + pub value: i32, 3944 + } 3945 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3946 + pub struct SoundSetResponse {} 3947 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3948 + pub struct SoundCurrentRequest { 3949 + #[prost(int32, tag = "1")] 3950 + pub setting: i32, 3951 + } 3952 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3953 + pub struct SoundCurrentResponse { 3954 + #[prost(int32, tag = "1")] 3955 + pub value: i32, 3956 + } 3957 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3958 + pub struct SoundDefaultRequest { 3959 + #[prost(int32, tag = "1")] 3960 + pub setting: i32, 3961 + } 3962 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3963 + pub struct SoundDefaultResponse { 3964 + #[prost(int32, tag = "1")] 3965 + pub value: i32, 3966 + } 3967 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3968 + pub struct SoundMinRequest { 3969 + #[prost(int32, tag = "1")] 3970 + pub setting: i32, 3971 + } 3972 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3973 + pub struct SoundMinResponse { 3974 + #[prost(int32, tag = "1")] 3975 + pub value: i32, 3976 + } 3977 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3978 + pub struct SoundMaxRequest { 3979 + #[prost(int32, tag = "1")] 3980 + pub setting: i32, 3981 + } 3982 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3983 + pub struct SoundMaxResponse { 3984 + #[prost(int32, tag = "1")] 3985 + pub value: i32, 3986 + } 3987 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3988 + pub struct SoundUnitRequest {} 3989 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3990 + pub struct SoundUnitResponse {} 3991 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3992 + pub struct SoundVal2PhysRequest { 3993 + #[prost(int32, tag = "1")] 3994 + pub setting: i32, 3995 + #[prost(int32, tag = "2")] 3996 + pub value: i32, 3997 + } 3998 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 3999 + pub struct SoundVal2PhysResponse { 4000 + #[prost(int32, tag = "1")] 4001 + pub value: i32, 4002 + } 4003 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4004 + pub struct GetPitchRequest {} 4005 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4006 + pub struct GetPitchResponse { 4007 + #[prost(int32, tag = "1")] 4008 + pub value: i32, 4009 + } 4010 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4011 + pub struct SetPitchRequest { 4012 + #[prost(int32, tag = "1")] 4013 + pub value: i32, 4014 + } 4015 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4016 + pub struct SetPitchResponse {} 4017 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4018 + pub struct BeepPlayRequest { 4019 + #[prost(uint32, tag = "1")] 4020 + pub frequency: u32, 4021 + #[prost(uint32, tag = "2")] 4022 + pub duration: u32, 4023 + #[prost(uint32, tag = "3")] 4024 + pub amplitude: u32, 4025 + } 4026 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4027 + pub struct BeepPlayResponse {} 4028 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4029 + pub struct PcmbufFadeRequest { 4030 + #[prost(int32, tag = "1")] 4031 + pub fade: i32, 4032 + #[prost(bool, tag = "2")] 4033 + pub r#in: bool, 4034 + } 4035 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4036 + pub struct PcmbufFadeResponse {} 4037 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4038 + pub struct PcmbufSetLowLatencyRequest { 4039 + #[prost(bool, tag = "1")] 4040 + pub state: bool, 4041 + } 4042 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4043 + pub struct PcmbufSetLowLatencyResponse {} 4044 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4045 + pub struct SystemSoundPlayRequest { 4046 + #[prost(uint32, tag = "1")] 4047 + pub sound: u32, 4048 + } 4049 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4050 + pub struct SystemSoundPlayResponse {} 4051 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4052 + pub struct KeyclickClickRequest { 4053 + #[prost(bool, tag = "1")] 4054 + pub rawbutton: bool, 4055 + #[prost(int32, tag = "2")] 4056 + pub action: i32, 4057 + } 4058 + #[derive(Clone, Copy, PartialEq, ::prost::Message)] 4059 + pub struct KeyclickClickResponse {} 4060 + /// Generated client implementations. 4061 + pub mod sound_service_client { 4062 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 4063 + use tonic::codegen::*; 4064 + use tonic::codegen::http::Uri; 4065 + #[derive(Debug, Clone)] 4066 + pub struct SoundServiceClient<T> { 4067 + inner: tonic::client::Grpc<T>, 4068 + } 4069 + impl SoundServiceClient<tonic::transport::Channel> { 4070 + /// Attempt to create a new client by connecting to a given endpoint. 4071 + pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> 4072 + where 4073 + D: TryInto<tonic::transport::Endpoint>, 4074 + D::Error: Into<StdError>, 4075 + { 4076 + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; 4077 + Ok(Self::new(conn)) 4078 + } 4079 + } 4080 + impl<T> SoundServiceClient<T> 4081 + where 4082 + T: tonic::client::GrpcService<tonic::body::BoxBody>, 4083 + T::Error: Into<StdError>, 4084 + T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static, 4085 + <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send, 4086 + { 4087 + pub fn new(inner: T) -> Self { 4088 + let inner = tonic::client::Grpc::new(inner); 4089 + Self { inner } 4090 + } 4091 + pub fn with_origin(inner: T, origin: Uri) -> Self { 4092 + let inner = tonic::client::Grpc::with_origin(inner, origin); 4093 + Self { inner } 4094 + } 4095 + pub fn with_interceptor<F>( 4096 + inner: T, 4097 + interceptor: F, 4098 + ) -> SoundServiceClient<InterceptedService<T, F>> 4099 + where 4100 + F: tonic::service::Interceptor, 4101 + T::ResponseBody: Default, 4102 + T: tonic::codegen::Service< 4103 + http::Request<tonic::body::BoxBody>, 4104 + Response = http::Response< 4105 + <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 4106 + >, 4107 + >, 4108 + <T as tonic::codegen::Service< 4109 + http::Request<tonic::body::BoxBody>, 4110 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 4111 + { 4112 + SoundServiceClient::new(InterceptedService::new(inner, interceptor)) 4113 + } 4114 + /// Compress requests with the given encoding. 4115 + /// 4116 + /// This requires the server to support it otherwise it might respond with an 4117 + /// error. 4118 + #[must_use] 4119 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 4120 + self.inner = self.inner.send_compressed(encoding); 4121 + self 4122 + } 4123 + /// Enable decompressing responses. 4124 + #[must_use] 4125 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 4126 + self.inner = self.inner.accept_compressed(encoding); 4127 + self 4128 + } 4129 + /// Limits the maximum size of a decoded message. 4130 + /// 4131 + /// Default: `4MB` 4132 + #[must_use] 4133 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 4134 + self.inner = self.inner.max_decoding_message_size(limit); 4135 + self 4136 + } 4137 + /// Limits the maximum size of an encoded message. 4138 + /// 4139 + /// Default: `usize::MAX` 4140 + #[must_use] 4141 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 4142 + self.inner = self.inner.max_encoding_message_size(limit); 4143 + self 4144 + } 4145 + pub async fn adjust_volume( 4146 + &mut self, 4147 + request: impl tonic::IntoRequest<super::AdjustVolumeRequest>, 4148 + ) -> std::result::Result< 4149 + tonic::Response<super::AdjustVolumeResponse>, 4150 + tonic::Status, 4151 + > { 4152 + self.inner 4153 + .ready() 4154 + .await 4155 + .map_err(|e| { 4156 + tonic::Status::new( 4157 + tonic::Code::Unknown, 4158 + format!("Service was not ready: {}", e.into()), 4159 + ) 4160 + })?; 4161 + let codec = tonic::codec::ProstCodec::default(); 4162 + let path = http::uri::PathAndQuery::from_static( 4163 + "/rockbox.v1alpha1.SoundService/AdjustVolume", 4164 + ); 4165 + let mut req = request.into_request(); 4166 + req.extensions_mut() 4167 + .insert( 4168 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "AdjustVolume"), 4169 + ); 4170 + self.inner.unary(req, path, codec).await 4171 + } 4172 + pub async fn sound_set( 4173 + &mut self, 4174 + request: impl tonic::IntoRequest<super::SoundSetRequest>, 4175 + ) -> std::result::Result< 4176 + tonic::Response<super::SoundSetResponse>, 4177 + tonic::Status, 4178 + > { 4179 + self.inner 4180 + .ready() 4181 + .await 4182 + .map_err(|e| { 4183 + tonic::Status::new( 4184 + tonic::Code::Unknown, 4185 + format!("Service was not ready: {}", e.into()), 4186 + ) 4187 + })?; 4188 + let codec = tonic::codec::ProstCodec::default(); 4189 + let path = http::uri::PathAndQuery::from_static( 4190 + "/rockbox.v1alpha1.SoundService/SoundSet", 4191 + ); 4192 + let mut req = request.into_request(); 4193 + req.extensions_mut() 4194 + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundSet")); 4195 + self.inner.unary(req, path, codec).await 4196 + } 4197 + pub async fn sound_current( 4198 + &mut self, 4199 + request: impl tonic::IntoRequest<super::SoundCurrentRequest>, 4200 + ) -> std::result::Result< 4201 + tonic::Response<super::SoundCurrentResponse>, 4202 + tonic::Status, 4203 + > { 4204 + self.inner 4205 + .ready() 4206 + .await 4207 + .map_err(|e| { 4208 + tonic::Status::new( 4209 + tonic::Code::Unknown, 4210 + format!("Service was not ready: {}", e.into()), 4211 + ) 4212 + })?; 4213 + let codec = tonic::codec::ProstCodec::default(); 4214 + let path = http::uri::PathAndQuery::from_static( 4215 + "/rockbox.v1alpha1.SoundService/SoundCurrent", 4216 + ); 4217 + let mut req = request.into_request(); 4218 + req.extensions_mut() 4219 + .insert( 4220 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundCurrent"), 4221 + ); 4222 + self.inner.unary(req, path, codec).await 4223 + } 4224 + pub async fn sound_default( 4225 + &mut self, 4226 + request: impl tonic::IntoRequest<super::SoundDefaultRequest>, 4227 + ) -> std::result::Result< 4228 + tonic::Response<super::SoundDefaultResponse>, 4229 + tonic::Status, 4230 + > { 4231 + self.inner 4232 + .ready() 4233 + .await 4234 + .map_err(|e| { 4235 + tonic::Status::new( 4236 + tonic::Code::Unknown, 4237 + format!("Service was not ready: {}", e.into()), 4238 + ) 4239 + })?; 4240 + let codec = tonic::codec::ProstCodec::default(); 4241 + let path = http::uri::PathAndQuery::from_static( 4242 + "/rockbox.v1alpha1.SoundService/SoundDefault", 4243 + ); 4244 + let mut req = request.into_request(); 4245 + req.extensions_mut() 4246 + .insert( 4247 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundDefault"), 4248 + ); 4249 + self.inner.unary(req, path, codec).await 4250 + } 4251 + pub async fn sound_min( 4252 + &mut self, 4253 + request: impl tonic::IntoRequest<super::SoundMinRequest>, 4254 + ) -> std::result::Result< 4255 + tonic::Response<super::SoundMinResponse>, 4256 + tonic::Status, 4257 + > { 4258 + self.inner 4259 + .ready() 4260 + .await 4261 + .map_err(|e| { 4262 + tonic::Status::new( 4263 + tonic::Code::Unknown, 4264 + format!("Service was not ready: {}", e.into()), 4265 + ) 4266 + })?; 4267 + let codec = tonic::codec::ProstCodec::default(); 4268 + let path = http::uri::PathAndQuery::from_static( 4269 + "/rockbox.v1alpha1.SoundService/SoundMin", 4270 + ); 4271 + let mut req = request.into_request(); 4272 + req.extensions_mut() 4273 + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMin")); 4274 + self.inner.unary(req, path, codec).await 4275 + } 4276 + pub async fn sound_max( 4277 + &mut self, 4278 + request: impl tonic::IntoRequest<super::SoundMaxRequest>, 4279 + ) -> std::result::Result< 4280 + tonic::Response<super::SoundMaxResponse>, 4281 + tonic::Status, 4282 + > { 4283 + self.inner 4284 + .ready() 4285 + .await 4286 + .map_err(|e| { 4287 + tonic::Status::new( 4288 + tonic::Code::Unknown, 4289 + format!("Service was not ready: {}", e.into()), 4290 + ) 4291 + })?; 4292 + let codec = tonic::codec::ProstCodec::default(); 4293 + let path = http::uri::PathAndQuery::from_static( 4294 + "/rockbox.v1alpha1.SoundService/SoundMax", 4295 + ); 4296 + let mut req = request.into_request(); 4297 + req.extensions_mut() 4298 + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMax")); 4299 + self.inner.unary(req, path, codec).await 4300 + } 4301 + pub async fn sound_unit( 4302 + &mut self, 4303 + request: impl tonic::IntoRequest<super::SoundUnitRequest>, 4304 + ) -> std::result::Result< 4305 + tonic::Response<super::SoundUnitResponse>, 4306 + tonic::Status, 4307 + > { 4308 + self.inner 4309 + .ready() 4310 + .await 4311 + .map_err(|e| { 4312 + tonic::Status::new( 4313 + tonic::Code::Unknown, 4314 + format!("Service was not ready: {}", e.into()), 4315 + ) 4316 + })?; 4317 + let codec = tonic::codec::ProstCodec::default(); 4318 + let path = http::uri::PathAndQuery::from_static( 4319 + "/rockbox.v1alpha1.SoundService/SoundUnit", 4320 + ); 4321 + let mut req = request.into_request(); 4322 + req.extensions_mut() 4323 + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundUnit")); 4324 + self.inner.unary(req, path, codec).await 4325 + } 4326 + pub async fn sound_val2_phys( 4327 + &mut self, 4328 + request: impl tonic::IntoRequest<super::SoundVal2PhysRequest>, 4329 + ) -> std::result::Result< 4330 + tonic::Response<super::SoundVal2PhysResponse>, 4331 + tonic::Status, 4332 + > { 4333 + self.inner 4334 + .ready() 4335 + .await 4336 + .map_err(|e| { 4337 + tonic::Status::new( 4338 + tonic::Code::Unknown, 4339 + format!("Service was not ready: {}", e.into()), 4340 + ) 4341 + })?; 4342 + let codec = tonic::codec::ProstCodec::default(); 4343 + let path = http::uri::PathAndQuery::from_static( 4344 + "/rockbox.v1alpha1.SoundService/SoundVal2Phys", 4345 + ); 4346 + let mut req = request.into_request(); 4347 + req.extensions_mut() 4348 + .insert( 4349 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundVal2Phys"), 4350 + ); 4351 + self.inner.unary(req, path, codec).await 4352 + } 4353 + pub async fn get_pitch( 4354 + &mut self, 4355 + request: impl tonic::IntoRequest<super::GetPitchRequest>, 4356 + ) -> std::result::Result< 4357 + tonic::Response<super::GetPitchResponse>, 4358 + tonic::Status, 4359 + > { 4360 + self.inner 4361 + .ready() 4362 + .await 4363 + .map_err(|e| { 4364 + tonic::Status::new( 4365 + tonic::Code::Unknown, 4366 + format!("Service was not ready: {}", e.into()), 4367 + ) 4368 + })?; 4369 + let codec = tonic::codec::ProstCodec::default(); 4370 + let path = http::uri::PathAndQuery::from_static( 4371 + "/rockbox.v1alpha1.SoundService/GetPitch", 4372 + ); 4373 + let mut req = request.into_request(); 4374 + req.extensions_mut() 4375 + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "GetPitch")); 4376 + self.inner.unary(req, path, codec).await 4377 + } 4378 + pub async fn set_pitch( 4379 + &mut self, 4380 + request: impl tonic::IntoRequest<super::SetPitchRequest>, 4381 + ) -> std::result::Result< 4382 + tonic::Response<super::SetPitchResponse>, 4383 + tonic::Status, 4384 + > { 4385 + self.inner 4386 + .ready() 4387 + .await 4388 + .map_err(|e| { 4389 + tonic::Status::new( 4390 + tonic::Code::Unknown, 4391 + format!("Service was not ready: {}", e.into()), 4392 + ) 4393 + })?; 4394 + let codec = tonic::codec::ProstCodec::default(); 4395 + let path = http::uri::PathAndQuery::from_static( 4396 + "/rockbox.v1alpha1.SoundService/SetPitch", 4397 + ); 4398 + let mut req = request.into_request(); 4399 + req.extensions_mut() 4400 + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SetPitch")); 4401 + self.inner.unary(req, path, codec).await 4402 + } 4403 + pub async fn beep_play( 4404 + &mut self, 4405 + request: impl tonic::IntoRequest<super::BeepPlayRequest>, 4406 + ) -> std::result::Result< 4407 + tonic::Response<super::BeepPlayResponse>, 4408 + tonic::Status, 4409 + > { 4410 + self.inner 4411 + .ready() 4412 + .await 4413 + .map_err(|e| { 4414 + tonic::Status::new( 4415 + tonic::Code::Unknown, 4416 + format!("Service was not ready: {}", e.into()), 4417 + ) 4418 + })?; 4419 + let codec = tonic::codec::ProstCodec::default(); 4420 + let path = http::uri::PathAndQuery::from_static( 4421 + "/rockbox.v1alpha1.SoundService/BeepPlay", 4422 + ); 4423 + let mut req = request.into_request(); 4424 + req.extensions_mut() 4425 + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "BeepPlay")); 4426 + self.inner.unary(req, path, codec).await 4427 + } 4428 + pub async fn pcmbuf_fade( 4429 + &mut self, 4430 + request: impl tonic::IntoRequest<super::PcmbufFadeRequest>, 4431 + ) -> std::result::Result< 4432 + tonic::Response<super::PcmbufFadeResponse>, 4433 + tonic::Status, 4434 + > { 4435 + self.inner 4436 + .ready() 4437 + .await 4438 + .map_err(|e| { 4439 + tonic::Status::new( 4440 + tonic::Code::Unknown, 4441 + format!("Service was not ready: {}", e.into()), 4442 + ) 4443 + })?; 4444 + let codec = tonic::codec::ProstCodec::default(); 4445 + let path = http::uri::PathAndQuery::from_static( 4446 + "/rockbox.v1alpha1.SoundService/PcmbufFade", 4447 + ); 4448 + let mut req = request.into_request(); 4449 + req.extensions_mut() 4450 + .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "PcmbufFade")); 4451 + self.inner.unary(req, path, codec).await 4452 + } 4453 + pub async fn pcmbuf_set_low_latency( 4454 + &mut self, 4455 + request: impl tonic::IntoRequest<super::PcmbufSetLowLatencyRequest>, 4456 + ) -> std::result::Result< 4457 + tonic::Response<super::PcmbufSetLowLatencyResponse>, 4458 + tonic::Status, 4459 + > { 4460 + self.inner 4461 + .ready() 4462 + .await 4463 + .map_err(|e| { 4464 + tonic::Status::new( 4465 + tonic::Code::Unknown, 4466 + format!("Service was not ready: {}", e.into()), 4467 + ) 4468 + })?; 4469 + let codec = tonic::codec::ProstCodec::default(); 4470 + let path = http::uri::PathAndQuery::from_static( 4471 + "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency", 4472 + ); 4473 + let mut req = request.into_request(); 4474 + req.extensions_mut() 4475 + .insert( 4476 + GrpcMethod::new( 4477 + "rockbox.v1alpha1.SoundService", 4478 + "PcmbufSetLowLatency", 4479 + ), 4480 + ); 4481 + self.inner.unary(req, path, codec).await 4482 + } 4483 + pub async fn system_sound_play( 4484 + &mut self, 4485 + request: impl tonic::IntoRequest<super::SystemSoundPlayRequest>, 4486 + ) -> std::result::Result< 4487 + tonic::Response<super::SystemSoundPlayResponse>, 4488 + tonic::Status, 4489 + > { 4490 + self.inner 4491 + .ready() 4492 + .await 4493 + .map_err(|e| { 4494 + tonic::Status::new( 4495 + tonic::Code::Unknown, 4496 + format!("Service was not ready: {}", e.into()), 4497 + ) 4498 + })?; 4499 + let codec = tonic::codec::ProstCodec::default(); 4500 + let path = http::uri::PathAndQuery::from_static( 4501 + "/rockbox.v1alpha1.SoundService/SystemSoundPlay", 4502 + ); 4503 + let mut req = request.into_request(); 4504 + req.extensions_mut() 4505 + .insert( 4506 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "SystemSoundPlay"), 4507 + ); 4508 + self.inner.unary(req, path, codec).await 4509 + } 4510 + pub async fn keyclick_click( 4511 + &mut self, 4512 + request: impl tonic::IntoRequest<super::KeyclickClickRequest>, 4513 + ) -> std::result::Result< 4514 + tonic::Response<super::KeyclickClickResponse>, 4515 + tonic::Status, 4516 + > { 4517 + self.inner 4518 + .ready() 4519 + .await 4520 + .map_err(|e| { 4521 + tonic::Status::new( 4522 + tonic::Code::Unknown, 4523 + format!("Service was not ready: {}", e.into()), 4524 + ) 4525 + })?; 4526 + let codec = tonic::codec::ProstCodec::default(); 4527 + let path = http::uri::PathAndQuery::from_static( 4528 + "/rockbox.v1alpha1.SoundService/KeyclickClick", 4529 + ); 4530 + let mut req = request.into_request(); 4531 + req.extensions_mut() 4532 + .insert( 4533 + GrpcMethod::new("rockbox.v1alpha1.SoundService", "KeyclickClick"), 4534 + ); 4535 + self.inner.unary(req, path, codec).await 4536 + } 4537 + } 4538 + } 4539 + /// Generated server implementations. 4540 + pub mod sound_service_server { 4541 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 4542 + use tonic::codegen::*; 4543 + /// Generated trait containing gRPC methods that should be implemented for use with SoundServiceServer. 4544 + #[async_trait] 4545 + pub trait SoundService: std::marker::Send + std::marker::Sync + 'static { 4546 + async fn adjust_volume( 4547 + &self, 4548 + request: tonic::Request<super::AdjustVolumeRequest>, 4549 + ) -> std::result::Result< 4550 + tonic::Response<super::AdjustVolumeResponse>, 4551 + tonic::Status, 4552 + >; 4553 + async fn sound_set( 4554 + &self, 4555 + request: tonic::Request<super::SoundSetRequest>, 4556 + ) -> std::result::Result< 4557 + tonic::Response<super::SoundSetResponse>, 4558 + tonic::Status, 4559 + >; 4560 + async fn sound_current( 4561 + &self, 4562 + request: tonic::Request<super::SoundCurrentRequest>, 4563 + ) -> std::result::Result< 4564 + tonic::Response<super::SoundCurrentResponse>, 4565 + tonic::Status, 4566 + >; 4567 + async fn sound_default( 4568 + &self, 4569 + request: tonic::Request<super::SoundDefaultRequest>, 4570 + ) -> std::result::Result< 4571 + tonic::Response<super::SoundDefaultResponse>, 4572 + tonic::Status, 4573 + >; 4574 + async fn sound_min( 4575 + &self, 4576 + request: tonic::Request<super::SoundMinRequest>, 4577 + ) -> std::result::Result< 4578 + tonic::Response<super::SoundMinResponse>, 4579 + tonic::Status, 4580 + >; 4581 + async fn sound_max( 4582 + &self, 4583 + request: tonic::Request<super::SoundMaxRequest>, 4584 + ) -> std::result::Result< 4585 + tonic::Response<super::SoundMaxResponse>, 4586 + tonic::Status, 4587 + >; 4588 + async fn sound_unit( 4589 + &self, 4590 + request: tonic::Request<super::SoundUnitRequest>, 4591 + ) -> std::result::Result< 4592 + tonic::Response<super::SoundUnitResponse>, 4593 + tonic::Status, 4594 + >; 4595 + async fn sound_val2_phys( 4596 + &self, 4597 + request: tonic::Request<super::SoundVal2PhysRequest>, 4598 + ) -> std::result::Result< 4599 + tonic::Response<super::SoundVal2PhysResponse>, 4600 + tonic::Status, 4601 + >; 4602 + async fn get_pitch( 4603 + &self, 4604 + request: tonic::Request<super::GetPitchRequest>, 4605 + ) -> std::result::Result< 4606 + tonic::Response<super::GetPitchResponse>, 4607 + tonic::Status, 4608 + >; 4609 + async fn set_pitch( 4610 + &self, 4611 + request: tonic::Request<super::SetPitchRequest>, 4612 + ) -> std::result::Result< 4613 + tonic::Response<super::SetPitchResponse>, 4614 + tonic::Status, 4615 + >; 4616 + async fn beep_play( 4617 + &self, 4618 + request: tonic::Request<super::BeepPlayRequest>, 4619 + ) -> std::result::Result< 4620 + tonic::Response<super::BeepPlayResponse>, 4621 + tonic::Status, 4622 + >; 4623 + async fn pcmbuf_fade( 4624 + &self, 4625 + request: tonic::Request<super::PcmbufFadeRequest>, 4626 + ) -> std::result::Result< 4627 + tonic::Response<super::PcmbufFadeResponse>, 4628 + tonic::Status, 4629 + >; 4630 + async fn pcmbuf_set_low_latency( 4631 + &self, 4632 + request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 4633 + ) -> std::result::Result< 4634 + tonic::Response<super::PcmbufSetLowLatencyResponse>, 4635 + tonic::Status, 4636 + >; 4637 + async fn system_sound_play( 4638 + &self, 4639 + request: tonic::Request<super::SystemSoundPlayRequest>, 4640 + ) -> std::result::Result< 4641 + tonic::Response<super::SystemSoundPlayResponse>, 4642 + tonic::Status, 4643 + >; 4644 + async fn keyclick_click( 4645 + &self, 4646 + request: tonic::Request<super::KeyclickClickRequest>, 4647 + ) -> std::result::Result< 4648 + tonic::Response<super::KeyclickClickResponse>, 4649 + tonic::Status, 4650 + >; 4651 + } 4652 + #[derive(Debug)] 4653 + pub struct SoundServiceServer<T> { 4654 + inner: Arc<T>, 4655 + accept_compression_encodings: EnabledCompressionEncodings, 4656 + send_compression_encodings: EnabledCompressionEncodings, 4657 + max_decoding_message_size: Option<usize>, 4658 + max_encoding_message_size: Option<usize>, 4659 + } 4660 + impl<T> SoundServiceServer<T> { 4661 + pub fn new(inner: T) -> Self { 4662 + Self::from_arc(Arc::new(inner)) 4663 + } 4664 + pub fn from_arc(inner: Arc<T>) -> Self { 4665 + Self { 4666 + inner, 4667 + accept_compression_encodings: Default::default(), 4668 + send_compression_encodings: Default::default(), 4669 + max_decoding_message_size: None, 4670 + max_encoding_message_size: None, 4671 + } 4672 + } 4673 + pub fn with_interceptor<F>( 4674 + inner: T, 4675 + interceptor: F, 4676 + ) -> InterceptedService<Self, F> 4677 + where 4678 + F: tonic::service::Interceptor, 4679 + { 4680 + InterceptedService::new(Self::new(inner), interceptor) 4681 + } 4682 + /// Enable decompressing requests with the given encoding. 4683 + #[must_use] 4684 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 4685 + self.accept_compression_encodings.enable(encoding); 4686 + self 4687 + } 4688 + /// Compress responses with the given encoding, if the client supports it. 4689 + #[must_use] 4690 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 4691 + self.send_compression_encodings.enable(encoding); 4692 + self 4693 + } 4694 + /// Limits the maximum size of a decoded message. 4695 + /// 4696 + /// Default: `4MB` 4697 + #[must_use] 4698 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 4699 + self.max_decoding_message_size = Some(limit); 4700 + self 4701 + } 4702 + /// Limits the maximum size of an encoded message. 4703 + /// 4704 + /// Default: `usize::MAX` 4705 + #[must_use] 4706 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 4707 + self.max_encoding_message_size = Some(limit); 4708 + self 4709 + } 4710 + } 4711 + impl<T, B> tonic::codegen::Service<http::Request<B>> for SoundServiceServer<T> 4712 + where 4713 + T: SoundService, 4714 + B: Body + std::marker::Send + 'static, 4715 + B::Error: Into<StdError> + std::marker::Send + 'static, 4716 + { 4717 + type Response = http::Response<tonic::body::BoxBody>; 4718 + type Error = std::convert::Infallible; 4719 + type Future = BoxFuture<Self::Response, Self::Error>; 4720 + fn poll_ready( 4721 + &mut self, 4722 + _cx: &mut Context<'_>, 4723 + ) -> Poll<std::result::Result<(), Self::Error>> { 4724 + Poll::Ready(Ok(())) 4725 + } 4726 + fn call(&mut self, req: http::Request<B>) -> Self::Future { 4727 + match req.uri().path() { 4728 + "/rockbox.v1alpha1.SoundService/AdjustVolume" => { 4729 + #[allow(non_camel_case_types)] 4730 + struct AdjustVolumeSvc<T: SoundService>(pub Arc<T>); 4731 + impl< 4732 + T: SoundService, 4733 + > tonic::server::UnaryService<super::AdjustVolumeRequest> 4734 + for AdjustVolumeSvc<T> { 4735 + type Response = super::AdjustVolumeResponse; 4736 + type Future = BoxFuture< 4737 + tonic::Response<Self::Response>, 4738 + tonic::Status, 4739 + >; 4740 + fn call( 4741 + &mut self, 4742 + request: tonic::Request<super::AdjustVolumeRequest>, 4743 + ) -> Self::Future { 4744 + let inner = Arc::clone(&self.0); 4745 + let fut = async move { 4746 + <T as SoundService>::adjust_volume(&inner, request).await 4747 + }; 4748 + Box::pin(fut) 4749 + } 4750 + } 4751 + let accept_compression_encodings = self.accept_compression_encodings; 4752 + let send_compression_encodings = self.send_compression_encodings; 4753 + let max_decoding_message_size = self.max_decoding_message_size; 4754 + let max_encoding_message_size = self.max_encoding_message_size; 4755 + let inner = self.inner.clone(); 4756 + let fut = async move { 4757 + let method = AdjustVolumeSvc(inner); 4758 + let codec = tonic::codec::ProstCodec::default(); 4759 + let mut grpc = tonic::server::Grpc::new(codec) 4760 + .apply_compression_config( 4761 + accept_compression_encodings, 4762 + send_compression_encodings, 4763 + ) 4764 + .apply_max_message_size_config( 4765 + max_decoding_message_size, 4766 + max_encoding_message_size, 4767 + ); 4768 + let res = grpc.unary(method, req).await; 4769 + Ok(res) 4770 + }; 4771 + Box::pin(fut) 4772 + } 4773 + "/rockbox.v1alpha1.SoundService/SoundSet" => { 4774 + #[allow(non_camel_case_types)] 4775 + struct SoundSetSvc<T: SoundService>(pub Arc<T>); 4776 + impl< 4777 + T: SoundService, 4778 + > tonic::server::UnaryService<super::SoundSetRequest> 4779 + for SoundSetSvc<T> { 4780 + type Response = super::SoundSetResponse; 4781 + type Future = BoxFuture< 4782 + tonic::Response<Self::Response>, 4783 + tonic::Status, 4784 + >; 4785 + fn call( 4786 + &mut self, 4787 + request: tonic::Request<super::SoundSetRequest>, 4788 + ) -> Self::Future { 4789 + let inner = Arc::clone(&self.0); 4790 + let fut = async move { 4791 + <T as SoundService>::sound_set(&inner, request).await 4792 + }; 4793 + Box::pin(fut) 4794 + } 4795 + } 4796 + let accept_compression_encodings = self.accept_compression_encodings; 4797 + let send_compression_encodings = self.send_compression_encodings; 4798 + let max_decoding_message_size = self.max_decoding_message_size; 4799 + let max_encoding_message_size = self.max_encoding_message_size; 4800 + let inner = self.inner.clone(); 4801 + let fut = async move { 4802 + let method = SoundSetSvc(inner); 4803 + let codec = tonic::codec::ProstCodec::default(); 4804 + let mut grpc = tonic::server::Grpc::new(codec) 4805 + .apply_compression_config( 4806 + accept_compression_encodings, 4807 + send_compression_encodings, 4808 + ) 4809 + .apply_max_message_size_config( 4810 + max_decoding_message_size, 4811 + max_encoding_message_size, 4812 + ); 4813 + let res = grpc.unary(method, req).await; 4814 + Ok(res) 4815 + }; 4816 + Box::pin(fut) 4817 + } 4818 + "/rockbox.v1alpha1.SoundService/SoundCurrent" => { 4819 + #[allow(non_camel_case_types)] 4820 + struct SoundCurrentSvc<T: SoundService>(pub Arc<T>); 4821 + impl< 4822 + T: SoundService, 4823 + > tonic::server::UnaryService<super::SoundCurrentRequest> 4824 + for SoundCurrentSvc<T> { 4825 + type Response = super::SoundCurrentResponse; 4826 + type Future = BoxFuture< 4827 + tonic::Response<Self::Response>, 4828 + tonic::Status, 4829 + >; 4830 + fn call( 4831 + &mut self, 4832 + request: tonic::Request<super::SoundCurrentRequest>, 4833 + ) -> Self::Future { 4834 + let inner = Arc::clone(&self.0); 4835 + let fut = async move { 4836 + <T as SoundService>::sound_current(&inner, request).await 4837 + }; 4838 + Box::pin(fut) 4839 + } 4840 + } 4841 + let accept_compression_encodings = self.accept_compression_encodings; 4842 + let send_compression_encodings = self.send_compression_encodings; 4843 + let max_decoding_message_size = self.max_decoding_message_size; 4844 + let max_encoding_message_size = self.max_encoding_message_size; 4845 + let inner = self.inner.clone(); 4846 + let fut = async move { 4847 + let method = SoundCurrentSvc(inner); 4848 + let codec = tonic::codec::ProstCodec::default(); 4849 + let mut grpc = tonic::server::Grpc::new(codec) 4850 + .apply_compression_config( 4851 + accept_compression_encodings, 4852 + send_compression_encodings, 4853 + ) 4854 + .apply_max_message_size_config( 4855 + max_decoding_message_size, 4856 + max_encoding_message_size, 4857 + ); 4858 + let res = grpc.unary(method, req).await; 4859 + Ok(res) 4860 + }; 4861 + Box::pin(fut) 4862 + } 4863 + "/rockbox.v1alpha1.SoundService/SoundDefault" => { 4864 + #[allow(non_camel_case_types)] 4865 + struct SoundDefaultSvc<T: SoundService>(pub Arc<T>); 4866 + impl< 4867 + T: SoundService, 4868 + > tonic::server::UnaryService<super::SoundDefaultRequest> 4869 + for SoundDefaultSvc<T> { 4870 + type Response = super::SoundDefaultResponse; 4871 + type Future = BoxFuture< 4872 + tonic::Response<Self::Response>, 4873 + tonic::Status, 4874 + >; 4875 + fn call( 4876 + &mut self, 4877 + request: tonic::Request<super::SoundDefaultRequest>, 4878 + ) -> Self::Future { 4879 + let inner = Arc::clone(&self.0); 4880 + let fut = async move { 4881 + <T as SoundService>::sound_default(&inner, request).await 4882 + }; 4883 + Box::pin(fut) 4884 + } 4885 + } 4886 + let accept_compression_encodings = self.accept_compression_encodings; 4887 + let send_compression_encodings = self.send_compression_encodings; 4888 + let max_decoding_message_size = self.max_decoding_message_size; 4889 + let max_encoding_message_size = self.max_encoding_message_size; 4890 + let inner = self.inner.clone(); 4891 + let fut = async move { 4892 + let method = SoundDefaultSvc(inner); 4893 + let codec = tonic::codec::ProstCodec::default(); 4894 + let mut grpc = tonic::server::Grpc::new(codec) 4895 + .apply_compression_config( 4896 + accept_compression_encodings, 4897 + send_compression_encodings, 4898 + ) 4899 + .apply_max_message_size_config( 4900 + max_decoding_message_size, 4901 + max_encoding_message_size, 4902 + ); 4903 + let res = grpc.unary(method, req).await; 4904 + Ok(res) 4905 + }; 4906 + Box::pin(fut) 4907 + } 4908 + "/rockbox.v1alpha1.SoundService/SoundMin" => { 4909 + #[allow(non_camel_case_types)] 4910 + struct SoundMinSvc<T: SoundService>(pub Arc<T>); 4911 + impl< 4912 + T: SoundService, 4913 + > tonic::server::UnaryService<super::SoundMinRequest> 4914 + for SoundMinSvc<T> { 4915 + type Response = super::SoundMinResponse; 4916 + type Future = BoxFuture< 4917 + tonic::Response<Self::Response>, 4918 + tonic::Status, 4919 + >; 4920 + fn call( 4921 + &mut self, 4922 + request: tonic::Request<super::SoundMinRequest>, 4923 + ) -> Self::Future { 4924 + let inner = Arc::clone(&self.0); 4925 + let fut = async move { 4926 + <T as SoundService>::sound_min(&inner, request).await 4927 + }; 4928 + Box::pin(fut) 4929 + } 4930 + } 4931 + let accept_compression_encodings = self.accept_compression_encodings; 4932 + let send_compression_encodings = self.send_compression_encodings; 4933 + let max_decoding_message_size = self.max_decoding_message_size; 4934 + let max_encoding_message_size = self.max_encoding_message_size; 4935 + let inner = self.inner.clone(); 4936 + let fut = async move { 4937 + let method = SoundMinSvc(inner); 4938 + let codec = tonic::codec::ProstCodec::default(); 4939 + let mut grpc = tonic::server::Grpc::new(codec) 4940 + .apply_compression_config( 4941 + accept_compression_encodings, 4942 + send_compression_encodings, 4943 + ) 4944 + .apply_max_message_size_config( 4945 + max_decoding_message_size, 4946 + max_encoding_message_size, 4947 + ); 4948 + let res = grpc.unary(method, req).await; 4949 + Ok(res) 4950 + }; 4951 + Box::pin(fut) 4952 + } 4953 + "/rockbox.v1alpha1.SoundService/SoundMax" => { 4954 + #[allow(non_camel_case_types)] 4955 + struct SoundMaxSvc<T: SoundService>(pub Arc<T>); 4956 + impl< 4957 + T: SoundService, 4958 + > tonic::server::UnaryService<super::SoundMaxRequest> 4959 + for SoundMaxSvc<T> { 4960 + type Response = super::SoundMaxResponse; 4961 + type Future = BoxFuture< 4962 + tonic::Response<Self::Response>, 4963 + tonic::Status, 4964 + >; 4965 + fn call( 4966 + &mut self, 4967 + request: tonic::Request<super::SoundMaxRequest>, 4968 + ) -> Self::Future { 4969 + let inner = Arc::clone(&self.0); 4970 + let fut = async move { 4971 + <T as SoundService>::sound_max(&inner, request).await 4972 + }; 4973 + Box::pin(fut) 4974 + } 4975 + } 4976 + let accept_compression_encodings = self.accept_compression_encodings; 4977 + let send_compression_encodings = self.send_compression_encodings; 4978 + let max_decoding_message_size = self.max_decoding_message_size; 4979 + let max_encoding_message_size = self.max_encoding_message_size; 4980 + let inner = self.inner.clone(); 4981 + let fut = async move { 4982 + let method = SoundMaxSvc(inner); 4983 + let codec = tonic::codec::ProstCodec::default(); 4984 + let mut grpc = tonic::server::Grpc::new(codec) 4985 + .apply_compression_config( 4986 + accept_compression_encodings, 4987 + send_compression_encodings, 4988 + ) 4989 + .apply_max_message_size_config( 4990 + max_decoding_message_size, 4991 + max_encoding_message_size, 4992 + ); 4993 + let res = grpc.unary(method, req).await; 4994 + Ok(res) 4995 + }; 4996 + Box::pin(fut) 4997 + } 4998 + "/rockbox.v1alpha1.SoundService/SoundUnit" => { 4999 + #[allow(non_camel_case_types)] 5000 + struct SoundUnitSvc<T: SoundService>(pub Arc<T>); 5001 + impl< 5002 + T: SoundService, 5003 + > tonic::server::UnaryService<super::SoundUnitRequest> 5004 + for SoundUnitSvc<T> { 5005 + type Response = super::SoundUnitResponse; 5006 + type Future = BoxFuture< 5007 + tonic::Response<Self::Response>, 5008 + tonic::Status, 5009 + >; 5010 + fn call( 5011 + &mut self, 5012 + request: tonic::Request<super::SoundUnitRequest>, 5013 + ) -> Self::Future { 5014 + let inner = Arc::clone(&self.0); 5015 + let fut = async move { 5016 + <T as SoundService>::sound_unit(&inner, request).await 5017 + }; 5018 + Box::pin(fut) 5019 + } 5020 + } 5021 + let accept_compression_encodings = self.accept_compression_encodings; 5022 + let send_compression_encodings = self.send_compression_encodings; 5023 + let max_decoding_message_size = self.max_decoding_message_size; 5024 + let max_encoding_message_size = self.max_encoding_message_size; 5025 + let inner = self.inner.clone(); 5026 + let fut = async move { 5027 + let method = SoundUnitSvc(inner); 5028 + let codec = tonic::codec::ProstCodec::default(); 5029 + let mut grpc = tonic::server::Grpc::new(codec) 5030 + .apply_compression_config( 5031 + accept_compression_encodings, 5032 + send_compression_encodings, 5033 + ) 5034 + .apply_max_message_size_config( 5035 + max_decoding_message_size, 5036 + max_encoding_message_size, 5037 + ); 5038 + let res = grpc.unary(method, req).await; 5039 + Ok(res) 5040 + }; 5041 + Box::pin(fut) 5042 + } 5043 + "/rockbox.v1alpha1.SoundService/SoundVal2Phys" => { 5044 + #[allow(non_camel_case_types)] 5045 + struct SoundVal2PhysSvc<T: SoundService>(pub Arc<T>); 5046 + impl< 5047 + T: SoundService, 5048 + > tonic::server::UnaryService<super::SoundVal2PhysRequest> 5049 + for SoundVal2PhysSvc<T> { 5050 + type Response = super::SoundVal2PhysResponse; 5051 + type Future = BoxFuture< 5052 + tonic::Response<Self::Response>, 5053 + tonic::Status, 5054 + >; 5055 + fn call( 5056 + &mut self, 5057 + request: tonic::Request<super::SoundVal2PhysRequest>, 5058 + ) -> Self::Future { 5059 + let inner = Arc::clone(&self.0); 5060 + let fut = async move { 5061 + <T as SoundService>::sound_val2_phys(&inner, request).await 5062 + }; 5063 + Box::pin(fut) 5064 + } 5065 + } 5066 + let accept_compression_encodings = self.accept_compression_encodings; 5067 + let send_compression_encodings = self.send_compression_encodings; 5068 + let max_decoding_message_size = self.max_decoding_message_size; 5069 + let max_encoding_message_size = self.max_encoding_message_size; 5070 + let inner = self.inner.clone(); 5071 + let fut = async move { 5072 + let method = SoundVal2PhysSvc(inner); 5073 + let codec = tonic::codec::ProstCodec::default(); 5074 + let mut grpc = tonic::server::Grpc::new(codec) 5075 + .apply_compression_config( 5076 + accept_compression_encodings, 5077 + send_compression_encodings, 5078 + ) 5079 + .apply_max_message_size_config( 5080 + max_decoding_message_size, 5081 + max_encoding_message_size, 5082 + ); 5083 + let res = grpc.unary(method, req).await; 5084 + Ok(res) 5085 + }; 5086 + Box::pin(fut) 5087 + } 5088 + "/rockbox.v1alpha1.SoundService/GetPitch" => { 5089 + #[allow(non_camel_case_types)] 5090 + struct GetPitchSvc<T: SoundService>(pub Arc<T>); 5091 + impl< 5092 + T: SoundService, 5093 + > tonic::server::UnaryService<super::GetPitchRequest> 5094 + for GetPitchSvc<T> { 5095 + type Response = super::GetPitchResponse; 5096 + type Future = BoxFuture< 5097 + tonic::Response<Self::Response>, 5098 + tonic::Status, 5099 + >; 5100 + fn call( 5101 + &mut self, 5102 + request: tonic::Request<super::GetPitchRequest>, 5103 + ) -> Self::Future { 5104 + let inner = Arc::clone(&self.0); 5105 + let fut = async move { 5106 + <T as SoundService>::get_pitch(&inner, request).await 5107 + }; 5108 + Box::pin(fut) 5109 + } 5110 + } 5111 + let accept_compression_encodings = self.accept_compression_encodings; 5112 + let send_compression_encodings = self.send_compression_encodings; 5113 + let max_decoding_message_size = self.max_decoding_message_size; 5114 + let max_encoding_message_size = self.max_encoding_message_size; 5115 + let inner = self.inner.clone(); 5116 + let fut = async move { 5117 + let method = GetPitchSvc(inner); 5118 + let codec = tonic::codec::ProstCodec::default(); 5119 + let mut grpc = tonic::server::Grpc::new(codec) 5120 + .apply_compression_config( 5121 + accept_compression_encodings, 5122 + send_compression_encodings, 5123 + ) 5124 + .apply_max_message_size_config( 5125 + max_decoding_message_size, 5126 + max_encoding_message_size, 5127 + ); 5128 + let res = grpc.unary(method, req).await; 5129 + Ok(res) 5130 + }; 5131 + Box::pin(fut) 5132 + } 5133 + "/rockbox.v1alpha1.SoundService/SetPitch" => { 5134 + #[allow(non_camel_case_types)] 5135 + struct SetPitchSvc<T: SoundService>(pub Arc<T>); 5136 + impl< 5137 + T: SoundService, 5138 + > tonic::server::UnaryService<super::SetPitchRequest> 5139 + for SetPitchSvc<T> { 5140 + type Response = super::SetPitchResponse; 5141 + type Future = BoxFuture< 5142 + tonic::Response<Self::Response>, 5143 + tonic::Status, 5144 + >; 5145 + fn call( 5146 + &mut self, 5147 + request: tonic::Request<super::SetPitchRequest>, 5148 + ) -> Self::Future { 5149 + let inner = Arc::clone(&self.0); 5150 + let fut = async move { 5151 + <T as SoundService>::set_pitch(&inner, request).await 5152 + }; 5153 + Box::pin(fut) 5154 + } 5155 + } 5156 + let accept_compression_encodings = self.accept_compression_encodings; 5157 + let send_compression_encodings = self.send_compression_encodings; 5158 + let max_decoding_message_size = self.max_decoding_message_size; 5159 + let max_encoding_message_size = self.max_encoding_message_size; 5160 + let inner = self.inner.clone(); 5161 + let fut = async move { 5162 + let method = SetPitchSvc(inner); 5163 + let codec = tonic::codec::ProstCodec::default(); 5164 + let mut grpc = tonic::server::Grpc::new(codec) 5165 + .apply_compression_config( 5166 + accept_compression_encodings, 5167 + send_compression_encodings, 5168 + ) 5169 + .apply_max_message_size_config( 5170 + max_decoding_message_size, 5171 + max_encoding_message_size, 5172 + ); 5173 + let res = grpc.unary(method, req).await; 5174 + Ok(res) 5175 + }; 5176 + Box::pin(fut) 5177 + } 5178 + "/rockbox.v1alpha1.SoundService/BeepPlay" => { 5179 + #[allow(non_camel_case_types)] 5180 + struct BeepPlaySvc<T: SoundService>(pub Arc<T>); 5181 + impl< 5182 + T: SoundService, 5183 + > tonic::server::UnaryService<super::BeepPlayRequest> 5184 + for BeepPlaySvc<T> { 5185 + type Response = super::BeepPlayResponse; 5186 + type Future = BoxFuture< 5187 + tonic::Response<Self::Response>, 5188 + tonic::Status, 5189 + >; 5190 + fn call( 5191 + &mut self, 5192 + request: tonic::Request<super::BeepPlayRequest>, 5193 + ) -> Self::Future { 5194 + let inner = Arc::clone(&self.0); 5195 + let fut = async move { 5196 + <T as SoundService>::beep_play(&inner, request).await 5197 + }; 5198 + Box::pin(fut) 5199 + } 5200 + } 5201 + let accept_compression_encodings = self.accept_compression_encodings; 5202 + let send_compression_encodings = self.send_compression_encodings; 5203 + let max_decoding_message_size = self.max_decoding_message_size; 5204 + let max_encoding_message_size = self.max_encoding_message_size; 5205 + let inner = self.inner.clone(); 5206 + let fut = async move { 5207 + let method = BeepPlaySvc(inner); 5208 + let codec = tonic::codec::ProstCodec::default(); 5209 + let mut grpc = tonic::server::Grpc::new(codec) 5210 + .apply_compression_config( 5211 + accept_compression_encodings, 5212 + send_compression_encodings, 5213 + ) 5214 + .apply_max_message_size_config( 5215 + max_decoding_message_size, 5216 + max_encoding_message_size, 5217 + ); 5218 + let res = grpc.unary(method, req).await; 5219 + Ok(res) 5220 + }; 5221 + Box::pin(fut) 5222 + } 5223 + "/rockbox.v1alpha1.SoundService/PcmbufFade" => { 5224 + #[allow(non_camel_case_types)] 5225 + struct PcmbufFadeSvc<T: SoundService>(pub Arc<T>); 5226 + impl< 5227 + T: SoundService, 5228 + > tonic::server::UnaryService<super::PcmbufFadeRequest> 5229 + for PcmbufFadeSvc<T> { 5230 + type Response = super::PcmbufFadeResponse; 5231 + type Future = BoxFuture< 5232 + tonic::Response<Self::Response>, 5233 + tonic::Status, 5234 + >; 5235 + fn call( 5236 + &mut self, 5237 + request: tonic::Request<super::PcmbufFadeRequest>, 5238 + ) -> Self::Future { 5239 + let inner = Arc::clone(&self.0); 5240 + let fut = async move { 5241 + <T as SoundService>::pcmbuf_fade(&inner, request).await 5242 + }; 5243 + Box::pin(fut) 5244 + } 5245 + } 5246 + let accept_compression_encodings = self.accept_compression_encodings; 5247 + let send_compression_encodings = self.send_compression_encodings; 5248 + let max_decoding_message_size = self.max_decoding_message_size; 5249 + let max_encoding_message_size = self.max_encoding_message_size; 5250 + let inner = self.inner.clone(); 5251 + let fut = async move { 5252 + let method = PcmbufFadeSvc(inner); 5253 + let codec = tonic::codec::ProstCodec::default(); 5254 + let mut grpc = tonic::server::Grpc::new(codec) 5255 + .apply_compression_config( 5256 + accept_compression_encodings, 5257 + send_compression_encodings, 5258 + ) 5259 + .apply_max_message_size_config( 5260 + max_decoding_message_size, 5261 + max_encoding_message_size, 5262 + ); 5263 + let res = grpc.unary(method, req).await; 5264 + Ok(res) 5265 + }; 5266 + Box::pin(fut) 5267 + } 5268 + "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency" => { 5269 + #[allow(non_camel_case_types)] 5270 + struct PcmbufSetLowLatencySvc<T: SoundService>(pub Arc<T>); 5271 + impl< 5272 + T: SoundService, 5273 + > tonic::server::UnaryService<super::PcmbufSetLowLatencyRequest> 5274 + for PcmbufSetLowLatencySvc<T> { 5275 + type Response = super::PcmbufSetLowLatencyResponse; 5276 + type Future = BoxFuture< 5277 + tonic::Response<Self::Response>, 5278 + tonic::Status, 5279 + >; 5280 + fn call( 5281 + &mut self, 5282 + request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 5283 + ) -> Self::Future { 5284 + let inner = Arc::clone(&self.0); 5285 + let fut = async move { 5286 + <T as SoundService>::pcmbuf_set_low_latency(&inner, request) 5287 + .await 5288 + }; 5289 + Box::pin(fut) 5290 + } 5291 + } 5292 + let accept_compression_encodings = self.accept_compression_encodings; 5293 + let send_compression_encodings = self.send_compression_encodings; 5294 + let max_decoding_message_size = self.max_decoding_message_size; 5295 + let max_encoding_message_size = self.max_encoding_message_size; 5296 + let inner = self.inner.clone(); 5297 + let fut = async move { 5298 + let method = PcmbufSetLowLatencySvc(inner); 5299 + let codec = tonic::codec::ProstCodec::default(); 5300 + let mut grpc = tonic::server::Grpc::new(codec) 5301 + .apply_compression_config( 5302 + accept_compression_encodings, 5303 + send_compression_encodings, 5304 + ) 5305 + .apply_max_message_size_config( 5306 + max_decoding_message_size, 5307 + max_encoding_message_size, 5308 + ); 5309 + let res = grpc.unary(method, req).await; 5310 + Ok(res) 5311 + }; 5312 + Box::pin(fut) 5313 + } 5314 + "/rockbox.v1alpha1.SoundService/SystemSoundPlay" => { 5315 + #[allow(non_camel_case_types)] 5316 + struct SystemSoundPlaySvc<T: SoundService>(pub Arc<T>); 5317 + impl< 5318 + T: SoundService, 5319 + > tonic::server::UnaryService<super::SystemSoundPlayRequest> 5320 + for SystemSoundPlaySvc<T> { 5321 + type Response = super::SystemSoundPlayResponse; 5322 + type Future = BoxFuture< 5323 + tonic::Response<Self::Response>, 5324 + tonic::Status, 5325 + >; 5326 + fn call( 5327 + &mut self, 5328 + request: tonic::Request<super::SystemSoundPlayRequest>, 5329 + ) -> Self::Future { 5330 + let inner = Arc::clone(&self.0); 5331 + let fut = async move { 5332 + <T as SoundService>::system_sound_play(&inner, request) 5333 + .await 5334 + }; 5335 + Box::pin(fut) 5336 + } 5337 + } 5338 + let accept_compression_encodings = self.accept_compression_encodings; 5339 + let send_compression_encodings = self.send_compression_encodings; 5340 + let max_decoding_message_size = self.max_decoding_message_size; 5341 + let max_encoding_message_size = self.max_encoding_message_size; 5342 + let inner = self.inner.clone(); 5343 + let fut = async move { 5344 + let method = SystemSoundPlaySvc(inner); 5345 + let codec = tonic::codec::ProstCodec::default(); 5346 + let mut grpc = tonic::server::Grpc::new(codec) 5347 + .apply_compression_config( 5348 + accept_compression_encodings, 5349 + send_compression_encodings, 5350 + ) 5351 + .apply_max_message_size_config( 5352 + max_decoding_message_size, 5353 + max_encoding_message_size, 5354 + ); 5355 + let res = grpc.unary(method, req).await; 5356 + Ok(res) 5357 + }; 5358 + Box::pin(fut) 5359 + } 5360 + "/rockbox.v1alpha1.SoundService/KeyclickClick" => { 5361 + #[allow(non_camel_case_types)] 5362 + struct KeyclickClickSvc<T: SoundService>(pub Arc<T>); 5363 + impl< 5364 + T: SoundService, 5365 + > tonic::server::UnaryService<super::KeyclickClickRequest> 5366 + for KeyclickClickSvc<T> { 5367 + type Response = super::KeyclickClickResponse; 5368 + type Future = BoxFuture< 5369 + tonic::Response<Self::Response>, 5370 + tonic::Status, 5371 + >; 5372 + fn call( 5373 + &mut self, 5374 + request: tonic::Request<super::KeyclickClickRequest>, 5375 + ) -> Self::Future { 5376 + let inner = Arc::clone(&self.0); 5377 + let fut = async move { 5378 + <T as SoundService>::keyclick_click(&inner, request).await 5379 + }; 5380 + Box::pin(fut) 5381 + } 5382 + } 5383 + let accept_compression_encodings = self.accept_compression_encodings; 5384 + let send_compression_encodings = self.send_compression_encodings; 5385 + let max_decoding_message_size = self.max_decoding_message_size; 5386 + let max_encoding_message_size = self.max_encoding_message_size; 5387 + let inner = self.inner.clone(); 5388 + let fut = async move { 5389 + let method = KeyclickClickSvc(inner); 5390 + let codec = tonic::codec::ProstCodec::default(); 5391 + let mut grpc = tonic::server::Grpc::new(codec) 5392 + .apply_compression_config( 5393 + accept_compression_encodings, 5394 + send_compression_encodings, 5395 + ) 5396 + .apply_max_message_size_config( 5397 + max_decoding_message_size, 5398 + max_encoding_message_size, 5399 + ); 5400 + let res = grpc.unary(method, req).await; 5401 + Ok(res) 5402 + }; 5403 + Box::pin(fut) 5404 + } 5405 + _ => { 5406 + Box::pin(async move { 5407 + Ok( 5408 + http::Response::builder() 5409 + .status(200) 5410 + .header("grpc-status", tonic::Code::Unimplemented as i32) 5411 + .header( 5412 + http::header::CONTENT_TYPE, 5413 + tonic::metadata::GRPC_CONTENT_TYPE, 5414 + ) 5415 + .body(empty_body()) 5416 + .unwrap(), 5417 + ) 5418 + }) 5419 + } 5420 + } 5421 + } 5422 + } 5423 + impl<T> Clone for SoundServiceServer<T> { 5424 + fn clone(&self) -> Self { 5425 + let inner = self.inner.clone(); 5426 + Self { 5427 + inner, 5428 + accept_compression_encodings: self.accept_compression_encodings, 5429 + send_compression_encodings: self.send_compression_encodings, 5430 + max_decoding_message_size: self.max_decoding_message_size, 5431 + max_encoding_message_size: self.max_encoding_message_size, 5432 + } 5433 + } 5434 + } 5435 + /// Generated gRPC service name 5436 + pub const SERVICE_NAME: &str = "rockbox.v1alpha1.SoundService"; 5437 + impl<T> tonic::server::NamedService for SoundServiceServer<T> { 5438 + const NAME: &'static str = SERVICE_NAME; 5439 + } 5440 + } 5441 + /// Generated client implementations. 5442 + pub mod tagcache_service_client { 5443 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 5444 + use tonic::codegen::*; 5445 + use tonic::codegen::http::Uri; 5446 + #[derive(Debug, Clone)] 5447 + pub struct TagcacheServiceClient<T> { 5448 + inner: tonic::client::Grpc<T>, 5449 + } 5450 + impl TagcacheServiceClient<tonic::transport::Channel> { 5451 + /// Attempt to create a new client by connecting to a given endpoint. 5452 + pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> 5453 + where 5454 + D: TryInto<tonic::transport::Endpoint>, 5455 + D::Error: Into<StdError>, 5456 + { 5457 + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; 5458 + Ok(Self::new(conn)) 5459 + } 5460 + } 5461 + impl<T> TagcacheServiceClient<T> 5462 + where 5463 + T: tonic::client::GrpcService<tonic::body::BoxBody>, 5464 + T::Error: Into<StdError>, 5465 + T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static, 5466 + <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send, 5467 + { 5468 + pub fn new(inner: T) -> Self { 5469 + let inner = tonic::client::Grpc::new(inner); 5470 + Self { inner } 5471 + } 5472 + pub fn with_origin(inner: T, origin: Uri) -> Self { 5473 + let inner = tonic::client::Grpc::with_origin(inner, origin); 5474 + Self { inner } 5475 + } 5476 + pub fn with_interceptor<F>( 5477 + inner: T, 5478 + interceptor: F, 5479 + ) -> TagcacheServiceClient<InterceptedService<T, F>> 5480 + where 5481 + F: tonic::service::Interceptor, 5482 + T::ResponseBody: Default, 5483 + T: tonic::codegen::Service< 5484 + http::Request<tonic::body::BoxBody>, 5485 + Response = http::Response< 5486 + <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 5487 + >, 5488 + >, 5489 + <T as tonic::codegen::Service< 5490 + http::Request<tonic::body::BoxBody>, 5491 + >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 5492 + { 5493 + TagcacheServiceClient::new(InterceptedService::new(inner, interceptor)) 5494 + } 5495 + /// Compress requests with the given encoding. 5496 + /// 5497 + /// This requires the server to support it otherwise it might respond with an 5498 + /// error. 5499 + #[must_use] 5500 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 5501 + self.inner = self.inner.send_compressed(encoding); 5502 + self 5503 + } 5504 + /// Enable decompressing responses. 5505 + #[must_use] 5506 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 5507 + self.inner = self.inner.accept_compressed(encoding); 5508 + self 5509 + } 5510 + /// Limits the maximum size of a decoded message. 5511 + /// 5512 + /// Default: `4MB` 5513 + #[must_use] 5514 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 5515 + self.inner = self.inner.max_decoding_message_size(limit); 5516 + self 5517 + } 5518 + /// Limits the maximum size of an encoded message. 5519 + /// 5520 + /// Default: `usize::MAX` 5521 + #[must_use] 5522 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 5523 + self.inner = self.inner.max_encoding_message_size(limit); 5524 + self 5525 + } 5526 + } 5527 + } 5528 + /// Generated server implementations. 5529 + pub mod tagcache_service_server { 5530 + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] 5531 + use tonic::codegen::*; 5532 + /// Generated trait containing gRPC methods that should be implemented for use with TagcacheServiceServer. 5533 + #[async_trait] 5534 + pub trait TagcacheService: std::marker::Send + std::marker::Sync + 'static {} 5535 + #[derive(Debug)] 5536 + pub struct TagcacheServiceServer<T> { 5537 + inner: Arc<T>, 5538 + accept_compression_encodings: EnabledCompressionEncodings, 5539 + send_compression_encodings: EnabledCompressionEncodings, 5540 + max_decoding_message_size: Option<usize>, 5541 + max_encoding_message_size: Option<usize>, 5542 + } 5543 + impl<T> TagcacheServiceServer<T> { 5544 + pub fn new(inner: T) -> Self { 5545 + Self::from_arc(Arc::new(inner)) 5546 + } 5547 + pub fn from_arc(inner: Arc<T>) -> Self { 5548 + Self { 5549 + inner, 5550 + accept_compression_encodings: Default::default(), 5551 + send_compression_encodings: Default::default(), 5552 + max_decoding_message_size: None, 5553 + max_encoding_message_size: None, 5554 + } 5555 + } 5556 + pub fn with_interceptor<F>( 5557 + inner: T, 5558 + interceptor: F, 5559 + ) -> InterceptedService<Self, F> 5560 + where 5561 + F: tonic::service::Interceptor, 5562 + { 5563 + InterceptedService::new(Self::new(inner), interceptor) 5564 + } 5565 + /// Enable decompressing requests with the given encoding. 5566 + #[must_use] 5567 + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { 5568 + self.accept_compression_encodings.enable(encoding); 5569 + self 5570 + } 5571 + /// Compress responses with the given encoding, if the client supports it. 5572 + #[must_use] 5573 + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { 5574 + self.send_compression_encodings.enable(encoding); 5575 + self 5576 + } 5577 + /// Limits the maximum size of a decoded message. 5578 + /// 5579 + /// Default: `4MB` 5580 + #[must_use] 5581 + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { 5582 + self.max_decoding_message_size = Some(limit); 5583 + self 5584 + } 5585 + /// Limits the maximum size of an encoded message. 5586 + /// 5587 + /// Default: `usize::MAX` 5588 + #[must_use] 5589 + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { 5590 + self.max_encoding_message_size = Some(limit); 5591 + self 5592 + } 5593 + } 5594 + impl<T, B> tonic::codegen::Service<http::Request<B>> for TagcacheServiceServer<T> 5595 + where 5596 + T: TagcacheService, 5597 + B: Body + std::marker::Send + 'static, 5598 + B::Error: Into<StdError> + std::marker::Send + 'static, 5599 + { 5600 + type Response = http::Response<tonic::body::BoxBody>; 5601 + type Error = std::convert::Infallible; 5602 + type Future = BoxFuture<Self::Response, Self::Error>; 5603 + fn poll_ready( 5604 + &mut self, 5605 + _cx: &mut Context<'_>, 5606 + ) -> Poll<std::result::Result<(), Self::Error>> { 5607 + Poll::Ready(Ok(())) 5608 + } 5609 + fn call(&mut self, req: http::Request<B>) -> Self::Future { 5610 + match req.uri().path() { 5611 + _ => { 5612 + Box::pin(async move { 5613 + Ok( 5614 + http::Response::builder() 5615 + .status(200) 5616 + .header("grpc-status", tonic::Code::Unimplemented as i32) 5617 + .header( 5618 + http::header::CONTENT_TYPE, 5619 + tonic::metadata::GRPC_CONTENT_TYPE, 5620 + ) 5621 + .body(empty_body()) 5622 + .unwrap(), 5623 + ) 5624 + }) 5625 + } 5626 + } 5627 + } 5628 + } 5629 + impl<T> Clone for TagcacheServiceServer<T> { 5630 + fn clone(&self) -> Self { 5631 + let inner = self.inner.clone(); 5632 + Self { 5633 + inner, 5634 + accept_compression_encodings: self.accept_compression_encodings, 5635 + send_compression_encodings: self.send_compression_encodings, 5636 + max_decoding_message_size: self.max_decoding_message_size, 5637 + max_encoding_message_size: self.max_encoding_message_size, 5638 + } 5639 + } 5640 + } 5641 + /// Generated gRPC service name 5642 + pub const SERVICE_NAME: &str = "rockbox.v1alpha1.TagcacheService"; 5643 + impl<T> tonic::server::NamedService for TagcacheServiceServer<T> { 5644 + const NAME: &'static str = SERVICE_NAME; 5645 + } 5646 + }
crates/rpc/src/api/rockbox_descriptor.bin

This is a binary file and will not be displayed.

+42
crates/rpc/src/browse.rs
··· 1 + use crate::api::rockbox::v1alpha1::{browse_service_server::BrowseService, *}; 2 + 3 + #[derive(Default)] 4 + pub struct Browse; 5 + 6 + #[tonic::async_trait] 7 + impl BrowseService for Browse { 8 + async fn rockbox_browse( 9 + &self, 10 + request: tonic::Request<RockboxBrowseRequest>, 11 + ) -> Result<tonic::Response<RockboxBrowseResponse>, tonic::Status> { 12 + Ok(tonic::Response::new(RockboxBrowseResponse::default())) 13 + } 14 + 15 + async fn tree_get_context( 16 + &self, 17 + request: tonic::Request<TreeGetContextRequest>, 18 + ) -> Result<tonic::Response<TreeGetContextResponse>, tonic::Status> { 19 + Ok(tonic::Response::new(TreeGetContextResponse::default())) 20 + } 21 + 22 + async fn tree_get_entries( 23 + &self, 24 + request: tonic::Request<TreeGetEntriesRequest>, 25 + ) -> Result<tonic::Response<TreeGetEntriesResponse>, tonic::Status> { 26 + Ok(tonic::Response::new(TreeGetEntriesResponse::default())) 27 + } 28 + 29 + async fn tree_get_entry_at( 30 + &self, 31 + request: tonic::Request<TreeGetEntryAtRequest>, 32 + ) -> Result<tonic::Response<TreeGetEntryAtResponse>, tonic::Status> { 33 + Ok(tonic::Response::new(TreeGetEntryAtResponse::default())) 34 + } 35 + 36 + async fn browse_id3( 37 + &self, 38 + request: tonic::Request<BrowseId3Request>, 39 + ) -> Result<tonic::Response<BrowseId3Response>, tonic::Status> { 40 + Ok(tonic::Response::new(BrowseId3Response::default())) 41 + } 42 + }
+14 -10
crates/rpc/src/lib.rs
··· 1 - pub fn add(left: u64, right: u64) -> u64 { 2 - left + right 3 - } 1 + pub mod browse; 2 + pub mod metadata; 3 + pub mod playback; 4 + pub mod playlist; 5 + pub mod server; 6 + pub mod settings; 7 + pub mod sound; 8 + pub mod tagcache; 4 9 5 - #[cfg(test)] 6 - mod tests { 7 - use super::*; 10 + pub mod api { 11 + #[path = ""] 12 + pub mod rockbox { 13 + #[path = "rockbox.v1alpha1.rs"] 14 + pub mod v1alpha1; 8 15 9 - #[test] 10 - fn it_works() { 11 - let result = add(2, 2); 12 - assert_eq!(result, 4); 16 + pub(crate) const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("api/rockbox_descriptor.bin"); 13 17 } 14 18 }
+2
crates/rpc/src/metadata.rs
··· 1 + #[derive(Default)] 2 + pub struct Metadata;
+84
crates/rpc/src/playback.rs
··· 1 + use crate::api::rockbox::v1alpha1::{playback_service_server::PlaybackService, *}; 2 + 3 + #[derive(Default)] 4 + pub struct Playback; 5 + 6 + #[tonic::async_trait] 7 + impl PlaybackService for Playback { 8 + async fn play( 9 + &self, 10 + request: tonic::Request<PlayRequest>, 11 + ) -> Result<tonic::Response<PlayResponse>, tonic::Status> { 12 + Ok(tonic::Response::new(PlayResponse::default())) 13 + } 14 + 15 + async fn pause( 16 + &self, 17 + request: tonic::Request<PauseRequest>, 18 + ) -> Result<tonic::Response<PauseResponse>, tonic::Status> { 19 + Ok(tonic::Response::new(PauseResponse::default())) 20 + } 21 + 22 + async fn resume( 23 + &self, 24 + request: tonic::Request<ResumeRequest>, 25 + ) -> Result<tonic::Response<ResumeResponse>, tonic::Status> { 26 + Ok(tonic::Response::new(ResumeResponse::default())) 27 + } 28 + 29 + async fn next( 30 + &self, 31 + request: tonic::Request<NextRequest>, 32 + ) -> Result<tonic::Response<NextResponse>, tonic::Status> { 33 + Ok(tonic::Response::new(NextResponse::default())) 34 + } 35 + 36 + async fn previous( 37 + &self, 38 + request: tonic::Request<PreviousRequest>, 39 + ) -> Result<tonic::Response<PreviousResponse>, tonic::Status> { 40 + Ok(tonic::Response::new(PreviousResponse::default())) 41 + } 42 + 43 + async fn fast_forward_rewind( 44 + &self, 45 + request: tonic::Request<FastForwardRewindRequest>, 46 + ) -> Result<tonic::Response<FastForwardRewindResponse>, tonic::Status> { 47 + Ok(tonic::Response::new(FastForwardRewindResponse::default())) 48 + } 49 + 50 + async fn status( 51 + &self, 52 + request: tonic::Request<StatusRequest>, 53 + ) -> Result<tonic::Response<StatusResponse>, tonic::Status> { 54 + Ok(tonic::Response::new(StatusResponse::default())) 55 + } 56 + 57 + async fn current_track( 58 + &self, 59 + request: tonic::Request<CurrentTrackRequest>, 60 + ) -> Result<tonic::Response<CurrentTrackResponse>, tonic::Status> { 61 + Ok(tonic::Response::new(CurrentTrackResponse::default())) 62 + } 63 + 64 + async fn flush_and_reload_tracks( 65 + &self, 66 + request: tonic::Request<FlushAndReloadTracksRequest>, 67 + ) -> Result<tonic::Response<FlushAndReloadTracksResponse>, tonic::Status> { 68 + Ok(tonic::Response::new(FlushAndReloadTracksResponse::default())) 69 + } 70 + 71 + async fn get_file_position( 72 + &self, 73 + request: tonic::Request<GetFilePositionRequest>, 74 + ) -> Result<tonic::Response<GetFilePositionResponse>, tonic::Status> { 75 + Ok(tonic::Response::new(GetFilePositionResponse::default())) 76 + } 77 + 78 + async fn hard_stop( 79 + &self, 80 + request: tonic::Request<HardStopRequest>, 81 + ) -> Result<tonic::Response<HardStopResponse>, tonic::Status> { 82 + Ok(tonic::Response::new(HardStopResponse::default())) 83 + } 84 + }
+133
crates/rpc/src/playlist.rs
··· 1 + use crate::api::rockbox::v1alpha1::{playlist_service_server::PlaylistService, *}; 2 + 3 + #[derive(Default)] 4 + pub struct Playlist; 5 + 6 + #[tonic::async_trait] 7 + impl PlaylistService for Playlist { 8 + async fn get_current( 9 + &self, 10 + request: tonic::Request<GetCurrentRequest>, 11 + ) -> Result<tonic::Response<GetCurrentResponse>, tonic::Status> { 12 + Ok(tonic::Response::new(GetCurrentResponse::default())) 13 + } 14 + 15 + async fn get_resume_info( 16 + &self, 17 + request: tonic::Request<GetResumeInfoRequest>, 18 + ) -> Result<tonic::Response<GetResumeInfoResponse>, tonic::Status> { 19 + Ok(tonic::Response::new(GetResumeInfoResponse::default())) 20 + } 21 + 22 + async fn get_track_info( 23 + &self, 24 + request: tonic::Request<GetTrackInfoRequest>, 25 + ) -> Result<tonic::Response<GetTrackInfoResponse>, tonic::Status> { 26 + Ok(tonic::Response::new(GetTrackInfoResponse::default())) 27 + } 28 + 29 + async fn get_first_index( 30 + &self, 31 + request: tonic::Request<GetFirstIndexRequest>, 32 + ) -> Result<tonic::Response<GetFirstIndexResponse>, tonic::Status> { 33 + Ok(tonic::Response::new(GetFirstIndexResponse::default())) 34 + } 35 + 36 + async fn get_display_index( 37 + &self, 38 + request: tonic::Request<GetDisplayIndexRequest>, 39 + ) -> Result<tonic::Response<GetDisplayIndexResponse>, tonic::Status> { 40 + Ok(tonic::Response::new(GetDisplayIndexResponse::default())) 41 + } 42 + 43 + async fn amount( 44 + &self, 45 + request: tonic::Request<AmountRequest>, 46 + ) -> Result<tonic::Response<AmountResponse>, tonic::Status> { 47 + Ok(tonic::Response::new(AmountResponse::default())) 48 + } 49 + 50 + async fn playlist_resume( 51 + &self, 52 + request: tonic::Request<PlaylistResumeRequest>, 53 + ) -> Result<tonic::Response<PlaylistResumeResponse>, tonic::Status> { 54 + Ok(tonic::Response::new(PlaylistResumeResponse::default())) 55 + } 56 + 57 + async fn resume_track( 58 + &self, 59 + request: tonic::Request<ResumeTrackRequest>, 60 + ) -> Result<tonic::Response<ResumeTrackResponse>, tonic::Status> { 61 + Ok(tonic::Response::new(ResumeTrackResponse::default())) 62 + } 63 + 64 + async fn set_modified( 65 + &self, 66 + request: tonic::Request<SetModifiedRequest>, 67 + ) -> Result<tonic::Response<SetModifiedResponse>, tonic::Status> { 68 + Ok(tonic::Response::new(SetModifiedResponse::default())) 69 + } 70 + 71 + async fn start( 72 + &self, 73 + request: tonic::Request<StartRequest>, 74 + ) -> Result<tonic::Response<StartResponse>, tonic::Status> { 75 + Ok(tonic::Response::new(StartResponse::default())) 76 + } 77 + 78 + async fn sync( 79 + &self, 80 + request: tonic::Request<SyncRequest>, 81 + ) -> Result<tonic::Response<SyncResponse>, tonic::Status> { 82 + Ok(tonic::Response::new(SyncResponse::default())) 83 + } 84 + 85 + async fn remove_all_tracks( 86 + &self, 87 + request: tonic::Request<RemoveAllTracksRequest>, 88 + ) -> Result<tonic::Response<RemoveAllTracksResponse>, tonic::Status> { 89 + Ok(tonic::Response::new(RemoveAllTracksResponse::default())) 90 + } 91 + 92 + async fn create_playlist( 93 + &self, 94 + request: tonic::Request<CreatePlaylistRequest>, 95 + ) -> Result<tonic::Response<CreatePlaylistResponse>, tonic::Status> { 96 + Ok(tonic::Response::new(CreatePlaylistResponse::default())) 97 + } 98 + 99 + async fn insert_track( 100 + &self, 101 + request: tonic::Request<InsertTrackRequest>, 102 + ) -> Result<tonic::Response<InsertTrackResponse>, tonic::Status> { 103 + Ok(tonic::Response::new(InsertTrackResponse::default())) 104 + } 105 + 106 + async fn insert_directory( 107 + &self, 108 + request: tonic::Request<InsertDirectoryRequest>, 109 + ) -> Result<tonic::Response<InsertDirectoryResponse>, tonic::Status> { 110 + Ok(tonic::Response::new(InsertDirectoryResponse::default())) 111 + } 112 + 113 + async fn insert_playlist( 114 + &self, 115 + request: tonic::Request<InsertPlaylistRequest>, 116 + ) -> Result<tonic::Response<InsertPlaylistResponse>, tonic::Status> { 117 + Ok(tonic::Response::new(InsertPlaylistResponse::default())) 118 + } 119 + 120 + async fn shuffle_playlist( 121 + &self, 122 + request: tonic::Request<ShufflePlaylistRequest>, 123 + ) -> Result<tonic::Response<ShufflePlaylistResponse>, tonic::Status> { 124 + Ok(tonic::Response::new(ShufflePlaylistResponse::default())) 125 + } 126 + 127 + async fn warn_on_playlist_erase( 128 + &self, 129 + request: tonic::Request<WarnOnPlaylistEraseRequest>, 130 + ) -> Result<tonic::Response<WarnOnPlaylistEraseResponse>, tonic::Status> { 131 + Ok(tonic::Response::new(WarnOnPlaylistEraseResponse::default())) 132 + } 133 + }
+51
crates/rpc/src/server.rs
··· 1 + use std::net::SocketAddr; 2 + 3 + use crate::api::rockbox::v1alpha1::browse_service_server::BrowseServiceServer; 4 + use crate::api::rockbox::v1alpha1::playback_service_server::PlaybackServiceServer; 5 + use crate::api::rockbox::v1alpha1::playlist_service_server::PlaylistServiceServer; 6 + use crate::api::rockbox::v1alpha1::sound_service_server::SoundServiceServer; 7 + use crate::api::rockbox::FILE_DESCRIPTOR_SET; 8 + use crate::browse::Browse; 9 + use crate::playback::Playback; 10 + use crate::playlist::Playlist; 11 + use crate::sound::Sound; 12 + use owo_colors::OwoColorize; 13 + use tonic::transport::Server; 14 + 15 + pub async fn start() -> Result<(), Box<dyn std::error::Error>> { 16 + let rockbox_port: u16 = std::env::var("ROCKBOX_PORT") 17 + .unwrap_or_else(|_| "6061".to_string()) 18 + .parse() 19 + .expect("ROCKBOX_PORT must be a number"); 20 + 21 + let addr: SocketAddr = format!("0.0.0.0:{}", rockbox_port).parse()?; 22 + 23 + let host_and_port = format!("0.0.0.0:{}", rockbox_port); 24 + 25 + println!( 26 + "{} server is running on {}", 27 + "Rockbox gRPC".bright_purple(), 28 + host_and_port.bright_green() 29 + ); 30 + 31 + Server::builder() 32 + .accept_http1(true) 33 + .add_service( 34 + tonic_reflection::server::Builder::configure() 35 + .register_encoded_file_descriptor_set(FILE_DESCRIPTOR_SET) 36 + .build_v1alpha()?, 37 + ) 38 + .add_service(tonic_web::enable(PlaylistServiceServer::new( 39 + Playlist::default(), 40 + ))) 41 + .add_service(tonic_web::enable(PlaybackServiceServer::new( 42 + Playback::default(), 43 + ))) 44 + .add_service(tonic_web::enable(BrowseServiceServer::new( 45 + Browse::default(), 46 + ))) 47 + .add_service(tonic_web::enable(SoundServiceServer::new(Sound::default()))) 48 + .serve(addr) 49 + .await?; 50 + Ok(()) 51 + }
+2
crates/rpc/src/settings.rs
··· 1 + #[derive(Default)] 2 + pub struct Settings;
+112
crates/rpc/src/sound.rs
··· 1 + use crate::api::rockbox::v1alpha1::{sound_service_server::SoundService, *}; 2 + 3 + #[derive(Default)] 4 + pub struct Sound; 5 + 6 + #[tonic::async_trait] 7 + impl SoundService for Sound { 8 + async fn adjust_volume( 9 + &self, 10 + request: tonic::Request<AdjustVolumeRequest>, 11 + ) -> Result<tonic::Response<AdjustVolumeResponse>, tonic::Status> { 12 + Ok(tonic::Response::new(AdjustVolumeResponse::default())) 13 + } 14 + 15 + async fn sound_set( 16 + &self, 17 + request: tonic::Request<SoundSetRequest>, 18 + ) -> Result<tonic::Response<SoundSetResponse>, tonic::Status> { 19 + Ok(tonic::Response::new(SoundSetResponse::default())) 20 + } 21 + 22 + async fn sound_current( 23 + &self, 24 + request: tonic::Request<SoundCurrentRequest>, 25 + ) -> Result<tonic::Response<SoundCurrentResponse>, tonic::Status> { 26 + Ok(tonic::Response::new(SoundCurrentResponse::default())) 27 + } 28 + 29 + async fn sound_default( 30 + &self, 31 + request: tonic::Request<SoundDefaultRequest>, 32 + ) -> Result<tonic::Response<SoundDefaultResponse>, tonic::Status> { 33 + Ok(tonic::Response::new(SoundDefaultResponse::default())) 34 + } 35 + 36 + async fn sound_min( 37 + &self, 38 + request: tonic::Request<SoundMinRequest>, 39 + ) -> Result<tonic::Response<SoundMinResponse>, tonic::Status> { 40 + Ok(tonic::Response::new(SoundMinResponse::default())) 41 + } 42 + 43 + async fn sound_max( 44 + &self, 45 + request: tonic::Request<SoundMaxRequest>, 46 + ) -> Result<tonic::Response<SoundMaxResponse>, tonic::Status> { 47 + Ok(tonic::Response::new(SoundMaxResponse::default())) 48 + } 49 + 50 + async fn sound_unit( 51 + &self, 52 + request: tonic::Request<SoundUnitRequest>, 53 + ) -> Result<tonic::Response<SoundUnitResponse>, tonic::Status> { 54 + Ok(tonic::Response::new(SoundUnitResponse::default())) 55 + } 56 + 57 + async fn sound_val2_phys( 58 + &self, 59 + request: tonic::Request<SoundVal2PhysRequest>, 60 + ) -> Result<tonic::Response<SoundVal2PhysResponse>, tonic::Status> { 61 + Ok(tonic::Response::new(SoundVal2PhysResponse::default())) 62 + } 63 + 64 + async fn get_pitch( 65 + &self, 66 + request: tonic::Request<GetPitchRequest>, 67 + ) -> Result<tonic::Response<GetPitchResponse>, tonic::Status> { 68 + Ok(tonic::Response::new(GetPitchResponse::default())) 69 + } 70 + 71 + async fn set_pitch( 72 + &self, 73 + request: tonic::Request<SetPitchRequest>, 74 + ) -> Result<tonic::Response<SetPitchResponse>, tonic::Status> { 75 + Ok(tonic::Response::new(SetPitchResponse::default())) 76 + } 77 + 78 + async fn beep_play( 79 + &self, 80 + request: tonic::Request<BeepPlayRequest>, 81 + ) -> Result<tonic::Response<BeepPlayResponse>, tonic::Status> { 82 + Ok(tonic::Response::new(BeepPlayResponse::default())) 83 + } 84 + 85 + async fn pcmbuf_fade( 86 + &self, 87 + request: tonic::Request<PcmbufFadeRequest>, 88 + ) -> Result<tonic::Response<PcmbufFadeResponse>, tonic::Status> { 89 + Ok(tonic::Response::new(PcmbufFadeResponse::default())) 90 + } 91 + 92 + async fn pcmbuf_set_low_latency( 93 + &self, 94 + request: tonic::Request<PcmbufSetLowLatencyRequest>, 95 + ) -> Result<tonic::Response<PcmbufSetLowLatencyResponse>, tonic::Status> { 96 + Ok(tonic::Response::new(PcmbufSetLowLatencyResponse::default())) 97 + } 98 + 99 + async fn system_sound_play( 100 + &self, 101 + request: tonic::Request<SystemSoundPlayRequest>, 102 + ) -> Result<tonic::Response<SystemSoundPlayResponse>, tonic::Status> { 103 + Ok(tonic::Response::new(SystemSoundPlayResponse::default())) 104 + } 105 + 106 + async fn keyclick_click( 107 + &self, 108 + request: tonic::Request<KeyclickClickRequest>, 109 + ) -> Result<tonic::Response<KeyclickClickResponse>, tonic::Status> { 110 + Ok(tonic::Response::new(KeyclickClickResponse::default())) 111 + } 112 + }
+2
crates/rpc/src/tagcache.rs
··· 1 + #[derive(Default)] 2 + pub struct Tagcache;
+1
crates/server/Cargo.toml
··· 11 11 rockbox-graphql = {path = "../graphql"} 12 12 rockbox-rpc = {path = "../rpc"} 13 13 rockbox-sys = {path = "../sys"} 14 + tokio = {version = "1.40.0", features = ["full"]}
+32 -1
crates/server/src/lib.rs
··· 1 + use std::thread; 2 + 1 3 use owo_colors::OwoColorize; 2 4 use rockbox_sys::playback; 3 5 ··· 15 17 // Start the server 16 18 println!("{}", BANNER.yellow()); 17 19 let status = playback::status(); 18 - playback::current_track(); 20 + let track = playback::current_track(); 21 + 22 + println!("Current Track: {:?}", track); 23 + 19 24 println!("Status: {}", status); 20 25 playback::pause(); 26 + 27 + thread::spawn(|| { 28 + let runtime = tokio::runtime::Builder::new_multi_thread() 29 + .enable_all() 30 + .build() 31 + .unwrap(); 32 + match runtime.block_on(rockbox_rpc::server::start()) { 33 + Ok(_) => {} 34 + Err(e) => { 35 + eprintln!("Error starting server: {}", e); 36 + } 37 + } 38 + }); 39 + 40 + thread::spawn(|| { 41 + let runtime = tokio::runtime::Builder::new_multi_thread() 42 + .enable_all() 43 + .build() 44 + .unwrap(); 45 + match runtime.block_on(rockbox_graphql::server::start()) { 46 + Ok(_) => {} 47 + Err(e) => { 48 + eprintln!("Error starting server: {}", e); 49 + } 50 + } 51 + }); 21 52 }
+19 -16
crates/sys/src/dir.rs
··· 1 - pub fn open_dir() { 2 - unsafe { 3 - crate::opendir(); 4 - } 1 + use std::ffi::CString; 2 + 3 + use crate::{dirent, Dir, Dirent}; 4 + 5 + pub fn open_dir(dirname: &str) -> *mut Dir { 6 + let dirname = CString::new(dirname).unwrap(); 7 + unsafe { crate::opendir(dirname.as_ptr()) } 5 8 } 6 9 7 - pub fn close_dir() { 8 - unsafe { 9 - crate::closedir(); 10 - } 10 + pub fn close_dir(dirp: *mut Dir) -> i32 { 11 + unsafe { crate::closedir(dirp) } 11 12 } 12 13 13 - pub fn readdir() { 14 - unsafe { crate::readdir() } 14 + pub fn readdir(dirp: *mut Dir) -> *mut crate::dirent { 15 + unsafe { crate::readdir(dirp) } 15 16 } 16 17 17 - pub fn mkdir() { 18 - unsafe { crate::mkdir() } 18 + pub fn mkdir(path: &str) -> i32 { 19 + let path = CString::new(path).unwrap(); 20 + unsafe { crate::mkdir(path.as_ptr()) } 19 21 } 20 22 21 - pub fn rmdir() { 22 - unsafe { crate::rmdir() } 23 + pub fn rmdir(path: &str) -> i32 { 24 + let path = CString::new(path).unwrap(); 25 + unsafe { crate::rmdir(path.as_ptr()) } 23 26 } 24 27 25 - pub fn dir_get_info() { 26 - unsafe { crate::dir_get_info() } 28 + pub fn dir_get_info(dirp: *mut Dir, entry: *mut dirent) -> *mut Dirent { 29 + unsafe { crate::dir_get_info(dirp, entry) } 27 30 }
+509 -68
crates/sys/src/lib.rs
··· 16 16 17 17 const MAX_PATH: usize = 260; 18 18 const ID3V2_BUF_SIZE: usize = 1800; 19 + const MAX_PATHNAME: usize = 80; 20 + const NB_SCREENS: usize = 2; 19 21 20 22 #[repr(C)] 21 23 #[derive(Debug)] ··· 215 217 216 218 pub type PlaylistInsertCb = Option<extern "C" fn()>; 217 219 pub type AddToPlCallback = Option<extern "C" fn()>; 220 + pub type ProgressFunc = Option<extern "C" fn(x: c_int)>; 221 + pub type ActionCb = Option<extern "C" fn(file_name: *const c_char) -> c_uchar>; 218 222 219 223 #[repr(C)] 220 224 #[derive(Debug)] ··· 232 236 pub tm_zone: *const c_char, // Timezone abbreviation 233 237 } 234 238 239 + #[repr(C)] 240 + #[derive(Debug)] 241 + pub struct Dir {} 242 + 243 + #[repr(C)] 244 + #[derive(Debug)] 245 + pub struct dirent {} 246 + 247 + #[repr(C)] 248 + #[derive(Debug)] 249 + pub struct Dirent { 250 + pub attribute: c_uint, 251 + pub d_name: [c_char; MAX_PATH], 252 + } 253 + 254 + const TAG_COUNT: usize = 32; 255 + const SEEK_LIST_SIZE: usize = 32; 256 + const TAGCACHE_MAX_FILTERS: usize = 4; 257 + const TAGCACHE_MAX_CLAUSES: usize = 32; 258 + 259 + #[repr(C)] 260 + #[derive(Debug)] 261 + pub struct TagcacheSearch { 262 + /* For internal use only. */ 263 + fd: c_int, 264 + masterfd: c_int, 265 + idxfd: [c_int; TAG_COUNT], 266 + seeklist: [TagcacheSeeklistEntry; SEEK_LIST_SIZE], 267 + seek_list_count: c_int, 268 + filter_tag: [i32; TAGCACHE_MAX_FILTERS], 269 + filter_seek: [i32; TAGCACHE_MAX_FILTERS], 270 + filter_count: c_int, 271 + clause: [*mut TagcacheSearchClause; TAGCACHE_MAX_CLAUSES], 272 + clause_count: c_int, 273 + list_position: c_int, 274 + seek_pos: c_int, 275 + position: c_long, 276 + entry_count: c_int, 277 + valid: bool, 278 + initialized: bool, 279 + unique_list: *mut u32, 280 + unique_list_capacity: c_int, 281 + unique_list_count: c_int, 282 + 283 + /* Exported variables. */ 284 + ramsearch: bool, /* Is ram copy of the tagcache being used. */ 285 + ramresult: bool, /* False if result is not static, and must be copied. */ 286 + r#type: c_int, /* The tag type to be searched. */ 287 + result: *mut c_char, /* The result data for all tags. */ 288 + result_len: c_int, /* Length of the result including \0 */ 289 + result_seek: i32, /* Current position in the tag data. */ 290 + idx_id: i32, /* Entry number in the master index. */ 291 + } 292 + 293 + #[repr(C)] 294 + #[derive(Debug)] 295 + pub struct TagcacheSeeklistEntry { 296 + seek: i32, 297 + flag: i32, 298 + idx_id: i32, 299 + } 300 + 301 + #[repr(C)] 302 + #[derive(Debug)] 303 + pub struct TagcacheSearchClause { 304 + tag: c_int, 305 + r#type: c_int, 306 + numeric: bool, 307 + source: c_int, 308 + numeric_data: c_long, 309 + str: *mut c_char, 310 + } 311 + 312 + #[repr(C)] 313 + #[derive(Debug)] 314 + pub struct TagcacheStat { 315 + db_path: [c_char; MAX_PATHNAME + 1], // Path to DB root directory 316 + 317 + initialized: bool, // Is tagcache currently busy? 318 + readyvalid: bool, // Has tagcache ready status been ascertained? 319 + ready: bool, // Is tagcache ready to be used? 320 + ramcache: bool, // Is tagcache loaded in RAM? 321 + commit_delayed: bool, // Has commit been delayed until next reboot? 322 + econ: bool, // Is endianess correction enabled? 323 + syncscreen: bool, // Synchronous operation with debug screen? 324 + curentry: *const c_char, // Path of the current entry being scanned 325 + 326 + commit_step: c_int, // Commit progress 327 + ramcache_allocated: c_int, // Has RAM been allocated for ramcache? 328 + ramcache_used: c_int, // How much RAM has been really used? 329 + progress: c_int, // Current progress of disk scan 330 + processed_entries: c_int, // Scanned disk entries so far 331 + total_entries: c_int, // Total entries in tagcache 332 + queue_length: c_int, // Command queue length 333 + } 334 + 335 + #[repr(C)] 336 + pub union StorageType { 337 + int_val: c_int, // assuming it's an integer type, adjust according to the actual definition 338 + // other possible types if storage_type is a union of different types 339 + } 340 + 341 + #[repr(C)] 342 + pub struct SoundSetting {} 343 + 344 + #[repr(C)] 345 + pub struct BoolSetting {} 346 + 347 + #[repr(C)] 348 + pub struct FilenameSetting {} 349 + 350 + #[repr(C)] 351 + pub struct IntSetting {} 352 + 353 + #[repr(C)] 354 + pub struct ChoiceSetting {} 355 + 356 + #[repr(C)] 357 + pub struct TableSetting {} 358 + 359 + #[repr(C)] 360 + pub struct CustomSetting {} 361 + 362 + #[repr(C)] 363 + pub struct SettingsList { 364 + pub flags: c_uint, // uint32_t -> c_uint 365 + pub setting: *mut c_void, // pointer to void 366 + pub lang_id: c_int, // int 367 + pub default_val: StorageType, // union storage_type 368 + pub cfg_name: *const c_char, // const char* 369 + pub cfg_vals: *const c_char, // const char* 370 + 371 + // union with different possible struct types 372 + pub setting_type: SettingsTypeUnion, 373 + } 374 + 375 + #[repr(C)] 376 + pub union SettingsTypeUnion { 377 + pub RESERVED: *const c_void, // void pointer for the reserved field 378 + pub sound_setting: *const SoundSetting, // pointer to SoundSetting struct 379 + pub bool_setting: *const BoolSetting, // pointer to BoolSetting struct 380 + pub filename_setting: *const FilenameSetting, // pointer to FilenameSetting struct 381 + pub int_setting: *const IntSetting, // pointer to IntSetting struct 382 + pub choice_setting: *const ChoiceSetting, // pointer to ChoiceSetting struct 383 + pub table_setting: *const TableSetting, // pointer to TableSetting struct 384 + pub custom_setting: *const CustomSetting, // pointer to CustomSetting struct 385 + } 386 + 387 + #[repr(C)] 388 + pub union FrameBufferData { 389 + pub data: *mut c_void, // void* in C 390 + pub ch_ptr: *mut c_char, // char* in C 391 + pub fb_ptr: *mut c_char, 392 + } 393 + 394 + #[repr(C)] 395 + pub struct FrameBuffer { 396 + pub buffer_data: FrameBufferData, // union data 397 + pub get_address_fn: Option<extern "C" fn(x: c_int, y: c_int) -> *mut c_void>, // Function pointer 398 + pub stride: isize, // ptrdiff_t in C 399 + pub elems: usize, // size_t in C 400 + } 401 + 402 + #[repr(C)] 403 + pub struct Viewport { 404 + pub x: c_int, // int in C 405 + pub y: c_int, // int in C 406 + pub width: c_int, // int in C 407 + pub height: c_int, // int in C 408 + pub flags: c_int, // int in C 409 + pub font: c_int, // int in C 410 + pub drawmode: c_int, // int in C 411 + pub buffer: *mut FrameBuffer, // pointer to FrameBuffer struct 412 + pub fg_pattern: c_uint, // unsigned int in C 413 + pub bg_pattern: c_uint, // unsigned int in C 414 + } 415 + 416 + #[repr(C)] 417 + pub enum OptionType { 418 + RbInt = 0, 419 + RbBool = 1, 420 + } 421 + 422 + #[repr(C)] 423 + pub struct OptItems { 424 + pub string: *const c_uchar, // const unsigned char* 425 + pub voice_id: c_int, // int32_t 426 + } 427 + 428 + pub type PcmPlayCallbackType = 429 + Option<extern "C" fn(start: *const *const c_void, size: *mut c_ulong)>; 430 + 431 + #[repr(C)] 432 + pub enum PcmDmaStatus { 433 + PcmDmaStatusErrDma = -1, // PCM_DMAST_ERR_DMA in C 434 + PcmDmaStatusOk = 0, // PCM_DMAST_OK in C 435 + PcmDmaStatusStarted = 1, // PCM_DMAST_STARTED in C 436 + } 437 + 438 + pub type PcmStatusCallbackType = Option<extern "C" fn(status: PcmDmaStatus) -> PcmDmaStatus>; 439 + 440 + #[repr(C)] 441 + pub struct SampleFormat { 442 + pub version: u8, 443 + pub num_channels: u8, 444 + pub frac_bits: u8, 445 + pub output_scale: u8, 446 + pub frequency: i32, 447 + pub codec_frequency: i32, 448 + } 449 + 450 + #[repr(C)] 451 + pub struct DspBuffer { 452 + pub remcount: i32, // Samples in buffer (In, Int, Out) 453 + 454 + // Union for channel pointers 455 + pub pin: [*const c_void; 2], // Channel pointers (In) 456 + pub p32: [*mut i32; 2], // Channel pointers (Int) 457 + pub p16out: *mut i16, // DSP output buffer (Out) 458 + 459 + // Union for buffer count and proc_mask 460 + pub proc_mask: u32, // In-place effects already applied 461 + pub bufcount: i32, // Buffer length/dest buffer remaining 462 + 463 + pub format: SampleFormat, // Buffer format data 464 + } 465 + 466 + impl DspBuffer { 467 + pub fn new() -> Self { 468 + Self { 469 + remcount: 0, 470 + pin: [std::ptr::null(); 2], 471 + p32: [std::ptr::null_mut(); 2], 472 + p16out: std::ptr::null_mut(), 473 + proc_mask: 0, 474 + bufcount: 0, 475 + format: SampleFormat { 476 + version: 0, 477 + num_channels: 0, 478 + frac_bits: 0, 479 + output_scale: 0, 480 + frequency: 0, 481 + codec_frequency: 0, 482 + }, 483 + } 484 + } 485 + } 486 + 487 + pub type SampleInputFnType = unsafe extern "C" fn(samples: *const u8, size: usize); 488 + 489 + pub type SampleOutputFnType = unsafe extern "C" fn(samples: *const u8, size: usize); 490 + 491 + #[repr(C)] 492 + pub struct DspProcEntry { 493 + pub data: isize, // intptr_t in C 494 + pub process: Option<extern "C" fn(*mut DspProcEntry, *mut *mut DspBuffer)>, 495 + } 496 + 497 + impl DspProcEntry { 498 + pub fn new() -> Self { 499 + Self { 500 + data: 0, 501 + process: None, 502 + } 503 + } 504 + } 505 + 506 + #[repr(C)] 507 + pub struct DspProcSlot { 508 + pub proc_entry: DspProcEntry, // Adjust the type if necessary 509 + pub next: *mut DspProcSlot, 510 + pub mask: u32, 511 + pub version: u8, 512 + pub db_index: u8, 513 + } 514 + 515 + #[repr(C)] 516 + pub struct SampleIoData { 517 + pub outcount: i32, 518 + pub format: SampleFormat, // Replace with actual type 519 + pub sample_depth: i32, 520 + pub stereo_mode: i32, 521 + pub input_samples: SampleInputFnType, 522 + pub sample_buf: DspBuffer, // Replace with actual type 523 + pub sample_buf_p: [*mut i32; 2], 524 + pub output_samples: SampleOutputFnType, 525 + pub output_sampr: u32, 526 + pub format_dirty: u8, 527 + pub output_version: u8, 528 + } 529 + 530 + #[repr(C)] 531 + pub struct DspConfig { 532 + pub io_data: SampleIoData, // Adjust the type if necessary 533 + pub slot_free_mask: u32, 534 + pub proc_mask_enabled: u32, 535 + pub proc_mask_active: u32, 536 + pub proc_slots: *mut DspProcSlot, 537 + } 538 + 539 + #[repr(C)] 540 + pub enum PcmMixerChannel { 541 + Playback = 0, 542 + Voice, 543 + NumChannels, 544 + } 545 + 546 + impl PcmMixerChannel { 547 + // Optionally, add methods for convenience 548 + pub fn as_u32(self) -> u32 { 549 + self as u32 550 + } 551 + 552 + pub fn from_u32(value: u32) -> Option<Self> { 553 + match value { 554 + 0 => Some(PcmMixerChannel::Playback), 555 + 1 => Some(PcmMixerChannel::Voice), 556 + // Include this if HAVE_HARDWARE_BEEP is not defined 557 + // 2 => Some(PcmMixerChannel::Beep), 558 + _ => None, 559 + } 560 + } 561 + } 562 + 563 + #[repr(C)] 564 + pub enum ChannelStatus { 565 + Stopped = 0, 566 + Playing, 567 + Paused, 568 + } 569 + 570 + impl ChannelStatus { 571 + // Optionally, add methods for convenience 572 + pub fn as_u32(self) -> u32 { 573 + self as u32 574 + } 575 + 576 + pub fn from_u32(value: u32) -> Option<Self> { 577 + match value { 578 + 0 => Some(ChannelStatus::Stopped), 579 + 1 => Some(ChannelStatus::Playing), 580 + 2 => Some(ChannelStatus::Paused), 581 + _ => None, 582 + } 583 + } 584 + } 585 + 586 + #[repr(C)] 587 + pub struct PcmPeaks { 588 + pub left: u32, // Left peak value 589 + pub right: u32, // Right peak value 590 + pub period: i64, // For tracking calling period 591 + pub tick: i64, // Last tick called 592 + } 593 + 594 + pub type ChanBufferHookFnType = extern "C" fn(start: *const c_void, size: usize); 595 + 596 + #[repr(C)] 597 + pub enum SystemSound { 598 + KeyClick = 0, 599 + TrackSkip, 600 + TrackNoMore, 601 + ListEdgeBeepWrap, 602 + ListEdgeBeepNoWrap, 603 + } 604 + 235 605 extern "C" { 236 606 // Playback control 237 607 fn audio_pause(); ··· 289 659 fn warn_on_pl_erase() -> c_uchar; 290 660 291 661 // Sound 292 - fn adjust_volume(); 293 - fn sound_set(); 294 - fn sound_current(); 295 - fn sound_default(); 296 - fn sound_min(); 297 - fn sound_max(); 298 - fn sound_unit(); 299 - fn sound_val2phys(); 300 - fn sound_get_pitch(); 301 - fn sound_set_pitch(); 302 - fn audio_master_sampr_list(); 662 + fn adjust_volume(steps: c_int); 663 + fn sound_set(setting: c_int, value: c_int); 664 + fn sound_current(setting: c_int) -> c_int; 665 + fn sound_default(setting: c_int) -> c_int; 666 + fn sound_min(setting: c_int) -> c_int; 667 + fn sound_max(setting: c_int) -> c_int; 668 + fn sound_unit(setting: c_int) -> *const c_char; 669 + fn sound_val2phys(setting: c_int, value: c_int) -> c_int; 670 + fn sound_get_pitch() -> c_int; 671 + fn sound_set_pitch(pitch: c_int); 303 672 fn pcm_apply_settings(); 304 - fn pcm_play_data(); 673 + fn pcm_play_data( 674 + get_more: PcmPlayCallbackType, 675 + status_cb: PcmStatusCallbackType, 676 + start: *const *const c_void, 677 + size: usize, 678 + ); 305 679 fn pcm_play_stop(); 306 - fn pcm_set_frequency(); 307 - fn pcm_is_playing(); 680 + fn pcm_set_frequency(frequency: c_uint); 681 + fn pcm_is_playing() -> c_uchar; 308 682 fn pcm_play_lock(); 309 683 fn pcm_play_unlock(); 310 - fn beep_play(); 311 - fn dsp_set_crossfeed_type(); 312 - fn dsp_eq_enable(); 313 - fn dsp_dither_enable(); 314 - fn dsp_get_timestretch(); 315 - fn dsp_set_timestretch(); 316 - fn dsp_timestretch_enable(); 317 - fn dsp_timestretch_available(); 318 - fn dsp_configure(); 319 - fn dsp_get_config(); 320 - fn dsp_process(); 321 - fn mixer_channel_status(); 322 - fn mixer_channel_get_buffer(); 323 - fn mixer_channel_calculate_peaks(); 324 - fn mixer_channel_play_data(); 325 - fn mixer_channel_play_pause(); 326 - fn mixer_channel_stop(); 327 - fn mixer_channel_set_amplitude(); 328 - fn mixer_channel_get_bytes_waiting(); 329 - fn mixer_channel_set_buffer_hook(); 330 - fn mixer_set_frequency(); 331 - fn mixer_get_frequency(); 332 - fn pcmbuf_fade(); 333 - fn pcmbuf_set_low_latency(); 334 - fn system_sound_play(); 335 - fn keyclick_click(); 684 + fn beep_play(frequency: c_uint, duration: c_uint, amplitude: c_uint); 685 + fn dsp_set_crossfeed_type(r#type: c_int); 686 + fn dsp_eq_enable(enable: c_uchar); 687 + fn dsp_dither_enable(enable: c_uchar); 688 + fn dsp_get_timestretch() -> c_int; 689 + fn dsp_set_timestretch(percent: c_int); 690 + fn dsp_timestretch_enable(enabled: c_uchar); 691 + fn dsp_timestretch_available() -> c_uchar; 692 + fn dsp_configure(dsp: *mut DspConfig, setting: c_uint, value: c_long) -> c_long; 693 + fn dsp_get_config(dsp_id: c_int) -> *mut DspConfig; 694 + fn dsp_process(dsp: *mut DspConfig, src: *mut DspBuffer, dst: *mut *mut DspBuffer); 695 + fn mixer_channel_status(channel: PcmMixerChannel) -> ChannelStatus; 696 + fn mixer_channel_get_buffer(channel: PcmMixerChannel, count: *mut c_int) -> *mut c_void; 697 + fn mixer_channel_calculate_peaks(channel: PcmMixerChannel, peaks: *mut PcmPeaks); 698 + fn mixer_channel_play_data( 699 + channel: PcmMixerChannel, 700 + get_more: PcmPlayCallbackType, 701 + start: *const *const c_void, 702 + size: usize, 703 + ); 704 + fn mixer_channel_play_pause(channel: PcmMixerChannel, play: c_uchar); 705 + fn mixer_channel_stop(channel: PcmMixerChannel); 706 + fn mixer_channel_set_amplitude(channel: PcmMixerChannel, amplitude: c_uint); 707 + fn mixer_channel_get_bytes_waiting(channel: PcmMixerChannel) -> usize; 708 + fn mixer_channel_set_buffer_hook(channel: PcmMixerChannel, r#fn: ChanBufferHookFnType); 709 + fn mixer_set_frequency(samplerate: c_uint); 710 + fn mixer_get_frequency() -> c_uint; 711 + fn pcmbuf_fade(fade: c_int, r#in: c_uchar); 712 + fn pcmbuf_set_low_latency(state: c_uchar); 713 + fn system_sound_play(sound: SystemSound); 714 + fn keyclick_click(rawbutton: c_uchar, action: c_int); 336 715 337 716 // Browsing 338 717 fn rockbox_browse(browse: *mut BrowseContext) -> c_int; ··· 360 739 ) -> c_uchar; 361 740 362 741 // Directory 363 - fn opendir(); 364 - fn closedir(); 365 - fn readdir(); 366 - fn mkdir(); 367 - fn rmdir(); 368 - fn dir_get_info(); 742 + fn opendir(dirname: *const c_char) -> *mut Dir; 743 + fn closedir(dirp: *mut Dir) -> c_int; 744 + fn readdir(dirp: *mut Dir) -> *mut dirent; 745 + fn mkdir(path: *const c_char) -> c_int; 746 + fn rmdir(path: *const c_char) -> c_int; 747 + fn dir_get_info(dirp: *mut Dir, entry: *mut dirent) -> *mut Dirent; 369 748 370 749 // File 371 750 fn open_utf8(); ··· 390 769 fn filetype_get_plugin(); 391 770 392 771 // Metadata 393 - fn get_metadata(); 394 - fn get_codec_string(); 395 - fn count_mp3_frames(); 396 - fn create_xing_header(); 397 - fn tagcache_search(); 398 - fn tagcache_search_set_uniqbuf(); 399 - fn tagcache_search_add_filter(); 400 - fn tagcache_get_next(); 401 - fn tagcache_get_numeric(); 402 - fn tagcache_get_stat(); 772 + fn get_metadata(id3: *mut Mp3Entry, fd: c_int, trackname: *const c_char) -> c_uchar; 773 + fn get_codec_string(codectype: c_int) -> *const c_char; 774 + fn count_mp3_frames( 775 + fd: c_int, 776 + startpos: c_int, 777 + filesize: c_int, 778 + progressfunc: ProgressFunc, 779 + buf: *mut c_uchar, 780 + buflen: usize, 781 + ) -> c_int; 782 + fn create_xing_header( 783 + fd: c_int, 784 + startpos: c_long, 785 + filesize: c_long, 786 + buf: *mut c_uchar, 787 + num_frames: c_ulong, 788 + rec_time: c_ulong, 789 + header_template: c_ulong, 790 + progressfunc: ProgressFunc, 791 + generate_toc: c_uchar, 792 + tempbuf: *mut c_uchar, 793 + tembuf_len: usize, 794 + ) -> c_int; 795 + fn tagcache_search(tcs: *mut TagcacheSearch, tag: c_int) -> c_uchar; 796 + fn tagcache_search_set_uniqbuf(tcs: *mut TagcacheSearch, buffer: *mut c_void, length: c_long); 797 + fn tagcache_search_add_filter(tcs: *mut TagcacheSearch, tag: c_int, seek: c_int) -> c_uchar; 798 + fn tagcache_get_next(tcs: *mut TagcacheSearch, buf: *mut c_char, size: c_long) -> c_uchar; 799 + // fn tagcahe_retrieve(tcs: *mut TagcacheSearch, idxid: c_int, tag: c_int) -> c_uchar; 800 + // fn tagcache_search_finish(tcs: *mut TagcacheSearch); 801 + fn tagcache_get_numeric(tcs: *mut TagcacheSearch, tag: c_int) -> c_long; 802 + fn tagcache_get_stat() -> *mut TagcacheStat; 403 803 fn tagcache_commit_finalize(); 404 - fn tagtree_subentries_do_action(); 405 - fn search_albumart_files(); 804 + fn tagtree_subentries_do_action(cb: ActionCb) -> c_uchar; 805 + fn search_albumart_files( 806 + id3: *mut Mp3Entry, 807 + size_string: *const c_char, 808 + buf: *mut c_char, 809 + buflen: c_int, 810 + ) -> c_uchar; 406 811 407 812 // Kernel / System 408 813 fn sleep(ticks: c_uint); ··· 433 838 fn root_menu_load_from_cfg(); 434 839 435 840 // Settings 436 - fn get_settings_list(count: *mut c_int); 437 - fn find_setting(); 438 - fn settings_save(); 439 - fn option_screen(); 440 - fn set_option(); 441 - fn set_bool_options(); 442 - fn set_int(); 443 - fn set_int_ex(); 444 - fn set_bool(); 445 - fn set_color(); 841 + fn get_settings_list(count: *mut c_int) -> *mut SettingsList; 842 + fn find_setting(variable: *const c_void) -> *mut SettingsList; 843 + fn settings_save() -> c_int; 844 + fn option_screen( 845 + setting: *mut SettingsList, 846 + parent: [Viewport; NB_SCREENS], 847 + use_temp_var: c_uchar, 848 + option_title: *mut c_uchar, 849 + ) -> c_uchar; 850 + fn set_option( 851 + string: *const c_char, 852 + options: *const OptItems, 853 + numoptions: c_int, 854 + function: Option<extern "C" fn(x: c_int) -> c_uchar>, 855 + ) -> c_uchar; 856 + fn set_bool_options( 857 + string: *const c_char, 858 + variable: *const c_uchar, 859 + yes_str: *const c_char, 860 + yes_voice: c_int, 861 + no_str: *const c_char, 862 + no_voice: c_int, 863 + function: Option<extern "C" fn(x: c_int) -> c_uchar>, 864 + ); 865 + fn set_int( 866 + unit: *const c_char, 867 + voice_unit: c_int, 868 + variable: *const c_int, 869 + function: Option<extern "C" fn(c_int)>, 870 + step: c_int, 871 + min: c_int, 872 + max: c_int, 873 + formatter: Option<extern "C" fn(*mut c_char, usize, c_int, *const c_char) -> *const c_char>, 874 + ); 875 + fn set_int_ex( 876 + unit: *const c_char, 877 + voice_unit: c_int, 878 + variable: *const c_int, 879 + function: Option<extern "C" fn(c_int)>, 880 + step: c_int, 881 + min: c_int, 882 + max: c_int, 883 + formatter: Option<extern "C" fn(*mut c_char, usize, c_int, *const c_char) -> *const c_char>, 884 + get_talk_id: Option<extern "C" fn(c_int, c_int) -> c_int>, 885 + ); 886 + fn set_bool(string: *const c_char, variable: *const c_uchar) -> c_uchar; 446 887 447 888 // Misc 448 889 fn codec_load_file();
+48 -14
crates/sys/src/metadata.rs
··· 1 - pub fn get_metadata() { 2 - unsafe { 3 - crate::get_metadata(); 4 - } 1 + use std::ffi::{c_uchar, CStr, CString}; 2 + 3 + use crate::{Mp3Entry, ProgressFunc}; 4 + 5 + pub fn get_metadata(id3: *mut Mp3Entry, fd: i32, trackname: &str) -> bool { 6 + let trackname = CString::new(trackname).unwrap(); 7 + let ret = unsafe { crate::get_metadata(id3, fd, trackname.as_ptr()) }; 8 + ret != 0 5 9 } 6 10 7 - pub fn get_codec_string() { 8 - unsafe { 9 - crate::get_codec_string(); 10 - } 11 + pub fn get_codec_string(codectype: i32) -> String { 12 + let res = unsafe { crate::get_codec_string(codectype) }; 13 + let codec_string = unsafe { CStr::from_ptr(res) }; 14 + codec_string.to_str().unwrap().to_string() 11 15 } 12 16 13 - pub fn count_mp3_frames() { 14 - unsafe { 15 - crate::count_mp3_frames(); 16 - } 17 + pub fn count_mp3_frames( 18 + fd: i32, 19 + startpos: i32, 20 + filesize: i32, 21 + progressfunc: ProgressFunc, 22 + buf: *mut c_uchar, 23 + buflen: usize, 24 + ) -> i32 { 25 + unsafe { crate::count_mp3_frames(fd, startpos, filesize, progressfunc, buf, buflen) } 17 26 } 18 27 19 - pub fn create_xing_header() { 28 + pub fn create_xing_header( 29 + fd: i32, 30 + startpos: i64, 31 + filesize: i64, 32 + buf: *mut c_uchar, 33 + num_frames: u64, 34 + rec_time: u64, 35 + header_template: u64, 36 + progressfunc: ProgressFunc, 37 + generate_toc: bool, 38 + tempbuf: *mut c_uchar, 39 + tembuf_len: usize, 40 + ) -> i32 { 41 + let generate_toc = if generate_toc { 1 } else { 0 }; 20 42 unsafe { 21 - crate::create_xing_header(); 43 + crate::create_xing_header( 44 + fd, 45 + startpos, 46 + filesize, 47 + buf, 48 + num_frames, 49 + rec_time, 50 + header_template, 51 + progressfunc, 52 + generate_toc, 53 + tempbuf, 54 + tembuf_len, 55 + ) 22 56 } 23 57 }
+14 -33
crates/sys/src/playback.rs
··· 1 + use crate::Mp3Entry; 2 + 1 3 pub fn pause() { 2 - unsafe { 3 - crate::audio_pause(); 4 - } 4 + unsafe { crate::audio_pause() } 5 5 } 6 6 7 7 pub fn play(elapsed: i64, offset: i64) { 8 - unsafe { 9 - crate::audio_play(elapsed, offset); 10 - } 8 + unsafe { crate::audio_play(elapsed, offset) } 11 9 } 12 10 13 11 pub fn resume() { 14 - unsafe { 15 - crate::audio_resume(); 16 - } 12 + unsafe { crate::audio_resume() } 17 13 } 18 14 19 15 pub fn next() { 20 - unsafe { 21 - crate::audio_next(); 22 - } 16 + unsafe { crate::audio_next() } 23 17 } 24 18 25 19 pub fn prev() { 26 - unsafe { 27 - crate::audio_prev(); 28 - } 20 + unsafe { crate::audio_prev() } 29 21 } 30 22 31 23 pub fn ff_rewind(newtime: i32) { 32 - unsafe { 33 - crate::audio_ff_rewind(newtime); 34 - } 24 + unsafe { crate::audio_ff_rewind(newtime) } 35 25 } 36 26 37 - pub fn next_track() { 38 - unsafe { 39 - crate::audio_next_track(); 40 - } 27 + pub fn next_track() -> *mut Mp3Entry { 28 + unsafe { crate::audio_next_track() } 41 29 } 42 30 43 31 pub fn status() -> i32 { 44 32 unsafe { crate::audio_status() } 45 33 } 46 34 47 - pub fn current_track() { 48 - let track = unsafe { 49 - crate::audio_current_track(); 50 - }; 51 - println!("{:?}", track); 35 + pub fn current_track() -> *mut Mp3Entry { 36 + unsafe { crate::audio_current_track() } 52 37 } 53 38 54 39 pub fn flush_and_reload_tracks() { 55 - unsafe { 56 - crate::audio_flush_and_reload_tracks(); 57 - } 40 + unsafe { crate::audio_flush_and_reload_tracks() } 58 41 } 59 42 60 43 pub fn get_file_pos() -> i32 { ··· 62 45 } 63 46 64 47 pub fn hard_stop() { 65 - unsafe { 66 - crate::audio_hard_stop(); 67 - } 48 + unsafe { crate::audio_hard_stop() } 68 49 }
+95 -36
crates/sys/src/settings.rs
··· 1 - use std::ffi::c_int; 1 + use std::ffi::{c_char, c_int, c_uchar, c_void, CString}; 2 2 3 - pub fn get_settings_list(mut count: i32) { 4 - unsafe { 5 - crate::get_settings_list(&mut count as *mut i32 as *mut c_int); 6 - } 7 - } 3 + use crate::{OptItems, SettingsList, Viewport, NB_SCREENS}; 8 4 9 - pub fn find_setting() { 10 - unsafe { 11 - crate::find_setting(); 12 - } 5 + pub fn get_settings_list(mut count: i32) -> *mut SettingsList { 6 + unsafe { crate::get_settings_list(&mut count as *mut i32 as *mut c_int) } 13 7 } 14 8 15 - pub fn settings_save() { 16 - unsafe { 17 - crate::settings_save(); 18 - } 9 + pub fn find_setting(variable: *const c_void) -> *mut SettingsList { 10 + unsafe { crate::find_setting(variable) } 19 11 } 20 12 21 - pub fn option_screen() { 22 - unsafe { 23 - crate::option_screen(); 24 - } 13 + pub fn settings_save() -> i32 { 14 + unsafe { crate::settings_save() } 25 15 } 26 16 27 - pub fn set_option() { 28 - unsafe { 29 - crate::set_option(); 30 - } 17 + pub fn option_screen( 18 + setting: *mut SettingsList, 19 + parent: [Viewport; NB_SCREENS], 20 + use_temp_var: bool, 21 + option_title: *mut c_uchar, 22 + ) -> bool { 23 + let use_temp_var = if use_temp_var { 1 } else { 0 }; 24 + let ret = unsafe { crate::option_screen(setting, parent, use_temp_var, option_title) }; 25 + ret != 0 31 26 } 32 27 33 - pub fn set_bool_options() { 34 - unsafe { 35 - crate::set_bool_options(); 36 - } 28 + pub fn set_option( 29 + string: &str, 30 + options: *const OptItems, 31 + numoptions: i32, 32 + function: Option<extern "C" fn(x: c_int) -> c_uchar>, 33 + ) -> bool { 34 + let sttring = CString::new(string).unwrap(); 35 + let ret = unsafe { crate::set_option(sttring.as_ptr(), options, numoptions, function) }; 36 + ret != 0 37 37 } 38 38 39 - pub fn set_int() { 39 + pub fn set_bool_options( 40 + string: &str, 41 + variable: *const c_uchar, 42 + yes_str: &str, 43 + yes_voice: i32, 44 + no_str: &str, 45 + no_voice: i32, 46 + function: Option<extern "C" fn(x: c_int) -> c_uchar>, 47 + ) { 48 + let string = CString::new(string).unwrap(); 49 + let yes_str = CString::new(yes_str).unwrap(); 50 + let no_str = CString::new(no_str).unwrap(); 40 51 unsafe { 41 - crate::set_int(); 52 + crate::set_bool_options( 53 + string.as_ptr(), 54 + variable, 55 + yes_str.as_ptr(), 56 + yes_voice, 57 + no_str.as_ptr(), 58 + no_voice, 59 + function, 60 + ) 42 61 } 43 62 } 44 63 45 - pub fn set_int_ex() { 64 + pub fn set_int( 65 + unit: &str, 66 + voice_unit: i32, 67 + variable: *const c_int, 68 + function: Option<extern "C" fn(c_int)>, 69 + step: c_int, 70 + min: c_int, 71 + max: c_int, 72 + formatter: Option<extern "C" fn(*mut c_char, usize, c_int, *const c_char) -> *const c_char>, 73 + ) { 74 + let unit = CString::new(unit).unwrap(); 46 75 unsafe { 47 - crate::set_int_ex(); 76 + crate::set_int( 77 + unit.as_ptr(), 78 + voice_unit, 79 + variable, 80 + function, 81 + step, 82 + min, 83 + max, 84 + formatter, 85 + ) 48 86 } 49 87 } 50 88 51 - pub fn set_bool() { 89 + pub fn set_int_ex( 90 + unit: &str, 91 + voice_unit: i32, 92 + variable: *const c_int, 93 + function: Option<extern "C" fn(c_int)>, 94 + step: i32, 95 + min: i32, 96 + max: i32, 97 + formatter: Option<extern "C" fn(*mut c_char, usize, c_int, *const c_char) -> *const c_char>, 98 + get_talk_id: Option<extern "C" fn(c_int, c_int) -> c_int>, 99 + ) { 100 + let unit = CString::new(unit).unwrap(); 52 101 unsafe { 53 - crate::set_bool(); 102 + crate::set_int_ex( 103 + unit.as_ptr(), 104 + voice_unit, 105 + variable, 106 + function, 107 + step, 108 + min, 109 + max, 110 + formatter, 111 + get_talk_id, 112 + ) 54 113 } 55 114 } 56 115 57 - pub fn set_color() { 58 - unsafe { 59 - crate::set_color(); 60 - } 116 + pub fn set_bool(string: &str, variable: *const c_uchar) -> bool { 117 + let string = CString::new(string).unwrap(); 118 + let ret = unsafe { crate::set_bool(string.as_ptr(), variable) }; 119 + ret != 0 61 120 }
+26 -40
crates/sys/src/sound/dsp.rs
··· 1 - pub fn set_crossfeed_type() { 2 - unsafe { 3 - crate::dsp_set_crossfeed_type(); 4 - } 1 + use crate::{DspBuffer, DspConfig}; 2 + 3 + pub fn set_crossfeed_type(r#type: i32) { 4 + unsafe { crate::dsp_set_crossfeed_type(r#type) } 5 5 } 6 6 7 - pub fn eq_enable() { 8 - unsafe { 9 - crate::dsp_eq_enable(); 10 - } 7 + pub fn eq_enable(enable: bool) { 8 + let enable = if enable { 1 } else { 0 }; 9 + unsafe { crate::dsp_eq_enable(enable) } 11 10 } 12 11 13 - pub fn dither_enable() { 14 - unsafe { 15 - crate::dsp_dither_enable(); 16 - } 12 + pub fn dither_enable(enable: bool) { 13 + let enable = if enable { 1 } else { 0 }; 14 + unsafe { crate::dsp_dither_enable(enable) } 17 15 } 18 16 19 - pub fn get_timestretch() { 20 - unsafe { 21 - crate::dsp_get_timestretch(); 22 - } 17 + pub fn get_timestretch() -> i32 { 18 + unsafe { crate::dsp_get_timestretch() } 23 19 } 24 20 25 - pub fn set_timestretch() { 26 - unsafe { 27 - crate::dsp_set_timestretch(); 28 - } 21 + pub fn set_timestretch(percent: i32) { 22 + unsafe { crate::dsp_set_timestretch(percent) } 29 23 } 30 24 31 - pub fn timestretch_enable() { 32 - unsafe { 33 - crate::dsp_timestretch_enable(); 34 - } 25 + pub fn timestretch_enable(enabled: bool) { 26 + let enabled = if enabled { 1 } else { 0 }; 27 + unsafe { crate::dsp_timestretch_enable(enabled) } 35 28 } 36 29 37 - pub fn timestretch_available() { 38 - unsafe { 39 - crate::dsp_timestretch_available(); 40 - } 30 + pub fn timestretch_available() -> bool { 31 + let ret = unsafe { crate::dsp_timestretch_available() }; 32 + ret != 0 41 33 } 42 34 43 - pub fn configure() { 44 - unsafe { 45 - crate::dsp_configure(); 46 - } 35 + pub fn configure(dsp: *mut DspConfig, setting: u32, value: i64) -> i64 { 36 + unsafe { crate::dsp_configure(dsp, setting, value) } 47 37 } 48 38 49 - pub fn get_config() { 50 - unsafe { 51 - crate::dsp_get_config(); 52 - } 39 + pub fn get_config(dsp_id: i32) -> *mut DspConfig { 40 + unsafe { crate::dsp_get_config(dsp_id) } 53 41 } 54 42 55 - pub fn process() { 56 - unsafe { 57 - crate::dsp_process(); 58 - } 43 + pub fn process(dsp: *mut DspConfig, src: *mut DspBuffer, dst: *mut *mut DspBuffer) { 44 + unsafe { crate::dsp_process(dsp, src, dst) } 59 45 }
+32 -36
crates/sys/src/sound/mixer.rs
··· 1 - pub fn channel_status() { 2 - unsafe { 3 - crate::mixer_channel_status(); 4 - } 1 + use std::ffi::{c_int, c_void}; 2 + 3 + use crate::{ChanBufferHookFnType, ChannelStatus, PcmMixerChannel, PcmPeaks, PcmPlayCallbackType}; 4 + 5 + pub fn channel_status(channel: PcmMixerChannel) -> ChannelStatus { 6 + unsafe { crate::mixer_channel_status(channel) } 5 7 } 6 8 7 - pub fn channel_get_buffer() { 8 - unsafe { 9 - crate::mixer_channel_get_buffer(); 10 - } 9 + pub fn channel_get_buffer(channel: PcmMixerChannel, count: *mut c_int) -> *mut c_void { 10 + unsafe { crate::mixer_channel_get_buffer(channel, count) } 11 11 } 12 12 13 - pub fn channel_calculate_peaks() { 13 + pub fn channel_calculate_peaks(channel: PcmMixerChannel, peaks: *mut PcmPeaks) { 14 14 unsafe { 15 - crate::mixer_channel_calculate_peaks(); 15 + crate::mixer_channel_calculate_peaks(channel, peaks); 16 16 } 17 17 } 18 18 19 - pub fn channel_play_data() { 20 - unsafe { 21 - crate::mixer_channel_play_data(); 22 - } 19 + pub fn channel_play_data( 20 + channel: PcmMixerChannel, 21 + get_more: PcmPlayCallbackType, 22 + start: *const *const c_void, 23 + size: usize, 24 + ) { 25 + unsafe { crate::mixer_channel_play_data(channel, get_more, start, size) } 23 26 } 24 27 25 - pub fn channel_play_pause() { 26 - unsafe { 27 - crate::mixer_channel_play_pause(); 28 - } 28 + pub fn channel_play_pause(channel: PcmMixerChannel, play: bool) { 29 + let play = if play { 1 } else { 0 }; 30 + unsafe { crate::mixer_channel_play_pause(channel, play) } 29 31 } 30 32 31 - pub fn channel_stop() { 33 + pub fn channel_stop(channel: PcmMixerChannel) { 32 34 unsafe { 33 - crate::mixer_channel_stop(); 35 + crate::mixer_channel_stop(channel); 34 36 } 35 37 } 36 38 37 - pub fn channel_set_amplitude() { 39 + pub fn channel_set_amplitude(channel: PcmMixerChannel, amplitude: u32) { 38 40 unsafe { 39 - crate::mixer_channel_set_amplitude(); 41 + crate::mixer_channel_set_amplitude(channel, amplitude); 40 42 } 41 43 } 42 44 43 - pub fn channel_get_bytes_waiting() { 44 - unsafe { 45 - crate::mixer_channel_get_bytes_waiting(); 46 - } 45 + pub fn channel_get_bytes_waiting(channel: PcmMixerChannel) -> usize { 46 + unsafe { crate::mixer_channel_get_bytes_waiting(channel) } 47 47 } 48 48 49 - pub fn channel_set_buffer_hook() { 50 - unsafe { 51 - crate::mixer_channel_set_buffer_hook(); 52 - } 49 + pub fn channel_set_buffer_hook(channel: PcmMixerChannel, r#fn: ChanBufferHookFnType) { 50 + unsafe { crate::mixer_channel_set_buffer_hook(channel, r#fn) } 53 51 } 54 52 55 - pub fn set_frequency() { 53 + pub fn set_frequency(samplerate: u32) { 56 54 unsafe { 57 - crate::mixer_set_frequency(); 55 + crate::mixer_set_frequency(samplerate); 58 56 } 59 57 } 60 58 61 - pub fn get_frequency() { 62 - unsafe { 63 - crate::mixer_get_frequency(); 64 - } 59 + pub fn get_frequency() -> u32 { 60 + unsafe { crate::mixer_get_frequency() } 65 61 }
+39 -62
crates/sys/src/sound/mod.rs
··· 1 + use std::ffi::CStr; 2 + 3 + use crate::SystemSound; 4 + 1 5 pub mod dsp; 2 6 pub mod mixer; 3 7 pub mod pcm; 4 8 5 - pub fn adjust_volume() { 6 - unsafe { 7 - crate::adjust_volume(); 8 - } 9 + pub fn adjust_volume(steps: i32) { 10 + unsafe { crate::adjust_volume(steps) } 9 11 } 10 12 11 - pub fn set() { 12 - unsafe { 13 - crate::sound_set(); 14 - } 13 + pub fn set(setting: i32, value: i32) { 14 + unsafe { crate::sound_set(setting, value) } 15 15 } 16 16 17 - pub fn current() { 18 - unsafe { 19 - crate::sound_current(); 20 - } 17 + pub fn current(setting: i32) -> i32 { 18 + unsafe { crate::sound_current(setting) } 21 19 } 22 20 23 - pub fn default() { 24 - unsafe { 25 - crate::sound_default(); 26 - } 21 + pub fn default(setting: i32) -> i32 { 22 + unsafe { crate::sound_default(setting) } 27 23 } 28 24 29 - pub fn min() { 30 - unsafe { 31 - crate::sound_min(); 32 - } 25 + pub fn min(setting: i32) -> i32 { 26 + unsafe { crate::sound_min(setting) } 33 27 } 34 28 35 - pub fn max() { 36 - unsafe { 37 - crate::sound_max(); 38 - } 29 + pub fn max(setting: i32) -> i32 { 30 + unsafe { crate::sound_max(setting) } 39 31 } 40 32 41 - pub fn unit() { 42 - unsafe { 43 - crate::sound_unit(); 44 - } 33 + pub fn unit(setting: i32) -> String { 34 + let ret = unsafe { crate::sound_unit(setting) }; 35 + let unit = unsafe { CStr::from_ptr(ret) }; 36 + unit.to_str().unwrap().to_string() 45 37 } 46 38 47 - pub fn val2phys() { 48 - unsafe { 49 - crate::sound_val2phys(); 50 - } 39 + pub fn val2phys(setting: i32, value: i32) -> i32 { 40 + unsafe { crate::sound_val2phys(setting, value) } 51 41 } 52 42 53 - pub fn get_pitch() { 54 - unsafe { 55 - crate::sound_get_pitch(); 56 - } 43 + pub fn get_pitch() -> i32 { 44 + unsafe { crate::sound_get_pitch() } 57 45 } 58 46 59 - pub fn set_pitch() { 60 - unsafe { 61 - crate::sound_set_pitch(); 62 - } 47 + pub fn set_pitch(pitch: i32) { 48 + unsafe { crate::sound_set_pitch(pitch) } 63 49 } 64 50 65 - pub fn audio_master_sampr_list() { 66 - unsafe { 67 - crate::audio_master_sampr_list(); 68 - } 69 - } 70 - 71 - pub fn beep_play() { 72 - unsafe { 73 - crate::beep_play(); 74 - } 51 + pub fn beep_play(frequency: u32, duration: u32, amplitude: u32) { 52 + unsafe { crate::beep_play(frequency, duration, amplitude) } 75 53 } 76 54 77 - pub fn pcmbuf_fade() { 55 + pub fn pcmbuf_fade(fade: i32, r#in: bool) { 56 + let r#in = if r#in { 1 } else { 0 }; 78 57 unsafe { 79 - crate::pcmbuf_fade(); 58 + crate::pcmbuf_fade(fade, r#in); 80 59 } 81 60 } 82 61 83 - pub fn pcmbuf_set_low_latency() { 62 + pub fn pcmbuf_set_low_latency(state: bool) { 63 + let state = if state { 1 } else { 0 }; 84 64 unsafe { 85 - crate::pcmbuf_set_low_latency(); 65 + crate::pcmbuf_set_low_latency(state); 86 66 } 87 67 } 88 68 89 - pub fn system_sound_play() { 90 - unsafe { 91 - crate::system_sound_play(); 92 - } 69 + pub fn system_sound_play(sound: SystemSound) { 70 + unsafe { crate::system_sound_play(sound) } 93 71 } 94 72 95 - pub fn keyclick_click() { 96 - unsafe { 97 - crate::keyclick_click(); 98 - } 73 + pub fn keyclick_click(rawbutton: bool, action: i32) { 74 + let rawbutton = if rawbutton { 1 } else { 0 }; 75 + unsafe { crate::keyclick_click(rawbutton, action) } 99 76 }
+16 -12
crates/sys/src/sound/pcm.rs
··· 1 + use std::ffi::c_void; 2 + 3 + use crate::{PcmPlayCallbackType, PcmStatusCallbackType}; 4 + 1 5 pub fn apply_settings() { 2 6 unsafe { 3 7 crate::pcm_apply_settings(); 4 8 } 5 9 } 6 10 7 - pub fn play_data() { 8 - unsafe { 9 - crate::pcm_play_data(); 10 - } 11 + pub fn play_data( 12 + get_more: PcmPlayCallbackType, 13 + status_cb: PcmStatusCallbackType, 14 + start: *const *const c_void, 15 + size: usize, 16 + ) { 17 + unsafe { crate::pcm_play_data(get_more, status_cb, start, size) } 11 18 } 12 19 13 20 pub fn play_stop() { ··· 16 23 } 17 24 } 18 25 19 - pub fn set_frequency() { 20 - unsafe { 21 - crate::pcm_set_frequency(); 22 - } 26 + pub fn set_frequency(frequency: u32) { 27 + unsafe { crate::pcm_set_frequency(frequency) } 23 28 } 24 29 25 - pub fn is_playing() { 26 - unsafe { 27 - crate::pcm_is_playing(); 28 - } 30 + pub fn is_playing() -> bool { 31 + let ret = unsafe { crate::pcm_is_playing() }; 32 + ret != 0 29 33 } 30 34 31 35 pub fn play_lock() {
+30 -32
crates/sys/src/tagcache.rs
··· 1 - pub fn search() { 2 - unsafe { 3 - crate::tagcache_search(); 4 - } 1 + use std::ffi::{c_char, c_void}; 2 + 3 + use crate::{ActionCb, Mp3Entry, TagcacheSearch, TagcacheStat}; 4 + 5 + pub fn search(tcs: *mut TagcacheSearch, tag: i32) -> bool { 6 + let ret = unsafe { crate::tagcache_search(tcs, tag) }; 7 + ret != 0 5 8 } 6 9 7 - pub fn search_set_uniqbuf() { 8 - unsafe { 9 - crate::tagcache_search_set_uniqbuf(); 10 - } 10 + pub fn search_set_uniqbuf(tcs: *mut TagcacheSearch, buffer: *mut c_void, length: i64) { 11 + unsafe { crate::tagcache_search_set_uniqbuf(tcs, buffer, length) } 11 12 } 12 13 13 - pub fn search_add_filter() { 14 - unsafe { 15 - crate::tagcache_search_add_filter(); 16 - } 14 + pub fn search_add_filter(tcs: *mut TagcacheSearch, tag: i32, seek: i32) -> bool { 15 + let ret = unsafe { crate::tagcache_search_add_filter(tcs, tag, seek) }; 16 + ret != 0 17 17 } 18 18 19 - pub fn get_next() { 20 - unsafe { 21 - crate::tagcache_get_next(); 22 - } 19 + pub fn get_next(tcs: *mut TagcacheSearch, buf: *mut c_char, size: i64) -> bool { 20 + let ret = unsafe { crate::tagcache_get_next(tcs, buf, size) }; 21 + ret != 0 23 22 } 24 23 25 - pub fn get_numeric() { 26 - unsafe { 27 - crate::tagcache_get_numeric(); 28 - } 24 + pub fn get_numeric(tcs: *mut TagcacheSearch, tag: i32) -> i64 { 25 + unsafe { crate::tagcache_get_numeric(tcs, tag) } 29 26 } 30 27 31 - pub fn get_stat() { 32 - unsafe { 33 - crate::tagcache_get_stat(); 34 - } 28 + pub fn get_stat() -> *mut TagcacheStat { 29 + unsafe { crate::tagcache_get_stat() } 35 30 } 36 31 37 32 pub fn commit_finalize() { ··· 40 35 } 41 36 } 42 37 43 - pub fn tagtree_subentries_do_action() { 44 - unsafe { 45 - crate::tagtree_subentries_do_action(); 46 - } 38 + pub fn tagtree_subentries_do_action(cb: ActionCb) -> bool { 39 + let ret = unsafe { crate::tagtree_subentries_do_action(cb) }; 40 + ret != 0 47 41 } 48 42 49 - pub fn search_albumart_files() { 50 - unsafe { 51 - crate::search_albumart_files(); 52 - } 43 + pub fn search_albumart_files( 44 + id3: *mut Mp3Entry, 45 + size_string: *const c_char, 46 + buf: *mut c_char, 47 + buflen: i32, 48 + ) -> bool { 49 + let ret = unsafe { crate::search_albumart_files(id3, size_string, buf, buflen) }; 50 + ret != 0 53 51 }
+8
flake.nix
··· 36 36 pkgs.zlib 37 37 pkgs.cargo 38 38 pkgs.rustc 39 + pkgs.protobuf 40 + pkgs.buf 41 + pkgs.libunwind 39 42 ]; 40 43 41 44 # Smaller binaries and avoids shipping glibc. ··· 104 107 pkgs.zlib 105 108 pkgs.cargo 106 109 pkgs.rustc 110 + pkgs.protobuf 111 + pkgs.buf 112 + pkgs.libunwind 113 + pkgs.evans 114 + pkgs.grpcurl 107 115 ]; 108 116 }; 109 117 }));