tangled
alpha
login
or
join now
tsiry-sandratraina.com
/
tunein-cli
6
fork
atom
Browse and listen to thousands of radio stations across the globe right from your terminal ๐ ๐ป ๐ตโจ
radio
rust
tokio
web-radio
command-line-tool
tui
6
fork
atom
overview
issues
pulls
pipelines
bump version code
tsiry-sandratraina.com
7 months ago
ef0ae159
fe119abb
+347
-153
8 changed files
expand all
collapse all
unified
split
Cargo.lock
Cargo.toml
README.md
dist
debian
amd64
DEBIAN
control
arm64
DEBIAN
control
rpm
amd64
tunein.spec
arm64
tunein.spec
src
api
tunein.v1alpha1.rs
+74
-14
Cargo.lock
···
850
"once_cell",
851
"parking_lot",
852
"stdweb",
853
-
"thiserror",
854
"web-sys",
855
"windows",
856
]
···
1407
"ipnet",
1408
"once_cell",
1409
"rand 0.8.5",
1410
-
"thiserror",
1411
"tinyvec",
1412
"tracing",
1413
"url 2.5.4",
···
1429
"rand 0.8.5",
1430
"resolv-conf",
1431
"smallvec",
1432
-
"thiserror",
1433
"tracing",
1434
]
1435
···
1941
"combine",
1942
"jni-sys",
1943
"log",
1944
-
"thiserror",
1945
"walkdir",
1946
]
1947
···
2116
]
2117
2118
[[package]]
0
0
0
0
0
0
0
0
0
2119
name = "match_cfg"
2120
version = "0.1.0"
2121
source = "registry+https://github.com/rust-lang/crates.io-index"
···
2176
source = "registry+https://github.com/rust-lang/crates.io-index"
2177
checksum = "985438f75febf74c392071a975a29641b420dd84431135a6e6db721de4b74372"
2178
dependencies = [
2179
-
"minimp3-sys",
2180
"slice-deque",
2181
-
"thiserror",
0
0
0
0
0
0
0
0
0
0
0
2182
]
2183
2184
[[package]]
···
2186
version = "0.3.2"
2187
source = "registry+https://github.com/rust-lang/crates.io-index"
2188
checksum = "e21c73734c69dc95696c9ed8926a2b393171d98b3f5f5935686a26a487ab9b90"
0
0
0
0
0
0
0
0
0
2189
dependencies = [
2190
"cc",
2191
]
···
2238
"jni-sys",
2239
"ndk-sys 0.3.0",
2240
"num_enum",
2241
-
"thiserror",
2242
]
2243
2244
[[package]]
···
2252
"ndk-sys 0.4.1+23.1.7779620",
2253
"num_enum",
2254
"raw-window-handle",
2255
-
"thiserror",
2256
]
2257
2258
[[package]]
···
2986
"cpal",
2987
"hound",
2988
"lewton",
2989
-
"minimp3",
2990
]
2991
2992
[[package]]
···
3219
dependencies = [
3220
"percent-encoding 2.3.1",
3221
"serde",
3222
-
"thiserror",
3223
]
3224
3225
[[package]]
···
3319
]
3320
3321
[[package]]
0
0
0
0
0
0
0
0
0
0
0
3322
name = "smallvec"
3323
version = "1.13.2"
3324
source = "registry+https://github.com/rust-lang/crates.io-index"
···
3794
source = "registry+https://github.com/rust-lang/crates.io-index"
3795
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
3796
dependencies = [
3797
-
"thiserror-impl",
0
0
0
0
0
0
0
0
0
3798
]
3799
3800
[[package]]
···
3802
version = "1.0.69"
3803
source = "registry+https://github.com/rust-lang/crates.io-index"
3804
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
0
0
0
0
0
0
0
0
0
0
0
3805
dependencies = [
3806
"proc-macro2",
3807
"quote",
···
4152
4153
[[package]]
4154
name = "tunein-cli"
4155
-
version = "0.3.1"
4156
dependencies = [
4157
"anyhow",
4158
"async-trait",
···
4164
"futures-util",
4165
"hyper 0.14.32",
4166
"m3u",
4167
-
"minimp3",
4168
"owo-colors",
4169
"pls",
4170
"prost",
···
4178
"surf",
4179
"symphonia",
4180
"termion",
4181
-
"thiserror",
4182
"tokio",
4183
"tonic",
4184
"tonic-build",
···
850
"once_cell",
851
"parking_lot",
852
"stdweb",
853
+
"thiserror 1.0.69",
854
"web-sys",
855
"windows",
856
]
···
1407
"ipnet",
1408
"once_cell",
1409
"rand 0.8.5",
1410
+
"thiserror 1.0.69",
1411
"tinyvec",
1412
"tracing",
1413
"url 2.5.4",
···
1429
"rand 0.8.5",
1430
"resolv-conf",
1431
"smallvec",
1432
+
"thiserror 1.0.69",
1433
"tracing",
1434
]
1435
···
1941
"combine",
1942
"jni-sys",
1943
"log",
1944
+
"thiserror 1.0.69",
1945
"walkdir",
1946
]
1947
···
2116
]
2117
2118
[[package]]
2119
+
name = "mach2"
2120
+
version = "0.4.3"
2121
+
source = "registry+https://github.com/rust-lang/crates.io-index"
2122
+
checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44"
2123
+
dependencies = [
2124
+
"libc",
2125
+
]
2126
+
2127
+
[[package]]
2128
name = "match_cfg"
2129
version = "0.1.0"
2130
source = "registry+https://github.com/rust-lang/crates.io-index"
···
2185
source = "registry+https://github.com/rust-lang/crates.io-index"
2186
checksum = "985438f75febf74c392071a975a29641b420dd84431135a6e6db721de4b74372"
2187
dependencies = [
2188
+
"minimp3-sys 0.3.2",
2189
"slice-deque",
2190
+
"thiserror 1.0.69",
2191
+
]
2192
+
2193
+
[[package]]
2194
+
name = "minimp3"
2195
+
version = "0.6.0"
2196
+
source = "registry+https://github.com/rust-lang/crates.io-index"
2197
+
checksum = "c684a06335e480df3f2aa78970d0d470835716ae5867d5dadb71ef9f4413572d"
2198
+
dependencies = [
2199
+
"minimp3-sys 0.6.0",
2200
+
"slice-ring-buffer",
2201
+
"thiserror 2.0.14",
2202
]
2203
2204
[[package]]
···
2206
version = "0.3.2"
2207
source = "registry+https://github.com/rust-lang/crates.io-index"
2208
checksum = "e21c73734c69dc95696c9ed8926a2b393171d98b3f5f5935686a26a487ab9b90"
2209
+
dependencies = [
2210
+
"cc",
2211
+
]
2212
+
2213
+
[[package]]
2214
+
name = "minimp3-sys"
2215
+
version = "0.6.0"
2216
+
source = "registry+https://github.com/rust-lang/crates.io-index"
2217
+
checksum = "aa16a1fbac806d94e230e0a6b9b5a137d051897a188944cf07645da4b73a9fae"
2218
dependencies = [
2219
"cc",
2220
]
···
2267
"jni-sys",
2268
"ndk-sys 0.3.0",
2269
"num_enum",
2270
+
"thiserror 1.0.69",
2271
]
2272
2273
[[package]]
···
2281
"ndk-sys 0.4.1+23.1.7779620",
2282
"num_enum",
2283
"raw-window-handle",
2284
+
"thiserror 1.0.69",
2285
]
2286
2287
[[package]]
···
3015
"cpal",
3016
"hound",
3017
"lewton",
3018
+
"minimp3 0.5.1",
3019
]
3020
3021
[[package]]
···
3248
dependencies = [
3249
"percent-encoding 2.3.1",
3250
"serde",
3251
+
"thiserror 1.0.69",
3252
]
3253
3254
[[package]]
···
3348
]
3349
3350
[[package]]
3351
+
name = "slice-ring-buffer"
3352
+
version = "0.3.4"
3353
+
source = "registry+https://github.com/rust-lang/crates.io-index"
3354
+
checksum = "84ae312bda09b2368f79f985fdb4df4a0b5cbc75546b511303972d195f8c27d6"
3355
+
dependencies = [
3356
+
"libc",
3357
+
"mach2",
3358
+
"winapi",
3359
+
]
3360
+
3361
+
[[package]]
3362
name = "smallvec"
3363
version = "1.13.2"
3364
source = "registry+https://github.com/rust-lang/crates.io-index"
···
3834
source = "registry+https://github.com/rust-lang/crates.io-index"
3835
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
3836
dependencies = [
3837
+
"thiserror-impl 1.0.69",
3838
+
]
3839
+
3840
+
[[package]]
3841
+
name = "thiserror"
3842
+
version = "2.0.14"
3843
+
source = "registry+https://github.com/rust-lang/crates.io-index"
3844
+
checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e"
3845
+
dependencies = [
3846
+
"thiserror-impl 2.0.14",
3847
]
3848
3849
[[package]]
···
3851
version = "1.0.69"
3852
source = "registry+https://github.com/rust-lang/crates.io-index"
3853
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
3854
+
dependencies = [
3855
+
"proc-macro2",
3856
+
"quote",
3857
+
"syn 2.0.96",
3858
+
]
3859
+
3860
+
[[package]]
3861
+
name = "thiserror-impl"
3862
+
version = "2.0.14"
3863
+
source = "registry+https://github.com/rust-lang/crates.io-index"
3864
+
checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227"
3865
dependencies = [
3866
"proc-macro2",
3867
"quote",
···
4212
4213
[[package]]
4214
name = "tunein-cli"
4215
+
version = "0.3.2"
4216
dependencies = [
4217
"anyhow",
4218
"async-trait",
···
4224
"futures-util",
4225
"hyper 0.14.32",
4226
"m3u",
4227
+
"minimp3 0.6.0",
4228
"owo-colors",
4229
"pls",
4230
"prost",
···
4238
"surf",
4239
"symphonia",
4240
"termion",
4241
+
"thiserror 1.0.69",
4242
"tokio",
4243
"tonic",
4244
"tonic-build",
+32
-8
Cargo.toml
···
8
name = "tunein-cli"
9
readme = "README.md"
10
repository = "https://github.com/tsirysndr/tunein-cli"
11
-
version = "0.3.1"
12
13
[[bin]]
14
name = "tunein"
···
31
derive_more = "0.99.17"
32
futures = "0.3.26"
33
futures-util = "0.3.26"
34
-
hyper = {version = "0.14.23", features = ["client", "stream", "tcp", "http1", "http2"]}
0
0
0
0
0
0
35
m3u = "1.0.0"
36
minimp3 = "0.6"
37
owo-colors = "3.5.0"
38
pls = "0.2.2"
39
prost = "0.13.2"
40
-
radiobrowser = { version = "0.6.1", features = ["default-rustls"], default-features = false }
0
0
41
ratatui = "0.26.1"
42
regex = "1.11.1"
43
-
reqwest = {version = "0.11.14", features = ["blocking", "rustls-tls"], default-features = false}
44
-
rodio = {version = "0.16"}
0
0
0
45
rustfft = "6.2.0"
46
serde = "1.0.197"
47
-
surf = {version = "2.3.2", features = ["h1-client-rustls"], default-features = false}
48
-
symphonia = {version = "0.5.1", features = ["aac", "alac", "mp3", "isomp4", "flac"]}
0
0
0
0
0
0
0
0
49
termion = "2.0.1"
50
thiserror = "1.0.58"
51
-
tokio = {version = "1.36.0", features = ["tokio-macros", "macros", "rt", "rt-multi-thread"]}
0
0
0
0
0
52
tonic = "0.12.3"
53
tonic-reflection = "0.12.3"
54
tonic-web = "0.12.3"
···
8
name = "tunein-cli"
9
readme = "README.md"
10
repository = "https://github.com/tsirysndr/tunein-cli"
11
+
version = "0.3.2"
12
13
[[bin]]
14
name = "tunein"
···
31
derive_more = "0.99.17"
32
futures = "0.3.26"
33
futures-util = "0.3.26"
34
+
hyper = { version = "0.14.23", features = [
35
+
"client",
36
+
"stream",
37
+
"tcp",
38
+
"http1",
39
+
"http2",
40
+
] }
41
m3u = "1.0.0"
42
minimp3 = "0.6"
43
owo-colors = "3.5.0"
44
pls = "0.2.2"
45
prost = "0.13.2"
46
+
radiobrowser = { version = "0.6.1", features = [
47
+
"default-rustls",
48
+
], default-features = false }
49
ratatui = "0.26.1"
50
regex = "1.11.1"
51
+
reqwest = { version = "0.11.14", features = [
52
+
"blocking",
53
+
"rustls-tls",
54
+
], default-features = false }
55
+
rodio = { version = "0.16" }
56
rustfft = "6.2.0"
57
serde = "1.0.197"
58
+
surf = { version = "2.3.2", features = [
59
+
"h1-client-rustls",
60
+
], default-features = false }
61
+
symphonia = { version = "0.5.1", features = [
62
+
"aac",
63
+
"alac",
64
+
"mp3",
65
+
"isomp4",
66
+
"flac",
67
+
] }
68
termion = "2.0.1"
69
thiserror = "1.0.58"
70
+
tokio = { version = "1.36.0", features = [
71
+
"tokio-macros",
72
+
"macros",
73
+
"rt",
74
+
"rt-multi-thread",
75
+
] }
76
tonic = "0.12.3"
77
tonic-reflection = "0.12.3"
78
tonic-web = "0.12.3"
+2
-2
README.md
···
108
Or download the latest release for your platform [here](https://github.com/tsirysndr/tunein-cli/releases).
109
110
## ๐ฆ Downloads
111
-
- `Mac`: arm64: [tunein_v0.3.1_aarch64-apple-darwin.tar.gz](https://github.com/tsirysndr/tunein-cli/releases/download/v0.3.1/tunein_v0.3.1_aarch64-apple-darwin.tar.gz) intel: [tunein_v0.3.1_x86_64-apple-darwin.tar.gz](https://github.com/tsirysndr/tunein-cli/releases/download/v0.3.1/tunein_v0.3.1_x86_64-apple-darwin.tar.gz)
112
-
- `Linux`: [tunein_v0.3.1_x86_64-unknown-linux-gnu.tar.gz](https://github.com/tsirysndr/tunein-cli/releases/download/v0.3.1/tunein_v0.3.1_x86_64-unknown-linux-gnu.tar.gz)
113
114
## ๐ Usage
115
```
···
108
Or download the latest release for your platform [here](https://github.com/tsirysndr/tunein-cli/releases).
109
110
## ๐ฆ Downloads
111
+
- `Mac`: arm64: [tunein_v0.3.2_aarch64-apple-darwin.tar.gz](https://github.com/tsirysndr/tunein-cli/releases/download/v0.3.2/tunein_v0.3.2_aarch64-apple-darwin.tar.gz) intel: [tunein_v0.3.2_x86_64-apple-darwin.tar.gz](https://github.com/tsirysndr/tunein-cli/releases/download/v0.3.2/tunein_v0.3.2_x86_64-apple-darwin.tar.gz)
112
+
- `Linux`: [tunein_v0.3.2_x86_64-unknown-linux-gnu.tar.gz](https://github.com/tsirysndr/tunein-cli/releases/download/v0.3.2/tunein_v0.3.2_x86_64-unknown-linux-gnu.tar.gz)
113
114
## ๐ Usage
115
```
+1
-1
dist/debian/amd64/DEBIAN/control
···
1
Package: tunein-cli
2
-
Version: 0.3.1
3
Section: user/multimedia
4
Priority: optional
5
Architecture: amd64
···
1
Package: tunein-cli
2
+
Version: 0.3.2
3
Section: user/multimedia
4
Priority: optional
5
Architecture: amd64
+1
-1
dist/debian/arm64/DEBIAN/control
···
1
Package: tunein-cli
2
-
Version: 0.3.1
3
Section: user/multimedia
4
Priority: optional
5
Architecture: arm64
···
1
Package: tunein-cli
2
+
Version: 0.3.2
3
Section: user/multimedia
4
Priority: optional
5
Architecture: arm64
+1
-1
dist/rpm/amd64/tunein.spec
···
1
Name: tunein-cli
2
-
Version: 0.3.1
3
Release: 1%{?dist}
4
Summary: CLI for listening to internet radio stations
5
···
1
Name: tunein-cli
2
+
Version: 0.3.2
3
Release: 1%{?dist}
4
Summary: CLI for listening to internet radio stations
5
+1
-1
dist/rpm/arm64/tunein.spec
···
1
2
Name: tunein-cli
3
-
Version: 0.3.1
4
Release: 1%{?dist}
5
Summary: CLI for listening to internet radio stations
6
···
1
2
Name: tunein-cli
3
+
Version: 0.3.2
4
Release: 1%{?dist}
5
Summary: CLI for listening to internet radio stations
6
+235
-125
src/api/tunein.v1alpha1.rs
···
39
#[derive(Clone, PartialEq, ::prost::Message)]
40
pub struct GetStationDetailsResponse {
41
#[prost(message, optional, tag = "1")]
42
-
pub station_link_details:
43
-
::core::option::Option<super::super::objects::v1alpha1::StationLinkDetails>,
0
44
}
45
#[derive(Clone, PartialEq, ::prost::Message)]
46
pub struct SearchRequest {
···
61
dead_code,
62
missing_docs,
63
clippy::wildcard_imports,
64
-
clippy::let_unit_value
65
)]
66
-
use tonic::codegen::http::Uri;
67
use tonic::codegen::*;
0
68
#[derive(Debug, Clone)]
69
pub struct BrowseServiceClient<T> {
70
inner: tonic::client::Grpc<T>,
···
108
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
109
>,
110
>,
111
-
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
112
-
Into<StdError> + std::marker::Send + std::marker::Sync,
0
113
{
114
BrowseServiceClient::new(InterceptedService::new(inner, interceptor))
115
}
···
147
pub async fn get_categories(
148
&mut self,
149
request: impl tonic::IntoRequest<super::GetCategoriesRequest>,
150
-
) -> std::result::Result<tonic::Response<super::GetCategoriesResponse>, tonic::Status>
151
-
{
152
-
self.inner.ready().await.map_err(|e| {
153
-
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
154
-
})?;
0
0
0
0
0
0
0
155
let codec = tonic::codec::ProstCodec::default();
156
let path = http::uri::PathAndQuery::from_static(
157
"/tunein.v1alpha1.BrowseService/GetCategories",
158
);
159
let mut req = request.into_request();
160
-
req.extensions_mut().insert(GrpcMethod::new(
161
-
"tunein.v1alpha1.BrowseService",
162
-
"GetCategories",
163
-
));
164
self.inner.unary(req, path, codec).await
165
}
166
pub async fn browse_category(
167
&mut self,
168
request: impl tonic::IntoRequest<super::BrowseCategoryRequest>,
169
-
) -> std::result::Result<tonic::Response<super::BrowseCategoryResponse>, tonic::Status>
170
-
{
171
-
self.inner.ready().await.map_err(|e| {
172
-
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
173
-
})?;
0
0
0
0
0
0
0
174
let codec = tonic::codec::ProstCodec::default();
175
let path = http::uri::PathAndQuery::from_static(
176
"/tunein.v1alpha1.BrowseService/BrowseCategory",
177
);
178
let mut req = request.into_request();
179
-
req.extensions_mut().insert(GrpcMethod::new(
180
-
"tunein.v1alpha1.BrowseService",
181
-
"BrowseCategory",
182
-
));
183
self.inner.unary(req, path, codec).await
184
}
185
pub async fn get_station_details(
186
&mut self,
187
request: impl tonic::IntoRequest<super::GetStationDetailsRequest>,
188
-
) -> std::result::Result<tonic::Response<super::GetStationDetailsResponse>, tonic::Status>
189
-
{
190
-
self.inner.ready().await.map_err(|e| {
191
-
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
192
-
})?;
0
0
0
0
0
0
0
193
let codec = tonic::codec::ProstCodec::default();
194
let path = http::uri::PathAndQuery::from_static(
195
"/tunein.v1alpha1.BrowseService/GetStationDetails",
196
);
197
let mut req = request.into_request();
198
-
req.extensions_mut().insert(GrpcMethod::new(
199
-
"tunein.v1alpha1.BrowseService",
200
-
"GetStationDetails",
201
-
));
202
self.inner.unary(req, path, codec).await
203
}
204
pub async fn search(
205
&mut self,
206
request: impl tonic::IntoRequest<super::SearchRequest>,
207
) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
208
-
self.inner.ready().await.map_err(|e| {
209
-
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
210
-
})?;
0
0
0
0
0
211
let codec = tonic::codec::ProstCodec::default();
212
-
let path =
213
-
http::uri::PathAndQuery::from_static("/tunein.v1alpha1.BrowseService/Search");
0
214
let mut req = request.into_request();
215
req.extensions_mut()
216
.insert(GrpcMethod::new("tunein.v1alpha1.BrowseService", "Search"));
···
225
dead_code,
226
missing_docs,
227
clippy::wildcard_imports,
228
-
clippy::let_unit_value
229
)]
230
use tonic::codegen::*;
231
/// Generated trait containing gRPC methods that should be implemented for use with BrowseServiceServer.
···
234
async fn get_categories(
235
&self,
236
request: tonic::Request<super::GetCategoriesRequest>,
237
-
) -> std::result::Result<tonic::Response<super::GetCategoriesResponse>, tonic::Status>;
0
0
0
238
async fn browse_category(
239
&self,
240
request: tonic::Request<super::BrowseCategoryRequest>,
241
-
) -> std::result::Result<tonic::Response<super::BrowseCategoryResponse>, tonic::Status>;
0
0
0
242
async fn get_station_details(
243
&self,
244
request: tonic::Request<super::GetStationDetailsRequest>,
245
-
) -> std::result::Result<tonic::Response<super::GetStationDetailsResponse>, tonic::Status>;
0
0
0
246
async fn search(
247
&self,
248
request: tonic::Request<super::SearchRequest>,
···
269
max_encoding_message_size: None,
270
}
271
}
272
-
pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
0
0
0
273
where
274
F: tonic::service::Interceptor,
275
{
···
324
"/tunein.v1alpha1.BrowseService/GetCategories" => {
325
#[allow(non_camel_case_types)]
326
struct GetCategoriesSvc<T: BrowseService>(pub Arc<T>);
327
-
impl<T: BrowseService> tonic::server::UnaryService<super::GetCategoriesRequest>
328
-
for GetCategoriesSvc<T>
329
-
{
0
330
type Response = super::GetCategoriesResponse;
331
-
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
0
0
0
332
fn call(
333
&mut self,
334
request: tonic::Request<super::GetCategoriesRequest>,
···
365
"/tunein.v1alpha1.BrowseService/BrowseCategory" => {
366
#[allow(non_camel_case_types)]
367
struct BrowseCategorySvc<T: BrowseService>(pub Arc<T>);
368
-
impl<T: BrowseService> tonic::server::UnaryService<super::BrowseCategoryRequest>
369
-
for BrowseCategorySvc<T>
370
-
{
0
371
type Response = super::BrowseCategoryResponse;
372
-
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
0
0
0
373
fn call(
374
&mut self,
375
request: tonic::Request<super::BrowseCategoryRequest>,
···
406
"/tunein.v1alpha1.BrowseService/GetStationDetails" => {
407
#[allow(non_camel_case_types)]
408
struct GetStationDetailsSvc<T: BrowseService>(pub Arc<T>);
409
-
impl<T: BrowseService>
410
-
tonic::server::UnaryService<super::GetStationDetailsRequest>
411
-
for GetStationDetailsSvc<T>
412
-
{
413
type Response = super::GetStationDetailsResponse;
414
-
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
0
0
0
415
fn call(
416
&mut self,
417
request: tonic::Request<super::GetStationDetailsRequest>,
418
) -> Self::Future {
419
let inner = Arc::clone(&self.0);
420
let fut = async move {
421
-
<T as BrowseService>::get_station_details(&inner, request).await
0
422
};
423
Box::pin(fut)
424
}
···
448
"/tunein.v1alpha1.BrowseService/Search" => {
449
#[allow(non_camel_case_types)]
450
struct SearchSvc<T: BrowseService>(pub Arc<T>);
451
-
impl<T: BrowseService> tonic::server::UnaryService<super::SearchRequest> for SearchSvc<T> {
0
0
0
452
type Response = super::SearchResponse;
453
-
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
0
0
0
454
fn call(
455
&mut self,
456
request: tonic::Request<super::SearchRequest>,
457
) -> Self::Future {
458
let inner = Arc::clone(&self.0);
459
-
let fut =
460
-
async move { <T as BrowseService>::search(&inner, request).await };
0
461
Box::pin(fut)
462
}
463
}
···
483
};
484
Box::pin(fut)
485
}
486
-
_ => Box::pin(async move {
487
-
let mut response = http::Response::new(empty_body());
488
-
let headers = response.headers_mut();
489
-
headers.insert(
490
-
tonic::Status::GRPC_STATUS,
491
-
(tonic::Code::Unimplemented as i32).into(),
492
-
);
493
-
headers.insert(
494
-
http::header::CONTENT_TYPE,
495
-
tonic::metadata::GRPC_CONTENT_TYPE,
496
-
);
497
-
Ok(response)
498
-
}),
0
0
0
0
499
}
500
}
501
}
···
541
dead_code,
542
missing_docs,
543
clippy::wildcard_imports,
544
-
clippy::let_unit_value
545
)]
546
-
use tonic::codegen::http::Uri;
547
use tonic::codegen::*;
0
548
#[derive(Debug, Clone)]
549
pub struct PlaybackServiceClient<T> {
550
inner: tonic::client::Grpc<T>,
···
588
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
589
>,
590
>,
591
-
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
592
-
Into<StdError> + std::marker::Send + std::marker::Sync,
0
593
{
594
PlaybackServiceClient::new(InterceptedService::new(inner, interceptor))
595
}
···
628
&mut self,
629
request: impl tonic::IntoRequest<super::PlayRequest>,
630
) -> std::result::Result<tonic::Response<super::PlayResponse>, tonic::Status> {
631
-
self.inner.ready().await.map_err(|e| {
632
-
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
633
-
})?;
0
0
0
0
0
634
let codec = tonic::codec::ProstCodec::default();
635
-
let path =
636
-
http::uri::PathAndQuery::from_static("/tunein.v1alpha1.PlaybackService/Play");
0
637
let mut req = request.into_request();
638
req.extensions_mut()
639
.insert(GrpcMethod::new("tunein.v1alpha1.PlaybackService", "Play"));
···
643
&mut self,
644
request: impl tonic::IntoRequest<super::StopRequest>,
645
) -> std::result::Result<tonic::Response<super::StopResponse>, tonic::Status> {
646
-
self.inner.ready().await.map_err(|e| {
647
-
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
648
-
})?;
0
0
0
0
0
649
let codec = tonic::codec::ProstCodec::default();
650
-
let path =
651
-
http::uri::PathAndQuery::from_static("/tunein.v1alpha1.PlaybackService/Stop");
0
652
let mut req = request.into_request();
653
req.extensions_mut()
654
.insert(GrpcMethod::new("tunein.v1alpha1.PlaybackService", "Stop"));
···
657
pub async fn play_or_pause(
658
&mut self,
659
request: impl tonic::IntoRequest<super::PlayOrPauseRequest>,
660
-
) -> std::result::Result<tonic::Response<super::PlayOrPauseResponse>, tonic::Status>
661
-
{
662
-
self.inner.ready().await.map_err(|e| {
663
-
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
664
-
})?;
0
0
0
0
0
0
0
665
let codec = tonic::codec::ProstCodec::default();
666
let path = http::uri::PathAndQuery::from_static(
667
"/tunein.v1alpha1.PlaybackService/PlayOrPause",
668
);
669
let mut req = request.into_request();
670
-
req.extensions_mut().insert(GrpcMethod::new(
671
-
"tunein.v1alpha1.PlaybackService",
672
-
"PlayOrPause",
673
-
));
674
self.inner.unary(req, path, codec).await
675
}
676
}
···
682
dead_code,
683
missing_docs,
684
clippy::wildcard_imports,
685
-
clippy::let_unit_value
686
)]
687
use tonic::codegen::*;
688
/// Generated trait containing gRPC methods that should be implemented for use with PlaybackServiceServer.
···
699
async fn play_or_pause(
700
&self,
701
request: tonic::Request<super::PlayOrPauseRequest>,
702
-
) -> std::result::Result<tonic::Response<super::PlayOrPauseResponse>, tonic::Status>;
0
0
0
703
}
704
#[derive(Debug)]
705
pub struct PlaybackServiceServer<T> {
···
722
max_encoding_message_size: None,
723
}
724
}
725
-
pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
0
0
0
726
where
727
F: tonic::service::Interceptor,
728
{
···
777
"/tunein.v1alpha1.PlaybackService/Play" => {
778
#[allow(non_camel_case_types)]
779
struct PlaySvc<T: PlaybackService>(pub Arc<T>);
780
-
impl<T: PlaybackService> tonic::server::UnaryService<super::PlayRequest> for PlaySvc<T> {
0
0
781
type Response = super::PlayResponse;
782
-
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
0
0
0
783
fn call(
784
&mut self,
785
request: tonic::Request<super::PlayRequest>,
786
) -> Self::Future {
787
let inner = Arc::clone(&self.0);
788
-
let fut =
789
-
async move { <T as PlaybackService>::play(&inner, request).await };
0
790
Box::pin(fut)
791
}
792
}
···
815
"/tunein.v1alpha1.PlaybackService/Stop" => {
816
#[allow(non_camel_case_types)]
817
struct StopSvc<T: PlaybackService>(pub Arc<T>);
818
-
impl<T: PlaybackService> tonic::server::UnaryService<super::StopRequest> for StopSvc<T> {
0
0
819
type Response = super::StopResponse;
820
-
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
0
0
0
821
fn call(
822
&mut self,
823
request: tonic::Request<super::StopRequest>,
824
) -> Self::Future {
825
let inner = Arc::clone(&self.0);
826
-
let fut =
827
-
async move { <T as PlaybackService>::stop(&inner, request).await };
0
828
Box::pin(fut)
829
}
830
}
···
853
"/tunein.v1alpha1.PlaybackService/PlayOrPause" => {
854
#[allow(non_camel_case_types)]
855
struct PlayOrPauseSvc<T: PlaybackService>(pub Arc<T>);
856
-
impl<T: PlaybackService> tonic::server::UnaryService<super::PlayOrPauseRequest>
857
-
for PlayOrPauseSvc<T>
858
-
{
0
859
type Response = super::PlayOrPauseResponse;
860
-
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
0
0
0
861
fn call(
862
&mut self,
863
request: tonic::Request<super::PlayOrPauseRequest>,
···
891
};
892
Box::pin(fut)
893
}
894
-
_ => Box::pin(async move {
895
-
let mut response = http::Response::new(empty_body());
896
-
let headers = response.headers_mut();
897
-
headers.insert(
898
-
tonic::Status::GRPC_STATUS,
899
-
(tonic::Code::Unimplemented as i32).into(),
900
-
);
901
-
headers.insert(
902
-
http::header::CONTENT_TYPE,
903
-
tonic::metadata::GRPC_CONTENT_TYPE,
904
-
);
905
-
Ok(response)
906
-
}),
0
0
0
0
907
}
908
}
909
}
···
39
#[derive(Clone, PartialEq, ::prost::Message)]
40
pub struct GetStationDetailsResponse {
41
#[prost(message, optional, tag = "1")]
42
+
pub station_link_details: ::core::option::Option<
43
+
super::super::objects::v1alpha1::StationLinkDetails,
44
+
>,
45
}
46
#[derive(Clone, PartialEq, ::prost::Message)]
47
pub struct SearchRequest {
···
62
dead_code,
63
missing_docs,
64
clippy::wildcard_imports,
65
+
clippy::let_unit_value,
66
)]
0
67
use tonic::codegen::*;
68
+
use tonic::codegen::http::Uri;
69
#[derive(Debug, Clone)]
70
pub struct BrowseServiceClient<T> {
71
inner: tonic::client::Grpc<T>,
···
109
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
110
>,
111
>,
112
+
<T as tonic::codegen::Service<
113
+
http::Request<tonic::body::BoxBody>,
114
+
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
115
{
116
BrowseServiceClient::new(InterceptedService::new(inner, interceptor))
117
}
···
149
pub async fn get_categories(
150
&mut self,
151
request: impl tonic::IntoRequest<super::GetCategoriesRequest>,
152
+
) -> std::result::Result<
153
+
tonic::Response<super::GetCategoriesResponse>,
154
+
tonic::Status,
155
+
> {
156
+
self.inner
157
+
.ready()
158
+
.await
159
+
.map_err(|e| {
160
+
tonic::Status::unknown(
161
+
format!("Service was not ready: {}", e.into()),
162
+
)
163
+
})?;
164
let codec = tonic::codec::ProstCodec::default();
165
let path = http::uri::PathAndQuery::from_static(
166
"/tunein.v1alpha1.BrowseService/GetCategories",
167
);
168
let mut req = request.into_request();
169
+
req.extensions_mut()
170
+
.insert(
171
+
GrpcMethod::new("tunein.v1alpha1.BrowseService", "GetCategories"),
172
+
);
173
self.inner.unary(req, path, codec).await
174
}
175
pub async fn browse_category(
176
&mut self,
177
request: impl tonic::IntoRequest<super::BrowseCategoryRequest>,
178
+
) -> std::result::Result<
179
+
tonic::Response<super::BrowseCategoryResponse>,
180
+
tonic::Status,
181
+
> {
182
+
self.inner
183
+
.ready()
184
+
.await
185
+
.map_err(|e| {
186
+
tonic::Status::unknown(
187
+
format!("Service was not ready: {}", e.into()),
188
+
)
189
+
})?;
190
let codec = tonic::codec::ProstCodec::default();
191
let path = http::uri::PathAndQuery::from_static(
192
"/tunein.v1alpha1.BrowseService/BrowseCategory",
193
);
194
let mut req = request.into_request();
195
+
req.extensions_mut()
196
+
.insert(
197
+
GrpcMethod::new("tunein.v1alpha1.BrowseService", "BrowseCategory"),
198
+
);
199
self.inner.unary(req, path, codec).await
200
}
201
pub async fn get_station_details(
202
&mut self,
203
request: impl tonic::IntoRequest<super::GetStationDetailsRequest>,
204
+
) -> std::result::Result<
205
+
tonic::Response<super::GetStationDetailsResponse>,
206
+
tonic::Status,
207
+
> {
208
+
self.inner
209
+
.ready()
210
+
.await
211
+
.map_err(|e| {
212
+
tonic::Status::unknown(
213
+
format!("Service was not ready: {}", e.into()),
214
+
)
215
+
})?;
216
let codec = tonic::codec::ProstCodec::default();
217
let path = http::uri::PathAndQuery::from_static(
218
"/tunein.v1alpha1.BrowseService/GetStationDetails",
219
);
220
let mut req = request.into_request();
221
+
req.extensions_mut()
222
+
.insert(
223
+
GrpcMethod::new("tunein.v1alpha1.BrowseService", "GetStationDetails"),
224
+
);
225
self.inner.unary(req, path, codec).await
226
}
227
pub async fn search(
228
&mut self,
229
request: impl tonic::IntoRequest<super::SearchRequest>,
230
) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
231
+
self.inner
232
+
.ready()
233
+
.await
234
+
.map_err(|e| {
235
+
tonic::Status::unknown(
236
+
format!("Service was not ready: {}", e.into()),
237
+
)
238
+
})?;
239
let codec = tonic::codec::ProstCodec::default();
240
+
let path = http::uri::PathAndQuery::from_static(
241
+
"/tunein.v1alpha1.BrowseService/Search",
242
+
);
243
let mut req = request.into_request();
244
req.extensions_mut()
245
.insert(GrpcMethod::new("tunein.v1alpha1.BrowseService", "Search"));
···
254
dead_code,
255
missing_docs,
256
clippy::wildcard_imports,
257
+
clippy::let_unit_value,
258
)]
259
use tonic::codegen::*;
260
/// Generated trait containing gRPC methods that should be implemented for use with BrowseServiceServer.
···
263
async fn get_categories(
264
&self,
265
request: tonic::Request<super::GetCategoriesRequest>,
266
+
) -> std::result::Result<
267
+
tonic::Response<super::GetCategoriesResponse>,
268
+
tonic::Status,
269
+
>;
270
async fn browse_category(
271
&self,
272
request: tonic::Request<super::BrowseCategoryRequest>,
273
+
) -> std::result::Result<
274
+
tonic::Response<super::BrowseCategoryResponse>,
275
+
tonic::Status,
276
+
>;
277
async fn get_station_details(
278
&self,
279
request: tonic::Request<super::GetStationDetailsRequest>,
280
+
) -> std::result::Result<
281
+
tonic::Response<super::GetStationDetailsResponse>,
282
+
tonic::Status,
283
+
>;
284
async fn search(
285
&self,
286
request: tonic::Request<super::SearchRequest>,
···
307
max_encoding_message_size: None,
308
}
309
}
310
+
pub fn with_interceptor<F>(
311
+
inner: T,
312
+
interceptor: F,
313
+
) -> InterceptedService<Self, F>
314
where
315
F: tonic::service::Interceptor,
316
{
···
365
"/tunein.v1alpha1.BrowseService/GetCategories" => {
366
#[allow(non_camel_case_types)]
367
struct GetCategoriesSvc<T: BrowseService>(pub Arc<T>);
368
+
impl<
369
+
T: BrowseService,
370
+
> tonic::server::UnaryService<super::GetCategoriesRequest>
371
+
for GetCategoriesSvc<T> {
372
type Response = super::GetCategoriesResponse;
373
+
type Future = BoxFuture<
374
+
tonic::Response<Self::Response>,
375
+
tonic::Status,
376
+
>;
377
fn call(
378
&mut self,
379
request: tonic::Request<super::GetCategoriesRequest>,
···
410
"/tunein.v1alpha1.BrowseService/BrowseCategory" => {
411
#[allow(non_camel_case_types)]
412
struct BrowseCategorySvc<T: BrowseService>(pub Arc<T>);
413
+
impl<
414
+
T: BrowseService,
415
+
> tonic::server::UnaryService<super::BrowseCategoryRequest>
416
+
for BrowseCategorySvc<T> {
417
type Response = super::BrowseCategoryResponse;
418
+
type Future = BoxFuture<
419
+
tonic::Response<Self::Response>,
420
+
tonic::Status,
421
+
>;
422
fn call(
423
&mut self,
424
request: tonic::Request<super::BrowseCategoryRequest>,
···
455
"/tunein.v1alpha1.BrowseService/GetStationDetails" => {
456
#[allow(non_camel_case_types)]
457
struct GetStationDetailsSvc<T: BrowseService>(pub Arc<T>);
458
+
impl<
459
+
T: BrowseService,
460
+
> tonic::server::UnaryService<super::GetStationDetailsRequest>
461
+
for GetStationDetailsSvc<T> {
462
type Response = super::GetStationDetailsResponse;
463
+
type Future = BoxFuture<
464
+
tonic::Response<Self::Response>,
465
+
tonic::Status,
466
+
>;
467
fn call(
468
&mut self,
469
request: tonic::Request<super::GetStationDetailsRequest>,
470
) -> Self::Future {
471
let inner = Arc::clone(&self.0);
472
let fut = async move {
473
+
<T as BrowseService>::get_station_details(&inner, request)
474
+
.await
475
};
476
Box::pin(fut)
477
}
···
501
"/tunein.v1alpha1.BrowseService/Search" => {
502
#[allow(non_camel_case_types)]
503
struct SearchSvc<T: BrowseService>(pub Arc<T>);
504
+
impl<
505
+
T: BrowseService,
506
+
> tonic::server::UnaryService<super::SearchRequest>
507
+
for SearchSvc<T> {
508
type Response = super::SearchResponse;
509
+
type Future = BoxFuture<
510
+
tonic::Response<Self::Response>,
511
+
tonic::Status,
512
+
>;
513
fn call(
514
&mut self,
515
request: tonic::Request<super::SearchRequest>,
516
) -> Self::Future {
517
let inner = Arc::clone(&self.0);
518
+
let fut = async move {
519
+
<T as BrowseService>::search(&inner, request).await
520
+
};
521
Box::pin(fut)
522
}
523
}
···
543
};
544
Box::pin(fut)
545
}
546
+
_ => {
547
+
Box::pin(async move {
548
+
let mut response = http::Response::new(empty_body());
549
+
let headers = response.headers_mut();
550
+
headers
551
+
.insert(
552
+
tonic::Status::GRPC_STATUS,
553
+
(tonic::Code::Unimplemented as i32).into(),
554
+
);
555
+
headers
556
+
.insert(
557
+
http::header::CONTENT_TYPE,
558
+
tonic::metadata::GRPC_CONTENT_TYPE,
559
+
);
560
+
Ok(response)
561
+
})
562
+
}
563
}
564
}
565
}
···
605
dead_code,
606
missing_docs,
607
clippy::wildcard_imports,
608
+
clippy::let_unit_value,
609
)]
0
610
use tonic::codegen::*;
611
+
use tonic::codegen::http::Uri;
612
#[derive(Debug, Clone)]
613
pub struct PlaybackServiceClient<T> {
614
inner: tonic::client::Grpc<T>,
···
652
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
653
>,
654
>,
655
+
<T as tonic::codegen::Service<
656
+
http::Request<tonic::body::BoxBody>,
657
+
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
658
{
659
PlaybackServiceClient::new(InterceptedService::new(inner, interceptor))
660
}
···
693
&mut self,
694
request: impl tonic::IntoRequest<super::PlayRequest>,
695
) -> std::result::Result<tonic::Response<super::PlayResponse>, tonic::Status> {
696
+
self.inner
697
+
.ready()
698
+
.await
699
+
.map_err(|e| {
700
+
tonic::Status::unknown(
701
+
format!("Service was not ready: {}", e.into()),
702
+
)
703
+
})?;
704
let codec = tonic::codec::ProstCodec::default();
705
+
let path = http::uri::PathAndQuery::from_static(
706
+
"/tunein.v1alpha1.PlaybackService/Play",
707
+
);
708
let mut req = request.into_request();
709
req.extensions_mut()
710
.insert(GrpcMethod::new("tunein.v1alpha1.PlaybackService", "Play"));
···
714
&mut self,
715
request: impl tonic::IntoRequest<super::StopRequest>,
716
) -> std::result::Result<tonic::Response<super::StopResponse>, tonic::Status> {
717
+
self.inner
718
+
.ready()
719
+
.await
720
+
.map_err(|e| {
721
+
tonic::Status::unknown(
722
+
format!("Service was not ready: {}", e.into()),
723
+
)
724
+
})?;
725
let codec = tonic::codec::ProstCodec::default();
726
+
let path = http::uri::PathAndQuery::from_static(
727
+
"/tunein.v1alpha1.PlaybackService/Stop",
728
+
);
729
let mut req = request.into_request();
730
req.extensions_mut()
731
.insert(GrpcMethod::new("tunein.v1alpha1.PlaybackService", "Stop"));
···
734
pub async fn play_or_pause(
735
&mut self,
736
request: impl tonic::IntoRequest<super::PlayOrPauseRequest>,
737
+
) -> std::result::Result<
738
+
tonic::Response<super::PlayOrPauseResponse>,
739
+
tonic::Status,
740
+
> {
741
+
self.inner
742
+
.ready()
743
+
.await
744
+
.map_err(|e| {
745
+
tonic::Status::unknown(
746
+
format!("Service was not ready: {}", e.into()),
747
+
)
748
+
})?;
749
let codec = tonic::codec::ProstCodec::default();
750
let path = http::uri::PathAndQuery::from_static(
751
"/tunein.v1alpha1.PlaybackService/PlayOrPause",
752
);
753
let mut req = request.into_request();
754
+
req.extensions_mut()
755
+
.insert(
756
+
GrpcMethod::new("tunein.v1alpha1.PlaybackService", "PlayOrPause"),
757
+
);
758
self.inner.unary(req, path, codec).await
759
}
760
}
···
766
dead_code,
767
missing_docs,
768
clippy::wildcard_imports,
769
+
clippy::let_unit_value,
770
)]
771
use tonic::codegen::*;
772
/// Generated trait containing gRPC methods that should be implemented for use with PlaybackServiceServer.
···
783
async fn play_or_pause(
784
&self,
785
request: tonic::Request<super::PlayOrPauseRequest>,
786
+
) -> std::result::Result<
787
+
tonic::Response<super::PlayOrPauseResponse>,
788
+
tonic::Status,
789
+
>;
790
}
791
#[derive(Debug)]
792
pub struct PlaybackServiceServer<T> {
···
809
max_encoding_message_size: None,
810
}
811
}
812
+
pub fn with_interceptor<F>(
813
+
inner: T,
814
+
interceptor: F,
815
+
) -> InterceptedService<Self, F>
816
where
817
F: tonic::service::Interceptor,
818
{
···
867
"/tunein.v1alpha1.PlaybackService/Play" => {
868
#[allow(non_camel_case_types)]
869
struct PlaySvc<T: PlaybackService>(pub Arc<T>);
870
+
impl<
871
+
T: PlaybackService,
872
+
> tonic::server::UnaryService<super::PlayRequest> for PlaySvc<T> {
873
type Response = super::PlayResponse;
874
+
type Future = BoxFuture<
875
+
tonic::Response<Self::Response>,
876
+
tonic::Status,
877
+
>;
878
fn call(
879
&mut self,
880
request: tonic::Request<super::PlayRequest>,
881
) -> Self::Future {
882
let inner = Arc::clone(&self.0);
883
+
let fut = async move {
884
+
<T as PlaybackService>::play(&inner, request).await
885
+
};
886
Box::pin(fut)
887
}
888
}
···
911
"/tunein.v1alpha1.PlaybackService/Stop" => {
912
#[allow(non_camel_case_types)]
913
struct StopSvc<T: PlaybackService>(pub Arc<T>);
914
+
impl<
915
+
T: PlaybackService,
916
+
> tonic::server::UnaryService<super::StopRequest> for StopSvc<T> {
917
type Response = super::StopResponse;
918
+
type Future = BoxFuture<
919
+
tonic::Response<Self::Response>,
920
+
tonic::Status,
921
+
>;
922
fn call(
923
&mut self,
924
request: tonic::Request<super::StopRequest>,
925
) -> Self::Future {
926
let inner = Arc::clone(&self.0);
927
+
let fut = async move {
928
+
<T as PlaybackService>::stop(&inner, request).await
929
+
};
930
Box::pin(fut)
931
}
932
}
···
955
"/tunein.v1alpha1.PlaybackService/PlayOrPause" => {
956
#[allow(non_camel_case_types)]
957
struct PlayOrPauseSvc<T: PlaybackService>(pub Arc<T>);
958
+
impl<
959
+
T: PlaybackService,
960
+
> tonic::server::UnaryService<super::PlayOrPauseRequest>
961
+
for PlayOrPauseSvc<T> {
962
type Response = super::PlayOrPauseResponse;
963
+
type Future = BoxFuture<
964
+
tonic::Response<Self::Response>,
965
+
tonic::Status,
966
+
>;
967
fn call(
968
&mut self,
969
request: tonic::Request<super::PlayOrPauseRequest>,
···
997
};
998
Box::pin(fut)
999
}
1000
+
_ => {
1001
+
Box::pin(async move {
1002
+
let mut response = http::Response::new(empty_body());
1003
+
let headers = response.headers_mut();
1004
+
headers
1005
+
.insert(
1006
+
tonic::Status::GRPC_STATUS,
1007
+
(tonic::Code::Unimplemented as i32).into(),
1008
+
);
1009
+
headers
1010
+
.insert(
1011
+
http::header::CONTENT_TYPE,
1012
+
tonic::metadata::GRPC_CONTENT_TYPE,
1013
+
);
1014
+
Ok(response)
1015
+
})
1016
+
}
1017
}
1018
}
1019
}