diff --git a/.travis.yml b/.travis.yml index 4432a37d..6a28f10a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: rust rust: - - 1.26.0 + - 1.32.0 - stable - beta - nightly @@ -14,6 +14,8 @@ addons: - libc6-dev-armhf-cross - libpulse-dev - portaudio19-dev + - libasound2-dev + - libsdl2-dev before_script: - mkdir -p ~/.cargo @@ -25,9 +27,12 @@ script: - cargo build --locked --no-default-features - cargo build --locked --no-default-features --features "with-tremor" - cargo build --locked --no-default-features --features "with-vorbis" + - cargo build --locked --no-default-features --features "alsa-backend" - cargo build --locked --no-default-features --features "portaudio-backend" - cargo build --locked --no-default-features --features "pulseaudio-backend" - - cargo build --locked --no-default-features --features "alsa-backend" + - cargo build --locked --no-default-features --features "jackaudio-backend" + - cargo build --locked --no-default-features --features "rodio-backend" + - cargo build --locked --no-default-features --features "sdl-backend" - cargo build --locked --no-default-features --target armv7-unknown-linux-gnueabihf notifications: diff --git a/Cargo.lock b/Cargo.lock index 67573c29..5d847401 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,43 +1,154 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "aes" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aes-ctr" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aes-soft" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aesni" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "aho-corasick" version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aho-corasick" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "alga" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "approx 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libm 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-complex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "alsa" -version = "0.0.1" -source = "git+https://github.com/plietar/rust-alsa#8c63543fa0ccd971cf15f5675293d19febd6f79e" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "alsa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "alsa-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "approx" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "arc-swap" -version = "0.3.7" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "arrayvec" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "atty" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "autocfg" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "base64" -version = "0.5.2" +name = "backtrace" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "backtrace-sys" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -45,21 +156,48 @@ name = "base64" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "bit-set" -version = "0.4.0" +name = "base64" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bindgen" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cexpr 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "clang-sys 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bit-set" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bit-vec" -version = "0.4.4" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -74,7 +212,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "1.0.4" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bitflags" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-cipher-trait" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-modes" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-padding" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "byte-tools" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -84,7 +268,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -92,10 +276,19 @@ name = "bytes" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "c2-chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "c_linked_list" version = "1.1.1" @@ -103,20 +296,102 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cc" -version = "1.0.31" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "cfg-if" -version = "0.1.7" +name = "cexpr" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cfg-if" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "chrono" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "clang-sys" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "libloading 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "clap" +version = "2.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "core-foundation-sys" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "coreaudio-rs" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "coreaudio-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "coreaudio-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bindgen 0.32.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cpal" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "alsa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "coreaudio-rs 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "stdweb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -124,21 +399,21 @@ name = "crossbeam-deque" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-epoch" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -146,18 +421,44 @@ name = "crossbeam-queue" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-utils" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ctr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "dns-parser" version = "0.3.2" @@ -173,15 +474,10 @@ name = "dns-sd" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "dtoa" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "env_logger" version = "0.4.3" @@ -192,22 +488,50 @@ dependencies = [ ] [[package]] -name = "error-chain" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "extprim" -version = "1.6.0" +name = "env_logger" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "error-chain" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "failure" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "failure_derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "fnv" version = "1.0.6" @@ -223,7 +547,7 @@ name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -234,7 +558,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.25" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -242,8 +566,8 @@ name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -251,6 +575,14 @@ name = "gcc" version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "generic-array" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "get_if_addrs" version = "0.5.3" @@ -258,7 +590,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -268,21 +600,57 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "getopts" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "httparse" -version = "1.3.3" +name = "getrandom" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "glob" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "hex" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "hmac" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "httparse" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "humantime" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "hyper" @@ -291,12 +659,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -306,7 +674,7 @@ dependencies = [ "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -316,7 +684,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -337,13 +705,13 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "itoa" -version = "0.3.4" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -354,7 +722,7 @@ dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "jack-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -363,7 +731,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -381,34 +749,27 @@ name = "language-tags" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lazy_static" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lazy_static" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazycell" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "lewton" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "ogg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libc" -version = "0.2.50" +version = "0.2.60" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -421,22 +782,28 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "libm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "libpulse-sys" version = "0.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "librespot" version = "0.1.0" dependencies = [ - "base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "librespot-audio 0.1.0", "librespot-connect 0.1.0", @@ -444,39 +811,34 @@ dependencies = [ "librespot-metadata 0.1.0", "librespot-playback 0.1.0", "librespot-protocol 0.1.0", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 1.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rpassword 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-process 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-signal 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-process 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "vergen 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "librespot-audio" version = "0.1.0" dependencies = [ - "bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "lewton 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", "librespot-core 0.1.0", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tremor 0.1.0 (git+https://github.com/plietar/rust-tremor)", "vorbis 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -485,22 +847,25 @@ dependencies = [ name = "librespot-connect" version = "0.1.0" dependencies = [ - "base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "block-modes 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "dns-sd 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "librespot-core 0.1.0", "librespot-playback 0.1.0", "librespot-protocol 0.1.0", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "mdns 0.2.0 (git+https://github.com/plietar/rust-mdns)", - "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -509,71 +874,77 @@ dependencies = [ name = "librespot-core" version = "0.1.0" dependencies = [ - "base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aes 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "extprim 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-proxy 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "librespot-protocol 0.1.0", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "shannon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "vergen 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "librespot-metadata" version = "0.1.0" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "librespot-core 0.1.0", "librespot-protocol 0.1.0", "linear-map 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "librespot-playback" version = "0.1.0" dependencies = [ - "alsa 0.0.1 (git+https://github.com/plietar/rust-alsa)", - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "alsa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cpal 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "jack 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "libpulse-sys 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "librespot-audio 0.1.0", "librespot-core 0.1.0", "librespot-metadata 0.1.0", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "portaudio-rs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "portaudio-rs 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rodio 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sdl2 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "librespot-protocol" version = "0.1.0" dependencies = [ - "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf-codegen-pure 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf-codegen 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf-codegen-pure 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -595,15 +966,15 @@ name = "log" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -611,21 +982,29 @@ name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "matrixmultiply" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rawpointer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "mdns" version = "0.2.0" source = "git+https://github.com/plietar/rust-mdns#66a74033da6c9f1a06e7b0a29f4544fd189d6479" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "dns-parser 0.3.2 (git+https://github.com/plietar/dns-parser)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "multimap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "socket2 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -634,34 +1013,44 @@ dependencies = [ [[package]] name = "memchr" -version = "2.2.0" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "memchr" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memoffset" -version = "0.2.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "mime" version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio" -version = "0.6.16" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -673,10 +1062,10 @@ name = "mio-named-pipes" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -685,8 +1074,8 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -705,8 +1094,8 @@ name = "miow" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -714,7 +1103,22 @@ name = "multimap" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nalgebra" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "alga 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "approx 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "matrixmultiply 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-complex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -722,20 +1126,31 @@ name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "nix" -version = "0.11.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nix" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -745,43 +1160,74 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "num-bigint" -version = "0.1.44" +name = "nom" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-bigint" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-complex" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-integer" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-iter" version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.1.43" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "num-traits" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "num_cpus" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -789,7 +1235,7 @@ name = "ogg" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -798,10 +1244,15 @@ version = "0.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "opaque-debug" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "owning_ref" version = "0.4.0" @@ -824,13 +1275,32 @@ name = "parking_lot_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "pbkdf2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "percent-encoding" version = "1.0.1" @@ -838,16 +1308,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pkg-config" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "portaudio-rs" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "portaudio-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -856,13 +1326,26 @@ name = "portaudio-sys" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "proc-macro2" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro2" -version = "0.4.27" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -870,29 +1353,24 @@ dependencies = [ [[package]] name = "protobuf" -version = "1.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "protobuf" -version = "2.4.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "protobuf-codegen" -version = "2.4.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "protobuf-codegen-pure" -version = "2.4.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf-codegen 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf-codegen 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -902,15 +1380,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.3.15" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "quote" -version = "0.6.11" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -918,7 +1399,7 @@ name = "rand" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -928,10 +1409,10 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -941,9 +1422,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -951,17 +1432,29 @@ name = "rand" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -969,10 +1462,19 @@ name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand_chacha" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_core" version = "0.3.1" @@ -986,6 +1488,14 @@ name = "rand_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rand_core" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_hc" version = "0.1.0" @@ -994,6 +1504,14 @@ dependencies = [ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_isaac" version = "0.1.1" @@ -1004,12 +1522,12 @@ dependencies = [ [[package]] name = "rand_jitter" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1019,10 +1537,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1030,7 +1548,7 @@ name = "rand_pcg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1042,6 +1560,11 @@ dependencies = [ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rawpointer" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "rdrand" version = "0.4.0" @@ -1052,7 +1575,7 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.51" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1061,10 +1584,22 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1072,7 +1607,15 @@ name = "regex-syntax" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex-syntax" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1080,41 +1623,40 @@ name = "relay" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "remove_dir_all" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rodio" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cpal 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nalgebra 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rpassword" -version = "0.3.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "termios 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "rust-crypto" -version = "0.2.36" -source = "git+https://github.com/awmath/rust-crypto.git?branch=avx2#394c247254dbe2ac5d44483232cf335d10cf0260" -dependencies = [ - "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rust-crypto" -version = "0.2.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "rust-crypto 0.2.36 (git+https://github.com/awmath/rust-crypto.git?branch=avx2)" - -[[package]] -name = "rustc-serialize" -version = "0.3.24" +name = "rustc-demangle" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1125,6 +1667,11 @@ dependencies = [ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ryu" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "safemem" version = "0.3.0" @@ -1140,6 +1687,33 @@ name = "scopeguard" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "scopeguard" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "sdl2" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sdl2-sys 0.32.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sdl2-sys" +version = "0.32.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "semver" version = "0.9.0" @@ -1155,54 +1729,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "0.9.15" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "serde" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_codegen_internals" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "serde_derive" -version = "0.9.15" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_codegen_internals 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "0.9.10" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sha-1" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sha2" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1210,16 +1779,25 @@ name = "shannon" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "signal-hook" -version = "0.1.8" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arc-swap 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "signal-hook-registry 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "signal-hook-registry" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1239,7 +1817,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.9" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1247,55 +1825,76 @@ name = "socket2" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "socket2" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "spin" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "stable_deref_trait" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "syn" -version = "0.11.11" +name = "stdweb" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "stream-cipher" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "syn" -version = "0.15.29" +version = "0.15.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "synom" -version = "0.11.3" +name = "synstructure" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1305,22 +1904,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "tempfile" -version = "2.2.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "termios" -version = "0.2.2" +name = "termcolor" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1336,31 +1944,30 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" -version = "0.1.17" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1371,7 +1978,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1381,34 +1988,34 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-current-thread" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-executor" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1416,9 +2023,9 @@ name = "tokio-fs" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1427,23 +2034,26 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-process" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1451,7 +2061,7 @@ name = "tokio-proto" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1468,17 +2078,17 @@ name = "tokio-reactor" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1486,21 +2096,7 @@ name = "tokio-service" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-signal" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1508,24 +2104,24 @@ name = "tokio-signal" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "signal-hook 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "signal-hook 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-sync" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1534,46 +2130,38 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.12" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-timer" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-trace-core" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1582,9 +2170,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1596,11 +2184,11 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1612,7 +2200,7 @@ name = "tremor" version = "0.1.0" source = "git+https://github.com/plietar/rust-tremor#5958cc302e78f535dad90e9665da981ddff4000a" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "tremor-sys 0.1.0 (git+https://github.com/plietar/rust-tremor)", ] @@ -1622,9 +2210,9 @@ version = "0.1.0" source = "git+https://github.com/plietar/rust-tremor#5958cc302e78f535dad90e9665da981ddff4000a" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "ogg-sys 0.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1632,14 +2220,19 @@ name = "try-lock" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "typenum" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ucd-util" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicase" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1658,7 +2251,7 @@ name = "unicode-normalization" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1666,11 +2259,6 @@ name = "unicode-width" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "unicode-xid" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "unicode-xid" version = "0.1.0" @@ -1688,24 +2276,30 @@ dependencies = [ [[package]] name = "utf8-ranges" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "uuid" -version = "0.4.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "vec_map" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "vergen" -version = "0.1.1" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1723,7 +2317,7 @@ name = "vorbis" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "ogg-sys 0.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", "vorbis-encoder 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1737,9 +2331,9 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "ogg-sys 0.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "vorbis-sys 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1749,9 +2343,9 @@ version = "0.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "ogg-sys 0.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1760,9 +2354,9 @@ version = "0.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "ogg-sys 0.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "vorbis-sys 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1771,11 +2365,19 @@ name = "want" version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "which" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -1783,7 +2385,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1800,11 +2402,28 @@ name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wincolor" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ws2_32-sys" version = "0.2.1" @@ -1815,187 +2434,251 @@ dependencies = [ ] [metadata] +"checksum aes 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "54eb1d8fe354e5fc611daf4f2ea97dd45a765f4f1e4512306ec183ae2e8f20c9" +"checksum aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" +"checksum aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" +"checksum aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" "checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" -"checksum alsa 0.0.1 (git+https://github.com/plietar/rust-alsa)" = "" -"checksum arc-swap 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1025aeae2b664ca0ea726a89d574fe8f4e77dd712d443236ad1de00379450cf6" -"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" -"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" -"checksum base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30e93c03064e7590d0466209155251b90c22e37fab1daf2771582598b5827557" +"checksum aho-corasick 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "36b7aa1ccb7d7ea3f437cf025a2ab1c47cc6c1bc9fc84918ff449def12f5e282" +"checksum alga 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d708cb68c7106ed1844de68f50f0157a7788c2909a6926fad5a87546ef6a4ff8" +"checksum alsa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b4a0d4ebc8b23041c5de9bc9aee13b4bad844a589479701f31a5934cfe4aeb32" +"checksum alsa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b0edcbbf9ef68f15ae1b620f722180b82a98b6f0628d30baa6b8d2a5abc87d58" +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum approx 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" +"checksum arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "bc4662175ead9cd84451d5c35070517777949a2ed84551764129cedb88384841" +"checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" +"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" +"checksum autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "22130e92352b948e7e82a49cdb0aa94f2211761117f29e052dd397c1ac33542b" +"checksum backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)" = "88fb679bc9af8fa639198790a77f52d345fe13656c08b43afa9424c206b731c6" +"checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" +"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -"checksum bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9bf6104718e80d7b26a68fdbacff3481cfc05df670821affc7e9cbc1884400c" -"checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f" +"checksum bindgen 0.32.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8b242e11a8f446f5fc7b76b37e81d737cabca562a927bd33766dac55b5f1177f" +"checksum bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e84c238982c4b1e1ee668d136c510c67a13465279c0cb367ea6baf6310620a80" +"checksum bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f59bbe95d4e52a6398ec21238d31577f2b28a9d86807f06ca59d191d8440d0bb" "checksum bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "32866f4d103c4e438b1db1158aa1b1a80ee078e5d77a59a2f906fd62a577389c" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" -"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" +"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" +"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +"checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" +"checksum block-modes 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "31aa8410095e39fdb732909fb5730a48d5bd7c2e3cd76bd1b07b3dbea130c529" +"checksum block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d4dc3af3ee2e12f3e5d224e5e1e3d73668abbeb69e566d361f7d5563a4fdf09" +"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" -"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" +"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" "checksum c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" -"checksum cc 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ce8bb087aacff865633f0bd5aeaed910fe2fe55b55f4739527f2e023a2e53d" -"checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" +"checksum cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "ce400c638d48ee0e9ab75aef7997609ec57367ccfe1463f21bf53c3eca67bf46" +"checksum cexpr 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42aac45e9567d97474a834efdee3081b3c942b2205be932092f53354ce503d6c" +"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" +"checksum chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "77d81f58b7301084de3b958691458a53c3f7e0b1d702f77e550b6a88e3a88abe" +"checksum clang-sys 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e414af9726e1d11660801e73ccc7fb81803fb5f49e5903a25b348b2b3b480d2e" +"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" +"checksum coreaudio-rs 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f229761965dad3e9b11081668a6ea00f1def7aa46062321b5ec245b834f6e491" +"checksum coreaudio-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "78fdbabf58d5b1f461e31b94a571c109284f384cec619a3d96e66ec55b4de82b" +"checksum cpal 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d58ae1ed6536b1b233f5e3aeb6997a046ddb4d05e3f61701b58a92eb254a829e" "checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" -"checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" +"checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" -"checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" +"checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" +"checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +"checksum ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" +"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum dns-parser 0.3.2 (git+https://github.com/plietar/dns-parser)" = "" "checksum dns-sd 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d748509dea20228f63ba519bf142ce2593396386125b01f5b0d6412dab972087" -"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" "checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" -"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" -"checksum extprim 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "054bc2552b3f66fa8097e29e47255bfff583c08e737a67cbbb54b817ddaa5206" +"checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" +"checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" +"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" +"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" +"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" +"checksum futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "45dc39533a6cae6da2b56da48edae506bb767ec07370f86f70fc062e9d435869" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" +"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" "checksum get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" -"checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797" -"checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" +"checksum getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "72327b15c228bfe31f1390f93dd5e9279587f0463836393c9df719ce62a3e450" +"checksum getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "e65cce4e5084b14874c4e7097f38cab54f47ee554f9194673456ea379dcc4c55" +"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" +"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" +"checksum hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" "checksum hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)" = "34a590ca09d341e94cddf8e5af0bbccde205d5fbc2fa3c09dd67c7f85cea59d7" "checksum hyper-proxy 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44f0925de2747e481e6e477dd212c25e8f745567f02f6182e04d27b97c3fbece" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" -"checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c" +"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" "checksum jack 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1e15fc592e2e5a74a105ff507083c04db1aa20ba1b90d425362ba000e57422df" "checksum jack-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d4ca501477fd3cd93a36df581046e5d6338ed826cf7e9b8d302603521e6cc3" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" -"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum lewton 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8d542c1a317036c45c2aa1cf10cc9d403ca91eb2d333ef1a4917e5cb10628bd0" -"checksum libc 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)" = "aab692d7759f5cd8c859e169db98ae5b52c924add2af5fbbca11d12fefb567c1" +"checksum libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "d44e80633f007889c7eff624b709ab43c92d708caad982295768a7b13ca3b5eb" "checksum libloading 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fd38073de8f7965d0c17d30546d4bb6da311ab428d1c7a3fc71dff7f9d4979b9" +"checksum libm 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" "checksum libpulse-sys 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9bb11b06faf883500c1b625cf4453e6c7737e9df9c7ba01df3f84b22b083e4ac" "checksum linear-map 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfae20f6b19ad527b550c223fddc3077a547fc70cda94b9b566575423fd303ee" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" +"checksum log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c275b6ad54070ac2d665eef9197db647b32239c9d244bfb6f041a766d00da5b3" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +"checksum matrixmultiply 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfed72d871629daa12b25af198f110e8095d7650f5f4c61c5bac28364604f9b" "checksum mdns 0.2.0 (git+https://github.com/plietar/rust-mdns)" = "" -"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" -"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" +"checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" +"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" +"checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" "checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" -"checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" +"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" "checksum mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" "checksum multimap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb04b9f127583ed176e163fb9ec6f3e793b87e21deedd5734a69386a18a0151" +"checksum nalgebra 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e12856109b5cb8e2934b5e45e4624839416e1c6c1f7d286711a7a66b79db29d" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17" +"checksum nix 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "becb657d662f1cd2ef38c7ad480ec6b8cf9e96b27adb543e594f9cf0f2e6065c" +"checksum nix 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2c5afeb0198ec7be8569d666644b574345aad2e95a53baf3a532da3e0f3fb32" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" -"checksum num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1" -"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" -"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" -"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" -"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" +"checksum nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" +"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" +"checksum num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "57450397855d951f1a41305e54851b1a7b8f5d2e349543a02a2effe25459f718" +"checksum num-complex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fcb0cf31fb3ff77e6d2a6ebd6800df7fdcd106f2ad89113c9130bcd07f93dffc" +"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" +"checksum num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e" +"checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" +"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" "checksum ogg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d79f1db9148be9d0e174bb3ac890f6030fcb1ed947267c5a91ee4c91b5a91e15" "checksum ogg-sys 0.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "a95b8c172e17df1a41bf8d666301d3b2c4efeb90d9d0415e2a4dc0668b35fdb2" +"checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" +"checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" +"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" -"checksum portaudio-rs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "029e0ab393b44b2d825efbc755cae51c36be7a99d91356b2052be0ed05836636" +"checksum pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c1d2cfa5a714db3b5f24f0915e74fcdf91d09d496ba61329705dda7774d2af" +"checksum portaudio-rs 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fc0e6b38f00fae9dde9a9832a2b54405988c6dcaf2870e6f9551546b447bbd7f" "checksum portaudio-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5194a4fa953b4ffd851c320ef6f0484cd7278cb7169ea9d6c433e49b23f7b7f5" -"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" -"checksum protobuf 1.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "52fbc45bf6709565e44ef31847eb7407b3c3c80af811ee884a04da071dcca12b" -"checksum protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24d5d73d2b88fddb8b8141f2730d950d88772c940ac4f8f3e93230b9a99d92df" -"checksum protobuf-codegen 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7dc1ef231350d13cb261717a1223ac43c1e93c9b3180535920c1a9cc51f80567" -"checksum protobuf-codegen-pure 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48b7a5dbe7e07265974a3897320af02372c63562ecf6514a0f0bce50812003bb" +"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" +"checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" +"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +"checksum protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8aefcec9f142b524d98fc81d07827743be89dd6586a1ba6ab21fa66a500b3fa5" +"checksum protobuf-codegen 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "31539be8028d6b9e8e1b3b7c74e2fa3555302e27b2cc20dbaee6ffba648f75e2" +"checksum protobuf-codegen-pure 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00993dc5fbbfcf9d8a005f6b6c29fd29fd6d86deba3ae3f41fd20c624c414616" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" +"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +"checksum rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" "checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" +"checksum rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" +"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +"checksum rawpointer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebac11a9d2e11f2af219b8b8d833b76b1ea0e054aa0e8d8e9e4cbde353bdf019" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" +"checksum regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b23da8dfd98a84bd7e08700190a5d9f7d2d38abd4369dd1dae651bc40bfd2cc" "checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" +"checksum regex-syntax 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5485bf1523a9ed51c4964273f22f63f24e31632adb5dad134f488f86a3875c" "checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a" -"checksum rpassword 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ec4bdede957362ec6fdd550f7e79c6d14cad2bc26b2d062786234c6ee0cb27bb" -"checksum rust-crypto 0.2.36 (git+https://github.com/awmath/rust-crypto.git?branch=avx2)" = "" -"checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" +"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +"checksum rodio 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d0f961b254e66d147a7b550c78b01308934c97d807a34b417fd0f5a0a0f3a2d" +"checksum rpassword 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c34fa7bcae7fca3c8471e8417088bbc3ad9af8066b0ecf4f3c0d98a0d772716e" +"checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" +"checksum sdl2 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d051a07231e303f5f719da78cb6f7394f6d5b54f733aef5b0b447804a83edd7b" +"checksum sdl2-sys 0.32.6 (registry+https://github.com/rust-lang/crates.io-index)" = "34e71125077d297d57e4c1acfe8981b5bdfbf5a20e7b589abfdcb33bf1127f86" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "34b623917345a631dc9608d5194cc206b3fe6c3554cd1c75b937e55e285254af" -"checksum serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "92514fb95f900c9b5126e32d020f5c6d40564c27a5ea6d1d7d9f157a96623560" -"checksum serde_codegen_internals 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bc888bd283bd2420b16ad0d860e35ad8acb21941180a83a189bb2046f9d00400" -"checksum serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "978fd866f4d4872084a81ccc35e275158351d3b9fe620074e7d7504b816b74ba" -"checksum serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6eabf4b5914e88e24eea240bb7c9f9a2cbc1bbbe8d961d381975ec3c6b806c" -"checksum serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ad8bcf487be7d2e15d3d543f04312de991d631cfe1b43ea0ade69e6a8a5b16a1" +"checksum serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)" = "d46b3dfedb19360a74316866cef04687cd4d6a70df8e6a506c63512790769b72" +"checksum serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)" = "c22a0820adfe2f257b098714323563dd06426502abbbce4f51b72ef544c5027f" +"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +"checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" +"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" "checksum shannon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7ea5b41c9427b56caa7b808cb548a04fb50bb5b9e98590b53f28064ff4174561" -"checksum signal-hook 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "97a47ae722318beceb0294e6f3d601205a1e6abaa4437d9d33e3a212233e3021" +"checksum signal-hook 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4f61c4d59f3aaa9f61bba6450a9b80ba48362fd7d651689e7a10c453b1f6dc68" +"checksum signal-hook-registry 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "913661ac8848a61e39684a3c3e7a7a14a4deec7f54b4976d0641e70dda3939b1" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013" -"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" +"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" "checksum socket2 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "36b4896961171cd3317c7e9603d88f379f8c6e45342212235d356496680c68fd" -"checksum socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d11a52082057d87cb5caa31ad812f4504b97ab44732cd8359df2e9ff9f48e7" +"checksum socket2 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "df028e0e632c2a1823d920ad74895e7f9128e6438cbc4bc6fd1f180e644767b9" +"checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum syn 0.15.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1825685f977249735d510a242a6727b46efe914bb67e38d30c071b1b72b1d5c2" -"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" +"checksum stdweb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e" +"checksum stream-cipher 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8861bc80f649f5b4c9bd38b696ae9af74499d479dbfb327f0607de6b326a36bc" +"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +"checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" +"checksum syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)" = "eadc09306ca51a40555dd6fc2b415538e9e18bc9f870e47b1a524a79fe2dcf5e" +"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" "checksum take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5" -"checksum tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11ce2fe9db64b842314052e2421ac61a73ce41b898dc8e3750398b219c5fc1e0" -"checksum termios 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d9cf598a6d7ce700a4e6a9199da127e6819a61e64b68609683cc9a01b5683a" +"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +"checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" +"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tokio 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "1021bb1f4150435ab8f222eb7ed37c60b2d57037def63ba43085a79f387512d7" +"checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" "checksum tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71" -"checksum tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c756b04680eea21902a46fca4e9f410a2332c04995af590e07ff262e2193a9a3" -"checksum tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30c6dbf2d1ad1de300b393910e8a3aa272b724a400b6531da03eed99e329fbf0" +"checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" +"checksum tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" "checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" -"checksum tokio-process 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "88e1281e412013f1ff5787def044a9577a0bed059f451e835f1643201f8b777d" +"checksum tokio-process 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afbd6ef1b8cc2bd2c2b580d882774d443ebb1c6ceefe35ba9ea4ab586c89dbe8" "checksum tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389" "checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" "checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" -"checksum tokio-signal 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e8f46863230f9a05cf52d173721ec391b9c5782a2465f593029922b8782b9ffe" "checksum tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "dd6dc5276ea05ce379a16de90083ec80836440d5ef8a6a39545a3207373b8296" -"checksum tokio-sync 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fda385df506bf7546e70872767f71e81640f1f251bdf2fd8eb81a0eaec5fe022" +"checksum tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2162248ff317e2bc713b261f242b69dbb838b85248ed20bb21df56d60ea4cae7" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "742e511f6ce2298aeb86fc9ea0d8df81c2388c6ebae3dc8a7316e8c9df0df801" -"checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6" -"checksum tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350c9edade9830dc185ae48ba45667a445ab59f6167ef6d0254ec9d2430d9dd3" +"checksum tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "90ca01319dea1e376a001e8dc192d42ebde6dd532532a5bad988ac37db365b19" +"checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" "checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" "checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" "checksum tremor 0.1.0 (git+https://github.com/plietar/rust-tremor)" = "" "checksum tremor-sys 0.1.0 (git+https://github.com/plietar/rust-tremor)" = "" "checksum try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2aa4715743892880f70885373966c83d73ef1b0838a664ef0c76fffd35e7c2" -"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" -"checksum unicase 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41d17211f887da8e4a70a45b9536f26fc5de166b81e2d5d80de4a17fd22553bd" +"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" +"checksum ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa9b3b49edd3468c0e6565d85783f51af95212b6fa3986a5500954f00b460874" +"checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" -"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" -"checksum uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7cfec50b0842181ba6e713151b72f4ec84a6a7e2c9c8a8a3ffc37bb1cd16b231" -"checksum vergen 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c3365f36c57e5df714a34be40902b27a992eeddb9996eca52d0584611cf885d" +"checksum utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9d50aa7650df78abf942826607c62468ce18d9019673d4a2ebe1865dbb96ffde" +"checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" +"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" +"checksum vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6aba5e34f93dc7051dfad05b98a18e9156f27e7b431fe1d2398cb6061c0a1dba" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum vorbis 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "760993e54524128b88d4d7aff09c773c2f16a9f18db3c8ae1ccca5afd1287656" @@ -2003,9 +2686,12 @@ dependencies = [ "checksum vorbis-sys 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "729e1f15395850b4e6d19ca0cd1d42ef44707503a53b69d40ff49182b3c5589d" "checksum vorbisfile-sys 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4f4306d7e1ac4699b55e20de9483750b90c250913188efd7484db6bfbe9042d1" "checksum want 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a05d9d966753fa4b5c8db73fcab5eed4549cfe0e1e4e66911e5564a0085c35d1" +"checksum which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" diff --git a/Cargo.toml b/Cargo.toml index b6ebffee..69582a59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,45 +33,38 @@ path = "playback" path = "protocol" [dependencies] -base64 = "0.5.0" -env_logger = "0.4.0" -futures = "0.1.8" -getopts = "0.2.14" -hyper = "0.11.2" -log = "0.3.5" -num-bigint = "0.1.35" -protobuf = "1.1" -rand = "0.6" -rpassword = "0.3.0" -rust-crypto = "0.2.36" -serde = "0.9.6" -serde_derive = "0.9.6" -serde_json = "0.9.5" -tokio-core = "0.1.2" +base64 = "0.10" +env_logger = "0.6" +futures = "0.1" +getopts = "0.2" +hyper = "0.11" +log = "0.4" +num-bigint = "0.2" +protobuf = "2.8.*" +rand = "0.7" +rpassword = "3.0" +tokio-core = "0.1" tokio-io = "0.1" -tokio-process = "0.2.2" -tokio-signal = "0.1.2" -url = "1.7.0" - -[build-dependencies] -rand = "0.6" -vergen = "0.1.0" - -[replace] -"rust-crypto:0.2.36" = { git = "https://github.com/awmath/rust-crypto.git", branch = "avx2" } +tokio-process = "0.2" +tokio-signal = "0.2" +url = "1.7" +sha-1 = "0.8" +hex = "0.3" [features] alsa-backend = ["librespot-playback/alsa-backend"] portaudio-backend = ["librespot-playback/portaudio-backend"] pulseaudio-backend = ["librespot-playback/pulseaudio-backend"] jackaudio-backend = ["librespot-playback/jackaudio-backend"] +rodio-backend = ["librespot-playback/rodio-backend"] +sdl-backend = ["librespot-playback/sdl-backend"] with-tremor = ["librespot-audio/with-tremor"] with-vorbis = ["librespot-audio/with-vorbis"] with-dns-sd = ["librespot-connect/with-dns-sd"] -default = ["librespot-playback/portaudio-backend"] +default = ["librespot-playback/rodio-backend"] [package.metadata.deb] maintainer = "librespot-org" diff --git a/README.md b/README.md index 440a528e..e9cbf79e 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ [![Build Status](https://travis-ci.org/librespot-org/librespot.svg?branch=master)](https://travis-ci.org/librespot-org/librespot) [![Gitter chat](https://badges.gitter.im/librespot-org/librespot.png)](https://gitter.im/librespot-org/spotify-connect-resources) +Current maintainer is @awiouy folks. + # librespot *librespot* is an open source client library for Spotify. It enables applications to use Spotify's service, without using the official but closed-source libspotify. Additionally, it will provide extra features which are not available in the official library. -Note: librespot only works with Spotify Premium +_Note: librespot only works with Spotify Premium. This will remain the case for the forseeable future, as we are unlikely to work on implementing the features such as limited skips and adverts that would be required to make librespot compliant with free accounts._ ## This fork As the origin by [plietar](https://github.com/plietar/) is no longer actively maintained, this organisation and repository have been set up so that the project may be maintained and upgraded in the future. @@ -26,27 +28,18 @@ If you wish to learn more about how librespot works overall, the best way is to If you run into a bug when using librespot, please search the existing issues before opening a new one. Chances are, we've encountered it before, and have provided a resolution. If not, please open a new one, and where possible, include the backtrace librespot generates on crashing, along with anything we can use to reproduce the issue, eg. the Spotify URI of the song that caused the crash. # Building -Rust 1.23.0 or later is required to build librespot. +Rust 1.32.0 or later is required to build librespot. -**If you are building librespot on macOS, the homebrew provided rust may fail due to the way in which homebrew installs rust. In this case, uninstall the homebrew version of rust and use [rustup](https://www.rustup.rs/), and librespot should then build. This should have been fixed in more recent versions of Homebrew, but we're leaving this notice here as a warning.** - -**We strongly suggest you install rust using rustup, for ease of installation and maintenance.** - -It also requires a C, with portaudio. +We recently switched to using [Rodio](https://github.com/tomaka/rodio) for audio playback by default, hence for macOS and Windows, you should just be able to clone and build librespot (with the command below). For linux, you will need to run the additional commands below, depending on your distro. On debian / ubuntu, the following command will install these dependencies : ```shell -sudo apt-get install build-essential portaudio19-dev +sudo apt-get install build-essential libasound2-dev ``` On Fedora systems, the following command will install these dependencies : ```shell -sudo dnf install portaudio-devel make gcc -``` - -On macOS, using homebrew : -```shell -brew install portaudio +sudo dnf install alsa-lib-devel make gcc ``` Once you've cloned this repository you can build *librespot* using `cargo`. @@ -90,3 +83,4 @@ This is a non exhaustive list of projects that either use or have modified libre - [Spotcontrol](https://github.com/badfortrains/spotcontrol) - A golang implementation of a Spotify Connect controller. No playback functionality. - [librespot-java](https://github.com/devgianlu/librespot-java) - A Java port of librespot. +- [ncspot](https://github.com/hrkfdn/ncspot) - Cross-platform ncurses Spotify client. diff --git a/audio/Cargo.toml b/audio/Cargo.toml index 59ebfe84..a7237daf 100644 --- a/audio/Cargo.toml +++ b/audio/Cargo.toml @@ -7,17 +7,16 @@ authors = ["Paul Lietar "] path = "../core" [dependencies] -bit-set = "0.4.0" -byteorder = "1.0" +bit-set = "0.5" +byteorder = "1.3" bytes = "0.4" -futures = "0.1.8" -lewton = "0.9.3" -log = "0.3.5" -num-bigint = "0.1.35" -num-traits = "0.1.36" -rust-crypto = "0.2.36" -tempfile = "2.1" -tokio = "0.1.2" +futures = "0.1" +lewton = "0.9" +log = "0.4" +num-bigint = "0.2" +num-traits = "0.2" +tempfile = "3.1" +aes-ctr = "0.3" tremor = { git = "https://github.com/plietar/rust-tremor", optional = true } vorbis = { version ="0.1.0", optional = true } diff --git a/audio/src/decrypt.rs b/audio/src/decrypt.rs index 3b2967d4..d2697e72 100644 --- a/audio/src/decrypt.rs +++ b/audio/src/decrypt.rs @@ -1,39 +1,38 @@ -use crypto::aes; -use crypto::symmetriccipher::SynchronousStreamCipher; -use num_bigint::BigUint; -use num_traits::FromPrimitive; use std::io; -use std::ops::Add; -use core::audio_key::AudioKey; +use aes_ctr::Aes128Ctr; +use aes_ctr::stream_cipher::{ + NewStreamCipher, SyncStreamCipher, SyncStreamCipherSeek +}; +use aes_ctr::stream_cipher::generic_array::GenericArray; -const AUDIO_AESIV: &'static [u8] = &[ - 0x72, 0xe0, 0x67, 0xfb, 0xdd, 0xcb, 0xcf, 0x77, 0xeb, 0xe8, 0xbc, 0x64, 0x3f, 0x63, 0x0d, 0x93, +use librespot_core::audio_key::AudioKey; + +const AUDIO_AESIV: [u8; 16] = [ + 0x72, 0xe0, 0x67, 0xfb, 0xdd, 0xcb, 0xcf, 0x77, + 0xeb, 0xe8, 0xbc, 0x64, 0x3f, 0x63, 0x0d, 0x93, ]; pub struct AudioDecrypt { - cipher: Box, - key: AudioKey, + cipher: Aes128Ctr, reader: T, } impl AudioDecrypt { pub fn new(key: AudioKey, reader: T) -> AudioDecrypt { - let cipher = aes::ctr(aes::KeySize::KeySize128, &key.0, AUDIO_AESIV); - AudioDecrypt { - cipher: cipher, - key: key, - reader: reader, - } + let cipher = Aes128Ctr::new( + &GenericArray::from_slice(&key.0), + &GenericArray::from_slice(&AUDIO_AESIV), + ); + AudioDecrypt { cipher, reader } } } impl io::Read for AudioDecrypt { fn read(&mut self, output: &mut [u8]) -> io::Result { - let mut buffer = vec![0u8; output.len()]; - let len = try!(self.reader.read(&mut buffer)); + let len = try!(self.reader.read(output)); - self.cipher.process(&buffer[..len], &mut output[..len]); + self.cipher.apply_keystream(&mut output[..len]); Ok(len) } @@ -42,17 +41,9 @@ impl io::Read for AudioDecrypt { impl io::Seek for AudioDecrypt { fn seek(&mut self, pos: io::SeekFrom) -> io::Result { let newpos = try!(self.reader.seek(pos)); - let skip = newpos % 16; - let iv = BigUint::from_bytes_be(AUDIO_AESIV) - .add(BigUint::from_u64(newpos / 16).unwrap()) - .to_bytes_be(); - self.cipher = aes::ctr(aes::KeySize::KeySize128, &self.key.0, &iv); + self.cipher.seek(newpos); - let buf = vec![0u8; skip as usize]; - let mut buf2 = vec![0u8; skip as usize]; - self.cipher.process(&buf, &mut buf2); - - Ok(newpos as u64) + Ok(newpos) } } diff --git a/audio/src/fetch.rs b/audio/src/fetch.rs index d36df090..e24b2ff4 100644 --- a/audio/src/fetch.rs +++ b/audio/src/fetch.rs @@ -12,9 +12,9 @@ use std::time::{Duration, Instant}; use tempfile::NamedTempFile; use range_set::{Range, RangeSet}; -use core::channel::{Channel, ChannelData, ChannelError, ChannelHeaders}; -use core::session::Session; -use core::spotify_id::FileId; +use librespot_core::channel::{Channel, ChannelData, ChannelError, ChannelHeaders}; +use librespot_core::session::Session; +use librespot_core::spotify_id::FileId; use futures::sync::mpsc::unbounded; use std::sync::atomic; use std::sync::atomic::AtomicUsize; @@ -68,7 +68,7 @@ impl StreamLoaderController { pub fn range_available(&self, range: Range) -> bool { if let Some(ref shared) = self.stream_shared { - let mut download_status = shared.download_status.lock().unwrap(); + let download_status = shared.download_status.lock().unwrap(); if range.length <= download_status.downloaded.contained_length_from_value(range.start) { return true; } else { @@ -219,7 +219,7 @@ impl AudioFileOpenStreaming { }); let mut write_file = NamedTempFile::new().unwrap(); - write_file.set_len(size as u64).unwrap(); + write_file.as_file().set_len(size as u64).unwrap(); write_file.seek(SeekFrom::Start(0)).unwrap(); let read_file = write_file.reopen().unwrap(); @@ -483,7 +483,7 @@ impl Future for AudioFileFetchDataReceiver { Ok(Async::Ready(Some(data))) => { if let Some(request_sent_time) = self.request_sent_time { let duration = Instant::now() - request_sent_time; - let mut duration_ms: u64; + let duration_ms: u64; if duration.as_secs() > MAXIMUM_ASSUMED_PING_TIME_SECONDS { duration_ms = MAXIMUM_ASSUMED_PING_TIME_SECONDS * 1000; }else { diff --git a/audio/src/lewton_decoder.rs b/audio/src/lewton_decoder.rs index 982ed157..912d1c27 100644 --- a/audio/src/lewton_decoder.rs +++ b/audio/src/lewton_decoder.rs @@ -75,7 +75,7 @@ impl error::Error for VorbisError { error::Error::description(&self.0) } - fn cause(&self) -> Option<&error::Error> { - error::Error::cause(&self.0) + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + error::Error::source(&self.0) } } diff --git a/audio/src/lib.rs b/audio/src/lib.rs index f316e143..b178c395 100644 --- a/audio/src/lib.rs +++ b/audio/src/lib.rs @@ -6,13 +6,12 @@ extern crate log; extern crate bit_set; extern crate byteorder; extern crate bytes; -extern crate crypto; extern crate num_bigint; extern crate num_traits; extern crate tempfile; -extern crate tokio; +extern crate aes_ctr; -extern crate librespot_core as core; +extern crate librespot_core; mod decrypt; mod fetch; @@ -31,4 +30,3 @@ pub use fetch::{AudioFile, AudioFileOpen, StreamLoaderController}; pub use lewton_decoder::{VorbisDecoder, VorbisError, VorbisPacket}; #[cfg(any(feature = "with-tremor", feature = "with-vorbis"))] pub use libvorbis_decoder::{VorbisDecoder, VorbisError, VorbisPacket}; - diff --git a/connect/Cargo.toml b/connect/Cargo.toml index de46ca3a..9c0f5b0a 100644 --- a/connect/Cargo.toml +++ b/connect/Cargo.toml @@ -11,19 +11,22 @@ path = "../playback" path = "../protocol" [dependencies] -base64 = "0.5.0" -futures = "0.1.8" -hyper = "0.11.2" -log = "0.3.5" -num-bigint = "0.1.35" -protobuf = "2.0.5" -rand = "0.6" -rust-crypto = "0.2.36" -serde = "0.9.6" -serde_derive = "0.9.6" -serde_json = "0.9.5" -tokio-core = "0.1.2" -url = "1.3" +base64 = "0.10" +futures = "0.1" +hyper = "0.11" +log = "0.4" +num-bigint = "0.2" +protobuf = "2.8.*" +rand = "0.7" +serde = "1.0" +serde_derive = "1.0" +serde_json = "1.0" +tokio-core = "0.1" +url = "1.7" +sha-1 = "0.8" +hmac = "0.7" +aes-ctr = "0.3" +block-modes = "0.3" dns-sd = { version = "0.1.3", optional = true } mdns = { git = "https://github.com/plietar/rust-mdns", optional = true } diff --git a/connect/src/context.rs b/connect/src/context.rs new file mode 100644 index 00000000..c59e389e --- /dev/null +++ b/connect/src/context.rs @@ -0,0 +1,86 @@ +use librespot_core::spotify_id::SpotifyId; +use protocol::spirc::TrackRef; + +use serde; + +#[derive(Deserialize, Debug)] +pub struct StationContext { + pub uri: Option, + pub next_page_url: String, + #[serde(deserialize_with = "deserialize_protobuf_TrackRef")] + pub tracks: Vec, + // Not required for core functionality + // pub seeds: Vec, + // #[serde(rename = "imageUri")] + // pub image_uri: String, + // pub subtitle: Option, + // pub subtitles: Vec, + // #[serde(rename = "subtitleUri")] + // pub subtitle_uri: Option, + // pub title: String, + // #[serde(rename = "titleUri")] + // pub title_uri: String, + // pub related_artists: Vec, +} + +#[derive(Deserialize, Debug)] +pub struct PageContext { + pub uri: String, + pub next_page_url: String, + #[serde(deserialize_with = "deserialize_protobuf_TrackRef")] + pub tracks: Vec, + // Not required for core functionality + // pub url: String, + // // pub restrictions: +} + +#[derive(Deserialize, Debug)] +pub struct TrackContext { + #[serde(rename = "original_gid")] + pub gid: String, + pub uri: String, + pub uid: String, + // Not required for core functionality + // pub album_uri: String, + // pub artist_uri: String, + // pub metadata: MetadataContext, +} + +#[derive(Deserialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct ArtistContext { + artist_name: String, + artist_uri: String, + image_uri: String, +} + +#[derive(Deserialize, Debug)] +pub struct MetadataContext { + album_title: String, + artist_name: String, + artist_uri: String, + image_url: String, + title: String, + uid: String, +} + +#[allow(non_snake_case)] +fn deserialize_protobuf_TrackRef<'d, D>(de: D) -> Result, D::Error> +where + D: serde::Deserializer<'d>, +{ + let v: Vec = try!(serde::Deserialize::deserialize(de)); + let track_vec = v + .iter() + .map(|v| { + let mut t = TrackRef::new(); + // This has got to be the most round about way of doing this. + t.set_gid(SpotifyId::from_base62(&v.gid).unwrap().to_raw().to_vec()); + t.set_uri(v.uri.to_owned()); + + t + }) + .collect::>(); + + Ok(track_vec) +} diff --git a/connect/src/discovery.rs b/connect/src/discovery.rs index 2eacabf1..53d5a6ec 100644 --- a/connect/src/discovery.rs +++ b/connect/src/discovery.rs @@ -1,7 +1,9 @@ use base64; -use crypto; -use crypto::digest::Digest; -use crypto::mac::Mac; +use sha1::{Sha1, Digest}; +use hmac::{Hmac, Mac}; +use aes_ctr::Aes128Ctr; +use aes_ctr::stream_cipher::{NewStreamCipher, SyncStreamCipher}; +use aes_ctr::stream_cipher::generic_array::GenericArray; use futures::sync::mpsc; use futures::{Future, Poll, Stream}; use hyper::server::{Http, Request, Response, Service}; @@ -21,10 +23,12 @@ use std::sync::Arc; use tokio_core::reactor::Handle; use url; -use core::authentication::Credentials; -use core::config::ConnectConfig; -use core::diffie_hellman::{DH_GENERATOR, DH_PRIME}; -use core::util; +use librespot_core::authentication::Credentials; +use librespot_core::config::ConnectConfig; +use librespot_core::diffie_hellman::{DH_GENERATOR, DH_PRIME}; +use librespot_core::util; + +type HmacSha1 = Hmac; #[derive(Clone)] struct Discovery(Arc); @@ -106,33 +110,27 @@ impl Discovery { let encrypted = &encrypted_blob[16..encrypted_blob.len() - 20]; let cksum = &encrypted_blob[encrypted_blob.len() - 20..encrypted_blob.len()]; - let base_key = { - let mut data = [0u8; 20]; - let mut h = crypto::sha1::Sha1::new(); - h.input(&shared_key.to_bytes_be()); - h.result(&mut data); - data[..16].to_owned() - }; + let base_key = Sha1::digest(&shared_key.to_bytes_be()); + let base_key = &base_key[..16]; let checksum_key = { - let mut h = crypto::hmac::Hmac::new(crypto::sha1::Sha1::new(), &base_key); + let mut h = HmacSha1::new_varkey(base_key) + .expect("HMAC can take key of any size"); h.input(b"checksum"); - h.result().code().to_owned() + h.result().code() }; let encryption_key = { - let mut h = crypto::hmac::Hmac::new(crypto::sha1::Sha1::new(), &base_key); + let mut h = HmacSha1::new_varkey(&base_key) + .expect("HMAC can take key of any size"); h.input(b"encryption"); - h.result().code().to_owned() + h.result().code() }; - let mac = { - let mut h = crypto::hmac::Hmac::new(crypto::sha1::Sha1::new(), &checksum_key); - h.input(encrypted); - h.result().code().to_owned() - }; - - if mac != cksum { + let mut h = HmacSha1::new_varkey(&checksum_key) + .expect("HMAC can take key of any size"); + h.input(encrypted); + if let Err(_) = h.verify(cksum) { warn!("Login error for user {:?}: MAC mismatch", username); let result = json!({ "status": 102, @@ -145,10 +143,12 @@ impl Discovery { } let decrypted = { - let mut data = vec![0u8; encrypted.len()]; - let mut cipher = - crypto::aes::ctr(crypto::aes::KeySize::KeySize128, &encryption_key[0..16], iv); - cipher.process(encrypted, &mut data); + let mut data = encrypted.to_vec(); + let mut cipher = Aes128Ctr::new( + &GenericArray::from_slice(&encryption_key[0..16]), + &GenericArray::from_slice(iv), + ); + cipher.apply_keystream(&mut data); String::from_utf8(data).unwrap() }; diff --git a/connect/src/lib.rs b/connect/src/lib.rs index 27ec2b03..cd3d5e0b 100644 --- a/connect/src/lib.rs +++ b/connect/src/lib.rs @@ -2,9 +2,11 @@ extern crate log; #[macro_use] extern crate serde_json; +#[macro_use] +extern crate serde_derive; +extern crate serde; extern crate base64; -extern crate crypto; extern crate futures; extern crate hyper; extern crate num_bigint; @@ -13,15 +15,21 @@ extern crate rand; extern crate tokio_core; extern crate url; +extern crate sha1; +extern crate hmac; +extern crate aes_ctr; +extern crate block_modes; + #[cfg(feature = "with-dns-sd")] extern crate dns_sd; #[cfg(not(feature = "with-dns-sd"))] extern crate mdns; -extern crate librespot_core as core; +extern crate librespot_core; extern crate librespot_playback as playback; extern crate librespot_protocol as protocol; +pub mod context; pub mod discovery; pub mod spirc; diff --git a/connect/src/spirc.rs b/connect/src/spirc.rs index 987b9daa..37576a9e 100644 --- a/connect/src/spirc.rs +++ b/connect/src/spirc.rs @@ -1,26 +1,26 @@ +use std; +use std::time::{SystemTime, UNIX_EPOCH}; + use futures::future; use futures::sync::{mpsc, oneshot}; use futures::{Async, Future, Poll, Sink, Stream}; use protobuf::{self, Message}; - -use core::config::ConnectConfig; -use core::mercury::MercuryError; -use core::session::Session; -use core::spotify_id::SpotifyId; -use core::util::SeqGenerator; -use core::version; -use core::volume::Volume; - -use protocol; -use protocol::spirc::{DeviceState, Frame, MessageType, PlayStatus, State}; - -use playback::mixer::Mixer; -use playback::player::Player; - use rand; use rand::seq::SliceRandom; -use std; -use std::time::{SystemTime, UNIX_EPOCH}; +use serde_json; + +use context::StationContext; +use librespot_core::config::ConnectConfig; +use librespot_core::mercury::MercuryError; +use librespot_core::session::Session; +use librespot_core::spotify_id::SpotifyId; +use librespot_core::util::SeqGenerator; +use librespot_core::version; +use librespot_core::volume::Volume; +use playback::mixer::Mixer; +use playback::player::Player; +use protocol; +use protocol::spirc::{DeviceState, Frame, MessageType, PlayStatus, State}; pub struct SpircTask { player: Player, @@ -40,6 +40,8 @@ pub struct SpircTask { shutdown: bool, session: Session, + context_fut: Box>, + context: Option, } pub enum SpircCommand { @@ -53,18 +55,13 @@ pub enum SpircCommand { Shutdown, } +const CONTEXT_TRACKS_HISTORY: usize = 10; +const CONTEXT_FETCH_THRESHOLD: u32 = 5; + pub struct Spirc { commands: mpsc::UnboundedSender, } -fn now_ms() -> i64 { - let dur = match SystemTime::now().duration_since(UNIX_EPOCH) { - Ok(dur) => dur, - Err(err) => err.duration(), - }; - (dur.as_secs() * 1000 + (dur.subsec_nanos() / 1000_000) as u64) as i64 -} - fn initial_state() -> State { let mut frame = protocol::spirc::State::new(); frame.set_repeat(false); @@ -139,6 +136,15 @@ fn initial_device_state(config: ConnectConfig) -> DeviceState { }; msg }; + { + let msg = repeated.push_default(); + msg.set_typ(protocol::spirc::CapabilityType::kSupportsPlaylistV2); + { + let repeated = msg.mut_intValue(); + repeated.push(64) + }; + msg + }; { let msg = repeated.push_default(); msg.set_typ(protocol::spirc::CapabilityType::kSupportedContexts); @@ -176,7 +182,7 @@ fn calc_logarithmic_volume(volume: u16) -> u16 { // Volume conversion taken from https://www.dr-lex.be/info-stuff/volumecontrols.html#ideal2 // Convert the given volume [0..0xffff] to a dB gain // We assume a dB range of 60dB. - // Use the equatation: a * exp(b * x) + // Use the equation: a * exp(b * x) // in which a = IDEAL_FACTOR, b = 1/1000 const IDEAL_FACTOR: f64 = 6.908; let normalized_volume = volume as f64 / std::u16::MAX as f64; // To get a value between 0 and 1 @@ -259,6 +265,9 @@ impl Spirc { shutdown: false, session: session.clone(), + + context_fut: Box::new(future::empty()), + context: None, }; task.set_volume(volume); @@ -335,6 +344,39 @@ impl Future for SpircTask { Ok(Async::NotReady) => (), Err(oneshot::Canceled) => self.end_of_track = Box::new(future::empty()), } + + match self.context_fut.poll() { + Ok(Async::Ready(value)) => { + let r_context = serde_json::from_value::(value.clone()); + self.context = match r_context { + Ok(context) => { + info!( + "Resolved {:?} tracks from <{:?}>", + context.tracks.len(), + self.state.get_context_uri(), + ); + Some(context) + } + Err(e) => { + error!("Unable to parse JSONContext {:?}\n{:?}", e, value); + None + } + }; + // It needn't be so verbose - can be as simple as + // if let Some(ref context) = r_context { + // info!("Got {:?} tracks from <{}>", context.tracks.len(), context.uri); + // } + // self.context = r_context; + + progress = true; + self.context_fut = Box::new(future::empty()); + } + Ok(Async::NotReady) => (), + Err(err) => { + self.context_fut = Box::new(future::empty()); + error!("ContextError: {:?}", err) + } + } } let poll_sender = self.sender.poll_complete().unwrap(); @@ -352,6 +394,15 @@ impl Future for SpircTask { } impl SpircTask { + fn now_ms(&mut self) -> i64 { + let dur = match SystemTime::now().duration_since(UNIX_EPOCH) { + Ok(dur) => dur, + Err(err) => err.duration(), + }; + ((dur.as_secs() as i64 + self.session.time_delta()) * 1000 + + (dur.subsec_nanos() / 1000_000) as i64) + } + fn handle_command(&mut self, cmd: SpircCommand) { let active = self.device.get_is_active(); match cmd { @@ -442,19 +493,22 @@ impl SpircTask { MessageType::kMessageTypeLoad => { if !self.device.get_is_active() { + let now = self.now_ms(); self.device.set_is_active(true); - self.device.set_became_active_at(now_ms()); + self.device.set_became_active_at(now); } self.update_tracks(&frame); if self.state.get_track().len() > 0 { + let now = self.now_ms(); self.state.set_position_ms(frame.get_state().get_position_ms()); - self.state.set_position_measured_at(now_ms() as u64); + self.state.set_position_measured_at(now as u64); let play = frame.get_state().get_status() == PlayStatus::kPlayStatusPlay; self.load_track(play); } else { + info!("No more tracks left in queue"); self.state.set_status(PlayStatus::kPlayStatusStop); } @@ -524,8 +578,9 @@ impl SpircTask { MessageType::kMessageTypeSeek => { let position = frame.get_position(); + let now = self.now_ms(); self.state.set_position_ms(position); - self.state.set_position_measured_at(now_ms() as u64); + self.state.set_position_measured_at(now as u64); self.player.seek(position); self.notify(None); } @@ -558,7 +613,8 @@ impl SpircTask { self.mixer.start(); self.player.play(); self.state.set_status(PlayStatus::kPlayStatusPlay); - self.state.set_position_measured_at(now_ms() as u64); + let now = self.now_ms(); + self.state.set_position_measured_at(now as u64); } } @@ -576,7 +632,7 @@ impl SpircTask { self.mixer.stop(); self.state.set_status(PlayStatus::kPlayStatusPause); - let now = now_ms() as u64; + let now = self.now_ms() as u64; let position = self.state.get_position_ms(); let diff = now - self.state.get_position_measured_at(); @@ -600,13 +656,29 @@ impl SpircTask { fn handle_next(&mut self) { let mut new_index = self.consume_queued_track() as u32; let mut continue_playing = true; + debug!( + "At track {:?} of {:?} <{:?}> update [{}]", + new_index, + self.state.get_track().len(), + self.state.get_context_uri(), + self.state.get_track().len() as u32 - new_index < CONTEXT_FETCH_THRESHOLD + ); + let context_uri = self.state.get_context_uri().to_owned(); + if (context_uri.starts_with("spotify:station:") || context_uri.starts_with("spotify:dailymix:")) + && ((self.state.get_track().len() as u32) - new_index) < CONTEXT_FETCH_THRESHOLD + { + self.context_fut = self.resolve_station(&context_uri); + self.update_tracks_from_context(); + } + if new_index >= self.state.get_track().len() as u32 { new_index = 0; // Loop around back to start continue_playing = self.state.get_repeat(); } self.state.set_playing_track_index(new_index); self.state.set_position_ms(0); - self.state.set_position_measured_at(now_ms() as u64); + let now = self.now_ms(); + self.state.set_position_measured_at(now as u64); self.load_track(continue_playing); } @@ -642,14 +714,16 @@ impl SpircTask { pos += 1; } + let now = self.now_ms(); self.state.set_playing_track_index(new_index); self.state.set_position_ms(0); - self.state.set_position_measured_at(now_ms() as u64); + self.state.set_position_measured_at(now as u64); self.load_track(true); } else { + let now = self.now_ms(); self.state.set_position_ms(0); - self.state.set_position_measured_at(now_ms() as u64); + self.state.set_position_measured_at(now as u64); self.player.seek(0); } } @@ -676,14 +750,59 @@ impl SpircTask { } fn position(&mut self) -> u32 { - let diff = now_ms() as u64 - self.state.get_position_measured_at(); + let diff = self.now_ms() as u64 - self.state.get_position_measured_at(); self.state.get_position_ms() + diff as u32 } + fn resolve_station(&self, uri: &str) -> Box> { + let radio_uri = format!("hm://radio-apollo/v3/stations/{}", uri); + + self.resolve_uri(&radio_uri) + } + + fn resolve_uri(&self, uri: &str) -> Box> { + let request = self.session.mercury().get(uri); + + Box::new(request.and_then(move |response| { + let data = response.payload.first().expect("Empty payload on context uri"); + let response: serde_json::Value = serde_json::from_slice(&data).unwrap(); + + Ok(response) + })) + } + + fn update_tracks_from_context(&mut self) { + if let Some(ref context) = self.context { + self.context_fut = self.resolve_uri(&context.next_page_url); + + let new_tracks = &context.tracks; + debug!("Adding {:?} tracks from context to frame", new_tracks.len()); + let mut track_vec = self.state.take_track().into_vec(); + if let Some(head) = track_vec.len().checked_sub(CONTEXT_TRACKS_HISTORY) { + track_vec.drain(0..head); + } + track_vec.extend_from_slice(&new_tracks); + self.state.set_track(protobuf::RepeatedField::from_vec(track_vec)); + + // Update playing index + if let Some(new_index) = self + .state + .get_playing_track_index() + .checked_sub(CONTEXT_TRACKS_HISTORY as u32) + { + self.state.set_playing_track_index(new_index); + } + } + } + fn update_tracks(&mut self, frame: &protocol::spirc::Frame) { let index = frame.get_state().get_playing_track_index(); - let tracks = frame.get_state().get_track(); let context_uri = frame.get_state().get_context_uri().to_owned(); + let tracks = frame.get_state().get_track(); + debug!("Frame has {:?} tracks", tracks.len()); + if context_uri.starts_with("spotify:station:") || context_uri.starts_with("spotify:dailymix:") { + self.context_fut = self.resolve_station(&context_uri); + } self.state.set_playing_track_index(index); self.state.set_track(tracks.into_iter().cloned().collect()); @@ -693,13 +812,25 @@ impl SpircTask { } fn load_track(&mut self, play: bool) { - let index = self.state.get_playing_track_index(); let track = { - let gid = self.state.get_track()[index as usize].get_gid(); - SpotifyId::from_raw(gid).unwrap() + let mut index = self.state.get_playing_track_index(); + // Check for malformed gid + let tracks_len = self.state.get_track().len() as u32; + let mut track_ref = &self.state.get_track()[index as usize]; + while track_ref.get_gid().len() != 16 { + warn!( + "Skipping track {:?} at position [{}] of {}", + track_ref.get_uri(), + index, + tracks_len + ); + index = if index + 1 < tracks_len { index + 1 } else { 0 }; + track_ref = &self.state.get_track()[index as usize]; + } + SpotifyId::from_raw(track_ref.get_gid()).unwrap() }; - let position = self.state.get_position_ms(); + let position = self.state.get_position_ms(); let end_of_track = self.player.load(track, play, position); if play { @@ -752,7 +883,7 @@ impl<'a> CommandSender<'a> { frame.set_seq_nr(spirc.sequence.get()); frame.set_typ(cmd); frame.set_device_state(spirc.device.clone()); - frame.set_state_update_id(now_ms()); + frame.set_state_update_id(spirc.now_ms()); CommandSender { spirc: spirc, frame: frame, diff --git a/contrib/Dockerfile.Rpi b/contrib/Dockerfile.Rpi index 7c2c12c9..1df8eb91 100644 --- a/contrib/Dockerfile.Rpi +++ b/contrib/Dockerfile.Rpi @@ -24,6 +24,7 @@ RUN apt-get update RUN apt-get install -y curl git build-essential crossbuild-essential-armhf RUN apt-get install -y libasound2-dev libasound2-dev:armhf +RUN apt-get install -y pkg-config RUN curl https://sh.rustup.rs -sSf | sh -s -- -y ENV PATH="/root/.cargo/bin/:${PATH}" @@ -35,9 +36,12 @@ RUN mkdir /.cargo && \ RUN mkdir /build ENV CARGO_TARGET_DIR /build ENV CARGO_HOME /build/cache +ENV PKG_CONFIG_PATH /usr/lib/arm-linux-gnueabihf/pkgconfig/ +ENV PKG_CONFIG_ALLOW_CROSS 1 ADD . /src WORKDIR /src + RUN cargo build --release --target arm-unknown-linux-gnueabihf --no-default-features --features "alsa-backend" diff --git a/core/Cargo.toml b/core/Cargo.toml index e441388a..162147de 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -8,33 +8,35 @@ build = "build.rs" path = "../protocol" [dependencies] -base64 = "0.5.0" -byteorder = "1.0" +base64 = "0.10" +byteorder = "1.3" bytes = "0.4" -error-chain = { version = "0.11.0", default_features = false } -extprim = "1.5.1" -futures = "0.1.8" -httparse = "1.2.4" -hyper = "0.11.2" -hyper-proxy = { version = "0.4.1", default_features = false } -lazy_static = "0.2.0" -log = "0.3.5" -num-bigint = "0.1.35" -num-integer = "0.1.32" -num-traits = "0.1.36" -protobuf = "2.0.5" -rand = "0.6" -rpassword = "0.3.0" -rust-crypto = "0.2.36" -serde = "0.9.6" -serde_derive = "0.9.6" -serde_json = "0.9.5" +error-chain = { version = "0.12", default_features = false } +futures = "0.1" +httparse = "1.3" +hyper = "0.11" +hyper-proxy = { version = "0.4", default_features = false } +lazy_static = "1.3" +log = "0.4" +num-bigint = "0.2" +num-integer = "0.1" +num-traits = "0.2" +protobuf = "2.8.*" +rand = "0.7" +serde = "1.0" +serde_derive = "1.0" +serde_json = "1.0" shannon = "0.2.0" -tokio-core = "0.1.2" +tokio-codec = "0.1" +tokio-core = "0.1" tokio-io = "0.1" -url = "1.7.0" -uuid = { version = "0.4", features = ["v4"] } +url = "1.7" +uuid = { version = "0.7", features = ["v4"] } +sha-1 = "0.8" +hmac = "0.7" +pbkdf2 = "0.3" +aes = "0.3" [build-dependencies] -rand = "0.6" -vergen = "0.1.0" +rand = "0.7" +vergen = "3.0.4" diff --git a/core/build.rs b/core/build.rs index 3368f2d1..e8c71e4a 100644 --- a/core/build.rs +++ b/core/build.rs @@ -1,38 +1,19 @@ extern crate rand; extern crate vergen; -use rand::Rng; use rand::distributions::Alphanumeric; -use std::env; -use std::fs::OpenOptions; -use std::io::Write; -use std::path::PathBuf; +use rand::Rng; +use vergen::{generate_cargo_keys, ConstantsFlags}; fn main() { - let out = PathBuf::from(env::var("OUT_DIR").unwrap()); - - vergen::vergen(vergen::OutputFns::all()).unwrap(); + let mut flags = ConstantsFlags::all(); + flags.toggle(ConstantsFlags::REBUILD_ON_HEAD_CHANGE); + generate_cargo_keys(ConstantsFlags::all()).expect("Unable to generate the cargo keys!"); let mut rng = rand::thread_rng(); - let build_id: String = ::std::iter::repeat(()).map(|()| rng.sample(Alphanumeric)).take(8).collect(); - - let mut version_file = OpenOptions::new() - .write(true) - .append(true) - .open(&out.join("version.rs")) - .unwrap(); - - let build_id_fn = format!( - " -/// Generate a random build id. -pub fn build_id() -> &'static str {{ - \"{}\" -}} -", - build_id - ); - - if let Err(e) = version_file.write_all(build_id_fn.as_bytes()) { - println!("{}", e); - } + let build_id: String = ::std::iter::repeat(()) + .map(|()| rng.sample(Alphanumeric)) + .take(8) + .collect(); + println!("cargo:rustc-env=VERGEN_BUILD_ID={}", build_id); } diff --git a/core/src/authentication.rs b/core/src/authentication.rs index 17cc4c74..07c014f9 100644 --- a/core/src/authentication.rs +++ b/core/src/authentication.rs @@ -1,11 +1,9 @@ use base64; use byteorder::{BigEndian, ByteOrder}; -use crypto; -use crypto::aes; -use crypto::digest::Digest; -use crypto::hmac::Hmac; -use crypto::pbkdf2::pbkdf2; -use crypto::sha1::Sha1; +use aes::Aes192; +use hmac::Hmac; +use sha1::{Sha1, Digest}; +use pbkdf2::pbkdf2; use protobuf::ProtobufEnum; use serde; use serde_json; @@ -24,6 +22,7 @@ pub struct Credentials { #[serde(deserialize_with = "deserialize_protobuf_enum")] pub auth_type: AuthenticationType, + #[serde(alias = "encoded_auth_blob")] #[serde(serialize_with = "serialize_base64")] #[serde(deserialize_with = "deserialize_base64")] pub auth_data: Vec, @@ -63,42 +62,34 @@ impl Credentials { Ok(data) } - let encrypted_blob = base64::decode(encrypted_blob).unwrap(); - - let secret = { - let mut data = [0u8; 20]; - let mut h = crypto::sha1::Sha1::new(); - h.input(device_id.as_bytes()); - h.result(&mut data); - data - }; + let secret = Sha1::digest(device_id.as_bytes()); let key = { - let mut data = [0u8; 24]; - let mut mac = Hmac::new(Sha1::new(), &secret); - pbkdf2(&mut mac, username.as_bytes(), 0x100, &mut data[0..20]); + let mut key = [0u8; 24]; + pbkdf2::>(&secret, username.as_bytes(), 0x100, &mut key[0..20]); - let mut hash = Sha1::new(); - hash.input(&data[0..20]); - hash.result(&mut data[0..20]); - BigEndian::write_u32(&mut data[20..], 20); - data + let hash = &Sha1::digest(&key[..20]); + key[..20].copy_from_slice(hash); + BigEndian::write_u32(&mut key[20..], 20); + key }; + // decrypt data using ECB mode without padding let blob = { - // Anyone know what this block mode is ? - let mut data = vec![0u8; encrypted_blob.len()]; - let mut cipher = - aes::ecb_decryptor(aes::KeySize::KeySize192, &key, crypto::blockmodes::NoPadding); - cipher - .decrypt( - &mut crypto::buffer::RefReadBuffer::new(&encrypted_blob), - &mut crypto::buffer::RefWriteBuffer::new(&mut data), - true, - ) - .unwrap(); + use aes::block_cipher_trait::BlockCipher; + use aes::block_cipher_trait::generic_array::GenericArray; + use aes::block_cipher_trait::generic_array::typenum::Unsigned; - let l = encrypted_blob.len(); + let mut data = base64::decode(encrypted_blob).unwrap(); + let cipher = Aes192::new(GenericArray::from_slice(&key)); + let block_size = ::BlockSize::to_usize(); + assert_eq!(data.len() % block_size, 0); + // replace to chunks_exact_mut with MSRV bump to 1.31 + for chunk in data.chunks_mut(block_size) { + cipher.decrypt_block(GenericArray::from_mut_slice(chunk)); + } + + let l = data.len(); for i in 0..l - 0x10 { data[l - i - 1] ^= data[l - i - 0x11]; } @@ -152,10 +143,10 @@ where serde::Serialize::serialize(&v.value(), ser) } -fn deserialize_protobuf_enum(de: D) -> Result +fn deserialize_protobuf_enum<'de, T, D>(de: D) -> Result where T: ProtobufEnum, - D: serde::Deserializer, + D: serde::Deserializer<'de>, { let v: i32 = try!(serde::Deserialize::deserialize(de)); T::from_i32(v).ok_or_else(|| serde::de::Error::custom("Invalid enum value")) @@ -169,9 +160,9 @@ where serde::Serialize::serialize(&base64::encode(v.as_ref()), ser) } -fn deserialize_base64(de: D) -> Result, D::Error> +fn deserialize_base64<'de, D>(de: D) -> Result, D::Error> where - D: serde::Deserializer, + D: serde::Deserializer<'de>, { let v: String = try!(serde::Deserialize::deserialize(de)); base64::decode(&v).map_err(|e| serde::de::Error::custom(e.to_string())) diff --git a/core/src/config.rs b/core/src/config.rs index 283b7c83..293e2e90 100644 --- a/core/src/config.rs +++ b/core/src/config.rs @@ -15,7 +15,7 @@ pub struct SessionConfig { impl Default for SessionConfig { fn default() -> SessionConfig { - let device_id = Uuid::new_v4().hyphenated().to_string(); + let device_id = Uuid::new_v4().to_hyphenated().to_string(); SessionConfig { user_agent: version::version_string(), device_id: device_id, diff --git a/core/src/connection/handshake.rs b/core/src/connection/handshake.rs index fe338029..f291f13f 100644 --- a/core/src/connection/handshake.rs +++ b/core/src/connection/handshake.rs @@ -1,13 +1,12 @@ use byteorder::{BigEndian, ByteOrder, WriteBytesExt}; -use crypto::hmac::Hmac; -use crypto::mac::Mac; -use crypto::sha1::Sha1; +use hmac::{Hmac, Mac}; +use sha1::Sha1; use futures::{Async, Future, Poll}; use protobuf::{self, Message}; use rand::thread_rng; use std::io::{self, Read}; use std::marker::PhantomData; -use tokio_io::codec::Framed; +use tokio_codec::{Decoder, Framed}; use tokio_io::io::{read_exact, write_all, ReadExact, Window, WriteAll}; use tokio_io::{AsyncRead, AsyncWrite}; @@ -73,7 +72,7 @@ impl Future for Handshake { ClientResponse(ref mut codec, ref mut write) => { let (connection, _) = try_ready!(write.poll()); let codec = codec.take().unwrap(); - let framed = connection.framed(codec); + let framed = codec.framed(connection); return Ok(Async::Ready(framed)); } } @@ -187,17 +186,19 @@ fn read_into_accumulator( } fn compute_keys(shared_secret: &[u8], packets: &[u8]) -> (Vec, Vec, Vec) { - let mut data = Vec::with_capacity(0x64); - let mut mac = Hmac::new(Sha1::new(), &shared_secret); + type HmacSha1 = Hmac; + let mut data = Vec::with_capacity(0x64); for i in 1..6 { + let mut mac = HmacSha1::new_varkey(&shared_secret) + .expect("HMAC can take key of any size"); mac.input(packets); mac.input(&[i]); data.extend_from_slice(&mac.result().code()); - mac.reset(); } - mac = Hmac::new(Sha1::new(), &data[..0x14]); + let mut mac = HmacSha1::new_varkey(&data[..0x14]) + .expect("HMAC can take key of any size");; mac.input(packets); ( diff --git a/core/src/connection/mod.rs b/core/src/connection/mod.rs index 7e527b20..91b46c80 100644 --- a/core/src/connection/mod.rs +++ b/core/src/connection/mod.rs @@ -10,7 +10,7 @@ use std::io; use std::net::ToSocketAddrs; use tokio_core::net::TcpStream; use tokio_core::reactor::Handle; -use tokio_io::codec::Framed; +use tokio_codec::Framed; use url::Url; use authentication::Credentials; diff --git a/core/src/lib.rs b/core/src/lib.rs index ba3756d1..e384d14b 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -14,8 +14,6 @@ extern crate serde_derive; extern crate base64; extern crate byteorder; extern crate bytes; -extern crate crypto; -extern crate extprim; extern crate httparse; extern crate hyper; extern crate hyper_proxy; @@ -24,14 +22,18 @@ extern crate num_integer; extern crate num_traits; extern crate protobuf; extern crate rand; -extern crate rpassword; extern crate serde; extern crate serde_json; extern crate shannon; +extern crate tokio_codec; extern crate tokio_core; extern crate tokio_io; extern crate url; extern crate uuid; +extern crate sha1; +extern crate hmac; +extern crate pbkdf2; +extern crate aes; extern crate librespot_protocol as protocol; diff --git a/core/src/session.rs b/core/src/session.rs index 931b60c7..e15c6b83 100644 --- a/core/src/session.rs +++ b/core/src/session.rs @@ -1,24 +1,27 @@ -use bytes::Bytes; -use futures::sync::mpsc; -use futures::{Async, Future, IntoFuture, Poll, Stream}; use std::io; -use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT}; use std::sync::{Arc, RwLock, Weak}; +use std::sync::atomic::{AtomicUsize, Ordering}; +use std::time::{SystemTime, UNIX_EPOCH}; + +use byteorder::{BigEndian, ByteOrder}; +use bytes::Bytes; +use futures::{Async, Future, IntoFuture, Poll, Stream}; +use futures::sync::mpsc; use tokio_core::reactor::{Handle, Remote}; use apresolve::apresolve_or_fallback; +use audio_key::AudioKeyManager; use authentication::Credentials; use cache::Cache; +use channel::ChannelManager; use component::Lazy; use config::SessionConfig; use connection; - -use audio_key::AudioKeyManager; -use channel::ChannelManager; use mercury::MercuryManager; struct SessionData { country: String, + time_delta: i64, canonical_username: String, invalid: bool, } @@ -39,7 +42,7 @@ struct SessionInternal { session_id: usize, } -static SESSION_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT; +static SESSION_COUNTER: AtomicUsize = AtomicUsize::new(0); #[derive(Clone)] pub struct Session(Arc); @@ -108,6 +111,7 @@ impl Session { country: String::new(), canonical_username: username, invalid: false, + time_delta: 0, }), tx_connection: sender_tx, @@ -146,6 +150,10 @@ impl Session { self.0.mercury.get(|| MercuryManager::new(self.weak())) } + pub fn time_delta(&self) -> i64 { + self.0.data.read().unwrap().time_delta + } + pub fn spawn(&self, f: F) where F: FnOnce(&Handle) -> R + Send + 'static, @@ -168,8 +176,17 @@ impl Session { fn dispatch(&self, cmd: u8, data: Bytes) { match cmd { 0x4 => { + let server_timestamp = BigEndian::read_u32(data.as_ref()) as i64; + let timestamp = match SystemTime::now().duration_since(UNIX_EPOCH) { + Ok(dur) => dur, + Err(err) => err.duration(), + } + .as_secs() as i64; + + self.0.data.write().unwrap().time_delta = server_timestamp - timestamp; + self.debug_info(); - self.send_packet(0x49, data.as_ref().to_owned()); + self.send_packet(0x49, vec![0, 0, 0, 0]); } 0x4a => (), 0x1b => { diff --git a/core/src/spotify_id.rs b/core/src/spotify_id.rs index c71ea1d7..79414a18 100644 --- a/core/src/spotify_id.rs +++ b/core/src/spotify_id.rs @@ -1,5 +1,3 @@ -use byteorder::{BigEndian, ByteOrder}; -use extprim::u128::u128; use std; use std::fmt; @@ -16,14 +14,14 @@ impl SpotifyId { pub fn from_base16(id: &str) -> Result { let data = id.as_bytes(); - let mut n: u128 = u128::zero(); + let mut n = 0u128; for c in data { let d = match BASE16_DIGITS.iter().position(|e| e == c) { None => return Err(SpotifyIdError), - Some(x) => x as u64, + Some(x) => x as u128, }; - n = n * u128::new(16); - n = n + u128::new(d); + n = n * 16; + n = n + d; } Ok(SpotifyId(n)) @@ -32,14 +30,14 @@ impl SpotifyId { pub fn from_base62(id: &str) -> Result { let data = id.as_bytes(); - let mut n: u128 = u128::zero(); + let mut n = 0u128; for c in data { let d = match BASE62_DIGITS.iter().position(|e| e == c) { None => return Err(SpotifyIdError), - Some(x) => x as u64, + Some(x) => x as u128, }; - n = n * u128::new(62); - n = n + u128::new(d); + n = n * 62; + n = n + d; } Ok(SpotifyId(n)) @@ -50,45 +48,30 @@ impl SpotifyId { return Err(SpotifyIdError); }; - let high = BigEndian::read_u64(&data[0..8]); - let low = BigEndian::read_u64(&data[8..16]); + let mut arr: [u8; 16] = Default::default(); + arr.copy_from_slice(&data[0..16]); - Ok(SpotifyId(u128::from_parts(high, low))) + Ok(SpotifyId(u128::from_be_bytes(arr))) } pub fn to_base16(&self) -> String { - let &SpotifyId(ref n) = self; - - let mut data = [0u8; 32]; - for i in 0..32 { - data[31 - i] = BASE16_DIGITS[(n.wrapping_shr(4 * i as u32).low64() & 0xF) as usize]; - } - - std::str::from_utf8(&data).unwrap().to_owned() + format!("{:032x}", self.0) } pub fn to_base62(&self) -> String { let &SpotifyId(mut n) = self; let mut data = [0u8; 22]; - let sixty_two = u128::new(62); for i in 0..22 { - data[21 - i] = BASE62_DIGITS[(n % sixty_two).low64() as usize]; - n /= sixty_two; + data[21 - i] = BASE62_DIGITS[(n % 62) as usize]; + n /= 62; } std::str::from_utf8(&data).unwrap().to_owned() } pub fn to_raw(&self) -> [u8; 16] { - let &SpotifyId(ref n) = self; - - let mut data = [0u8; 16]; - - BigEndian::write_u64(&mut data[0..8], n.high64()); - BigEndian::write_u64(&mut data[8..16], n.low64()); - - data + self.0.to_be_bytes() } } diff --git a/core/src/version.rs b/core/src/version.rs index b1ec361b..cd7fa042 100644 --- a/core/src/version.rs +++ b/core/src/version.rs @@ -1,5 +1,44 @@ -include!(concat!(env!("OUT_DIR"), "/version.rs")); - pub fn version_string() -> String { format!("librespot-{}", short_sha()) } + +// Generate a timestamp representing now (UTC) in RFC3339 format. +pub fn now() -> &'static str { + env!("VERGEN_BUILD_TIMESTAMP") +} + +// Generate a timstamp string representing now (UTC). +pub fn short_now() -> &'static str { + env!("VERGEN_BUILD_DATE") +} + +// Generate a SHA string +pub fn sha() -> &'static str { + env!("VERGEN_SHA") +} + +// Generate a short SHA string +pub fn short_sha() -> &'static str { + env!("VERGEN_SHA_SHORT") +} + +// Generate the commit date string +pub fn commit_date() -> &'static str { + env!("VERGEN_COMMIT_DATE") +} + +// Generate the target triple string +pub fn target() -> &'static str { + env!("VERGEN_TARGET_TRIPLE") +} + +// Generate a semver string +pub fn semver() -> &'static str { + // env!("VERGEN_SEMVER") + env!("CARGO_PKG_VERSION") +} + +// Generate a random build id. +pub fn build_id() -> &'static str { + env!("VERGEN_BUILD_ID") +} diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml index ac84faf7..51e44191 100644 --- a/metadata/Cargo.toml +++ b/metadata/Cargo.toml @@ -4,10 +4,10 @@ version = "0.1.0" authors = ["Paul Lietar "] [dependencies] -byteorder = "1.0" -futures = "0.1.8" -linear-map = "1.0" -protobuf = "2.0.5" +byteorder = "1.3" +futures = "0.1" +linear-map = "1.2" +protobuf = "2.8.*" [dependencies.librespot-core] path = "../core" diff --git a/metadata/src/cover.rs b/metadata/src/cover.rs index 0ef186a0..408e658e 100644 --- a/metadata/src/cover.rs +++ b/metadata/src/cover.rs @@ -1,9 +1,9 @@ use byteorder::{BigEndian, WriteBytesExt}; use std::io::Write; -use core::channel::ChannelData; -use core::session::Session; -use core::spotify_id::FileId; +use librespot_core::channel::ChannelData; +use librespot_core::session::Session; +use librespot_core::spotify_id::FileId; pub fn get(session: &Session, file: FileId) -> ChannelData { let (channel_id, channel) = session.channel().allocate(); diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index 2d62c03c..60ca2738 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -3,7 +3,7 @@ extern crate futures; extern crate linear_map; extern crate protobuf; -extern crate librespot_core as core; +extern crate librespot_core; extern crate librespot_protocol as protocol; pub mod cover; @@ -11,9 +11,9 @@ pub mod cover; use futures::Future; use linear_map::LinearMap; -use core::mercury::MercuryError; -use core::session::Session; -use core::spotify_id::{FileId, SpotifyId}; +use librespot_core::mercury::MercuryError; +use librespot_core::session::Session; +use librespot_core::spotify_id::{FileId, SpotifyId}; pub use protocol::metadata::AudioFile_Format as FileFormat; diff --git a/playback/Cargo.toml b/playback/Cargo.toml index 653cbe6c..c9ac7592 100644 --- a/playback/Cargo.toml +++ b/playback/Cargo.toml @@ -11,18 +11,23 @@ path = "../core" path = "../metadata" [dependencies] -futures = "0.1.8" -log = "0.3.5" -byteorder = "1.2.1" +futures = "0.1" +log = "0.4" +byteorder = "1.3" -alsa = { git = "https://github.com/plietar/rust-alsa", optional = true } +alsa = { version = "0.2.1", optional = true } portaudio-rs = { version = "0.3.0", optional = true } libpulse-sys = { version = "0.0.0", optional = true } jack = { version = "0.5.3", optional = true } libc = { version = "0.2", optional = true } +rodio = { version = "0.9", optional = true, default-features = false } +cpal = { version = "0.8", optional = true } +sdl2 = { version = "0.32", optional = true } [features] alsa-backend = ["alsa"] portaudio-backend = ["portaudio-rs"] pulseaudio-backend = ["libpulse-sys", "libc"] jackaudio-backend = ["jack"] +rodio-backend = ["rodio", "cpal"] +sdl-backend = ["sdl2"] diff --git a/playback/src/audio_backend/alsa.rs b/playback/src/audio_backend/alsa.rs index 982a2625..98e7c8f7 100644 --- a/playback/src/audio_backend/alsa.rs +++ b/playback/src/audio_backend/alsa.rs @@ -1,14 +1,70 @@ use super::{Open, Sink}; -use alsa::{Access, Format, Mode, Stream, PCM}; +use alsa::device_name::HintIter; +use alsa::pcm::{Access, Format, HwParams, PCM}; +use alsa::{Direction, Error, ValueOr}; +use std::ffi::CString; use std::io; +use std::process::exit; pub struct AlsaSink(Option, String); +fn list_outputs() { + for t in &["pcm", "ctl", "hwdep"] { + println!("{} devices:", t); + let i = HintIter::new(None, &*CString::new(*t).unwrap()).unwrap(); + for a in i { + if let Some(Direction::Playback) = a.direction { + // mimic aplay -L + println!( + "{}\n\t{}\n", + a.name.unwrap(), + a.desc.unwrap().replace("\n", "\n\t") + ); + } + } + } +} + +fn open_device(dev_name: &str) -> Result<(PCM), Box> { + let pcm = PCM::new(dev_name, Direction::Playback, false)?; + // http://www.linuxjournal.com/article/6735?page=0,1#N0x19ab2890.0x19ba78d8 + // latency = period_size * periods / (rate * bytes_per_frame) + // For 16 Bit stereo data, one frame has a length of four bytes. + // 500ms = buffer_size / (44100 * 4) + // buffer_size_bytes = 0.5 * 44100 / 4 + // buffer_size_frames = 0.5 * 44100 = 22050 + { + // Set hardware parameters: 44100 Hz / Stereo / 16 bit + let hwp = HwParams::any(&pcm)?; + + hwp.set_access(Access::RWInterleaved)?; + hwp.set_format(Format::s16())?; + hwp.set_rate(44100, ValueOr::Nearest)?; + hwp.set_channels(2)?; + hwp.set_buffer_size_near(22050)?; // ~ 0.5s latency + pcm.hw_params(&hwp)?; + + let swp = pcm.sw_params_current()?; + swp.set_start_threshold(hwp.get_buffer_size()? - hwp.get_period_size()?)?; + pcm.sw_params(&swp)?; + } + + Ok(pcm) +} + impl Open for AlsaSink { fn open(device: Option) -> AlsaSink { info!("Using alsa sink"); - let name = device.unwrap_or("default".to_string()); + let name = match device.as_ref().map(AsRef::as_ref) { + Some("?") => { + println!("Listing available alsa outputs"); + list_outputs(); + exit(0) + } + Some(device) => device, + None => "default", + }.to_string(); AlsaSink(None, name) } @@ -17,16 +73,9 @@ impl Open for AlsaSink { impl Sink for AlsaSink { fn start(&mut self) -> io::Result<()> { if self.0.is_none() { - match PCM::open( - &*self.1, - Stream::Playback, - Mode::Blocking, - Format::Signed16, - Access::Interleaved, - 2, - 44100, - ) { - Ok(f) => self.0 = Some(f), + let pcm = open_device(&self.1); + match pcm { + Ok(p) => self.0 = Some(p), Err(e) => { error!("Alsa error PCM open {}", e); return Err(io::Error::new( @@ -36,16 +85,28 @@ impl Sink for AlsaSink { } } } + Ok(()) } fn stop(&mut self) -> io::Result<()> { + { + let pcm = self.0.as_ref().unwrap(); + pcm.drain().unwrap(); + } self.0 = None; Ok(()) } fn write(&mut self, data: &[i16]) -> io::Result<()> { - self.0.as_mut().unwrap().write_interleaved(&data).unwrap(); + let pcm = self.0.as_mut().unwrap(); + let io = pcm.io_i16().unwrap(); + + match io.writei(&data) { + Ok(_) => (), + Err(err) => pcm.try_recover(err, false).unwrap(), + } + Ok(()) } } diff --git a/playback/src/audio_backend/mod.rs b/playback/src/audio_backend/mod.rs index 895b0100..bdf309a8 100644 --- a/playback/src/audio_backend/mod.rs +++ b/playback/src/audio_backend/mod.rs @@ -34,6 +34,15 @@ mod jackaudio; #[cfg(feature = "jackaudio-backend")] use self::jackaudio::JackSink; +#[cfg(feature = "rodio-backend")] +mod rodio; +#[cfg(feature = "rodio-backend")] +use self::rodio::RodioSink; +#[cfg(feature = "sdl-backend")] +mod sdl; +#[cfg(feature = "sdl-backend")] +use self::sdl::SdlSink; + mod pipe; use self::pipe::StdoutSink; @@ -46,6 +55,10 @@ pub const BACKENDS: &'static [(&'static str, fn(Option) -> Box)] = ("pulseaudio", mk_sink::), #[cfg(feature = "jackaudio-backend")] ("jackaudio", mk_sink::), + #[cfg(feature = "rodio-backend")] + ("rodio", mk_sink::), + #[cfg(feature = "sdl-backend")] + ("sdl", mk_sink::), ("pipe", mk_sink::), ]; diff --git a/playback/src/audio_backend/rodio.rs b/playback/src/audio_backend/rodio.rs new file mode 100644 index 00000000..c4b9c927 --- /dev/null +++ b/playback/src/audio_backend/rodio.rs @@ -0,0 +1,115 @@ +use super::{Open, Sink}; +extern crate rodio; +extern crate cpal; +use std::{io, thread, time}; +use std::process::exit; + +pub struct RodioSink { + rodio_sink: rodio::Sink, +} + +fn list_formats(ref device: &rodio::Device) { + let default_fmt = match device.default_output_format() { + Ok(fmt) => cpal::SupportedFormat::from(fmt), + Err(e) => { + warn!("Error getting default rodio::Sink format: {:?}", e); + return; + }, + }; + + let mut output_formats = match device.supported_output_formats() { + Ok(f) => f.peekable(), + Err(e) => { + warn!("Error getting supported rodio::Sink formats: {:?}", e); + return; + }, + }; + + if output_formats.peek().is_some() { + debug!(" Available formats:"); + for format in output_formats { + let s = format!("{}ch, {:?}, min {:?}, max {:?}", format.channels, format.data_type, format.min_sample_rate, format.max_sample_rate); + if format == default_fmt { + debug!(" (default) {}", s); + } else { + debug!(" {:?}", format); + } + } + } +} + +fn list_outputs() { + let default_device = rodio::default_output_device().unwrap(); + println!("Default Audio Device:\n {}", default_device.name()); + list_formats(&default_device); + + println!("Other Available Audio Devices:"); + for device in rodio::output_devices() { + if device.name() != default_device.name() { + println!(" {}", device.name()); + list_formats(&device); + } + } +} + +impl Open for RodioSink { + fn open(device: Option) -> RodioSink { + debug!("Using rodio sink"); + + let mut rodio_device = rodio::default_output_device().expect("no output device available"); + if device.is_some() { + let device_name = device.unwrap(); + + if device_name == "?".to_string() { + list_outputs(); + exit(0) + } + let mut found = false; + for d in rodio::output_devices() { + if d.name() == device_name { + rodio_device = d; + found = true; + break; + } + } + if !found { + println!("No output sink matching '{}' found.", device_name); + exit(0) + } + } + let sink = rodio::Sink::new(&rodio_device); + + RodioSink { + rodio_sink: sink, + } + } +} + +impl Sink for RodioSink { + fn start(&mut self) -> io::Result<()> { + // More similar to an "unpause" than "play". Doesn't undo "stop". + // self.rodio_sink.play(); + Ok(()) + } + + fn stop(&mut self) -> io::Result<()> { + // This will immediately stop playback, but the sink is then unusable. + // We just have to let the current buffer play till the end. + // self.rodio_sink.stop(); + Ok(()) + } + + fn write(&mut self, data: &[i16]) -> io::Result<()> { + let source = rodio::buffer::SamplesBuffer::new(2, 44100, data); + self.rodio_sink.append(source); + + // Chunk sizes seem to be about 256 to 3000 ish items long. + // Assuming they're on average 1628 then a half second buffer is: + // 44100 elements --> about 27 chunks + while self.rodio_sink.len() > 26 { + // sleep and wait for rodio to drain a bit + thread::sleep(time::Duration::from_millis(10)); + } + Ok(()) + } +} diff --git a/playback/src/audio_backend/sdl.rs b/playback/src/audio_backend/sdl.rs new file mode 100644 index 00000000..71d19e50 --- /dev/null +++ b/playback/src/audio_backend/sdl.rs @@ -0,0 +1,56 @@ +use super::{Open, Sink}; +use sdl2::audio::{AudioQueue, AudioSpecDesired}; +use std::{io, thread, time}; + +type Channel = i16; + +pub struct SdlSink { + queue: AudioQueue, +} + +impl Open for SdlSink { + fn open(device: Option) -> SdlSink { + debug!("Using SDL sink"); + + if device.is_some() { + panic!("SDL sink does not support specifying a device name"); + } + + let ctx = sdl2::init().expect("Could not init SDL"); + let audio = ctx.audio().expect("Could not init SDL audio subsystem"); + + let desired_spec = AudioSpecDesired { + freq: Some(44_100), + channels: Some(2), + samples: None, + }; + let queue = audio + .open_queue(None, &desired_spec) + .expect("Could not open SDL audio device"); + + SdlSink { queue: queue } + } +} + +impl Sink for SdlSink { + fn start(&mut self) -> io::Result<()> { + self.queue.clear(); + self.queue.resume(); + Ok(()) + } + + fn stop(&mut self) -> io::Result<()> { + self.queue.pause(); + self.queue.clear(); + Ok(()) + } + + fn write(&mut self, data: &[i16]) -> io::Result<()> { + while self.queue.size() > (2 * 2 * 44_100) { + // sleep and wait for sdl thread to drain the queue a bit + thread::sleep(time::Duration::from_millis(10)); + } + self.queue.queue(data); + Ok(()) + } +} diff --git a/playback/src/lib.rs b/playback/src/lib.rs index afce662c..aeb0407f 100644 --- a/playback/src/lib.rs +++ b/playback/src/lib.rs @@ -16,11 +16,14 @@ extern crate libpulse_sys; #[cfg(feature = "jackaudio-backend")] extern crate jack; +#[cfg(feature = "sdl-backend")] +extern crate sdl2; + #[cfg(feature = "libc")] extern crate libc; extern crate librespot_audio as audio; -extern crate librespot_core as core; +extern crate librespot_core; extern crate librespot_metadata as metadata; pub mod audio_backend; diff --git a/playback/src/mixer/alsamixer.rs b/playback/src/mixer/alsamixer.rs new file mode 100644 index 00000000..5c77d470 --- /dev/null +++ b/playback/src/mixer/alsamixer.rs @@ -0,0 +1,78 @@ +use super::AudioFilter; +use super::{Mixer, MixerConfig}; +use std::error::Error; + +use alsa; + +#[derive(Clone)] +pub struct AlsaMixer { + config: MixerConfig, +} + +impl AlsaMixer { + fn map_volume(&self, set_volume: Option) -> Result<(u16), Box> { + let mixer = alsa::mixer::Mixer::new(&self.config.card, false)?; + let sid = alsa::mixer::SelemId::new(&*self.config.mixer, self.config.index); + + let selem = mixer + .find_selem(&sid) + .expect(format!("Couldn't find simple mixer control for {}", self.config.mixer).as_str()); + let (min, max) = selem.get_playback_volume_range(); + let range = (max - min) as f64; + + let new_vol: u16; + + if let Some(vol) = set_volume { + let alsa_volume: i64 = ((vol as f64 / 0xFFFF as f64) * range) as i64 + min; + debug!("Mapping volume {:?} ->> alsa {:?}", vol, alsa_volume); + selem + .set_playback_volume_all(alsa_volume) + .expect("Couldn't set alsa volume"); + new_vol = vol; + } else { + let cur_vol = selem + .get_playback_volume(alsa::mixer::SelemChannelId::mono()) + .expect("Couldn't get current volume"); + new_vol = (((cur_vol - min) as f64 / range) * 0xFFFF as f64) as u16; + debug!("Mapping volume {:?} <<- alsa {:?}", new_vol, cur_vol); + } + + Ok(new_vol) + } +} + +impl Mixer for AlsaMixer { + fn open(config: Option) -> AlsaMixer { + let config = config.unwrap_or_default(); + info!( + "Setting up new mixer: card:{} mixer:{} index:{}", + config.card, config.mixer, config.index + ); + AlsaMixer { config: config } + } + + fn start(&self) {} + + fn stop(&self) {} + + fn volume(&self) -> u16 { + match self.map_volume(None) { + Ok(vol) => vol, + Err(e) => { + error!("Error getting volume for <{}>, {:?}", self.config.card, e); + 0 + } + } + } + + fn set_volume(&self, volume: u16) { + match self.map_volume(Some(volume)) { + Ok(_) => (), + Err(e) => error!("Error setting volume for <{}>, {:?}", self.config.card, e), + } + } + + fn get_audio_filter(&self) -> Option> { + None + } +} diff --git a/playback/src/mixer/mod.rs b/playback/src/mixer/mod.rs index a6ba34aa..f19a8661 100644 --- a/playback/src/mixer/mod.rs +++ b/playback/src/mixer/mod.rs @@ -1,5 +1,5 @@ pub trait Mixer: Send { - fn open() -> Self + fn open(Option) -> Self where Self: Sized; fn start(&self); @@ -15,16 +15,39 @@ pub trait AudioFilter { fn modify_stream(&self, data: &mut [i16]); } +#[cfg(feature = "alsa-backend")] +pub mod alsamixer; +#[cfg(feature = "alsa-backend")] +use self::alsamixer::AlsaMixer; + +#[derive(Debug, Clone)] +pub struct MixerConfig { + pub card: String, + pub mixer: String, + pub index: u32, +} + +impl Default for MixerConfig { + fn default() -> MixerConfig { MixerConfig { + card: String::from("default"), + mixer: String::from("PCM"), + index: 0, + } + } +} + pub mod softmixer; use self::softmixer::SoftMixer; -fn mk_sink() -> Box { - Box::new(M::open()) +fn mk_sink(device: Option) -> Box { + Box::new(M::open(device)) } -pub fn find>(name: Option) -> Option Box> { +pub fn find>(name: Option) -> Option) -> Box> { match name.as_ref().map(AsRef::as_ref) { None | Some("softvol") => Some(mk_sink::), + #[cfg(feature = "alsa-backend")] + Some("alsa") => Some(mk_sink::), _ => None, } } diff --git a/playback/src/mixer/softmixer.rs b/playback/src/mixer/softmixer.rs index b197f09c..4b969785 100644 --- a/playback/src/mixer/softmixer.rs +++ b/playback/src/mixer/softmixer.rs @@ -2,7 +2,7 @@ use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; use super::AudioFilter; -use super::Mixer; +use super::{Mixer, MixerConfig}; #[derive(Clone)] pub struct SoftMixer { @@ -10,7 +10,7 @@ pub struct SoftMixer { } impl Mixer for SoftMixer { - fn open() -> SoftMixer { + fn open(_: Option) -> SoftMixer { SoftMixer { volume: Arc::new(AtomicUsize::new(0xFFFF)), } diff --git a/playback/src/player.rs b/playback/src/player.rs index 1e6db128..aaa5ec0f 100644 --- a/playback/src/player.rs +++ b/playback/src/player.rs @@ -11,8 +11,8 @@ use std::thread; use std::time::Duration; use config::{Bitrate, PlayerConfig}; -use core::session::Session; -use core::spotify_id::SpotifyId; +use librespot_core::session::Session; +use librespot_core::spotify_id::SpotifyId; use audio::{AudioDecrypt, AudioFile, StreamLoaderController}; use audio::{VorbisDecoder, VorbisPacket}; @@ -495,7 +495,9 @@ impl PlayerInternal { let stream_data_rate = self.stream_data_rate(); if let Some(stream_loader_controller) = self.state.stream_loader_controller() { stream_loader_controller.set_stream_mode(); - if let PlayerState::Playing{..} = self.state { + } + if let PlayerState::Playing{..} = self.state { + if let Some(stream_loader_controller) = self.state.stream_loader_controller() { let wait_for_data_length = (2 * stream_loader_controller.ping_time_ms() * stream_data_rate) / 1000; stream_loader_controller.fetch_next_blocking(wait_for_data_length); } diff --git a/protocol/Cargo.toml b/protocol/Cargo.toml index b75265ad..a0d30ad0 100644 --- a/protocol/Cargo.toml +++ b/protocol/Cargo.toml @@ -5,7 +5,8 @@ authors = ["Paul Liétar "] build = "build.rs" [dependencies] -protobuf = "2.0.5" +protobuf = "2.8.*" [build-dependencies] -protobuf-codegen-pure = "2.0.5" +protobuf-codegen-pure = "2.8.*" +protobuf-codegen = "*" diff --git a/protocol/build.rs b/protocol/build.rs index a1c5c662..ec6fff84 100644 --- a/protocol/build.rs +++ b/protocol/build.rs @@ -1,93 +1,54 @@ -extern crate protobuf_codegen_pure; -use protobuf_codegen_pure::Customize; -use std::fs::File; -use std::io::prelude::*; +extern crate protobuf_codegen; // Does the business +extern crate protobuf_codegen_pure; // Helper function -mod files; +use std::path::Path; +use std::fs::{read_to_string, write}; + +use protobuf_codegen_pure::Customize; +use protobuf_codegen_pure::parse_and_typecheck; fn main() { - let mut changed = false; - let mut file = File::open("files.rs").unwrap(); - let mut f_str = String::new(); - file.read_to_string(&mut f_str).unwrap(); - drop(file); - for &(path, expected_checksum) in files::FILES { - let actual = cksum_file(path).unwrap(); - if expected_checksum != actual { - protobuf_codegen_pure::run(protobuf_codegen_pure::Args { - out_dir: "src", - input: &[path], - includes: &["proto"], - customize: Customize { ..Default::default() }, - }).expect("protoc"); - let new_checksum = cksum_file(path).unwrap(); - f_str = f_str.replace(&expected_checksum.to_string(), &new_checksum.to_string()); - changed = true; + let customizations = Customize { ..Default::default() }; + + let lib_str = read_to_string("src/lib.rs").unwrap(); + + // Iterate over the desired module names. + for line in lib_str.lines() { + if !line.starts_with("pub mod ") { + continue; + } + let len = line.len(); + let name = &line[8..len-1]; // Remove keywords and semi-colon + + // Build the paths to relevant files. + let src = &format!("proto/{}.proto", name); + let dest = &format!("src/{}.rs", name); + + // Get the contents of the existing generated file. + let mut existing = "".to_string(); + if Path::new(dest).exists() { + // Removing CRLF line endings if present. + existing = read_to_string(dest).unwrap().replace("\r\n", "\n"); + } + + println!("Regenerating {} from {}", dest, src); + + // Parse the proto files as the protobuf-codegen-pure crate does. + let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc"); + // But generate them with the protobuf-codegen crate directly. + // Then we can keep the result in-memory. + let result = protobuf_codegen::gen( + &p.file_descriptors, + &p.relative_paths, + &customizations, + ); + // Protoc result as a byte array. + let new = &result.first().unwrap().content; + // Convert to utf8 to compare with existing. + let new = std::str::from_utf8(&new).unwrap(); + // Save newly generated file if changed. + if new != existing { + write(dest, &new).unwrap(); } } - if changed { - // Write new checksums to file - let mut file = File::create("files.rs").unwrap(); - file.write_all(f_str.as_bytes()).unwrap(); - } } - -fn cksum_file>(path: T) -> std::io::Result { - let mut file = File::open(path)?; - let mut contents = Vec::new(); - file.read_to_end(&mut contents)?; - - Ok(cksum(&contents)) -} - -fn cksum>(data: T) -> u32 { - let data = data.as_ref(); - - let mut value = 0u32; - for x in data { - value = (value << 8) ^ CRC_LOOKUP_ARRAY[(*x as u32 ^ (value >> 24)) as usize]; - } - - let mut n = data.len(); - while n != 0 { - value = (value << 8) ^ CRC_LOOKUP_ARRAY[((n & 0xFF) as u32 ^ (value >> 24)) as usize]; - n >>= 8; - } - - !value -} - -static CRC_LOOKUP_ARRAY: &'static [u32] = &[ - 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, - 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, - 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, - 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd, - 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, - 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, - 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, - 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, - 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072, - 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, - 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, - 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, - 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692, - 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, - 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, - 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a, - 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, - 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, - 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b, - 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, - 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, - 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, - 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, - 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3, - 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, - 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, - 0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, - 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, - 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, - 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, - 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c, - 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4, -]; diff --git a/protocol/files.rs b/protocol/files.rs deleted file mode 100644 index 25529ce8..00000000 --- a/protocol/files.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Autogenerated by build.rs - -pub const FILES: &'static [(&'static str, u32)] = &[ - ("proto/authentication.proto", 2098196376), - ("proto/keyexchange.proto", 451735664), - ("proto/mercury.proto", 709993906), - ("proto/metadata.proto", 2474472423), - ("proto/pubsub.proto", 2686584829), - ("proto/spirc.proto", 1587493382), -]; diff --git a/protocol/src/authentication.rs b/protocol/src/authentication.rs index 88dd8abf..a6c85990 100644 --- a/protocol/src/authentication.rs +++ b/protocol/src/authentication.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.8.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,10 +17,15 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `authentication.proto` use protobuf::Message as Message_imported_for_functions; use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_0; + #[derive(PartialEq,Clone,Default)] pub struct ClientResponseEncrypted { // message fields @@ -34,8 +39,14 @@ pub struct ClientResponseEncrypted { appkey: ::protobuf::SingularPtrField, client_info: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientResponseEncrypted { + fn default() -> &'a ClientResponseEncrypted { + ::default_instance() + } } impl ClientResponseEncrypted { @@ -45,6 +56,10 @@ impl ClientResponseEncrypted { // required .LoginCredentials login_credentials = 10; + + pub fn get_login_credentials(&self) -> &LoginCredentials { + self.login_credentials.as_ref().unwrap_or_else(|| LoginCredentials::default_instance()) + } pub fn clear_login_credentials(&mut self) { self.login_credentials.clear(); } @@ -72,12 +87,12 @@ impl ClientResponseEncrypted { self.login_credentials.take().unwrap_or_else(|| LoginCredentials::new()) } - pub fn get_login_credentials(&self) -> &LoginCredentials { - self.login_credentials.as_ref().unwrap_or_else(|| LoginCredentials::default_instance()) - } - // optional .AccountCreation account_creation = 20; + + pub fn get_account_creation(&self) -> AccountCreation { + self.account_creation.unwrap_or(AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT) + } pub fn clear_account_creation(&mut self) { self.account_creation = ::std::option::Option::None; } @@ -91,12 +106,12 @@ impl ClientResponseEncrypted { self.account_creation = ::std::option::Option::Some(v); } - pub fn get_account_creation(&self) -> AccountCreation { - self.account_creation.unwrap_or(AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT) - } - // optional .FingerprintResponseUnion fingerprint_response = 30; + + pub fn get_fingerprint_response(&self) -> &FingerprintResponseUnion { + self.fingerprint_response.as_ref().unwrap_or_else(|| FingerprintResponseUnion::default_instance()) + } pub fn clear_fingerprint_response(&mut self) { self.fingerprint_response.clear(); } @@ -124,12 +139,12 @@ impl ClientResponseEncrypted { self.fingerprint_response.take().unwrap_or_else(|| FingerprintResponseUnion::new()) } - pub fn get_fingerprint_response(&self) -> &FingerprintResponseUnion { - self.fingerprint_response.as_ref().unwrap_or_else(|| FingerprintResponseUnion::default_instance()) - } - // optional .PeerTicketUnion peer_ticket = 40; + + pub fn get_peer_ticket(&self) -> &PeerTicketUnion { + self.peer_ticket.as_ref().unwrap_or_else(|| PeerTicketUnion::default_instance()) + } pub fn clear_peer_ticket(&mut self) { self.peer_ticket.clear(); } @@ -157,12 +172,12 @@ impl ClientResponseEncrypted { self.peer_ticket.take().unwrap_or_else(|| PeerTicketUnion::new()) } - pub fn get_peer_ticket(&self) -> &PeerTicketUnion { - self.peer_ticket.as_ref().unwrap_or_else(|| PeerTicketUnion::default_instance()) - } - // required .SystemInfo system_info = 50; + + pub fn get_system_info(&self) -> &SystemInfo { + self.system_info.as_ref().unwrap_or_else(|| SystemInfo::default_instance()) + } pub fn clear_system_info(&mut self) { self.system_info.clear(); } @@ -190,12 +205,15 @@ impl ClientResponseEncrypted { self.system_info.take().unwrap_or_else(|| SystemInfo::new()) } - pub fn get_system_info(&self) -> &SystemInfo { - self.system_info.as_ref().unwrap_or_else(|| SystemInfo::default_instance()) - } - // optional string platform_model = 60; + + pub fn get_platform_model(&self) -> &str { + match self.platform_model.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_platform_model(&mut self) { self.platform_model.clear(); } @@ -223,15 +241,15 @@ impl ClientResponseEncrypted { self.platform_model.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_platform_model(&self) -> &str { - match self.platform_model.as_ref() { + // optional string version_string = 70; + + + pub fn get_version_string(&self) -> &str { + match self.version_string.as_ref() { Some(v) => &v, None => "", } } - - // optional string version_string = 70; - pub fn clear_version_string(&mut self) { self.version_string.clear(); } @@ -259,15 +277,12 @@ impl ClientResponseEncrypted { self.version_string.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_version_string(&self) -> &str { - match self.version_string.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .LibspotifyAppKey appkey = 80; + + pub fn get_appkey(&self) -> &LibspotifyAppKey { + self.appkey.as_ref().unwrap_or_else(|| LibspotifyAppKey::default_instance()) + } pub fn clear_appkey(&mut self) { self.appkey.clear(); } @@ -295,12 +310,12 @@ impl ClientResponseEncrypted { self.appkey.take().unwrap_or_else(|| LibspotifyAppKey::new()) } - pub fn get_appkey(&self) -> &LibspotifyAppKey { - self.appkey.as_ref().unwrap_or_else(|| LibspotifyAppKey::default_instance()) - } - // optional .ClientInfo client_info = 90; + + pub fn get_client_info(&self) -> &ClientInfo { + self.client_info.as_ref().unwrap_or_else(|| ClientInfo::default_instance()) + } pub fn clear_client_info(&mut self) { self.client_info.clear(); } @@ -327,10 +342,6 @@ impl ClientResponseEncrypted { pub fn take_client_info(&mut self) -> ClientInfo { self.client_info.take().unwrap_or_else(|| ClientInfo::new()) } - - pub fn get_client_info(&self) -> &ClientInfo { - self.client_info.as_ref().unwrap_or_else(|| ClientInfo::default_instance()) - } } impl ::protobuf::Message for ClientResponseEncrypted { @@ -511,13 +522,13 @@ impl ::protobuf::Message for ClientResponseEncrypted { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -604,15 +615,15 @@ impl ::protobuf::Message for ClientResponseEncrypted { impl ::protobuf::Clear for ClientResponseEncrypted { fn clear(&mut self) { - self.clear_login_credentials(); - self.clear_account_creation(); - self.clear_fingerprint_response(); - self.clear_peer_ticket(); - self.clear_system_info(); - self.clear_platform_model(); - self.clear_version_string(); - self.clear_appkey(); - self.clear_client_info(); + self.login_credentials.clear(); + self.account_creation = ::std::option::Option::None; + self.fingerprint_response.clear(); + self.peer_ticket.clear(); + self.system_info.clear(); + self.platform_model.clear(); + self.version_string.clear(); + self.appkey.clear(); + self.client_info.clear(); self.unknown_fields.clear(); } } @@ -636,8 +647,14 @@ pub struct LoginCredentials { typ: ::std::option::Option, auth_data: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCredentials { + fn default() -> &'a LoginCredentials { + ::default_instance() + } } impl LoginCredentials { @@ -647,6 +664,13 @@ impl LoginCredentials { // optional string username = 10; + + pub fn get_username(&self) -> &str { + match self.username.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_username(&mut self) { self.username.clear(); } @@ -674,15 +698,12 @@ impl LoginCredentials { self.username.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_username(&self) -> &str { - match self.username.as_ref() { - Some(v) => &v, - None => "", - } - } - // required .AuthenticationType typ = 20; + + pub fn get_typ(&self) -> AuthenticationType { + self.typ.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -696,12 +717,15 @@ impl LoginCredentials { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> AuthenticationType { - self.typ.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) - } - // optional bytes auth_data = 30; + + pub fn get_auth_data(&self) -> &[u8] { + match self.auth_data.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_auth_data(&mut self) { self.auth_data.clear(); } @@ -728,13 +752,6 @@ impl LoginCredentials { pub fn take_auth_data(&mut self) -> ::std::vec::Vec { self.auth_data.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_auth_data(&self) -> &[u8] { - match self.auth_data.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for LoginCredentials { @@ -810,13 +827,13 @@ impl ::protobuf::Message for LoginCredentials { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -873,9 +890,9 @@ impl ::protobuf::Message for LoginCredentials { impl ::protobuf::Clear for LoginCredentials { fn clear(&mut self) { - self.clear_username(); - self.clear_typ(); - self.clear_auth_data(); + self.username.clear(); + self.typ = ::std::option::Option::None; + self.auth_data.clear(); self.unknown_fields.clear(); } } @@ -898,8 +915,14 @@ pub struct FingerprintResponseUnion { grain: ::protobuf::SingularPtrField, hmac_ripemd: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintResponseUnion { + fn default() -> &'a FingerprintResponseUnion { + ::default_instance() + } } impl FingerprintResponseUnion { @@ -909,6 +932,10 @@ impl FingerprintResponseUnion { // optional .FingerprintGrainResponse grain = 10; + + pub fn get_grain(&self) -> &FingerprintGrainResponse { + self.grain.as_ref().unwrap_or_else(|| FingerprintGrainResponse::default_instance()) + } pub fn clear_grain(&mut self) { self.grain.clear(); } @@ -936,12 +963,12 @@ impl FingerprintResponseUnion { self.grain.take().unwrap_or_else(|| FingerprintGrainResponse::new()) } - pub fn get_grain(&self) -> &FingerprintGrainResponse { - self.grain.as_ref().unwrap_or_else(|| FingerprintGrainResponse::default_instance()) - } - // optional .FingerprintHmacRipemdResponse hmac_ripemd = 20; + + pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdResponse { + self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdResponse::default_instance()) + } pub fn clear_hmac_ripemd(&mut self) { self.hmac_ripemd.clear(); } @@ -968,10 +995,6 @@ impl FingerprintResponseUnion { pub fn take_hmac_ripemd(&mut self) -> FingerprintHmacRipemdResponse { self.hmac_ripemd.take().unwrap_or_else(|| FingerprintHmacRipemdResponse::new()) } - - pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdResponse { - self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdResponse::default_instance()) - } } impl ::protobuf::Message for FingerprintResponseUnion { @@ -1051,13 +1074,13 @@ impl ::protobuf::Message for FingerprintResponseUnion { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1109,8 +1132,8 @@ impl ::protobuf::Message for FingerprintResponseUnion { impl ::protobuf::Clear for FingerprintResponseUnion { fn clear(&mut self) { - self.clear_grain(); - self.clear_hmac_ripemd(); + self.grain.clear(); + self.hmac_ripemd.clear(); self.unknown_fields.clear(); } } @@ -1132,8 +1155,14 @@ pub struct FingerprintGrainResponse { // message fields encrypted_key: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintGrainResponse { + fn default() -> &'a FingerprintGrainResponse { + ::default_instance() + } } impl FingerprintGrainResponse { @@ -1143,6 +1172,13 @@ impl FingerprintGrainResponse { // required bytes encrypted_key = 10; + + pub fn get_encrypted_key(&self) -> &[u8] { + match self.encrypted_key.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_encrypted_key(&mut self) { self.encrypted_key.clear(); } @@ -1169,13 +1205,6 @@ impl FingerprintGrainResponse { pub fn take_encrypted_key(&mut self) -> ::std::vec::Vec { self.encrypted_key.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_encrypted_key(&self) -> &[u8] { - match self.encrypted_key.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for FingerprintGrainResponse { @@ -1233,13 +1262,13 @@ impl ::protobuf::Message for FingerprintGrainResponse { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1286,7 +1315,7 @@ impl ::protobuf::Message for FingerprintGrainResponse { impl ::protobuf::Clear for FingerprintGrainResponse { fn clear(&mut self) { - self.clear_encrypted_key(); + self.encrypted_key.clear(); self.unknown_fields.clear(); } } @@ -1308,8 +1337,14 @@ pub struct FingerprintHmacRipemdResponse { // message fields hmac: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintHmacRipemdResponse { + fn default() -> &'a FingerprintHmacRipemdResponse { + ::default_instance() + } } impl FingerprintHmacRipemdResponse { @@ -1319,6 +1354,13 @@ impl FingerprintHmacRipemdResponse { // required bytes hmac = 10; + + pub fn get_hmac(&self) -> &[u8] { + match self.hmac.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_hmac(&mut self) { self.hmac.clear(); } @@ -1345,13 +1387,6 @@ impl FingerprintHmacRipemdResponse { pub fn take_hmac(&mut self) -> ::std::vec::Vec { self.hmac.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_hmac(&self) -> &[u8] { - match self.hmac.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for FingerprintHmacRipemdResponse { @@ -1409,13 +1444,13 @@ impl ::protobuf::Message for FingerprintHmacRipemdResponse { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1462,7 +1497,7 @@ impl ::protobuf::Message for FingerprintHmacRipemdResponse { impl ::protobuf::Clear for FingerprintHmacRipemdResponse { fn clear(&mut self) { - self.clear_hmac(); + self.hmac.clear(); self.unknown_fields.clear(); } } @@ -1485,8 +1520,14 @@ pub struct PeerTicketUnion { public_key: ::protobuf::SingularPtrField, old_ticket: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PeerTicketUnion { + fn default() -> &'a PeerTicketUnion { + ::default_instance() + } } impl PeerTicketUnion { @@ -1496,6 +1537,10 @@ impl PeerTicketUnion { // optional .PeerTicketPublicKey public_key = 10; + + pub fn get_public_key(&self) -> &PeerTicketPublicKey { + self.public_key.as_ref().unwrap_or_else(|| PeerTicketPublicKey::default_instance()) + } pub fn clear_public_key(&mut self) { self.public_key.clear(); } @@ -1523,12 +1568,12 @@ impl PeerTicketUnion { self.public_key.take().unwrap_or_else(|| PeerTicketPublicKey::new()) } - pub fn get_public_key(&self) -> &PeerTicketPublicKey { - self.public_key.as_ref().unwrap_or_else(|| PeerTicketPublicKey::default_instance()) - } - // optional .PeerTicketOld old_ticket = 20; + + pub fn get_old_ticket(&self) -> &PeerTicketOld { + self.old_ticket.as_ref().unwrap_or_else(|| PeerTicketOld::default_instance()) + } pub fn clear_old_ticket(&mut self) { self.old_ticket.clear(); } @@ -1555,10 +1600,6 @@ impl PeerTicketUnion { pub fn take_old_ticket(&mut self) -> PeerTicketOld { self.old_ticket.take().unwrap_or_else(|| PeerTicketOld::new()) } - - pub fn get_old_ticket(&self) -> &PeerTicketOld { - self.old_ticket.as_ref().unwrap_or_else(|| PeerTicketOld::default_instance()) - } } impl ::protobuf::Message for PeerTicketUnion { @@ -1638,13 +1679,13 @@ impl ::protobuf::Message for PeerTicketUnion { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1696,8 +1737,8 @@ impl ::protobuf::Message for PeerTicketUnion { impl ::protobuf::Clear for PeerTicketUnion { fn clear(&mut self) { - self.clear_public_key(); - self.clear_old_ticket(); + self.public_key.clear(); + self.old_ticket.clear(); self.unknown_fields.clear(); } } @@ -1719,8 +1760,14 @@ pub struct PeerTicketPublicKey { // message fields public_key: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PeerTicketPublicKey { + fn default() -> &'a PeerTicketPublicKey { + ::default_instance() + } } impl PeerTicketPublicKey { @@ -1730,6 +1777,13 @@ impl PeerTicketPublicKey { // required bytes public_key = 10; + + pub fn get_public_key(&self) -> &[u8] { + match self.public_key.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_public_key(&mut self) { self.public_key.clear(); } @@ -1756,13 +1810,6 @@ impl PeerTicketPublicKey { pub fn take_public_key(&mut self) -> ::std::vec::Vec { self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_public_key(&self) -> &[u8] { - match self.public_key.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for PeerTicketPublicKey { @@ -1820,13 +1867,13 @@ impl ::protobuf::Message for PeerTicketPublicKey { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1873,7 +1920,7 @@ impl ::protobuf::Message for PeerTicketPublicKey { impl ::protobuf::Clear for PeerTicketPublicKey { fn clear(&mut self) { - self.clear_public_key(); + self.public_key.clear(); self.unknown_fields.clear(); } } @@ -1896,8 +1943,14 @@ pub struct PeerTicketOld { peer_ticket: ::protobuf::SingularField<::std::vec::Vec>, peer_ticket_signature: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PeerTicketOld { + fn default() -> &'a PeerTicketOld { + ::default_instance() + } } impl PeerTicketOld { @@ -1907,6 +1960,13 @@ impl PeerTicketOld { // required bytes peer_ticket = 10; + + pub fn get_peer_ticket(&self) -> &[u8] { + match self.peer_ticket.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_peer_ticket(&mut self) { self.peer_ticket.clear(); } @@ -1934,15 +1994,15 @@ impl PeerTicketOld { self.peer_ticket.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_peer_ticket(&self) -> &[u8] { - match self.peer_ticket.as_ref() { + // required bytes peer_ticket_signature = 20; + + + pub fn get_peer_ticket_signature(&self) -> &[u8] { + match self.peer_ticket_signature.as_ref() { Some(v) => &v, None => &[], } } - - // required bytes peer_ticket_signature = 20; - pub fn clear_peer_ticket_signature(&mut self) { self.peer_ticket_signature.clear(); } @@ -1969,13 +2029,6 @@ impl PeerTicketOld { pub fn take_peer_ticket_signature(&mut self) -> ::std::vec::Vec { self.peer_ticket_signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_peer_ticket_signature(&self) -> &[u8] { - match self.peer_ticket_signature.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for PeerTicketOld { @@ -2045,13 +2098,13 @@ impl ::protobuf::Message for PeerTicketOld { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2103,8 +2156,8 @@ impl ::protobuf::Message for PeerTicketOld { impl ::protobuf::Clear for PeerTicketOld { fn clear(&mut self) { - self.clear_peer_ticket(); - self.clear_peer_ticket_signature(); + self.peer_ticket.clear(); + self.peer_ticket_signature.clear(); self.unknown_fields.clear(); } } @@ -2135,8 +2188,14 @@ pub struct SystemInfo { system_information_string: ::protobuf::SingularField<::std::string::String>, device_id: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SystemInfo { + fn default() -> &'a SystemInfo { + ::default_instance() + } } impl SystemInfo { @@ -2146,6 +2205,10 @@ impl SystemInfo { // required .CpuFamily cpu_family = 10; + + pub fn get_cpu_family(&self) -> CpuFamily { + self.cpu_family.unwrap_or(CpuFamily::CPU_UNKNOWN) + } pub fn clear_cpu_family(&mut self) { self.cpu_family = ::std::option::Option::None; } @@ -2159,12 +2222,12 @@ impl SystemInfo { self.cpu_family = ::std::option::Option::Some(v); } - pub fn get_cpu_family(&self) -> CpuFamily { - self.cpu_family.unwrap_or(CpuFamily::CPU_UNKNOWN) - } - // optional uint32 cpu_subtype = 20; + + pub fn get_cpu_subtype(&self) -> u32 { + self.cpu_subtype.unwrap_or(0) + } pub fn clear_cpu_subtype(&mut self) { self.cpu_subtype = ::std::option::Option::None; } @@ -2178,12 +2241,12 @@ impl SystemInfo { self.cpu_subtype = ::std::option::Option::Some(v); } - pub fn get_cpu_subtype(&self) -> u32 { - self.cpu_subtype.unwrap_or(0) - } - // optional uint32 cpu_ext = 30; + + pub fn get_cpu_ext(&self) -> u32 { + self.cpu_ext.unwrap_or(0) + } pub fn clear_cpu_ext(&mut self) { self.cpu_ext = ::std::option::Option::None; } @@ -2197,12 +2260,12 @@ impl SystemInfo { self.cpu_ext = ::std::option::Option::Some(v); } - pub fn get_cpu_ext(&self) -> u32 { - self.cpu_ext.unwrap_or(0) - } - // optional .Brand brand = 40; + + pub fn get_brand(&self) -> Brand { + self.brand.unwrap_or(Brand::BRAND_UNBRANDED) + } pub fn clear_brand(&mut self) { self.brand = ::std::option::Option::None; } @@ -2216,12 +2279,12 @@ impl SystemInfo { self.brand = ::std::option::Option::Some(v); } - pub fn get_brand(&self) -> Brand { - self.brand.unwrap_or(Brand::BRAND_UNBRANDED) - } - // optional uint32 brand_flags = 50; + + pub fn get_brand_flags(&self) -> u32 { + self.brand_flags.unwrap_or(0) + } pub fn clear_brand_flags(&mut self) { self.brand_flags = ::std::option::Option::None; } @@ -2235,12 +2298,12 @@ impl SystemInfo { self.brand_flags = ::std::option::Option::Some(v); } - pub fn get_brand_flags(&self) -> u32 { - self.brand_flags.unwrap_or(0) - } - // required .Os os = 60; + + pub fn get_os(&self) -> Os { + self.os.unwrap_or(Os::OS_UNKNOWN) + } pub fn clear_os(&mut self) { self.os = ::std::option::Option::None; } @@ -2254,12 +2317,12 @@ impl SystemInfo { self.os = ::std::option::Option::Some(v); } - pub fn get_os(&self) -> Os { - self.os.unwrap_or(Os::OS_UNKNOWN) - } - // optional uint32 os_version = 70; + + pub fn get_os_version(&self) -> u32 { + self.os_version.unwrap_or(0) + } pub fn clear_os_version(&mut self) { self.os_version = ::std::option::Option::None; } @@ -2273,12 +2336,12 @@ impl SystemInfo { self.os_version = ::std::option::Option::Some(v); } - pub fn get_os_version(&self) -> u32 { - self.os_version.unwrap_or(0) - } - // optional uint32 os_ext = 80; + + pub fn get_os_ext(&self) -> u32 { + self.os_ext.unwrap_or(0) + } pub fn clear_os_ext(&mut self) { self.os_ext = ::std::option::Option::None; } @@ -2292,12 +2355,15 @@ impl SystemInfo { self.os_ext = ::std::option::Option::Some(v); } - pub fn get_os_ext(&self) -> u32 { - self.os_ext.unwrap_or(0) - } - // optional string system_information_string = 90; + + pub fn get_system_information_string(&self) -> &str { + match self.system_information_string.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_system_information_string(&mut self) { self.system_information_string.clear(); } @@ -2325,15 +2391,15 @@ impl SystemInfo { self.system_information_string.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_system_information_string(&self) -> &str { - match self.system_information_string.as_ref() { + // optional string device_id = 100; + + + pub fn get_device_id(&self) -> &str { + match self.device_id.as_ref() { Some(v) => &v, None => "", } } - - // optional string device_id = 100; - pub fn clear_device_id(&mut self) { self.device_id.clear(); } @@ -2360,13 +2426,6 @@ impl SystemInfo { pub fn take_device_id(&mut self) -> ::std::string::String { self.device_id.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_device_id(&self) -> &str { - match self.device_id.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for SystemInfo { @@ -2528,13 +2587,13 @@ impl ::protobuf::Message for SystemInfo { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2626,16 +2685,16 @@ impl ::protobuf::Message for SystemInfo { impl ::protobuf::Clear for SystemInfo { fn clear(&mut self) { - self.clear_cpu_family(); - self.clear_cpu_subtype(); - self.clear_cpu_ext(); - self.clear_brand(); - self.clear_brand_flags(); - self.clear_os(); - self.clear_os_version(); - self.clear_os_ext(); - self.clear_system_information_string(); - self.clear_device_id(); + self.cpu_family = ::std::option::Option::None; + self.cpu_subtype = ::std::option::Option::None; + self.cpu_ext = ::std::option::Option::None; + self.brand = ::std::option::Option::None; + self.brand_flags = ::std::option::Option::None; + self.os = ::std::option::Option::None; + self.os_version = ::std::option::Option::None; + self.os_ext = ::std::option::Option::None; + self.system_information_string.clear(); + self.device_id.clear(); self.unknown_fields.clear(); } } @@ -2661,8 +2720,14 @@ pub struct LibspotifyAppKey { useragent: ::protobuf::SingularField<::std::string::String>, callback_hash: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LibspotifyAppKey { + fn default() -> &'a LibspotifyAppKey { + ::default_instance() + } } impl LibspotifyAppKey { @@ -2672,6 +2737,10 @@ impl LibspotifyAppKey { // required uint32 version = 1; + + pub fn get_version(&self) -> u32 { + self.version.unwrap_or(0) + } pub fn clear_version(&mut self) { self.version = ::std::option::Option::None; } @@ -2685,12 +2754,15 @@ impl LibspotifyAppKey { self.version = ::std::option::Option::Some(v); } - pub fn get_version(&self) -> u32 { - self.version.unwrap_or(0) - } - // required bytes devkey = 2; + + pub fn get_devkey(&self) -> &[u8] { + match self.devkey.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_devkey(&mut self) { self.devkey.clear(); } @@ -2718,15 +2790,15 @@ impl LibspotifyAppKey { self.devkey.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_devkey(&self) -> &[u8] { - match self.devkey.as_ref() { + // required bytes signature = 3; + + + pub fn get_signature(&self) -> &[u8] { + match self.signature.as_ref() { Some(v) => &v, None => &[], } } - - // required bytes signature = 3; - pub fn clear_signature(&mut self) { self.signature.clear(); } @@ -2754,15 +2826,15 @@ impl LibspotifyAppKey { self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_signature(&self) -> &[u8] { - match self.signature.as_ref() { - Some(v) => &v, - None => &[], - } - } - // required string useragent = 4; + + pub fn get_useragent(&self) -> &str { + match self.useragent.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_useragent(&mut self) { self.useragent.clear(); } @@ -2790,15 +2862,15 @@ impl LibspotifyAppKey { self.useragent.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_useragent(&self) -> &str { - match self.useragent.as_ref() { - Some(v) => &v, - None => "", - } - } - // required bytes callback_hash = 5; + + pub fn get_callback_hash(&self) -> &[u8] { + match self.callback_hash.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_callback_hash(&mut self) { self.callback_hash.clear(); } @@ -2825,13 +2897,6 @@ impl LibspotifyAppKey { pub fn take_callback_hash(&mut self) -> ::std::vec::Vec { self.callback_hash.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_callback_hash(&self) -> &[u8] { - match self.callback_hash.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for LibspotifyAppKey { @@ -2941,13 +3006,13 @@ impl ::protobuf::Message for LibspotifyAppKey { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3014,11 +3079,11 @@ impl ::protobuf::Message for LibspotifyAppKey { impl ::protobuf::Clear for LibspotifyAppKey { fn clear(&mut self) { - self.clear_version(); - self.clear_devkey(); - self.clear_signature(); - self.clear_useragent(); - self.clear_callback_hash(); + self.version = ::std::option::Option::None; + self.devkey.clear(); + self.signature.clear(); + self.useragent.clear(); + self.callback_hash.clear(); self.unknown_fields.clear(); } } @@ -3042,8 +3107,14 @@ pub struct ClientInfo { fb: ::protobuf::SingularPtrField, language: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientInfo { + fn default() -> &'a ClientInfo { + ::default_instance() + } } impl ClientInfo { @@ -3053,6 +3124,10 @@ impl ClientInfo { // optional bool limited = 1; + + pub fn get_limited(&self) -> bool { + self.limited.unwrap_or(false) + } pub fn clear_limited(&mut self) { self.limited = ::std::option::Option::None; } @@ -3066,12 +3141,12 @@ impl ClientInfo { self.limited = ::std::option::Option::Some(v); } - pub fn get_limited(&self) -> bool { - self.limited.unwrap_or(false) - } - // optional .ClientInfoFacebook fb = 2; + + pub fn get_fb(&self) -> &ClientInfoFacebook { + self.fb.as_ref().unwrap_or_else(|| ClientInfoFacebook::default_instance()) + } pub fn clear_fb(&mut self) { self.fb.clear(); } @@ -3099,12 +3174,15 @@ impl ClientInfo { self.fb.take().unwrap_or_else(|| ClientInfoFacebook::new()) } - pub fn get_fb(&self) -> &ClientInfoFacebook { - self.fb.as_ref().unwrap_or_else(|| ClientInfoFacebook::default_instance()) - } - // optional string language = 3; + + pub fn get_language(&self) -> &str { + match self.language.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_language(&mut self) { self.language.clear(); } @@ -3131,13 +3209,6 @@ impl ClientInfo { pub fn take_language(&mut self) -> ::std::string::String { self.language.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_language(&self) -> &str { - match self.language.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for ClientInfo { @@ -3222,13 +3293,13 @@ impl ::protobuf::Message for ClientInfo { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3285,9 +3356,9 @@ impl ::protobuf::Message for ClientInfo { impl ::protobuf::Clear for ClientInfo { fn clear(&mut self) { - self.clear_limited(); - self.clear_fb(); - self.clear_language(); + self.limited = ::std::option::Option::None; + self.fb.clear(); + self.language.clear(); self.unknown_fields.clear(); } } @@ -3309,8 +3380,14 @@ pub struct ClientInfoFacebook { // message fields machine_id: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientInfoFacebook { + fn default() -> &'a ClientInfoFacebook { + ::default_instance() + } } impl ClientInfoFacebook { @@ -3320,6 +3397,13 @@ impl ClientInfoFacebook { // optional string machine_id = 1; + + pub fn get_machine_id(&self) -> &str { + match self.machine_id.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_machine_id(&mut self) { self.machine_id.clear(); } @@ -3346,13 +3430,6 @@ impl ClientInfoFacebook { pub fn take_machine_id(&mut self) -> ::std::string::String { self.machine_id.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_machine_id(&self) -> &str { - match self.machine_id.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for ClientInfoFacebook { @@ -3407,13 +3484,13 @@ impl ::protobuf::Message for ClientInfoFacebook { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3460,7 +3537,7 @@ impl ::protobuf::Message for ClientInfoFacebook { impl ::protobuf::Clear for ClientInfoFacebook { fn clear(&mut self) { - self.clear_machine_id(); + self.machine_id.clear(); self.unknown_fields.clear(); } } @@ -3489,8 +3566,14 @@ pub struct APWelcome { account_info: ::protobuf::SingularPtrField, fb: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a APWelcome { + fn default() -> &'a APWelcome { + ::default_instance() + } } impl APWelcome { @@ -3500,6 +3583,13 @@ impl APWelcome { // required string canonical_username = 10; + + pub fn get_canonical_username(&self) -> &str { + match self.canonical_username.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_canonical_username(&mut self) { self.canonical_username.clear(); } @@ -3527,15 +3617,12 @@ impl APWelcome { self.canonical_username.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_canonical_username(&self) -> &str { - match self.canonical_username.as_ref() { - Some(v) => &v, - None => "", - } - } - // required .AccountType account_type_logged_in = 20; + + pub fn get_account_type_logged_in(&self) -> AccountType { + self.account_type_logged_in.unwrap_or(AccountType::Spotify) + } pub fn clear_account_type_logged_in(&mut self) { self.account_type_logged_in = ::std::option::Option::None; } @@ -3549,12 +3636,12 @@ impl APWelcome { self.account_type_logged_in = ::std::option::Option::Some(v); } - pub fn get_account_type_logged_in(&self) -> AccountType { - self.account_type_logged_in.unwrap_or(AccountType::Spotify) - } - // required .AccountType credentials_type_logged_in = 25; + + pub fn get_credentials_type_logged_in(&self) -> AccountType { + self.credentials_type_logged_in.unwrap_or(AccountType::Spotify) + } pub fn clear_credentials_type_logged_in(&mut self) { self.credentials_type_logged_in = ::std::option::Option::None; } @@ -3568,12 +3655,12 @@ impl APWelcome { self.credentials_type_logged_in = ::std::option::Option::Some(v); } - pub fn get_credentials_type_logged_in(&self) -> AccountType { - self.credentials_type_logged_in.unwrap_or(AccountType::Spotify) - } - // required .AuthenticationType reusable_auth_credentials_type = 30; + + pub fn get_reusable_auth_credentials_type(&self) -> AuthenticationType { + self.reusable_auth_credentials_type.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) + } pub fn clear_reusable_auth_credentials_type(&mut self) { self.reusable_auth_credentials_type = ::std::option::Option::None; } @@ -3587,12 +3674,15 @@ impl APWelcome { self.reusable_auth_credentials_type = ::std::option::Option::Some(v); } - pub fn get_reusable_auth_credentials_type(&self) -> AuthenticationType { - self.reusable_auth_credentials_type.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) - } - // required bytes reusable_auth_credentials = 40; + + pub fn get_reusable_auth_credentials(&self) -> &[u8] { + match self.reusable_auth_credentials.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_reusable_auth_credentials(&mut self) { self.reusable_auth_credentials.clear(); } @@ -3620,15 +3710,15 @@ impl APWelcome { self.reusable_auth_credentials.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_reusable_auth_credentials(&self) -> &[u8] { - match self.reusable_auth_credentials.as_ref() { + // optional bytes lfs_secret = 50; + + + pub fn get_lfs_secret(&self) -> &[u8] { + match self.lfs_secret.as_ref() { Some(v) => &v, None => &[], } } - - // optional bytes lfs_secret = 50; - pub fn clear_lfs_secret(&mut self) { self.lfs_secret.clear(); } @@ -3656,15 +3746,12 @@ impl APWelcome { self.lfs_secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_lfs_secret(&self) -> &[u8] { - match self.lfs_secret.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional .AccountInfo account_info = 60; + + pub fn get_account_info(&self) -> &AccountInfo { + self.account_info.as_ref().unwrap_or_else(|| AccountInfo::default_instance()) + } pub fn clear_account_info(&mut self) { self.account_info.clear(); } @@ -3692,12 +3779,12 @@ impl APWelcome { self.account_info.take().unwrap_or_else(|| AccountInfo::new()) } - pub fn get_account_info(&self) -> &AccountInfo { - self.account_info.as_ref().unwrap_or_else(|| AccountInfo::default_instance()) - } - // optional .AccountInfoFacebook fb = 70; + + pub fn get_fb(&self) -> &AccountInfoFacebook { + self.fb.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance()) + } pub fn clear_fb(&mut self) { self.fb.clear(); } @@ -3724,10 +3811,6 @@ impl APWelcome { pub fn take_fb(&mut self) -> AccountInfoFacebook { self.fb.take().unwrap_or_else(|| AccountInfoFacebook::new()) } - - pub fn get_fb(&self) -> &AccountInfoFacebook { - self.fb.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance()) - } } impl ::protobuf::Message for APWelcome { @@ -3876,13 +3959,13 @@ impl ::protobuf::Message for APWelcome { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3964,14 +4047,14 @@ impl ::protobuf::Message for APWelcome { impl ::protobuf::Clear for APWelcome { fn clear(&mut self) { - self.clear_canonical_username(); - self.clear_account_type_logged_in(); - self.clear_credentials_type_logged_in(); - self.clear_reusable_auth_credentials_type(); - self.clear_reusable_auth_credentials(); - self.clear_lfs_secret(); - self.clear_account_info(); - self.clear_fb(); + self.canonical_username.clear(); + self.account_type_logged_in = ::std::option::Option::None; + self.credentials_type_logged_in = ::std::option::Option::None; + self.reusable_auth_credentials_type = ::std::option::Option::None; + self.reusable_auth_credentials.clear(); + self.lfs_secret.clear(); + self.account_info.clear(); + self.fb.clear(); self.unknown_fields.clear(); } } @@ -3994,8 +4077,14 @@ pub struct AccountInfo { spotify: ::protobuf::SingularPtrField, facebook: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AccountInfo { + fn default() -> &'a AccountInfo { + ::default_instance() + } } impl AccountInfo { @@ -4005,6 +4094,10 @@ impl AccountInfo { // optional .AccountInfoSpotify spotify = 1; + + pub fn get_spotify(&self) -> &AccountInfoSpotify { + self.spotify.as_ref().unwrap_or_else(|| AccountInfoSpotify::default_instance()) + } pub fn clear_spotify(&mut self) { self.spotify.clear(); } @@ -4032,12 +4125,12 @@ impl AccountInfo { self.spotify.take().unwrap_or_else(|| AccountInfoSpotify::new()) } - pub fn get_spotify(&self) -> &AccountInfoSpotify { - self.spotify.as_ref().unwrap_or_else(|| AccountInfoSpotify::default_instance()) - } - // optional .AccountInfoFacebook facebook = 2; + + pub fn get_facebook(&self) -> &AccountInfoFacebook { + self.facebook.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance()) + } pub fn clear_facebook(&mut self) { self.facebook.clear(); } @@ -4064,10 +4157,6 @@ impl AccountInfo { pub fn take_facebook(&mut self) -> AccountInfoFacebook { self.facebook.take().unwrap_or_else(|| AccountInfoFacebook::new()) } - - pub fn get_facebook(&self) -> &AccountInfoFacebook { - self.facebook.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance()) - } } impl ::protobuf::Message for AccountInfo { @@ -4147,13 +4236,13 @@ impl ::protobuf::Message for AccountInfo { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4205,8 +4294,8 @@ impl ::protobuf::Message for AccountInfo { impl ::protobuf::Clear for AccountInfo { fn clear(&mut self) { - self.clear_spotify(); - self.clear_facebook(); + self.spotify.clear(); + self.facebook.clear(); self.unknown_fields.clear(); } } @@ -4226,8 +4315,14 @@ impl ::protobuf::reflect::ProtobufValue for AccountInfo { #[derive(PartialEq,Clone,Default)] pub struct AccountInfoSpotify { // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AccountInfoSpotify { + fn default() -> &'a AccountInfoSpotify { + ::default_instance() + } } impl AccountInfoSpotify { @@ -4279,13 +4374,13 @@ impl ::protobuf::Message for AccountInfoSpotify { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4349,8 +4444,14 @@ pub struct AccountInfoFacebook { access_token: ::protobuf::SingularField<::std::string::String>, machine_id: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AccountInfoFacebook { + fn default() -> &'a AccountInfoFacebook { + ::default_instance() + } } impl AccountInfoFacebook { @@ -4360,6 +4461,13 @@ impl AccountInfoFacebook { // optional string access_token = 1; + + pub fn get_access_token(&self) -> &str { + match self.access_token.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_access_token(&mut self) { self.access_token.clear(); } @@ -4387,15 +4495,15 @@ impl AccountInfoFacebook { self.access_token.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_access_token(&self) -> &str { - match self.access_token.as_ref() { + // optional string machine_id = 2; + + + pub fn get_machine_id(&self) -> &str { + match self.machine_id.as_ref() { Some(v) => &v, None => "", } } - - // optional string machine_id = 2; - pub fn clear_machine_id(&mut self) { self.machine_id.clear(); } @@ -4422,13 +4530,6 @@ impl AccountInfoFacebook { pub fn take_machine_id(&mut self) -> ::std::string::String { self.machine_id.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_machine_id(&self) -> &str { - match self.machine_id.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for AccountInfoFacebook { @@ -4492,13 +4593,13 @@ impl ::protobuf::Message for AccountInfoFacebook { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4550,8 +4651,8 @@ impl ::protobuf::Message for AccountInfoFacebook { impl ::protobuf::Clear for AccountInfoFacebook { fn clear(&mut self) { - self.clear_access_token(); - self.clear_machine_id(); + self.access_token.clear(); + self.machine_id.clear(); self.unknown_fields.clear(); } } @@ -4620,6 +4721,12 @@ impl ::protobuf::ProtobufEnum for AuthenticationType { impl ::std::marker::Copy for AuthenticationType { } +impl ::std::default::Default for AuthenticationType { + fn default() -> Self { + AuthenticationType::AUTHENTICATION_USER_PASS + } +} + impl ::protobuf::reflect::ProtobufValue for AuthenticationType { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4669,6 +4776,13 @@ impl ::protobuf::ProtobufEnum for AccountCreation { impl ::std::marker::Copy for AccountCreation { } +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for AccountCreation { + fn default() -> Self { + AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT + } +} + impl ::protobuf::reflect::ProtobufValue for AccountCreation { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4742,6 +4856,12 @@ impl ::protobuf::ProtobufEnum for CpuFamily { impl ::std::marker::Copy for CpuFamily { } +impl ::std::default::Default for CpuFamily { + fn default() -> Self { + CpuFamily::CPU_UNKNOWN + } +} + impl ::protobuf::reflect::ProtobufValue for CpuFamily { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4797,6 +4917,12 @@ impl ::protobuf::ProtobufEnum for Brand { impl ::std::marker::Copy for Brand { } +impl ::std::default::Default for Brand { + fn default() -> Self { + Brand::BRAND_UNBRANDED + } +} + impl ::protobuf::reflect::ProtobufValue for Brand { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4909,6 +5035,12 @@ impl ::protobuf::ProtobufEnum for Os { impl ::std::marker::Copy for Os { } +impl ::std::default::Default for Os { + fn default() -> Self { + Os::OS_UNKNOWN + } +} + impl ::protobuf::reflect::ProtobufValue for Os { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4958,6 +5090,12 @@ impl ::protobuf::ProtobufEnum for AccountType { impl ::std::marker::Copy for AccountType { } +impl ::std::default::Default for AccountType { + fn default() -> Self { + AccountType::Spotify + } +} + impl ::protobuf::reflect::ProtobufValue for AccountType { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4965,83 +5103,77 @@ impl ::protobuf::reflect::ProtobufValue for AccountType { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x14authentication.proto\x12\0\"\x8e\x03\n\x17ClientResponseEncrypted\ - \x120\n\x11login_credentials\x18\n\x20\x02(\x0b2\x11.LoginCredentialsB\ - \x02\x18\0\x12.\n\x10account_creation\x18\x14\x20\x01(\x0e2\x10.AccountC\ - reationB\x02\x18\0\x12;\n\x14fingerprint_response\x18\x1e\x20\x01(\x0b2\ - \x19.FingerprintResponseUnionB\x02\x18\0\x12)\n\x0bpeer_ticket\x18(\x20\ - \x01(\x0b2\x10.PeerTicketUnionB\x02\x18\0\x12$\n\x0bsystem_info\x182\x20\ - \x02(\x0b2\x0b.SystemInfoB\x02\x18\0\x12\x1a\n\x0eplatform_model\x18<\ - \x20\x01(\tB\x02\x18\0\x12\x1a\n\x0eversion_string\x18F\x20\x01(\tB\x02\ - \x18\0\x12%\n\x06appkey\x18P\x20\x01(\x0b2\x11.LibspotifyAppKeyB\x02\x18\ - \0\x12$\n\x0bclient_info\x18Z\x20\x01(\x0b2\x0b.ClientInfoB\x02\x18\0\"e\ - \n\x10LoginCredentials\x12\x14\n\x08username\x18\n\x20\x01(\tB\x02\x18\0\ - \x12$\n\x03typ\x18\x14\x20\x02(\x0e2\x13.AuthenticationTypeB\x02\x18\0\ - \x12\x15\n\tauth_data\x18\x1e\x20\x01(\x0cB\x02\x18\0\"\x81\x01\n\x18Fin\ - gerprintResponseUnion\x12,\n\x05grain\x18\n\x20\x01(\x0b2\x19.Fingerprin\ - tGrainResponseB\x02\x18\0\x127\n\x0bhmac_ripemd\x18\x14\x20\x01(\x0b2\ - \x1e.FingerprintHmacRipemdResponseB\x02\x18\0\"5\n\x18FingerprintGrainRe\ - sponse\x12\x19\n\rencrypted_key\x18\n\x20\x02(\x0cB\x02\x18\0\"1\n\x1dFi\ - ngerprintHmacRipemdResponse\x12\x10\n\x04hmac\x18\n\x20\x02(\x0cB\x02\ - \x18\0\"g\n\x0fPeerTicketUnion\x12,\n\npublic_key\x18\n\x20\x01(\x0b2\ - \x14.PeerTicketPublicKeyB\x02\x18\0\x12&\n\nold_ticket\x18\x14\x20\x01(\ - \x0b2\x0e.PeerTicketOldB\x02\x18\0\"-\n\x13PeerTicketPublicKey\x12\x16\n\ - \npublic_key\x18\n\x20\x02(\x0cB\x02\x18\0\"K\n\rPeerTicketOld\x12\x17\n\ - \x0bpeer_ticket\x18\n\x20\x02(\x0cB\x02\x18\0\x12!\n\x15peer_ticket_sign\ - ature\x18\x14\x20\x02(\x0cB\x02\x18\0\"\x91\x02\n\nSystemInfo\x12\"\n\nc\ - pu_family\x18\n\x20\x02(\x0e2\n.CpuFamilyB\x02\x18\0\x12\x17\n\x0bcpu_su\ - btype\x18\x14\x20\x01(\rB\x02\x18\0\x12\x13\n\x07cpu_ext\x18\x1e\x20\x01\ - (\rB\x02\x18\0\x12\x19\n\x05brand\x18(\x20\x01(\x0e2\x06.BrandB\x02\x18\ - \0\x12\x17\n\x0bbrand_flags\x182\x20\x01(\rB\x02\x18\0\x12\x13\n\x02os\ - \x18<\x20\x02(\x0e2\x03.OsB\x02\x18\0\x12\x16\n\nos_version\x18F\x20\x01\ - (\rB\x02\x18\0\x12\x12\n\x06os_ext\x18P\x20\x01(\rB\x02\x18\0\x12%\n\x19\ - system_information_string\x18Z\x20\x01(\tB\x02\x18\0\x12\x15\n\tdevice_i\ - d\x18d\x20\x01(\tB\x02\x18\0\"\x84\x01\n\x10LibspotifyAppKey\x12\x13\n\ - \x07version\x18\x01\x20\x02(\rB\x02\x18\0\x12\x12\n\x06devkey\x18\x02\ - \x20\x02(\x0cB\x02\x18\0\x12\x15\n\tsignature\x18\x03\x20\x02(\x0cB\x02\ - \x18\0\x12\x15\n\tuseragent\x18\x04\x20\x02(\tB\x02\x18\0\x12\x19\n\rcal\ - lback_hash\x18\x05\x20\x02(\x0cB\x02\x18\0\"\\\n\nClientInfo\x12\x13\n\ - \x07limited\x18\x01\x20\x01(\x08B\x02\x18\0\x12#\n\x02fb\x18\x02\x20\x01\ - (\x0b2\x13.ClientInfoFacebookB\x02\x18\0\x12\x14\n\x08language\x18\x03\ - \x20\x01(\tB\x02\x18\0\",\n\x12ClientInfoFacebook\x12\x16\n\nmachine_id\ - \x18\x01\x20\x01(\tB\x02\x18\0\"\xe1\x02\n\tAPWelcome\x12\x1e\n\x12canon\ - ical_username\x18\n\x20\x02(\tB\x02\x18\0\x120\n\x16account_type_logged_\ - in\x18\x14\x20\x02(\x0e2\x0c.AccountTypeB\x02\x18\0\x124\n\x1acredential\ - s_type_logged_in\x18\x19\x20\x02(\x0e2\x0c.AccountTypeB\x02\x18\0\x12?\n\ - \x1ereusable_auth_credentials_type\x18\x1e\x20\x02(\x0e2\x13.Authenticat\ - ionTypeB\x02\x18\0\x12%\n\x19reusable_auth_credentials\x18(\x20\x02(\x0c\ - B\x02\x18\0\x12\x16\n\nlfs_secret\x182\x20\x01(\x0cB\x02\x18\0\x12&\n\ - \x0caccount_info\x18<\x20\x01(\x0b2\x0c.AccountInfoB\x02\x18\0\x12$\n\ - \x02fb\x18F\x20\x01(\x0b2\x14.AccountInfoFacebookB\x02\x18\0\"c\n\x0bAcc\ - ountInfo\x12(\n\x07spotify\x18\x01\x20\x01(\x0b2\x13.AccountInfoSpotifyB\ - \x02\x18\0\x12*\n\x08facebook\x18\x02\x20\x01(\x0b2\x14.AccountInfoFaceb\ - ookB\x02\x18\0\"\x14\n\x12AccountInfoSpotify\"G\n\x13AccountInfoFacebook\ - \x12\x18\n\x0caccess_token\x18\x01\x20\x01(\tB\x02\x18\0\x12\x16\n\nmach\ - ine_id\x18\x02\x20\x01(\tB\x02\x18\0*\xda\x01\n\x12AuthenticationType\ - \x12\x1c\n\x18AUTHENTICATION_USER_PASS\x10\0\x12-\n)AUTHENTICATION_STORE\ - D_SPOTIFY_CREDENTIALS\x10\x01\x12.\n*AUTHENTICATION_STORED_FACEBOOK_CRED\ - ENTIALS\x10\x02\x12\x20\n\x1cAUTHENTICATION_SPOTIFY_TOKEN\x10\x03\x12!\n\ - \x1dAUTHENTICATION_FACEBOOK_TOKEN\x10\x04\x1a\x02\x10\0*]\n\x0fAccountCr\ - eation\x12\"\n\x1eACCOUNT_CREATION_ALWAYS_PROMPT\x10\x01\x12\"\n\x1eACCO\ - UNT_CREATION_ALWAYS_CREATE\x10\x03\x1a\x02\x10\0*\xa1\x01\n\tCpuFamily\ - \x12\x0f\n\x0bCPU_UNKNOWN\x10\0\x12\x0b\n\x07CPU_X86\x10\x01\x12\x0e\n\n\ - CPU_X86_64\x10\x02\x12\x0b\n\x07CPU_PPC\x10\x03\x12\x0e\n\nCPU_PPC_64\ - \x10\x04\x12\x0b\n\x07CPU_ARM\x10\x05\x12\x0c\n\x08CPU_IA64\x10\x06\x12\ - \n\n\x06CPU_SH\x10\x07\x12\x0c\n\x08CPU_MIPS\x10\x08\x12\x10\n\x0cCPU_BL\ - ACKFIN\x10\t\x1a\x02\x10\0*O\n\x05Brand\x12\x13\n\x0fBRAND_UNBRANDED\x10\ - \0\x12\r\n\tBRAND_INQ\x10\x01\x12\r\n\tBRAND_HTC\x10\x02\x12\x0f\n\x0bBR\ - AND_NOKIA\x10\x03\x1a\x02\x10\0*\xd5\x02\n\x02Os\x12\x0e\n\nOS_UNKNOWN\ - \x10\0\x12\x0e\n\nOS_WINDOWS\x10\x01\x12\n\n\x06OS_OSX\x10\x02\x12\r\n\t\ - OS_IPHONE\x10\x03\x12\n\n\x06OS_S60\x10\x04\x12\x0c\n\x08OS_LINUX\x10\ - \x05\x12\x11\n\rOS_WINDOWS_CE\x10\x06\x12\x0e\n\nOS_ANDROID\x10\x07\x12\ - \x0b\n\x07OS_PALM\x10\x08\x12\x0e\n\nOS_FREEBSD\x10\t\x12\x11\n\rOS_BLAC\ - KBERRY\x10\n\x12\x0c\n\x08OS_SONOS\x10\x0b\x12\x0f\n\x0bOS_LOGITECH\x10\ - \x0c\x12\n\n\x06OS_WP7\x10\r\x12\x0c\n\x08OS_ONKYO\x10\x0e\x12\x0e\n\nOS\ - _PHILIPS\x10\x0f\x12\t\n\x05OS_WD\x10\x10\x12\x0c\n\x08OS_VOLVO\x10\x11\ - \x12\x0b\n\x07OS_TIVO\x10\x12\x12\x0b\n\x07OS_AWOX\x10\x13\x12\x0c\n\x08\ - OS_MEEGO\x10\x14\x12\r\n\tOS_QNXNTO\x10\x15\x12\n\n\x06OS_BCO\x10\x16\ - \x1a\x02\x10\0*,\n\x0bAccountType\x12\x0b\n\x07Spotify\x10\0\x12\x0c\n\ - \x08Facebook\x10\x01\x1a\x02\x10\0B\0b\x06proto2\ + \n\x14authentication.proto\x12\0\"\xfe\x02\n\x17ClientResponseEncrypted\ + \x12.\n\x11login_credentials\x18\n\x20\x02(\x0b2\x11.LoginCredentialsB\0\ + \x12,\n\x10account_creation\x18\x14\x20\x01(\x0e2\x10.AccountCreationB\0\ + \x129\n\x14fingerprint_response\x18\x1e\x20\x01(\x0b2\x19.FingerprintRes\ + ponseUnionB\0\x12'\n\x0bpeer_ticket\x18(\x20\x01(\x0b2\x10.PeerTicketUni\ + onB\0\x12\"\n\x0bsystem_info\x182\x20\x02(\x0b2\x0b.SystemInfoB\0\x12\ + \x18\n\x0eplatform_model\x18<\x20\x01(\tB\0\x12\x18\n\x0eversion_string\ + \x18F\x20\x01(\tB\0\x12#\n\x06appkey\x18P\x20\x01(\x0b2\x11.LibspotifyAp\ + pKeyB\0\x12\"\n\x0bclient_info\x18Z\x20\x01(\x0b2\x0b.ClientInfoB\0:\0\"\ + a\n\x10LoginCredentials\x12\x12\n\x08username\x18\n\x20\x01(\tB\0\x12\"\ + \n\x03typ\x18\x14\x20\x02(\x0e2\x13.AuthenticationTypeB\0\x12\x13\n\taut\ + h_data\x18\x1e\x20\x01(\x0cB\0:\0\"\x7f\n\x18FingerprintResponseUnion\ + \x12*\n\x05grain\x18\n\x20\x01(\x0b2\x19.FingerprintGrainResponseB\0\x12\ + 5\n\x0bhmac_ripemd\x18\x14\x20\x01(\x0b2\x1e.FingerprintHmacRipemdRespon\ + seB\0:\0\"5\n\x18FingerprintGrainResponse\x12\x17\n\rencrypted_key\x18\n\ + \x20\x02(\x0cB\0:\0\"1\n\x1dFingerprintHmacRipemdResponse\x12\x0e\n\x04h\ + mac\x18\n\x20\x02(\x0cB\0:\0\"e\n\x0fPeerTicketUnion\x12*\n\npublic_key\ + \x18\n\x20\x01(\x0b2\x14.PeerTicketPublicKeyB\0\x12$\n\nold_ticket\x18\ + \x14\x20\x01(\x0b2\x0e.PeerTicketOldB\0:\0\"-\n\x13PeerTicketPublicKey\ + \x12\x14\n\npublic_key\x18\n\x20\x02(\x0cB\0:\0\"I\n\rPeerTicketOld\x12\ + \x15\n\x0bpeer_ticket\x18\n\x20\x02(\x0cB\0\x12\x1f\n\x15peer_ticket_sig\ + nature\x18\x14\x20\x02(\x0cB\0:\0\"\xff\x01\n\nSystemInfo\x12\x20\n\ncpu\ + _family\x18\n\x20\x02(\x0e2\n.CpuFamilyB\0\x12\x15\n\x0bcpu_subtype\x18\ + \x14\x20\x01(\rB\0\x12\x11\n\x07cpu_ext\x18\x1e\x20\x01(\rB\0\x12\x17\n\ + \x05brand\x18(\x20\x01(\x0e2\x06.BrandB\0\x12\x15\n\x0bbrand_flags\x182\ + \x20\x01(\rB\0\x12\x11\n\x02os\x18<\x20\x02(\x0e2\x03.OsB\0\x12\x14\n\no\ + s_version\x18F\x20\x01(\rB\0\x12\x10\n\x06os_ext\x18P\x20\x01(\rB\0\x12#\ + \n\x19system_information_string\x18Z\x20\x01(\tB\0\x12\x13\n\tdevice_id\ + \x18d\x20\x01(\tB\0:\0\"|\n\x10LibspotifyAppKey\x12\x11\n\x07version\x18\ + \x01\x20\x02(\rB\0\x12\x10\n\x06devkey\x18\x02\x20\x02(\x0cB\0\x12\x13\n\ + \tsignature\x18\x03\x20\x02(\x0cB\0\x12\x13\n\tuseragent\x18\x04\x20\x02\ + (\tB\0\x12\x17\n\rcallback_hash\x18\x05\x20\x02(\x0cB\0:\0\"X\n\nClientI\ + nfo\x12\x11\n\x07limited\x18\x01\x20\x01(\x08B\0\x12!\n\x02fb\x18\x02\ + \x20\x01(\x0b2\x13.ClientInfoFacebookB\0\x12\x12\n\x08language\x18\x03\ + \x20\x01(\tB\0:\0\",\n\x12ClientInfoFacebook\x12\x14\n\nmachine_id\x18\ + \x01\x20\x01(\tB\0:\0\"\xd3\x02\n\tAPWelcome\x12\x1c\n\x12canonical_user\ + name\x18\n\x20\x02(\tB\0\x12.\n\x16account_type_logged_in\x18\x14\x20\ + \x02(\x0e2\x0c.AccountTypeB\0\x122\n\x1acredentials_type_logged_in\x18\ + \x19\x20\x02(\x0e2\x0c.AccountTypeB\0\x12=\n\x1ereusable_auth_credential\ + s_type\x18\x1e\x20\x02(\x0e2\x13.AuthenticationTypeB\0\x12#\n\x19reusabl\ + e_auth_credentials\x18(\x20\x02(\x0cB\0\x12\x14\n\nlfs_secret\x182\x20\ + \x01(\x0cB\0\x12$\n\x0caccount_info\x18<\x20\x01(\x0b2\x0c.AccountInfoB\ + \0\x12\"\n\x02fb\x18F\x20\x01(\x0b2\x14.AccountInfoFacebookB\0:\0\"a\n\ + \x0bAccountInfo\x12&\n\x07spotify\x18\x01\x20\x01(\x0b2\x13.AccountInfoS\ + potifyB\0\x12(\n\x08facebook\x18\x02\x20\x01(\x0b2\x14.AccountInfoFacebo\ + okB\0:\0\"\x16\n\x12AccountInfoSpotify:\0\"E\n\x13AccountInfoFacebook\ + \x12\x16\n\x0caccess_token\x18\x01\x20\x01(\tB\0\x12\x14\n\nmachine_id\ + \x18\x02\x20\x01(\tB\0:\0*\xd8\x01\n\x12AuthenticationType\x12\x1c\n\x18\ + AUTHENTICATION_USER_PASS\x10\0\x12-\n)AUTHENTICATION_STORED_SPOTIFY_CRED\ + ENTIALS\x10\x01\x12.\n*AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS\x10\ + \x02\x12\x20\n\x1cAUTHENTICATION_SPOTIFY_TOKEN\x10\x03\x12!\n\x1dAUTHENT\ + ICATION_FACEBOOK_TOKEN\x10\x04\x1a\0*[\n\x0fAccountCreation\x12\"\n\x1eA\ + CCOUNT_CREATION_ALWAYS_PROMPT\x10\x01\x12\"\n\x1eACCOUNT_CREATION_ALWAYS\ + _CREATE\x10\x03\x1a\0*\x9f\x01\n\tCpuFamily\x12\x0f\n\x0bCPU_UNKNOWN\x10\ + \0\x12\x0b\n\x07CPU_X86\x10\x01\x12\x0e\n\nCPU_X86_64\x10\x02\x12\x0b\n\ + \x07CPU_PPC\x10\x03\x12\x0e\n\nCPU_PPC_64\x10\x04\x12\x0b\n\x07CPU_ARM\ + \x10\x05\x12\x0c\n\x08CPU_IA64\x10\x06\x12\n\n\x06CPU_SH\x10\x07\x12\x0c\ + \n\x08CPU_MIPS\x10\x08\x12\x10\n\x0cCPU_BLACKFIN\x10\t\x1a\0*M\n\x05Bran\ + d\x12\x13\n\x0fBRAND_UNBRANDED\x10\0\x12\r\n\tBRAND_INQ\x10\x01\x12\r\n\ + \tBRAND_HTC\x10\x02\x12\x0f\n\x0bBRAND_NOKIA\x10\x03\x1a\0*\xd3\x02\n\ + \x02Os\x12\x0e\n\nOS_UNKNOWN\x10\0\x12\x0e\n\nOS_WINDOWS\x10\x01\x12\n\n\ + \x06OS_OSX\x10\x02\x12\r\n\tOS_IPHONE\x10\x03\x12\n\n\x06OS_S60\x10\x04\ + \x12\x0c\n\x08OS_LINUX\x10\x05\x12\x11\n\rOS_WINDOWS_CE\x10\x06\x12\x0e\ + \n\nOS_ANDROID\x10\x07\x12\x0b\n\x07OS_PALM\x10\x08\x12\x0e\n\nOS_FREEBS\ + D\x10\t\x12\x11\n\rOS_BLACKBERRY\x10\n\x12\x0c\n\x08OS_SONOS\x10\x0b\x12\ + \x0f\n\x0bOS_LOGITECH\x10\x0c\x12\n\n\x06OS_WP7\x10\r\x12\x0c\n\x08OS_ON\ + KYO\x10\x0e\x12\x0e\n\nOS_PHILIPS\x10\x0f\x12\t\n\x05OS_WD\x10\x10\x12\ + \x0c\n\x08OS_VOLVO\x10\x11\x12\x0b\n\x07OS_TIVO\x10\x12\x12\x0b\n\x07OS_\ + AWOX\x10\x13\x12\x0c\n\x08OS_MEEGO\x10\x14\x12\r\n\tOS_QNXNTO\x10\x15\ + \x12\n\n\x06OS_BCO\x10\x16\x1a\0**\n\x0bAccountType\x12\x0b\n\x07Spotify\ + \x10\0\x12\x0c\n\x08Facebook\x10\x01\x1a\0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/protocol/src/keyexchange.rs b/protocol/src/keyexchange.rs index 47dff5ee..b026ec87 100644 --- a/protocol/src/keyexchange.rs +++ b/protocol/src/keyexchange.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.8.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,10 +17,15 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `keyexchange.proto` use protobuf::Message as Message_imported_for_functions; use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_0; + #[derive(PartialEq,Clone,Default)] pub struct ClientHello { // message fields @@ -33,8 +38,14 @@ pub struct ClientHello { padding: ::protobuf::SingularField<::std::vec::Vec>, feature_set: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientHello { + fn default() -> &'a ClientHello { + ::default_instance() + } } impl ClientHello { @@ -44,6 +55,10 @@ impl ClientHello { // required .BuildInfo build_info = 10; + + pub fn get_build_info(&self) -> &BuildInfo { + self.build_info.as_ref().unwrap_or_else(|| BuildInfo::default_instance()) + } pub fn clear_build_info(&mut self) { self.build_info.clear(); } @@ -71,12 +86,12 @@ impl ClientHello { self.build_info.take().unwrap_or_else(|| BuildInfo::new()) } - pub fn get_build_info(&self) -> &BuildInfo { - self.build_info.as_ref().unwrap_or_else(|| BuildInfo::default_instance()) - } - // repeated .Fingerprint fingerprints_supported = 20; + + pub fn get_fingerprints_supported(&self) -> &[Fingerprint] { + &self.fingerprints_supported + } pub fn clear_fingerprints_supported(&mut self) { self.fingerprints_supported.clear(); } @@ -96,12 +111,12 @@ impl ClientHello { ::std::mem::replace(&mut self.fingerprints_supported, ::std::vec::Vec::new()) } - pub fn get_fingerprints_supported(&self) -> &[Fingerprint] { - &self.fingerprints_supported - } - // repeated .Cryptosuite cryptosuites_supported = 30; + + pub fn get_cryptosuites_supported(&self) -> &[Cryptosuite] { + &self.cryptosuites_supported + } pub fn clear_cryptosuites_supported(&mut self) { self.cryptosuites_supported.clear(); } @@ -121,12 +136,12 @@ impl ClientHello { ::std::mem::replace(&mut self.cryptosuites_supported, ::std::vec::Vec::new()) } - pub fn get_cryptosuites_supported(&self) -> &[Cryptosuite] { - &self.cryptosuites_supported - } - // repeated .Powscheme powschemes_supported = 40; + + pub fn get_powschemes_supported(&self) -> &[Powscheme] { + &self.powschemes_supported + } pub fn clear_powschemes_supported(&mut self) { self.powschemes_supported.clear(); } @@ -146,12 +161,12 @@ impl ClientHello { ::std::mem::replace(&mut self.powschemes_supported, ::std::vec::Vec::new()) } - pub fn get_powschemes_supported(&self) -> &[Powscheme] { - &self.powschemes_supported - } - // required .LoginCryptoHelloUnion login_crypto_hello = 50; + + pub fn get_login_crypto_hello(&self) -> &LoginCryptoHelloUnion { + self.login_crypto_hello.as_ref().unwrap_or_else(|| LoginCryptoHelloUnion::default_instance()) + } pub fn clear_login_crypto_hello(&mut self) { self.login_crypto_hello.clear(); } @@ -179,12 +194,15 @@ impl ClientHello { self.login_crypto_hello.take().unwrap_or_else(|| LoginCryptoHelloUnion::new()) } - pub fn get_login_crypto_hello(&self) -> &LoginCryptoHelloUnion { - self.login_crypto_hello.as_ref().unwrap_or_else(|| LoginCryptoHelloUnion::default_instance()) - } - // required bytes client_nonce = 60; + + pub fn get_client_nonce(&self) -> &[u8] { + match self.client_nonce.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_client_nonce(&mut self) { self.client_nonce.clear(); } @@ -212,15 +230,15 @@ impl ClientHello { self.client_nonce.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_client_nonce(&self) -> &[u8] { - match self.client_nonce.as_ref() { + // optional bytes padding = 70; + + + pub fn get_padding(&self) -> &[u8] { + match self.padding.as_ref() { Some(v) => &v, None => &[], } } - - // optional bytes padding = 70; - pub fn clear_padding(&mut self) { self.padding.clear(); } @@ -248,15 +266,12 @@ impl ClientHello { self.padding.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_padding(&self) -> &[u8] { - match self.padding.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional .FeatureSet feature_set = 80; + + pub fn get_feature_set(&self) -> &FeatureSet { + self.feature_set.as_ref().unwrap_or_else(|| FeatureSet::default_instance()) + } pub fn clear_feature_set(&mut self) { self.feature_set.clear(); } @@ -283,10 +298,6 @@ impl ClientHello { pub fn take_feature_set(&mut self) -> FeatureSet { self.feature_set.take().unwrap_or_else(|| FeatureSet::new()) } - - pub fn get_feature_set(&self) -> &FeatureSet { - self.feature_set.as_ref().unwrap_or_else(|| FeatureSet::default_instance()) - } } impl ::protobuf::Message for ClientHello { @@ -437,13 +448,13 @@ impl ::protobuf::Message for ClientHello { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -525,14 +536,14 @@ impl ::protobuf::Message for ClientHello { impl ::protobuf::Clear for ClientHello { fn clear(&mut self) { - self.clear_build_info(); - self.clear_fingerprints_supported(); - self.clear_cryptosuites_supported(); - self.clear_powschemes_supported(); - self.clear_login_crypto_hello(); - self.clear_client_nonce(); - self.clear_padding(); - self.clear_feature_set(); + self.build_info.clear(); + self.fingerprints_supported.clear(); + self.cryptosuites_supported.clear(); + self.powschemes_supported.clear(); + self.login_crypto_hello.clear(); + self.client_nonce.clear(); + self.padding.clear(); + self.feature_set.clear(); self.unknown_fields.clear(); } } @@ -557,8 +568,14 @@ pub struct BuildInfo { platform: ::std::option::Option, version: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a BuildInfo { + fn default() -> &'a BuildInfo { + ::default_instance() + } } impl BuildInfo { @@ -568,6 +585,10 @@ impl BuildInfo { // required .Product product = 10; + + pub fn get_product(&self) -> Product { + self.product.unwrap_or(Product::PRODUCT_CLIENT) + } pub fn clear_product(&mut self) { self.product = ::std::option::Option::None; } @@ -581,12 +602,12 @@ impl BuildInfo { self.product = ::std::option::Option::Some(v); } - pub fn get_product(&self) -> Product { - self.product.unwrap_or(Product::PRODUCT_CLIENT) - } - // repeated .ProductFlags product_flags = 20; + + pub fn get_product_flags(&self) -> &[ProductFlags] { + &self.product_flags + } pub fn clear_product_flags(&mut self) { self.product_flags.clear(); } @@ -606,12 +627,12 @@ impl BuildInfo { ::std::mem::replace(&mut self.product_flags, ::std::vec::Vec::new()) } - pub fn get_product_flags(&self) -> &[ProductFlags] { - &self.product_flags - } - // required .Platform platform = 30; + + pub fn get_platform(&self) -> Platform { + self.platform.unwrap_or(Platform::PLATFORM_WIN32_X86) + } pub fn clear_platform(&mut self) { self.platform = ::std::option::Option::None; } @@ -625,12 +646,12 @@ impl BuildInfo { self.platform = ::std::option::Option::Some(v); } - pub fn get_platform(&self) -> Platform { - self.platform.unwrap_or(Platform::PLATFORM_WIN32_X86) - } - // required uint64 version = 40; + + pub fn get_version(&self) -> u64 { + self.version.unwrap_or(0) + } pub fn clear_version(&mut self) { self.version = ::std::option::Option::None; } @@ -643,10 +664,6 @@ impl BuildInfo { pub fn set_version(&mut self, v: u64) { self.version = ::std::option::Option::Some(v); } - - pub fn get_version(&self) -> u64 { - self.version.unwrap_or(0) - } } impl ::protobuf::Message for BuildInfo { @@ -741,13 +758,13 @@ impl ::protobuf::Message for BuildInfo { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -809,10 +826,10 @@ impl ::protobuf::Message for BuildInfo { impl ::protobuf::Clear for BuildInfo { fn clear(&mut self) { - self.clear_product(); - self.clear_product_flags(); - self.clear_platform(); - self.clear_version(); + self.product = ::std::option::Option::None; + self.product_flags.clear(); + self.platform = ::std::option::Option::None; + self.version = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -834,8 +851,14 @@ pub struct LoginCryptoHelloUnion { // message fields diffie_hellman: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoHelloUnion { + fn default() -> &'a LoginCryptoHelloUnion { + ::default_instance() + } } impl LoginCryptoHelloUnion { @@ -845,6 +868,10 @@ impl LoginCryptoHelloUnion { // optional .LoginCryptoDiffieHellmanHello diffie_hellman = 10; + + pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanHello { + self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanHello::default_instance()) + } pub fn clear_diffie_hellman(&mut self) { self.diffie_hellman.clear(); } @@ -871,10 +898,6 @@ impl LoginCryptoHelloUnion { pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanHello { self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanHello::new()) } - - pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanHello { - self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanHello::default_instance()) - } } impl ::protobuf::Message for LoginCryptoHelloUnion { @@ -937,13 +960,13 @@ impl ::protobuf::Message for LoginCryptoHelloUnion { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -990,7 +1013,7 @@ impl ::protobuf::Message for LoginCryptoHelloUnion { impl ::protobuf::Clear for LoginCryptoHelloUnion { fn clear(&mut self) { - self.clear_diffie_hellman(); + self.diffie_hellman.clear(); self.unknown_fields.clear(); } } @@ -1013,8 +1036,14 @@ pub struct LoginCryptoDiffieHellmanHello { gc: ::protobuf::SingularField<::std::vec::Vec>, server_keys_known: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanHello { + fn default() -> &'a LoginCryptoDiffieHellmanHello { + ::default_instance() + } } impl LoginCryptoDiffieHellmanHello { @@ -1024,6 +1053,13 @@ impl LoginCryptoDiffieHellmanHello { // required bytes gc = 10; + + pub fn get_gc(&self) -> &[u8] { + match self.gc.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gc(&mut self) { self.gc.clear(); } @@ -1051,15 +1087,12 @@ impl LoginCryptoDiffieHellmanHello { self.gc.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gc(&self) -> &[u8] { - match self.gc.as_ref() { - Some(v) => &v, - None => &[], - } - } - // required uint32 server_keys_known = 20; + + pub fn get_server_keys_known(&self) -> u32 { + self.server_keys_known.unwrap_or(0) + } pub fn clear_server_keys_known(&mut self) { self.server_keys_known = ::std::option::Option::None; } @@ -1072,10 +1105,6 @@ impl LoginCryptoDiffieHellmanHello { pub fn set_server_keys_known(&mut self, v: u32) { self.server_keys_known = ::std::option::Option::Some(v); } - - pub fn get_server_keys_known(&self) -> u32 { - self.server_keys_known.unwrap_or(0) - } } impl ::protobuf::Message for LoginCryptoDiffieHellmanHello { @@ -1149,13 +1178,13 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanHello { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1207,8 +1236,8 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanHello { impl ::protobuf::Clear for LoginCryptoDiffieHellmanHello { fn clear(&mut self) { - self.clear_gc(); - self.clear_server_keys_known(); + self.gc.clear(); + self.server_keys_known = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -1231,8 +1260,14 @@ pub struct FeatureSet { autoupdate2: ::std::option::Option, current_location: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FeatureSet { + fn default() -> &'a FeatureSet { + ::default_instance() + } } impl FeatureSet { @@ -1242,6 +1277,10 @@ impl FeatureSet { // optional bool autoupdate2 = 1; + + pub fn get_autoupdate2(&self) -> bool { + self.autoupdate2.unwrap_or(false) + } pub fn clear_autoupdate2(&mut self) { self.autoupdate2 = ::std::option::Option::None; } @@ -1255,12 +1294,12 @@ impl FeatureSet { self.autoupdate2 = ::std::option::Option::Some(v); } - pub fn get_autoupdate2(&self) -> bool { - self.autoupdate2.unwrap_or(false) - } - // optional bool current_location = 2; + + pub fn get_current_location(&self) -> bool { + self.current_location.unwrap_or(false) + } pub fn clear_current_location(&mut self) { self.current_location = ::std::option::Option::None; } @@ -1273,10 +1312,6 @@ impl FeatureSet { pub fn set_current_location(&mut self, v: bool) { self.current_location = ::std::option::Option::Some(v); } - - pub fn get_current_location(&self) -> bool { - self.current_location.unwrap_or(false) - } } impl ::protobuf::Message for FeatureSet { @@ -1348,13 +1383,13 @@ impl ::protobuf::Message for FeatureSet { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1406,8 +1441,8 @@ impl ::protobuf::Message for FeatureSet { impl ::protobuf::Clear for FeatureSet { fn clear(&mut self) { - self.clear_autoupdate2(); - self.clear_current_location(); + self.autoupdate2 = ::std::option::Option::None; + self.current_location = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -1431,8 +1466,14 @@ pub struct APResponseMessage { upgrade: ::protobuf::SingularPtrField, login_failed: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a APResponseMessage { + fn default() -> &'a APResponseMessage { + ::default_instance() + } } impl APResponseMessage { @@ -1442,6 +1483,10 @@ impl APResponseMessage { // optional .APChallenge challenge = 10; + + pub fn get_challenge(&self) -> &APChallenge { + self.challenge.as_ref().unwrap_or_else(|| APChallenge::default_instance()) + } pub fn clear_challenge(&mut self) { self.challenge.clear(); } @@ -1469,12 +1514,12 @@ impl APResponseMessage { self.challenge.take().unwrap_or_else(|| APChallenge::new()) } - pub fn get_challenge(&self) -> &APChallenge { - self.challenge.as_ref().unwrap_or_else(|| APChallenge::default_instance()) - } - // optional .UpgradeRequiredMessage upgrade = 20; + + pub fn get_upgrade(&self) -> &UpgradeRequiredMessage { + self.upgrade.as_ref().unwrap_or_else(|| UpgradeRequiredMessage::default_instance()) + } pub fn clear_upgrade(&mut self) { self.upgrade.clear(); } @@ -1502,12 +1547,12 @@ impl APResponseMessage { self.upgrade.take().unwrap_or_else(|| UpgradeRequiredMessage::new()) } - pub fn get_upgrade(&self) -> &UpgradeRequiredMessage { - self.upgrade.as_ref().unwrap_or_else(|| UpgradeRequiredMessage::default_instance()) - } - // optional .APLoginFailed login_failed = 30; + + pub fn get_login_failed(&self) -> &APLoginFailed { + self.login_failed.as_ref().unwrap_or_else(|| APLoginFailed::default_instance()) + } pub fn clear_login_failed(&mut self) { self.login_failed.clear(); } @@ -1534,10 +1579,6 @@ impl APResponseMessage { pub fn take_login_failed(&mut self) -> APLoginFailed { self.login_failed.take().unwrap_or_else(|| APLoginFailed::new()) } - - pub fn get_login_failed(&self) -> &APLoginFailed { - self.login_failed.as_ref().unwrap_or_else(|| APLoginFailed::default_instance()) - } } impl ::protobuf::Message for APResponseMessage { @@ -1634,13 +1675,13 @@ impl ::protobuf::Message for APResponseMessage { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1697,9 +1738,9 @@ impl ::protobuf::Message for APResponseMessage { impl ::protobuf::Clear for APResponseMessage { fn clear(&mut self) { - self.clear_challenge(); - self.clear_upgrade(); - self.clear_login_failed(); + self.challenge.clear(); + self.upgrade.clear(); + self.login_failed.clear(); self.unknown_fields.clear(); } } @@ -1726,8 +1767,14 @@ pub struct APChallenge { server_nonce: ::protobuf::SingularField<::std::vec::Vec>, padding: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a APChallenge { + fn default() -> &'a APChallenge { + ::default_instance() + } } impl APChallenge { @@ -1737,6 +1784,10 @@ impl APChallenge { // required .LoginCryptoChallengeUnion login_crypto_challenge = 10; + + pub fn get_login_crypto_challenge(&self) -> &LoginCryptoChallengeUnion { + self.login_crypto_challenge.as_ref().unwrap_or_else(|| LoginCryptoChallengeUnion::default_instance()) + } pub fn clear_login_crypto_challenge(&mut self) { self.login_crypto_challenge.clear(); } @@ -1764,12 +1815,12 @@ impl APChallenge { self.login_crypto_challenge.take().unwrap_or_else(|| LoginCryptoChallengeUnion::new()) } - pub fn get_login_crypto_challenge(&self) -> &LoginCryptoChallengeUnion { - self.login_crypto_challenge.as_ref().unwrap_or_else(|| LoginCryptoChallengeUnion::default_instance()) - } - // required .FingerprintChallengeUnion fingerprint_challenge = 20; + + pub fn get_fingerprint_challenge(&self) -> &FingerprintChallengeUnion { + self.fingerprint_challenge.as_ref().unwrap_or_else(|| FingerprintChallengeUnion::default_instance()) + } pub fn clear_fingerprint_challenge(&mut self) { self.fingerprint_challenge.clear(); } @@ -1797,12 +1848,12 @@ impl APChallenge { self.fingerprint_challenge.take().unwrap_or_else(|| FingerprintChallengeUnion::new()) } - pub fn get_fingerprint_challenge(&self) -> &FingerprintChallengeUnion { - self.fingerprint_challenge.as_ref().unwrap_or_else(|| FingerprintChallengeUnion::default_instance()) - } - // required .PoWChallengeUnion pow_challenge = 30; + + pub fn get_pow_challenge(&self) -> &PoWChallengeUnion { + self.pow_challenge.as_ref().unwrap_or_else(|| PoWChallengeUnion::default_instance()) + } pub fn clear_pow_challenge(&mut self) { self.pow_challenge.clear(); } @@ -1830,12 +1881,12 @@ impl APChallenge { self.pow_challenge.take().unwrap_or_else(|| PoWChallengeUnion::new()) } - pub fn get_pow_challenge(&self) -> &PoWChallengeUnion { - self.pow_challenge.as_ref().unwrap_or_else(|| PoWChallengeUnion::default_instance()) - } - // required .CryptoChallengeUnion crypto_challenge = 40; + + pub fn get_crypto_challenge(&self) -> &CryptoChallengeUnion { + self.crypto_challenge.as_ref().unwrap_or_else(|| CryptoChallengeUnion::default_instance()) + } pub fn clear_crypto_challenge(&mut self) { self.crypto_challenge.clear(); } @@ -1863,12 +1914,15 @@ impl APChallenge { self.crypto_challenge.take().unwrap_or_else(|| CryptoChallengeUnion::new()) } - pub fn get_crypto_challenge(&self) -> &CryptoChallengeUnion { - self.crypto_challenge.as_ref().unwrap_or_else(|| CryptoChallengeUnion::default_instance()) - } - // required bytes server_nonce = 50; + + pub fn get_server_nonce(&self) -> &[u8] { + match self.server_nonce.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_server_nonce(&mut self) { self.server_nonce.clear(); } @@ -1896,15 +1950,15 @@ impl APChallenge { self.server_nonce.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_server_nonce(&self) -> &[u8] { - match self.server_nonce.as_ref() { + // optional bytes padding = 60; + + + pub fn get_padding(&self) -> &[u8] { + match self.padding.as_ref() { Some(v) => &v, None => &[], } } - - // optional bytes padding = 60; - pub fn clear_padding(&mut self) { self.padding.clear(); } @@ -1931,13 +1985,6 @@ impl APChallenge { pub fn take_padding(&mut self) -> ::std::vec::Vec { self.padding.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_padding(&self) -> &[u8] { - match self.padding.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for APChallenge { @@ -2084,13 +2131,13 @@ impl ::protobuf::Message for APChallenge { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2162,12 +2209,12 @@ impl ::protobuf::Message for APChallenge { impl ::protobuf::Clear for APChallenge { fn clear(&mut self) { - self.clear_login_crypto_challenge(); - self.clear_fingerprint_challenge(); - self.clear_pow_challenge(); - self.clear_crypto_challenge(); - self.clear_server_nonce(); - self.clear_padding(); + self.login_crypto_challenge.clear(); + self.fingerprint_challenge.clear(); + self.pow_challenge.clear(); + self.crypto_challenge.clear(); + self.server_nonce.clear(); + self.padding.clear(); self.unknown_fields.clear(); } } @@ -2189,8 +2236,14 @@ pub struct LoginCryptoChallengeUnion { // message fields diffie_hellman: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoChallengeUnion { + fn default() -> &'a LoginCryptoChallengeUnion { + ::default_instance() + } } impl LoginCryptoChallengeUnion { @@ -2200,6 +2253,10 @@ impl LoginCryptoChallengeUnion { // optional .LoginCryptoDiffieHellmanChallenge diffie_hellman = 10; + + pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanChallenge { + self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::default_instance()) + } pub fn clear_diffie_hellman(&mut self) { self.diffie_hellman.clear(); } @@ -2226,10 +2283,6 @@ impl LoginCryptoChallengeUnion { pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanChallenge { self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::new()) } - - pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanChallenge { - self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::default_instance()) - } } impl ::protobuf::Message for LoginCryptoChallengeUnion { @@ -2292,13 +2345,13 @@ impl ::protobuf::Message for LoginCryptoChallengeUnion { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2345,7 +2398,7 @@ impl ::protobuf::Message for LoginCryptoChallengeUnion { impl ::protobuf::Clear for LoginCryptoChallengeUnion { fn clear(&mut self) { - self.clear_diffie_hellman(); + self.diffie_hellman.clear(); self.unknown_fields.clear(); } } @@ -2369,8 +2422,14 @@ pub struct LoginCryptoDiffieHellmanChallenge { server_signature_key: ::std::option::Option, gs_signature: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanChallenge { + fn default() -> &'a LoginCryptoDiffieHellmanChallenge { + ::default_instance() + } } impl LoginCryptoDiffieHellmanChallenge { @@ -2380,6 +2439,13 @@ impl LoginCryptoDiffieHellmanChallenge { // required bytes gs = 10; + + pub fn get_gs(&self) -> &[u8] { + match self.gs.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gs(&mut self) { self.gs.clear(); } @@ -2407,15 +2473,12 @@ impl LoginCryptoDiffieHellmanChallenge { self.gs.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gs(&self) -> &[u8] { - match self.gs.as_ref() { - Some(v) => &v, - None => &[], - } - } - // required int32 server_signature_key = 20; + + pub fn get_server_signature_key(&self) -> i32 { + self.server_signature_key.unwrap_or(0) + } pub fn clear_server_signature_key(&mut self) { self.server_signature_key = ::std::option::Option::None; } @@ -2429,12 +2492,15 @@ impl LoginCryptoDiffieHellmanChallenge { self.server_signature_key = ::std::option::Option::Some(v); } - pub fn get_server_signature_key(&self) -> i32 { - self.server_signature_key.unwrap_or(0) - } - // required bytes gs_signature = 30; + + pub fn get_gs_signature(&self) -> &[u8] { + match self.gs_signature.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gs_signature(&mut self) { self.gs_signature.clear(); } @@ -2461,13 +2527,6 @@ impl LoginCryptoDiffieHellmanChallenge { pub fn take_gs_signature(&mut self) -> ::std::vec::Vec { self.gs_signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_gs_signature(&self) -> &[u8] { - match self.gs_signature.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for LoginCryptoDiffieHellmanChallenge { @@ -2553,13 +2612,13 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanChallenge { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2616,9 +2675,9 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanChallenge { impl ::protobuf::Clear for LoginCryptoDiffieHellmanChallenge { fn clear(&mut self) { - self.clear_gs(); - self.clear_server_signature_key(); - self.clear_gs_signature(); + self.gs.clear(); + self.server_signature_key = ::std::option::Option::None; + self.gs_signature.clear(); self.unknown_fields.clear(); } } @@ -2641,8 +2700,14 @@ pub struct FingerprintChallengeUnion { grain: ::protobuf::SingularPtrField, hmac_ripemd: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintChallengeUnion { + fn default() -> &'a FingerprintChallengeUnion { + ::default_instance() + } } impl FingerprintChallengeUnion { @@ -2652,6 +2717,10 @@ impl FingerprintChallengeUnion { // optional .FingerprintGrainChallenge grain = 10; + + pub fn get_grain(&self) -> &FingerprintGrainChallenge { + self.grain.as_ref().unwrap_or_else(|| FingerprintGrainChallenge::default_instance()) + } pub fn clear_grain(&mut self) { self.grain.clear(); } @@ -2679,12 +2748,12 @@ impl FingerprintChallengeUnion { self.grain.take().unwrap_or_else(|| FingerprintGrainChallenge::new()) } - pub fn get_grain(&self) -> &FingerprintGrainChallenge { - self.grain.as_ref().unwrap_or_else(|| FingerprintGrainChallenge::default_instance()) - } - // optional .FingerprintHmacRipemdChallenge hmac_ripemd = 20; + + pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdChallenge { + self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdChallenge::default_instance()) + } pub fn clear_hmac_ripemd(&mut self) { self.hmac_ripemd.clear(); } @@ -2711,10 +2780,6 @@ impl FingerprintChallengeUnion { pub fn take_hmac_ripemd(&mut self) -> FingerprintHmacRipemdChallenge { self.hmac_ripemd.take().unwrap_or_else(|| FingerprintHmacRipemdChallenge::new()) } - - pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdChallenge { - self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdChallenge::default_instance()) - } } impl ::protobuf::Message for FingerprintChallengeUnion { @@ -2794,13 +2859,13 @@ impl ::protobuf::Message for FingerprintChallengeUnion { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2852,8 +2917,8 @@ impl ::protobuf::Message for FingerprintChallengeUnion { impl ::protobuf::Clear for FingerprintChallengeUnion { fn clear(&mut self) { - self.clear_grain(); - self.clear_hmac_ripemd(); + self.grain.clear(); + self.hmac_ripemd.clear(); self.unknown_fields.clear(); } } @@ -2875,8 +2940,14 @@ pub struct FingerprintGrainChallenge { // message fields kek: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintGrainChallenge { + fn default() -> &'a FingerprintGrainChallenge { + ::default_instance() + } } impl FingerprintGrainChallenge { @@ -2886,6 +2957,13 @@ impl FingerprintGrainChallenge { // required bytes kek = 10; + + pub fn get_kek(&self) -> &[u8] { + match self.kek.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_kek(&mut self) { self.kek.clear(); } @@ -2912,13 +2990,6 @@ impl FingerprintGrainChallenge { pub fn take_kek(&mut self) -> ::std::vec::Vec { self.kek.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_kek(&self) -> &[u8] { - match self.kek.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for FingerprintGrainChallenge { @@ -2976,13 +3047,13 @@ impl ::protobuf::Message for FingerprintGrainChallenge { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3029,7 +3100,7 @@ impl ::protobuf::Message for FingerprintGrainChallenge { impl ::protobuf::Clear for FingerprintGrainChallenge { fn clear(&mut self) { - self.clear_kek(); + self.kek.clear(); self.unknown_fields.clear(); } } @@ -3051,8 +3122,14 @@ pub struct FingerprintHmacRipemdChallenge { // message fields challenge: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintHmacRipemdChallenge { + fn default() -> &'a FingerprintHmacRipemdChallenge { + ::default_instance() + } } impl FingerprintHmacRipemdChallenge { @@ -3062,6 +3139,13 @@ impl FingerprintHmacRipemdChallenge { // required bytes challenge = 10; + + pub fn get_challenge(&self) -> &[u8] { + match self.challenge.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_challenge(&mut self) { self.challenge.clear(); } @@ -3088,13 +3172,6 @@ impl FingerprintHmacRipemdChallenge { pub fn take_challenge(&mut self) -> ::std::vec::Vec { self.challenge.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_challenge(&self) -> &[u8] { - match self.challenge.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for FingerprintHmacRipemdChallenge { @@ -3152,13 +3229,13 @@ impl ::protobuf::Message for FingerprintHmacRipemdChallenge { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3205,7 +3282,7 @@ impl ::protobuf::Message for FingerprintHmacRipemdChallenge { impl ::protobuf::Clear for FingerprintHmacRipemdChallenge { fn clear(&mut self) { - self.clear_challenge(); + self.challenge.clear(); self.unknown_fields.clear(); } } @@ -3227,8 +3304,14 @@ pub struct PoWChallengeUnion { // message fields hash_cash: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PoWChallengeUnion { + fn default() -> &'a PoWChallengeUnion { + ::default_instance() + } } impl PoWChallengeUnion { @@ -3238,6 +3321,10 @@ impl PoWChallengeUnion { // optional .PoWHashCashChallenge hash_cash = 10; + + pub fn get_hash_cash(&self) -> &PoWHashCashChallenge { + self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashChallenge::default_instance()) + } pub fn clear_hash_cash(&mut self) { self.hash_cash.clear(); } @@ -3264,10 +3351,6 @@ impl PoWChallengeUnion { pub fn take_hash_cash(&mut self) -> PoWHashCashChallenge { self.hash_cash.take().unwrap_or_else(|| PoWHashCashChallenge::new()) } - - pub fn get_hash_cash(&self) -> &PoWHashCashChallenge { - self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashChallenge::default_instance()) - } } impl ::protobuf::Message for PoWChallengeUnion { @@ -3330,13 +3413,13 @@ impl ::protobuf::Message for PoWChallengeUnion { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3383,7 +3466,7 @@ impl ::protobuf::Message for PoWChallengeUnion { impl ::protobuf::Clear for PoWChallengeUnion { fn clear(&mut self) { - self.clear_hash_cash(); + self.hash_cash.clear(); self.unknown_fields.clear(); } } @@ -3407,8 +3490,14 @@ pub struct PoWHashCashChallenge { length: ::std::option::Option, target: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PoWHashCashChallenge { + fn default() -> &'a PoWHashCashChallenge { + ::default_instance() + } } impl PoWHashCashChallenge { @@ -3418,6 +3507,13 @@ impl PoWHashCashChallenge { // optional bytes prefix = 10; + + pub fn get_prefix(&self) -> &[u8] { + match self.prefix.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_prefix(&mut self) { self.prefix.clear(); } @@ -3445,15 +3541,12 @@ impl PoWHashCashChallenge { self.prefix.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_prefix(&self) -> &[u8] { - match self.prefix.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional int32 length = 20; + + pub fn get_length(&self) -> i32 { + self.length.unwrap_or(0) + } pub fn clear_length(&mut self) { self.length = ::std::option::Option::None; } @@ -3467,12 +3560,12 @@ impl PoWHashCashChallenge { self.length = ::std::option::Option::Some(v); } - pub fn get_length(&self) -> i32 { - self.length.unwrap_or(0) - } - // optional int32 target = 30; + + pub fn get_target(&self) -> i32 { + self.target.unwrap_or(0) + } pub fn clear_target(&mut self) { self.target = ::std::option::Option::None; } @@ -3485,10 +3578,6 @@ impl PoWHashCashChallenge { pub fn set_target(&mut self, v: i32) { self.target = ::std::option::Option::Some(v); } - - pub fn get_target(&self) -> i32 { - self.target.unwrap_or(0) - } } impl ::protobuf::Message for PoWHashCashChallenge { @@ -3569,13 +3658,13 @@ impl ::protobuf::Message for PoWHashCashChallenge { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3632,9 +3721,9 @@ impl ::protobuf::Message for PoWHashCashChallenge { impl ::protobuf::Clear for PoWHashCashChallenge { fn clear(&mut self) { - self.clear_prefix(); - self.clear_length(); - self.clear_target(); + self.prefix.clear(); + self.length = ::std::option::Option::None; + self.target = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -3657,8 +3746,14 @@ pub struct CryptoChallengeUnion { shannon: ::protobuf::SingularPtrField, rc4_sha1_hmac: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoChallengeUnion { + fn default() -> &'a CryptoChallengeUnion { + ::default_instance() + } } impl CryptoChallengeUnion { @@ -3668,6 +3763,10 @@ impl CryptoChallengeUnion { // optional .CryptoShannonChallenge shannon = 10; + + pub fn get_shannon(&self) -> &CryptoShannonChallenge { + self.shannon.as_ref().unwrap_or_else(|| CryptoShannonChallenge::default_instance()) + } pub fn clear_shannon(&mut self) { self.shannon.clear(); } @@ -3695,12 +3794,12 @@ impl CryptoChallengeUnion { self.shannon.take().unwrap_or_else(|| CryptoShannonChallenge::new()) } - pub fn get_shannon(&self) -> &CryptoShannonChallenge { - self.shannon.as_ref().unwrap_or_else(|| CryptoShannonChallenge::default_instance()) - } - // optional .CryptoRc4Sha1HmacChallenge rc4_sha1_hmac = 20; + + pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacChallenge { + self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::default_instance()) + } pub fn clear_rc4_sha1_hmac(&mut self) { self.rc4_sha1_hmac.clear(); } @@ -3727,10 +3826,6 @@ impl CryptoChallengeUnion { pub fn take_rc4_sha1_hmac(&mut self) -> CryptoRc4Sha1HmacChallenge { self.rc4_sha1_hmac.take().unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::new()) } - - pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacChallenge { - self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::default_instance()) - } } impl ::protobuf::Message for CryptoChallengeUnion { @@ -3810,13 +3905,13 @@ impl ::protobuf::Message for CryptoChallengeUnion { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3868,8 +3963,8 @@ impl ::protobuf::Message for CryptoChallengeUnion { impl ::protobuf::Clear for CryptoChallengeUnion { fn clear(&mut self) { - self.clear_shannon(); - self.clear_rc4_sha1_hmac(); + self.shannon.clear(); + self.rc4_sha1_hmac.clear(); self.unknown_fields.clear(); } } @@ -3889,8 +3984,14 @@ impl ::protobuf::reflect::ProtobufValue for CryptoChallengeUnion { #[derive(PartialEq,Clone,Default)] pub struct CryptoShannonChallenge { // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoShannonChallenge { + fn default() -> &'a CryptoShannonChallenge { + ::default_instance() + } } impl CryptoShannonChallenge { @@ -3942,13 +4043,13 @@ impl ::protobuf::Message for CryptoShannonChallenge { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4009,8 +4110,14 @@ impl ::protobuf::reflect::ProtobufValue for CryptoShannonChallenge { #[derive(PartialEq,Clone,Default)] pub struct CryptoRc4Sha1HmacChallenge { // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoRc4Sha1HmacChallenge { + fn default() -> &'a CryptoRc4Sha1HmacChallenge { + ::default_instance() + } } impl CryptoRc4Sha1HmacChallenge { @@ -4062,13 +4169,13 @@ impl ::protobuf::Message for CryptoRc4Sha1HmacChallenge { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4133,8 +4240,14 @@ pub struct UpgradeRequiredMessage { signature: ::protobuf::SingularField<::std::vec::Vec>, http_suffix: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpgradeRequiredMessage { + fn default() -> &'a UpgradeRequiredMessage { + ::default_instance() + } } impl UpgradeRequiredMessage { @@ -4144,6 +4257,13 @@ impl UpgradeRequiredMessage { // required bytes upgrade_signed_part = 10; + + pub fn get_upgrade_signed_part(&self) -> &[u8] { + match self.upgrade_signed_part.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_upgrade_signed_part(&mut self) { self.upgrade_signed_part.clear(); } @@ -4171,15 +4291,15 @@ impl UpgradeRequiredMessage { self.upgrade_signed_part.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_upgrade_signed_part(&self) -> &[u8] { - match self.upgrade_signed_part.as_ref() { + // required bytes signature = 20; + + + pub fn get_signature(&self) -> &[u8] { + match self.signature.as_ref() { Some(v) => &v, None => &[], } } - - // required bytes signature = 20; - pub fn clear_signature(&mut self) { self.signature.clear(); } @@ -4207,15 +4327,15 @@ impl UpgradeRequiredMessage { self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_signature(&self) -> &[u8] { - match self.signature.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string http_suffix = 30; + + pub fn get_http_suffix(&self) -> &str { + match self.http_suffix.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_http_suffix(&mut self) { self.http_suffix.clear(); } @@ -4242,13 +4362,6 @@ impl UpgradeRequiredMessage { pub fn take_http_suffix(&mut self) -> ::std::string::String { self.http_suffix.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_http_suffix(&self) -> &str { - match self.http_suffix.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for UpgradeRequiredMessage { @@ -4327,13 +4440,13 @@ impl ::protobuf::Message for UpgradeRequiredMessage { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4390,9 +4503,9 @@ impl ::protobuf::Message for UpgradeRequiredMessage { impl ::protobuf::Clear for UpgradeRequiredMessage { fn clear(&mut self) { - self.clear_upgrade_signed_part(); - self.clear_signature(); - self.clear_http_suffix(); + self.upgrade_signed_part.clear(); + self.signature.clear(); + self.http_suffix.clear(); self.unknown_fields.clear(); } } @@ -4417,8 +4530,14 @@ pub struct APLoginFailed { expiry: ::std::option::Option, error_description: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a APLoginFailed { + fn default() -> &'a APLoginFailed { + ::default_instance() + } } impl APLoginFailed { @@ -4428,6 +4547,10 @@ impl APLoginFailed { // required .ErrorCode error_code = 10; + + pub fn get_error_code(&self) -> ErrorCode { + self.error_code.unwrap_or(ErrorCode::ProtocolError) + } pub fn clear_error_code(&mut self) { self.error_code = ::std::option::Option::None; } @@ -4441,12 +4564,12 @@ impl APLoginFailed { self.error_code = ::std::option::Option::Some(v); } - pub fn get_error_code(&self) -> ErrorCode { - self.error_code.unwrap_or(ErrorCode::ProtocolError) - } - // optional int32 retry_delay = 20; + + pub fn get_retry_delay(&self) -> i32 { + self.retry_delay.unwrap_or(0) + } pub fn clear_retry_delay(&mut self) { self.retry_delay = ::std::option::Option::None; } @@ -4460,12 +4583,12 @@ impl APLoginFailed { self.retry_delay = ::std::option::Option::Some(v); } - pub fn get_retry_delay(&self) -> i32 { - self.retry_delay.unwrap_or(0) - } - // optional int32 expiry = 30; + + pub fn get_expiry(&self) -> i32 { + self.expiry.unwrap_or(0) + } pub fn clear_expiry(&mut self) { self.expiry = ::std::option::Option::None; } @@ -4479,12 +4602,15 @@ impl APLoginFailed { self.expiry = ::std::option::Option::Some(v); } - pub fn get_expiry(&self) -> i32 { - self.expiry.unwrap_or(0) - } - // optional string error_description = 40; + + pub fn get_error_description(&self) -> &str { + match self.error_description.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_error_description(&mut self) { self.error_description.clear(); } @@ -4511,13 +4637,6 @@ impl APLoginFailed { pub fn take_error_description(&mut self) -> ::std::string::String { self.error_description.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_error_description(&self) -> &str { - match self.error_description.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for APLoginFailed { @@ -4610,13 +4729,13 @@ impl ::protobuf::Message for APLoginFailed { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4678,10 +4797,10 @@ impl ::protobuf::Message for APLoginFailed { impl ::protobuf::Clear for APLoginFailed { fn clear(&mut self) { - self.clear_error_code(); - self.clear_retry_delay(); - self.clear_expiry(); - self.clear_error_description(); + self.error_code = ::std::option::Option::None; + self.retry_delay = ::std::option::Option::None; + self.expiry = ::std::option::Option::None; + self.error_description.clear(); self.unknown_fields.clear(); } } @@ -4705,8 +4824,14 @@ pub struct ClientResponsePlaintext { pow_response: ::protobuf::SingularPtrField, crypto_response: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientResponsePlaintext { + fn default() -> &'a ClientResponsePlaintext { + ::default_instance() + } } impl ClientResponsePlaintext { @@ -4716,6 +4841,10 @@ impl ClientResponsePlaintext { // required .LoginCryptoResponseUnion login_crypto_response = 10; + + pub fn get_login_crypto_response(&self) -> &LoginCryptoResponseUnion { + self.login_crypto_response.as_ref().unwrap_or_else(|| LoginCryptoResponseUnion::default_instance()) + } pub fn clear_login_crypto_response(&mut self) { self.login_crypto_response.clear(); } @@ -4743,12 +4872,12 @@ impl ClientResponsePlaintext { self.login_crypto_response.take().unwrap_or_else(|| LoginCryptoResponseUnion::new()) } - pub fn get_login_crypto_response(&self) -> &LoginCryptoResponseUnion { - self.login_crypto_response.as_ref().unwrap_or_else(|| LoginCryptoResponseUnion::default_instance()) - } - // required .PoWResponseUnion pow_response = 20; + + pub fn get_pow_response(&self) -> &PoWResponseUnion { + self.pow_response.as_ref().unwrap_or_else(|| PoWResponseUnion::default_instance()) + } pub fn clear_pow_response(&mut self) { self.pow_response.clear(); } @@ -4776,12 +4905,12 @@ impl ClientResponsePlaintext { self.pow_response.take().unwrap_or_else(|| PoWResponseUnion::new()) } - pub fn get_pow_response(&self) -> &PoWResponseUnion { - self.pow_response.as_ref().unwrap_or_else(|| PoWResponseUnion::default_instance()) - } - // required .CryptoResponseUnion crypto_response = 30; + + pub fn get_crypto_response(&self) -> &CryptoResponseUnion { + self.crypto_response.as_ref().unwrap_or_else(|| CryptoResponseUnion::default_instance()) + } pub fn clear_crypto_response(&mut self) { self.crypto_response.clear(); } @@ -4808,10 +4937,6 @@ impl ClientResponsePlaintext { pub fn take_crypto_response(&mut self) -> CryptoResponseUnion { self.crypto_response.take().unwrap_or_else(|| CryptoResponseUnion::new()) } - - pub fn get_crypto_response(&self) -> &CryptoResponseUnion { - self.crypto_response.as_ref().unwrap_or_else(|| CryptoResponseUnion::default_instance()) - } } impl ::protobuf::Message for ClientResponsePlaintext { @@ -4917,13 +5042,13 @@ impl ::protobuf::Message for ClientResponsePlaintext { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4980,9 +5105,9 @@ impl ::protobuf::Message for ClientResponsePlaintext { impl ::protobuf::Clear for ClientResponsePlaintext { fn clear(&mut self) { - self.clear_login_crypto_response(); - self.clear_pow_response(); - self.clear_crypto_response(); + self.login_crypto_response.clear(); + self.pow_response.clear(); + self.crypto_response.clear(); self.unknown_fields.clear(); } } @@ -5004,8 +5129,14 @@ pub struct LoginCryptoResponseUnion { // message fields diffie_hellman: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoResponseUnion { + fn default() -> &'a LoginCryptoResponseUnion { + ::default_instance() + } } impl LoginCryptoResponseUnion { @@ -5015,6 +5146,10 @@ impl LoginCryptoResponseUnion { // optional .LoginCryptoDiffieHellmanResponse diffie_hellman = 10; + + pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanResponse { + self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::default_instance()) + } pub fn clear_diffie_hellman(&mut self) { self.diffie_hellman.clear(); } @@ -5041,10 +5176,6 @@ impl LoginCryptoResponseUnion { pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanResponse { self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::new()) } - - pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanResponse { - self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::default_instance()) - } } impl ::protobuf::Message for LoginCryptoResponseUnion { @@ -5107,13 +5238,13 @@ impl ::protobuf::Message for LoginCryptoResponseUnion { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5160,7 +5291,7 @@ impl ::protobuf::Message for LoginCryptoResponseUnion { impl ::protobuf::Clear for LoginCryptoResponseUnion { fn clear(&mut self) { - self.clear_diffie_hellman(); + self.diffie_hellman.clear(); self.unknown_fields.clear(); } } @@ -5182,8 +5313,14 @@ pub struct LoginCryptoDiffieHellmanResponse { // message fields hmac: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanResponse { + fn default() -> &'a LoginCryptoDiffieHellmanResponse { + ::default_instance() + } } impl LoginCryptoDiffieHellmanResponse { @@ -5193,6 +5330,13 @@ impl LoginCryptoDiffieHellmanResponse { // required bytes hmac = 10; + + pub fn get_hmac(&self) -> &[u8] { + match self.hmac.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_hmac(&mut self) { self.hmac.clear(); } @@ -5219,13 +5363,6 @@ impl LoginCryptoDiffieHellmanResponse { pub fn take_hmac(&mut self) -> ::std::vec::Vec { self.hmac.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_hmac(&self) -> &[u8] { - match self.hmac.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for LoginCryptoDiffieHellmanResponse { @@ -5283,13 +5420,13 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanResponse { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5336,7 +5473,7 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanResponse { impl ::protobuf::Clear for LoginCryptoDiffieHellmanResponse { fn clear(&mut self) { - self.clear_hmac(); + self.hmac.clear(); self.unknown_fields.clear(); } } @@ -5358,8 +5495,14 @@ pub struct PoWResponseUnion { // message fields hash_cash: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PoWResponseUnion { + fn default() -> &'a PoWResponseUnion { + ::default_instance() + } } impl PoWResponseUnion { @@ -5369,6 +5512,10 @@ impl PoWResponseUnion { // optional .PoWHashCashResponse hash_cash = 10; + + pub fn get_hash_cash(&self) -> &PoWHashCashResponse { + self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashResponse::default_instance()) + } pub fn clear_hash_cash(&mut self) { self.hash_cash.clear(); } @@ -5395,10 +5542,6 @@ impl PoWResponseUnion { pub fn take_hash_cash(&mut self) -> PoWHashCashResponse { self.hash_cash.take().unwrap_or_else(|| PoWHashCashResponse::new()) } - - pub fn get_hash_cash(&self) -> &PoWHashCashResponse { - self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashResponse::default_instance()) - } } impl ::protobuf::Message for PoWResponseUnion { @@ -5461,13 +5604,13 @@ impl ::protobuf::Message for PoWResponseUnion { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5514,7 +5657,7 @@ impl ::protobuf::Message for PoWResponseUnion { impl ::protobuf::Clear for PoWResponseUnion { fn clear(&mut self) { - self.clear_hash_cash(); + self.hash_cash.clear(); self.unknown_fields.clear(); } } @@ -5536,8 +5679,14 @@ pub struct PoWHashCashResponse { // message fields hash_suffix: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PoWHashCashResponse { + fn default() -> &'a PoWHashCashResponse { + ::default_instance() + } } impl PoWHashCashResponse { @@ -5547,6 +5696,13 @@ impl PoWHashCashResponse { // required bytes hash_suffix = 10; + + pub fn get_hash_suffix(&self) -> &[u8] { + match self.hash_suffix.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_hash_suffix(&mut self) { self.hash_suffix.clear(); } @@ -5573,13 +5729,6 @@ impl PoWHashCashResponse { pub fn take_hash_suffix(&mut self) -> ::std::vec::Vec { self.hash_suffix.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_hash_suffix(&self) -> &[u8] { - match self.hash_suffix.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for PoWHashCashResponse { @@ -5637,13 +5786,13 @@ impl ::protobuf::Message for PoWHashCashResponse { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5690,7 +5839,7 @@ impl ::protobuf::Message for PoWHashCashResponse { impl ::protobuf::Clear for PoWHashCashResponse { fn clear(&mut self) { - self.clear_hash_suffix(); + self.hash_suffix.clear(); self.unknown_fields.clear(); } } @@ -5713,8 +5862,14 @@ pub struct CryptoResponseUnion { shannon: ::protobuf::SingularPtrField, rc4_sha1_hmac: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoResponseUnion { + fn default() -> &'a CryptoResponseUnion { + ::default_instance() + } } impl CryptoResponseUnion { @@ -5724,6 +5879,10 @@ impl CryptoResponseUnion { // optional .CryptoShannonResponse shannon = 10; + + pub fn get_shannon(&self) -> &CryptoShannonResponse { + self.shannon.as_ref().unwrap_or_else(|| CryptoShannonResponse::default_instance()) + } pub fn clear_shannon(&mut self) { self.shannon.clear(); } @@ -5751,12 +5910,12 @@ impl CryptoResponseUnion { self.shannon.take().unwrap_or_else(|| CryptoShannonResponse::new()) } - pub fn get_shannon(&self) -> &CryptoShannonResponse { - self.shannon.as_ref().unwrap_or_else(|| CryptoShannonResponse::default_instance()) - } - // optional .CryptoRc4Sha1HmacResponse rc4_sha1_hmac = 20; + + pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacResponse { + self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacResponse::default_instance()) + } pub fn clear_rc4_sha1_hmac(&mut self) { self.rc4_sha1_hmac.clear(); } @@ -5783,10 +5942,6 @@ impl CryptoResponseUnion { pub fn take_rc4_sha1_hmac(&mut self) -> CryptoRc4Sha1HmacResponse { self.rc4_sha1_hmac.take().unwrap_or_else(|| CryptoRc4Sha1HmacResponse::new()) } - - pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacResponse { - self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacResponse::default_instance()) - } } impl ::protobuf::Message for CryptoResponseUnion { @@ -5866,13 +6021,13 @@ impl ::protobuf::Message for CryptoResponseUnion { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5924,8 +6079,8 @@ impl ::protobuf::Message for CryptoResponseUnion { impl ::protobuf::Clear for CryptoResponseUnion { fn clear(&mut self) { - self.clear_shannon(); - self.clear_rc4_sha1_hmac(); + self.shannon.clear(); + self.rc4_sha1_hmac.clear(); self.unknown_fields.clear(); } } @@ -5947,8 +6102,14 @@ pub struct CryptoShannonResponse { // message fields dummy: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoShannonResponse { + fn default() -> &'a CryptoShannonResponse { + ::default_instance() + } } impl CryptoShannonResponse { @@ -5958,6 +6119,10 @@ impl CryptoShannonResponse { // optional int32 dummy = 1; + + pub fn get_dummy(&self) -> i32 { + self.dummy.unwrap_or(0) + } pub fn clear_dummy(&mut self) { self.dummy = ::std::option::Option::None; } @@ -5970,10 +6135,6 @@ impl CryptoShannonResponse { pub fn set_dummy(&mut self, v: i32) { self.dummy = ::std::option::Option::Some(v); } - - pub fn get_dummy(&self) -> i32 { - self.dummy.unwrap_or(0) - } } impl ::protobuf::Message for CryptoShannonResponse { @@ -6032,13 +6193,13 @@ impl ::protobuf::Message for CryptoShannonResponse { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -6085,7 +6246,7 @@ impl ::protobuf::Message for CryptoShannonResponse { impl ::protobuf::Clear for CryptoShannonResponse { fn clear(&mut self) { - self.clear_dummy(); + self.dummy = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -6107,8 +6268,14 @@ pub struct CryptoRc4Sha1HmacResponse { // message fields dummy: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoRc4Sha1HmacResponse { + fn default() -> &'a CryptoRc4Sha1HmacResponse { + ::default_instance() + } } impl CryptoRc4Sha1HmacResponse { @@ -6118,6 +6285,10 @@ impl CryptoRc4Sha1HmacResponse { // optional int32 dummy = 1; + + pub fn get_dummy(&self) -> i32 { + self.dummy.unwrap_or(0) + } pub fn clear_dummy(&mut self) { self.dummy = ::std::option::Option::None; } @@ -6130,10 +6301,6 @@ impl CryptoRc4Sha1HmacResponse { pub fn set_dummy(&mut self, v: i32) { self.dummy = ::std::option::Option::Some(v); } - - pub fn get_dummy(&self) -> i32 { - self.dummy.unwrap_or(0) - } } impl ::protobuf::Message for CryptoRc4Sha1HmacResponse { @@ -6192,13 +6359,13 @@ impl ::protobuf::Message for CryptoRc4Sha1HmacResponse { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -6245,7 +6412,7 @@ impl ::protobuf::Message for CryptoRc4Sha1HmacResponse { impl ::protobuf::Clear for CryptoRc4Sha1HmacResponse { fn clear(&mut self) { - self.clear_dummy(); + self.dummy = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -6314,6 +6481,12 @@ impl ::protobuf::ProtobufEnum for Product { impl ::std::marker::Copy for Product { } +impl ::std::default::Default for Product { + fn default() -> Self { + Product::PRODUCT_CLIENT + } +} + impl ::protobuf::reflect::ProtobufValue for Product { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6363,6 +6536,12 @@ impl ::protobuf::ProtobufEnum for ProductFlags { impl ::std::marker::Copy for ProductFlags { } +impl ::std::default::Default for ProductFlags { + fn default() -> Self { + ProductFlags::PRODUCT_FLAG_NONE + } +} + impl ::protobuf::reflect::ProtobufValue for ProductFlags { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6478,6 +6657,12 @@ impl ::protobuf::ProtobufEnum for Platform { impl ::std::marker::Copy for Platform { } +impl ::std::default::Default for Platform { + fn default() -> Self { + Platform::PLATFORM_WIN32_X86 + } +} + impl ::protobuf::reflect::ProtobufValue for Platform { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6527,6 +6712,12 @@ impl ::protobuf::ProtobufEnum for Fingerprint { impl ::std::marker::Copy for Fingerprint { } +impl ::std::default::Default for Fingerprint { + fn default() -> Self { + Fingerprint::FINGERPRINT_GRAIN + } +} + impl ::protobuf::reflect::ProtobufValue for Fingerprint { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6576,6 +6767,12 @@ impl ::protobuf::ProtobufEnum for Cryptosuite { impl ::std::marker::Copy for Cryptosuite { } +impl ::std::default::Default for Cryptosuite { + fn default() -> Self { + Cryptosuite::CRYPTO_SUITE_SHANNON + } +} + impl ::protobuf::reflect::ProtobufValue for Cryptosuite { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6622,6 +6819,12 @@ impl ::protobuf::ProtobufEnum for Powscheme { impl ::std::marker::Copy for Powscheme { } +impl ::std::default::Default for Powscheme { + fn default() -> Self { + Powscheme::POW_HASH_CASH + } +} + impl ::protobuf::reflect::ProtobufValue for Powscheme { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6698,6 +6901,12 @@ impl ::protobuf::ProtobufEnum for ErrorCode { impl ::std::marker::Copy for ErrorCode { } +impl ::std::default::Default for ErrorCode { + fn default() -> Self { + ErrorCode::ProtocolError + } +} + impl ::protobuf::reflect::ProtobufValue for ErrorCode { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6705,103 +6914,97 @@ impl ::protobuf::reflect::ProtobufValue for ErrorCode { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x11keyexchange.proto\x12\0\"\xd0\x02\n\x0bClientHello\x12\"\n\nbuild_\ - info\x18\n\x20\x02(\x0b2\n.BuildInfoB\x02\x18\0\x120\n\x16fingerprints_s\ - upported\x18\x14\x20\x03(\x0e2\x0c.FingerprintB\x02\x18\0\x120\n\x16cryp\ - tosuites_supported\x18\x1e\x20\x03(\x0e2\x0c.CryptosuiteB\x02\x18\0\x12,\ - \n\x14powschemes_supported\x18(\x20\x03(\x0e2\n.PowschemeB\x02\x18\0\x12\ - 6\n\x12login_crypto_hello\x182\x20\x02(\x0b2\x16.LoginCryptoHelloUnionB\ - \x02\x18\0\x12\x18\n\x0cclient_nonce\x18<\x20\x02(\x0cB\x02\x18\0\x12\ - \x13\n\x07padding\x18F\x20\x01(\x0cB\x02\x18\0\x12$\n\x0bfeature_set\x18\ - P\x20\x01(\x0b2\x0b.FeatureSetB\x02\x18\0\"\x8a\x01\n\tBuildInfo\x12\x1d\ - \n\x07product\x18\n\x20\x02(\x0e2\x08.ProductB\x02\x18\0\x12(\n\rproduct\ - _flags\x18\x14\x20\x03(\x0e2\r.ProductFlagsB\x02\x18\0\x12\x1f\n\x08plat\ - form\x18\x1e\x20\x02(\x0e2\t.PlatformB\x02\x18\0\x12\x13\n\x07version\ - \x18(\x20\x02(\x04B\x02\x18\0\"S\n\x15LoginCryptoHelloUnion\x12:\n\x0edi\ - ffie_hellman\x18\n\x20\x01(\x0b2\x1e.LoginCryptoDiffieHellmanHelloB\x02\ - \x18\0\"N\n\x1dLoginCryptoDiffieHellmanHello\x12\x0e\n\x02gc\x18\n\x20\ - \x02(\x0cB\x02\x18\0\x12\x1d\n\x11server_keys_known\x18\x14\x20\x02(\rB\ - \x02\x18\0\"C\n\nFeatureSet\x12\x17\n\x0bautoupdate2\x18\x01\x20\x01(\ - \x08B\x02\x18\0\x12\x1c\n\x10current_location\x18\x02\x20\x01(\x08B\x02\ - \x18\0\"\x90\x01\n\x11APResponseMessage\x12#\n\tchallenge\x18\n\x20\x01(\ - \x0b2\x0c.APChallengeB\x02\x18\0\x12,\n\x07upgrade\x18\x14\x20\x01(\x0b2\ - \x17.UpgradeRequiredMessageB\x02\x18\0\x12(\n\x0clogin_failed\x18\x1e\ - \x20\x01(\x0b2\x0e.APLoginFailedB\x02\x18\0\"\x9f\x02\n\x0bAPChallenge\ - \x12>\n\x16login_crypto_challenge\x18\n\x20\x02(\x0b2\x1a.LoginCryptoCha\ - llengeUnionB\x02\x18\0\x12=\n\x15fingerprint_challenge\x18\x14\x20\x02(\ - \x0b2\x1a.FingerprintChallengeUnionB\x02\x18\0\x12-\n\rpow_challenge\x18\ - \x1e\x20\x02(\x0b2\x12.PoWChallengeUnionB\x02\x18\0\x123\n\x10crypto_cha\ - llenge\x18(\x20\x02(\x0b2\x15.CryptoChallengeUnionB\x02\x18\0\x12\x18\n\ - \x0cserver_nonce\x182\x20\x02(\x0cB\x02\x18\0\x12\x13\n\x07padding\x18<\ - \x20\x01(\x0cB\x02\x18\0\"[\n\x19LoginCryptoChallengeUnion\x12>\n\x0edif\ - fie_hellman\x18\n\x20\x01(\x0b2\".LoginCryptoDiffieHellmanChallengeB\x02\ - \x18\0\"o\n!LoginCryptoDiffieHellmanChallenge\x12\x0e\n\x02gs\x18\n\x20\ - \x02(\x0cB\x02\x18\0\x12\x20\n\x14server_signature_key\x18\x14\x20\x02(\ - \x05B\x02\x18\0\x12\x18\n\x0cgs_signature\x18\x1e\x20\x02(\x0cB\x02\x18\ - \0\"\x84\x01\n\x19FingerprintChallengeUnion\x12-\n\x05grain\x18\n\x20\ - \x01(\x0b2\x1a.FingerprintGrainChallengeB\x02\x18\0\x128\n\x0bhmac_ripem\ - d\x18\x14\x20\x01(\x0b2\x1f.FingerprintHmacRipemdChallengeB\x02\x18\0\",\ - \n\x19FingerprintGrainChallenge\x12\x0f\n\x03kek\x18\n\x20\x02(\x0cB\x02\ - \x18\0\"7\n\x1eFingerprintHmacRipemdChallenge\x12\x15\n\tchallenge\x18\n\ - \x20\x02(\x0cB\x02\x18\0\"A\n\x11PoWChallengeUnion\x12,\n\thash_cash\x18\ - \n\x20\x01(\x0b2\x15.PoWHashCashChallengeB\x02\x18\0\"R\n\x14PoWHashCash\ - Challenge\x12\x12\n\x06prefix\x18\n\x20\x01(\x0cB\x02\x18\0\x12\x12\n\ - \x06length\x18\x14\x20\x01(\x05B\x02\x18\0\x12\x12\n\x06target\x18\x1e\ - \x20\x01(\x05B\x02\x18\0\"|\n\x14CryptoChallengeUnion\x12,\n\x07shannon\ - \x18\n\x20\x01(\x0b2\x17.CryptoShannonChallengeB\x02\x18\0\x126\n\rrc4_s\ - ha1_hmac\x18\x14\x20\x01(\x0b2\x1b.CryptoRc4Sha1HmacChallengeB\x02\x18\0\ - \"\x18\n\x16CryptoShannonChallenge\"\x1c\n\x1aCryptoRc4Sha1HmacChallenge\ - \"i\n\x16UpgradeRequiredMessage\x12\x1f\n\x13upgrade_signed_part\x18\n\ - \x20\x02(\x0cB\x02\x18\0\x12\x15\n\tsignature\x18\x14\x20\x02(\x0cB\x02\ - \x18\0\x12\x17\n\x0bhttp_suffix\x18\x1e\x20\x01(\tB\x02\x18\0\"\x7f\n\rA\ - PLoginFailed\x12\"\n\nerror_code\x18\n\x20\x02(\x0e2\n.ErrorCodeB\x02\ - \x18\0\x12\x17\n\x0bretry_delay\x18\x14\x20\x01(\x05B\x02\x18\0\x12\x12\ - \n\x06expiry\x18\x1e\x20\x01(\x05B\x02\x18\0\x12\x1d\n\x11error_descript\ - ion\x18(\x20\x01(\tB\x02\x18\0\"\xb7\x01\n\x17ClientResponsePlaintext\ - \x12<\n\x15login_crypto_response\x18\n\x20\x02(\x0b2\x19.LoginCryptoResp\ - onseUnionB\x02\x18\0\x12+\n\x0cpow_response\x18\x14\x20\x02(\x0b2\x11.Po\ - WResponseUnionB\x02\x18\0\x121\n\x0fcrypto_response\x18\x1e\x20\x02(\x0b\ - 2\x14.CryptoResponseUnionB\x02\x18\0\"Y\n\x18LoginCryptoResponseUnion\ - \x12=\n\x0ediffie_hellman\x18\n\x20\x01(\x0b2!.LoginCryptoDiffieHellmanR\ - esponseB\x02\x18\0\"4\n\x20LoginCryptoDiffieHellmanResponse\x12\x10\n\ - \x04hmac\x18\n\x20\x02(\x0cB\x02\x18\0\"?\n\x10PoWResponseUnion\x12+\n\t\ - hash_cash\x18\n\x20\x01(\x0b2\x14.PoWHashCashResponseB\x02\x18\0\".\n\ - \x13PoWHashCashResponse\x12\x17\n\x0bhash_suffix\x18\n\x20\x02(\x0cB\x02\ - \x18\0\"y\n\x13CryptoResponseUnion\x12+\n\x07shannon\x18\n\x20\x01(\x0b2\ - \x16.CryptoShannonResponseB\x02\x18\0\x125\n\rrc4_sha1_hmac\x18\x14\x20\ - \x01(\x0b2\x1a.CryptoRc4Sha1HmacResponseB\x02\x18\0\"*\n\x15CryptoShanno\ - nResponse\x12\x11\n\x05dummy\x18\x01\x20\x01(\x05B\x02\x18\0\".\n\x19Cry\ - ptoRc4Sha1HmacResponse\x12\x11\n\x05dummy\x18\x01\x20\x01(\x05B\x02\x18\ - \0*\x83\x01\n\x07Product\x12\x12\n\x0ePRODUCT_CLIENT\x10\0\x12\x16\n\x12\ - PRODUCT_LIBSPOTIFY\x10\x01\x12\x12\n\x0ePRODUCT_MOBILE\x10\x02\x12\x13\n\ - \x0fPRODUCT_PARTNER\x10\x03\x12\x1f\n\x1bPRODUCT_LIBSPOTIFY_EMBEDDED\x10\ - \x05\x1a\x02\x10\0*E\n\x0cProductFlags\x12\x15\n\x11PRODUCT_FLAG_NONE\ - \x10\0\x12\x1a\n\x16PRODUCT_FLAG_DEV_BUILD\x10\x01\x1a\x02\x10\0*\xe0\ - \x04\n\x08Platform\x12\x16\n\x12PLATFORM_WIN32_X86\x10\0\x12\x14\n\x10PL\ - ATFORM_OSX_X86\x10\x01\x12\x16\n\x12PLATFORM_LINUX_X86\x10\x02\x12\x17\n\ - \x13PLATFORM_IPHONE_ARM\x10\x03\x12\x14\n\x10PLATFORM_S60_ARM\x10\x04\ - \x12\x14\n\x10PLATFORM_OSX_PPC\x10\x05\x12\x18\n\x14PLATFORM_ANDROID_ARM\ - \x10\x06\x12\x1b\n\x17PLATFORM_WINDOWS_CE_ARM\x10\x07\x12\x19\n\x15PLATF\ - ORM_LINUX_X86_64\x10\x08\x12\x17\n\x13PLATFORM_OSX_X86_64\x10\t\x12\x15\ - \n\x11PLATFORM_PALM_ARM\x10\n\x12\x15\n\x11PLATFORM_LINUX_SH\x10\x0b\x12\ - \x18\n\x14PLATFORM_FREEBSD_X86\x10\x0c\x12\x1b\n\x17PLATFORM_FREEBSD_X86\ - _64\x10\r\x12\x1b\n\x17PLATFORM_BLACKBERRY_ARM\x10\x0e\x12\x12\n\x0ePLAT\ - FORM_SONOS\x10\x0f\x12\x17\n\x13PLATFORM_LINUX_MIPS\x10\x10\x12\x16\n\ - \x12PLATFORM_LINUX_ARM\x10\x11\x12\x19\n\x15PLATFORM_LOGITECH_ARM\x10\ + \n\x11keyexchange.proto\x12\0\"\xc2\x02\n\x0bClientHello\x12\x20\n\nbuil\ + d_info\x18\n\x20\x02(\x0b2\n.BuildInfoB\0\x12.\n\x16fingerprints_support\ + ed\x18\x14\x20\x03(\x0e2\x0c.FingerprintB\0\x12.\n\x16cryptosuites_suppo\ + rted\x18\x1e\x20\x03(\x0e2\x0c.CryptosuiteB\0\x12*\n\x14powschemes_suppo\ + rted\x18(\x20\x03(\x0e2\n.PowschemeB\0\x124\n\x12login_crypto_hello\x182\ + \x20\x02(\x0b2\x16.LoginCryptoHelloUnionB\0\x12\x16\n\x0cclient_nonce\ + \x18<\x20\x02(\x0cB\0\x12\x11\n\x07padding\x18F\x20\x01(\x0cB\0\x12\"\n\ + \x0bfeature_set\x18P\x20\x01(\x0b2\x0b.FeatureSetB\0:\0\"\x84\x01\n\tBui\ + ldInfo\x12\x1b\n\x07product\x18\n\x20\x02(\x0e2\x08.ProductB\0\x12&\n\rp\ + roduct_flags\x18\x14\x20\x03(\x0e2\r.ProductFlagsB\0\x12\x1d\n\x08platfo\ + rm\x18\x1e\x20\x02(\x0e2\t.PlatformB\0\x12\x11\n\x07version\x18(\x20\x02\ + (\x04B\0:\0\"S\n\x15LoginCryptoHelloUnion\x128\n\x0ediffie_hellman\x18\n\ + \x20\x01(\x0b2\x1e.LoginCryptoDiffieHellmanHelloB\0:\0\"L\n\x1dLoginCryp\ + toDiffieHellmanHello\x12\x0c\n\x02gc\x18\n\x20\x02(\x0cB\0\x12\x1b\n\x11\ + server_keys_known\x18\x14\x20\x02(\rB\0:\0\"A\n\nFeatureSet\x12\x15\n\ + \x0bautoupdate2\x18\x01\x20\x01(\x08B\0\x12\x1a\n\x10current_location\ + \x18\x02\x20\x01(\x08B\0:\0\"\x8c\x01\n\x11APResponseMessage\x12!\n\tcha\ + llenge\x18\n\x20\x01(\x0b2\x0c.APChallengeB\0\x12*\n\x07upgrade\x18\x14\ + \x20\x01(\x0b2\x17.UpgradeRequiredMessageB\0\x12&\n\x0clogin_failed\x18\ + \x1e\x20\x01(\x0b2\x0e.APLoginFailedB\0:\0\"\x95\x02\n\x0bAPChallenge\ + \x12<\n\x16login_crypto_challenge\x18\n\x20\x02(\x0b2\x1a.LoginCryptoCha\ + llengeUnionB\0\x12;\n\x15fingerprint_challenge\x18\x14\x20\x02(\x0b2\x1a\ + .FingerprintChallengeUnionB\0\x12+\n\rpow_challenge\x18\x1e\x20\x02(\x0b\ + 2\x12.PoWChallengeUnionB\0\x121\n\x10crypto_challenge\x18(\x20\x02(\x0b2\ + \x15.CryptoChallengeUnionB\0\x12\x16\n\x0cserver_nonce\x182\x20\x02(\x0c\ + B\0\x12\x11\n\x07padding\x18<\x20\x01(\x0cB\0:\0\"[\n\x19LoginCryptoChal\ + lengeUnion\x12<\n\x0ediffie_hellman\x18\n\x20\x01(\x0b2\".LoginCryptoDif\ + fieHellmanChallengeB\0:\0\"k\n!LoginCryptoDiffieHellmanChallenge\x12\x0c\ + \n\x02gs\x18\n\x20\x02(\x0cB\0\x12\x1e\n\x14server_signature_key\x18\x14\ + \x20\x02(\x05B\0\x12\x16\n\x0cgs_signature\x18\x1e\x20\x02(\x0cB\0:\0\"\ + \x82\x01\n\x19FingerprintChallengeUnion\x12+\n\x05grain\x18\n\x20\x01(\ + \x0b2\x1a.FingerprintGrainChallengeB\0\x126\n\x0bhmac_ripemd\x18\x14\x20\ + \x01(\x0b2\x1f.FingerprintHmacRipemdChallengeB\0:\0\",\n\x19FingerprintG\ + rainChallenge\x12\r\n\x03kek\x18\n\x20\x02(\x0cB\0:\0\"7\n\x1eFingerprin\ + tHmacRipemdChallenge\x12\x13\n\tchallenge\x18\n\x20\x02(\x0cB\0:\0\"A\n\ + \x11PoWChallengeUnion\x12*\n\thash_cash\x18\n\x20\x01(\x0b2\x15.PoWHashC\ + ashChallengeB\0:\0\"N\n\x14PoWHashCashChallenge\x12\x10\n\x06prefix\x18\ + \n\x20\x01(\x0cB\0\x12\x10\n\x06length\x18\x14\x20\x01(\x05B\0\x12\x10\n\ + \x06target\x18\x1e\x20\x01(\x05B\0:\0\"z\n\x14CryptoChallengeUnion\x12*\ + \n\x07shannon\x18\n\x20\x01(\x0b2\x17.CryptoShannonChallengeB\0\x124\n\r\ + rc4_sha1_hmac\x18\x14\x20\x01(\x0b2\x1b.CryptoRc4Sha1HmacChallengeB\0:\0\ + \"\x1a\n\x16CryptoShannonChallenge:\0\"\x1e\n\x1aCryptoRc4Sha1HmacChalle\ + nge:\0\"e\n\x16UpgradeRequiredMessage\x12\x1d\n\x13upgrade_signed_part\ + \x18\n\x20\x02(\x0cB\0\x12\x13\n\tsignature\x18\x14\x20\x02(\x0cB\0\x12\ + \x15\n\x0bhttp_suffix\x18\x1e\x20\x01(\tB\0:\0\"y\n\rAPLoginFailed\x12\ + \x20\n\nerror_code\x18\n\x20\x02(\x0e2\n.ErrorCodeB\0\x12\x15\n\x0bretry\ + _delay\x18\x14\x20\x01(\x05B\0\x12\x10\n\x06expiry\x18\x1e\x20\x01(\x05B\ + \0\x12\x1b\n\x11error_description\x18(\x20\x01(\tB\0:\0\"\xb3\x01\n\x17C\ + lientResponsePlaintext\x12:\n\x15login_crypto_response\x18\n\x20\x02(\ + \x0b2\x19.LoginCryptoResponseUnionB\0\x12)\n\x0cpow_response\x18\x14\x20\ + \x02(\x0b2\x11.PoWResponseUnionB\0\x12/\n\x0fcrypto_response\x18\x1e\x20\ + \x02(\x0b2\x14.CryptoResponseUnionB\0:\0\"Y\n\x18LoginCryptoResponseUnio\ + n\x12;\n\x0ediffie_hellman\x18\n\x20\x01(\x0b2!.LoginCryptoDiffieHellman\ + ResponseB\0:\0\"4\n\x20LoginCryptoDiffieHellmanResponse\x12\x0e\n\x04hma\ + c\x18\n\x20\x02(\x0cB\0:\0\"?\n\x10PoWResponseUnion\x12)\n\thash_cash\ + \x18\n\x20\x01(\x0b2\x14.PoWHashCashResponseB\0:\0\".\n\x13PoWHashCashRe\ + sponse\x12\x15\n\x0bhash_suffix\x18\n\x20\x02(\x0cB\0:\0\"w\n\x13CryptoR\ + esponseUnion\x12)\n\x07shannon\x18\n\x20\x01(\x0b2\x16.CryptoShannonResp\ + onseB\0\x123\n\rrc4_sha1_hmac\x18\x14\x20\x01(\x0b2\x1a.CryptoRc4Sha1Hma\ + cResponseB\0:\0\"*\n\x15CryptoShannonResponse\x12\x0f\n\x05dummy\x18\x01\ + \x20\x01(\x05B\0:\0\".\n\x19CryptoRc4Sha1HmacResponse\x12\x0f\n\x05dummy\ + \x18\x01\x20\x01(\x05B\0:\0*\x81\x01\n\x07Product\x12\x12\n\x0ePRODUCT_C\ + LIENT\x10\0\x12\x16\n\x12PRODUCT_LIBSPOTIFY\x10\x01\x12\x12\n\x0ePRODUCT\ + _MOBILE\x10\x02\x12\x13\n\x0fPRODUCT_PARTNER\x10\x03\x12\x1f\n\x1bPRODUC\ + T_LIBSPOTIFY_EMBEDDED\x10\x05\x1a\0*C\n\x0cProductFlags\x12\x15\n\x11PRO\ + DUCT_FLAG_NONE\x10\0\x12\x1a\n\x16PRODUCT_FLAG_DEV_BUILD\x10\x01\x1a\0*\ + \xde\x04\n\x08Platform\x12\x16\n\x12PLATFORM_WIN32_X86\x10\0\x12\x14\n\ + \x10PLATFORM_OSX_X86\x10\x01\x12\x16\n\x12PLATFORM_LINUX_X86\x10\x02\x12\ + \x17\n\x13PLATFORM_IPHONE_ARM\x10\x03\x12\x14\n\x10PLATFORM_S60_ARM\x10\ + \x04\x12\x14\n\x10PLATFORM_OSX_PPC\x10\x05\x12\x18\n\x14PLATFORM_ANDROID\ + _ARM\x10\x06\x12\x1b\n\x17PLATFORM_WINDOWS_CE_ARM\x10\x07\x12\x19\n\x15P\ + LATFORM_LINUX_X86_64\x10\x08\x12\x17\n\x13PLATFORM_OSX_X86_64\x10\t\x12\ + \x15\n\x11PLATFORM_PALM_ARM\x10\n\x12\x15\n\x11PLATFORM_LINUX_SH\x10\x0b\ + \x12\x18\n\x14PLATFORM_FREEBSD_X86\x10\x0c\x12\x1b\n\x17PLATFORM_FREEBSD\ + _X86_64\x10\r\x12\x1b\n\x17PLATFORM_BLACKBERRY_ARM\x10\x0e\x12\x12\n\x0e\ + PLATFORM_SONOS\x10\x0f\x12\x17\n\x13PLATFORM_LINUX_MIPS\x10\x10\x12\x16\ + \n\x12PLATFORM_LINUX_ARM\x10\x11\x12\x19\n\x15PLATFORM_LOGITECH_ARM\x10\ \x12\x12\x1b\n\x17PLATFORM_LINUX_BLACKFIN\x10\x13\x12\x14\n\x10PLATFORM_\ WP7_ARM\x10\x14\x12\x16\n\x12PLATFORM_ONKYO_ARM\x10\x15\x12\x17\n\x13PLA\ - TFORM_QNXNTO_ARM\x10\x16\x12\x14\n\x10PLATFORM_BCO_ARM\x10\x17\x1a\x02\ - \x10\0*E\n\x0bFingerprint\x12\x15\n\x11FINGERPRINT_GRAIN\x10\0\x12\x1b\n\ - \x17FINGERPRINT_HMAC_RIPEMD\x10\x01\x1a\x02\x10\0*K\n\x0bCryptosuite\x12\ - \x18\n\x14CRYPTO_SUITE_SHANNON\x10\0\x12\x1e\n\x1aCRYPTO_SUITE_RC4_SHA1_\ - HMAC\x10\x01\x1a\x02\x10\0*\"\n\tPowscheme\x12\x11\n\rPOW_HASH_CASH\x10\ - \0\x1a\x02\x10\0*\x8d\x02\n\tErrorCode\x12\x11\n\rProtocolError\x10\0\ - \x12\x10\n\x0cTryAnotherAP\x10\x02\x12\x13\n\x0fBadConnectionId\x10\x05\ - \x12\x15\n\x11TravelRestriction\x10\t\x12\x1a\n\x16PremiumAccountRequire\ - d\x10\x0b\x12\x12\n\x0eBadCredentials\x10\x0c\x12\x1f\n\x1bCouldNotValid\ - ateCredentials\x10\r\x12\x11\n\rAccountExists\x10\x0e\x12\x1d\n\x19Extra\ - VerificationRequired\x10\x0f\x12\x11\n\rInvalidAppKey\x10\x10\x12\x15\n\ - \x11ApplicationBanned\x10\x11\x1a\x02\x10\0B\0b\x06proto2\ + TFORM_QNXNTO_ARM\x10\x16\x12\x14\n\x10PLATFORM_BCO_ARM\x10\x17\x1a\0*C\n\ + \x0bFingerprint\x12\x15\n\x11FINGERPRINT_GRAIN\x10\0\x12\x1b\n\x17FINGER\ + PRINT_HMAC_RIPEMD\x10\x01\x1a\0*I\n\x0bCryptosuite\x12\x18\n\x14CRYPTO_S\ + UITE_SHANNON\x10\0\x12\x1e\n\x1aCRYPTO_SUITE_RC4_SHA1_HMAC\x10\x01\x1a\0\ + *\x20\n\tPowscheme\x12\x11\n\rPOW_HASH_CASH\x10\0\x1a\0*\x8b\x02\n\tErro\ + rCode\x12\x11\n\rProtocolError\x10\0\x12\x10\n\x0cTryAnotherAP\x10\x02\ + \x12\x13\n\x0fBadConnectionId\x10\x05\x12\x15\n\x11TravelRestriction\x10\ + \t\x12\x1a\n\x16PremiumAccountRequired\x10\x0b\x12\x12\n\x0eBadCredentia\ + ls\x10\x0c\x12\x1f\n\x1bCouldNotValidateCredentials\x10\r\x12\x11\n\rAcc\ + ountExists\x10\x0e\x12\x1d\n\x19ExtraVerificationRequired\x10\x0f\x12\ + \x11\n\rInvalidAppKey\x10\x10\x12\x15\n\x11ApplicationBanned\x10\x11\x1a\ + \0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/protocol/src/lib.rs b/protocol/src/lib.rs index ad9d9a32..30233384 100644 --- a/protocol/src/lib.rs +++ b/protocol/src/lib.rs @@ -1,6 +1,6 @@ -// Autogenerated by build.sh - extern crate protobuf; +// This file is parsed by build.rs +// Each included module will be compiled from the matching .proto definition. pub mod authentication; pub mod keyexchange; pub mod mercury; diff --git a/protocol/src/mercury.rs b/protocol/src/mercury.rs index a778a0ac..0913c5c7 100644 --- a/protocol/src/mercury.rs +++ b/protocol/src/mercury.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.8.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,17 +17,28 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `mercury.proto` use protobuf::Message as Message_imported_for_functions; use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_0; + #[derive(PartialEq,Clone,Default)] pub struct MercuryMultiGetRequest { // message fields request: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MercuryMultiGetRequest { + fn default() -> &'a MercuryMultiGetRequest { + ::default_instance() + } } impl MercuryMultiGetRequest { @@ -37,6 +48,10 @@ impl MercuryMultiGetRequest { // repeated .MercuryRequest request = 1; + + pub fn get_request(&self) -> &[MercuryRequest] { + &self.request + } pub fn clear_request(&mut self) { self.request.clear(); } @@ -55,10 +70,6 @@ impl MercuryMultiGetRequest { pub fn take_request(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.request, ::protobuf::RepeatedField::new()) } - - pub fn get_request(&self) -> &[MercuryRequest] { - &self.request - } } impl ::protobuf::Message for MercuryMultiGetRequest { @@ -121,13 +132,13 @@ impl ::protobuf::Message for MercuryMultiGetRequest { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -174,7 +185,7 @@ impl ::protobuf::Message for MercuryMultiGetRequest { impl ::protobuf::Clear for MercuryMultiGetRequest { fn clear(&mut self) { - self.clear_request(); + self.request.clear(); self.unknown_fields.clear(); } } @@ -196,8 +207,14 @@ pub struct MercuryMultiGetReply { // message fields reply: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MercuryMultiGetReply { + fn default() -> &'a MercuryMultiGetReply { + ::default_instance() + } } impl MercuryMultiGetReply { @@ -207,6 +224,10 @@ impl MercuryMultiGetReply { // repeated .MercuryReply reply = 1; + + pub fn get_reply(&self) -> &[MercuryReply] { + &self.reply + } pub fn clear_reply(&mut self) { self.reply.clear(); } @@ -225,10 +246,6 @@ impl MercuryMultiGetReply { pub fn take_reply(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.reply, ::protobuf::RepeatedField::new()) } - - pub fn get_reply(&self) -> &[MercuryReply] { - &self.reply - } } impl ::protobuf::Message for MercuryMultiGetReply { @@ -291,13 +308,13 @@ impl ::protobuf::Message for MercuryMultiGetReply { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -344,7 +361,7 @@ impl ::protobuf::Message for MercuryMultiGetReply { impl ::protobuf::Clear for MercuryMultiGetReply { fn clear(&mut self) { - self.clear_reply(); + self.reply.clear(); self.unknown_fields.clear(); } } @@ -369,8 +386,14 @@ pub struct MercuryRequest { body: ::protobuf::SingularField<::std::vec::Vec>, etag: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MercuryRequest { + fn default() -> &'a MercuryRequest { + ::default_instance() + } } impl MercuryRequest { @@ -380,6 +403,13 @@ impl MercuryRequest { // optional string uri = 1; + + pub fn get_uri(&self) -> &str { + match self.uri.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_uri(&mut self) { self.uri.clear(); } @@ -407,15 +437,15 @@ impl MercuryRequest { self.uri.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_uri(&self) -> &str { - match self.uri.as_ref() { + // optional string content_type = 2; + + + pub fn get_content_type(&self) -> &str { + match self.content_type.as_ref() { Some(v) => &v, None => "", } } - - // optional string content_type = 2; - pub fn clear_content_type(&mut self) { self.content_type.clear(); } @@ -443,15 +473,15 @@ impl MercuryRequest { self.content_type.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_content_type(&self) -> &str { - match self.content_type.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bytes body = 3; + + pub fn get_body(&self) -> &[u8] { + match self.body.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_body(&mut self) { self.body.clear(); } @@ -479,15 +509,15 @@ impl MercuryRequest { self.body.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_body(&self) -> &[u8] { - match self.body.as_ref() { + // optional bytes etag = 4; + + + pub fn get_etag(&self) -> &[u8] { + match self.etag.as_ref() { Some(v) => &v, None => &[], } } - - // optional bytes etag = 4; - pub fn clear_etag(&mut self) { self.etag.clear(); } @@ -514,13 +544,6 @@ impl MercuryRequest { pub fn take_etag(&mut self) -> ::std::vec::Vec { self.etag.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_etag(&self) -> &[u8] { - match self.etag.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for MercuryRequest { @@ -602,13 +625,13 @@ impl ::protobuf::Message for MercuryRequest { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -670,10 +693,10 @@ impl ::protobuf::Message for MercuryRequest { impl ::protobuf::Clear for MercuryRequest { fn clear(&mut self) { - self.clear_uri(); - self.clear_content_type(); - self.clear_body(); - self.clear_etag(); + self.uri.clear(); + self.content_type.clear(); + self.body.clear(); + self.etag.clear(); self.unknown_fields.clear(); } } @@ -701,8 +724,14 @@ pub struct MercuryReply { content_type: ::protobuf::SingularField<::std::string::String>, body: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MercuryReply { + fn default() -> &'a MercuryReply { + ::default_instance() + } } impl MercuryReply { @@ -712,6 +741,10 @@ impl MercuryReply { // optional sint32 status_code = 1; + + pub fn get_status_code(&self) -> i32 { + self.status_code.unwrap_or(0) + } pub fn clear_status_code(&mut self) { self.status_code = ::std::option::Option::None; } @@ -725,12 +758,15 @@ impl MercuryReply { self.status_code = ::std::option::Option::Some(v); } - pub fn get_status_code(&self) -> i32 { - self.status_code.unwrap_or(0) - } - // optional string status_message = 2; + + pub fn get_status_message(&self) -> &str { + match self.status_message.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_status_message(&mut self) { self.status_message.clear(); } @@ -758,15 +794,12 @@ impl MercuryReply { self.status_message.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_status_message(&self) -> &str { - match self.status_message.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .MercuryReply.CachePolicy cache_policy = 3; + + pub fn get_cache_policy(&self) -> MercuryReply_CachePolicy { + self.cache_policy.unwrap_or(MercuryReply_CachePolicy::CACHE_NO) + } pub fn clear_cache_policy(&mut self) { self.cache_policy = ::std::option::Option::None; } @@ -780,12 +813,12 @@ impl MercuryReply { self.cache_policy = ::std::option::Option::Some(v); } - pub fn get_cache_policy(&self) -> MercuryReply_CachePolicy { - self.cache_policy.unwrap_or(MercuryReply_CachePolicy::CACHE_NO) - } - // optional sint32 ttl = 4; + + pub fn get_ttl(&self) -> i32 { + self.ttl.unwrap_or(0) + } pub fn clear_ttl(&mut self) { self.ttl = ::std::option::Option::None; } @@ -799,12 +832,15 @@ impl MercuryReply { self.ttl = ::std::option::Option::Some(v); } - pub fn get_ttl(&self) -> i32 { - self.ttl.unwrap_or(0) - } - // optional bytes etag = 5; + + pub fn get_etag(&self) -> &[u8] { + match self.etag.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_etag(&mut self) { self.etag.clear(); } @@ -832,15 +868,15 @@ impl MercuryReply { self.etag.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_etag(&self) -> &[u8] { - match self.etag.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string content_type = 6; + + pub fn get_content_type(&self) -> &str { + match self.content_type.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_content_type(&mut self) { self.content_type.clear(); } @@ -868,15 +904,15 @@ impl MercuryReply { self.content_type.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_content_type(&self) -> &str { - match self.content_type.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bytes body = 7; + + pub fn get_body(&self) -> &[u8] { + match self.body.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_body(&mut self) { self.body.clear(); } @@ -903,13 +939,6 @@ impl MercuryReply { pub fn take_body(&mut self) -> ::std::vec::Vec { self.body.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_body(&self) -> &[u8] { - match self.body.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for MercuryReply { @@ -1026,13 +1055,13 @@ impl ::protobuf::Message for MercuryReply { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1109,13 +1138,13 @@ impl ::protobuf::Message for MercuryReply { impl ::protobuf::Clear for MercuryReply { fn clear(&mut self) { - self.clear_status_code(); - self.clear_status_message(); - self.clear_cache_policy(); - self.clear_ttl(); - self.clear_etag(); - self.clear_content_type(); - self.clear_body(); + self.status_code = ::std::option::Option::None; + self.status_message.clear(); + self.cache_policy = ::std::option::Option::None; + self.ttl = ::std::option::Option::None; + self.etag.clear(); + self.content_type.clear(); + self.body.clear(); self.unknown_fields.clear(); } } @@ -1178,6 +1207,13 @@ impl ::protobuf::ProtobufEnum for MercuryReply_CachePolicy { impl ::std::marker::Copy for MercuryReply_CachePolicy { } +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for MercuryReply_CachePolicy { + fn default() -> Self { + MercuryReply_CachePolicy::CACHE_NO + } +} + impl ::protobuf::reflect::ProtobufValue for MercuryReply_CachePolicy { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -1193,8 +1229,14 @@ pub struct Header { status_code: ::std::option::Option, user_fields: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Header { + fn default() -> &'a Header { +
::default_instance() + } } impl Header { @@ -1204,6 +1246,13 @@ impl Header { // optional string uri = 1; + + pub fn get_uri(&self) -> &str { + match self.uri.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_uri(&mut self) { self.uri.clear(); } @@ -1231,15 +1280,15 @@ impl Header { self.uri.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_uri(&self) -> &str { - match self.uri.as_ref() { + // optional string content_type = 2; + + + pub fn get_content_type(&self) -> &str { + match self.content_type.as_ref() { Some(v) => &v, None => "", } } - - // optional string content_type = 2; - pub fn clear_content_type(&mut self) { self.content_type.clear(); } @@ -1267,15 +1316,15 @@ impl Header { self.content_type.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_content_type(&self) -> &str { - match self.content_type.as_ref() { + // optional string method = 3; + + + pub fn get_method(&self) -> &str { + match self.method.as_ref() { Some(v) => &v, None => "", } } - - // optional string method = 3; - pub fn clear_method(&mut self) { self.method.clear(); } @@ -1303,15 +1352,12 @@ impl Header { self.method.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_method(&self) -> &str { - match self.method.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional sint32 status_code = 4; + + pub fn get_status_code(&self) -> i32 { + self.status_code.unwrap_or(0) + } pub fn clear_status_code(&mut self) { self.status_code = ::std::option::Option::None; } @@ -1325,12 +1371,12 @@ impl Header { self.status_code = ::std::option::Option::Some(v); } - pub fn get_status_code(&self) -> i32 { - self.status_code.unwrap_or(0) - } - // repeated .UserField user_fields = 6; + + pub fn get_user_fields(&self) -> &[UserField] { + &self.user_fields + } pub fn clear_user_fields(&mut self) { self.user_fields.clear(); } @@ -1349,10 +1395,6 @@ impl Header { pub fn take_user_fields(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.user_fields, ::protobuf::RepeatedField::new()) } - - pub fn get_user_fields(&self) -> &[UserField] { - &self.user_fields - } } impl ::protobuf::Message for Header { @@ -1455,13 +1497,13 @@ impl ::protobuf::Message for Header { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1528,11 +1570,11 @@ impl ::protobuf::Message for Header { impl ::protobuf::Clear for Header { fn clear(&mut self) { - self.clear_uri(); - self.clear_content_type(); - self.clear_method(); - self.clear_status_code(); - self.clear_user_fields(); + self.uri.clear(); + self.content_type.clear(); + self.method.clear(); + self.status_code = ::std::option::Option::None; + self.user_fields.clear(); self.unknown_fields.clear(); } } @@ -1555,8 +1597,14 @@ pub struct UserField { key: ::protobuf::SingularField<::std::string::String>, value: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UserField { + fn default() -> &'a UserField { + ::default_instance() + } } impl UserField { @@ -1566,6 +1614,13 @@ impl UserField { // optional string key = 1; + + pub fn get_key(&self) -> &str { + match self.key.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_key(&mut self) { self.key.clear(); } @@ -1593,15 +1648,15 @@ impl UserField { self.key.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_key(&self) -> &str { - match self.key.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bytes value = 2; + + pub fn get_value(&self) -> &[u8] { + match self.value.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_value(&mut self) { self.value.clear(); } @@ -1628,13 +1683,6 @@ impl UserField { pub fn take_value(&mut self) -> ::std::vec::Vec { self.value.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_value(&self) -> &[u8] { - match self.value.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for UserField { @@ -1698,13 +1746,13 @@ impl ::protobuf::Message for UserField { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1756,8 +1804,8 @@ impl ::protobuf::Message for UserField { impl ::protobuf::Clear for UserField { fn clear(&mut self) { - self.clear_key(); - self.clear_value(); + self.key.clear(); + self.value.clear(); self.unknown_fields.clear(); } } @@ -1775,27 +1823,24 @@ impl ::protobuf::reflect::ProtobufValue for UserField { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\rmercury.proto\x12\0\">\n\x16MercuryMultiGetRequest\x12$\n\x07request\ - \x18\x01\x20\x03(\x0b2\x0f.MercuryRequestB\x02\x18\0\"8\n\x14MercuryMult\ - iGetReply\x12\x20\n\x05reply\x18\x01\x20\x03(\x0b2\r.MercuryReplyB\x02\ - \x18\0\"_\n\x0eMercuryRequest\x12\x0f\n\x03uri\x18\x01\x20\x01(\tB\x02\ - \x18\0\x12\x18\n\x0ccontent_type\x18\x02\x20\x01(\tB\x02\x18\0\x12\x10\n\ - \x04body\x18\x03\x20\x01(\x0cB\x02\x18\0\x12\x10\n\x04etag\x18\x04\x20\ - \x01(\x0cB\x02\x18\0\"\x8d\x02\n\x0cMercuryReply\x12\x17\n\x0bstatus_cod\ - e\x18\x01\x20\x01(\x11B\x02\x18\0\x12\x1a\n\x0estatus_message\x18\x02\ - \x20\x01(\tB\x02\x18\0\x123\n\x0ccache_policy\x18\x03\x20\x01(\x0e2\x19.\ - MercuryReply.CachePolicyB\x02\x18\0\x12\x0f\n\x03ttl\x18\x04\x20\x01(\ - \x11B\x02\x18\0\x12\x10\n\x04etag\x18\x05\x20\x01(\x0cB\x02\x18\0\x12\ - \x18\n\x0ccontent_type\x18\x06\x20\x01(\tB\x02\x18\0\x12\x10\n\x04body\ - \x18\x07\x20\x01(\x0cB\x02\x18\0\"D\n\x0bCachePolicy\x12\x0c\n\x08CACHE_\ - NO\x10\x01\x12\x11\n\rCACHE_PRIVATE\x10\x02\x12\x10\n\x0cCACHE_PUBLIC\ - \x10\x03\x1a\x02\x10\0\"\x85\x01\n\x06Header\x12\x0f\n\x03uri\x18\x01\ - \x20\x01(\tB\x02\x18\0\x12\x18\n\x0ccontent_type\x18\x02\x20\x01(\tB\x02\ - \x18\0\x12\x12\n\x06method\x18\x03\x20\x01(\tB\x02\x18\0\x12\x17\n\x0bst\ - atus_code\x18\x04\x20\x01(\x11B\x02\x18\0\x12#\n\x0buser_fields\x18\x06\ - \x20\x03(\x0b2\n.UserFieldB\x02\x18\0\"/\n\tUserField\x12\x0f\n\x03key\ - \x18\x01\x20\x01(\tB\x02\x18\0\x12\x11\n\x05value\x18\x02\x20\x01(\x0cB\ - \x02\x18\0B\0b\x06proto2\ + \n\rmercury.proto\x12\0\">\n\x16MercuryMultiGetRequest\x12\"\n\x07reques\ + t\x18\x01\x20\x03(\x0b2\x0f.MercuryRequestB\0:\0\"8\n\x14MercuryMultiGet\ + Reply\x12\x1e\n\x05reply\x18\x01\x20\x03(\x0b2\r.MercuryReplyB\0:\0\"Y\n\ + \x0eMercuryRequest\x12\r\n\x03uri\x18\x01\x20\x01(\tB\0\x12\x16\n\x0ccon\ + tent_type\x18\x02\x20\x01(\tB\0\x12\x0e\n\x04body\x18\x03\x20\x01(\x0cB\ + \0\x12\x0e\n\x04etag\x18\x04\x20\x01(\x0cB\0:\0\"\xff\x01\n\x0cMercuryRe\ + ply\x12\x15\n\x0bstatus_code\x18\x01\x20\x01(\x11B\0\x12\x18\n\x0estatus\ + _message\x18\x02\x20\x01(\tB\0\x121\n\x0ccache_policy\x18\x03\x20\x01(\ + \x0e2\x19.MercuryReply.CachePolicyB\0\x12\r\n\x03ttl\x18\x04\x20\x01(\ + \x11B\0\x12\x0e\n\x04etag\x18\x05\x20\x01(\x0cB\0\x12\x16\n\x0ccontent_t\ + ype\x18\x06\x20\x01(\tB\0\x12\x0e\n\x04body\x18\x07\x20\x01(\x0cB\0\"B\n\ + \x0bCachePolicy\x12\x0c\n\x08CACHE_NO\x10\x01\x12\x11\n\rCACHE_PRIVATE\ + \x10\x02\x12\x10\n\x0cCACHE_PUBLIC\x10\x03\x1a\0:\0\"}\n\x06Header\x12\r\ + \n\x03uri\x18\x01\x20\x01(\tB\0\x12\x16\n\x0ccontent_type\x18\x02\x20\ + \x01(\tB\0\x12\x10\n\x06method\x18\x03\x20\x01(\tB\0\x12\x15\n\x0bstatus\ + _code\x18\x04\x20\x01(\x11B\0\x12!\n\x0buser_fields\x18\x06\x20\x03(\x0b\ + 2\n.UserFieldB\0:\0\"-\n\tUserField\x12\r\n\x03key\x18\x01\x20\x01(\tB\0\ + \x12\x0f\n\x05value\x18\x02\x20\x01(\x0cB\0:\0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/protocol/src/metadata.rs b/protocol/src/metadata.rs index bc55ded5..7cfa964d 100644 --- a/protocol/src/metadata.rs +++ b/protocol/src/metadata.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.8.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,18 +17,29 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `metadata.proto` use protobuf::Message as Message_imported_for_functions; use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_0; + #[derive(PartialEq,Clone,Default)] pub struct TopTracks { // message fields country: ::protobuf::SingularField<::std::string::String>, track: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a TopTracks { + fn default() -> &'a TopTracks { + ::default_instance() + } } impl TopTracks { @@ -38,6 +49,13 @@ impl TopTracks { // optional string country = 1; + + pub fn get_country(&self) -> &str { + match self.country.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_country(&mut self) { self.country.clear(); } @@ -65,15 +83,12 @@ impl TopTracks { self.country.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_country(&self) -> &str { - match self.country.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Track track = 2; + + pub fn get_track(&self) -> &[Track] { + &self.track + } pub fn clear_track(&mut self) { self.track.clear(); } @@ -92,10 +107,6 @@ impl TopTracks { pub fn take_track(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.track, ::protobuf::RepeatedField::new()) } - - pub fn get_track(&self) -> &[Track] { - &self.track - } } impl ::protobuf::Message for TopTracks { @@ -167,13 +178,13 @@ impl ::protobuf::Message for TopTracks { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -225,8 +236,8 @@ impl ::protobuf::Message for TopTracks { impl ::protobuf::Clear for TopTracks { fn clear(&mut self) { - self.clear_country(); - self.clear_track(); + self.country.clear(); + self.track.clear(); self.unknown_fields.clear(); } } @@ -250,8 +261,14 @@ pub struct ActivityPeriod { end_year: ::std::option::Option, decade: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ActivityPeriod { + fn default() -> &'a ActivityPeriod { + ::default_instance() + } } impl ActivityPeriod { @@ -261,6 +278,10 @@ impl ActivityPeriod { // optional sint32 start_year = 1; + + pub fn get_start_year(&self) -> i32 { + self.start_year.unwrap_or(0) + } pub fn clear_start_year(&mut self) { self.start_year = ::std::option::Option::None; } @@ -274,12 +295,12 @@ impl ActivityPeriod { self.start_year = ::std::option::Option::Some(v); } - pub fn get_start_year(&self) -> i32 { - self.start_year.unwrap_or(0) - } - // optional sint32 end_year = 2; + + pub fn get_end_year(&self) -> i32 { + self.end_year.unwrap_or(0) + } pub fn clear_end_year(&mut self) { self.end_year = ::std::option::Option::None; } @@ -293,12 +314,12 @@ impl ActivityPeriod { self.end_year = ::std::option::Option::Some(v); } - pub fn get_end_year(&self) -> i32 { - self.end_year.unwrap_or(0) - } - // optional sint32 decade = 3; + + pub fn get_decade(&self) -> i32 { + self.decade.unwrap_or(0) + } pub fn clear_decade(&mut self) { self.decade = ::std::option::Option::None; } @@ -311,10 +332,6 @@ impl ActivityPeriod { pub fn set_decade(&mut self, v: i32) { self.decade = ::std::option::Option::Some(v); } - - pub fn get_decade(&self) -> i32 { - self.decade.unwrap_or(0) - } } impl ::protobuf::Message for ActivityPeriod { @@ -399,13 +416,13 @@ impl ::protobuf::Message for ActivityPeriod { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -462,9 +479,9 @@ impl ::protobuf::Message for ActivityPeriod { impl ::protobuf::Clear for ActivityPeriod { fn clear(&mut self) { - self.clear_start_year(); - self.clear_end_year(); - self.clear_decade(); + self.start_year = ::std::option::Option::None; + self.end_year = ::std::option::Option::None; + self.decade = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -502,8 +519,14 @@ pub struct Artist { is_portrait_album_cover: ::std::option::Option, portrait_group: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Artist { + fn default() -> &'a Artist { + ::default_instance() + } } impl Artist { @@ -513,6 +536,13 @@ impl Artist { // optional bytes gid = 1; + + pub fn get_gid(&self) -> &[u8] { + match self.gid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gid(&mut self) { self.gid.clear(); } @@ -540,15 +570,15 @@ impl Artist { self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gid(&self) -> &[u8] { - match self.gid.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string name = 2; + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_name(&mut self) { self.name.clear(); } @@ -576,15 +606,12 @@ impl Artist { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_name(&self) -> &str { - match self.name.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional sint32 popularity = 3; + + pub fn get_popularity(&self) -> i32 { + self.popularity.unwrap_or(0) + } pub fn clear_popularity(&mut self) { self.popularity = ::std::option::Option::None; } @@ -598,12 +625,12 @@ impl Artist { self.popularity = ::std::option::Option::Some(v); } - pub fn get_popularity(&self) -> i32 { - self.popularity.unwrap_or(0) - } - // repeated .TopTracks top_track = 4; + + pub fn get_top_track(&self) -> &[TopTracks] { + &self.top_track + } pub fn clear_top_track(&mut self) { self.top_track.clear(); } @@ -623,12 +650,12 @@ impl Artist { ::std::mem::replace(&mut self.top_track, ::protobuf::RepeatedField::new()) } - pub fn get_top_track(&self) -> &[TopTracks] { - &self.top_track - } - // repeated .AlbumGroup album_group = 5; + + pub fn get_album_group(&self) -> &[AlbumGroup] { + &self.album_group + } pub fn clear_album_group(&mut self) { self.album_group.clear(); } @@ -648,12 +675,12 @@ impl Artist { ::std::mem::replace(&mut self.album_group, ::protobuf::RepeatedField::new()) } - pub fn get_album_group(&self) -> &[AlbumGroup] { - &self.album_group - } - // repeated .AlbumGroup single_group = 6; + + pub fn get_single_group(&self) -> &[AlbumGroup] { + &self.single_group + } pub fn clear_single_group(&mut self) { self.single_group.clear(); } @@ -673,12 +700,12 @@ impl Artist { ::std::mem::replace(&mut self.single_group, ::protobuf::RepeatedField::new()) } - pub fn get_single_group(&self) -> &[AlbumGroup] { - &self.single_group - } - // repeated .AlbumGroup compilation_group = 7; + + pub fn get_compilation_group(&self) -> &[AlbumGroup] { + &self.compilation_group + } pub fn clear_compilation_group(&mut self) { self.compilation_group.clear(); } @@ -698,12 +725,12 @@ impl Artist { ::std::mem::replace(&mut self.compilation_group, ::protobuf::RepeatedField::new()) } - pub fn get_compilation_group(&self) -> &[AlbumGroup] { - &self.compilation_group - } - // repeated .AlbumGroup appears_on_group = 8; + + pub fn get_appears_on_group(&self) -> &[AlbumGroup] { + &self.appears_on_group + } pub fn clear_appears_on_group(&mut self) { self.appears_on_group.clear(); } @@ -723,12 +750,12 @@ impl Artist { ::std::mem::replace(&mut self.appears_on_group, ::protobuf::RepeatedField::new()) } - pub fn get_appears_on_group(&self) -> &[AlbumGroup] { - &self.appears_on_group - } - // repeated string genre = 9; + + pub fn get_genre(&self) -> &[::std::string::String] { + &self.genre + } pub fn clear_genre(&mut self) { self.genre.clear(); } @@ -748,12 +775,12 @@ impl Artist { ::std::mem::replace(&mut self.genre, ::protobuf::RepeatedField::new()) } - pub fn get_genre(&self) -> &[::std::string::String] { - &self.genre - } - // repeated .ExternalId external_id = 10; + + pub fn get_external_id(&self) -> &[ExternalId] { + &self.external_id + } pub fn clear_external_id(&mut self) { self.external_id.clear(); } @@ -773,12 +800,12 @@ impl Artist { ::std::mem::replace(&mut self.external_id, ::protobuf::RepeatedField::new()) } - pub fn get_external_id(&self) -> &[ExternalId] { - &self.external_id - } - // repeated .Image portrait = 11; + + pub fn get_portrait(&self) -> &[Image] { + &self.portrait + } pub fn clear_portrait(&mut self) { self.portrait.clear(); } @@ -798,12 +825,12 @@ impl Artist { ::std::mem::replace(&mut self.portrait, ::protobuf::RepeatedField::new()) } - pub fn get_portrait(&self) -> &[Image] { - &self.portrait - } - // repeated .Biography biography = 12; + + pub fn get_biography(&self) -> &[Biography] { + &self.biography + } pub fn clear_biography(&mut self) { self.biography.clear(); } @@ -823,12 +850,12 @@ impl Artist { ::std::mem::replace(&mut self.biography, ::protobuf::RepeatedField::new()) } - pub fn get_biography(&self) -> &[Biography] { - &self.biography - } - // repeated .ActivityPeriod activity_period = 13; + + pub fn get_activity_period(&self) -> &[ActivityPeriod] { + &self.activity_period + } pub fn clear_activity_period(&mut self) { self.activity_period.clear(); } @@ -848,12 +875,12 @@ impl Artist { ::std::mem::replace(&mut self.activity_period, ::protobuf::RepeatedField::new()) } - pub fn get_activity_period(&self) -> &[ActivityPeriod] { - &self.activity_period - } - // repeated .Restriction restriction = 14; + + pub fn get_restriction(&self) -> &[Restriction] { + &self.restriction + } pub fn clear_restriction(&mut self) { self.restriction.clear(); } @@ -873,12 +900,12 @@ impl Artist { ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new()) } - pub fn get_restriction(&self) -> &[Restriction] { - &self.restriction - } - // repeated .Artist related = 15; + + pub fn get_related(&self) -> &[Artist] { + &self.related + } pub fn clear_related(&mut self) { self.related.clear(); } @@ -898,12 +925,12 @@ impl Artist { ::std::mem::replace(&mut self.related, ::protobuf::RepeatedField::new()) } - pub fn get_related(&self) -> &[Artist] { - &self.related - } - // optional bool is_portrait_album_cover = 16; + + pub fn get_is_portrait_album_cover(&self) -> bool { + self.is_portrait_album_cover.unwrap_or(false) + } pub fn clear_is_portrait_album_cover(&mut self) { self.is_portrait_album_cover = ::std::option::Option::None; } @@ -917,12 +944,12 @@ impl Artist { self.is_portrait_album_cover = ::std::option::Option::Some(v); } - pub fn get_is_portrait_album_cover(&self) -> bool { - self.is_portrait_album_cover.unwrap_or(false) - } - // optional .ImageGroup portrait_group = 17; + + pub fn get_portrait_group(&self) -> &ImageGroup { + self.portrait_group.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) + } pub fn clear_portrait_group(&mut self) { self.portrait_group.clear(); } @@ -949,10 +976,6 @@ impl Artist { pub fn take_portrait_group(&mut self) -> ImageGroup { self.portrait_group.take().unwrap_or_else(|| ImageGroup::new()) } - - pub fn get_portrait_group(&self) -> &ImageGroup { - self.portrait_group.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) - } } impl ::protobuf::Message for Artist { @@ -1255,13 +1278,13 @@ impl ::protobuf::Message for Artist { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1388,23 +1411,23 @@ impl ::protobuf::Message for Artist { impl ::protobuf::Clear for Artist { fn clear(&mut self) { - self.clear_gid(); - self.clear_name(); - self.clear_popularity(); - self.clear_top_track(); - self.clear_album_group(); - self.clear_single_group(); - self.clear_compilation_group(); - self.clear_appears_on_group(); - self.clear_genre(); - self.clear_external_id(); - self.clear_portrait(); - self.clear_biography(); - self.clear_activity_period(); - self.clear_restriction(); - self.clear_related(); - self.clear_is_portrait_album_cover(); - self.clear_portrait_group(); + self.gid.clear(); + self.name.clear(); + self.popularity = ::std::option::Option::None; + self.top_track.clear(); + self.album_group.clear(); + self.single_group.clear(); + self.compilation_group.clear(); + self.appears_on_group.clear(); + self.genre.clear(); + self.external_id.clear(); + self.portrait.clear(); + self.biography.clear(); + self.activity_period.clear(); + self.restriction.clear(); + self.related.clear(); + self.is_portrait_album_cover = ::std::option::Option::None; + self.portrait_group.clear(); self.unknown_fields.clear(); } } @@ -1426,8 +1449,14 @@ pub struct AlbumGroup { // message fields album: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AlbumGroup { + fn default() -> &'a AlbumGroup { + ::default_instance() + } } impl AlbumGroup { @@ -1437,6 +1466,10 @@ impl AlbumGroup { // repeated .Album album = 1; + + pub fn get_album(&self) -> &[Album] { + &self.album + } pub fn clear_album(&mut self) { self.album.clear(); } @@ -1455,10 +1488,6 @@ impl AlbumGroup { pub fn take_album(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.album, ::protobuf::RepeatedField::new()) } - - pub fn get_album(&self) -> &[Album] { - &self.album - } } impl ::protobuf::Message for AlbumGroup { @@ -1521,13 +1550,13 @@ impl ::protobuf::Message for AlbumGroup { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1574,7 +1603,7 @@ impl ::protobuf::Message for AlbumGroup { impl ::protobuf::Clear for AlbumGroup { fn clear(&mut self) { - self.clear_album(); + self.album.clear(); self.unknown_fields.clear(); } } @@ -1598,8 +1627,14 @@ pub struct Date { month: ::std::option::Option, day: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Date { + fn default() -> &'a Date { + ::default_instance() + } } impl Date { @@ -1609,6 +1644,10 @@ impl Date { // optional sint32 year = 1; + + pub fn get_year(&self) -> i32 { + self.year.unwrap_or(0) + } pub fn clear_year(&mut self) { self.year = ::std::option::Option::None; } @@ -1622,12 +1661,12 @@ impl Date { self.year = ::std::option::Option::Some(v); } - pub fn get_year(&self) -> i32 { - self.year.unwrap_or(0) - } - // optional sint32 month = 2; + + pub fn get_month(&self) -> i32 { + self.month.unwrap_or(0) + } pub fn clear_month(&mut self) { self.month = ::std::option::Option::None; } @@ -1641,12 +1680,12 @@ impl Date { self.month = ::std::option::Option::Some(v); } - pub fn get_month(&self) -> i32 { - self.month.unwrap_or(0) - } - // optional sint32 day = 3; + + pub fn get_day(&self) -> i32 { + self.day.unwrap_or(0) + } pub fn clear_day(&mut self) { self.day = ::std::option::Option::None; } @@ -1659,10 +1698,6 @@ impl Date { pub fn set_day(&mut self, v: i32) { self.day = ::std::option::Option::Some(v); } - - pub fn get_day(&self) -> i32 { - self.day.unwrap_or(0) - } } impl ::protobuf::Message for Date { @@ -1747,13 +1782,13 @@ impl ::protobuf::Message for Date { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1810,9 +1845,9 @@ impl ::protobuf::Message for Date { impl ::protobuf::Clear for Date { fn clear(&mut self) { - self.clear_year(); - self.clear_month(); - self.clear_day(); + self.year = ::std::option::Option::None; + self.month = ::std::option::Option::None; + self.day = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -1850,8 +1885,14 @@ pub struct Album { sale_period: ::protobuf::RepeatedField, cover_group: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Album { + fn default() -> &'a Album { + ::default_instance() + } } impl Album { @@ -1861,6 +1902,13 @@ impl Album { // optional bytes gid = 1; + + pub fn get_gid(&self) -> &[u8] { + match self.gid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gid(&mut self) { self.gid.clear(); } @@ -1888,15 +1936,15 @@ impl Album { self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gid(&self) -> &[u8] { - match self.gid.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string name = 2; + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_name(&mut self) { self.name.clear(); } @@ -1924,15 +1972,12 @@ impl Album { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_name(&self) -> &str { - match self.name.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Artist artist = 3; + + pub fn get_artist(&self) -> &[Artist] { + &self.artist + } pub fn clear_artist(&mut self) { self.artist.clear(); } @@ -1952,12 +1997,12 @@ impl Album { ::std::mem::replace(&mut self.artist, ::protobuf::RepeatedField::new()) } - pub fn get_artist(&self) -> &[Artist] { - &self.artist - } - // optional .Album.Type typ = 4; + + pub fn get_typ(&self) -> Album_Type { + self.typ.unwrap_or(Album_Type::ALBUM) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -1971,12 +2016,15 @@ impl Album { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> Album_Type { - self.typ.unwrap_or(Album_Type::ALBUM) - } - // optional string label = 5; + + pub fn get_label(&self) -> &str { + match self.label.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_label(&mut self) { self.label.clear(); } @@ -2004,15 +2052,12 @@ impl Album { self.label.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_label(&self) -> &str { - match self.label.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .Date date = 6; + + pub fn get_date(&self) -> &Date { + self.date.as_ref().unwrap_or_else(|| Date::default_instance()) + } pub fn clear_date(&mut self) { self.date.clear(); } @@ -2040,12 +2085,12 @@ impl Album { self.date.take().unwrap_or_else(|| Date::new()) } - pub fn get_date(&self) -> &Date { - self.date.as_ref().unwrap_or_else(|| Date::default_instance()) - } - // optional sint32 popularity = 7; + + pub fn get_popularity(&self) -> i32 { + self.popularity.unwrap_or(0) + } pub fn clear_popularity(&mut self) { self.popularity = ::std::option::Option::None; } @@ -2059,12 +2104,12 @@ impl Album { self.popularity = ::std::option::Option::Some(v); } - pub fn get_popularity(&self) -> i32 { - self.popularity.unwrap_or(0) - } - // repeated string genre = 8; + + pub fn get_genre(&self) -> &[::std::string::String] { + &self.genre + } pub fn clear_genre(&mut self) { self.genre.clear(); } @@ -2084,12 +2129,12 @@ impl Album { ::std::mem::replace(&mut self.genre, ::protobuf::RepeatedField::new()) } - pub fn get_genre(&self) -> &[::std::string::String] { - &self.genre - } - // repeated .Image cover = 9; + + pub fn get_cover(&self) -> &[Image] { + &self.cover + } pub fn clear_cover(&mut self) { self.cover.clear(); } @@ -2109,12 +2154,12 @@ impl Album { ::std::mem::replace(&mut self.cover, ::protobuf::RepeatedField::new()) } - pub fn get_cover(&self) -> &[Image] { - &self.cover - } - // repeated .ExternalId external_id = 10; + + pub fn get_external_id(&self) -> &[ExternalId] { + &self.external_id + } pub fn clear_external_id(&mut self) { self.external_id.clear(); } @@ -2134,12 +2179,12 @@ impl Album { ::std::mem::replace(&mut self.external_id, ::protobuf::RepeatedField::new()) } - pub fn get_external_id(&self) -> &[ExternalId] { - &self.external_id - } - // repeated .Disc disc = 11; + + pub fn get_disc(&self) -> &[Disc] { + &self.disc + } pub fn clear_disc(&mut self) { self.disc.clear(); } @@ -2159,12 +2204,12 @@ impl Album { ::std::mem::replace(&mut self.disc, ::protobuf::RepeatedField::new()) } - pub fn get_disc(&self) -> &[Disc] { - &self.disc - } - // repeated string review = 12; + + pub fn get_review(&self) -> &[::std::string::String] { + &self.review + } pub fn clear_review(&mut self) { self.review.clear(); } @@ -2184,12 +2229,12 @@ impl Album { ::std::mem::replace(&mut self.review, ::protobuf::RepeatedField::new()) } - pub fn get_review(&self) -> &[::std::string::String] { - &self.review - } - // repeated .Copyright copyright = 13; + + pub fn get_copyright(&self) -> &[Copyright] { + &self.copyright + } pub fn clear_copyright(&mut self) { self.copyright.clear(); } @@ -2209,12 +2254,12 @@ impl Album { ::std::mem::replace(&mut self.copyright, ::protobuf::RepeatedField::new()) } - pub fn get_copyright(&self) -> &[Copyright] { - &self.copyright - } - // repeated .Restriction restriction = 14; + + pub fn get_restriction(&self) -> &[Restriction] { + &self.restriction + } pub fn clear_restriction(&mut self) { self.restriction.clear(); } @@ -2234,12 +2279,12 @@ impl Album { ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new()) } - pub fn get_restriction(&self) -> &[Restriction] { - &self.restriction - } - // repeated .Album related = 15; + + pub fn get_related(&self) -> &[Album] { + &self.related + } pub fn clear_related(&mut self) { self.related.clear(); } @@ -2259,12 +2304,12 @@ impl Album { ::std::mem::replace(&mut self.related, ::protobuf::RepeatedField::new()) } - pub fn get_related(&self) -> &[Album] { - &self.related - } - // repeated .SalePeriod sale_period = 16; + + pub fn get_sale_period(&self) -> &[SalePeriod] { + &self.sale_period + } pub fn clear_sale_period(&mut self) { self.sale_period.clear(); } @@ -2284,12 +2329,12 @@ impl Album { ::std::mem::replace(&mut self.sale_period, ::protobuf::RepeatedField::new()) } - pub fn get_sale_period(&self) -> &[SalePeriod] { - &self.sale_period - } - // optional .ImageGroup cover_group = 17; + + pub fn get_cover_group(&self) -> &ImageGroup { + self.cover_group.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) + } pub fn clear_cover_group(&mut self) { self.cover_group.clear(); } @@ -2316,10 +2361,6 @@ impl Album { pub fn take_cover_group(&mut self) -> ImageGroup { self.cover_group.take().unwrap_or_else(|| ImageGroup::new()) } - - pub fn get_cover_group(&self) -> &ImageGroup { - self.cover_group.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) - } } impl ::protobuf::Message for Album { @@ -2602,13 +2643,13 @@ impl ::protobuf::Message for Album { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2735,23 +2776,23 @@ impl ::protobuf::Message for Album { impl ::protobuf::Clear for Album { fn clear(&mut self) { - self.clear_gid(); - self.clear_name(); - self.clear_artist(); - self.clear_typ(); - self.clear_label(); - self.clear_date(); - self.clear_popularity(); - self.clear_genre(); - self.clear_cover(); - self.clear_external_id(); - self.clear_disc(); - self.clear_review(); - self.clear_copyright(); - self.clear_restriction(); - self.clear_related(); - self.clear_sale_period(); - self.clear_cover_group(); + self.gid.clear(); + self.name.clear(); + self.artist.clear(); + self.typ = ::std::option::Option::None; + self.label.clear(); + self.date.clear(); + self.popularity = ::std::option::Option::None; + self.genre.clear(); + self.cover.clear(); + self.external_id.clear(); + self.disc.clear(); + self.review.clear(); + self.copyright.clear(); + self.restriction.clear(); + self.related.clear(); + self.sale_period.clear(); + self.cover_group.clear(); self.unknown_fields.clear(); } } @@ -2817,6 +2858,13 @@ impl ::protobuf::ProtobufEnum for Album_Type { impl ::std::marker::Copy for Album_Type { } +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for Album_Type { + fn default() -> Self { + Album_Type::ALBUM + } +} + impl ::protobuf::reflect::ProtobufValue for Album_Type { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -2842,8 +2890,14 @@ pub struct Track { sale_period: ::protobuf::RepeatedField, preview: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Track { + fn default() -> &'a Track { + ::default_instance() + } } impl Track { @@ -2853,6 +2907,13 @@ impl Track { // optional bytes gid = 1; + + pub fn get_gid(&self) -> &[u8] { + match self.gid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gid(&mut self) { self.gid.clear(); } @@ -2880,15 +2941,15 @@ impl Track { self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gid(&self) -> &[u8] { - match self.gid.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string name = 2; + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_name(&mut self) { self.name.clear(); } @@ -2916,15 +2977,12 @@ impl Track { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_name(&self) -> &str { - match self.name.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .Album album = 3; + + pub fn get_album(&self) -> &Album { + self.album.as_ref().unwrap_or_else(|| Album::default_instance()) + } pub fn clear_album(&mut self) { self.album.clear(); } @@ -2952,12 +3010,12 @@ impl Track { self.album.take().unwrap_or_else(|| Album::new()) } - pub fn get_album(&self) -> &Album { - self.album.as_ref().unwrap_or_else(|| Album::default_instance()) - } - // repeated .Artist artist = 4; + + pub fn get_artist(&self) -> &[Artist] { + &self.artist + } pub fn clear_artist(&mut self) { self.artist.clear(); } @@ -2977,12 +3035,12 @@ impl Track { ::std::mem::replace(&mut self.artist, ::protobuf::RepeatedField::new()) } - pub fn get_artist(&self) -> &[Artist] { - &self.artist - } - // optional sint32 number = 5; + + pub fn get_number(&self) -> i32 { + self.number.unwrap_or(0) + } pub fn clear_number(&mut self) { self.number = ::std::option::Option::None; } @@ -2996,12 +3054,12 @@ impl Track { self.number = ::std::option::Option::Some(v); } - pub fn get_number(&self) -> i32 { - self.number.unwrap_or(0) - } - // optional sint32 disc_number = 6; + + pub fn get_disc_number(&self) -> i32 { + self.disc_number.unwrap_or(0) + } pub fn clear_disc_number(&mut self) { self.disc_number = ::std::option::Option::None; } @@ -3015,12 +3073,12 @@ impl Track { self.disc_number = ::std::option::Option::Some(v); } - pub fn get_disc_number(&self) -> i32 { - self.disc_number.unwrap_or(0) - } - // optional sint32 duration = 7; + + pub fn get_duration(&self) -> i32 { + self.duration.unwrap_or(0) + } pub fn clear_duration(&mut self) { self.duration = ::std::option::Option::None; } @@ -3034,12 +3092,12 @@ impl Track { self.duration = ::std::option::Option::Some(v); } - pub fn get_duration(&self) -> i32 { - self.duration.unwrap_or(0) - } - // optional sint32 popularity = 8; + + pub fn get_popularity(&self) -> i32 { + self.popularity.unwrap_or(0) + } pub fn clear_popularity(&mut self) { self.popularity = ::std::option::Option::None; } @@ -3053,12 +3111,12 @@ impl Track { self.popularity = ::std::option::Option::Some(v); } - pub fn get_popularity(&self) -> i32 { - self.popularity.unwrap_or(0) - } - // optional bool explicit = 9; + + pub fn get_explicit(&self) -> bool { + self.explicit.unwrap_or(false) + } pub fn clear_explicit(&mut self) { self.explicit = ::std::option::Option::None; } @@ -3072,12 +3130,12 @@ impl Track { self.explicit = ::std::option::Option::Some(v); } - pub fn get_explicit(&self) -> bool { - self.explicit.unwrap_or(false) - } - // repeated .ExternalId external_id = 10; + + pub fn get_external_id(&self) -> &[ExternalId] { + &self.external_id + } pub fn clear_external_id(&mut self) { self.external_id.clear(); } @@ -3097,12 +3155,12 @@ impl Track { ::std::mem::replace(&mut self.external_id, ::protobuf::RepeatedField::new()) } - pub fn get_external_id(&self) -> &[ExternalId] { - &self.external_id - } - // repeated .Restriction restriction = 11; + + pub fn get_restriction(&self) -> &[Restriction] { + &self.restriction + } pub fn clear_restriction(&mut self) { self.restriction.clear(); } @@ -3122,12 +3180,12 @@ impl Track { ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new()) } - pub fn get_restriction(&self) -> &[Restriction] { - &self.restriction - } - // repeated .AudioFile file = 12; + + pub fn get_file(&self) -> &[AudioFile] { + &self.file + } pub fn clear_file(&mut self) { self.file.clear(); } @@ -3147,12 +3205,12 @@ impl Track { ::std::mem::replace(&mut self.file, ::protobuf::RepeatedField::new()) } - pub fn get_file(&self) -> &[AudioFile] { - &self.file - } - // repeated .Track alternative = 13; + + pub fn get_alternative(&self) -> &[Track] { + &self.alternative + } pub fn clear_alternative(&mut self) { self.alternative.clear(); } @@ -3172,12 +3230,12 @@ impl Track { ::std::mem::replace(&mut self.alternative, ::protobuf::RepeatedField::new()) } - pub fn get_alternative(&self) -> &[Track] { - &self.alternative - } - // repeated .SalePeriod sale_period = 14; + + pub fn get_sale_period(&self) -> &[SalePeriod] { + &self.sale_period + } pub fn clear_sale_period(&mut self) { self.sale_period.clear(); } @@ -3197,12 +3255,12 @@ impl Track { ::std::mem::replace(&mut self.sale_period, ::protobuf::RepeatedField::new()) } - pub fn get_sale_period(&self) -> &[SalePeriod] { - &self.sale_period - } - // repeated .AudioFile preview = 15; + + pub fn get_preview(&self) -> &[AudioFile] { + &self.preview + } pub fn clear_preview(&mut self) { self.preview.clear(); } @@ -3221,10 +3279,6 @@ impl Track { pub fn take_preview(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.preview, ::protobuf::RepeatedField::new()) } - - pub fn get_preview(&self) -> &[AudioFile] { - &self.preview - } } impl ::protobuf::Message for Track { @@ -3489,13 +3543,13 @@ impl ::protobuf::Message for Track { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3612,21 +3666,21 @@ impl ::protobuf::Message for Track { impl ::protobuf::Clear for Track { fn clear(&mut self) { - self.clear_gid(); - self.clear_name(); - self.clear_album(); - self.clear_artist(); - self.clear_number(); - self.clear_disc_number(); - self.clear_duration(); - self.clear_popularity(); - self.clear_explicit(); - self.clear_external_id(); - self.clear_restriction(); - self.clear_file(); - self.clear_alternative(); - self.clear_sale_period(); - self.clear_preview(); + self.gid.clear(); + self.name.clear(); + self.album.clear(); + self.artist.clear(); + self.number = ::std::option::Option::None; + self.disc_number = ::std::option::Option::None; + self.duration = ::std::option::Option::None; + self.popularity = ::std::option::Option::None; + self.explicit = ::std::option::Option::None; + self.external_id.clear(); + self.restriction.clear(); + self.file.clear(); + self.alternative.clear(); + self.sale_period.clear(); + self.preview.clear(); self.unknown_fields.clear(); } } @@ -3651,8 +3705,14 @@ pub struct Image { width: ::std::option::Option, height: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Image { + fn default() -> &'a Image { + ::default_instance() + } } impl Image { @@ -3662,6 +3722,13 @@ impl Image { // optional bytes file_id = 1; + + pub fn get_file_id(&self) -> &[u8] { + match self.file_id.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_file_id(&mut self) { self.file_id.clear(); } @@ -3689,15 +3756,12 @@ impl Image { self.file_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_file_id(&self) -> &[u8] { - match self.file_id.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional .Image.Size size = 2; + + pub fn get_size(&self) -> Image_Size { + self.size.unwrap_or(Image_Size::DEFAULT) + } pub fn clear_size(&mut self) { self.size = ::std::option::Option::None; } @@ -3711,12 +3775,12 @@ impl Image { self.size = ::std::option::Option::Some(v); } - pub fn get_size(&self) -> Image_Size { - self.size.unwrap_or(Image_Size::DEFAULT) - } - // optional sint32 width = 3; + + pub fn get_width(&self) -> i32 { + self.width.unwrap_or(0) + } pub fn clear_width(&mut self) { self.width = ::std::option::Option::None; } @@ -3730,12 +3794,12 @@ impl Image { self.width = ::std::option::Option::Some(v); } - pub fn get_width(&self) -> i32 { - self.width.unwrap_or(0) - } - // optional sint32 height = 4; + + pub fn get_height(&self) -> i32 { + self.height.unwrap_or(0) + } pub fn clear_height(&mut self) { self.height = ::std::option::Option::None; } @@ -3748,10 +3812,6 @@ impl Image { pub fn set_height(&mut self, v: i32) { self.height = ::std::option::Option::Some(v); } - - pub fn get_height(&self) -> i32 { - self.height.unwrap_or(0) - } } impl ::protobuf::Message for Image { @@ -3841,13 +3901,13 @@ impl ::protobuf::Message for Image { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3909,10 +3969,10 @@ impl ::protobuf::Message for Image { impl ::protobuf::Clear for Image { fn clear(&mut self) { - self.clear_file_id(); - self.clear_size(); - self.clear_width(); - self.clear_height(); + self.file_id.clear(); + self.size = ::std::option::Option::None; + self.width = ::std::option::Option::None; + self.height = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -3978,6 +4038,12 @@ impl ::protobuf::ProtobufEnum for Image_Size { impl ::std::marker::Copy for Image_Size { } +impl ::std::default::Default for Image_Size { + fn default() -> Self { + Image_Size::DEFAULT + } +} + impl ::protobuf::reflect::ProtobufValue for Image_Size { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -3989,8 +4055,14 @@ pub struct ImageGroup { // message fields image: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ImageGroup { + fn default() -> &'a ImageGroup { + ::default_instance() + } } impl ImageGroup { @@ -4000,6 +4072,10 @@ impl ImageGroup { // repeated .Image image = 1; + + pub fn get_image(&self) -> &[Image] { + &self.image + } pub fn clear_image(&mut self) { self.image.clear(); } @@ -4018,10 +4094,6 @@ impl ImageGroup { pub fn take_image(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.image, ::protobuf::RepeatedField::new()) } - - pub fn get_image(&self) -> &[Image] { - &self.image - } } impl ::protobuf::Message for ImageGroup { @@ -4084,13 +4156,13 @@ impl ::protobuf::Message for ImageGroup { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4137,7 +4209,7 @@ impl ::protobuf::Message for ImageGroup { impl ::protobuf::Clear for ImageGroup { fn clear(&mut self) { - self.clear_image(); + self.image.clear(); self.unknown_fields.clear(); } } @@ -4161,8 +4233,14 @@ pub struct Biography { portrait: ::protobuf::RepeatedField, portrait_group: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Biography { + fn default() -> &'a Biography { + ::default_instance() + } } impl Biography { @@ -4172,6 +4250,13 @@ impl Biography { // optional string text = 1; + + pub fn get_text(&self) -> &str { + match self.text.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_text(&mut self) { self.text.clear(); } @@ -4199,15 +4284,12 @@ impl Biography { self.text.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_text(&self) -> &str { - match self.text.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Image portrait = 2; + + pub fn get_portrait(&self) -> &[Image] { + &self.portrait + } pub fn clear_portrait(&mut self) { self.portrait.clear(); } @@ -4227,12 +4309,12 @@ impl Biography { ::std::mem::replace(&mut self.portrait, ::protobuf::RepeatedField::new()) } - pub fn get_portrait(&self) -> &[Image] { - &self.portrait - } - // repeated .ImageGroup portrait_group = 3; + + pub fn get_portrait_group(&self) -> &[ImageGroup] { + &self.portrait_group + } pub fn clear_portrait_group(&mut self) { self.portrait_group.clear(); } @@ -4251,10 +4333,6 @@ impl Biography { pub fn take_portrait_group(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.portrait_group, ::protobuf::RepeatedField::new()) } - - pub fn get_portrait_group(&self) -> &[ImageGroup] { - &self.portrait_group - } } impl ::protobuf::Message for Biography { @@ -4343,13 +4421,13 @@ impl ::protobuf::Message for Biography { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4406,9 +4484,9 @@ impl ::protobuf::Message for Biography { impl ::protobuf::Clear for Biography { fn clear(&mut self) { - self.clear_text(); - self.clear_portrait(); - self.clear_portrait_group(); + self.text.clear(); + self.portrait.clear(); + self.portrait_group.clear(); self.unknown_fields.clear(); } } @@ -4432,8 +4510,14 @@ pub struct Disc { name: ::protobuf::SingularField<::std::string::String>, track: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Disc { + fn default() -> &'a Disc { + ::default_instance() + } } impl Disc { @@ -4443,6 +4527,10 @@ impl Disc { // optional sint32 number = 1; + + pub fn get_number(&self) -> i32 { + self.number.unwrap_or(0) + } pub fn clear_number(&mut self) { self.number = ::std::option::Option::None; } @@ -4456,12 +4544,15 @@ impl Disc { self.number = ::std::option::Option::Some(v); } - pub fn get_number(&self) -> i32 { - self.number.unwrap_or(0) - } - // optional string name = 2; + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_name(&mut self) { self.name.clear(); } @@ -4489,15 +4580,12 @@ impl Disc { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_name(&self) -> &str { - match self.name.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Track track = 3; + + pub fn get_track(&self) -> &[Track] { + &self.track + } pub fn clear_track(&mut self) { self.track.clear(); } @@ -4516,10 +4604,6 @@ impl Disc { pub fn take_track(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.track, ::protobuf::RepeatedField::new()) } - - pub fn get_track(&self) -> &[Track] { - &self.track - } } impl ::protobuf::Message for Disc { @@ -4604,13 +4688,13 @@ impl ::protobuf::Message for Disc { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4667,9 +4751,9 @@ impl ::protobuf::Message for Disc { impl ::protobuf::Clear for Disc { fn clear(&mut self) { - self.clear_number(); - self.clear_name(); - self.clear_track(); + self.number = ::std::option::Option::None; + self.name.clear(); + self.track.clear(); self.unknown_fields.clear(); } } @@ -4692,8 +4776,14 @@ pub struct Copyright { typ: ::std::option::Option, text: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Copyright { + fn default() -> &'a Copyright { + ::default_instance() + } } impl Copyright { @@ -4703,6 +4793,10 @@ impl Copyright { // optional .Copyright.Type typ = 1; + + pub fn get_typ(&self) -> Copyright_Type { + self.typ.unwrap_or(Copyright_Type::P) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -4716,12 +4810,15 @@ impl Copyright { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> Copyright_Type { - self.typ.unwrap_or(Copyright_Type::P) - } - // optional string text = 2; + + pub fn get_text(&self) -> &str { + match self.text.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_text(&mut self) { self.text.clear(); } @@ -4748,13 +4845,6 @@ impl Copyright { pub fn take_text(&mut self) -> ::std::string::String { self.text.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_text(&self) -> &str { - match self.text.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for Copyright { @@ -4818,13 +4908,13 @@ impl ::protobuf::Message for Copyright { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4876,8 +4966,8 @@ impl ::protobuf::Message for Copyright { impl ::protobuf::Clear for Copyright { fn clear(&mut self) { - self.clear_typ(); - self.clear_text(); + self.typ = ::std::option::Option::None; + self.text.clear(); self.unknown_fields.clear(); } } @@ -4937,6 +5027,12 @@ impl ::protobuf::ProtobufEnum for Copyright_Type { impl ::std::marker::Copy for Copyright_Type { } +impl ::std::default::Default for Copyright_Type { + fn default() -> Self { + Copyright_Type::P + } +} + impl ::protobuf::reflect::ProtobufValue for Copyright_Type { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4951,8 +5047,14 @@ pub struct Restriction { typ: ::std::option::Option, catalogue_str: ::protobuf::RepeatedField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Restriction { + fn default() -> &'a Restriction { + ::default_instance() + } } impl Restriction { @@ -4962,6 +5064,13 @@ impl Restriction { // optional string countries_allowed = 2; + + pub fn get_countries_allowed(&self) -> &str { + match self.countries_allowed.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_countries_allowed(&mut self) { self.countries_allowed.clear(); } @@ -4989,15 +5098,15 @@ impl Restriction { self.countries_allowed.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_countries_allowed(&self) -> &str { - match self.countries_allowed.as_ref() { + // optional string countries_forbidden = 3; + + + pub fn get_countries_forbidden(&self) -> &str { + match self.countries_forbidden.as_ref() { Some(v) => &v, None => "", } } - - // optional string countries_forbidden = 3; - pub fn clear_countries_forbidden(&mut self) { self.countries_forbidden.clear(); } @@ -5025,15 +5134,12 @@ impl Restriction { self.countries_forbidden.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_countries_forbidden(&self) -> &str { - match self.countries_forbidden.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .Restriction.Type typ = 4; + + pub fn get_typ(&self) -> Restriction_Type { + self.typ.unwrap_or(Restriction_Type::STREAMING) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -5047,12 +5153,12 @@ impl Restriction { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> Restriction_Type { - self.typ.unwrap_or(Restriction_Type::STREAMING) - } - // repeated string catalogue_str = 5; + + pub fn get_catalogue_str(&self) -> &[::std::string::String] { + &self.catalogue_str + } pub fn clear_catalogue_str(&mut self) { self.catalogue_str.clear(); } @@ -5071,10 +5177,6 @@ impl Restriction { pub fn take_catalogue_str(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { ::std::mem::replace(&mut self.catalogue_str, ::protobuf::RepeatedField::new()) } - - pub fn get_catalogue_str(&self) -> &[::std::string::String] { - &self.catalogue_str - } } impl ::protobuf::Message for Restriction { @@ -5156,13 +5258,13 @@ impl ::protobuf::Message for Restriction { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5224,10 +5326,10 @@ impl ::protobuf::Message for Restriction { impl ::protobuf::Clear for Restriction { fn clear(&mut self) { - self.clear_countries_allowed(); - self.clear_countries_forbidden(); - self.clear_typ(); - self.clear_catalogue_str(); + self.countries_allowed.clear(); + self.countries_forbidden.clear(); + self.typ = ::std::option::Option::None; + self.catalogue_str.clear(); self.unknown_fields.clear(); } } @@ -5284,6 +5386,12 @@ impl ::protobuf::ProtobufEnum for Restriction_Type { impl ::std::marker::Copy for Restriction_Type { } +impl ::std::default::Default for Restriction_Type { + fn default() -> Self { + Restriction_Type::STREAMING + } +} + impl ::protobuf::reflect::ProtobufValue for Restriction_Type { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -5297,8 +5405,14 @@ pub struct SalePeriod { start: ::protobuf::SingularPtrField, end: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SalePeriod { + fn default() -> &'a SalePeriod { + ::default_instance() + } } impl SalePeriod { @@ -5308,6 +5422,10 @@ impl SalePeriod { // repeated .Restriction restriction = 1; + + pub fn get_restriction(&self) -> &[Restriction] { + &self.restriction + } pub fn clear_restriction(&mut self) { self.restriction.clear(); } @@ -5327,12 +5445,12 @@ impl SalePeriod { ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new()) } - pub fn get_restriction(&self) -> &[Restriction] { - &self.restriction - } - // optional .Date start = 2; + + pub fn get_start(&self) -> &Date { + self.start.as_ref().unwrap_or_else(|| Date::default_instance()) + } pub fn clear_start(&mut self) { self.start.clear(); } @@ -5360,12 +5478,12 @@ impl SalePeriod { self.start.take().unwrap_or_else(|| Date::new()) } - pub fn get_start(&self) -> &Date { - self.start.as_ref().unwrap_or_else(|| Date::default_instance()) - } - // optional .Date end = 3; + + pub fn get_end(&self) -> &Date { + self.end.as_ref().unwrap_or_else(|| Date::default_instance()) + } pub fn clear_end(&mut self) { self.end.clear(); } @@ -5392,10 +5510,6 @@ impl SalePeriod { pub fn take_end(&mut self) -> Date { self.end.take().unwrap_or_else(|| Date::new()) } - - pub fn get_end(&self) -> &Date { - self.end.as_ref().unwrap_or_else(|| Date::default_instance()) - } } impl ::protobuf::Message for SalePeriod { @@ -5492,13 +5606,13 @@ impl ::protobuf::Message for SalePeriod { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5555,9 +5669,9 @@ impl ::protobuf::Message for SalePeriod { impl ::protobuf::Clear for SalePeriod { fn clear(&mut self) { - self.clear_restriction(); - self.clear_start(); - self.clear_end(); + self.restriction.clear(); + self.start.clear(); + self.end.clear(); self.unknown_fields.clear(); } } @@ -5580,8 +5694,14 @@ pub struct ExternalId { typ: ::protobuf::SingularField<::std::string::String>, id: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ExternalId { + fn default() -> &'a ExternalId { + ::default_instance() + } } impl ExternalId { @@ -5591,6 +5711,13 @@ impl ExternalId { // optional string typ = 1; + + pub fn get_typ(&self) -> &str { + match self.typ.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_typ(&mut self) { self.typ.clear(); } @@ -5618,15 +5745,15 @@ impl ExternalId { self.typ.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_typ(&self) -> &str { - match self.typ.as_ref() { + // optional string id = 2; + + + pub fn get_id(&self) -> &str { + match self.id.as_ref() { Some(v) => &v, None => "", } } - - // optional string id = 2; - pub fn clear_id(&mut self) { self.id.clear(); } @@ -5653,13 +5780,6 @@ impl ExternalId { pub fn take_id(&mut self) -> ::std::string::String { self.id.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_id(&self) -> &str { - match self.id.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for ExternalId { @@ -5723,13 +5843,13 @@ impl ::protobuf::Message for ExternalId { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5781,8 +5901,8 @@ impl ::protobuf::Message for ExternalId { impl ::protobuf::Clear for ExternalId { fn clear(&mut self) { - self.clear_typ(); - self.clear_id(); + self.typ.clear(); + self.id.clear(); self.unknown_fields.clear(); } } @@ -5805,8 +5925,14 @@ pub struct AudioFile { file_id: ::protobuf::SingularField<::std::vec::Vec>, format: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AudioFile { + fn default() -> &'a AudioFile { + ::default_instance() + } } impl AudioFile { @@ -5816,6 +5942,13 @@ impl AudioFile { // optional bytes file_id = 1; + + pub fn get_file_id(&self) -> &[u8] { + match self.file_id.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_file_id(&mut self) { self.file_id.clear(); } @@ -5843,15 +5976,12 @@ impl AudioFile { self.file_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_file_id(&self) -> &[u8] { - match self.file_id.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional .AudioFile.Format format = 2; + + pub fn get_format(&self) -> AudioFile_Format { + self.format.unwrap_or(AudioFile_Format::OGG_VORBIS_96) + } pub fn clear_format(&mut self) { self.format = ::std::option::Option::None; } @@ -5864,10 +5994,6 @@ impl AudioFile { pub fn set_format(&mut self, v: AudioFile_Format) { self.format = ::std::option::Option::Some(v); } - - pub fn get_format(&self) -> AudioFile_Format { - self.format.unwrap_or(AudioFile_Format::OGG_VORBIS_96) - } } impl ::protobuf::Message for AudioFile { @@ -5931,13 +6057,13 @@ impl ::protobuf::Message for AudioFile { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5989,8 +6115,8 @@ impl ::protobuf::Message for AudioFile { impl ::protobuf::Clear for AudioFile { fn clear(&mut self) { - self.clear_file_id(); - self.clear_format(); + self.file_id.clear(); + self.format = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -6086,6 +6212,12 @@ impl ::protobuf::ProtobufEnum for AudioFile_Format { impl ::std::marker::Copy for AudioFile_Format { } +impl ::std::default::Default for AudioFile_Format { + fn default() -> Self { + AudioFile_Format::OGG_VORBIS_96 + } +} + impl ::protobuf::reflect::ProtobufValue for AudioFile_Format { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6093,92 +6225,83 @@ impl ::protobuf::reflect::ProtobufValue for AudioFile_Format { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0emetadata.proto\x12\0\";\n\tTopTracks\x12\x13\n\x07country\x18\x01\ - \x20\x01(\tB\x02\x18\0\x12\x19\n\x05track\x18\x02\x20\x03(\x0b2\x06.Trac\ - kB\x02\x18\0\"R\n\x0eActivityPeriod\x12\x16\n\nstart_year\x18\x01\x20\ - \x01(\x11B\x02\x18\0\x12\x14\n\x08end_year\x18\x02\x20\x01(\x11B\x02\x18\ - \0\x12\x12\n\x06decade\x18\x03\x20\x01(\x11B\x02\x18\0\"\xc5\x04\n\x06Ar\ - tist\x12\x0f\n\x03gid\x18\x01\x20\x01(\x0cB\x02\x18\0\x12\x10\n\x04name\ - \x18\x02\x20\x01(\tB\x02\x18\0\x12\x16\n\npopularity\x18\x03\x20\x01(\ - \x11B\x02\x18\0\x12!\n\ttop_track\x18\x04\x20\x03(\x0b2\n.TopTracksB\x02\ - \x18\0\x12$\n\x0balbum_group\x18\x05\x20\x03(\x0b2\x0b.AlbumGroupB\x02\ - \x18\0\x12%\n\x0csingle_group\x18\x06\x20\x03(\x0b2\x0b.AlbumGroupB\x02\ - \x18\0\x12*\n\x11compilation_group\x18\x07\x20\x03(\x0b2\x0b.AlbumGroupB\ - \x02\x18\0\x12)\n\x10appears_on_group\x18\x08\x20\x03(\x0b2\x0b.AlbumGro\ - upB\x02\x18\0\x12\x11\n\x05genre\x18\t\x20\x03(\tB\x02\x18\0\x12$\n\x0be\ - xternal_id\x18\n\x20\x03(\x0b2\x0b.ExternalIdB\x02\x18\0\x12\x1c\n\x08po\ - rtrait\x18\x0b\x20\x03(\x0b2\x06.ImageB\x02\x18\0\x12!\n\tbiography\x18\ - \x0c\x20\x03(\x0b2\n.BiographyB\x02\x18\0\x12,\n\x0factivity_period\x18\ - \r\x20\x03(\x0b2\x0f.ActivityPeriodB\x02\x18\0\x12%\n\x0brestriction\x18\ - \x0e\x20\x03(\x0b2\x0c.RestrictionB\x02\x18\0\x12\x1c\n\x07related\x18\ - \x0f\x20\x03(\x0b2\x07.ArtistB\x02\x18\0\x12#\n\x17is_portrait_album_cov\ - er\x18\x10\x20\x01(\x08B\x02\x18\0\x12'\n\x0eportrait_group\x18\x11\x20\ - \x01(\x0b2\x0b.ImageGroupB\x02\x18\0\"'\n\nAlbumGroup\x12\x19\n\x05album\ - \x18\x01\x20\x03(\x0b2\x06.AlbumB\x02\x18\0\"<\n\x04Date\x12\x10\n\x04ye\ - ar\x18\x01\x20\x01(\x11B\x02\x18\0\x12\x11\n\x05month\x18\x02\x20\x01(\ - \x11B\x02\x18\0\x12\x0f\n\x03day\x18\x03\x20\x01(\x11B\x02\x18\0\"\x99\ - \x04\n\x05Album\x12\x0f\n\x03gid\x18\x01\x20\x01(\x0cB\x02\x18\0\x12\x10\ - \n\x04name\x18\x02\x20\x01(\tB\x02\x18\0\x12\x1b\n\x06artist\x18\x03\x20\ - \x03(\x0b2\x07.ArtistB\x02\x18\0\x12\x1c\n\x03typ\x18\x04\x20\x01(\x0e2\ - \x0b.Album.TypeB\x02\x18\0\x12\x11\n\x05label\x18\x05\x20\x01(\tB\x02\ - \x18\0\x12\x17\n\x04date\x18\x06\x20\x01(\x0b2\x05.DateB\x02\x18\0\x12\ - \x16\n\npopularity\x18\x07\x20\x01(\x11B\x02\x18\0\x12\x11\n\x05genre\ - \x18\x08\x20\x03(\tB\x02\x18\0\x12\x19\n\x05cover\x18\t\x20\x03(\x0b2\ - \x06.ImageB\x02\x18\0\x12$\n\x0bexternal_id\x18\n\x20\x03(\x0b2\x0b.Exte\ - rnalIdB\x02\x18\0\x12\x17\n\x04disc\x18\x0b\x20\x03(\x0b2\x05.DiscB\x02\ - \x18\0\x12\x12\n\x06review\x18\x0c\x20\x03(\tB\x02\x18\0\x12!\n\tcopyrig\ - ht\x18\r\x20\x03(\x0b2\n.CopyrightB\x02\x18\0\x12%\n\x0brestriction\x18\ - \x0e\x20\x03(\x0b2\x0c.RestrictionB\x02\x18\0\x12\x1b\n\x07related\x18\ - \x0f\x20\x03(\x0b2\x06.AlbumB\x02\x18\0\x12$\n\x0bsale_period\x18\x10\ - \x20\x03(\x0b2\x0b.SalePeriodB\x02\x18\0\x12$\n\x0bcover_group\x18\x11\ - \x20\x01(\x0b2\x0b.ImageGroupB\x02\x18\0\":\n\x04Type\x12\t\n\x05ALBUM\ - \x10\x01\x12\n\n\x06SINGLE\x10\x02\x12\x0f\n\x0bCOMPILATION\x10\x03\x12\ - \x06\n\x02EP\x10\x04\x1a\x02\x10\0\"\xa6\x03\n\x05Track\x12\x0f\n\x03gid\ - \x18\x01\x20\x01(\x0cB\x02\x18\0\x12\x10\n\x04name\x18\x02\x20\x01(\tB\ - \x02\x18\0\x12\x19\n\x05album\x18\x03\x20\x01(\x0b2\x06.AlbumB\x02\x18\0\ - \x12\x1b\n\x06artist\x18\x04\x20\x03(\x0b2\x07.ArtistB\x02\x18\0\x12\x12\ - \n\x06number\x18\x05\x20\x01(\x11B\x02\x18\0\x12\x17\n\x0bdisc_number\ - \x18\x06\x20\x01(\x11B\x02\x18\0\x12\x14\n\x08duration\x18\x07\x20\x01(\ - \x11B\x02\x18\0\x12\x16\n\npopularity\x18\x08\x20\x01(\x11B\x02\x18\0\ - \x12\x14\n\x08explicit\x18\t\x20\x01(\x08B\x02\x18\0\x12$\n\x0bexternal_\ - id\x18\n\x20\x03(\x0b2\x0b.ExternalIdB\x02\x18\0\x12%\n\x0brestriction\ - \x18\x0b\x20\x03(\x0b2\x0c.RestrictionB\x02\x18\0\x12\x1c\n\x04file\x18\ - \x0c\x20\x03(\x0b2\n.AudioFileB\x02\x18\0\x12\x1f\n\x0balternative\x18\r\ - \x20\x03(\x0b2\x06.TrackB\x02\x18\0\x12$\n\x0bsale_period\x18\x0e\x20\ - \x03(\x0b2\x0b.SalePeriodB\x02\x18\0\x12\x1f\n\x07preview\x18\x0f\x20\ - \x03(\x0b2\n.AudioFileB\x02\x18\0\"\x9d\x01\n\x05Image\x12\x13\n\x07file\ - _id\x18\x01\x20\x01(\x0cB\x02\x18\0\x12\x1d\n\x04size\x18\x02\x20\x01(\ - \x0e2\x0b.Image.SizeB\x02\x18\0\x12\x11\n\x05width\x18\x03\x20\x01(\x11B\ - \x02\x18\0\x12\x12\n\x06height\x18\x04\x20\x01(\x11B\x02\x18\0\"9\n\x04S\ - ize\x12\x0b\n\x07DEFAULT\x10\0\x12\t\n\x05SMALL\x10\x01\x12\t\n\x05LARGE\ - \x10\x02\x12\n\n\x06XLARGE\x10\x03\x1a\x02\x10\0\"'\n\nImageGroup\x12\ - \x19\n\x05image\x18\x01\x20\x03(\x0b2\x06.ImageB\x02\x18\0\"d\n\tBiograp\ - hy\x12\x10\n\x04text\x18\x01\x20\x01(\tB\x02\x18\0\x12\x1c\n\x08portrait\ - \x18\x02\x20\x03(\x0b2\x06.ImageB\x02\x18\0\x12'\n\x0eportrait_group\x18\ - \x03\x20\x03(\x0b2\x0b.ImageGroupB\x02\x18\0\"G\n\x04Disc\x12\x12\n\x06n\ - umber\x18\x01\x20\x01(\x11B\x02\x18\0\x12\x10\n\x04name\x18\x02\x20\x01(\ - \tB\x02\x18\0\x12\x19\n\x05track\x18\x03\x20\x03(\x0b2\x06.TrackB\x02\ - \x18\0\"Y\n\tCopyright\x12\x20\n\x03typ\x18\x01\x20\x01(\x0e2\x0f.Copyri\ - ght.TypeB\x02\x18\0\x12\x10\n\x04text\x18\x02\x20\x01(\tB\x02\x18\0\"\ - \x18\n\x04Type\x12\x05\n\x01P\x10\0\x12\x05\n\x01C\x10\x01\x1a\x02\x10\0\ - \"\xa7\x01\n\x0bRestriction\x12\x1d\n\x11countries_allowed\x18\x02\x20\ - \x01(\tB\x02\x18\0\x12\x1f\n\x13countries_forbidden\x18\x03\x20\x01(\tB\ - \x02\x18\0\x12\"\n\x03typ\x18\x04\x20\x01(\x0e2\x11.Restriction.TypeB\ - \x02\x18\0\x12\x19\n\rcatalogue_str\x18\x05\x20\x03(\tB\x02\x18\0\"\x19\ - \n\x04Type\x12\r\n\tSTREAMING\x10\0\x1a\x02\x10\0\"e\n\nSalePeriod\x12%\ - \n\x0brestriction\x18\x01\x20\x03(\x0b2\x0c.RestrictionB\x02\x18\0\x12\ - \x18\n\x05start\x18\x02\x20\x01(\x0b2\x05.DateB\x02\x18\0\x12\x16\n\x03e\ - nd\x18\x03\x20\x01(\x0b2\x05.DateB\x02\x18\0\"-\n\nExternalId\x12\x0f\n\ - \x03typ\x18\x01\x20\x01(\tB\x02\x18\0\x12\x0e\n\x02id\x18\x02\x20\x01(\t\ - B\x02\x18\0\"\x9f\x02\n\tAudioFile\x12\x13\n\x07file_id\x18\x01\x20\x01(\ - \x0cB\x02\x18\0\x12%\n\x06format\x18\x02\x20\x01(\x0e2\x11.AudioFile.For\ - matB\x02\x18\0\"\xd5\x01\n\x06Format\x12\x11\n\rOGG_VORBIS_96\x10\0\x12\ - \x12\n\x0eOGG_VORBIS_160\x10\x01\x12\x12\n\x0eOGG_VORBIS_320\x10\x02\x12\ - \x0b\n\x07MP3_256\x10\x03\x12\x0b\n\x07MP3_320\x10\x04\x12\x0b\n\x07MP3_\ - 160\x10\x05\x12\n\n\x06MP3_96\x10\x06\x12\x0f\n\x0bMP3_160_ENC\x10\x07\ - \x12\n\n\x06OTHER2\x10\x08\x12\n\n\x06OTHER3\x10\t\x12\x0b\n\x07AAC_160\ - \x10\n\x12\x0b\n\x07AAC_320\x10\x0b\x12\n\n\x06OTHER4\x10\x0c\x12\n\n\ - \x06OTHER5\x10\r\x1a\x02\x10\0B\0b\x06proto2\ + \n\x0emetadata.proto\x12\0\"9\n\tTopTracks\x12\x11\n\x07country\x18\x01\ + \x20\x01(\tB\0\x12\x17\n\x05track\x18\x02\x20\x03(\x0b2\x06.TrackB\0:\0\ + \"N\n\x0eActivityPeriod\x12\x14\n\nstart_year\x18\x01\x20\x01(\x11B\0\ + \x12\x12\n\x08end_year\x18\x02\x20\x01(\x11B\0\x12\x10\n\x06decade\x18\ + \x03\x20\x01(\x11B\0:\0\"\xa5\x04\n\x06Artist\x12\r\n\x03gid\x18\x01\x20\ + \x01(\x0cB\0\x12\x0e\n\x04name\x18\x02\x20\x01(\tB\0\x12\x14\n\npopulari\ + ty\x18\x03\x20\x01(\x11B\0\x12\x1f\n\ttop_track\x18\x04\x20\x03(\x0b2\n.\ + TopTracksB\0\x12\"\n\x0balbum_group\x18\x05\x20\x03(\x0b2\x0b.AlbumGroup\ + B\0\x12#\n\x0csingle_group\x18\x06\x20\x03(\x0b2\x0b.AlbumGroupB\0\x12(\ + \n\x11compilation_group\x18\x07\x20\x03(\x0b2\x0b.AlbumGroupB\0\x12'\n\ + \x10appears_on_group\x18\x08\x20\x03(\x0b2\x0b.AlbumGroupB\0\x12\x0f\n\ + \x05genre\x18\t\x20\x03(\tB\0\x12\"\n\x0bexternal_id\x18\n\x20\x03(\x0b2\ + \x0b.ExternalIdB\0\x12\x1a\n\x08portrait\x18\x0b\x20\x03(\x0b2\x06.Image\ + B\0\x12\x1f\n\tbiography\x18\x0c\x20\x03(\x0b2\n.BiographyB\0\x12*\n\x0f\ + activity_period\x18\r\x20\x03(\x0b2\x0f.ActivityPeriodB\0\x12#\n\x0brest\ + riction\x18\x0e\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x1a\n\x07related\ + \x18\x0f\x20\x03(\x0b2\x07.ArtistB\0\x12!\n\x17is_portrait_album_cover\ + \x18\x10\x20\x01(\x08B\0\x12%\n\x0eportrait_group\x18\x11\x20\x01(\x0b2\ + \x0b.ImageGroupB\0:\0\"'\n\nAlbumGroup\x12\x17\n\x05album\x18\x01\x20\ + \x03(\x0b2\x06.AlbumB\0:\0\"8\n\x04Date\x12\x0e\n\x04year\x18\x01\x20\ + \x01(\x11B\0\x12\x0f\n\x05month\x18\x02\x20\x01(\x11B\0\x12\r\n\x03day\ + \x18\x03\x20\x01(\x11B\0:\0\"\xf7\x03\n\x05Album\x12\r\n\x03gid\x18\x01\ + \x20\x01(\x0cB\0\x12\x0e\n\x04name\x18\x02\x20\x01(\tB\0\x12\x19\n\x06ar\ + tist\x18\x03\x20\x03(\x0b2\x07.ArtistB\0\x12\x1a\n\x03typ\x18\x04\x20\ + \x01(\x0e2\x0b.Album.TypeB\0\x12\x0f\n\x05label\x18\x05\x20\x01(\tB\0\ + \x12\x15\n\x04date\x18\x06\x20\x01(\x0b2\x05.DateB\0\x12\x14\n\npopulari\ + ty\x18\x07\x20\x01(\x11B\0\x12\x0f\n\x05genre\x18\x08\x20\x03(\tB\0\x12\ + \x17\n\x05cover\x18\t\x20\x03(\x0b2\x06.ImageB\0\x12\"\n\x0bexternal_id\ + \x18\n\x20\x03(\x0b2\x0b.ExternalIdB\0\x12\x15\n\x04disc\x18\x0b\x20\x03\ + (\x0b2\x05.DiscB\0\x12\x10\n\x06review\x18\x0c\x20\x03(\tB\0\x12\x1f\n\t\ + copyright\x18\r\x20\x03(\x0b2\n.CopyrightB\0\x12#\n\x0brestriction\x18\ + \x0e\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x19\n\x07related\x18\x0f\x20\ + \x03(\x0b2\x06.AlbumB\0\x12\"\n\x0bsale_period\x18\x10\x20\x03(\x0b2\x0b\ + .SalePeriodB\0\x12\"\n\x0bcover_group\x18\x11\x20\x01(\x0b2\x0b.ImageGro\ + upB\0\"8\n\x04Type\x12\t\n\x05ALBUM\x10\x01\x12\n\n\x06SINGLE\x10\x02\ + \x12\x0f\n\x0bCOMPILATION\x10\x03\x12\x06\n\x02EP\x10\x04\x1a\0:\0\"\x8a\ + \x03\n\x05Track\x12\r\n\x03gid\x18\x01\x20\x01(\x0cB\0\x12\x0e\n\x04name\ + \x18\x02\x20\x01(\tB\0\x12\x17\n\x05album\x18\x03\x20\x01(\x0b2\x06.Albu\ + mB\0\x12\x19\n\x06artist\x18\x04\x20\x03(\x0b2\x07.ArtistB\0\x12\x10\n\ + \x06number\x18\x05\x20\x01(\x11B\0\x12\x15\n\x0bdisc_number\x18\x06\x20\ + \x01(\x11B\0\x12\x12\n\x08duration\x18\x07\x20\x01(\x11B\0\x12\x14\n\npo\ + pularity\x18\x08\x20\x01(\x11B\0\x12\x12\n\x08explicit\x18\t\x20\x01(\ + \x08B\0\x12\"\n\x0bexternal_id\x18\n\x20\x03(\x0b2\x0b.ExternalIdB\0\x12\ + #\n\x0brestriction\x18\x0b\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x1a\n\ + \x04file\x18\x0c\x20\x03(\x0b2\n.AudioFileB\0\x12\x1d\n\x0balternative\ + \x18\r\x20\x03(\x0b2\x06.TrackB\0\x12\"\n\x0bsale_period\x18\x0e\x20\x03\ + (\x0b2\x0b.SalePeriodB\0\x12\x1d\n\x07preview\x18\x0f\x20\x03(\x0b2\n.Au\ + dioFileB\0:\0\"\x95\x01\n\x05Image\x12\x11\n\x07file_id\x18\x01\x20\x01(\ + \x0cB\0\x12\x1b\n\x04size\x18\x02\x20\x01(\x0e2\x0b.Image.SizeB\0\x12\ + \x0f\n\x05width\x18\x03\x20\x01(\x11B\0\x12\x10\n\x06height\x18\x04\x20\ + \x01(\x11B\0\"7\n\x04Size\x12\x0b\n\x07DEFAULT\x10\0\x12\t\n\x05SMALL\ + \x10\x01\x12\t\n\x05LARGE\x10\x02\x12\n\n\x06XLARGE\x10\x03\x1a\0:\0\"'\ + \n\nImageGroup\x12\x17\n\x05image\x18\x01\x20\x03(\x0b2\x06.ImageB\0:\0\ + \"`\n\tBiography\x12\x0e\n\x04text\x18\x01\x20\x01(\tB\0\x12\x1a\n\x08po\ + rtrait\x18\x02\x20\x03(\x0b2\x06.ImageB\0\x12%\n\x0eportrait_group\x18\ + \x03\x20\x03(\x0b2\x0b.ImageGroupB\0:\0\"C\n\x04Disc\x12\x10\n\x06number\ + \x18\x01\x20\x01(\x11B\0\x12\x0e\n\x04name\x18\x02\x20\x01(\tB\0\x12\x17\ + \n\x05track\x18\x03\x20\x03(\x0b2\x06.TrackB\0:\0\"U\n\tCopyright\x12\ + \x1e\n\x03typ\x18\x01\x20\x01(\x0e2\x0f.Copyright.TypeB\0\x12\x0e\n\x04t\ + ext\x18\x02\x20\x01(\tB\0\"\x16\n\x04Type\x12\x05\n\x01P\x10\0\x12\x05\n\ + \x01C\x10\x01\x1a\0:\0\"\x9f\x01\n\x0bRestriction\x12\x1b\n\x11countries\ + _allowed\x18\x02\x20\x01(\tB\0\x12\x1d\n\x13countries_forbidden\x18\x03\ + \x20\x01(\tB\0\x12\x20\n\x03typ\x18\x04\x20\x01(\x0e2\x11.Restriction.Ty\ + peB\0\x12\x17\n\rcatalogue_str\x18\x05\x20\x03(\tB\0\"\x17\n\x04Type\x12\ + \r\n\tSTREAMING\x10\0\x1a\0:\0\"a\n\nSalePeriod\x12#\n\x0brestriction\ + \x18\x01\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x16\n\x05start\x18\x02\x20\ + \x01(\x0b2\x05.DateB\0\x12\x14\n\x03end\x18\x03\x20\x01(\x0b2\x05.DateB\ + \0:\0\"+\n\nExternalId\x12\r\n\x03typ\x18\x01\x20\x01(\tB\0\x12\x0c\n\ + \x02id\x18\x02\x20\x01(\tB\0:\0\"\x9b\x02\n\tAudioFile\x12\x11\n\x07file\ + _id\x18\x01\x20\x01(\x0cB\0\x12#\n\x06format\x18\x02\x20\x01(\x0e2\x11.A\ + udioFile.FormatB\0\"\xd3\x01\n\x06Format\x12\x11\n\rOGG_VORBIS_96\x10\0\ + \x12\x12\n\x0eOGG_VORBIS_160\x10\x01\x12\x12\n\x0eOGG_VORBIS_320\x10\x02\ + \x12\x0b\n\x07MP3_256\x10\x03\x12\x0b\n\x07MP3_320\x10\x04\x12\x0b\n\x07\ + MP3_160\x10\x05\x12\n\n\x06MP3_96\x10\x06\x12\x0f\n\x0bMP3_160_ENC\x10\ + \x07\x12\n\n\x06OTHER2\x10\x08\x12\n\n\x06OTHER3\x10\t\x12\x0b\n\x07AAC_\ + 160\x10\n\x12\x0b\n\x07AAC_320\x10\x0b\x12\n\n\x06OTHER4\x10\x0c\x12\n\n\ + \x06OTHER5\x10\r\x1a\0:\0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/protocol/src/pubsub.rs b/protocol/src/pubsub.rs index caa4a26d..31871a2d 100644 --- a/protocol/src/pubsub.rs +++ b/protocol/src/pubsub.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.8.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,10 +17,15 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `pubsub.proto` use protobuf::Message as Message_imported_for_functions; use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_0; + #[derive(PartialEq,Clone,Default)] pub struct Subscription { // message fields @@ -28,8 +33,14 @@ pub struct Subscription { expiry: ::std::option::Option, status_code: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Subscription { + fn default() -> &'a Subscription { + ::default_instance() + } } impl Subscription { @@ -39,6 +50,13 @@ impl Subscription { // optional string uri = 1; + + pub fn get_uri(&self) -> &str { + match self.uri.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_uri(&mut self) { self.uri.clear(); } @@ -66,15 +84,12 @@ impl Subscription { self.uri.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_uri(&self) -> &str { - match self.uri.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional int32 expiry = 2; + + pub fn get_expiry(&self) -> i32 { + self.expiry.unwrap_or(0) + } pub fn clear_expiry(&mut self) { self.expiry = ::std::option::Option::None; } @@ -88,12 +103,12 @@ impl Subscription { self.expiry = ::std::option::Option::Some(v); } - pub fn get_expiry(&self) -> i32 { - self.expiry.unwrap_or(0) - } - // optional int32 status_code = 3; + + pub fn get_status_code(&self) -> i32 { + self.status_code.unwrap_or(0) + } pub fn clear_status_code(&mut self) { self.status_code = ::std::option::Option::None; } @@ -106,10 +121,6 @@ impl Subscription { pub fn set_status_code(&mut self, v: i32) { self.status_code = ::std::option::Option::Some(v); } - - pub fn get_status_code(&self) -> i32 { - self.status_code.unwrap_or(0) - } } impl ::protobuf::Message for Subscription { @@ -190,13 +201,13 @@ impl ::protobuf::Message for Subscription { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -253,9 +264,9 @@ impl ::protobuf::Message for Subscription { impl ::protobuf::Clear for Subscription { fn clear(&mut self) { - self.clear_uri(); - self.clear_expiry(); - self.clear_status_code(); + self.uri.clear(); + self.expiry = ::std::option::Option::None; + self.status_code = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -273,10 +284,9 @@ impl ::protobuf::reflect::ProtobufValue for Subscription { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0cpubsub.proto\x12\0\"L\n\x0cSubscription\x12\x0f\n\x03uri\x18\x01\ - \x20\x01(\tB\x02\x18\0\x12\x12\n\x06expiry\x18\x02\x20\x01(\x05B\x02\x18\ - \0\x12\x17\n\x0bstatus_code\x18\x03\x20\x01(\x05B\x02\x18\0B\0b\x06proto\ - 2\ + \n\x0cpubsub.proto\x12\0\"H\n\x0cSubscription\x12\r\n\x03uri\x18\x01\x20\ + \x01(\tB\0\x12\x10\n\x06expiry\x18\x02\x20\x01(\x05B\0\x12\x15\n\x0bstat\ + us_code\x18\x03\x20\x01(\x05B\0:\0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/protocol/src/spirc.rs b/protocol/src/spirc.rs index 0380169b..80b92d24 100644 --- a/protocol/src/spirc.rs +++ b/protocol/src/spirc.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.8.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,10 +17,15 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `spirc.proto` use protobuf::Message as Message_imported_for_functions; use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_0; + #[derive(PartialEq,Clone,Default)] pub struct Frame { // message fields @@ -40,8 +45,14 @@ pub struct Frame { new_name: ::protobuf::SingularField<::std::string::String>, metadata: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Frame { + fn default() -> &'a Frame { + ::default_instance() + } } impl Frame { @@ -51,6 +62,10 @@ impl Frame { // optional uint32 version = 1; + + pub fn get_version(&self) -> u32 { + self.version.unwrap_or(0) + } pub fn clear_version(&mut self) { self.version = ::std::option::Option::None; } @@ -64,12 +79,15 @@ impl Frame { self.version = ::std::option::Option::Some(v); } - pub fn get_version(&self) -> u32 { - self.version.unwrap_or(0) - } - // optional string ident = 2; + + pub fn get_ident(&self) -> &str { + match self.ident.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_ident(&mut self) { self.ident.clear(); } @@ -97,15 +115,15 @@ impl Frame { self.ident.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_ident(&self) -> &str { - match self.ident.as_ref() { + // optional string protocol_version = 3; + + + pub fn get_protocol_version(&self) -> &str { + match self.protocol_version.as_ref() { Some(v) => &v, None => "", } } - - // optional string protocol_version = 3; - pub fn clear_protocol_version(&mut self) { self.protocol_version.clear(); } @@ -133,15 +151,12 @@ impl Frame { self.protocol_version.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_protocol_version(&self) -> &str { - match self.protocol_version.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional uint32 seq_nr = 4; + + pub fn get_seq_nr(&self) -> u32 { + self.seq_nr.unwrap_or(0) + } pub fn clear_seq_nr(&mut self) { self.seq_nr = ::std::option::Option::None; } @@ -155,12 +170,12 @@ impl Frame { self.seq_nr = ::std::option::Option::Some(v); } - pub fn get_seq_nr(&self) -> u32 { - self.seq_nr.unwrap_or(0) - } - // optional .MessageType typ = 5; + + pub fn get_typ(&self) -> MessageType { + self.typ.unwrap_or(MessageType::kMessageTypeHello) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -174,12 +189,12 @@ impl Frame { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> MessageType { - self.typ.unwrap_or(MessageType::kMessageTypeHello) - } - // optional .DeviceState device_state = 7; + + pub fn get_device_state(&self) -> &DeviceState { + self.device_state.as_ref().unwrap_or_else(|| DeviceState::default_instance()) + } pub fn clear_device_state(&mut self) { self.device_state.clear(); } @@ -207,12 +222,12 @@ impl Frame { self.device_state.take().unwrap_or_else(|| DeviceState::new()) } - pub fn get_device_state(&self) -> &DeviceState { - self.device_state.as_ref().unwrap_or_else(|| DeviceState::default_instance()) - } - // optional .Goodbye goodbye = 11; + + pub fn get_goodbye(&self) -> &Goodbye { + self.goodbye.as_ref().unwrap_or_else(|| Goodbye::default_instance()) + } pub fn clear_goodbye(&mut self) { self.goodbye.clear(); } @@ -240,12 +255,12 @@ impl Frame { self.goodbye.take().unwrap_or_else(|| Goodbye::new()) } - pub fn get_goodbye(&self) -> &Goodbye { - self.goodbye.as_ref().unwrap_or_else(|| Goodbye::default_instance()) - } - // optional .State state = 12; + + pub fn get_state(&self) -> &State { + self.state.as_ref().unwrap_or_else(|| State::default_instance()) + } pub fn clear_state(&mut self) { self.state.clear(); } @@ -273,12 +288,12 @@ impl Frame { self.state.take().unwrap_or_else(|| State::new()) } - pub fn get_state(&self) -> &State { - self.state.as_ref().unwrap_or_else(|| State::default_instance()) - } - // optional uint32 position = 13; + + pub fn get_position(&self) -> u32 { + self.position.unwrap_or(0) + } pub fn clear_position(&mut self) { self.position = ::std::option::Option::None; } @@ -292,12 +307,12 @@ impl Frame { self.position = ::std::option::Option::Some(v); } - pub fn get_position(&self) -> u32 { - self.position.unwrap_or(0) - } - // optional uint32 volume = 14; + + pub fn get_volume(&self) -> u32 { + self.volume.unwrap_or(0) + } pub fn clear_volume(&mut self) { self.volume = ::std::option::Option::None; } @@ -311,12 +326,12 @@ impl Frame { self.volume = ::std::option::Option::Some(v); } - pub fn get_volume(&self) -> u32 { - self.volume.unwrap_or(0) - } - // optional int64 state_update_id = 17; + + pub fn get_state_update_id(&self) -> i64 { + self.state_update_id.unwrap_or(0) + } pub fn clear_state_update_id(&mut self) { self.state_update_id = ::std::option::Option::None; } @@ -330,12 +345,12 @@ impl Frame { self.state_update_id = ::std::option::Option::Some(v); } - pub fn get_state_update_id(&self) -> i64 { - self.state_update_id.unwrap_or(0) - } - // repeated string recipient = 18; + + pub fn get_recipient(&self) -> &[::std::string::String] { + &self.recipient + } pub fn clear_recipient(&mut self) { self.recipient.clear(); } @@ -355,12 +370,15 @@ impl Frame { ::std::mem::replace(&mut self.recipient, ::protobuf::RepeatedField::new()) } - pub fn get_recipient(&self) -> &[::std::string::String] { - &self.recipient - } - // optional bytes context_player_state = 19; + + pub fn get_context_player_state(&self) -> &[u8] { + match self.context_player_state.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_context_player_state(&mut self) { self.context_player_state.clear(); } @@ -388,15 +406,15 @@ impl Frame { self.context_player_state.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_context_player_state(&self) -> &[u8] { - match self.context_player_state.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string new_name = 20; + + pub fn get_new_name(&self) -> &str { + match self.new_name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_new_name(&mut self) { self.new_name.clear(); } @@ -424,15 +442,12 @@ impl Frame { self.new_name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_new_name(&self) -> &str { - match self.new_name.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .Metadata metadata = 25; + + pub fn get_metadata(&self) -> &Metadata { + self.metadata.as_ref().unwrap_or_else(|| Metadata::default_instance()) + } pub fn clear_metadata(&mut self) { self.metadata.clear(); } @@ -459,10 +474,6 @@ impl Frame { pub fn take_metadata(&mut self) -> Metadata { self.metadata.take().unwrap_or_else(|| Metadata::new()) } - - pub fn get_metadata(&self) -> &Metadata { - self.metadata.as_ref().unwrap_or_else(|| Metadata::default_instance()) - } } impl ::protobuf::Message for Frame { @@ -695,13 +706,13 @@ impl ::protobuf::Message for Frame { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -818,21 +829,21 @@ impl ::protobuf::Message for Frame { impl ::protobuf::Clear for Frame { fn clear(&mut self) { - self.clear_version(); - self.clear_ident(); - self.clear_protocol_version(); - self.clear_seq_nr(); - self.clear_typ(); - self.clear_device_state(); - self.clear_goodbye(); - self.clear_state(); - self.clear_position(); - self.clear_volume(); - self.clear_state_update_id(); - self.clear_recipient(); - self.clear_context_player_state(); - self.clear_new_name(); - self.clear_metadata(); + self.version = ::std::option::Option::None; + self.ident.clear(); + self.protocol_version.clear(); + self.seq_nr = ::std::option::Option::None; + self.typ = ::std::option::Option::None; + self.device_state.clear(); + self.goodbye.clear(); + self.state.clear(); + self.position = ::std::option::Option::None; + self.volume = ::std::option::Option::None; + self.state_update_id = ::std::option::Option::None; + self.recipient.clear(); + self.context_player_state.clear(); + self.new_name.clear(); + self.metadata.clear(); self.unknown_fields.clear(); } } @@ -864,8 +875,14 @@ pub struct DeviceState { context_player_error: ::protobuf::SingularField<::std::string::String>, metadata: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a DeviceState { + fn default() -> &'a DeviceState { + ::default_instance() + } } impl DeviceState { @@ -875,6 +892,13 @@ impl DeviceState { // optional string sw_version = 1; + + pub fn get_sw_version(&self) -> &str { + match self.sw_version.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_sw_version(&mut self) { self.sw_version.clear(); } @@ -902,15 +926,12 @@ impl DeviceState { self.sw_version.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_sw_version(&self) -> &str { - match self.sw_version.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bool is_active = 10; + + pub fn get_is_active(&self) -> bool { + self.is_active.unwrap_or(false) + } pub fn clear_is_active(&mut self) { self.is_active = ::std::option::Option::None; } @@ -924,12 +945,12 @@ impl DeviceState { self.is_active = ::std::option::Option::Some(v); } - pub fn get_is_active(&self) -> bool { - self.is_active.unwrap_or(false) - } - // optional bool can_play = 11; + + pub fn get_can_play(&self) -> bool { + self.can_play.unwrap_or(false) + } pub fn clear_can_play(&mut self) { self.can_play = ::std::option::Option::None; } @@ -943,12 +964,12 @@ impl DeviceState { self.can_play = ::std::option::Option::Some(v); } - pub fn get_can_play(&self) -> bool { - self.can_play.unwrap_or(false) - } - // optional uint32 volume = 12; + + pub fn get_volume(&self) -> u32 { + self.volume.unwrap_or(0) + } pub fn clear_volume(&mut self) { self.volume = ::std::option::Option::None; } @@ -962,12 +983,15 @@ impl DeviceState { self.volume = ::std::option::Option::Some(v); } - pub fn get_volume(&self) -> u32 { - self.volume.unwrap_or(0) - } - // optional string name = 13; + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_name(&mut self) { self.name.clear(); } @@ -995,15 +1019,12 @@ impl DeviceState { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_name(&self) -> &str { - match self.name.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional uint32 error_code = 14; + + pub fn get_error_code(&self) -> u32 { + self.error_code.unwrap_or(0) + } pub fn clear_error_code(&mut self) { self.error_code = ::std::option::Option::None; } @@ -1017,12 +1038,12 @@ impl DeviceState { self.error_code = ::std::option::Option::Some(v); } - pub fn get_error_code(&self) -> u32 { - self.error_code.unwrap_or(0) - } - // optional int64 became_active_at = 15; + + pub fn get_became_active_at(&self) -> i64 { + self.became_active_at.unwrap_or(0) + } pub fn clear_became_active_at(&mut self) { self.became_active_at = ::std::option::Option::None; } @@ -1036,12 +1057,15 @@ impl DeviceState { self.became_active_at = ::std::option::Option::Some(v); } - pub fn get_became_active_at(&self) -> i64 { - self.became_active_at.unwrap_or(0) - } - // optional string error_message = 16; + + pub fn get_error_message(&self) -> &str { + match self.error_message.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_error_message(&mut self) { self.error_message.clear(); } @@ -1069,15 +1093,12 @@ impl DeviceState { self.error_message.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_error_message(&self) -> &str { - match self.error_message.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Capability capabilities = 17; + + pub fn get_capabilities(&self) -> &[Capability] { + &self.capabilities + } pub fn clear_capabilities(&mut self) { self.capabilities.clear(); } @@ -1097,12 +1118,15 @@ impl DeviceState { ::std::mem::replace(&mut self.capabilities, ::protobuf::RepeatedField::new()) } - pub fn get_capabilities(&self) -> &[Capability] { - &self.capabilities - } - // optional string context_player_error = 20; + + pub fn get_context_player_error(&self) -> &str { + match self.context_player_error.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_context_player_error(&mut self) { self.context_player_error.clear(); } @@ -1130,15 +1154,12 @@ impl DeviceState { self.context_player_error.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_context_player_error(&self) -> &str { - match self.context_player_error.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Metadata metadata = 25; + + pub fn get_metadata(&self) -> &[Metadata] { + &self.metadata + } pub fn clear_metadata(&mut self) { self.metadata.clear(); } @@ -1157,10 +1178,6 @@ impl DeviceState { pub fn take_metadata(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.metadata, ::protobuf::RepeatedField::new()) } - - pub fn get_metadata(&self) -> &[Metadata] { - &self.metadata - } } impl ::protobuf::Message for DeviceState { @@ -1341,13 +1358,13 @@ impl ::protobuf::Message for DeviceState { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1444,17 +1461,17 @@ impl ::protobuf::Message for DeviceState { impl ::protobuf::Clear for DeviceState { fn clear(&mut self) { - self.clear_sw_version(); - self.clear_is_active(); - self.clear_can_play(); - self.clear_volume(); - self.clear_name(); - self.clear_error_code(); - self.clear_became_active_at(); - self.clear_error_message(); - self.clear_capabilities(); - self.clear_context_player_error(); - self.clear_metadata(); + self.sw_version.clear(); + self.is_active = ::std::option::Option::None; + self.can_play = ::std::option::Option::None; + self.volume = ::std::option::Option::None; + self.name.clear(); + self.error_code = ::std::option::Option::None; + self.became_active_at = ::std::option::Option::None; + self.error_message.clear(); + self.capabilities.clear(); + self.context_player_error.clear(); + self.metadata.clear(); self.unknown_fields.clear(); } } @@ -1478,8 +1495,14 @@ pub struct Capability { intValue: ::std::vec::Vec, stringValue: ::protobuf::RepeatedField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Capability { + fn default() -> &'a Capability { + ::default_instance() + } } impl Capability { @@ -1489,6 +1512,10 @@ impl Capability { // optional .CapabilityType typ = 1; + + pub fn get_typ(&self) -> CapabilityType { + self.typ.unwrap_or(CapabilityType::kSupportedContexts) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -1502,12 +1529,12 @@ impl Capability { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> CapabilityType { - self.typ.unwrap_or(CapabilityType::kSupportedContexts) - } - // repeated int64 intValue = 2; + + pub fn get_intValue(&self) -> &[i64] { + &self.intValue + } pub fn clear_intValue(&mut self) { self.intValue.clear(); } @@ -1527,12 +1554,12 @@ impl Capability { ::std::mem::replace(&mut self.intValue, ::std::vec::Vec::new()) } - pub fn get_intValue(&self) -> &[i64] { - &self.intValue - } - // repeated string stringValue = 3; + + pub fn get_stringValue(&self) -> &[::std::string::String] { + &self.stringValue + } pub fn clear_stringValue(&mut self) { self.stringValue.clear(); } @@ -1551,10 +1578,6 @@ impl Capability { pub fn take_stringValue(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { ::std::mem::replace(&mut self.stringValue, ::protobuf::RepeatedField::new()) } - - pub fn get_stringValue(&self) -> &[::std::string::String] { - &self.stringValue - } } impl ::protobuf::Message for Capability { @@ -1627,13 +1650,13 @@ impl ::protobuf::Message for Capability { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1690,9 +1713,9 @@ impl ::protobuf::Message for Capability { impl ::protobuf::Clear for Capability { fn clear(&mut self) { - self.clear_typ(); - self.clear_intValue(); - self.clear_stringValue(); + self.typ = ::std::option::Option::None; + self.intValue.clear(); + self.stringValue.clear(); self.unknown_fields.clear(); } } @@ -1714,8 +1737,14 @@ pub struct Goodbye { // message fields reason: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Goodbye { + fn default() -> &'a Goodbye { + ::default_instance() + } } impl Goodbye { @@ -1725,6 +1754,13 @@ impl Goodbye { // optional string reason = 1; + + pub fn get_reason(&self) -> &str { + match self.reason.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_reason(&mut self) { self.reason.clear(); } @@ -1751,13 +1787,6 @@ impl Goodbye { pub fn take_reason(&mut self) -> ::std::string::String { self.reason.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_reason(&self) -> &str { - match self.reason.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for Goodbye { @@ -1812,13 +1841,13 @@ impl ::protobuf::Message for Goodbye { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1865,7 +1894,7 @@ impl ::protobuf::Message for Goodbye { impl ::protobuf::Clear for Goodbye { fn clear(&mut self) { - self.clear_reason(); + self.reason.clear(); self.unknown_fields.clear(); } } @@ -1901,8 +1930,14 @@ pub struct State { track: ::protobuf::RepeatedField, ad: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a State { + fn default() -> &'a State { + ::default_instance() + } } impl State { @@ -1912,6 +1947,13 @@ impl State { // optional string context_uri = 2; + + pub fn get_context_uri(&self) -> &str { + match self.context_uri.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_context_uri(&mut self) { self.context_uri.clear(); } @@ -1939,15 +1981,12 @@ impl State { self.context_uri.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_context_uri(&self) -> &str { - match self.context_uri.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional uint32 index = 3; + + pub fn get_index(&self) -> u32 { + self.index.unwrap_or(0) + } pub fn clear_index(&mut self) { self.index = ::std::option::Option::None; } @@ -1961,12 +2000,12 @@ impl State { self.index = ::std::option::Option::Some(v); } - pub fn get_index(&self) -> u32 { - self.index.unwrap_or(0) - } - // optional uint32 position_ms = 4; + + pub fn get_position_ms(&self) -> u32 { + self.position_ms.unwrap_or(0) + } pub fn clear_position_ms(&mut self) { self.position_ms = ::std::option::Option::None; } @@ -1980,12 +2019,12 @@ impl State { self.position_ms = ::std::option::Option::Some(v); } - pub fn get_position_ms(&self) -> u32 { - self.position_ms.unwrap_or(0) - } - // optional .PlayStatus status = 5; + + pub fn get_status(&self) -> PlayStatus { + self.status.unwrap_or(PlayStatus::kPlayStatusStop) + } pub fn clear_status(&mut self) { self.status = ::std::option::Option::None; } @@ -1999,12 +2038,12 @@ impl State { self.status = ::std::option::Option::Some(v); } - pub fn get_status(&self) -> PlayStatus { - self.status.unwrap_or(PlayStatus::kPlayStatusStop) - } - // optional uint64 position_measured_at = 7; + + pub fn get_position_measured_at(&self) -> u64 { + self.position_measured_at.unwrap_or(0) + } pub fn clear_position_measured_at(&mut self) { self.position_measured_at = ::std::option::Option::None; } @@ -2018,12 +2057,15 @@ impl State { self.position_measured_at = ::std::option::Option::Some(v); } - pub fn get_position_measured_at(&self) -> u64 { - self.position_measured_at.unwrap_or(0) - } - // optional string context_description = 8; + + pub fn get_context_description(&self) -> &str { + match self.context_description.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_context_description(&mut self) { self.context_description.clear(); } @@ -2051,15 +2093,12 @@ impl State { self.context_description.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_context_description(&self) -> &str { - match self.context_description.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bool shuffle = 13; + + pub fn get_shuffle(&self) -> bool { + self.shuffle.unwrap_or(false) + } pub fn clear_shuffle(&mut self) { self.shuffle = ::std::option::Option::None; } @@ -2073,12 +2112,12 @@ impl State { self.shuffle = ::std::option::Option::Some(v); } - pub fn get_shuffle(&self) -> bool { - self.shuffle.unwrap_or(false) - } - // optional bool repeat = 14; + + pub fn get_repeat(&self) -> bool { + self.repeat.unwrap_or(false) + } pub fn clear_repeat(&mut self) { self.repeat = ::std::option::Option::None; } @@ -2092,12 +2131,15 @@ impl State { self.repeat = ::std::option::Option::Some(v); } - pub fn get_repeat(&self) -> bool { - self.repeat.unwrap_or(false) - } - // optional string last_command_ident = 20; + + pub fn get_last_command_ident(&self) -> &str { + match self.last_command_ident.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_last_command_ident(&mut self) { self.last_command_ident.clear(); } @@ -2125,15 +2167,12 @@ impl State { self.last_command_ident.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_last_command_ident(&self) -> &str { - match self.last_command_ident.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional uint32 last_command_msgid = 21; + + pub fn get_last_command_msgid(&self) -> u32 { + self.last_command_msgid.unwrap_or(0) + } pub fn clear_last_command_msgid(&mut self) { self.last_command_msgid = ::std::option::Option::None; } @@ -2147,12 +2186,12 @@ impl State { self.last_command_msgid = ::std::option::Option::Some(v); } - pub fn get_last_command_msgid(&self) -> u32 { - self.last_command_msgid.unwrap_or(0) - } - // optional bool playing_from_fallback = 24; + + pub fn get_playing_from_fallback(&self) -> bool { + self.playing_from_fallback.unwrap_or(false) + } pub fn clear_playing_from_fallback(&mut self) { self.playing_from_fallback = ::std::option::Option::None; } @@ -2166,12 +2205,12 @@ impl State { self.playing_from_fallback = ::std::option::Option::Some(v); } - pub fn get_playing_from_fallback(&self) -> bool { - self.playing_from_fallback.unwrap_or(false) - } - // optional uint32 row = 25; + + pub fn get_row(&self) -> u32 { + self.row.unwrap_or(0) + } pub fn clear_row(&mut self) { self.row = ::std::option::Option::None; } @@ -2185,12 +2224,12 @@ impl State { self.row = ::std::option::Option::Some(v); } - pub fn get_row(&self) -> u32 { - self.row.unwrap_or(0) - } - // optional uint32 playing_track_index = 26; + + pub fn get_playing_track_index(&self) -> u32 { + self.playing_track_index.unwrap_or(0) + } pub fn clear_playing_track_index(&mut self) { self.playing_track_index = ::std::option::Option::None; } @@ -2204,12 +2243,12 @@ impl State { self.playing_track_index = ::std::option::Option::Some(v); } - pub fn get_playing_track_index(&self) -> u32 { - self.playing_track_index.unwrap_or(0) - } - // repeated .TrackRef track = 27; + + pub fn get_track(&self) -> &[TrackRef] { + &self.track + } pub fn clear_track(&mut self) { self.track.clear(); } @@ -2229,12 +2268,12 @@ impl State { ::std::mem::replace(&mut self.track, ::protobuf::RepeatedField::new()) } - pub fn get_track(&self) -> &[TrackRef] { - &self.track - } - // optional .Ad ad = 28; + + pub fn get_ad(&self) -> &Ad { + self.ad.as_ref().unwrap_or_else(|| Ad::default_instance()) + } pub fn clear_ad(&mut self) { self.ad.clear(); } @@ -2261,10 +2300,6 @@ impl State { pub fn take_ad(&mut self) -> Ad { self.ad.take().unwrap_or_else(|| Ad::new()) } - - pub fn get_ad(&self) -> &Ad { - self.ad.as_ref().unwrap_or_else(|| Ad::default_instance()) - } } impl ::protobuf::Message for State { @@ -2497,13 +2532,13 @@ impl ::protobuf::Message for State { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2620,21 +2655,21 @@ impl ::protobuf::Message for State { impl ::protobuf::Clear for State { fn clear(&mut self) { - self.clear_context_uri(); - self.clear_index(); - self.clear_position_ms(); - self.clear_status(); - self.clear_position_measured_at(); - self.clear_context_description(); - self.clear_shuffle(); - self.clear_repeat(); - self.clear_last_command_ident(); - self.clear_last_command_msgid(); - self.clear_playing_from_fallback(); - self.clear_row(); - self.clear_playing_track_index(); - self.clear_track(); - self.clear_ad(); + self.context_uri.clear(); + self.index = ::std::option::Option::None; + self.position_ms = ::std::option::Option::None; + self.status = ::std::option::Option::None; + self.position_measured_at = ::std::option::Option::None; + self.context_description.clear(); + self.shuffle = ::std::option::Option::None; + self.repeat = ::std::option::Option::None; + self.last_command_ident.clear(); + self.last_command_msgid = ::std::option::Option::None; + self.playing_from_fallback = ::std::option::Option::None; + self.row = ::std::option::Option::None; + self.playing_track_index = ::std::option::Option::None; + self.track.clear(); + self.ad.clear(); self.unknown_fields.clear(); } } @@ -2659,8 +2694,14 @@ pub struct TrackRef { queued: ::std::option::Option, context: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a TrackRef { + fn default() -> &'a TrackRef { + ::default_instance() + } } impl TrackRef { @@ -2670,6 +2711,13 @@ impl TrackRef { // optional bytes gid = 1; + + pub fn get_gid(&self) -> &[u8] { + match self.gid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gid(&mut self) { self.gid.clear(); } @@ -2697,15 +2745,15 @@ impl TrackRef { self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gid(&self) -> &[u8] { - match self.gid.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string uri = 2; + + pub fn get_uri(&self) -> &str { + match self.uri.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_uri(&mut self) { self.uri.clear(); } @@ -2733,15 +2781,12 @@ impl TrackRef { self.uri.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_uri(&self) -> &str { - match self.uri.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bool queued = 3; + + pub fn get_queued(&self) -> bool { + self.queued.unwrap_or(false) + } pub fn clear_queued(&mut self) { self.queued = ::std::option::Option::None; } @@ -2755,12 +2800,15 @@ impl TrackRef { self.queued = ::std::option::Option::Some(v); } - pub fn get_queued(&self) -> bool { - self.queued.unwrap_or(false) - } - // optional string context = 4; + + pub fn get_context(&self) -> &str { + match self.context.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_context(&mut self) { self.context.clear(); } @@ -2787,13 +2835,6 @@ impl TrackRef { pub fn take_context(&mut self) -> ::std::string::String { self.context.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_context(&self) -> &str { - match self.context.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for TrackRef { @@ -2879,13 +2920,13 @@ impl ::protobuf::Message for TrackRef { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2947,10 +2988,10 @@ impl ::protobuf::Message for TrackRef { impl ::protobuf::Clear for TrackRef { fn clear(&mut self) { - self.clear_gid(); - self.clear_uri(); - self.clear_queued(); - self.clear_context(); + self.gid.clear(); + self.uri.clear(); + self.queued = ::std::option::Option::None; + self.context.clear(); self.unknown_fields.clear(); } } @@ -2980,8 +3021,14 @@ pub struct Ad { advertiser: ::protobuf::SingularField<::std::string::String>, gid: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Ad { + fn default() -> &'a Ad { + ::default_instance() + } } impl Ad { @@ -2991,6 +3038,10 @@ impl Ad { // optional int32 next = 1; + + pub fn get_next(&self) -> i32 { + self.next.unwrap_or(0) + } pub fn clear_next(&mut self) { self.next = ::std::option::Option::None; } @@ -3004,12 +3055,15 @@ impl Ad { self.next = ::std::option::Option::Some(v); } - pub fn get_next(&self) -> i32 { - self.next.unwrap_or(0) - } - // optional bytes ogg_fid = 2; + + pub fn get_ogg_fid(&self) -> &[u8] { + match self.ogg_fid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_ogg_fid(&mut self) { self.ogg_fid.clear(); } @@ -3037,15 +3091,15 @@ impl Ad { self.ogg_fid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_ogg_fid(&self) -> &[u8] { - match self.ogg_fid.as_ref() { + // optional bytes image_fid = 3; + + + pub fn get_image_fid(&self) -> &[u8] { + match self.image_fid.as_ref() { Some(v) => &v, None => &[], } } - - // optional bytes image_fid = 3; - pub fn clear_image_fid(&mut self) { self.image_fid.clear(); } @@ -3073,15 +3127,12 @@ impl Ad { self.image_fid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_image_fid(&self) -> &[u8] { - match self.image_fid.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional int32 duration = 4; + + pub fn get_duration(&self) -> i32 { + self.duration.unwrap_or(0) + } pub fn clear_duration(&mut self) { self.duration = ::std::option::Option::None; } @@ -3095,12 +3146,15 @@ impl Ad { self.duration = ::std::option::Option::Some(v); } - pub fn get_duration(&self) -> i32 { - self.duration.unwrap_or(0) - } - // optional string click_url = 5; + + pub fn get_click_url(&self) -> &str { + match self.click_url.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_click_url(&mut self) { self.click_url.clear(); } @@ -3128,15 +3182,15 @@ impl Ad { self.click_url.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_click_url(&self) -> &str { - match self.click_url.as_ref() { + // optional string impression_url = 6; + + + pub fn get_impression_url(&self) -> &str { + match self.impression_url.as_ref() { Some(v) => &v, None => "", } } - - // optional string impression_url = 6; - pub fn clear_impression_url(&mut self) { self.impression_url.clear(); } @@ -3164,15 +3218,15 @@ impl Ad { self.impression_url.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_impression_url(&self) -> &str { - match self.impression_url.as_ref() { + // optional string product = 7; + + + pub fn get_product(&self) -> &str { + match self.product.as_ref() { Some(v) => &v, None => "", } } - - // optional string product = 7; - pub fn clear_product(&mut self) { self.product.clear(); } @@ -3200,15 +3254,15 @@ impl Ad { self.product.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_product(&self) -> &str { - match self.product.as_ref() { + // optional string advertiser = 8; + + + pub fn get_advertiser(&self) -> &str { + match self.advertiser.as_ref() { Some(v) => &v, None => "", } } - - // optional string advertiser = 8; - pub fn clear_advertiser(&mut self) { self.advertiser.clear(); } @@ -3236,15 +3290,15 @@ impl Ad { self.advertiser.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_advertiser(&self) -> &str { - match self.advertiser.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bytes gid = 9; + + pub fn get_gid(&self) -> &[u8] { + match self.gid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gid(&mut self) { self.gid.clear(); } @@ -3271,13 +3325,6 @@ impl Ad { pub fn take_gid(&mut self) -> ::std::vec::Vec { self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_gid(&self) -> &[u8] { - match self.gid.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for Ad { @@ -3412,13 +3459,13 @@ impl ::protobuf::Message for Ad { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3505,15 +3552,15 @@ impl ::protobuf::Message for Ad { impl ::protobuf::Clear for Ad { fn clear(&mut self) { - self.clear_next(); - self.clear_ogg_fid(); - self.clear_image_fid(); - self.clear_duration(); - self.clear_click_url(); - self.clear_impression_url(); - self.clear_product(); - self.clear_advertiser(); - self.clear_gid(); + self.next = ::std::option::Option::None; + self.ogg_fid.clear(); + self.image_fid.clear(); + self.duration = ::std::option::Option::None; + self.click_url.clear(); + self.impression_url.clear(); + self.product.clear(); + self.advertiser.clear(); + self.gid.clear(); self.unknown_fields.clear(); } } @@ -3536,8 +3583,14 @@ pub struct Metadata { field_type: ::protobuf::SingularField<::std::string::String>, metadata: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Metadata { + fn default() -> &'a Metadata { + ::default_instance() + } } impl Metadata { @@ -3547,6 +3600,13 @@ impl Metadata { // optional string type = 1; + + pub fn get_field_type(&self) -> &str { + match self.field_type.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_field_type(&mut self) { self.field_type.clear(); } @@ -3574,15 +3634,15 @@ impl Metadata { self.field_type.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_field_type(&self) -> &str { - match self.field_type.as_ref() { + // optional string metadata = 2; + + + pub fn get_metadata(&self) -> &str { + match self.metadata.as_ref() { Some(v) => &v, None => "", } } - - // optional string metadata = 2; - pub fn clear_metadata(&mut self) { self.metadata.clear(); } @@ -3609,13 +3669,6 @@ impl Metadata { pub fn take_metadata(&mut self) -> ::std::string::String { self.metadata.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_metadata(&self) -> &str { - match self.metadata.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for Metadata { @@ -3679,13 +3732,13 @@ impl ::protobuf::Message for Metadata { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3737,8 +3790,8 @@ impl ::protobuf::Message for Metadata { impl ::protobuf::Clear for Metadata { fn clear(&mut self) { - self.clear_field_type(); - self.clear_metadata(); + self.field_type.clear(); + self.metadata.clear(); self.unknown_fields.clear(); } } @@ -3855,6 +3908,13 @@ impl ::protobuf::ProtobufEnum for MessageType { impl ::std::marker::Copy for MessageType { } +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for MessageType { + fn default() -> Self { + MessageType::kMessageTypeHello + } +} + impl ::protobuf::reflect::ProtobufValue for MessageType { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -3940,6 +4000,13 @@ impl ::protobuf::ProtobufEnum for CapabilityType { impl ::std::marker::Copy for CapabilityType { } +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for CapabilityType { + fn default() -> Self { + CapabilityType::kSupportedContexts + } +} + impl ::protobuf::reflect::ProtobufValue for CapabilityType { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -3995,6 +4062,12 @@ impl ::protobuf::ProtobufEnum for PlayStatus { impl ::std::marker::Copy for PlayStatus { } +impl ::std::default::Default for PlayStatus { + fn default() -> Self { + PlayStatus::kPlayStatusStop + } +} + impl ::protobuf::reflect::ProtobufValue for PlayStatus { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4002,79 +4075,72 @@ impl ::protobuf::reflect::ProtobufValue for PlayStatus { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0bspirc.proto\x12\0\"\x99\x03\n\x05Frame\x12\x13\n\x07version\x18\ - \x01\x20\x01(\rB\x02\x18\0\x12\x11\n\x05ident\x18\x02\x20\x01(\tB\x02\ - \x18\0\x12\x1c\n\x10protocol_version\x18\x03\x20\x01(\tB\x02\x18\0\x12\ - \x12\n\x06seq_nr\x18\x04\x20\x01(\rB\x02\x18\0\x12\x1d\n\x03typ\x18\x05\ - \x20\x01(\x0e2\x0c.MessageTypeB\x02\x18\0\x12&\n\x0cdevice_state\x18\x07\ - \x20\x01(\x0b2\x0c.DeviceStateB\x02\x18\0\x12\x1d\n\x07goodbye\x18\x0b\ - \x20\x01(\x0b2\x08.GoodbyeB\x02\x18\0\x12\x19\n\x05state\x18\x0c\x20\x01\ - (\x0b2\x06.StateB\x02\x18\0\x12\x14\n\x08position\x18\r\x20\x01(\rB\x02\ - \x18\0\x12\x12\n\x06volume\x18\x0e\x20\x01(\rB\x02\x18\0\x12\x1b\n\x0fst\ - ate_update_id\x18\x11\x20\x01(\x03B\x02\x18\0\x12\x15\n\trecipient\x18\ - \x12\x20\x03(\tB\x02\x18\0\x12\x20\n\x14context_player_state\x18\x13\x20\ - \x01(\x0cB\x02\x18\0\x12\x14\n\x08new_name\x18\x14\x20\x01(\tB\x02\x18\0\ - \x12\x1f\n\x08metadata\x18\x19\x20\x01(\x0b2\t.MetadataB\x02\x18\0\"\xb3\ - \x02\n\x0bDeviceState\x12\x16\n\nsw_version\x18\x01\x20\x01(\tB\x02\x18\ - \0\x12\x15\n\tis_active\x18\n\x20\x01(\x08B\x02\x18\0\x12\x14\n\x08can_p\ - lay\x18\x0b\x20\x01(\x08B\x02\x18\0\x12\x12\n\x06volume\x18\x0c\x20\x01(\ - \rB\x02\x18\0\x12\x10\n\x04name\x18\r\x20\x01(\tB\x02\x18\0\x12\x16\n\ne\ - rror_code\x18\x0e\x20\x01(\rB\x02\x18\0\x12\x1c\n\x10became_active_at\ - \x18\x0f\x20\x01(\x03B\x02\x18\0\x12\x19\n\rerror_message\x18\x10\x20\ - \x01(\tB\x02\x18\0\x12%\n\x0ccapabilities\x18\x11\x20\x03(\x0b2\x0b.Capa\ - bilityB\x02\x18\0\x12\x20\n\x14context_player_error\x18\x14\x20\x01(\tB\ - \x02\x18\0\x12\x1f\n\x08metadata\x18\x19\x20\x03(\x0b2\t.MetadataB\x02\ - \x18\0\"]\n\nCapability\x12\x20\n\x03typ\x18\x01\x20\x01(\x0e2\x0f.Capab\ - ilityTypeB\x02\x18\0\x12\x14\n\x08intValue\x18\x02\x20\x03(\x03B\x02\x18\ - \0\x12\x17\n\x0bstringValue\x18\x03\x20\x03(\tB\x02\x18\0\"\x1d\n\x07Goo\ - dbye\x12\x12\n\x06reason\x18\x01\x20\x01(\tB\x02\x18\0\"\xa1\x03\n\x05St\ - ate\x12\x17\n\x0bcontext_uri\x18\x02\x20\x01(\tB\x02\x18\0\x12\x11\n\x05\ - index\x18\x03\x20\x01(\rB\x02\x18\0\x12\x17\n\x0bposition_ms\x18\x04\x20\ - \x01(\rB\x02\x18\0\x12\x1f\n\x06status\x18\x05\x20\x01(\x0e2\x0b.PlaySta\ - tusB\x02\x18\0\x12\x20\n\x14position_measured_at\x18\x07\x20\x01(\x04B\ - \x02\x18\0\x12\x1f\n\x13context_description\x18\x08\x20\x01(\tB\x02\x18\ - \0\x12\x13\n\x07shuffle\x18\r\x20\x01(\x08B\x02\x18\0\x12\x12\n\x06repea\ - t\x18\x0e\x20\x01(\x08B\x02\x18\0\x12\x1e\n\x12last_command_ident\x18\ - \x14\x20\x01(\tB\x02\x18\0\x12\x1e\n\x12last_command_msgid\x18\x15\x20\ - \x01(\rB\x02\x18\0\x12!\n\x15playing_from_fallback\x18\x18\x20\x01(\x08B\ - \x02\x18\0\x12\x0f\n\x03row\x18\x19\x20\x01(\rB\x02\x18\0\x12\x1f\n\x13p\ - laying_track_index\x18\x1a\x20\x01(\rB\x02\x18\0\x12\x1c\n\x05track\x18\ - \x1b\x20\x03(\x0b2\t.TrackRefB\x02\x18\0\x12\x13\n\x02ad\x18\x1c\x20\x01\ - (\x0b2\x03.AdB\x02\x18\0\"U\n\x08TrackRef\x12\x0f\n\x03gid\x18\x01\x20\ - \x01(\x0cB\x02\x18\0\x12\x0f\n\x03uri\x18\x02\x20\x01(\tB\x02\x18\0\x12\ - \x12\n\x06queued\x18\x03\x20\x01(\x08B\x02\x18\0\x12\x13\n\x07context\ - \x18\x04\x20\x01(\tB\x02\x18\0\"\xc9\x01\n\x02Ad\x12\x10\n\x04next\x18\ - \x01\x20\x01(\x05B\x02\x18\0\x12\x13\n\x07ogg_fid\x18\x02\x20\x01(\x0cB\ - \x02\x18\0\x12\x15\n\timage_fid\x18\x03\x20\x01(\x0cB\x02\x18\0\x12\x14\ - \n\x08duration\x18\x04\x20\x01(\x05B\x02\x18\0\x12\x15\n\tclick_url\x18\ - \x05\x20\x01(\tB\x02\x18\0\x12\x1a\n\x0eimpression_url\x18\x06\x20\x01(\ - \tB\x02\x18\0\x12\x13\n\x07product\x18\x07\x20\x01(\tB\x02\x18\0\x12\x16\ - \n\nadvertiser\x18\x08\x20\x01(\tB\x02\x18\0\x12\x0f\n\x03gid\x18\t\x20\ - \x01(\x0cB\x02\x18\0\"2\n\x08Metadata\x12\x10\n\x04type\x18\x01\x20\x01(\ - \tB\x02\x18\0\x12\x14\n\x08metadata\x18\x02\x20\x01(\tB\x02\x18\0*\x91\ - \x04\n\x0bMessageType\x12\x15\n\x11kMessageTypeHello\x10\x01\x12\x17\n\ - \x13kMessageTypeGoodbye\x10\x02\x12\x15\n\x11kMessageTypeProbe\x10\x03\ - \x12\x16\n\x12kMessageTypeNotify\x10\n\x12\x14\n\x10kMessageTypeLoad\x10\ - \x14\x12\x14\n\x10kMessageTypePlay\x10\x15\x12\x15\n\x11kMessageTypePaus\ - e\x10\x16\x12\x19\n\x15kMessageTypePlayPause\x10\x17\x12\x14\n\x10kMessa\ - geTypeSeek\x10\x18\x12\x14\n\x10kMessageTypePrev\x10\x19\x12\x14\n\x10kM\ - essageTypeNext\x10\x1a\x12\x16\n\x12kMessageTypeVolume\x10\x1b\x12\x17\n\ - \x13kMessageTypeShuffle\x10\x1c\x12\x16\n\x12kMessageTypeRepeat\x10\x1d\ - \x12\x1a\n\x16kMessageTypeVolumeDown\x10\x1f\x12\x18\n\x14kMessageTypeVo\ - lumeUp\x10\x20\x12\x17\n\x13kMessageTypeReplace\x10!\x12\x16\n\x12kMessa\ - geTypeLogout\x10\"\x12\x16\n\x12kMessageTypeAction\x10#\x12\x16\n\x12kMe\ - ssageTypeRename\x10$\x12\x1f\n\x1akMessageTypeUpdateMetadata\x10\x80\x01\ - \x1a\x02\x10\0*\xb6\x02\n\x0eCapabilityType\x12\x16\n\x12kSupportedConte\ - xts\x10\x01\x12\x10\n\x0ckCanBePlayer\x10\x02\x12\x14\n\x10kRestrictToLo\ - cal\x10\x03\x12\x0f\n\x0bkDeviceType\x10\x04\x12\x14\n\x10kGaiaEqConnect\ - Id\x10\x05\x12\x13\n\x0fkSupportsLogout\x10\x06\x12\x11\n\rkIsObservable\ - \x10\x07\x12\x10\n\x0ckVolumeSteps\x10\x08\x12\x13\n\x0fkSupportedTypes\ - \x10\t\x12\x10\n\x0ckCommandAcks\x10\n\x12\x13\n\x0fkSupportsRename\x10\ - \x0b\x12\x0b\n\x07kHidden\x10\x0c\x12\x17\n\x13kSupportsPlaylistV2\x10\r\ - \x12\x1d\n\x19kSupportsExternalEpisodes\x10\x0e\x1a\x02\x10\0*h\n\nPlayS\ - tatus\x12\x13\n\x0fkPlayStatusStop\x10\0\x12\x13\n\x0fkPlayStatusPlay\ - \x10\x01\x12\x14\n\x10kPlayStatusPause\x10\x02\x12\x16\n\x12kPlayStatusL\ - oading\x10\x03\x1a\x02\x10\0B\0b\x06proto2\ + \n\x0bspirc.proto\x12\0\"\xfd\x02\n\x05Frame\x12\x11\n\x07version\x18\ + \x01\x20\x01(\rB\0\x12\x0f\n\x05ident\x18\x02\x20\x01(\tB\0\x12\x1a\n\ + \x10protocol_version\x18\x03\x20\x01(\tB\0\x12\x10\n\x06seq_nr\x18\x04\ + \x20\x01(\rB\0\x12\x1b\n\x03typ\x18\x05\x20\x01(\x0e2\x0c.MessageTypeB\0\ + \x12$\n\x0cdevice_state\x18\x07\x20\x01(\x0b2\x0c.DeviceStateB\0\x12\x1b\ + \n\x07goodbye\x18\x0b\x20\x01(\x0b2\x08.GoodbyeB\0\x12\x17\n\x05state\ + \x18\x0c\x20\x01(\x0b2\x06.StateB\0\x12\x12\n\x08position\x18\r\x20\x01(\ + \rB\0\x12\x10\n\x06volume\x18\x0e\x20\x01(\rB\0\x12\x19\n\x0fstate_updat\ + e_id\x18\x11\x20\x01(\x03B\0\x12\x13\n\trecipient\x18\x12\x20\x03(\tB\0\ + \x12\x1e\n\x14context_player_state\x18\x13\x20\x01(\x0cB\0\x12\x12\n\x08\ + new_name\x18\x14\x20\x01(\tB\0\x12\x1d\n\x08metadata\x18\x19\x20\x01(\ + \x0b2\t.MetadataB\0:\0\"\x9f\x02\n\x0bDeviceState\x12\x14\n\nsw_version\ + \x18\x01\x20\x01(\tB\0\x12\x13\n\tis_active\x18\n\x20\x01(\x08B\0\x12\ + \x12\n\x08can_play\x18\x0b\x20\x01(\x08B\0\x12\x10\n\x06volume\x18\x0c\ + \x20\x01(\rB\0\x12\x0e\n\x04name\x18\r\x20\x01(\tB\0\x12\x14\n\nerror_co\ + de\x18\x0e\x20\x01(\rB\0\x12\x1a\n\x10became_active_at\x18\x0f\x20\x01(\ + \x03B\0\x12\x17\n\rerror_message\x18\x10\x20\x01(\tB\0\x12#\n\x0ccapabil\ + ities\x18\x11\x20\x03(\x0b2\x0b.CapabilityB\0\x12\x1e\n\x14context_playe\ + r_error\x18\x14\x20\x01(\tB\0\x12\x1d\n\x08metadata\x18\x19\x20\x03(\x0b\ + 2\t.MetadataB\0:\0\"Y\n\nCapability\x12\x1e\n\x03typ\x18\x01\x20\x01(\ + \x0e2\x0f.CapabilityTypeB\0\x12\x12\n\x08intValue\x18\x02\x20\x03(\x03B\ + \0\x12\x15\n\x0bstringValue\x18\x03\x20\x03(\tB\0:\0\"\x1d\n\x07Goodbye\ + \x12\x10\n\x06reason\x18\x01\x20\x01(\tB\0:\0\"\x85\x03\n\x05State\x12\ + \x15\n\x0bcontext_uri\x18\x02\x20\x01(\tB\0\x12\x0f\n\x05index\x18\x03\ + \x20\x01(\rB\0\x12\x15\n\x0bposition_ms\x18\x04\x20\x01(\rB\0\x12\x1d\n\ + \x06status\x18\x05\x20\x01(\x0e2\x0b.PlayStatusB\0\x12\x1e\n\x14position\ + _measured_at\x18\x07\x20\x01(\x04B\0\x12\x1d\n\x13context_description\ + \x18\x08\x20\x01(\tB\0\x12\x11\n\x07shuffle\x18\r\x20\x01(\x08B\0\x12\ + \x10\n\x06repeat\x18\x0e\x20\x01(\x08B\0\x12\x1c\n\x12last_command_ident\ + \x18\x14\x20\x01(\tB\0\x12\x1c\n\x12last_command_msgid\x18\x15\x20\x01(\ + \rB\0\x12\x1f\n\x15playing_from_fallback\x18\x18\x20\x01(\x08B\0\x12\r\n\ + \x03row\x18\x19\x20\x01(\rB\0\x12\x1d\n\x13playing_track_index\x18\x1a\ + \x20\x01(\rB\0\x12\x1a\n\x05track\x18\x1b\x20\x03(\x0b2\t.TrackRefB\0\ + \x12\x11\n\x02ad\x18\x1c\x20\x01(\x0b2\x03.AdB\0:\0\"O\n\x08TrackRef\x12\ + \r\n\x03gid\x18\x01\x20\x01(\x0cB\0\x12\r\n\x03uri\x18\x02\x20\x01(\tB\0\ + \x12\x10\n\x06queued\x18\x03\x20\x01(\x08B\0\x12\x11\n\x07context\x18\ + \x04\x20\x01(\tB\0:\0\"\xb9\x01\n\x02Ad\x12\x0e\n\x04next\x18\x01\x20\ + \x01(\x05B\0\x12\x11\n\x07ogg_fid\x18\x02\x20\x01(\x0cB\0\x12\x13\n\tima\ + ge_fid\x18\x03\x20\x01(\x0cB\0\x12\x12\n\x08duration\x18\x04\x20\x01(\ + \x05B\0\x12\x13\n\tclick_url\x18\x05\x20\x01(\tB\0\x12\x18\n\x0eimpressi\ + on_url\x18\x06\x20\x01(\tB\0\x12\x11\n\x07product\x18\x07\x20\x01(\tB\0\ + \x12\x14\n\nadvertiser\x18\x08\x20\x01(\tB\0\x12\r\n\x03gid\x18\t\x20\ + \x01(\x0cB\0:\0\"0\n\x08Metadata\x12\x0e\n\x04type\x18\x01\x20\x01(\tB\0\ + \x12\x12\n\x08metadata\x18\x02\x20\x01(\tB\0:\0*\x8f\x04\n\x0bMessageTyp\ + e\x12\x15\n\x11kMessageTypeHello\x10\x01\x12\x17\n\x13kMessageTypeGoodby\ + e\x10\x02\x12\x15\n\x11kMessageTypeProbe\x10\x03\x12\x16\n\x12kMessageTy\ + peNotify\x10\n\x12\x14\n\x10kMessageTypeLoad\x10\x14\x12\x14\n\x10kMessa\ + geTypePlay\x10\x15\x12\x15\n\x11kMessageTypePause\x10\x16\x12\x19\n\x15k\ + MessageTypePlayPause\x10\x17\x12\x14\n\x10kMessageTypeSeek\x10\x18\x12\ + \x14\n\x10kMessageTypePrev\x10\x19\x12\x14\n\x10kMessageTypeNext\x10\x1a\ + \x12\x16\n\x12kMessageTypeVolume\x10\x1b\x12\x17\n\x13kMessageTypeShuffl\ + e\x10\x1c\x12\x16\n\x12kMessageTypeRepeat\x10\x1d\x12\x1a\n\x16kMessageT\ + ypeVolumeDown\x10\x1f\x12\x18\n\x14kMessageTypeVolumeUp\x10\x20\x12\x17\ + \n\x13kMessageTypeReplace\x10!\x12\x16\n\x12kMessageTypeLogout\x10\"\x12\ + \x16\n\x12kMessageTypeAction\x10#\x12\x16\n\x12kMessageTypeRename\x10$\ + \x12\x1f\n\x1akMessageTypeUpdateMetadata\x10\x80\x01\x1a\0*\xb4\x02\n\ + \x0eCapabilityType\x12\x16\n\x12kSupportedContexts\x10\x01\x12\x10\n\x0c\ + kCanBePlayer\x10\x02\x12\x14\n\x10kRestrictToLocal\x10\x03\x12\x0f\n\x0b\ + kDeviceType\x10\x04\x12\x14\n\x10kGaiaEqConnectId\x10\x05\x12\x13\n\x0fk\ + SupportsLogout\x10\x06\x12\x11\n\rkIsObservable\x10\x07\x12\x10\n\x0ckVo\ + lumeSteps\x10\x08\x12\x13\n\x0fkSupportedTypes\x10\t\x12\x10\n\x0ckComma\ + ndAcks\x10\n\x12\x13\n\x0fkSupportsRename\x10\x0b\x12\x0b\n\x07kHidden\ + \x10\x0c\x12\x17\n\x13kSupportsPlaylistV2\x10\r\x12\x1d\n\x19kSupportsEx\ + ternalEpisodes\x10\x0e\x1a\0*f\n\nPlayStatus\x12\x13\n\x0fkPlayStatusSto\ + p\x10\0\x12\x13\n\x0fkPlayStatusPlay\x10\x01\x12\x14\n\x10kPlayStatusPau\ + se\x10\x02\x12\x16\n\x12kPlayStatusLoading\x10\x03\x1a\0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/src/lib.rs b/src/lib.rs index 2b5e2026..f73db1ab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,6 @@ #![cfg_attr(feature = "cargo-clippy", allow(unused_io_amount))] extern crate base64; -extern crate crypto; extern crate futures; extern crate hyper; extern crate num_bigint; diff --git a/src/main.rs b/src/main.rs index 14965ad5..e3718fb8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,3 @@ -extern crate crypto; extern crate env_logger; extern crate futures; extern crate getopts; @@ -11,10 +10,10 @@ extern crate tokio_io; extern crate tokio_process; extern crate tokio_signal; extern crate url; +extern crate sha1; +extern crate hex; -use crypto::digest::Digest; -use crypto::sha1::Sha1; -use env_logger::LogBuilder; +use sha1::{Sha1, Digest}; use futures::sync::mpsc::UnboundedReceiver; use futures::{Async, Future, Poll, Stream}; use std::env; @@ -37,16 +36,14 @@ use librespot::connect::discovery::{discovery, DiscoveryStream}; use librespot::connect::spirc::{Spirc, SpircTask}; use librespot::playback::audio_backend::{self, Sink, BACKENDS}; use librespot::playback::config::{Bitrate, PlayerConfig}; -use librespot::playback::mixer::{self, Mixer}; +use librespot::playback::mixer::{self, Mixer, MixerConfig}; use librespot::playback::player::{Player, PlayerEvent}; mod player_event_handler; use player_event_handler::run_program_on_events; fn device_id(name: &str) -> String { - let mut h = Sha1::new(); - h.input_str(name); - h.result_str() + hex::encode(Sha1::digest(name.as_bytes())) } fn usage(program: &str, opts: &getopts::Options) -> String { @@ -55,11 +52,11 @@ fn usage(program: &str, opts: &getopts::Options) -> String { } fn setup_logging(verbose: bool) { - let mut builder = LogBuilder::new(); + let mut builder = env_logger::Builder::new(); match env::var("RUST_LOG") { Ok(config) => { - builder.parse(&config); - builder.init().unwrap(); + builder.parse_filters(&config); + builder.init(); if verbose { warn!("`--verbose` flag overidden by `RUST_LOG` environment variable"); @@ -67,11 +64,11 @@ fn setup_logging(verbose: bool) { } Err(_) => { if verbose { - builder.parse("mdns=info,librespot=trace"); + builder.parse_filters("mdns=info,librespot=trace"); } else { - builder.parse("mdns=info,librespot=info"); + builder.parse_filters("mdns=info,librespot=info"); } - builder.init().unwrap(); + builder.init(); } } } @@ -92,12 +89,13 @@ struct Setup { backend: fn(Option) -> Box, device: Option, - mixer: fn() -> Box, + mixer: fn(Option) -> Box, cache: Option, player_config: PlayerConfig, session_config: SessionConfig, connect_config: ConnectConfig, + mixer_config: MixerConfig, credentials: Option, enable_discovery: bool, zeroconf_port: u16, @@ -141,10 +139,28 @@ fn setup(args: &[String]) -> Setup { .optopt( "", "device", - "Audio device to use. Use '?' to list options if using portaudio", + "Audio device to use. Use '?' to list options if using portaudio or alsa", "DEVICE", ) - .optopt("", "mixer", "Mixer to use", "MIXER") + .optopt("", "mixer", "Mixer to use (alsa or softmixer)", "MIXER") + .optopt( + "m", + "mixer-name", + "Alsa mixer name, e.g \"PCM\" or \"Master\". Defaults to 'PCM'", + "MIXER_NAME", + ) + .optopt( + "", + "mixer-card", + "Alsa mixer card, e.g \"hw:0\" or similar from `aplay -l`. Defaults to 'default' ", + "MIXER_CARD", + ) + .optopt( + "", + "mixer-index", + "Alsa mixer index, Index of the cards mixer. Defaults to 0", + "MIXER_INDEX", + ) .optopt( "", "initial-volume", @@ -202,10 +218,23 @@ fn setup(args: &[String]) -> Setup { let backend = audio_backend::find(backend_name).expect("Invalid backend"); let device = matches.opt_str("device"); + if device == Some("?".into()) { + backend(device); + exit(0); + } let mixer_name = matches.opt_str("mixer"); let mixer = mixer::find(mixer_name.as_ref()).expect("Invalid mixer"); + let mixer_config = MixerConfig { + card: matches.opt_str("mixer-card").unwrap_or(String::from("default")), + mixer: matches.opt_str("mixer-name").unwrap_or(String::from("PCM")), + index: matches + .opt_str("mixer-index") + .map(|index| index.parse::().unwrap()) + .unwrap_or(0), + }; + let use_audio_cache = !matches.opt_present("disable-audio-cache"); let cache = matches @@ -220,8 +249,7 @@ fn setup(args: &[String]) -> Setup { panic!("Initial volume must be in the range 0-100"); } (volume as i32 * 0xFFFF / 100) as u16 - }) - .or_else(|| cache.as_ref().and_then(Cache::volume)) + }).or_else(|| cache.as_ref().and_then(Cache::volume)) .unwrap_or(0x8000); let zeroconf_port = matches @@ -322,6 +350,7 @@ fn setup(args: &[String]) -> Setup { enable_discovery: enable_discovery, zeroconf_port: zeroconf_port, mixer: mixer, + mixer_config: mixer_config, player_event_program: matches.opt_str("onevent"), } } @@ -333,7 +362,8 @@ struct Main { connect_config: ConnectConfig, backend: fn(Option) -> Box, device: Option, - mixer: fn() -> Box, + mixer: fn(Option) -> Box, + mixer_config: MixerConfig, handle: Handle, discovery: Option, @@ -360,13 +390,14 @@ impl Main { backend: setup.backend, device: setup.device, mixer: setup.mixer, + mixer_config: setup.mixer_config, connect: Box::new(futures::future::empty()), discovery: None, spirc: None, spirc_task: None, shutdown: false, - signal: Box::new(tokio_signal::ctrl_c(&handle).flatten_stream()), + signal: Box::new(tokio_signal::ctrl_c().flatten_stream()), player_event_channel: None, player_event_program: setup.player_event_program, @@ -420,13 +451,14 @@ impl Future for Main { if let Async::Ready(session) = self.connect.poll().unwrap() { self.connect = Box::new(futures::future::empty()); - let device = self.device.clone(); - let mixer = (self.mixer)(); + let mixer_config = self.mixer_config.clone(); + let mixer = (self.mixer)(Some(mixer_config)); let player_config = self.player_config.clone(); let connect_config = self.connect_config.clone(); let audio_filter = mixer.get_audio_filter(); let backend = self.backend; + let device = self.device.clone(); let (player, event_channel) = Player::new(player_config, session.clone(), audio_filter, move || { (backend)(device)