1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_wlan_softmac__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct WlanSoftmacBridgeStartRequest {
16 pub ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
17 pub ethernet_tx: u64,
18 pub wlan_rx: u64,
19}
20
21impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
22 for WlanSoftmacBridgeStartRequest
23{
24}
25
26#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27pub struct WlanSoftmacBridgeStartResponse {
28 pub sme_channel: fidl::Channel,
29}
30
31impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
32 for WlanSoftmacBridgeStartResponse
33{
34}
35
36#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
37pub struct EthernetRxMarker;
38
39impl fidl::endpoints::ProtocolMarker for EthernetRxMarker {
40 type Proxy = EthernetRxProxy;
41 type RequestStream = EthernetRxRequestStream;
42 #[cfg(target_os = "fuchsia")]
43 type SynchronousProxy = EthernetRxSynchronousProxy;
44
45 const DEBUG_NAME: &'static str = "(anonymous) EthernetRx";
46}
47pub type EthernetRxTransferResult = Result<(), i32>;
48
49pub trait EthernetRxProxyInterface: Send + Sync {
50 type TransferResponseFut: std::future::Future<Output = Result<EthernetRxTransferResult, fidl::Error>>
51 + Send;
52 fn r#transfer(&self, payload: &EthernetRxTransferRequest) -> Self::TransferResponseFut;
53}
54#[derive(Debug)]
55#[cfg(target_os = "fuchsia")]
56pub struct EthernetRxSynchronousProxy {
57 client: fidl::client::sync::Client,
58}
59
60#[cfg(target_os = "fuchsia")]
61impl fidl::endpoints::SynchronousProxy for EthernetRxSynchronousProxy {
62 type Proxy = EthernetRxProxy;
63 type Protocol = EthernetRxMarker;
64
65 fn from_channel(inner: fidl::Channel) -> Self {
66 Self::new(inner)
67 }
68
69 fn into_channel(self) -> fidl::Channel {
70 self.client.into_channel()
71 }
72
73 fn as_channel(&self) -> &fidl::Channel {
74 self.client.as_channel()
75 }
76}
77
78#[cfg(target_os = "fuchsia")]
79impl EthernetRxSynchronousProxy {
80 pub fn new(channel: fidl::Channel) -> Self {
81 Self { client: fidl::client::sync::Client::new(channel) }
82 }
83
84 pub fn into_channel(self) -> fidl::Channel {
85 self.client.into_channel()
86 }
87
88 pub fn wait_for_event(
91 &self,
92 deadline: zx::MonotonicInstant,
93 ) -> Result<EthernetRxEvent, fidl::Error> {
94 EthernetRxEvent::decode(self.client.wait_for_event::<EthernetRxMarker>(deadline)?)
95 }
96
97 pub fn r#transfer(
98 &self,
99 mut payload: &EthernetRxTransferRequest,
100 ___deadline: zx::MonotonicInstant,
101 ) -> Result<EthernetRxTransferResult, fidl::Error> {
102 let _response = self.client.send_query::<
103 EthernetRxTransferRequest,
104 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
105 EthernetRxMarker,
106 >(
107 payload,
108 0x199ff3498ef8a22a,
109 fidl::encoding::DynamicFlags::empty(),
110 ___deadline,
111 )?;
112 Ok(_response.map(|x| x))
113 }
114}
115
116#[cfg(target_os = "fuchsia")]
117impl From<EthernetRxSynchronousProxy> for zx::NullableHandle {
118 fn from(value: EthernetRxSynchronousProxy) -> Self {
119 value.into_channel().into()
120 }
121}
122
123#[cfg(target_os = "fuchsia")]
124impl From<fidl::Channel> for EthernetRxSynchronousProxy {
125 fn from(value: fidl::Channel) -> Self {
126 Self::new(value)
127 }
128}
129
130#[cfg(target_os = "fuchsia")]
131impl fidl::endpoints::FromClient for EthernetRxSynchronousProxy {
132 type Protocol = EthernetRxMarker;
133
134 fn from_client(value: fidl::endpoints::ClientEnd<EthernetRxMarker>) -> Self {
135 Self::new(value.into_channel())
136 }
137}
138
139#[derive(Debug, Clone)]
140pub struct EthernetRxProxy {
141 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
142}
143
144impl fidl::endpoints::Proxy for EthernetRxProxy {
145 type Protocol = EthernetRxMarker;
146
147 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
148 Self::new(inner)
149 }
150
151 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
152 self.client.into_channel().map_err(|client| Self { client })
153 }
154
155 fn as_channel(&self) -> &::fidl::AsyncChannel {
156 self.client.as_channel()
157 }
158}
159
160impl EthernetRxProxy {
161 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
163 let protocol_name = <EthernetRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
164 Self { client: fidl::client::Client::new(channel, protocol_name) }
165 }
166
167 pub fn take_event_stream(&self) -> EthernetRxEventStream {
173 EthernetRxEventStream { event_receiver: self.client.take_event_receiver() }
174 }
175
176 pub fn r#transfer(
177 &self,
178 mut payload: &EthernetRxTransferRequest,
179 ) -> fidl::client::QueryResponseFut<
180 EthernetRxTransferResult,
181 fidl::encoding::DefaultFuchsiaResourceDialect,
182 > {
183 EthernetRxProxyInterface::r#transfer(self, payload)
184 }
185}
186
187impl EthernetRxProxyInterface for EthernetRxProxy {
188 type TransferResponseFut = fidl::client::QueryResponseFut<
189 EthernetRxTransferResult,
190 fidl::encoding::DefaultFuchsiaResourceDialect,
191 >;
192 fn r#transfer(&self, mut payload: &EthernetRxTransferRequest) -> Self::TransferResponseFut {
193 fn _decode(
194 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
195 ) -> Result<EthernetRxTransferResult, fidl::Error> {
196 let _response = fidl::client::decode_transaction_body::<
197 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
198 fidl::encoding::DefaultFuchsiaResourceDialect,
199 0x199ff3498ef8a22a,
200 >(_buf?)?;
201 Ok(_response.map(|x| x))
202 }
203 self.client.send_query_and_decode::<EthernetRxTransferRequest, EthernetRxTransferResult>(
204 payload,
205 0x199ff3498ef8a22a,
206 fidl::encoding::DynamicFlags::empty(),
207 _decode,
208 )
209 }
210}
211
212pub struct EthernetRxEventStream {
213 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
214}
215
216impl std::marker::Unpin for EthernetRxEventStream {}
217
218impl futures::stream::FusedStream for EthernetRxEventStream {
219 fn is_terminated(&self) -> bool {
220 self.event_receiver.is_terminated()
221 }
222}
223
224impl futures::Stream for EthernetRxEventStream {
225 type Item = Result<EthernetRxEvent, fidl::Error>;
226
227 fn poll_next(
228 mut self: std::pin::Pin<&mut Self>,
229 cx: &mut std::task::Context<'_>,
230 ) -> std::task::Poll<Option<Self::Item>> {
231 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
232 &mut self.event_receiver,
233 cx
234 )?) {
235 Some(buf) => std::task::Poll::Ready(Some(EthernetRxEvent::decode(buf))),
236 None => std::task::Poll::Ready(None),
237 }
238 }
239}
240
241#[derive(Debug)]
242pub enum EthernetRxEvent {}
243
244impl EthernetRxEvent {
245 fn decode(
247 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
248 ) -> Result<EthernetRxEvent, fidl::Error> {
249 let (bytes, _handles) = buf.split_mut();
250 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
251 debug_assert_eq!(tx_header.tx_id, 0);
252 match tx_header.ordinal {
253 _ => Err(fidl::Error::UnknownOrdinal {
254 ordinal: tx_header.ordinal,
255 protocol_name: <EthernetRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
256 }),
257 }
258 }
259}
260
261pub struct EthernetRxRequestStream {
263 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
264 is_terminated: bool,
265}
266
267impl std::marker::Unpin for EthernetRxRequestStream {}
268
269impl futures::stream::FusedStream for EthernetRxRequestStream {
270 fn is_terminated(&self) -> bool {
271 self.is_terminated
272 }
273}
274
275impl fidl::endpoints::RequestStream for EthernetRxRequestStream {
276 type Protocol = EthernetRxMarker;
277 type ControlHandle = EthernetRxControlHandle;
278
279 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
280 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
281 }
282
283 fn control_handle(&self) -> Self::ControlHandle {
284 EthernetRxControlHandle { inner: self.inner.clone() }
285 }
286
287 fn into_inner(
288 self,
289 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
290 {
291 (self.inner, self.is_terminated)
292 }
293
294 fn from_inner(
295 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
296 is_terminated: bool,
297 ) -> Self {
298 Self { inner, is_terminated }
299 }
300}
301
302impl futures::Stream for EthernetRxRequestStream {
303 type Item = Result<EthernetRxRequest, fidl::Error>;
304
305 fn poll_next(
306 mut self: std::pin::Pin<&mut Self>,
307 cx: &mut std::task::Context<'_>,
308 ) -> std::task::Poll<Option<Self::Item>> {
309 let this = &mut *self;
310 if this.inner.check_shutdown(cx) {
311 this.is_terminated = true;
312 return std::task::Poll::Ready(None);
313 }
314 if this.is_terminated {
315 panic!("polled EthernetRxRequestStream after completion");
316 }
317 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
318 |bytes, handles| {
319 match this.inner.channel().read_etc(cx, bytes, handles) {
320 std::task::Poll::Ready(Ok(())) => {}
321 std::task::Poll::Pending => return std::task::Poll::Pending,
322 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
323 this.is_terminated = true;
324 return std::task::Poll::Ready(None);
325 }
326 std::task::Poll::Ready(Err(e)) => {
327 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
328 e.into(),
329 ))));
330 }
331 }
332
333 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
335
336 std::task::Poll::Ready(Some(match header.ordinal {
337 0x199ff3498ef8a22a => {
338 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
339 let mut req = fidl::new_empty!(
340 EthernetRxTransferRequest,
341 fidl::encoding::DefaultFuchsiaResourceDialect
342 );
343 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<EthernetRxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
344 let control_handle = EthernetRxControlHandle { inner: this.inner.clone() };
345 Ok(EthernetRxRequest::Transfer {
346 payload: req,
347 responder: EthernetRxTransferResponder {
348 control_handle: std::mem::ManuallyDrop::new(control_handle),
349 tx_id: header.tx_id,
350 },
351 })
352 }
353 _ => Err(fidl::Error::UnknownOrdinal {
354 ordinal: header.ordinal,
355 protocol_name:
356 <EthernetRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
357 }),
358 }))
359 },
360 )
361 }
362}
363
364#[derive(Debug)]
373pub enum EthernetRxRequest {
374 Transfer { payload: EthernetRxTransferRequest, responder: EthernetRxTransferResponder },
375}
376
377impl EthernetRxRequest {
378 #[allow(irrefutable_let_patterns)]
379 pub fn into_transfer(self) -> Option<(EthernetRxTransferRequest, EthernetRxTransferResponder)> {
380 if let EthernetRxRequest::Transfer { payload, responder } = self {
381 Some((payload, responder))
382 } else {
383 None
384 }
385 }
386
387 pub fn method_name(&self) -> &'static str {
389 match *self {
390 EthernetRxRequest::Transfer { .. } => "transfer",
391 }
392 }
393}
394
395#[derive(Debug, Clone)]
396pub struct EthernetRxControlHandle {
397 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
398}
399
400impl fidl::endpoints::ControlHandle for EthernetRxControlHandle {
401 fn shutdown(&self) {
402 self.inner.shutdown()
403 }
404
405 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
406 self.inner.shutdown_with_epitaph(status)
407 }
408
409 fn is_closed(&self) -> bool {
410 self.inner.channel().is_closed()
411 }
412 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
413 self.inner.channel().on_closed()
414 }
415
416 #[cfg(target_os = "fuchsia")]
417 fn signal_peer(
418 &self,
419 clear_mask: zx::Signals,
420 set_mask: zx::Signals,
421 ) -> Result<(), zx_status::Status> {
422 use fidl::Peered;
423 self.inner.channel().signal_peer(clear_mask, set_mask)
424 }
425}
426
427impl EthernetRxControlHandle {}
428
429#[must_use = "FIDL methods require a response to be sent"]
430#[derive(Debug)]
431pub struct EthernetRxTransferResponder {
432 control_handle: std::mem::ManuallyDrop<EthernetRxControlHandle>,
433 tx_id: u32,
434}
435
436impl std::ops::Drop for EthernetRxTransferResponder {
440 fn drop(&mut self) {
441 self.control_handle.shutdown();
442 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
444 }
445}
446
447impl fidl::endpoints::Responder for EthernetRxTransferResponder {
448 type ControlHandle = EthernetRxControlHandle;
449
450 fn control_handle(&self) -> &EthernetRxControlHandle {
451 &self.control_handle
452 }
453
454 fn drop_without_shutdown(mut self) {
455 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
457 std::mem::forget(self);
459 }
460}
461
462impl EthernetRxTransferResponder {
463 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
467 let _result = self.send_raw(result);
468 if _result.is_err() {
469 self.control_handle.shutdown();
470 }
471 self.drop_without_shutdown();
472 _result
473 }
474
475 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
477 let _result = self.send_raw(result);
478 self.drop_without_shutdown();
479 _result
480 }
481
482 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
483 self.control_handle
484 .inner
485 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
486 result,
487 self.tx_id,
488 0x199ff3498ef8a22a,
489 fidl::encoding::DynamicFlags::empty(),
490 )
491 }
492}
493
494#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
495pub struct EthernetTxMarker;
496
497impl fidl::endpoints::ProtocolMarker for EthernetTxMarker {
498 type Proxy = EthernetTxProxy;
499 type RequestStream = EthernetTxRequestStream;
500 #[cfg(target_os = "fuchsia")]
501 type SynchronousProxy = EthernetTxSynchronousProxy;
502
503 const DEBUG_NAME: &'static str = "(anonymous) EthernetTx";
504}
505pub type EthernetTxTransferResult = Result<(), i32>;
506
507pub trait EthernetTxProxyInterface: Send + Sync {
508 type TransferResponseFut: std::future::Future<Output = Result<EthernetTxTransferResult, fidl::Error>>
509 + Send;
510 fn r#transfer(&self, payload: &EthernetTxTransferRequest) -> Self::TransferResponseFut;
511}
512#[derive(Debug)]
513#[cfg(target_os = "fuchsia")]
514pub struct EthernetTxSynchronousProxy {
515 client: fidl::client::sync::Client,
516}
517
518#[cfg(target_os = "fuchsia")]
519impl fidl::endpoints::SynchronousProxy for EthernetTxSynchronousProxy {
520 type Proxy = EthernetTxProxy;
521 type Protocol = EthernetTxMarker;
522
523 fn from_channel(inner: fidl::Channel) -> Self {
524 Self::new(inner)
525 }
526
527 fn into_channel(self) -> fidl::Channel {
528 self.client.into_channel()
529 }
530
531 fn as_channel(&self) -> &fidl::Channel {
532 self.client.as_channel()
533 }
534}
535
536#[cfg(target_os = "fuchsia")]
537impl EthernetTxSynchronousProxy {
538 pub fn new(channel: fidl::Channel) -> Self {
539 Self { client: fidl::client::sync::Client::new(channel) }
540 }
541
542 pub fn into_channel(self) -> fidl::Channel {
543 self.client.into_channel()
544 }
545
546 pub fn wait_for_event(
549 &self,
550 deadline: zx::MonotonicInstant,
551 ) -> Result<EthernetTxEvent, fidl::Error> {
552 EthernetTxEvent::decode(self.client.wait_for_event::<EthernetTxMarker>(deadline)?)
553 }
554
555 pub fn r#transfer(
556 &self,
557 mut payload: &EthernetTxTransferRequest,
558 ___deadline: zx::MonotonicInstant,
559 ) -> Result<EthernetTxTransferResult, fidl::Error> {
560 let _response = self.client.send_query::<
561 EthernetTxTransferRequest,
562 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
563 EthernetTxMarker,
564 >(
565 payload,
566 0x616dafedf07d00e7,
567 fidl::encoding::DynamicFlags::empty(),
568 ___deadline,
569 )?;
570 Ok(_response.map(|x| x))
571 }
572}
573
574#[cfg(target_os = "fuchsia")]
575impl From<EthernetTxSynchronousProxy> for zx::NullableHandle {
576 fn from(value: EthernetTxSynchronousProxy) -> Self {
577 value.into_channel().into()
578 }
579}
580
581#[cfg(target_os = "fuchsia")]
582impl From<fidl::Channel> for EthernetTxSynchronousProxy {
583 fn from(value: fidl::Channel) -> Self {
584 Self::new(value)
585 }
586}
587
588#[cfg(target_os = "fuchsia")]
589impl fidl::endpoints::FromClient for EthernetTxSynchronousProxy {
590 type Protocol = EthernetTxMarker;
591
592 fn from_client(value: fidl::endpoints::ClientEnd<EthernetTxMarker>) -> Self {
593 Self::new(value.into_channel())
594 }
595}
596
597#[derive(Debug, Clone)]
598pub struct EthernetTxProxy {
599 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
600}
601
602impl fidl::endpoints::Proxy for EthernetTxProxy {
603 type Protocol = EthernetTxMarker;
604
605 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
606 Self::new(inner)
607 }
608
609 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
610 self.client.into_channel().map_err(|client| Self { client })
611 }
612
613 fn as_channel(&self) -> &::fidl::AsyncChannel {
614 self.client.as_channel()
615 }
616}
617
618impl EthernetTxProxy {
619 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
621 let protocol_name = <EthernetTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
622 Self { client: fidl::client::Client::new(channel, protocol_name) }
623 }
624
625 pub fn take_event_stream(&self) -> EthernetTxEventStream {
631 EthernetTxEventStream { event_receiver: self.client.take_event_receiver() }
632 }
633
634 pub fn r#transfer(
635 &self,
636 mut payload: &EthernetTxTransferRequest,
637 ) -> fidl::client::QueryResponseFut<
638 EthernetTxTransferResult,
639 fidl::encoding::DefaultFuchsiaResourceDialect,
640 > {
641 EthernetTxProxyInterface::r#transfer(self, payload)
642 }
643}
644
645impl EthernetTxProxyInterface for EthernetTxProxy {
646 type TransferResponseFut = fidl::client::QueryResponseFut<
647 EthernetTxTransferResult,
648 fidl::encoding::DefaultFuchsiaResourceDialect,
649 >;
650 fn r#transfer(&self, mut payload: &EthernetTxTransferRequest) -> Self::TransferResponseFut {
651 fn _decode(
652 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
653 ) -> Result<EthernetTxTransferResult, fidl::Error> {
654 let _response = fidl::client::decode_transaction_body::<
655 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
656 fidl::encoding::DefaultFuchsiaResourceDialect,
657 0x616dafedf07d00e7,
658 >(_buf?)?;
659 Ok(_response.map(|x| x))
660 }
661 self.client.send_query_and_decode::<EthernetTxTransferRequest, EthernetTxTransferResult>(
662 payload,
663 0x616dafedf07d00e7,
664 fidl::encoding::DynamicFlags::empty(),
665 _decode,
666 )
667 }
668}
669
670pub struct EthernetTxEventStream {
671 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
672}
673
674impl std::marker::Unpin for EthernetTxEventStream {}
675
676impl futures::stream::FusedStream for EthernetTxEventStream {
677 fn is_terminated(&self) -> bool {
678 self.event_receiver.is_terminated()
679 }
680}
681
682impl futures::Stream for EthernetTxEventStream {
683 type Item = Result<EthernetTxEvent, fidl::Error>;
684
685 fn poll_next(
686 mut self: std::pin::Pin<&mut Self>,
687 cx: &mut std::task::Context<'_>,
688 ) -> std::task::Poll<Option<Self::Item>> {
689 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
690 &mut self.event_receiver,
691 cx
692 )?) {
693 Some(buf) => std::task::Poll::Ready(Some(EthernetTxEvent::decode(buf))),
694 None => std::task::Poll::Ready(None),
695 }
696 }
697}
698
699#[derive(Debug)]
700pub enum EthernetTxEvent {}
701
702impl EthernetTxEvent {
703 fn decode(
705 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
706 ) -> Result<EthernetTxEvent, fidl::Error> {
707 let (bytes, _handles) = buf.split_mut();
708 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
709 debug_assert_eq!(tx_header.tx_id, 0);
710 match tx_header.ordinal {
711 _ => Err(fidl::Error::UnknownOrdinal {
712 ordinal: tx_header.ordinal,
713 protocol_name: <EthernetTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
714 }),
715 }
716 }
717}
718
719pub struct EthernetTxRequestStream {
721 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
722 is_terminated: bool,
723}
724
725impl std::marker::Unpin for EthernetTxRequestStream {}
726
727impl futures::stream::FusedStream for EthernetTxRequestStream {
728 fn is_terminated(&self) -> bool {
729 self.is_terminated
730 }
731}
732
733impl fidl::endpoints::RequestStream for EthernetTxRequestStream {
734 type Protocol = EthernetTxMarker;
735 type ControlHandle = EthernetTxControlHandle;
736
737 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
738 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
739 }
740
741 fn control_handle(&self) -> Self::ControlHandle {
742 EthernetTxControlHandle { inner: self.inner.clone() }
743 }
744
745 fn into_inner(
746 self,
747 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
748 {
749 (self.inner, self.is_terminated)
750 }
751
752 fn from_inner(
753 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
754 is_terminated: bool,
755 ) -> Self {
756 Self { inner, is_terminated }
757 }
758}
759
760impl futures::Stream for EthernetTxRequestStream {
761 type Item = Result<EthernetTxRequest, fidl::Error>;
762
763 fn poll_next(
764 mut self: std::pin::Pin<&mut Self>,
765 cx: &mut std::task::Context<'_>,
766 ) -> std::task::Poll<Option<Self::Item>> {
767 let this = &mut *self;
768 if this.inner.check_shutdown(cx) {
769 this.is_terminated = true;
770 return std::task::Poll::Ready(None);
771 }
772 if this.is_terminated {
773 panic!("polled EthernetTxRequestStream after completion");
774 }
775 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
776 |bytes, handles| {
777 match this.inner.channel().read_etc(cx, bytes, handles) {
778 std::task::Poll::Ready(Ok(())) => {}
779 std::task::Poll::Pending => return std::task::Poll::Pending,
780 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
781 this.is_terminated = true;
782 return std::task::Poll::Ready(None);
783 }
784 std::task::Poll::Ready(Err(e)) => {
785 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
786 e.into(),
787 ))));
788 }
789 }
790
791 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
793
794 std::task::Poll::Ready(Some(match header.ordinal {
795 0x616dafedf07d00e7 => {
796 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
797 let mut req = fidl::new_empty!(
798 EthernetTxTransferRequest,
799 fidl::encoding::DefaultFuchsiaResourceDialect
800 );
801 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<EthernetTxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
802 let control_handle = EthernetTxControlHandle { inner: this.inner.clone() };
803 Ok(EthernetTxRequest::Transfer {
804 payload: req,
805 responder: EthernetTxTransferResponder {
806 control_handle: std::mem::ManuallyDrop::new(control_handle),
807 tx_id: header.tx_id,
808 },
809 })
810 }
811 _ => Err(fidl::Error::UnknownOrdinal {
812 ordinal: header.ordinal,
813 protocol_name:
814 <EthernetTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
815 }),
816 }))
817 },
818 )
819 }
820}
821
822#[derive(Debug)]
842pub enum EthernetTxRequest {
843 Transfer { payload: EthernetTxTransferRequest, responder: EthernetTxTransferResponder },
844}
845
846impl EthernetTxRequest {
847 #[allow(irrefutable_let_patterns)]
848 pub fn into_transfer(self) -> Option<(EthernetTxTransferRequest, EthernetTxTransferResponder)> {
849 if let EthernetTxRequest::Transfer { payload, responder } = self {
850 Some((payload, responder))
851 } else {
852 None
853 }
854 }
855
856 pub fn method_name(&self) -> &'static str {
858 match *self {
859 EthernetTxRequest::Transfer { .. } => "transfer",
860 }
861 }
862}
863
864#[derive(Debug, Clone)]
865pub struct EthernetTxControlHandle {
866 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
867}
868
869impl fidl::endpoints::ControlHandle for EthernetTxControlHandle {
870 fn shutdown(&self) {
871 self.inner.shutdown()
872 }
873
874 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
875 self.inner.shutdown_with_epitaph(status)
876 }
877
878 fn is_closed(&self) -> bool {
879 self.inner.channel().is_closed()
880 }
881 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
882 self.inner.channel().on_closed()
883 }
884
885 #[cfg(target_os = "fuchsia")]
886 fn signal_peer(
887 &self,
888 clear_mask: zx::Signals,
889 set_mask: zx::Signals,
890 ) -> Result<(), zx_status::Status> {
891 use fidl::Peered;
892 self.inner.channel().signal_peer(clear_mask, set_mask)
893 }
894}
895
896impl EthernetTxControlHandle {}
897
898#[must_use = "FIDL methods require a response to be sent"]
899#[derive(Debug)]
900pub struct EthernetTxTransferResponder {
901 control_handle: std::mem::ManuallyDrop<EthernetTxControlHandle>,
902 tx_id: u32,
903}
904
905impl std::ops::Drop for EthernetTxTransferResponder {
909 fn drop(&mut self) {
910 self.control_handle.shutdown();
911 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
913 }
914}
915
916impl fidl::endpoints::Responder for EthernetTxTransferResponder {
917 type ControlHandle = EthernetTxControlHandle;
918
919 fn control_handle(&self) -> &EthernetTxControlHandle {
920 &self.control_handle
921 }
922
923 fn drop_without_shutdown(mut self) {
924 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
926 std::mem::forget(self);
928 }
929}
930
931impl EthernetTxTransferResponder {
932 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
936 let _result = self.send_raw(result);
937 if _result.is_err() {
938 self.control_handle.shutdown();
939 }
940 self.drop_without_shutdown();
941 _result
942 }
943
944 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
946 let _result = self.send_raw(result);
947 self.drop_without_shutdown();
948 _result
949 }
950
951 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
952 self.control_handle
953 .inner
954 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
955 result,
956 self.tx_id,
957 0x616dafedf07d00e7,
958 fidl::encoding::DynamicFlags::empty(),
959 )
960 }
961}
962
963#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
964pub struct WlanRxMarker;
965
966impl fidl::endpoints::ProtocolMarker for WlanRxMarker {
967 type Proxy = WlanRxProxy;
968 type RequestStream = WlanRxRequestStream;
969 #[cfg(target_os = "fuchsia")]
970 type SynchronousProxy = WlanRxSynchronousProxy;
971
972 const DEBUG_NAME: &'static str = "(anonymous) WlanRx";
973}
974
975pub trait WlanRxProxyInterface: Send + Sync {
976 type TransferResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
977 fn r#transfer(&self, payload: &WlanRxTransferRequest) -> Self::TransferResponseFut;
978}
979#[derive(Debug)]
980#[cfg(target_os = "fuchsia")]
981pub struct WlanRxSynchronousProxy {
982 client: fidl::client::sync::Client,
983}
984
985#[cfg(target_os = "fuchsia")]
986impl fidl::endpoints::SynchronousProxy for WlanRxSynchronousProxy {
987 type Proxy = WlanRxProxy;
988 type Protocol = WlanRxMarker;
989
990 fn from_channel(inner: fidl::Channel) -> Self {
991 Self::new(inner)
992 }
993
994 fn into_channel(self) -> fidl::Channel {
995 self.client.into_channel()
996 }
997
998 fn as_channel(&self) -> &fidl::Channel {
999 self.client.as_channel()
1000 }
1001}
1002
1003#[cfg(target_os = "fuchsia")]
1004impl WlanRxSynchronousProxy {
1005 pub fn new(channel: fidl::Channel) -> Self {
1006 Self { client: fidl::client::sync::Client::new(channel) }
1007 }
1008
1009 pub fn into_channel(self) -> fidl::Channel {
1010 self.client.into_channel()
1011 }
1012
1013 pub fn wait_for_event(
1016 &self,
1017 deadline: zx::MonotonicInstant,
1018 ) -> Result<WlanRxEvent, fidl::Error> {
1019 WlanRxEvent::decode(self.client.wait_for_event::<WlanRxMarker>(deadline)?)
1020 }
1021
1022 pub fn r#transfer(
1023 &self,
1024 mut payload: &WlanRxTransferRequest,
1025 ___deadline: zx::MonotonicInstant,
1026 ) -> Result<(), fidl::Error> {
1027 let _response = self
1028 .client
1029 .send_query::<WlanRxTransferRequest, fidl::encoding::EmptyPayload, WlanRxMarker>(
1030 payload,
1031 0x2c73b18cbfca6055,
1032 fidl::encoding::DynamicFlags::empty(),
1033 ___deadline,
1034 )?;
1035 Ok(_response)
1036 }
1037}
1038
1039#[cfg(target_os = "fuchsia")]
1040impl From<WlanRxSynchronousProxy> for zx::NullableHandle {
1041 fn from(value: WlanRxSynchronousProxy) -> Self {
1042 value.into_channel().into()
1043 }
1044}
1045
1046#[cfg(target_os = "fuchsia")]
1047impl From<fidl::Channel> for WlanRxSynchronousProxy {
1048 fn from(value: fidl::Channel) -> Self {
1049 Self::new(value)
1050 }
1051}
1052
1053#[cfg(target_os = "fuchsia")]
1054impl fidl::endpoints::FromClient for WlanRxSynchronousProxy {
1055 type Protocol = WlanRxMarker;
1056
1057 fn from_client(value: fidl::endpoints::ClientEnd<WlanRxMarker>) -> Self {
1058 Self::new(value.into_channel())
1059 }
1060}
1061
1062#[derive(Debug, Clone)]
1063pub struct WlanRxProxy {
1064 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1065}
1066
1067impl fidl::endpoints::Proxy for WlanRxProxy {
1068 type Protocol = WlanRxMarker;
1069
1070 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1071 Self::new(inner)
1072 }
1073
1074 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1075 self.client.into_channel().map_err(|client| Self { client })
1076 }
1077
1078 fn as_channel(&self) -> &::fidl::AsyncChannel {
1079 self.client.as_channel()
1080 }
1081}
1082
1083impl WlanRxProxy {
1084 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1086 let protocol_name = <WlanRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1087 Self { client: fidl::client::Client::new(channel, protocol_name) }
1088 }
1089
1090 pub fn take_event_stream(&self) -> WlanRxEventStream {
1096 WlanRxEventStream { event_receiver: self.client.take_event_receiver() }
1097 }
1098
1099 pub fn r#transfer(
1100 &self,
1101 mut payload: &WlanRxTransferRequest,
1102 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
1103 WlanRxProxyInterface::r#transfer(self, payload)
1104 }
1105}
1106
1107impl WlanRxProxyInterface for WlanRxProxy {
1108 type TransferResponseFut =
1109 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1110 fn r#transfer(&self, mut payload: &WlanRxTransferRequest) -> Self::TransferResponseFut {
1111 fn _decode(
1112 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1113 ) -> Result<(), fidl::Error> {
1114 let _response = fidl::client::decode_transaction_body::<
1115 fidl::encoding::EmptyPayload,
1116 fidl::encoding::DefaultFuchsiaResourceDialect,
1117 0x2c73b18cbfca6055,
1118 >(_buf?)?;
1119 Ok(_response)
1120 }
1121 self.client.send_query_and_decode::<WlanRxTransferRequest, ()>(
1122 payload,
1123 0x2c73b18cbfca6055,
1124 fidl::encoding::DynamicFlags::empty(),
1125 _decode,
1126 )
1127 }
1128}
1129
1130pub struct WlanRxEventStream {
1131 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1132}
1133
1134impl std::marker::Unpin for WlanRxEventStream {}
1135
1136impl futures::stream::FusedStream for WlanRxEventStream {
1137 fn is_terminated(&self) -> bool {
1138 self.event_receiver.is_terminated()
1139 }
1140}
1141
1142impl futures::Stream for WlanRxEventStream {
1143 type Item = Result<WlanRxEvent, fidl::Error>;
1144
1145 fn poll_next(
1146 mut self: std::pin::Pin<&mut Self>,
1147 cx: &mut std::task::Context<'_>,
1148 ) -> std::task::Poll<Option<Self::Item>> {
1149 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1150 &mut self.event_receiver,
1151 cx
1152 )?) {
1153 Some(buf) => std::task::Poll::Ready(Some(WlanRxEvent::decode(buf))),
1154 None => std::task::Poll::Ready(None),
1155 }
1156 }
1157}
1158
1159#[derive(Debug)]
1160pub enum WlanRxEvent {}
1161
1162impl WlanRxEvent {
1163 fn decode(
1165 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1166 ) -> Result<WlanRxEvent, fidl::Error> {
1167 let (bytes, _handles) = buf.split_mut();
1168 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1169 debug_assert_eq!(tx_header.tx_id, 0);
1170 match tx_header.ordinal {
1171 _ => Err(fidl::Error::UnknownOrdinal {
1172 ordinal: tx_header.ordinal,
1173 protocol_name: <WlanRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1174 }),
1175 }
1176 }
1177}
1178
1179pub struct WlanRxRequestStream {
1181 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1182 is_terminated: bool,
1183}
1184
1185impl std::marker::Unpin for WlanRxRequestStream {}
1186
1187impl futures::stream::FusedStream for WlanRxRequestStream {
1188 fn is_terminated(&self) -> bool {
1189 self.is_terminated
1190 }
1191}
1192
1193impl fidl::endpoints::RequestStream for WlanRxRequestStream {
1194 type Protocol = WlanRxMarker;
1195 type ControlHandle = WlanRxControlHandle;
1196
1197 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1198 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1199 }
1200
1201 fn control_handle(&self) -> Self::ControlHandle {
1202 WlanRxControlHandle { inner: self.inner.clone() }
1203 }
1204
1205 fn into_inner(
1206 self,
1207 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1208 {
1209 (self.inner, self.is_terminated)
1210 }
1211
1212 fn from_inner(
1213 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1214 is_terminated: bool,
1215 ) -> Self {
1216 Self { inner, is_terminated }
1217 }
1218}
1219
1220impl futures::Stream for WlanRxRequestStream {
1221 type Item = Result<WlanRxRequest, fidl::Error>;
1222
1223 fn poll_next(
1224 mut self: std::pin::Pin<&mut Self>,
1225 cx: &mut std::task::Context<'_>,
1226 ) -> std::task::Poll<Option<Self::Item>> {
1227 let this = &mut *self;
1228 if this.inner.check_shutdown(cx) {
1229 this.is_terminated = true;
1230 return std::task::Poll::Ready(None);
1231 }
1232 if this.is_terminated {
1233 panic!("polled WlanRxRequestStream after completion");
1234 }
1235 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1236 |bytes, handles| {
1237 match this.inner.channel().read_etc(cx, bytes, handles) {
1238 std::task::Poll::Ready(Ok(())) => {}
1239 std::task::Poll::Pending => return std::task::Poll::Pending,
1240 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1241 this.is_terminated = true;
1242 return std::task::Poll::Ready(None);
1243 }
1244 std::task::Poll::Ready(Err(e)) => {
1245 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1246 e.into(),
1247 ))));
1248 }
1249 }
1250
1251 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1253
1254 std::task::Poll::Ready(Some(match header.ordinal {
1255 0x2c73b18cbfca6055 => {
1256 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1257 let mut req = fidl::new_empty!(
1258 WlanRxTransferRequest,
1259 fidl::encoding::DefaultFuchsiaResourceDialect
1260 );
1261 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanRxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
1262 let control_handle = WlanRxControlHandle { inner: this.inner.clone() };
1263 Ok(WlanRxRequest::Transfer {
1264 payload: req,
1265 responder: WlanRxTransferResponder {
1266 control_handle: std::mem::ManuallyDrop::new(control_handle),
1267 tx_id: header.tx_id,
1268 },
1269 })
1270 }
1271 _ => Err(fidl::Error::UnknownOrdinal {
1272 ordinal: header.ordinal,
1273 protocol_name:
1274 <WlanRxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1275 }),
1276 }))
1277 },
1278 )
1279 }
1280}
1281
1282#[derive(Debug)]
1291pub enum WlanRxRequest {
1292 Transfer { payload: WlanRxTransferRequest, responder: WlanRxTransferResponder },
1293}
1294
1295impl WlanRxRequest {
1296 #[allow(irrefutable_let_patterns)]
1297 pub fn into_transfer(self) -> Option<(WlanRxTransferRequest, WlanRxTransferResponder)> {
1298 if let WlanRxRequest::Transfer { payload, responder } = self {
1299 Some((payload, responder))
1300 } else {
1301 None
1302 }
1303 }
1304
1305 pub fn method_name(&self) -> &'static str {
1307 match *self {
1308 WlanRxRequest::Transfer { .. } => "transfer",
1309 }
1310 }
1311}
1312
1313#[derive(Debug, Clone)]
1314pub struct WlanRxControlHandle {
1315 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1316}
1317
1318impl fidl::endpoints::ControlHandle for WlanRxControlHandle {
1319 fn shutdown(&self) {
1320 self.inner.shutdown()
1321 }
1322
1323 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1324 self.inner.shutdown_with_epitaph(status)
1325 }
1326
1327 fn is_closed(&self) -> bool {
1328 self.inner.channel().is_closed()
1329 }
1330 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1331 self.inner.channel().on_closed()
1332 }
1333
1334 #[cfg(target_os = "fuchsia")]
1335 fn signal_peer(
1336 &self,
1337 clear_mask: zx::Signals,
1338 set_mask: zx::Signals,
1339 ) -> Result<(), zx_status::Status> {
1340 use fidl::Peered;
1341 self.inner.channel().signal_peer(clear_mask, set_mask)
1342 }
1343}
1344
1345impl WlanRxControlHandle {}
1346
1347#[must_use = "FIDL methods require a response to be sent"]
1348#[derive(Debug)]
1349pub struct WlanRxTransferResponder {
1350 control_handle: std::mem::ManuallyDrop<WlanRxControlHandle>,
1351 tx_id: u32,
1352}
1353
1354impl std::ops::Drop for WlanRxTransferResponder {
1358 fn drop(&mut self) {
1359 self.control_handle.shutdown();
1360 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1362 }
1363}
1364
1365impl fidl::endpoints::Responder for WlanRxTransferResponder {
1366 type ControlHandle = WlanRxControlHandle;
1367
1368 fn control_handle(&self) -> &WlanRxControlHandle {
1369 &self.control_handle
1370 }
1371
1372 fn drop_without_shutdown(mut self) {
1373 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1375 std::mem::forget(self);
1377 }
1378}
1379
1380impl WlanRxTransferResponder {
1381 pub fn send(self) -> Result<(), fidl::Error> {
1385 let _result = self.send_raw();
1386 if _result.is_err() {
1387 self.control_handle.shutdown();
1388 }
1389 self.drop_without_shutdown();
1390 _result
1391 }
1392
1393 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
1395 let _result = self.send_raw();
1396 self.drop_without_shutdown();
1397 _result
1398 }
1399
1400 fn send_raw(&self) -> Result<(), fidl::Error> {
1401 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
1402 (),
1403 self.tx_id,
1404 0x2c73b18cbfca6055,
1405 fidl::encoding::DynamicFlags::empty(),
1406 )
1407 }
1408}
1409
1410#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1411pub struct WlanSoftmacBaseMarker;
1412
1413impl fidl::endpoints::ProtocolMarker for WlanSoftmacBaseMarker {
1414 type Proxy = WlanSoftmacBaseProxy;
1415 type RequestStream = WlanSoftmacBaseRequestStream;
1416 #[cfg(target_os = "fuchsia")]
1417 type SynchronousProxy = WlanSoftmacBaseSynchronousProxy;
1418
1419 const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacBase";
1420}
1421pub type WlanSoftmacBaseQueryResult = Result<WlanSoftmacQueryResponse, i32>;
1422pub type WlanSoftmacBaseQueryDiscoverySupportResult = Result<DiscoverySupport, i32>;
1423pub type WlanSoftmacBaseQueryMacSublayerSupportResult =
1424 Result<fidl_fuchsia_wlan_common::MacSublayerSupport, i32>;
1425pub type WlanSoftmacBaseQuerySecuritySupportResult =
1426 Result<fidl_fuchsia_wlan_common::SecuritySupport, i32>;
1427pub type WlanSoftmacBaseQuerySpectrumManagementSupportResult =
1428 Result<fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>;
1429pub type WlanSoftmacBaseSetChannelResult = Result<(), i32>;
1430pub type WlanSoftmacBaseJoinBssResult = Result<(), i32>;
1431pub type WlanSoftmacBaseEnableBeaconingResult = Result<(), i32>;
1432pub type WlanSoftmacBaseDisableBeaconingResult = Result<(), i32>;
1433pub type WlanSoftmacBaseInstallKeyResult = Result<(), i32>;
1434pub type WlanSoftmacBaseNotifyAssociationCompleteResult = Result<(), i32>;
1435pub type WlanSoftmacBaseClearAssociationResult = Result<(), i32>;
1436pub type WlanSoftmacBaseStartPassiveScanResult =
1437 Result<WlanSoftmacBaseStartPassiveScanResponse, i32>;
1438pub type WlanSoftmacBaseStartActiveScanResult = Result<WlanSoftmacBaseStartActiveScanResponse, i32>;
1439pub type WlanSoftmacBaseCancelScanResult = Result<(), i32>;
1440pub type WlanSoftmacBaseUpdateWmmParametersResult = Result<(), i32>;
1441
1442pub trait WlanSoftmacBaseProxyInterface: Send + Sync {
1443 type QueryResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQueryResult, fidl::Error>>
1444 + Send;
1445 fn r#query(&self) -> Self::QueryResponseFut;
1446 type QueryDiscoverySupportResponseFut: std::future::Future<
1447 Output = Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error>,
1448 > + Send;
1449 fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut;
1450 type QueryMacSublayerSupportResponseFut: std::future::Future<
1451 Output = Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error>,
1452 > + Send;
1453 fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut;
1454 type QuerySecuritySupportResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error>>
1455 + Send;
1456 fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut;
1457 type QuerySpectrumManagementSupportResponseFut: std::future::Future<
1458 Output = Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error>,
1459 > + Send;
1460 fn r#query_spectrum_management_support(
1461 &self,
1462 ) -> Self::QuerySpectrumManagementSupportResponseFut;
1463 type SetChannelResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseSetChannelResult, fidl::Error>>
1464 + Send;
1465 fn r#set_channel(
1466 &self,
1467 payload: &WlanSoftmacBaseSetChannelRequest,
1468 ) -> Self::SetChannelResponseFut;
1469 type JoinBssResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseJoinBssResult, fidl::Error>>
1470 + Send;
1471 fn r#join_bss(
1472 &self,
1473 join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
1474 ) -> Self::JoinBssResponseFut;
1475 type EnableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error>>
1476 + Send;
1477 fn r#enable_beaconing(
1478 &self,
1479 payload: &WlanSoftmacBaseEnableBeaconingRequest,
1480 ) -> Self::EnableBeaconingResponseFut;
1481 type DisableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error>>
1482 + Send;
1483 fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut;
1484 type InstallKeyResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseInstallKeyResult, fidl::Error>>
1485 + Send;
1486 fn r#install_key(&self, payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut;
1487 type NotifyAssociationCompleteResponseFut: std::future::Future<
1488 Output = Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error>,
1489 > + Send;
1490 fn r#notify_association_complete(
1491 &self,
1492 assoc_cfg: &WlanAssociationConfig,
1493 ) -> Self::NotifyAssociationCompleteResponseFut;
1494 type ClearAssociationResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseClearAssociationResult, fidl::Error>>
1495 + Send;
1496 fn r#clear_association(
1497 &self,
1498 payload: &WlanSoftmacBaseClearAssociationRequest,
1499 ) -> Self::ClearAssociationResponseFut;
1500 type StartPassiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error>>
1501 + Send;
1502 fn r#start_passive_scan(
1503 &self,
1504 payload: &WlanSoftmacBaseStartPassiveScanRequest,
1505 ) -> Self::StartPassiveScanResponseFut;
1506 type StartActiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error>>
1507 + Send;
1508 fn r#start_active_scan(
1509 &self,
1510 payload: &WlanSoftmacStartActiveScanRequest,
1511 ) -> Self::StartActiveScanResponseFut;
1512 type CancelScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseCancelScanResult, fidl::Error>>
1513 + Send;
1514 fn r#cancel_scan(
1515 &self,
1516 payload: &WlanSoftmacBaseCancelScanRequest,
1517 ) -> Self::CancelScanResponseFut;
1518 type UpdateWmmParametersResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error>>
1519 + Send;
1520 fn r#update_wmm_parameters(
1521 &self,
1522 payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
1523 ) -> Self::UpdateWmmParametersResponseFut;
1524}
1525#[derive(Debug)]
1526#[cfg(target_os = "fuchsia")]
1527pub struct WlanSoftmacBaseSynchronousProxy {
1528 client: fidl::client::sync::Client,
1529}
1530
1531#[cfg(target_os = "fuchsia")]
1532impl fidl::endpoints::SynchronousProxy for WlanSoftmacBaseSynchronousProxy {
1533 type Proxy = WlanSoftmacBaseProxy;
1534 type Protocol = WlanSoftmacBaseMarker;
1535
1536 fn from_channel(inner: fidl::Channel) -> Self {
1537 Self::new(inner)
1538 }
1539
1540 fn into_channel(self) -> fidl::Channel {
1541 self.client.into_channel()
1542 }
1543
1544 fn as_channel(&self) -> &fidl::Channel {
1545 self.client.as_channel()
1546 }
1547}
1548
1549#[cfg(target_os = "fuchsia")]
1550impl WlanSoftmacBaseSynchronousProxy {
1551 pub fn new(channel: fidl::Channel) -> Self {
1552 Self { client: fidl::client::sync::Client::new(channel) }
1553 }
1554
1555 pub fn into_channel(self) -> fidl::Channel {
1556 self.client.into_channel()
1557 }
1558
1559 pub fn wait_for_event(
1562 &self,
1563 deadline: zx::MonotonicInstant,
1564 ) -> Result<WlanSoftmacBaseEvent, fidl::Error> {
1565 WlanSoftmacBaseEvent::decode(self.client.wait_for_event::<WlanSoftmacBaseMarker>(deadline)?)
1566 }
1567
1568 pub fn r#query(
1576 &self,
1577 ___deadline: zx::MonotonicInstant,
1578 ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
1579 let _response = self.client.send_query::<
1580 fidl::encoding::EmptyPayload,
1581 fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
1582 WlanSoftmacBaseMarker,
1583 >(
1584 (),
1585 0x18231a638e508f9d,
1586 fidl::encoding::DynamicFlags::empty(),
1587 ___deadline,
1588 )?;
1589 Ok(_response.map(|x| x))
1590 }
1591
1592 pub fn r#query_discovery_support(
1596 &self,
1597 ___deadline: zx::MonotonicInstant,
1598 ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
1599 let _response =
1600 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1601 WlanSoftmacBaseQueryDiscoverySupportResponse,
1602 i32,
1603 >, WlanSoftmacBaseMarker>(
1604 (),
1605 0x16797affc0cb58ae,
1606 fidl::encoding::DynamicFlags::empty(),
1607 ___deadline,
1608 )?;
1609 Ok(_response.map(|x| x.resp))
1610 }
1611
1612 pub fn r#query_mac_sublayer_support(
1620 &self,
1621 ___deadline: zx::MonotonicInstant,
1622 ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
1623 let _response =
1624 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1625 WlanSoftmacBaseQueryMacSublayerSupportResponse,
1626 i32,
1627 >, WlanSoftmacBaseMarker>(
1628 (),
1629 0x7302c3f8c131f075,
1630 fidl::encoding::DynamicFlags::empty(),
1631 ___deadline,
1632 )?;
1633 Ok(_response.map(|x| x.resp))
1634 }
1635
1636 pub fn r#query_security_support(
1639 &self,
1640 ___deadline: zx::MonotonicInstant,
1641 ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
1642 let _response =
1643 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1644 WlanSoftmacBaseQuerySecuritySupportResponse,
1645 i32,
1646 >, WlanSoftmacBaseMarker>(
1647 (),
1648 0x3691bb75abf6354,
1649 fidl::encoding::DynamicFlags::empty(),
1650 ___deadline,
1651 )?;
1652 Ok(_response.map(|x| x.resp))
1653 }
1654
1655 pub fn r#query_spectrum_management_support(
1659 &self,
1660 ___deadline: zx::MonotonicInstant,
1661 ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
1662 let _response =
1663 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1664 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
1665 i32,
1666 >, WlanSoftmacBaseMarker>(
1667 (),
1668 0x347d78dc1d4d27bf,
1669 fidl::encoding::DynamicFlags::empty(),
1670 ___deadline,
1671 )?;
1672 Ok(_response.map(|x| x.resp))
1673 }
1674
1675 pub fn r#set_channel(
1683 &self,
1684 mut payload: &WlanSoftmacBaseSetChannelRequest,
1685 ___deadline: zx::MonotonicInstant,
1686 ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
1687 let _response = self.client.send_query::<
1688 WlanSoftmacBaseSetChannelRequest,
1689 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1690 WlanSoftmacBaseMarker,
1691 >(
1692 payload,
1693 0x12836b533cd63ece,
1694 fidl::encoding::DynamicFlags::empty(),
1695 ___deadline,
1696 )?;
1697 Ok(_response.map(|x| x))
1698 }
1699
1700 pub fn r#join_bss(
1710 &self,
1711 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
1712 ___deadline: zx::MonotonicInstant,
1713 ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
1714 let _response = self.client.send_query::<
1715 WlanSoftmacBaseJoinBssRequest,
1716 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1717 WlanSoftmacBaseMarker,
1718 >(
1719 (join_request,),
1720 0x1336fb5455b77a6e,
1721 fidl::encoding::DynamicFlags::empty(),
1722 ___deadline,
1723 )?;
1724 Ok(_response.map(|x| x))
1725 }
1726
1727 pub fn r#enable_beaconing(
1742 &self,
1743 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
1744 ___deadline: zx::MonotonicInstant,
1745 ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
1746 let _response = self.client.send_query::<
1747 WlanSoftmacBaseEnableBeaconingRequest,
1748 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1749 WlanSoftmacBaseMarker,
1750 >(
1751 payload,
1752 0x6c35807632c64576,
1753 fidl::encoding::DynamicFlags::empty(),
1754 ___deadline,
1755 )?;
1756 Ok(_response.map(|x| x))
1757 }
1758
1759 pub fn r#disable_beaconing(
1761 &self,
1762 ___deadline: zx::MonotonicInstant,
1763 ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
1764 let _response = self.client.send_query::<
1765 fidl::encoding::EmptyPayload,
1766 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1767 WlanSoftmacBaseMarker,
1768 >(
1769 (),
1770 0x3303b30f99dbb406,
1771 fidl::encoding::DynamicFlags::empty(),
1772 ___deadline,
1773 )?;
1774 Ok(_response.map(|x| x))
1775 }
1776
1777 pub fn r#install_key(
1784 &self,
1785 mut payload: &WlanKeyConfiguration,
1786 ___deadline: zx::MonotonicInstant,
1787 ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
1788 let _response = self.client.send_query::<
1789 WlanKeyConfiguration,
1790 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1791 WlanSoftmacBaseMarker,
1792 >(
1793 payload,
1794 0x7decf9b4200b9131,
1795 fidl::encoding::DynamicFlags::empty(),
1796 ___deadline,
1797 )?;
1798 Ok(_response.map(|x| x))
1799 }
1800
1801 pub fn r#notify_association_complete(
1811 &self,
1812 mut assoc_cfg: &WlanAssociationConfig,
1813 ___deadline: zx::MonotonicInstant,
1814 ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
1815 let _response = self.client.send_query::<
1816 WlanSoftmacBaseNotifyAssociationCompleteRequest,
1817 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1818 WlanSoftmacBaseMarker,
1819 >(
1820 (assoc_cfg,),
1821 0x436ffe3ba461d6cd,
1822 fidl::encoding::DynamicFlags::empty(),
1823 ___deadline,
1824 )?;
1825 Ok(_response.map(|x| x))
1826 }
1827
1828 pub fn r#clear_association(
1830 &self,
1831 mut payload: &WlanSoftmacBaseClearAssociationRequest,
1832 ___deadline: zx::MonotonicInstant,
1833 ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
1834 let _response = self.client.send_query::<
1835 WlanSoftmacBaseClearAssociationRequest,
1836 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1837 WlanSoftmacBaseMarker,
1838 >(
1839 payload,
1840 0x581d76c39190a7dd,
1841 fidl::encoding::DynamicFlags::empty(),
1842 ___deadline,
1843 )?;
1844 Ok(_response.map(|x| x))
1845 }
1846
1847 pub fn r#start_passive_scan(
1861 &self,
1862 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
1863 ___deadline: zx::MonotonicInstant,
1864 ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
1865 let _response = self.client.send_query::<
1866 WlanSoftmacBaseStartPassiveScanRequest,
1867 fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
1868 WlanSoftmacBaseMarker,
1869 >(
1870 payload,
1871 0x5662f989cb4083bb,
1872 fidl::encoding::DynamicFlags::empty(),
1873 ___deadline,
1874 )?;
1875 Ok(_response.map(|x| x))
1876 }
1877
1878 pub fn r#start_active_scan(
1892 &self,
1893 mut payload: &WlanSoftmacStartActiveScanRequest,
1894 ___deadline: zx::MonotonicInstant,
1895 ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
1896 let _response = self.client.send_query::<
1897 WlanSoftmacStartActiveScanRequest,
1898 fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
1899 WlanSoftmacBaseMarker,
1900 >(
1901 payload,
1902 0x4896eafa9937751e,
1903 fidl::encoding::DynamicFlags::empty(),
1904 ___deadline,
1905 )?;
1906 Ok(_response.map(|x| x))
1907 }
1908
1909 pub fn r#cancel_scan(
1923 &self,
1924 mut payload: &WlanSoftmacBaseCancelScanRequest,
1925 ___deadline: zx::MonotonicInstant,
1926 ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
1927 let _response = self.client.send_query::<
1928 WlanSoftmacBaseCancelScanRequest,
1929 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1930 WlanSoftmacBaseMarker,
1931 >(
1932 payload,
1933 0xf7d859369764556,
1934 fidl::encoding::DynamicFlags::empty(),
1935 ___deadline,
1936 )?;
1937 Ok(_response.map(|x| x))
1938 }
1939
1940 pub fn r#update_wmm_parameters(
1943 &self,
1944 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
1945 ___deadline: zx::MonotonicInstant,
1946 ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
1947 let _response = self.client.send_query::<
1948 WlanSoftmacBaseUpdateWmmParametersRequest,
1949 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1950 WlanSoftmacBaseMarker,
1951 >(
1952 payload,
1953 0x68522c7122d5f78c,
1954 fidl::encoding::DynamicFlags::empty(),
1955 ___deadline,
1956 )?;
1957 Ok(_response.map(|x| x))
1958 }
1959}
1960
1961#[cfg(target_os = "fuchsia")]
1962impl From<WlanSoftmacBaseSynchronousProxy> for zx::NullableHandle {
1963 fn from(value: WlanSoftmacBaseSynchronousProxy) -> Self {
1964 value.into_channel().into()
1965 }
1966}
1967
1968#[cfg(target_os = "fuchsia")]
1969impl From<fidl::Channel> for WlanSoftmacBaseSynchronousProxy {
1970 fn from(value: fidl::Channel) -> Self {
1971 Self::new(value)
1972 }
1973}
1974
1975#[cfg(target_os = "fuchsia")]
1976impl fidl::endpoints::FromClient for WlanSoftmacBaseSynchronousProxy {
1977 type Protocol = WlanSoftmacBaseMarker;
1978
1979 fn from_client(value: fidl::endpoints::ClientEnd<WlanSoftmacBaseMarker>) -> Self {
1980 Self::new(value.into_channel())
1981 }
1982}
1983
1984#[derive(Debug, Clone)]
1985pub struct WlanSoftmacBaseProxy {
1986 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1987}
1988
1989impl fidl::endpoints::Proxy for WlanSoftmacBaseProxy {
1990 type Protocol = WlanSoftmacBaseMarker;
1991
1992 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1993 Self::new(inner)
1994 }
1995
1996 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1997 self.client.into_channel().map_err(|client| Self { client })
1998 }
1999
2000 fn as_channel(&self) -> &::fidl::AsyncChannel {
2001 self.client.as_channel()
2002 }
2003}
2004
2005impl WlanSoftmacBaseProxy {
2006 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2008 let protocol_name = <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2009 Self { client: fidl::client::Client::new(channel, protocol_name) }
2010 }
2011
2012 pub fn take_event_stream(&self) -> WlanSoftmacBaseEventStream {
2018 WlanSoftmacBaseEventStream { event_receiver: self.client.take_event_receiver() }
2019 }
2020
2021 pub fn r#query(
2029 &self,
2030 ) -> fidl::client::QueryResponseFut<
2031 WlanSoftmacBaseQueryResult,
2032 fidl::encoding::DefaultFuchsiaResourceDialect,
2033 > {
2034 WlanSoftmacBaseProxyInterface::r#query(self)
2035 }
2036
2037 pub fn r#query_discovery_support(
2041 &self,
2042 ) -> fidl::client::QueryResponseFut<
2043 WlanSoftmacBaseQueryDiscoverySupportResult,
2044 fidl::encoding::DefaultFuchsiaResourceDialect,
2045 > {
2046 WlanSoftmacBaseProxyInterface::r#query_discovery_support(self)
2047 }
2048
2049 pub fn r#query_mac_sublayer_support(
2057 &self,
2058 ) -> fidl::client::QueryResponseFut<
2059 WlanSoftmacBaseQueryMacSublayerSupportResult,
2060 fidl::encoding::DefaultFuchsiaResourceDialect,
2061 > {
2062 WlanSoftmacBaseProxyInterface::r#query_mac_sublayer_support(self)
2063 }
2064
2065 pub fn r#query_security_support(
2068 &self,
2069 ) -> fidl::client::QueryResponseFut<
2070 WlanSoftmacBaseQuerySecuritySupportResult,
2071 fidl::encoding::DefaultFuchsiaResourceDialect,
2072 > {
2073 WlanSoftmacBaseProxyInterface::r#query_security_support(self)
2074 }
2075
2076 pub fn r#query_spectrum_management_support(
2080 &self,
2081 ) -> fidl::client::QueryResponseFut<
2082 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
2083 fidl::encoding::DefaultFuchsiaResourceDialect,
2084 > {
2085 WlanSoftmacBaseProxyInterface::r#query_spectrum_management_support(self)
2086 }
2087
2088 pub fn r#set_channel(
2096 &self,
2097 mut payload: &WlanSoftmacBaseSetChannelRequest,
2098 ) -> fidl::client::QueryResponseFut<
2099 WlanSoftmacBaseSetChannelResult,
2100 fidl::encoding::DefaultFuchsiaResourceDialect,
2101 > {
2102 WlanSoftmacBaseProxyInterface::r#set_channel(self, payload)
2103 }
2104
2105 pub fn r#join_bss(
2115 &self,
2116 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
2117 ) -> fidl::client::QueryResponseFut<
2118 WlanSoftmacBaseJoinBssResult,
2119 fidl::encoding::DefaultFuchsiaResourceDialect,
2120 > {
2121 WlanSoftmacBaseProxyInterface::r#join_bss(self, join_request)
2122 }
2123
2124 pub fn r#enable_beaconing(
2139 &self,
2140 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
2141 ) -> fidl::client::QueryResponseFut<
2142 WlanSoftmacBaseEnableBeaconingResult,
2143 fidl::encoding::DefaultFuchsiaResourceDialect,
2144 > {
2145 WlanSoftmacBaseProxyInterface::r#enable_beaconing(self, payload)
2146 }
2147
2148 pub fn r#disable_beaconing(
2150 &self,
2151 ) -> fidl::client::QueryResponseFut<
2152 WlanSoftmacBaseDisableBeaconingResult,
2153 fidl::encoding::DefaultFuchsiaResourceDialect,
2154 > {
2155 WlanSoftmacBaseProxyInterface::r#disable_beaconing(self)
2156 }
2157
2158 pub fn r#install_key(
2165 &self,
2166 mut payload: &WlanKeyConfiguration,
2167 ) -> fidl::client::QueryResponseFut<
2168 WlanSoftmacBaseInstallKeyResult,
2169 fidl::encoding::DefaultFuchsiaResourceDialect,
2170 > {
2171 WlanSoftmacBaseProxyInterface::r#install_key(self, payload)
2172 }
2173
2174 pub fn r#notify_association_complete(
2184 &self,
2185 mut assoc_cfg: &WlanAssociationConfig,
2186 ) -> fidl::client::QueryResponseFut<
2187 WlanSoftmacBaseNotifyAssociationCompleteResult,
2188 fidl::encoding::DefaultFuchsiaResourceDialect,
2189 > {
2190 WlanSoftmacBaseProxyInterface::r#notify_association_complete(self, assoc_cfg)
2191 }
2192
2193 pub fn r#clear_association(
2195 &self,
2196 mut payload: &WlanSoftmacBaseClearAssociationRequest,
2197 ) -> fidl::client::QueryResponseFut<
2198 WlanSoftmacBaseClearAssociationResult,
2199 fidl::encoding::DefaultFuchsiaResourceDialect,
2200 > {
2201 WlanSoftmacBaseProxyInterface::r#clear_association(self, payload)
2202 }
2203
2204 pub fn r#start_passive_scan(
2218 &self,
2219 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
2220 ) -> fidl::client::QueryResponseFut<
2221 WlanSoftmacBaseStartPassiveScanResult,
2222 fidl::encoding::DefaultFuchsiaResourceDialect,
2223 > {
2224 WlanSoftmacBaseProxyInterface::r#start_passive_scan(self, payload)
2225 }
2226
2227 pub fn r#start_active_scan(
2241 &self,
2242 mut payload: &WlanSoftmacStartActiveScanRequest,
2243 ) -> fidl::client::QueryResponseFut<
2244 WlanSoftmacBaseStartActiveScanResult,
2245 fidl::encoding::DefaultFuchsiaResourceDialect,
2246 > {
2247 WlanSoftmacBaseProxyInterface::r#start_active_scan(self, payload)
2248 }
2249
2250 pub fn r#cancel_scan(
2264 &self,
2265 mut payload: &WlanSoftmacBaseCancelScanRequest,
2266 ) -> fidl::client::QueryResponseFut<
2267 WlanSoftmacBaseCancelScanResult,
2268 fidl::encoding::DefaultFuchsiaResourceDialect,
2269 > {
2270 WlanSoftmacBaseProxyInterface::r#cancel_scan(self, payload)
2271 }
2272
2273 pub fn r#update_wmm_parameters(
2276 &self,
2277 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
2278 ) -> fidl::client::QueryResponseFut<
2279 WlanSoftmacBaseUpdateWmmParametersResult,
2280 fidl::encoding::DefaultFuchsiaResourceDialect,
2281 > {
2282 WlanSoftmacBaseProxyInterface::r#update_wmm_parameters(self, payload)
2283 }
2284}
2285
2286impl WlanSoftmacBaseProxyInterface for WlanSoftmacBaseProxy {
2287 type QueryResponseFut = fidl::client::QueryResponseFut<
2288 WlanSoftmacBaseQueryResult,
2289 fidl::encoding::DefaultFuchsiaResourceDialect,
2290 >;
2291 fn r#query(&self) -> Self::QueryResponseFut {
2292 fn _decode(
2293 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2294 ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
2295 let _response = fidl::client::decode_transaction_body::<
2296 fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
2297 fidl::encoding::DefaultFuchsiaResourceDialect,
2298 0x18231a638e508f9d,
2299 >(_buf?)?;
2300 Ok(_response.map(|x| x))
2301 }
2302 self.client
2303 .send_query_and_decode::<fidl::encoding::EmptyPayload, WlanSoftmacBaseQueryResult>(
2304 (),
2305 0x18231a638e508f9d,
2306 fidl::encoding::DynamicFlags::empty(),
2307 _decode,
2308 )
2309 }
2310
2311 type QueryDiscoverySupportResponseFut = fidl::client::QueryResponseFut<
2312 WlanSoftmacBaseQueryDiscoverySupportResult,
2313 fidl::encoding::DefaultFuchsiaResourceDialect,
2314 >;
2315 fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut {
2316 fn _decode(
2317 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2318 ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
2319 let _response = fidl::client::decode_transaction_body::<
2320 fidl::encoding::ResultType<WlanSoftmacBaseQueryDiscoverySupportResponse, i32>,
2321 fidl::encoding::DefaultFuchsiaResourceDialect,
2322 0x16797affc0cb58ae,
2323 >(_buf?)?;
2324 Ok(_response.map(|x| x.resp))
2325 }
2326 self.client.send_query_and_decode::<
2327 fidl::encoding::EmptyPayload,
2328 WlanSoftmacBaseQueryDiscoverySupportResult,
2329 >(
2330 (),
2331 0x16797affc0cb58ae,
2332 fidl::encoding::DynamicFlags::empty(),
2333 _decode,
2334 )
2335 }
2336
2337 type QueryMacSublayerSupportResponseFut = fidl::client::QueryResponseFut<
2338 WlanSoftmacBaseQueryMacSublayerSupportResult,
2339 fidl::encoding::DefaultFuchsiaResourceDialect,
2340 >;
2341 fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut {
2342 fn _decode(
2343 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2344 ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
2345 let _response = fidl::client::decode_transaction_body::<
2346 fidl::encoding::ResultType<WlanSoftmacBaseQueryMacSublayerSupportResponse, i32>,
2347 fidl::encoding::DefaultFuchsiaResourceDialect,
2348 0x7302c3f8c131f075,
2349 >(_buf?)?;
2350 Ok(_response.map(|x| x.resp))
2351 }
2352 self.client.send_query_and_decode::<
2353 fidl::encoding::EmptyPayload,
2354 WlanSoftmacBaseQueryMacSublayerSupportResult,
2355 >(
2356 (),
2357 0x7302c3f8c131f075,
2358 fidl::encoding::DynamicFlags::empty(),
2359 _decode,
2360 )
2361 }
2362
2363 type QuerySecuritySupportResponseFut = fidl::client::QueryResponseFut<
2364 WlanSoftmacBaseQuerySecuritySupportResult,
2365 fidl::encoding::DefaultFuchsiaResourceDialect,
2366 >;
2367 fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut {
2368 fn _decode(
2369 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2370 ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
2371 let _response = fidl::client::decode_transaction_body::<
2372 fidl::encoding::ResultType<WlanSoftmacBaseQuerySecuritySupportResponse, i32>,
2373 fidl::encoding::DefaultFuchsiaResourceDialect,
2374 0x3691bb75abf6354,
2375 >(_buf?)?;
2376 Ok(_response.map(|x| x.resp))
2377 }
2378 self.client.send_query_and_decode::<
2379 fidl::encoding::EmptyPayload,
2380 WlanSoftmacBaseQuerySecuritySupportResult,
2381 >(
2382 (),
2383 0x3691bb75abf6354,
2384 fidl::encoding::DynamicFlags::empty(),
2385 _decode,
2386 )
2387 }
2388
2389 type QuerySpectrumManagementSupportResponseFut = fidl::client::QueryResponseFut<
2390 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
2391 fidl::encoding::DefaultFuchsiaResourceDialect,
2392 >;
2393 fn r#query_spectrum_management_support(
2394 &self,
2395 ) -> Self::QuerySpectrumManagementSupportResponseFut {
2396 fn _decode(
2397 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2398 ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
2399 let _response = fidl::client::decode_transaction_body::<
2400 fidl::encoding::ResultType<
2401 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
2402 i32,
2403 >,
2404 fidl::encoding::DefaultFuchsiaResourceDialect,
2405 0x347d78dc1d4d27bf,
2406 >(_buf?)?;
2407 Ok(_response.map(|x| x.resp))
2408 }
2409 self.client.send_query_and_decode::<
2410 fidl::encoding::EmptyPayload,
2411 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
2412 >(
2413 (),
2414 0x347d78dc1d4d27bf,
2415 fidl::encoding::DynamicFlags::empty(),
2416 _decode,
2417 )
2418 }
2419
2420 type SetChannelResponseFut = fidl::client::QueryResponseFut<
2421 WlanSoftmacBaseSetChannelResult,
2422 fidl::encoding::DefaultFuchsiaResourceDialect,
2423 >;
2424 fn r#set_channel(
2425 &self,
2426 mut payload: &WlanSoftmacBaseSetChannelRequest,
2427 ) -> Self::SetChannelResponseFut {
2428 fn _decode(
2429 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2430 ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
2431 let _response = fidl::client::decode_transaction_body::<
2432 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2433 fidl::encoding::DefaultFuchsiaResourceDialect,
2434 0x12836b533cd63ece,
2435 >(_buf?)?;
2436 Ok(_response.map(|x| x))
2437 }
2438 self.client.send_query_and_decode::<
2439 WlanSoftmacBaseSetChannelRequest,
2440 WlanSoftmacBaseSetChannelResult,
2441 >(
2442 payload,
2443 0x12836b533cd63ece,
2444 fidl::encoding::DynamicFlags::empty(),
2445 _decode,
2446 )
2447 }
2448
2449 type JoinBssResponseFut = fidl::client::QueryResponseFut<
2450 WlanSoftmacBaseJoinBssResult,
2451 fidl::encoding::DefaultFuchsiaResourceDialect,
2452 >;
2453 fn r#join_bss(
2454 &self,
2455 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
2456 ) -> Self::JoinBssResponseFut {
2457 fn _decode(
2458 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2459 ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
2460 let _response = fidl::client::decode_transaction_body::<
2461 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2462 fidl::encoding::DefaultFuchsiaResourceDialect,
2463 0x1336fb5455b77a6e,
2464 >(_buf?)?;
2465 Ok(_response.map(|x| x))
2466 }
2467 self.client
2468 .send_query_and_decode::<WlanSoftmacBaseJoinBssRequest, WlanSoftmacBaseJoinBssResult>(
2469 (join_request,),
2470 0x1336fb5455b77a6e,
2471 fidl::encoding::DynamicFlags::empty(),
2472 _decode,
2473 )
2474 }
2475
2476 type EnableBeaconingResponseFut = fidl::client::QueryResponseFut<
2477 WlanSoftmacBaseEnableBeaconingResult,
2478 fidl::encoding::DefaultFuchsiaResourceDialect,
2479 >;
2480 fn r#enable_beaconing(
2481 &self,
2482 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
2483 ) -> Self::EnableBeaconingResponseFut {
2484 fn _decode(
2485 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2486 ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
2487 let _response = fidl::client::decode_transaction_body::<
2488 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2489 fidl::encoding::DefaultFuchsiaResourceDialect,
2490 0x6c35807632c64576,
2491 >(_buf?)?;
2492 Ok(_response.map(|x| x))
2493 }
2494 self.client.send_query_and_decode::<
2495 WlanSoftmacBaseEnableBeaconingRequest,
2496 WlanSoftmacBaseEnableBeaconingResult,
2497 >(
2498 payload,
2499 0x6c35807632c64576,
2500 fidl::encoding::DynamicFlags::empty(),
2501 _decode,
2502 )
2503 }
2504
2505 type DisableBeaconingResponseFut = fidl::client::QueryResponseFut<
2506 WlanSoftmacBaseDisableBeaconingResult,
2507 fidl::encoding::DefaultFuchsiaResourceDialect,
2508 >;
2509 fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut {
2510 fn _decode(
2511 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2512 ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
2513 let _response = fidl::client::decode_transaction_body::<
2514 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2515 fidl::encoding::DefaultFuchsiaResourceDialect,
2516 0x3303b30f99dbb406,
2517 >(_buf?)?;
2518 Ok(_response.map(|x| x))
2519 }
2520 self.client.send_query_and_decode::<
2521 fidl::encoding::EmptyPayload,
2522 WlanSoftmacBaseDisableBeaconingResult,
2523 >(
2524 (),
2525 0x3303b30f99dbb406,
2526 fidl::encoding::DynamicFlags::empty(),
2527 _decode,
2528 )
2529 }
2530
2531 type InstallKeyResponseFut = fidl::client::QueryResponseFut<
2532 WlanSoftmacBaseInstallKeyResult,
2533 fidl::encoding::DefaultFuchsiaResourceDialect,
2534 >;
2535 fn r#install_key(&self, mut payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut {
2536 fn _decode(
2537 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2538 ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
2539 let _response = fidl::client::decode_transaction_body::<
2540 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2541 fidl::encoding::DefaultFuchsiaResourceDialect,
2542 0x7decf9b4200b9131,
2543 >(_buf?)?;
2544 Ok(_response.map(|x| x))
2545 }
2546 self.client.send_query_and_decode::<WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResult>(
2547 payload,
2548 0x7decf9b4200b9131,
2549 fidl::encoding::DynamicFlags::empty(),
2550 _decode,
2551 )
2552 }
2553
2554 type NotifyAssociationCompleteResponseFut = fidl::client::QueryResponseFut<
2555 WlanSoftmacBaseNotifyAssociationCompleteResult,
2556 fidl::encoding::DefaultFuchsiaResourceDialect,
2557 >;
2558 fn r#notify_association_complete(
2559 &self,
2560 mut assoc_cfg: &WlanAssociationConfig,
2561 ) -> Self::NotifyAssociationCompleteResponseFut {
2562 fn _decode(
2563 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2564 ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
2565 let _response = fidl::client::decode_transaction_body::<
2566 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2567 fidl::encoding::DefaultFuchsiaResourceDialect,
2568 0x436ffe3ba461d6cd,
2569 >(_buf?)?;
2570 Ok(_response.map(|x| x))
2571 }
2572 self.client.send_query_and_decode::<
2573 WlanSoftmacBaseNotifyAssociationCompleteRequest,
2574 WlanSoftmacBaseNotifyAssociationCompleteResult,
2575 >(
2576 (assoc_cfg,),
2577 0x436ffe3ba461d6cd,
2578 fidl::encoding::DynamicFlags::empty(),
2579 _decode,
2580 )
2581 }
2582
2583 type ClearAssociationResponseFut = fidl::client::QueryResponseFut<
2584 WlanSoftmacBaseClearAssociationResult,
2585 fidl::encoding::DefaultFuchsiaResourceDialect,
2586 >;
2587 fn r#clear_association(
2588 &self,
2589 mut payload: &WlanSoftmacBaseClearAssociationRequest,
2590 ) -> Self::ClearAssociationResponseFut {
2591 fn _decode(
2592 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2593 ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
2594 let _response = fidl::client::decode_transaction_body::<
2595 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2596 fidl::encoding::DefaultFuchsiaResourceDialect,
2597 0x581d76c39190a7dd,
2598 >(_buf?)?;
2599 Ok(_response.map(|x| x))
2600 }
2601 self.client.send_query_and_decode::<
2602 WlanSoftmacBaseClearAssociationRequest,
2603 WlanSoftmacBaseClearAssociationResult,
2604 >(
2605 payload,
2606 0x581d76c39190a7dd,
2607 fidl::encoding::DynamicFlags::empty(),
2608 _decode,
2609 )
2610 }
2611
2612 type StartPassiveScanResponseFut = fidl::client::QueryResponseFut<
2613 WlanSoftmacBaseStartPassiveScanResult,
2614 fidl::encoding::DefaultFuchsiaResourceDialect,
2615 >;
2616 fn r#start_passive_scan(
2617 &self,
2618 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
2619 ) -> Self::StartPassiveScanResponseFut {
2620 fn _decode(
2621 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2622 ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
2623 let _response = fidl::client::decode_transaction_body::<
2624 fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
2625 fidl::encoding::DefaultFuchsiaResourceDialect,
2626 0x5662f989cb4083bb,
2627 >(_buf?)?;
2628 Ok(_response.map(|x| x))
2629 }
2630 self.client.send_query_and_decode::<
2631 WlanSoftmacBaseStartPassiveScanRequest,
2632 WlanSoftmacBaseStartPassiveScanResult,
2633 >(
2634 payload,
2635 0x5662f989cb4083bb,
2636 fidl::encoding::DynamicFlags::empty(),
2637 _decode,
2638 )
2639 }
2640
2641 type StartActiveScanResponseFut = fidl::client::QueryResponseFut<
2642 WlanSoftmacBaseStartActiveScanResult,
2643 fidl::encoding::DefaultFuchsiaResourceDialect,
2644 >;
2645 fn r#start_active_scan(
2646 &self,
2647 mut payload: &WlanSoftmacStartActiveScanRequest,
2648 ) -> Self::StartActiveScanResponseFut {
2649 fn _decode(
2650 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2651 ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
2652 let _response = fidl::client::decode_transaction_body::<
2653 fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
2654 fidl::encoding::DefaultFuchsiaResourceDialect,
2655 0x4896eafa9937751e,
2656 >(_buf?)?;
2657 Ok(_response.map(|x| x))
2658 }
2659 self.client.send_query_and_decode::<
2660 WlanSoftmacStartActiveScanRequest,
2661 WlanSoftmacBaseStartActiveScanResult,
2662 >(
2663 payload,
2664 0x4896eafa9937751e,
2665 fidl::encoding::DynamicFlags::empty(),
2666 _decode,
2667 )
2668 }
2669
2670 type CancelScanResponseFut = fidl::client::QueryResponseFut<
2671 WlanSoftmacBaseCancelScanResult,
2672 fidl::encoding::DefaultFuchsiaResourceDialect,
2673 >;
2674 fn r#cancel_scan(
2675 &self,
2676 mut payload: &WlanSoftmacBaseCancelScanRequest,
2677 ) -> Self::CancelScanResponseFut {
2678 fn _decode(
2679 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2680 ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
2681 let _response = fidl::client::decode_transaction_body::<
2682 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2683 fidl::encoding::DefaultFuchsiaResourceDialect,
2684 0xf7d859369764556,
2685 >(_buf?)?;
2686 Ok(_response.map(|x| x))
2687 }
2688 self.client.send_query_and_decode::<
2689 WlanSoftmacBaseCancelScanRequest,
2690 WlanSoftmacBaseCancelScanResult,
2691 >(
2692 payload,
2693 0xf7d859369764556,
2694 fidl::encoding::DynamicFlags::empty(),
2695 _decode,
2696 )
2697 }
2698
2699 type UpdateWmmParametersResponseFut = fidl::client::QueryResponseFut<
2700 WlanSoftmacBaseUpdateWmmParametersResult,
2701 fidl::encoding::DefaultFuchsiaResourceDialect,
2702 >;
2703 fn r#update_wmm_parameters(
2704 &self,
2705 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
2706 ) -> Self::UpdateWmmParametersResponseFut {
2707 fn _decode(
2708 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2709 ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
2710 let _response = fidl::client::decode_transaction_body::<
2711 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2712 fidl::encoding::DefaultFuchsiaResourceDialect,
2713 0x68522c7122d5f78c,
2714 >(_buf?)?;
2715 Ok(_response.map(|x| x))
2716 }
2717 self.client.send_query_and_decode::<
2718 WlanSoftmacBaseUpdateWmmParametersRequest,
2719 WlanSoftmacBaseUpdateWmmParametersResult,
2720 >(
2721 payload,
2722 0x68522c7122d5f78c,
2723 fidl::encoding::DynamicFlags::empty(),
2724 _decode,
2725 )
2726 }
2727}
2728
2729pub struct WlanSoftmacBaseEventStream {
2730 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2731}
2732
2733impl std::marker::Unpin for WlanSoftmacBaseEventStream {}
2734
2735impl futures::stream::FusedStream for WlanSoftmacBaseEventStream {
2736 fn is_terminated(&self) -> bool {
2737 self.event_receiver.is_terminated()
2738 }
2739}
2740
2741impl futures::Stream for WlanSoftmacBaseEventStream {
2742 type Item = Result<WlanSoftmacBaseEvent, fidl::Error>;
2743
2744 fn poll_next(
2745 mut self: std::pin::Pin<&mut Self>,
2746 cx: &mut std::task::Context<'_>,
2747 ) -> std::task::Poll<Option<Self::Item>> {
2748 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2749 &mut self.event_receiver,
2750 cx
2751 )?) {
2752 Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacBaseEvent::decode(buf))),
2753 None => std::task::Poll::Ready(None),
2754 }
2755 }
2756}
2757
2758#[derive(Debug)]
2759pub enum WlanSoftmacBaseEvent {
2760 #[non_exhaustive]
2761 _UnknownEvent {
2762 ordinal: u64,
2764 },
2765}
2766
2767impl WlanSoftmacBaseEvent {
2768 fn decode(
2770 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2771 ) -> Result<WlanSoftmacBaseEvent, fidl::Error> {
2772 let (bytes, _handles) = buf.split_mut();
2773 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2774 debug_assert_eq!(tx_header.tx_id, 0);
2775 match tx_header.ordinal {
2776 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2777 Ok(WlanSoftmacBaseEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2778 }
2779 _ => Err(fidl::Error::UnknownOrdinal {
2780 ordinal: tx_header.ordinal,
2781 protocol_name:
2782 <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2783 }),
2784 }
2785 }
2786}
2787
2788pub struct WlanSoftmacBaseRequestStream {
2790 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2791 is_terminated: bool,
2792}
2793
2794impl std::marker::Unpin for WlanSoftmacBaseRequestStream {}
2795
2796impl futures::stream::FusedStream for WlanSoftmacBaseRequestStream {
2797 fn is_terminated(&self) -> bool {
2798 self.is_terminated
2799 }
2800}
2801
2802impl fidl::endpoints::RequestStream for WlanSoftmacBaseRequestStream {
2803 type Protocol = WlanSoftmacBaseMarker;
2804 type ControlHandle = WlanSoftmacBaseControlHandle;
2805
2806 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2807 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2808 }
2809
2810 fn control_handle(&self) -> Self::ControlHandle {
2811 WlanSoftmacBaseControlHandle { inner: self.inner.clone() }
2812 }
2813
2814 fn into_inner(
2815 self,
2816 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2817 {
2818 (self.inner, self.is_terminated)
2819 }
2820
2821 fn from_inner(
2822 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2823 is_terminated: bool,
2824 ) -> Self {
2825 Self { inner, is_terminated }
2826 }
2827}
2828
2829impl futures::Stream for WlanSoftmacBaseRequestStream {
2830 type Item = Result<WlanSoftmacBaseRequest, fidl::Error>;
2831
2832 fn poll_next(
2833 mut self: std::pin::Pin<&mut Self>,
2834 cx: &mut std::task::Context<'_>,
2835 ) -> std::task::Poll<Option<Self::Item>> {
2836 let this = &mut *self;
2837 if this.inner.check_shutdown(cx) {
2838 this.is_terminated = true;
2839 return std::task::Poll::Ready(None);
2840 }
2841 if this.is_terminated {
2842 panic!("polled WlanSoftmacBaseRequestStream after completion");
2843 }
2844 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2845 |bytes, handles| {
2846 match this.inner.channel().read_etc(cx, bytes, handles) {
2847 std::task::Poll::Ready(Ok(())) => {}
2848 std::task::Poll::Pending => return std::task::Poll::Pending,
2849 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2850 this.is_terminated = true;
2851 return std::task::Poll::Ready(None);
2852 }
2853 std::task::Poll::Ready(Err(e)) => {
2854 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2855 e.into(),
2856 ))));
2857 }
2858 }
2859
2860 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2862
2863 std::task::Poll::Ready(Some(match header.ordinal {
2864 0x18231a638e508f9d => {
2865 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2866 let mut req = fidl::new_empty!(
2867 fidl::encoding::EmptyPayload,
2868 fidl::encoding::DefaultFuchsiaResourceDialect
2869 );
2870 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2871 let control_handle =
2872 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2873 Ok(WlanSoftmacBaseRequest::Query {
2874 responder: WlanSoftmacBaseQueryResponder {
2875 control_handle: std::mem::ManuallyDrop::new(control_handle),
2876 tx_id: header.tx_id,
2877 },
2878 })
2879 }
2880 0x16797affc0cb58ae => {
2881 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2882 let mut req = fidl::new_empty!(
2883 fidl::encoding::EmptyPayload,
2884 fidl::encoding::DefaultFuchsiaResourceDialect
2885 );
2886 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2887 let control_handle =
2888 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2889 Ok(WlanSoftmacBaseRequest::QueryDiscoverySupport {
2890 responder: WlanSoftmacBaseQueryDiscoverySupportResponder {
2891 control_handle: std::mem::ManuallyDrop::new(control_handle),
2892 tx_id: header.tx_id,
2893 },
2894 })
2895 }
2896 0x7302c3f8c131f075 => {
2897 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2898 let mut req = fidl::new_empty!(
2899 fidl::encoding::EmptyPayload,
2900 fidl::encoding::DefaultFuchsiaResourceDialect
2901 );
2902 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2903 let control_handle =
2904 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2905 Ok(WlanSoftmacBaseRequest::QueryMacSublayerSupport {
2906 responder: WlanSoftmacBaseQueryMacSublayerSupportResponder {
2907 control_handle: std::mem::ManuallyDrop::new(control_handle),
2908 tx_id: header.tx_id,
2909 },
2910 })
2911 }
2912 0x3691bb75abf6354 => {
2913 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2914 let mut req = fidl::new_empty!(
2915 fidl::encoding::EmptyPayload,
2916 fidl::encoding::DefaultFuchsiaResourceDialect
2917 );
2918 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2919 let control_handle =
2920 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2921 Ok(WlanSoftmacBaseRequest::QuerySecuritySupport {
2922 responder: WlanSoftmacBaseQuerySecuritySupportResponder {
2923 control_handle: std::mem::ManuallyDrop::new(control_handle),
2924 tx_id: header.tx_id,
2925 },
2926 })
2927 }
2928 0x347d78dc1d4d27bf => {
2929 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2930 let mut req = fidl::new_empty!(
2931 fidl::encoding::EmptyPayload,
2932 fidl::encoding::DefaultFuchsiaResourceDialect
2933 );
2934 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2935 let control_handle =
2936 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2937 Ok(WlanSoftmacBaseRequest::QuerySpectrumManagementSupport {
2938 responder: WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
2939 control_handle: std::mem::ManuallyDrop::new(control_handle),
2940 tx_id: header.tx_id,
2941 },
2942 })
2943 }
2944 0x12836b533cd63ece => {
2945 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2946 let mut req = fidl::new_empty!(
2947 WlanSoftmacBaseSetChannelRequest,
2948 fidl::encoding::DefaultFuchsiaResourceDialect
2949 );
2950 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseSetChannelRequest>(&header, _body_bytes, handles, &mut req)?;
2951 let control_handle =
2952 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2953 Ok(WlanSoftmacBaseRequest::SetChannel {
2954 payload: req,
2955 responder: WlanSoftmacBaseSetChannelResponder {
2956 control_handle: std::mem::ManuallyDrop::new(control_handle),
2957 tx_id: header.tx_id,
2958 },
2959 })
2960 }
2961 0x1336fb5455b77a6e => {
2962 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2963 let mut req = fidl::new_empty!(
2964 WlanSoftmacBaseJoinBssRequest,
2965 fidl::encoding::DefaultFuchsiaResourceDialect
2966 );
2967 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseJoinBssRequest>(&header, _body_bytes, handles, &mut req)?;
2968 let control_handle =
2969 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2970 Ok(WlanSoftmacBaseRequest::JoinBss {
2971 join_request: req.join_request,
2972
2973 responder: WlanSoftmacBaseJoinBssResponder {
2974 control_handle: std::mem::ManuallyDrop::new(control_handle),
2975 tx_id: header.tx_id,
2976 },
2977 })
2978 }
2979 0x6c35807632c64576 => {
2980 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2981 let mut req = fidl::new_empty!(
2982 WlanSoftmacBaseEnableBeaconingRequest,
2983 fidl::encoding::DefaultFuchsiaResourceDialect
2984 );
2985 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseEnableBeaconingRequest>(&header, _body_bytes, handles, &mut req)?;
2986 let control_handle =
2987 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
2988 Ok(WlanSoftmacBaseRequest::EnableBeaconing {
2989 payload: req,
2990 responder: WlanSoftmacBaseEnableBeaconingResponder {
2991 control_handle: std::mem::ManuallyDrop::new(control_handle),
2992 tx_id: header.tx_id,
2993 },
2994 })
2995 }
2996 0x3303b30f99dbb406 => {
2997 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2998 let mut req = fidl::new_empty!(
2999 fidl::encoding::EmptyPayload,
3000 fidl::encoding::DefaultFuchsiaResourceDialect
3001 );
3002 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3003 let control_handle =
3004 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3005 Ok(WlanSoftmacBaseRequest::DisableBeaconing {
3006 responder: WlanSoftmacBaseDisableBeaconingResponder {
3007 control_handle: std::mem::ManuallyDrop::new(control_handle),
3008 tx_id: header.tx_id,
3009 },
3010 })
3011 }
3012 0x7decf9b4200b9131 => {
3013 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3014 let mut req = fidl::new_empty!(
3015 WlanKeyConfiguration,
3016 fidl::encoding::DefaultFuchsiaResourceDialect
3017 );
3018 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanKeyConfiguration>(&header, _body_bytes, handles, &mut req)?;
3019 let control_handle =
3020 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3021 Ok(WlanSoftmacBaseRequest::InstallKey {
3022 payload: req,
3023 responder: WlanSoftmacBaseInstallKeyResponder {
3024 control_handle: std::mem::ManuallyDrop::new(control_handle),
3025 tx_id: header.tx_id,
3026 },
3027 })
3028 }
3029 0x436ffe3ba461d6cd => {
3030 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3031 let mut req = fidl::new_empty!(
3032 WlanSoftmacBaseNotifyAssociationCompleteRequest,
3033 fidl::encoding::DefaultFuchsiaResourceDialect
3034 );
3035 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseNotifyAssociationCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
3036 let control_handle =
3037 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3038 Ok(WlanSoftmacBaseRequest::NotifyAssociationComplete {
3039 assoc_cfg: req.assoc_cfg,
3040
3041 responder: WlanSoftmacBaseNotifyAssociationCompleteResponder {
3042 control_handle: std::mem::ManuallyDrop::new(control_handle),
3043 tx_id: header.tx_id,
3044 },
3045 })
3046 }
3047 0x581d76c39190a7dd => {
3048 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3049 let mut req = fidl::new_empty!(
3050 WlanSoftmacBaseClearAssociationRequest,
3051 fidl::encoding::DefaultFuchsiaResourceDialect
3052 );
3053 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseClearAssociationRequest>(&header, _body_bytes, handles, &mut req)?;
3054 let control_handle =
3055 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3056 Ok(WlanSoftmacBaseRequest::ClearAssociation {
3057 payload: req,
3058 responder: WlanSoftmacBaseClearAssociationResponder {
3059 control_handle: std::mem::ManuallyDrop::new(control_handle),
3060 tx_id: header.tx_id,
3061 },
3062 })
3063 }
3064 0x5662f989cb4083bb => {
3065 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3066 let mut req = fidl::new_empty!(
3067 WlanSoftmacBaseStartPassiveScanRequest,
3068 fidl::encoding::DefaultFuchsiaResourceDialect
3069 );
3070 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseStartPassiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
3071 let control_handle =
3072 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3073 Ok(WlanSoftmacBaseRequest::StartPassiveScan {
3074 payload: req,
3075 responder: WlanSoftmacBaseStartPassiveScanResponder {
3076 control_handle: std::mem::ManuallyDrop::new(control_handle),
3077 tx_id: header.tx_id,
3078 },
3079 })
3080 }
3081 0x4896eafa9937751e => {
3082 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3083 let mut req = fidl::new_empty!(
3084 WlanSoftmacStartActiveScanRequest,
3085 fidl::encoding::DefaultFuchsiaResourceDialect
3086 );
3087 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacStartActiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
3088 let control_handle =
3089 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3090 Ok(WlanSoftmacBaseRequest::StartActiveScan {
3091 payload: req,
3092 responder: WlanSoftmacBaseStartActiveScanResponder {
3093 control_handle: std::mem::ManuallyDrop::new(control_handle),
3094 tx_id: header.tx_id,
3095 },
3096 })
3097 }
3098 0xf7d859369764556 => {
3099 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3100 let mut req = fidl::new_empty!(
3101 WlanSoftmacBaseCancelScanRequest,
3102 fidl::encoding::DefaultFuchsiaResourceDialect
3103 );
3104 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseCancelScanRequest>(&header, _body_bytes, handles, &mut req)?;
3105 let control_handle =
3106 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3107 Ok(WlanSoftmacBaseRequest::CancelScan {
3108 payload: req,
3109 responder: WlanSoftmacBaseCancelScanResponder {
3110 control_handle: std::mem::ManuallyDrop::new(control_handle),
3111 tx_id: header.tx_id,
3112 },
3113 })
3114 }
3115 0x68522c7122d5f78c => {
3116 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3117 let mut req = fidl::new_empty!(
3118 WlanSoftmacBaseUpdateWmmParametersRequest,
3119 fidl::encoding::DefaultFuchsiaResourceDialect
3120 );
3121 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseUpdateWmmParametersRequest>(&header, _body_bytes, handles, &mut req)?;
3122 let control_handle =
3123 WlanSoftmacBaseControlHandle { inner: this.inner.clone() };
3124 Ok(WlanSoftmacBaseRequest::UpdateWmmParameters {
3125 payload: req,
3126 responder: WlanSoftmacBaseUpdateWmmParametersResponder {
3127 control_handle: std::mem::ManuallyDrop::new(control_handle),
3128 tx_id: header.tx_id,
3129 },
3130 })
3131 }
3132 _ if header.tx_id == 0
3133 && header
3134 .dynamic_flags()
3135 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3136 {
3137 Ok(WlanSoftmacBaseRequest::_UnknownMethod {
3138 ordinal: header.ordinal,
3139 control_handle: WlanSoftmacBaseControlHandle {
3140 inner: this.inner.clone(),
3141 },
3142 method_type: fidl::MethodType::OneWay,
3143 })
3144 }
3145 _ if header
3146 .dynamic_flags()
3147 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3148 {
3149 this.inner.send_framework_err(
3150 fidl::encoding::FrameworkErr::UnknownMethod,
3151 header.tx_id,
3152 header.ordinal,
3153 header.dynamic_flags(),
3154 (bytes, handles),
3155 )?;
3156 Ok(WlanSoftmacBaseRequest::_UnknownMethod {
3157 ordinal: header.ordinal,
3158 control_handle: WlanSoftmacBaseControlHandle {
3159 inner: this.inner.clone(),
3160 },
3161 method_type: fidl::MethodType::TwoWay,
3162 })
3163 }
3164 _ => Err(fidl::Error::UnknownOrdinal {
3165 ordinal: header.ordinal,
3166 protocol_name:
3167 <WlanSoftmacBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3168 }),
3169 }))
3170 },
3171 )
3172 }
3173}
3174
3175#[derive(Debug)]
3184pub enum WlanSoftmacBaseRequest {
3185 Query { responder: WlanSoftmacBaseQueryResponder },
3193 QueryDiscoverySupport { responder: WlanSoftmacBaseQueryDiscoverySupportResponder },
3197 QueryMacSublayerSupport { responder: WlanSoftmacBaseQueryMacSublayerSupportResponder },
3205 QuerySecuritySupport { responder: WlanSoftmacBaseQuerySecuritySupportResponder },
3208 QuerySpectrumManagementSupport {
3212 responder: WlanSoftmacBaseQuerySpectrumManagementSupportResponder,
3213 },
3214 SetChannel {
3222 payload: WlanSoftmacBaseSetChannelRequest,
3223 responder: WlanSoftmacBaseSetChannelResponder,
3224 },
3225 JoinBss {
3235 join_request: fidl_fuchsia_wlan_common::JoinBssRequest,
3236 responder: WlanSoftmacBaseJoinBssResponder,
3237 },
3238 EnableBeaconing {
3253 payload: WlanSoftmacBaseEnableBeaconingRequest,
3254 responder: WlanSoftmacBaseEnableBeaconingResponder,
3255 },
3256 DisableBeaconing { responder: WlanSoftmacBaseDisableBeaconingResponder },
3258 InstallKey { payload: WlanKeyConfiguration, responder: WlanSoftmacBaseInstallKeyResponder },
3265 NotifyAssociationComplete {
3275 assoc_cfg: WlanAssociationConfig,
3276 responder: WlanSoftmacBaseNotifyAssociationCompleteResponder,
3277 },
3278 ClearAssociation {
3280 payload: WlanSoftmacBaseClearAssociationRequest,
3281 responder: WlanSoftmacBaseClearAssociationResponder,
3282 },
3283 StartPassiveScan {
3297 payload: WlanSoftmacBaseStartPassiveScanRequest,
3298 responder: WlanSoftmacBaseStartPassiveScanResponder,
3299 },
3300 StartActiveScan {
3314 payload: WlanSoftmacStartActiveScanRequest,
3315 responder: WlanSoftmacBaseStartActiveScanResponder,
3316 },
3317 CancelScan {
3331 payload: WlanSoftmacBaseCancelScanRequest,
3332 responder: WlanSoftmacBaseCancelScanResponder,
3333 },
3334 UpdateWmmParameters {
3337 payload: WlanSoftmacBaseUpdateWmmParametersRequest,
3338 responder: WlanSoftmacBaseUpdateWmmParametersResponder,
3339 },
3340 #[non_exhaustive]
3342 _UnknownMethod {
3343 ordinal: u64,
3345 control_handle: WlanSoftmacBaseControlHandle,
3346 method_type: fidl::MethodType,
3347 },
3348}
3349
3350impl WlanSoftmacBaseRequest {
3351 #[allow(irrefutable_let_patterns)]
3352 pub fn into_query(self) -> Option<(WlanSoftmacBaseQueryResponder)> {
3353 if let WlanSoftmacBaseRequest::Query { responder } = self {
3354 Some((responder))
3355 } else {
3356 None
3357 }
3358 }
3359
3360 #[allow(irrefutable_let_patterns)]
3361 pub fn into_query_discovery_support(
3362 self,
3363 ) -> Option<(WlanSoftmacBaseQueryDiscoverySupportResponder)> {
3364 if let WlanSoftmacBaseRequest::QueryDiscoverySupport { responder } = self {
3365 Some((responder))
3366 } else {
3367 None
3368 }
3369 }
3370
3371 #[allow(irrefutable_let_patterns)]
3372 pub fn into_query_mac_sublayer_support(
3373 self,
3374 ) -> Option<(WlanSoftmacBaseQueryMacSublayerSupportResponder)> {
3375 if let WlanSoftmacBaseRequest::QueryMacSublayerSupport { responder } = self {
3376 Some((responder))
3377 } else {
3378 None
3379 }
3380 }
3381
3382 #[allow(irrefutable_let_patterns)]
3383 pub fn into_query_security_support(
3384 self,
3385 ) -> Option<(WlanSoftmacBaseQuerySecuritySupportResponder)> {
3386 if let WlanSoftmacBaseRequest::QuerySecuritySupport { responder } = self {
3387 Some((responder))
3388 } else {
3389 None
3390 }
3391 }
3392
3393 #[allow(irrefutable_let_patterns)]
3394 pub fn into_query_spectrum_management_support(
3395 self,
3396 ) -> Option<(WlanSoftmacBaseQuerySpectrumManagementSupportResponder)> {
3397 if let WlanSoftmacBaseRequest::QuerySpectrumManagementSupport { responder } = self {
3398 Some((responder))
3399 } else {
3400 None
3401 }
3402 }
3403
3404 #[allow(irrefutable_let_patterns)]
3405 pub fn into_set_channel(
3406 self,
3407 ) -> Option<(WlanSoftmacBaseSetChannelRequest, WlanSoftmacBaseSetChannelResponder)> {
3408 if let WlanSoftmacBaseRequest::SetChannel { payload, responder } = self {
3409 Some((payload, responder))
3410 } else {
3411 None
3412 }
3413 }
3414
3415 #[allow(irrefutable_let_patterns)]
3416 pub fn into_join_bss(
3417 self,
3418 ) -> Option<(fidl_fuchsia_wlan_common::JoinBssRequest, WlanSoftmacBaseJoinBssResponder)> {
3419 if let WlanSoftmacBaseRequest::JoinBss { join_request, responder } = self {
3420 Some((join_request, responder))
3421 } else {
3422 None
3423 }
3424 }
3425
3426 #[allow(irrefutable_let_patterns)]
3427 pub fn into_enable_beaconing(
3428 self,
3429 ) -> Option<(WlanSoftmacBaseEnableBeaconingRequest, WlanSoftmacBaseEnableBeaconingResponder)>
3430 {
3431 if let WlanSoftmacBaseRequest::EnableBeaconing { payload, responder } = self {
3432 Some((payload, responder))
3433 } else {
3434 None
3435 }
3436 }
3437
3438 #[allow(irrefutable_let_patterns)]
3439 pub fn into_disable_beaconing(self) -> Option<(WlanSoftmacBaseDisableBeaconingResponder)> {
3440 if let WlanSoftmacBaseRequest::DisableBeaconing { responder } = self {
3441 Some((responder))
3442 } else {
3443 None
3444 }
3445 }
3446
3447 #[allow(irrefutable_let_patterns)]
3448 pub fn into_install_key(
3449 self,
3450 ) -> Option<(WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResponder)> {
3451 if let WlanSoftmacBaseRequest::InstallKey { payload, responder } = self {
3452 Some((payload, responder))
3453 } else {
3454 None
3455 }
3456 }
3457
3458 #[allow(irrefutable_let_patterns)]
3459 pub fn into_notify_association_complete(
3460 self,
3461 ) -> Option<(WlanAssociationConfig, WlanSoftmacBaseNotifyAssociationCompleteResponder)> {
3462 if let WlanSoftmacBaseRequest::NotifyAssociationComplete { assoc_cfg, responder } = self {
3463 Some((assoc_cfg, responder))
3464 } else {
3465 None
3466 }
3467 }
3468
3469 #[allow(irrefutable_let_patterns)]
3470 pub fn into_clear_association(
3471 self,
3472 ) -> Option<(WlanSoftmacBaseClearAssociationRequest, WlanSoftmacBaseClearAssociationResponder)>
3473 {
3474 if let WlanSoftmacBaseRequest::ClearAssociation { payload, responder } = self {
3475 Some((payload, responder))
3476 } else {
3477 None
3478 }
3479 }
3480
3481 #[allow(irrefutable_let_patterns)]
3482 pub fn into_start_passive_scan(
3483 self,
3484 ) -> Option<(WlanSoftmacBaseStartPassiveScanRequest, WlanSoftmacBaseStartPassiveScanResponder)>
3485 {
3486 if let WlanSoftmacBaseRequest::StartPassiveScan { payload, responder } = self {
3487 Some((payload, responder))
3488 } else {
3489 None
3490 }
3491 }
3492
3493 #[allow(irrefutable_let_patterns)]
3494 pub fn into_start_active_scan(
3495 self,
3496 ) -> Option<(WlanSoftmacStartActiveScanRequest, WlanSoftmacBaseStartActiveScanResponder)> {
3497 if let WlanSoftmacBaseRequest::StartActiveScan { payload, responder } = self {
3498 Some((payload, responder))
3499 } else {
3500 None
3501 }
3502 }
3503
3504 #[allow(irrefutable_let_patterns)]
3505 pub fn into_cancel_scan(
3506 self,
3507 ) -> Option<(WlanSoftmacBaseCancelScanRequest, WlanSoftmacBaseCancelScanResponder)> {
3508 if let WlanSoftmacBaseRequest::CancelScan { payload, responder } = self {
3509 Some((payload, responder))
3510 } else {
3511 None
3512 }
3513 }
3514
3515 #[allow(irrefutable_let_patterns)]
3516 pub fn into_update_wmm_parameters(
3517 self,
3518 ) -> Option<(
3519 WlanSoftmacBaseUpdateWmmParametersRequest,
3520 WlanSoftmacBaseUpdateWmmParametersResponder,
3521 )> {
3522 if let WlanSoftmacBaseRequest::UpdateWmmParameters { payload, responder } = self {
3523 Some((payload, responder))
3524 } else {
3525 None
3526 }
3527 }
3528
3529 pub fn method_name(&self) -> &'static str {
3531 match *self {
3532 WlanSoftmacBaseRequest::Query { .. } => "query",
3533 WlanSoftmacBaseRequest::QueryDiscoverySupport { .. } => "query_discovery_support",
3534 WlanSoftmacBaseRequest::QueryMacSublayerSupport { .. } => "query_mac_sublayer_support",
3535 WlanSoftmacBaseRequest::QuerySecuritySupport { .. } => "query_security_support",
3536 WlanSoftmacBaseRequest::QuerySpectrumManagementSupport { .. } => {
3537 "query_spectrum_management_support"
3538 }
3539 WlanSoftmacBaseRequest::SetChannel { .. } => "set_channel",
3540 WlanSoftmacBaseRequest::JoinBss { .. } => "join_bss",
3541 WlanSoftmacBaseRequest::EnableBeaconing { .. } => "enable_beaconing",
3542 WlanSoftmacBaseRequest::DisableBeaconing { .. } => "disable_beaconing",
3543 WlanSoftmacBaseRequest::InstallKey { .. } => "install_key",
3544 WlanSoftmacBaseRequest::NotifyAssociationComplete { .. } => {
3545 "notify_association_complete"
3546 }
3547 WlanSoftmacBaseRequest::ClearAssociation { .. } => "clear_association",
3548 WlanSoftmacBaseRequest::StartPassiveScan { .. } => "start_passive_scan",
3549 WlanSoftmacBaseRequest::StartActiveScan { .. } => "start_active_scan",
3550 WlanSoftmacBaseRequest::CancelScan { .. } => "cancel_scan",
3551 WlanSoftmacBaseRequest::UpdateWmmParameters { .. } => "update_wmm_parameters",
3552 WlanSoftmacBaseRequest::_UnknownMethod {
3553 method_type: fidl::MethodType::OneWay,
3554 ..
3555 } => "unknown one-way method",
3556 WlanSoftmacBaseRequest::_UnknownMethod {
3557 method_type: fidl::MethodType::TwoWay,
3558 ..
3559 } => "unknown two-way method",
3560 }
3561 }
3562}
3563
3564#[derive(Debug, Clone)]
3565pub struct WlanSoftmacBaseControlHandle {
3566 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3567}
3568
3569impl fidl::endpoints::ControlHandle for WlanSoftmacBaseControlHandle {
3570 fn shutdown(&self) {
3571 self.inner.shutdown()
3572 }
3573
3574 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3575 self.inner.shutdown_with_epitaph(status)
3576 }
3577
3578 fn is_closed(&self) -> bool {
3579 self.inner.channel().is_closed()
3580 }
3581 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3582 self.inner.channel().on_closed()
3583 }
3584
3585 #[cfg(target_os = "fuchsia")]
3586 fn signal_peer(
3587 &self,
3588 clear_mask: zx::Signals,
3589 set_mask: zx::Signals,
3590 ) -> Result<(), zx_status::Status> {
3591 use fidl::Peered;
3592 self.inner.channel().signal_peer(clear_mask, set_mask)
3593 }
3594}
3595
3596impl WlanSoftmacBaseControlHandle {}
3597
3598#[must_use = "FIDL methods require a response to be sent"]
3599#[derive(Debug)]
3600pub struct WlanSoftmacBaseQueryResponder {
3601 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3602 tx_id: u32,
3603}
3604
3605impl std::ops::Drop for WlanSoftmacBaseQueryResponder {
3609 fn drop(&mut self) {
3610 self.control_handle.shutdown();
3611 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3613 }
3614}
3615
3616impl fidl::endpoints::Responder for WlanSoftmacBaseQueryResponder {
3617 type ControlHandle = WlanSoftmacBaseControlHandle;
3618
3619 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3620 &self.control_handle
3621 }
3622
3623 fn drop_without_shutdown(mut self) {
3624 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3626 std::mem::forget(self);
3628 }
3629}
3630
3631impl WlanSoftmacBaseQueryResponder {
3632 pub fn send(
3636 self,
3637 mut result: Result<&WlanSoftmacQueryResponse, i32>,
3638 ) -> Result<(), fidl::Error> {
3639 let _result = self.send_raw(result);
3640 if _result.is_err() {
3641 self.control_handle.shutdown();
3642 }
3643 self.drop_without_shutdown();
3644 _result
3645 }
3646
3647 pub fn send_no_shutdown_on_err(
3649 self,
3650 mut result: Result<&WlanSoftmacQueryResponse, i32>,
3651 ) -> Result<(), fidl::Error> {
3652 let _result = self.send_raw(result);
3653 self.drop_without_shutdown();
3654 _result
3655 }
3656
3657 fn send_raw(
3658 &self,
3659 mut result: Result<&WlanSoftmacQueryResponse, i32>,
3660 ) -> Result<(), fidl::Error> {
3661 self.control_handle.inner.send::<fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>>(
3662 result,
3663 self.tx_id,
3664 0x18231a638e508f9d,
3665 fidl::encoding::DynamicFlags::empty(),
3666 )
3667 }
3668}
3669
3670#[must_use = "FIDL methods require a response to be sent"]
3671#[derive(Debug)]
3672pub struct WlanSoftmacBaseQueryDiscoverySupportResponder {
3673 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3674 tx_id: u32,
3675}
3676
3677impl std::ops::Drop for WlanSoftmacBaseQueryDiscoverySupportResponder {
3681 fn drop(&mut self) {
3682 self.control_handle.shutdown();
3683 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3685 }
3686}
3687
3688impl fidl::endpoints::Responder for WlanSoftmacBaseQueryDiscoverySupportResponder {
3689 type ControlHandle = WlanSoftmacBaseControlHandle;
3690
3691 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3692 &self.control_handle
3693 }
3694
3695 fn drop_without_shutdown(mut self) {
3696 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3698 std::mem::forget(self);
3700 }
3701}
3702
3703impl WlanSoftmacBaseQueryDiscoverySupportResponder {
3704 pub fn send(self, mut result: Result<&DiscoverySupport, i32>) -> Result<(), fidl::Error> {
3708 let _result = self.send_raw(result);
3709 if _result.is_err() {
3710 self.control_handle.shutdown();
3711 }
3712 self.drop_without_shutdown();
3713 _result
3714 }
3715
3716 pub fn send_no_shutdown_on_err(
3718 self,
3719 mut result: Result<&DiscoverySupport, i32>,
3720 ) -> Result<(), fidl::Error> {
3721 let _result = self.send_raw(result);
3722 self.drop_without_shutdown();
3723 _result
3724 }
3725
3726 fn send_raw(&self, mut result: Result<&DiscoverySupport, i32>) -> Result<(), fidl::Error> {
3727 self.control_handle.inner.send::<fidl::encoding::ResultType<
3728 WlanSoftmacBaseQueryDiscoverySupportResponse,
3729 i32,
3730 >>(
3731 result.map(|resp| (resp,)),
3732 self.tx_id,
3733 0x16797affc0cb58ae,
3734 fidl::encoding::DynamicFlags::empty(),
3735 )
3736 }
3737}
3738
3739#[must_use = "FIDL methods require a response to be sent"]
3740#[derive(Debug)]
3741pub struct WlanSoftmacBaseQueryMacSublayerSupportResponder {
3742 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3743 tx_id: u32,
3744}
3745
3746impl std::ops::Drop for WlanSoftmacBaseQueryMacSublayerSupportResponder {
3750 fn drop(&mut self) {
3751 self.control_handle.shutdown();
3752 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3754 }
3755}
3756
3757impl fidl::endpoints::Responder for WlanSoftmacBaseQueryMacSublayerSupportResponder {
3758 type ControlHandle = WlanSoftmacBaseControlHandle;
3759
3760 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3761 &self.control_handle
3762 }
3763
3764 fn drop_without_shutdown(mut self) {
3765 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3767 std::mem::forget(self);
3769 }
3770}
3771
3772impl WlanSoftmacBaseQueryMacSublayerSupportResponder {
3773 pub fn send(
3777 self,
3778 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
3779 ) -> Result<(), fidl::Error> {
3780 let _result = self.send_raw(result);
3781 if _result.is_err() {
3782 self.control_handle.shutdown();
3783 }
3784 self.drop_without_shutdown();
3785 _result
3786 }
3787
3788 pub fn send_no_shutdown_on_err(
3790 self,
3791 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
3792 ) -> Result<(), fidl::Error> {
3793 let _result = self.send_raw(result);
3794 self.drop_without_shutdown();
3795 _result
3796 }
3797
3798 fn send_raw(
3799 &self,
3800 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
3801 ) -> Result<(), fidl::Error> {
3802 self.control_handle.inner.send::<fidl::encoding::ResultType<
3803 WlanSoftmacBaseQueryMacSublayerSupportResponse,
3804 i32,
3805 >>(
3806 result.map(|resp| (resp,)),
3807 self.tx_id,
3808 0x7302c3f8c131f075,
3809 fidl::encoding::DynamicFlags::empty(),
3810 )
3811 }
3812}
3813
3814#[must_use = "FIDL methods require a response to be sent"]
3815#[derive(Debug)]
3816pub struct WlanSoftmacBaseQuerySecuritySupportResponder {
3817 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3818 tx_id: u32,
3819}
3820
3821impl std::ops::Drop for WlanSoftmacBaseQuerySecuritySupportResponder {
3825 fn drop(&mut self) {
3826 self.control_handle.shutdown();
3827 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3829 }
3830}
3831
3832impl fidl::endpoints::Responder for WlanSoftmacBaseQuerySecuritySupportResponder {
3833 type ControlHandle = WlanSoftmacBaseControlHandle;
3834
3835 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3836 &self.control_handle
3837 }
3838
3839 fn drop_without_shutdown(mut self) {
3840 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3842 std::mem::forget(self);
3844 }
3845}
3846
3847impl WlanSoftmacBaseQuerySecuritySupportResponder {
3848 pub fn send(
3852 self,
3853 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
3854 ) -> Result<(), fidl::Error> {
3855 let _result = self.send_raw(result);
3856 if _result.is_err() {
3857 self.control_handle.shutdown();
3858 }
3859 self.drop_without_shutdown();
3860 _result
3861 }
3862
3863 pub fn send_no_shutdown_on_err(
3865 self,
3866 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
3867 ) -> Result<(), fidl::Error> {
3868 let _result = self.send_raw(result);
3869 self.drop_without_shutdown();
3870 _result
3871 }
3872
3873 fn send_raw(
3874 &self,
3875 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
3876 ) -> Result<(), fidl::Error> {
3877 self.control_handle.inner.send::<fidl::encoding::ResultType<
3878 WlanSoftmacBaseQuerySecuritySupportResponse,
3879 i32,
3880 >>(
3881 result.map(|resp| (resp,)),
3882 self.tx_id,
3883 0x3691bb75abf6354,
3884 fidl::encoding::DynamicFlags::empty(),
3885 )
3886 }
3887}
3888
3889#[must_use = "FIDL methods require a response to be sent"]
3890#[derive(Debug)]
3891pub struct WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
3892 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3893 tx_id: u32,
3894}
3895
3896impl std::ops::Drop for WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
3900 fn drop(&mut self) {
3901 self.control_handle.shutdown();
3902 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3904 }
3905}
3906
3907impl fidl::endpoints::Responder for WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
3908 type ControlHandle = WlanSoftmacBaseControlHandle;
3909
3910 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3911 &self.control_handle
3912 }
3913
3914 fn drop_without_shutdown(mut self) {
3915 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3917 std::mem::forget(self);
3919 }
3920}
3921
3922impl WlanSoftmacBaseQuerySpectrumManagementSupportResponder {
3923 pub fn send(
3927 self,
3928 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
3929 ) -> Result<(), fidl::Error> {
3930 let _result = self.send_raw(result);
3931 if _result.is_err() {
3932 self.control_handle.shutdown();
3933 }
3934 self.drop_without_shutdown();
3935 _result
3936 }
3937
3938 pub fn send_no_shutdown_on_err(
3940 self,
3941 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
3942 ) -> Result<(), fidl::Error> {
3943 let _result = self.send_raw(result);
3944 self.drop_without_shutdown();
3945 _result
3946 }
3947
3948 fn send_raw(
3949 &self,
3950 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
3951 ) -> Result<(), fidl::Error> {
3952 self.control_handle.inner.send::<fidl::encoding::ResultType<
3953 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
3954 i32,
3955 >>(
3956 result.map(|resp| (resp,)),
3957 self.tx_id,
3958 0x347d78dc1d4d27bf,
3959 fidl::encoding::DynamicFlags::empty(),
3960 )
3961 }
3962}
3963
3964#[must_use = "FIDL methods require a response to be sent"]
3965#[derive(Debug)]
3966pub struct WlanSoftmacBaseSetChannelResponder {
3967 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
3968 tx_id: u32,
3969}
3970
3971impl std::ops::Drop for WlanSoftmacBaseSetChannelResponder {
3975 fn drop(&mut self) {
3976 self.control_handle.shutdown();
3977 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3979 }
3980}
3981
3982impl fidl::endpoints::Responder for WlanSoftmacBaseSetChannelResponder {
3983 type ControlHandle = WlanSoftmacBaseControlHandle;
3984
3985 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
3986 &self.control_handle
3987 }
3988
3989 fn drop_without_shutdown(mut self) {
3990 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3992 std::mem::forget(self);
3994 }
3995}
3996
3997impl WlanSoftmacBaseSetChannelResponder {
3998 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4002 let _result = self.send_raw(result);
4003 if _result.is_err() {
4004 self.control_handle.shutdown();
4005 }
4006 self.drop_without_shutdown();
4007 _result
4008 }
4009
4010 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4012 let _result = self.send_raw(result);
4013 self.drop_without_shutdown();
4014 _result
4015 }
4016
4017 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4018 self.control_handle
4019 .inner
4020 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4021 result,
4022 self.tx_id,
4023 0x12836b533cd63ece,
4024 fidl::encoding::DynamicFlags::empty(),
4025 )
4026 }
4027}
4028
4029#[must_use = "FIDL methods require a response to be sent"]
4030#[derive(Debug)]
4031pub struct WlanSoftmacBaseJoinBssResponder {
4032 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4033 tx_id: u32,
4034}
4035
4036impl std::ops::Drop for WlanSoftmacBaseJoinBssResponder {
4040 fn drop(&mut self) {
4041 self.control_handle.shutdown();
4042 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4044 }
4045}
4046
4047impl fidl::endpoints::Responder for WlanSoftmacBaseJoinBssResponder {
4048 type ControlHandle = WlanSoftmacBaseControlHandle;
4049
4050 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4051 &self.control_handle
4052 }
4053
4054 fn drop_without_shutdown(mut self) {
4055 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4057 std::mem::forget(self);
4059 }
4060}
4061
4062impl WlanSoftmacBaseJoinBssResponder {
4063 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4067 let _result = self.send_raw(result);
4068 if _result.is_err() {
4069 self.control_handle.shutdown();
4070 }
4071 self.drop_without_shutdown();
4072 _result
4073 }
4074
4075 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4077 let _result = self.send_raw(result);
4078 self.drop_without_shutdown();
4079 _result
4080 }
4081
4082 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4083 self.control_handle
4084 .inner
4085 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4086 result,
4087 self.tx_id,
4088 0x1336fb5455b77a6e,
4089 fidl::encoding::DynamicFlags::empty(),
4090 )
4091 }
4092}
4093
4094#[must_use = "FIDL methods require a response to be sent"]
4095#[derive(Debug)]
4096pub struct WlanSoftmacBaseEnableBeaconingResponder {
4097 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4098 tx_id: u32,
4099}
4100
4101impl std::ops::Drop for WlanSoftmacBaseEnableBeaconingResponder {
4105 fn drop(&mut self) {
4106 self.control_handle.shutdown();
4107 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4109 }
4110}
4111
4112impl fidl::endpoints::Responder for WlanSoftmacBaseEnableBeaconingResponder {
4113 type ControlHandle = WlanSoftmacBaseControlHandle;
4114
4115 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4116 &self.control_handle
4117 }
4118
4119 fn drop_without_shutdown(mut self) {
4120 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4122 std::mem::forget(self);
4124 }
4125}
4126
4127impl WlanSoftmacBaseEnableBeaconingResponder {
4128 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4132 let _result = self.send_raw(result);
4133 if _result.is_err() {
4134 self.control_handle.shutdown();
4135 }
4136 self.drop_without_shutdown();
4137 _result
4138 }
4139
4140 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4142 let _result = self.send_raw(result);
4143 self.drop_without_shutdown();
4144 _result
4145 }
4146
4147 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4148 self.control_handle
4149 .inner
4150 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4151 result,
4152 self.tx_id,
4153 0x6c35807632c64576,
4154 fidl::encoding::DynamicFlags::empty(),
4155 )
4156 }
4157}
4158
4159#[must_use = "FIDL methods require a response to be sent"]
4160#[derive(Debug)]
4161pub struct WlanSoftmacBaseDisableBeaconingResponder {
4162 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4163 tx_id: u32,
4164}
4165
4166impl std::ops::Drop for WlanSoftmacBaseDisableBeaconingResponder {
4170 fn drop(&mut self) {
4171 self.control_handle.shutdown();
4172 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4174 }
4175}
4176
4177impl fidl::endpoints::Responder for WlanSoftmacBaseDisableBeaconingResponder {
4178 type ControlHandle = WlanSoftmacBaseControlHandle;
4179
4180 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4181 &self.control_handle
4182 }
4183
4184 fn drop_without_shutdown(mut self) {
4185 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4187 std::mem::forget(self);
4189 }
4190}
4191
4192impl WlanSoftmacBaseDisableBeaconingResponder {
4193 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4197 let _result = self.send_raw(result);
4198 if _result.is_err() {
4199 self.control_handle.shutdown();
4200 }
4201 self.drop_without_shutdown();
4202 _result
4203 }
4204
4205 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4207 let _result = self.send_raw(result);
4208 self.drop_without_shutdown();
4209 _result
4210 }
4211
4212 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4213 self.control_handle
4214 .inner
4215 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4216 result,
4217 self.tx_id,
4218 0x3303b30f99dbb406,
4219 fidl::encoding::DynamicFlags::empty(),
4220 )
4221 }
4222}
4223
4224#[must_use = "FIDL methods require a response to be sent"]
4225#[derive(Debug)]
4226pub struct WlanSoftmacBaseInstallKeyResponder {
4227 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4228 tx_id: u32,
4229}
4230
4231impl std::ops::Drop for WlanSoftmacBaseInstallKeyResponder {
4235 fn drop(&mut self) {
4236 self.control_handle.shutdown();
4237 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4239 }
4240}
4241
4242impl fidl::endpoints::Responder for WlanSoftmacBaseInstallKeyResponder {
4243 type ControlHandle = WlanSoftmacBaseControlHandle;
4244
4245 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4246 &self.control_handle
4247 }
4248
4249 fn drop_without_shutdown(mut self) {
4250 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4252 std::mem::forget(self);
4254 }
4255}
4256
4257impl WlanSoftmacBaseInstallKeyResponder {
4258 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4262 let _result = self.send_raw(result);
4263 if _result.is_err() {
4264 self.control_handle.shutdown();
4265 }
4266 self.drop_without_shutdown();
4267 _result
4268 }
4269
4270 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4272 let _result = self.send_raw(result);
4273 self.drop_without_shutdown();
4274 _result
4275 }
4276
4277 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4278 self.control_handle
4279 .inner
4280 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4281 result,
4282 self.tx_id,
4283 0x7decf9b4200b9131,
4284 fidl::encoding::DynamicFlags::empty(),
4285 )
4286 }
4287}
4288
4289#[must_use = "FIDL methods require a response to be sent"]
4290#[derive(Debug)]
4291pub struct WlanSoftmacBaseNotifyAssociationCompleteResponder {
4292 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4293 tx_id: u32,
4294}
4295
4296impl std::ops::Drop for WlanSoftmacBaseNotifyAssociationCompleteResponder {
4300 fn drop(&mut self) {
4301 self.control_handle.shutdown();
4302 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4304 }
4305}
4306
4307impl fidl::endpoints::Responder for WlanSoftmacBaseNotifyAssociationCompleteResponder {
4308 type ControlHandle = WlanSoftmacBaseControlHandle;
4309
4310 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4311 &self.control_handle
4312 }
4313
4314 fn drop_without_shutdown(mut self) {
4315 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4317 std::mem::forget(self);
4319 }
4320}
4321
4322impl WlanSoftmacBaseNotifyAssociationCompleteResponder {
4323 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4327 let _result = self.send_raw(result);
4328 if _result.is_err() {
4329 self.control_handle.shutdown();
4330 }
4331 self.drop_without_shutdown();
4332 _result
4333 }
4334
4335 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4337 let _result = self.send_raw(result);
4338 self.drop_without_shutdown();
4339 _result
4340 }
4341
4342 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4343 self.control_handle
4344 .inner
4345 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4346 result,
4347 self.tx_id,
4348 0x436ffe3ba461d6cd,
4349 fidl::encoding::DynamicFlags::empty(),
4350 )
4351 }
4352}
4353
4354#[must_use = "FIDL methods require a response to be sent"]
4355#[derive(Debug)]
4356pub struct WlanSoftmacBaseClearAssociationResponder {
4357 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4358 tx_id: u32,
4359}
4360
4361impl std::ops::Drop for WlanSoftmacBaseClearAssociationResponder {
4365 fn drop(&mut self) {
4366 self.control_handle.shutdown();
4367 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4369 }
4370}
4371
4372impl fidl::endpoints::Responder for WlanSoftmacBaseClearAssociationResponder {
4373 type ControlHandle = WlanSoftmacBaseControlHandle;
4374
4375 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4376 &self.control_handle
4377 }
4378
4379 fn drop_without_shutdown(mut self) {
4380 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4382 std::mem::forget(self);
4384 }
4385}
4386
4387impl WlanSoftmacBaseClearAssociationResponder {
4388 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4392 let _result = self.send_raw(result);
4393 if _result.is_err() {
4394 self.control_handle.shutdown();
4395 }
4396 self.drop_without_shutdown();
4397 _result
4398 }
4399
4400 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4402 let _result = self.send_raw(result);
4403 self.drop_without_shutdown();
4404 _result
4405 }
4406
4407 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4408 self.control_handle
4409 .inner
4410 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4411 result,
4412 self.tx_id,
4413 0x581d76c39190a7dd,
4414 fidl::encoding::DynamicFlags::empty(),
4415 )
4416 }
4417}
4418
4419#[must_use = "FIDL methods require a response to be sent"]
4420#[derive(Debug)]
4421pub struct WlanSoftmacBaseStartPassiveScanResponder {
4422 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4423 tx_id: u32,
4424}
4425
4426impl std::ops::Drop for WlanSoftmacBaseStartPassiveScanResponder {
4430 fn drop(&mut self) {
4431 self.control_handle.shutdown();
4432 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4434 }
4435}
4436
4437impl fidl::endpoints::Responder for WlanSoftmacBaseStartPassiveScanResponder {
4438 type ControlHandle = WlanSoftmacBaseControlHandle;
4439
4440 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4441 &self.control_handle
4442 }
4443
4444 fn drop_without_shutdown(mut self) {
4445 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4447 std::mem::forget(self);
4449 }
4450}
4451
4452impl WlanSoftmacBaseStartPassiveScanResponder {
4453 pub fn send(
4457 self,
4458 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
4459 ) -> Result<(), fidl::Error> {
4460 let _result = self.send_raw(result);
4461 if _result.is_err() {
4462 self.control_handle.shutdown();
4463 }
4464 self.drop_without_shutdown();
4465 _result
4466 }
4467
4468 pub fn send_no_shutdown_on_err(
4470 self,
4471 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
4472 ) -> Result<(), fidl::Error> {
4473 let _result = self.send_raw(result);
4474 self.drop_without_shutdown();
4475 _result
4476 }
4477
4478 fn send_raw(
4479 &self,
4480 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
4481 ) -> Result<(), fidl::Error> {
4482 self.control_handle.inner.send::<fidl::encoding::ResultType<
4483 WlanSoftmacBaseStartPassiveScanResponse,
4484 i32,
4485 >>(
4486 result,
4487 self.tx_id,
4488 0x5662f989cb4083bb,
4489 fidl::encoding::DynamicFlags::empty(),
4490 )
4491 }
4492}
4493
4494#[must_use = "FIDL methods require a response to be sent"]
4495#[derive(Debug)]
4496pub struct WlanSoftmacBaseStartActiveScanResponder {
4497 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4498 tx_id: u32,
4499}
4500
4501impl std::ops::Drop for WlanSoftmacBaseStartActiveScanResponder {
4505 fn drop(&mut self) {
4506 self.control_handle.shutdown();
4507 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4509 }
4510}
4511
4512impl fidl::endpoints::Responder for WlanSoftmacBaseStartActiveScanResponder {
4513 type ControlHandle = WlanSoftmacBaseControlHandle;
4514
4515 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4516 &self.control_handle
4517 }
4518
4519 fn drop_without_shutdown(mut self) {
4520 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4522 std::mem::forget(self);
4524 }
4525}
4526
4527impl WlanSoftmacBaseStartActiveScanResponder {
4528 pub fn send(
4532 self,
4533 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
4534 ) -> Result<(), fidl::Error> {
4535 let _result = self.send_raw(result);
4536 if _result.is_err() {
4537 self.control_handle.shutdown();
4538 }
4539 self.drop_without_shutdown();
4540 _result
4541 }
4542
4543 pub fn send_no_shutdown_on_err(
4545 self,
4546 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
4547 ) -> Result<(), fidl::Error> {
4548 let _result = self.send_raw(result);
4549 self.drop_without_shutdown();
4550 _result
4551 }
4552
4553 fn send_raw(
4554 &self,
4555 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
4556 ) -> Result<(), fidl::Error> {
4557 self.control_handle.inner.send::<fidl::encoding::ResultType<
4558 WlanSoftmacBaseStartActiveScanResponse,
4559 i32,
4560 >>(
4561 result,
4562 self.tx_id,
4563 0x4896eafa9937751e,
4564 fidl::encoding::DynamicFlags::empty(),
4565 )
4566 }
4567}
4568
4569#[must_use = "FIDL methods require a response to be sent"]
4570#[derive(Debug)]
4571pub struct WlanSoftmacBaseCancelScanResponder {
4572 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4573 tx_id: u32,
4574}
4575
4576impl std::ops::Drop for WlanSoftmacBaseCancelScanResponder {
4580 fn drop(&mut self) {
4581 self.control_handle.shutdown();
4582 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4584 }
4585}
4586
4587impl fidl::endpoints::Responder for WlanSoftmacBaseCancelScanResponder {
4588 type ControlHandle = WlanSoftmacBaseControlHandle;
4589
4590 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4591 &self.control_handle
4592 }
4593
4594 fn drop_without_shutdown(mut self) {
4595 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4597 std::mem::forget(self);
4599 }
4600}
4601
4602impl WlanSoftmacBaseCancelScanResponder {
4603 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4607 let _result = self.send_raw(result);
4608 if _result.is_err() {
4609 self.control_handle.shutdown();
4610 }
4611 self.drop_without_shutdown();
4612 _result
4613 }
4614
4615 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4617 let _result = self.send_raw(result);
4618 self.drop_without_shutdown();
4619 _result
4620 }
4621
4622 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4623 self.control_handle
4624 .inner
4625 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4626 result,
4627 self.tx_id,
4628 0xf7d859369764556,
4629 fidl::encoding::DynamicFlags::empty(),
4630 )
4631 }
4632}
4633
4634#[must_use = "FIDL methods require a response to be sent"]
4635#[derive(Debug)]
4636pub struct WlanSoftmacBaseUpdateWmmParametersResponder {
4637 control_handle: std::mem::ManuallyDrop<WlanSoftmacBaseControlHandle>,
4638 tx_id: u32,
4639}
4640
4641impl std::ops::Drop for WlanSoftmacBaseUpdateWmmParametersResponder {
4645 fn drop(&mut self) {
4646 self.control_handle.shutdown();
4647 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4649 }
4650}
4651
4652impl fidl::endpoints::Responder for WlanSoftmacBaseUpdateWmmParametersResponder {
4653 type ControlHandle = WlanSoftmacBaseControlHandle;
4654
4655 fn control_handle(&self) -> &WlanSoftmacBaseControlHandle {
4656 &self.control_handle
4657 }
4658
4659 fn drop_without_shutdown(mut self) {
4660 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4662 std::mem::forget(self);
4664 }
4665}
4666
4667impl WlanSoftmacBaseUpdateWmmParametersResponder {
4668 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4672 let _result = self.send_raw(result);
4673 if _result.is_err() {
4674 self.control_handle.shutdown();
4675 }
4676 self.drop_without_shutdown();
4677 _result
4678 }
4679
4680 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4682 let _result = self.send_raw(result);
4683 self.drop_without_shutdown();
4684 _result
4685 }
4686
4687 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4688 self.control_handle
4689 .inner
4690 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4691 result,
4692 self.tx_id,
4693 0x68522c7122d5f78c,
4694 fidl::encoding::DynamicFlags::empty(),
4695 )
4696 }
4697}
4698
4699#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4700pub struct WlanSoftmacBridgeMarker;
4701
4702impl fidl::endpoints::ProtocolMarker for WlanSoftmacBridgeMarker {
4703 type Proxy = WlanSoftmacBridgeProxy;
4704 type RequestStream = WlanSoftmacBridgeRequestStream;
4705 #[cfg(target_os = "fuchsia")]
4706 type SynchronousProxy = WlanSoftmacBridgeSynchronousProxy;
4707
4708 const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacBridge";
4709}
4710pub type WlanSoftmacBridgeStartResult = Result<fidl::Channel, i32>;
4711
4712pub trait WlanSoftmacBridgeProxyInterface: Send + Sync {
4713 type QueryResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQueryResult, fidl::Error>>
4714 + Send;
4715 fn r#query(&self) -> Self::QueryResponseFut;
4716 type QueryDiscoverySupportResponseFut: std::future::Future<
4717 Output = Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error>,
4718 > + Send;
4719 fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut;
4720 type QueryMacSublayerSupportResponseFut: std::future::Future<
4721 Output = Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error>,
4722 > + Send;
4723 fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut;
4724 type QuerySecuritySupportResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error>>
4725 + Send;
4726 fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut;
4727 type QuerySpectrumManagementSupportResponseFut: std::future::Future<
4728 Output = Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error>,
4729 > + Send;
4730 fn r#query_spectrum_management_support(
4731 &self,
4732 ) -> Self::QuerySpectrumManagementSupportResponseFut;
4733 type SetChannelResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseSetChannelResult, fidl::Error>>
4734 + Send;
4735 fn r#set_channel(
4736 &self,
4737 payload: &WlanSoftmacBaseSetChannelRequest,
4738 ) -> Self::SetChannelResponseFut;
4739 type JoinBssResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseJoinBssResult, fidl::Error>>
4740 + Send;
4741 fn r#join_bss(
4742 &self,
4743 join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
4744 ) -> Self::JoinBssResponseFut;
4745 type EnableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error>>
4746 + Send;
4747 fn r#enable_beaconing(
4748 &self,
4749 payload: &WlanSoftmacBaseEnableBeaconingRequest,
4750 ) -> Self::EnableBeaconingResponseFut;
4751 type DisableBeaconingResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error>>
4752 + Send;
4753 fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut;
4754 type InstallKeyResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseInstallKeyResult, fidl::Error>>
4755 + Send;
4756 fn r#install_key(&self, payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut;
4757 type NotifyAssociationCompleteResponseFut: std::future::Future<
4758 Output = Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error>,
4759 > + Send;
4760 fn r#notify_association_complete(
4761 &self,
4762 assoc_cfg: &WlanAssociationConfig,
4763 ) -> Self::NotifyAssociationCompleteResponseFut;
4764 type ClearAssociationResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseClearAssociationResult, fidl::Error>>
4765 + Send;
4766 fn r#clear_association(
4767 &self,
4768 payload: &WlanSoftmacBaseClearAssociationRequest,
4769 ) -> Self::ClearAssociationResponseFut;
4770 type StartPassiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error>>
4771 + Send;
4772 fn r#start_passive_scan(
4773 &self,
4774 payload: &WlanSoftmacBaseStartPassiveScanRequest,
4775 ) -> Self::StartPassiveScanResponseFut;
4776 type StartActiveScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error>>
4777 + Send;
4778 fn r#start_active_scan(
4779 &self,
4780 payload: &WlanSoftmacStartActiveScanRequest,
4781 ) -> Self::StartActiveScanResponseFut;
4782 type CancelScanResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseCancelScanResult, fidl::Error>>
4783 + Send;
4784 fn r#cancel_scan(
4785 &self,
4786 payload: &WlanSoftmacBaseCancelScanRequest,
4787 ) -> Self::CancelScanResponseFut;
4788 type UpdateWmmParametersResponseFut: std::future::Future<Output = Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error>>
4789 + Send;
4790 fn r#update_wmm_parameters(
4791 &self,
4792 payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
4793 ) -> Self::UpdateWmmParametersResponseFut;
4794 type StartResponseFut: std::future::Future<Output = Result<WlanSoftmacBridgeStartResult, fidl::Error>>
4795 + Send;
4796 fn r#start(
4797 &self,
4798 ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
4799 ethernet_tx: u64,
4800 wlan_rx: u64,
4801 ) -> Self::StartResponseFut;
4802 type SetEthernetStatusResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
4803 fn r#set_ethernet_status(&self, status: u32) -> Self::SetEthernetStatusResponseFut;
4804}
4805#[derive(Debug)]
4806#[cfg(target_os = "fuchsia")]
4807pub struct WlanSoftmacBridgeSynchronousProxy {
4808 client: fidl::client::sync::Client,
4809}
4810
4811#[cfg(target_os = "fuchsia")]
4812impl fidl::endpoints::SynchronousProxy for WlanSoftmacBridgeSynchronousProxy {
4813 type Proxy = WlanSoftmacBridgeProxy;
4814 type Protocol = WlanSoftmacBridgeMarker;
4815
4816 fn from_channel(inner: fidl::Channel) -> Self {
4817 Self::new(inner)
4818 }
4819
4820 fn into_channel(self) -> fidl::Channel {
4821 self.client.into_channel()
4822 }
4823
4824 fn as_channel(&self) -> &fidl::Channel {
4825 self.client.as_channel()
4826 }
4827}
4828
4829#[cfg(target_os = "fuchsia")]
4830impl WlanSoftmacBridgeSynchronousProxy {
4831 pub fn new(channel: fidl::Channel) -> Self {
4832 Self { client: fidl::client::sync::Client::new(channel) }
4833 }
4834
4835 pub fn into_channel(self) -> fidl::Channel {
4836 self.client.into_channel()
4837 }
4838
4839 pub fn wait_for_event(
4842 &self,
4843 deadline: zx::MonotonicInstant,
4844 ) -> Result<WlanSoftmacBridgeEvent, fidl::Error> {
4845 WlanSoftmacBridgeEvent::decode(
4846 self.client.wait_for_event::<WlanSoftmacBridgeMarker>(deadline)?,
4847 )
4848 }
4849
4850 pub fn r#query(
4858 &self,
4859 ___deadline: zx::MonotonicInstant,
4860 ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
4861 let _response = self.client.send_query::<
4862 fidl::encoding::EmptyPayload,
4863 fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
4864 WlanSoftmacBridgeMarker,
4865 >(
4866 (),
4867 0x18231a638e508f9d,
4868 fidl::encoding::DynamicFlags::empty(),
4869 ___deadline,
4870 )?;
4871 Ok(_response.map(|x| x))
4872 }
4873
4874 pub fn r#query_discovery_support(
4878 &self,
4879 ___deadline: zx::MonotonicInstant,
4880 ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
4881 let _response =
4882 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
4883 WlanSoftmacBaseQueryDiscoverySupportResponse,
4884 i32,
4885 >, WlanSoftmacBridgeMarker>(
4886 (),
4887 0x16797affc0cb58ae,
4888 fidl::encoding::DynamicFlags::empty(),
4889 ___deadline,
4890 )?;
4891 Ok(_response.map(|x| x.resp))
4892 }
4893
4894 pub fn r#query_mac_sublayer_support(
4902 &self,
4903 ___deadline: zx::MonotonicInstant,
4904 ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
4905 let _response =
4906 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
4907 WlanSoftmacBaseQueryMacSublayerSupportResponse,
4908 i32,
4909 >, WlanSoftmacBridgeMarker>(
4910 (),
4911 0x7302c3f8c131f075,
4912 fidl::encoding::DynamicFlags::empty(),
4913 ___deadline,
4914 )?;
4915 Ok(_response.map(|x| x.resp))
4916 }
4917
4918 pub fn r#query_security_support(
4921 &self,
4922 ___deadline: zx::MonotonicInstant,
4923 ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
4924 let _response =
4925 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
4926 WlanSoftmacBaseQuerySecuritySupportResponse,
4927 i32,
4928 >, WlanSoftmacBridgeMarker>(
4929 (),
4930 0x3691bb75abf6354,
4931 fidl::encoding::DynamicFlags::empty(),
4932 ___deadline,
4933 )?;
4934 Ok(_response.map(|x| x.resp))
4935 }
4936
4937 pub fn r#query_spectrum_management_support(
4941 &self,
4942 ___deadline: zx::MonotonicInstant,
4943 ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
4944 let _response =
4945 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
4946 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
4947 i32,
4948 >, WlanSoftmacBridgeMarker>(
4949 (),
4950 0x347d78dc1d4d27bf,
4951 fidl::encoding::DynamicFlags::empty(),
4952 ___deadline,
4953 )?;
4954 Ok(_response.map(|x| x.resp))
4955 }
4956
4957 pub fn r#set_channel(
4965 &self,
4966 mut payload: &WlanSoftmacBaseSetChannelRequest,
4967 ___deadline: zx::MonotonicInstant,
4968 ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
4969 let _response = self.client.send_query::<
4970 WlanSoftmacBaseSetChannelRequest,
4971 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4972 WlanSoftmacBridgeMarker,
4973 >(
4974 payload,
4975 0x12836b533cd63ece,
4976 fidl::encoding::DynamicFlags::empty(),
4977 ___deadline,
4978 )?;
4979 Ok(_response.map(|x| x))
4980 }
4981
4982 pub fn r#join_bss(
4992 &self,
4993 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
4994 ___deadline: zx::MonotonicInstant,
4995 ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
4996 let _response = self.client.send_query::<
4997 WlanSoftmacBaseJoinBssRequest,
4998 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4999 WlanSoftmacBridgeMarker,
5000 >(
5001 (join_request,),
5002 0x1336fb5455b77a6e,
5003 fidl::encoding::DynamicFlags::empty(),
5004 ___deadline,
5005 )?;
5006 Ok(_response.map(|x| x))
5007 }
5008
5009 pub fn r#enable_beaconing(
5024 &self,
5025 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
5026 ___deadline: zx::MonotonicInstant,
5027 ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
5028 let _response = self.client.send_query::<
5029 WlanSoftmacBaseEnableBeaconingRequest,
5030 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5031 WlanSoftmacBridgeMarker,
5032 >(
5033 payload,
5034 0x6c35807632c64576,
5035 fidl::encoding::DynamicFlags::empty(),
5036 ___deadline,
5037 )?;
5038 Ok(_response.map(|x| x))
5039 }
5040
5041 pub fn r#disable_beaconing(
5043 &self,
5044 ___deadline: zx::MonotonicInstant,
5045 ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
5046 let _response = self.client.send_query::<
5047 fidl::encoding::EmptyPayload,
5048 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5049 WlanSoftmacBridgeMarker,
5050 >(
5051 (),
5052 0x3303b30f99dbb406,
5053 fidl::encoding::DynamicFlags::empty(),
5054 ___deadline,
5055 )?;
5056 Ok(_response.map(|x| x))
5057 }
5058
5059 pub fn r#install_key(
5066 &self,
5067 mut payload: &WlanKeyConfiguration,
5068 ___deadline: zx::MonotonicInstant,
5069 ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
5070 let _response = self.client.send_query::<
5071 WlanKeyConfiguration,
5072 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5073 WlanSoftmacBridgeMarker,
5074 >(
5075 payload,
5076 0x7decf9b4200b9131,
5077 fidl::encoding::DynamicFlags::empty(),
5078 ___deadline,
5079 )?;
5080 Ok(_response.map(|x| x))
5081 }
5082
5083 pub fn r#notify_association_complete(
5093 &self,
5094 mut assoc_cfg: &WlanAssociationConfig,
5095 ___deadline: zx::MonotonicInstant,
5096 ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
5097 let _response = self.client.send_query::<
5098 WlanSoftmacBaseNotifyAssociationCompleteRequest,
5099 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5100 WlanSoftmacBridgeMarker,
5101 >(
5102 (assoc_cfg,),
5103 0x436ffe3ba461d6cd,
5104 fidl::encoding::DynamicFlags::empty(),
5105 ___deadline,
5106 )?;
5107 Ok(_response.map(|x| x))
5108 }
5109
5110 pub fn r#clear_association(
5112 &self,
5113 mut payload: &WlanSoftmacBaseClearAssociationRequest,
5114 ___deadline: zx::MonotonicInstant,
5115 ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
5116 let _response = self.client.send_query::<
5117 WlanSoftmacBaseClearAssociationRequest,
5118 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5119 WlanSoftmacBridgeMarker,
5120 >(
5121 payload,
5122 0x581d76c39190a7dd,
5123 fidl::encoding::DynamicFlags::empty(),
5124 ___deadline,
5125 )?;
5126 Ok(_response.map(|x| x))
5127 }
5128
5129 pub fn r#start_passive_scan(
5143 &self,
5144 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
5145 ___deadline: zx::MonotonicInstant,
5146 ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
5147 let _response = self.client.send_query::<
5148 WlanSoftmacBaseStartPassiveScanRequest,
5149 fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
5150 WlanSoftmacBridgeMarker,
5151 >(
5152 payload,
5153 0x5662f989cb4083bb,
5154 fidl::encoding::DynamicFlags::empty(),
5155 ___deadline,
5156 )?;
5157 Ok(_response.map(|x| x))
5158 }
5159
5160 pub fn r#start_active_scan(
5174 &self,
5175 mut payload: &WlanSoftmacStartActiveScanRequest,
5176 ___deadline: zx::MonotonicInstant,
5177 ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
5178 let _response = self.client.send_query::<
5179 WlanSoftmacStartActiveScanRequest,
5180 fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
5181 WlanSoftmacBridgeMarker,
5182 >(
5183 payload,
5184 0x4896eafa9937751e,
5185 fidl::encoding::DynamicFlags::empty(),
5186 ___deadline,
5187 )?;
5188 Ok(_response.map(|x| x))
5189 }
5190
5191 pub fn r#cancel_scan(
5205 &self,
5206 mut payload: &WlanSoftmacBaseCancelScanRequest,
5207 ___deadline: zx::MonotonicInstant,
5208 ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
5209 let _response = self.client.send_query::<
5210 WlanSoftmacBaseCancelScanRequest,
5211 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5212 WlanSoftmacBridgeMarker,
5213 >(
5214 payload,
5215 0xf7d859369764556,
5216 fidl::encoding::DynamicFlags::empty(),
5217 ___deadline,
5218 )?;
5219 Ok(_response.map(|x| x))
5220 }
5221
5222 pub fn r#update_wmm_parameters(
5225 &self,
5226 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
5227 ___deadline: zx::MonotonicInstant,
5228 ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
5229 let _response = self.client.send_query::<
5230 WlanSoftmacBaseUpdateWmmParametersRequest,
5231 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5232 WlanSoftmacBridgeMarker,
5233 >(
5234 payload,
5235 0x68522c7122d5f78c,
5236 fidl::encoding::DynamicFlags::empty(),
5237 ___deadline,
5238 )?;
5239 Ok(_response.map(|x| x))
5240 }
5241
5242 pub fn r#start(
5282 &self,
5283 mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
5284 mut ethernet_tx: u64,
5285 mut wlan_rx: u64,
5286 ___deadline: zx::MonotonicInstant,
5287 ) -> Result<WlanSoftmacBridgeStartResult, fidl::Error> {
5288 let _response = self.client.send_query::<
5289 WlanSoftmacBridgeStartRequest,
5290 fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>,
5291 WlanSoftmacBridgeMarker,
5292 >(
5293 (ifc_bridge, ethernet_tx, wlan_rx,),
5294 0x7b2c15a507020d4d,
5295 fidl::encoding::DynamicFlags::empty(),
5296 ___deadline,
5297 )?;
5298 Ok(_response.map(|x| x.sme_channel))
5299 }
5300
5301 pub fn r#set_ethernet_status(
5319 &self,
5320 mut status: u32,
5321 ___deadline: zx::MonotonicInstant,
5322 ) -> Result<(), fidl::Error> {
5323 let _response = self.client.send_query::<
5324 WlanSoftmacBridgeSetEthernetStatusRequest,
5325 fidl::encoding::EmptyPayload,
5326 WlanSoftmacBridgeMarker,
5327 >(
5328 (status,),
5329 0x412503cb3aaa350b,
5330 fidl::encoding::DynamicFlags::empty(),
5331 ___deadline,
5332 )?;
5333 Ok(_response)
5334 }
5335}
5336
5337#[cfg(target_os = "fuchsia")]
5338impl From<WlanSoftmacBridgeSynchronousProxy> for zx::NullableHandle {
5339 fn from(value: WlanSoftmacBridgeSynchronousProxy) -> Self {
5340 value.into_channel().into()
5341 }
5342}
5343
5344#[cfg(target_os = "fuchsia")]
5345impl From<fidl::Channel> for WlanSoftmacBridgeSynchronousProxy {
5346 fn from(value: fidl::Channel) -> Self {
5347 Self::new(value)
5348 }
5349}
5350
5351#[cfg(target_os = "fuchsia")]
5352impl fidl::endpoints::FromClient for WlanSoftmacBridgeSynchronousProxy {
5353 type Protocol = WlanSoftmacBridgeMarker;
5354
5355 fn from_client(value: fidl::endpoints::ClientEnd<WlanSoftmacBridgeMarker>) -> Self {
5356 Self::new(value.into_channel())
5357 }
5358}
5359
5360#[derive(Debug, Clone)]
5361pub struct WlanSoftmacBridgeProxy {
5362 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5363}
5364
5365impl fidl::endpoints::Proxy for WlanSoftmacBridgeProxy {
5366 type Protocol = WlanSoftmacBridgeMarker;
5367
5368 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5369 Self::new(inner)
5370 }
5371
5372 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5373 self.client.into_channel().map_err(|client| Self { client })
5374 }
5375
5376 fn as_channel(&self) -> &::fidl::AsyncChannel {
5377 self.client.as_channel()
5378 }
5379}
5380
5381impl WlanSoftmacBridgeProxy {
5382 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5384 let protocol_name =
5385 <WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5386 Self { client: fidl::client::Client::new(channel, protocol_name) }
5387 }
5388
5389 pub fn take_event_stream(&self) -> WlanSoftmacBridgeEventStream {
5395 WlanSoftmacBridgeEventStream { event_receiver: self.client.take_event_receiver() }
5396 }
5397
5398 pub fn r#query(
5406 &self,
5407 ) -> fidl::client::QueryResponseFut<
5408 WlanSoftmacBaseQueryResult,
5409 fidl::encoding::DefaultFuchsiaResourceDialect,
5410 > {
5411 WlanSoftmacBridgeProxyInterface::r#query(self)
5412 }
5413
5414 pub fn r#query_discovery_support(
5418 &self,
5419 ) -> fidl::client::QueryResponseFut<
5420 WlanSoftmacBaseQueryDiscoverySupportResult,
5421 fidl::encoding::DefaultFuchsiaResourceDialect,
5422 > {
5423 WlanSoftmacBridgeProxyInterface::r#query_discovery_support(self)
5424 }
5425
5426 pub fn r#query_mac_sublayer_support(
5434 &self,
5435 ) -> fidl::client::QueryResponseFut<
5436 WlanSoftmacBaseQueryMacSublayerSupportResult,
5437 fidl::encoding::DefaultFuchsiaResourceDialect,
5438 > {
5439 WlanSoftmacBridgeProxyInterface::r#query_mac_sublayer_support(self)
5440 }
5441
5442 pub fn r#query_security_support(
5445 &self,
5446 ) -> fidl::client::QueryResponseFut<
5447 WlanSoftmacBaseQuerySecuritySupportResult,
5448 fidl::encoding::DefaultFuchsiaResourceDialect,
5449 > {
5450 WlanSoftmacBridgeProxyInterface::r#query_security_support(self)
5451 }
5452
5453 pub fn r#query_spectrum_management_support(
5457 &self,
5458 ) -> fidl::client::QueryResponseFut<
5459 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
5460 fidl::encoding::DefaultFuchsiaResourceDialect,
5461 > {
5462 WlanSoftmacBridgeProxyInterface::r#query_spectrum_management_support(self)
5463 }
5464
5465 pub fn r#set_channel(
5473 &self,
5474 mut payload: &WlanSoftmacBaseSetChannelRequest,
5475 ) -> fidl::client::QueryResponseFut<
5476 WlanSoftmacBaseSetChannelResult,
5477 fidl::encoding::DefaultFuchsiaResourceDialect,
5478 > {
5479 WlanSoftmacBridgeProxyInterface::r#set_channel(self, payload)
5480 }
5481
5482 pub fn r#join_bss(
5492 &self,
5493 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
5494 ) -> fidl::client::QueryResponseFut<
5495 WlanSoftmacBaseJoinBssResult,
5496 fidl::encoding::DefaultFuchsiaResourceDialect,
5497 > {
5498 WlanSoftmacBridgeProxyInterface::r#join_bss(self, join_request)
5499 }
5500
5501 pub fn r#enable_beaconing(
5516 &self,
5517 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
5518 ) -> fidl::client::QueryResponseFut<
5519 WlanSoftmacBaseEnableBeaconingResult,
5520 fidl::encoding::DefaultFuchsiaResourceDialect,
5521 > {
5522 WlanSoftmacBridgeProxyInterface::r#enable_beaconing(self, payload)
5523 }
5524
5525 pub fn r#disable_beaconing(
5527 &self,
5528 ) -> fidl::client::QueryResponseFut<
5529 WlanSoftmacBaseDisableBeaconingResult,
5530 fidl::encoding::DefaultFuchsiaResourceDialect,
5531 > {
5532 WlanSoftmacBridgeProxyInterface::r#disable_beaconing(self)
5533 }
5534
5535 pub fn r#install_key(
5542 &self,
5543 mut payload: &WlanKeyConfiguration,
5544 ) -> fidl::client::QueryResponseFut<
5545 WlanSoftmacBaseInstallKeyResult,
5546 fidl::encoding::DefaultFuchsiaResourceDialect,
5547 > {
5548 WlanSoftmacBridgeProxyInterface::r#install_key(self, payload)
5549 }
5550
5551 pub fn r#notify_association_complete(
5561 &self,
5562 mut assoc_cfg: &WlanAssociationConfig,
5563 ) -> fidl::client::QueryResponseFut<
5564 WlanSoftmacBaseNotifyAssociationCompleteResult,
5565 fidl::encoding::DefaultFuchsiaResourceDialect,
5566 > {
5567 WlanSoftmacBridgeProxyInterface::r#notify_association_complete(self, assoc_cfg)
5568 }
5569
5570 pub fn r#clear_association(
5572 &self,
5573 mut payload: &WlanSoftmacBaseClearAssociationRequest,
5574 ) -> fidl::client::QueryResponseFut<
5575 WlanSoftmacBaseClearAssociationResult,
5576 fidl::encoding::DefaultFuchsiaResourceDialect,
5577 > {
5578 WlanSoftmacBridgeProxyInterface::r#clear_association(self, payload)
5579 }
5580
5581 pub fn r#start_passive_scan(
5595 &self,
5596 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
5597 ) -> fidl::client::QueryResponseFut<
5598 WlanSoftmacBaseStartPassiveScanResult,
5599 fidl::encoding::DefaultFuchsiaResourceDialect,
5600 > {
5601 WlanSoftmacBridgeProxyInterface::r#start_passive_scan(self, payload)
5602 }
5603
5604 pub fn r#start_active_scan(
5618 &self,
5619 mut payload: &WlanSoftmacStartActiveScanRequest,
5620 ) -> fidl::client::QueryResponseFut<
5621 WlanSoftmacBaseStartActiveScanResult,
5622 fidl::encoding::DefaultFuchsiaResourceDialect,
5623 > {
5624 WlanSoftmacBridgeProxyInterface::r#start_active_scan(self, payload)
5625 }
5626
5627 pub fn r#cancel_scan(
5641 &self,
5642 mut payload: &WlanSoftmacBaseCancelScanRequest,
5643 ) -> fidl::client::QueryResponseFut<
5644 WlanSoftmacBaseCancelScanResult,
5645 fidl::encoding::DefaultFuchsiaResourceDialect,
5646 > {
5647 WlanSoftmacBridgeProxyInterface::r#cancel_scan(self, payload)
5648 }
5649
5650 pub fn r#update_wmm_parameters(
5653 &self,
5654 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
5655 ) -> fidl::client::QueryResponseFut<
5656 WlanSoftmacBaseUpdateWmmParametersResult,
5657 fidl::encoding::DefaultFuchsiaResourceDialect,
5658 > {
5659 WlanSoftmacBridgeProxyInterface::r#update_wmm_parameters(self, payload)
5660 }
5661
5662 pub fn r#start(
5702 &self,
5703 mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
5704 mut ethernet_tx: u64,
5705 mut wlan_rx: u64,
5706 ) -> fidl::client::QueryResponseFut<
5707 WlanSoftmacBridgeStartResult,
5708 fidl::encoding::DefaultFuchsiaResourceDialect,
5709 > {
5710 WlanSoftmacBridgeProxyInterface::r#start(self, ifc_bridge, ethernet_tx, wlan_rx)
5711 }
5712
5713 pub fn r#set_ethernet_status(
5731 &self,
5732 mut status: u32,
5733 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
5734 WlanSoftmacBridgeProxyInterface::r#set_ethernet_status(self, status)
5735 }
5736}
5737
5738impl WlanSoftmacBridgeProxyInterface for WlanSoftmacBridgeProxy {
5739 type QueryResponseFut = fidl::client::QueryResponseFut<
5740 WlanSoftmacBaseQueryResult,
5741 fidl::encoding::DefaultFuchsiaResourceDialect,
5742 >;
5743 fn r#query(&self) -> Self::QueryResponseFut {
5744 fn _decode(
5745 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5746 ) -> Result<WlanSoftmacBaseQueryResult, fidl::Error> {
5747 let _response = fidl::client::decode_transaction_body::<
5748 fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>,
5749 fidl::encoding::DefaultFuchsiaResourceDialect,
5750 0x18231a638e508f9d,
5751 >(_buf?)?;
5752 Ok(_response.map(|x| x))
5753 }
5754 self.client
5755 .send_query_and_decode::<fidl::encoding::EmptyPayload, WlanSoftmacBaseQueryResult>(
5756 (),
5757 0x18231a638e508f9d,
5758 fidl::encoding::DynamicFlags::empty(),
5759 _decode,
5760 )
5761 }
5762
5763 type QueryDiscoverySupportResponseFut = fidl::client::QueryResponseFut<
5764 WlanSoftmacBaseQueryDiscoverySupportResult,
5765 fidl::encoding::DefaultFuchsiaResourceDialect,
5766 >;
5767 fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut {
5768 fn _decode(
5769 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5770 ) -> Result<WlanSoftmacBaseQueryDiscoverySupportResult, fidl::Error> {
5771 let _response = fidl::client::decode_transaction_body::<
5772 fidl::encoding::ResultType<WlanSoftmacBaseQueryDiscoverySupportResponse, i32>,
5773 fidl::encoding::DefaultFuchsiaResourceDialect,
5774 0x16797affc0cb58ae,
5775 >(_buf?)?;
5776 Ok(_response.map(|x| x.resp))
5777 }
5778 self.client.send_query_and_decode::<
5779 fidl::encoding::EmptyPayload,
5780 WlanSoftmacBaseQueryDiscoverySupportResult,
5781 >(
5782 (),
5783 0x16797affc0cb58ae,
5784 fidl::encoding::DynamicFlags::empty(),
5785 _decode,
5786 )
5787 }
5788
5789 type QueryMacSublayerSupportResponseFut = fidl::client::QueryResponseFut<
5790 WlanSoftmacBaseQueryMacSublayerSupportResult,
5791 fidl::encoding::DefaultFuchsiaResourceDialect,
5792 >;
5793 fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut {
5794 fn _decode(
5795 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5796 ) -> Result<WlanSoftmacBaseQueryMacSublayerSupportResult, fidl::Error> {
5797 let _response = fidl::client::decode_transaction_body::<
5798 fidl::encoding::ResultType<WlanSoftmacBaseQueryMacSublayerSupportResponse, i32>,
5799 fidl::encoding::DefaultFuchsiaResourceDialect,
5800 0x7302c3f8c131f075,
5801 >(_buf?)?;
5802 Ok(_response.map(|x| x.resp))
5803 }
5804 self.client.send_query_and_decode::<
5805 fidl::encoding::EmptyPayload,
5806 WlanSoftmacBaseQueryMacSublayerSupportResult,
5807 >(
5808 (),
5809 0x7302c3f8c131f075,
5810 fidl::encoding::DynamicFlags::empty(),
5811 _decode,
5812 )
5813 }
5814
5815 type QuerySecuritySupportResponseFut = fidl::client::QueryResponseFut<
5816 WlanSoftmacBaseQuerySecuritySupportResult,
5817 fidl::encoding::DefaultFuchsiaResourceDialect,
5818 >;
5819 fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut {
5820 fn _decode(
5821 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5822 ) -> Result<WlanSoftmacBaseQuerySecuritySupportResult, fidl::Error> {
5823 let _response = fidl::client::decode_transaction_body::<
5824 fidl::encoding::ResultType<WlanSoftmacBaseQuerySecuritySupportResponse, i32>,
5825 fidl::encoding::DefaultFuchsiaResourceDialect,
5826 0x3691bb75abf6354,
5827 >(_buf?)?;
5828 Ok(_response.map(|x| x.resp))
5829 }
5830 self.client.send_query_and_decode::<
5831 fidl::encoding::EmptyPayload,
5832 WlanSoftmacBaseQuerySecuritySupportResult,
5833 >(
5834 (),
5835 0x3691bb75abf6354,
5836 fidl::encoding::DynamicFlags::empty(),
5837 _decode,
5838 )
5839 }
5840
5841 type QuerySpectrumManagementSupportResponseFut = fidl::client::QueryResponseFut<
5842 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
5843 fidl::encoding::DefaultFuchsiaResourceDialect,
5844 >;
5845 fn r#query_spectrum_management_support(
5846 &self,
5847 ) -> Self::QuerySpectrumManagementSupportResponseFut {
5848 fn _decode(
5849 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5850 ) -> Result<WlanSoftmacBaseQuerySpectrumManagementSupportResult, fidl::Error> {
5851 let _response = fidl::client::decode_transaction_body::<
5852 fidl::encoding::ResultType<
5853 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
5854 i32,
5855 >,
5856 fidl::encoding::DefaultFuchsiaResourceDialect,
5857 0x347d78dc1d4d27bf,
5858 >(_buf?)?;
5859 Ok(_response.map(|x| x.resp))
5860 }
5861 self.client.send_query_and_decode::<
5862 fidl::encoding::EmptyPayload,
5863 WlanSoftmacBaseQuerySpectrumManagementSupportResult,
5864 >(
5865 (),
5866 0x347d78dc1d4d27bf,
5867 fidl::encoding::DynamicFlags::empty(),
5868 _decode,
5869 )
5870 }
5871
5872 type SetChannelResponseFut = fidl::client::QueryResponseFut<
5873 WlanSoftmacBaseSetChannelResult,
5874 fidl::encoding::DefaultFuchsiaResourceDialect,
5875 >;
5876 fn r#set_channel(
5877 &self,
5878 mut payload: &WlanSoftmacBaseSetChannelRequest,
5879 ) -> Self::SetChannelResponseFut {
5880 fn _decode(
5881 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5882 ) -> Result<WlanSoftmacBaseSetChannelResult, fidl::Error> {
5883 let _response = fidl::client::decode_transaction_body::<
5884 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5885 fidl::encoding::DefaultFuchsiaResourceDialect,
5886 0x12836b533cd63ece,
5887 >(_buf?)?;
5888 Ok(_response.map(|x| x))
5889 }
5890 self.client.send_query_and_decode::<
5891 WlanSoftmacBaseSetChannelRequest,
5892 WlanSoftmacBaseSetChannelResult,
5893 >(
5894 payload,
5895 0x12836b533cd63ece,
5896 fidl::encoding::DynamicFlags::empty(),
5897 _decode,
5898 )
5899 }
5900
5901 type JoinBssResponseFut = fidl::client::QueryResponseFut<
5902 WlanSoftmacBaseJoinBssResult,
5903 fidl::encoding::DefaultFuchsiaResourceDialect,
5904 >;
5905 fn r#join_bss(
5906 &self,
5907 mut join_request: &fidl_fuchsia_wlan_common::JoinBssRequest,
5908 ) -> Self::JoinBssResponseFut {
5909 fn _decode(
5910 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5911 ) -> Result<WlanSoftmacBaseJoinBssResult, fidl::Error> {
5912 let _response = fidl::client::decode_transaction_body::<
5913 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5914 fidl::encoding::DefaultFuchsiaResourceDialect,
5915 0x1336fb5455b77a6e,
5916 >(_buf?)?;
5917 Ok(_response.map(|x| x))
5918 }
5919 self.client
5920 .send_query_and_decode::<WlanSoftmacBaseJoinBssRequest, WlanSoftmacBaseJoinBssResult>(
5921 (join_request,),
5922 0x1336fb5455b77a6e,
5923 fidl::encoding::DynamicFlags::empty(),
5924 _decode,
5925 )
5926 }
5927
5928 type EnableBeaconingResponseFut = fidl::client::QueryResponseFut<
5929 WlanSoftmacBaseEnableBeaconingResult,
5930 fidl::encoding::DefaultFuchsiaResourceDialect,
5931 >;
5932 fn r#enable_beaconing(
5933 &self,
5934 mut payload: &WlanSoftmacBaseEnableBeaconingRequest,
5935 ) -> Self::EnableBeaconingResponseFut {
5936 fn _decode(
5937 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5938 ) -> Result<WlanSoftmacBaseEnableBeaconingResult, fidl::Error> {
5939 let _response = fidl::client::decode_transaction_body::<
5940 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5941 fidl::encoding::DefaultFuchsiaResourceDialect,
5942 0x6c35807632c64576,
5943 >(_buf?)?;
5944 Ok(_response.map(|x| x))
5945 }
5946 self.client.send_query_and_decode::<
5947 WlanSoftmacBaseEnableBeaconingRequest,
5948 WlanSoftmacBaseEnableBeaconingResult,
5949 >(
5950 payload,
5951 0x6c35807632c64576,
5952 fidl::encoding::DynamicFlags::empty(),
5953 _decode,
5954 )
5955 }
5956
5957 type DisableBeaconingResponseFut = fidl::client::QueryResponseFut<
5958 WlanSoftmacBaseDisableBeaconingResult,
5959 fidl::encoding::DefaultFuchsiaResourceDialect,
5960 >;
5961 fn r#disable_beaconing(&self) -> Self::DisableBeaconingResponseFut {
5962 fn _decode(
5963 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5964 ) -> Result<WlanSoftmacBaseDisableBeaconingResult, fidl::Error> {
5965 let _response = fidl::client::decode_transaction_body::<
5966 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5967 fidl::encoding::DefaultFuchsiaResourceDialect,
5968 0x3303b30f99dbb406,
5969 >(_buf?)?;
5970 Ok(_response.map(|x| x))
5971 }
5972 self.client.send_query_and_decode::<
5973 fidl::encoding::EmptyPayload,
5974 WlanSoftmacBaseDisableBeaconingResult,
5975 >(
5976 (),
5977 0x3303b30f99dbb406,
5978 fidl::encoding::DynamicFlags::empty(),
5979 _decode,
5980 )
5981 }
5982
5983 type InstallKeyResponseFut = fidl::client::QueryResponseFut<
5984 WlanSoftmacBaseInstallKeyResult,
5985 fidl::encoding::DefaultFuchsiaResourceDialect,
5986 >;
5987 fn r#install_key(&self, mut payload: &WlanKeyConfiguration) -> Self::InstallKeyResponseFut {
5988 fn _decode(
5989 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5990 ) -> Result<WlanSoftmacBaseInstallKeyResult, fidl::Error> {
5991 let _response = fidl::client::decode_transaction_body::<
5992 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5993 fidl::encoding::DefaultFuchsiaResourceDialect,
5994 0x7decf9b4200b9131,
5995 >(_buf?)?;
5996 Ok(_response.map(|x| x))
5997 }
5998 self.client.send_query_and_decode::<WlanKeyConfiguration, WlanSoftmacBaseInstallKeyResult>(
5999 payload,
6000 0x7decf9b4200b9131,
6001 fidl::encoding::DynamicFlags::empty(),
6002 _decode,
6003 )
6004 }
6005
6006 type NotifyAssociationCompleteResponseFut = fidl::client::QueryResponseFut<
6007 WlanSoftmacBaseNotifyAssociationCompleteResult,
6008 fidl::encoding::DefaultFuchsiaResourceDialect,
6009 >;
6010 fn r#notify_association_complete(
6011 &self,
6012 mut assoc_cfg: &WlanAssociationConfig,
6013 ) -> Self::NotifyAssociationCompleteResponseFut {
6014 fn _decode(
6015 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6016 ) -> Result<WlanSoftmacBaseNotifyAssociationCompleteResult, fidl::Error> {
6017 let _response = fidl::client::decode_transaction_body::<
6018 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6019 fidl::encoding::DefaultFuchsiaResourceDialect,
6020 0x436ffe3ba461d6cd,
6021 >(_buf?)?;
6022 Ok(_response.map(|x| x))
6023 }
6024 self.client.send_query_and_decode::<
6025 WlanSoftmacBaseNotifyAssociationCompleteRequest,
6026 WlanSoftmacBaseNotifyAssociationCompleteResult,
6027 >(
6028 (assoc_cfg,),
6029 0x436ffe3ba461d6cd,
6030 fidl::encoding::DynamicFlags::empty(),
6031 _decode,
6032 )
6033 }
6034
6035 type ClearAssociationResponseFut = fidl::client::QueryResponseFut<
6036 WlanSoftmacBaseClearAssociationResult,
6037 fidl::encoding::DefaultFuchsiaResourceDialect,
6038 >;
6039 fn r#clear_association(
6040 &self,
6041 mut payload: &WlanSoftmacBaseClearAssociationRequest,
6042 ) -> Self::ClearAssociationResponseFut {
6043 fn _decode(
6044 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6045 ) -> Result<WlanSoftmacBaseClearAssociationResult, fidl::Error> {
6046 let _response = fidl::client::decode_transaction_body::<
6047 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6048 fidl::encoding::DefaultFuchsiaResourceDialect,
6049 0x581d76c39190a7dd,
6050 >(_buf?)?;
6051 Ok(_response.map(|x| x))
6052 }
6053 self.client.send_query_and_decode::<
6054 WlanSoftmacBaseClearAssociationRequest,
6055 WlanSoftmacBaseClearAssociationResult,
6056 >(
6057 payload,
6058 0x581d76c39190a7dd,
6059 fidl::encoding::DynamicFlags::empty(),
6060 _decode,
6061 )
6062 }
6063
6064 type StartPassiveScanResponseFut = fidl::client::QueryResponseFut<
6065 WlanSoftmacBaseStartPassiveScanResult,
6066 fidl::encoding::DefaultFuchsiaResourceDialect,
6067 >;
6068 fn r#start_passive_scan(
6069 &self,
6070 mut payload: &WlanSoftmacBaseStartPassiveScanRequest,
6071 ) -> Self::StartPassiveScanResponseFut {
6072 fn _decode(
6073 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6074 ) -> Result<WlanSoftmacBaseStartPassiveScanResult, fidl::Error> {
6075 let _response = fidl::client::decode_transaction_body::<
6076 fidl::encoding::ResultType<WlanSoftmacBaseStartPassiveScanResponse, i32>,
6077 fidl::encoding::DefaultFuchsiaResourceDialect,
6078 0x5662f989cb4083bb,
6079 >(_buf?)?;
6080 Ok(_response.map(|x| x))
6081 }
6082 self.client.send_query_and_decode::<
6083 WlanSoftmacBaseStartPassiveScanRequest,
6084 WlanSoftmacBaseStartPassiveScanResult,
6085 >(
6086 payload,
6087 0x5662f989cb4083bb,
6088 fidl::encoding::DynamicFlags::empty(),
6089 _decode,
6090 )
6091 }
6092
6093 type StartActiveScanResponseFut = fidl::client::QueryResponseFut<
6094 WlanSoftmacBaseStartActiveScanResult,
6095 fidl::encoding::DefaultFuchsiaResourceDialect,
6096 >;
6097 fn r#start_active_scan(
6098 &self,
6099 mut payload: &WlanSoftmacStartActiveScanRequest,
6100 ) -> Self::StartActiveScanResponseFut {
6101 fn _decode(
6102 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6103 ) -> Result<WlanSoftmacBaseStartActiveScanResult, fidl::Error> {
6104 let _response = fidl::client::decode_transaction_body::<
6105 fidl::encoding::ResultType<WlanSoftmacBaseStartActiveScanResponse, i32>,
6106 fidl::encoding::DefaultFuchsiaResourceDialect,
6107 0x4896eafa9937751e,
6108 >(_buf?)?;
6109 Ok(_response.map(|x| x))
6110 }
6111 self.client.send_query_and_decode::<
6112 WlanSoftmacStartActiveScanRequest,
6113 WlanSoftmacBaseStartActiveScanResult,
6114 >(
6115 payload,
6116 0x4896eafa9937751e,
6117 fidl::encoding::DynamicFlags::empty(),
6118 _decode,
6119 )
6120 }
6121
6122 type CancelScanResponseFut = fidl::client::QueryResponseFut<
6123 WlanSoftmacBaseCancelScanResult,
6124 fidl::encoding::DefaultFuchsiaResourceDialect,
6125 >;
6126 fn r#cancel_scan(
6127 &self,
6128 mut payload: &WlanSoftmacBaseCancelScanRequest,
6129 ) -> Self::CancelScanResponseFut {
6130 fn _decode(
6131 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6132 ) -> Result<WlanSoftmacBaseCancelScanResult, fidl::Error> {
6133 let _response = fidl::client::decode_transaction_body::<
6134 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6135 fidl::encoding::DefaultFuchsiaResourceDialect,
6136 0xf7d859369764556,
6137 >(_buf?)?;
6138 Ok(_response.map(|x| x))
6139 }
6140 self.client.send_query_and_decode::<
6141 WlanSoftmacBaseCancelScanRequest,
6142 WlanSoftmacBaseCancelScanResult,
6143 >(
6144 payload,
6145 0xf7d859369764556,
6146 fidl::encoding::DynamicFlags::empty(),
6147 _decode,
6148 )
6149 }
6150
6151 type UpdateWmmParametersResponseFut = fidl::client::QueryResponseFut<
6152 WlanSoftmacBaseUpdateWmmParametersResult,
6153 fidl::encoding::DefaultFuchsiaResourceDialect,
6154 >;
6155 fn r#update_wmm_parameters(
6156 &self,
6157 mut payload: &WlanSoftmacBaseUpdateWmmParametersRequest,
6158 ) -> Self::UpdateWmmParametersResponseFut {
6159 fn _decode(
6160 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6161 ) -> Result<WlanSoftmacBaseUpdateWmmParametersResult, fidl::Error> {
6162 let _response = fidl::client::decode_transaction_body::<
6163 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6164 fidl::encoding::DefaultFuchsiaResourceDialect,
6165 0x68522c7122d5f78c,
6166 >(_buf?)?;
6167 Ok(_response.map(|x| x))
6168 }
6169 self.client.send_query_and_decode::<
6170 WlanSoftmacBaseUpdateWmmParametersRequest,
6171 WlanSoftmacBaseUpdateWmmParametersResult,
6172 >(
6173 payload,
6174 0x68522c7122d5f78c,
6175 fidl::encoding::DynamicFlags::empty(),
6176 _decode,
6177 )
6178 }
6179
6180 type StartResponseFut = fidl::client::QueryResponseFut<
6181 WlanSoftmacBridgeStartResult,
6182 fidl::encoding::DefaultFuchsiaResourceDialect,
6183 >;
6184 fn r#start(
6185 &self,
6186 mut ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
6187 mut ethernet_tx: u64,
6188 mut wlan_rx: u64,
6189 ) -> Self::StartResponseFut {
6190 fn _decode(
6191 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6192 ) -> Result<WlanSoftmacBridgeStartResult, fidl::Error> {
6193 let _response = fidl::client::decode_transaction_body::<
6194 fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>,
6195 fidl::encoding::DefaultFuchsiaResourceDialect,
6196 0x7b2c15a507020d4d,
6197 >(_buf?)?;
6198 Ok(_response.map(|x| x.sme_channel))
6199 }
6200 self.client
6201 .send_query_and_decode::<WlanSoftmacBridgeStartRequest, WlanSoftmacBridgeStartResult>(
6202 (ifc_bridge, ethernet_tx, wlan_rx),
6203 0x7b2c15a507020d4d,
6204 fidl::encoding::DynamicFlags::empty(),
6205 _decode,
6206 )
6207 }
6208
6209 type SetEthernetStatusResponseFut =
6210 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
6211 fn r#set_ethernet_status(&self, mut status: u32) -> Self::SetEthernetStatusResponseFut {
6212 fn _decode(
6213 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6214 ) -> Result<(), fidl::Error> {
6215 let _response = fidl::client::decode_transaction_body::<
6216 fidl::encoding::EmptyPayload,
6217 fidl::encoding::DefaultFuchsiaResourceDialect,
6218 0x412503cb3aaa350b,
6219 >(_buf?)?;
6220 Ok(_response)
6221 }
6222 self.client.send_query_and_decode::<WlanSoftmacBridgeSetEthernetStatusRequest, ()>(
6223 (status,),
6224 0x412503cb3aaa350b,
6225 fidl::encoding::DynamicFlags::empty(),
6226 _decode,
6227 )
6228 }
6229}
6230
6231pub struct WlanSoftmacBridgeEventStream {
6232 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6233}
6234
6235impl std::marker::Unpin for WlanSoftmacBridgeEventStream {}
6236
6237impl futures::stream::FusedStream for WlanSoftmacBridgeEventStream {
6238 fn is_terminated(&self) -> bool {
6239 self.event_receiver.is_terminated()
6240 }
6241}
6242
6243impl futures::Stream for WlanSoftmacBridgeEventStream {
6244 type Item = Result<WlanSoftmacBridgeEvent, fidl::Error>;
6245
6246 fn poll_next(
6247 mut self: std::pin::Pin<&mut Self>,
6248 cx: &mut std::task::Context<'_>,
6249 ) -> std::task::Poll<Option<Self::Item>> {
6250 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6251 &mut self.event_receiver,
6252 cx
6253 )?) {
6254 Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacBridgeEvent::decode(buf))),
6255 None => std::task::Poll::Ready(None),
6256 }
6257 }
6258}
6259
6260#[derive(Debug)]
6261pub enum WlanSoftmacBridgeEvent {
6262 #[non_exhaustive]
6263 _UnknownEvent {
6264 ordinal: u64,
6266 },
6267}
6268
6269impl WlanSoftmacBridgeEvent {
6270 fn decode(
6272 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6273 ) -> Result<WlanSoftmacBridgeEvent, fidl::Error> {
6274 let (bytes, _handles) = buf.split_mut();
6275 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6276 debug_assert_eq!(tx_header.tx_id, 0);
6277 match tx_header.ordinal {
6278 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6279 Ok(WlanSoftmacBridgeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
6280 }
6281 _ => Err(fidl::Error::UnknownOrdinal {
6282 ordinal: tx_header.ordinal,
6283 protocol_name:
6284 <WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6285 }),
6286 }
6287 }
6288}
6289
6290pub struct WlanSoftmacBridgeRequestStream {
6292 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6293 is_terminated: bool,
6294}
6295
6296impl std::marker::Unpin for WlanSoftmacBridgeRequestStream {}
6297
6298impl futures::stream::FusedStream for WlanSoftmacBridgeRequestStream {
6299 fn is_terminated(&self) -> bool {
6300 self.is_terminated
6301 }
6302}
6303
6304impl fidl::endpoints::RequestStream for WlanSoftmacBridgeRequestStream {
6305 type Protocol = WlanSoftmacBridgeMarker;
6306 type ControlHandle = WlanSoftmacBridgeControlHandle;
6307
6308 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6309 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6310 }
6311
6312 fn control_handle(&self) -> Self::ControlHandle {
6313 WlanSoftmacBridgeControlHandle { inner: self.inner.clone() }
6314 }
6315
6316 fn into_inner(
6317 self,
6318 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6319 {
6320 (self.inner, self.is_terminated)
6321 }
6322
6323 fn from_inner(
6324 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6325 is_terminated: bool,
6326 ) -> Self {
6327 Self { inner, is_terminated }
6328 }
6329}
6330
6331impl futures::Stream for WlanSoftmacBridgeRequestStream {
6332 type Item = Result<WlanSoftmacBridgeRequest, fidl::Error>;
6333
6334 fn poll_next(
6335 mut self: std::pin::Pin<&mut Self>,
6336 cx: &mut std::task::Context<'_>,
6337 ) -> std::task::Poll<Option<Self::Item>> {
6338 let this = &mut *self;
6339 if this.inner.check_shutdown(cx) {
6340 this.is_terminated = true;
6341 return std::task::Poll::Ready(None);
6342 }
6343 if this.is_terminated {
6344 panic!("polled WlanSoftmacBridgeRequestStream after completion");
6345 }
6346 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6347 |bytes, handles| {
6348 match this.inner.channel().read_etc(cx, bytes, handles) {
6349 std::task::Poll::Ready(Ok(())) => {}
6350 std::task::Poll::Pending => return std::task::Poll::Pending,
6351 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6352 this.is_terminated = true;
6353 return std::task::Poll::Ready(None);
6354 }
6355 std::task::Poll::Ready(Err(e)) => {
6356 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6357 e.into(),
6358 ))));
6359 }
6360 }
6361
6362 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6364
6365 std::task::Poll::Ready(Some(match header.ordinal {
6366 0x18231a638e508f9d => {
6367 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6368 let mut req = fidl::new_empty!(
6369 fidl::encoding::EmptyPayload,
6370 fidl::encoding::DefaultFuchsiaResourceDialect
6371 );
6372 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6373 let control_handle =
6374 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6375 Ok(WlanSoftmacBridgeRequest::Query {
6376 responder: WlanSoftmacBridgeQueryResponder {
6377 control_handle: std::mem::ManuallyDrop::new(control_handle),
6378 tx_id: header.tx_id,
6379 },
6380 })
6381 }
6382 0x16797affc0cb58ae => {
6383 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6384 let mut req = fidl::new_empty!(
6385 fidl::encoding::EmptyPayload,
6386 fidl::encoding::DefaultFuchsiaResourceDialect
6387 );
6388 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6389 let control_handle =
6390 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6391 Ok(WlanSoftmacBridgeRequest::QueryDiscoverySupport {
6392 responder: WlanSoftmacBridgeQueryDiscoverySupportResponder {
6393 control_handle: std::mem::ManuallyDrop::new(control_handle),
6394 tx_id: header.tx_id,
6395 },
6396 })
6397 }
6398 0x7302c3f8c131f075 => {
6399 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6400 let mut req = fidl::new_empty!(
6401 fidl::encoding::EmptyPayload,
6402 fidl::encoding::DefaultFuchsiaResourceDialect
6403 );
6404 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6405 let control_handle =
6406 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6407 Ok(WlanSoftmacBridgeRequest::QueryMacSublayerSupport {
6408 responder: WlanSoftmacBridgeQueryMacSublayerSupportResponder {
6409 control_handle: std::mem::ManuallyDrop::new(control_handle),
6410 tx_id: header.tx_id,
6411 },
6412 })
6413 }
6414 0x3691bb75abf6354 => {
6415 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6416 let mut req = fidl::new_empty!(
6417 fidl::encoding::EmptyPayload,
6418 fidl::encoding::DefaultFuchsiaResourceDialect
6419 );
6420 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6421 let control_handle =
6422 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6423 Ok(WlanSoftmacBridgeRequest::QuerySecuritySupport {
6424 responder: WlanSoftmacBridgeQuerySecuritySupportResponder {
6425 control_handle: std::mem::ManuallyDrop::new(control_handle),
6426 tx_id: header.tx_id,
6427 },
6428 })
6429 }
6430 0x347d78dc1d4d27bf => {
6431 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6432 let mut req = fidl::new_empty!(
6433 fidl::encoding::EmptyPayload,
6434 fidl::encoding::DefaultFuchsiaResourceDialect
6435 );
6436 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6437 let control_handle =
6438 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6439 Ok(WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport {
6440 responder: WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
6441 control_handle: std::mem::ManuallyDrop::new(control_handle),
6442 tx_id: header.tx_id,
6443 },
6444 })
6445 }
6446 0x12836b533cd63ece => {
6447 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6448 let mut req = fidl::new_empty!(
6449 WlanSoftmacBaseSetChannelRequest,
6450 fidl::encoding::DefaultFuchsiaResourceDialect
6451 );
6452 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseSetChannelRequest>(&header, _body_bytes, handles, &mut req)?;
6453 let control_handle =
6454 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6455 Ok(WlanSoftmacBridgeRequest::SetChannel {
6456 payload: req,
6457 responder: WlanSoftmacBridgeSetChannelResponder {
6458 control_handle: std::mem::ManuallyDrop::new(control_handle),
6459 tx_id: header.tx_id,
6460 },
6461 })
6462 }
6463 0x1336fb5455b77a6e => {
6464 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6465 let mut req = fidl::new_empty!(
6466 WlanSoftmacBaseJoinBssRequest,
6467 fidl::encoding::DefaultFuchsiaResourceDialect
6468 );
6469 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseJoinBssRequest>(&header, _body_bytes, handles, &mut req)?;
6470 let control_handle =
6471 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6472 Ok(WlanSoftmacBridgeRequest::JoinBss {
6473 join_request: req.join_request,
6474
6475 responder: WlanSoftmacBridgeJoinBssResponder {
6476 control_handle: std::mem::ManuallyDrop::new(control_handle),
6477 tx_id: header.tx_id,
6478 },
6479 })
6480 }
6481 0x6c35807632c64576 => {
6482 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6483 let mut req = fidl::new_empty!(
6484 WlanSoftmacBaseEnableBeaconingRequest,
6485 fidl::encoding::DefaultFuchsiaResourceDialect
6486 );
6487 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseEnableBeaconingRequest>(&header, _body_bytes, handles, &mut req)?;
6488 let control_handle =
6489 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6490 Ok(WlanSoftmacBridgeRequest::EnableBeaconing {
6491 payload: req,
6492 responder: WlanSoftmacBridgeEnableBeaconingResponder {
6493 control_handle: std::mem::ManuallyDrop::new(control_handle),
6494 tx_id: header.tx_id,
6495 },
6496 })
6497 }
6498 0x3303b30f99dbb406 => {
6499 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6500 let mut req = fidl::new_empty!(
6501 fidl::encoding::EmptyPayload,
6502 fidl::encoding::DefaultFuchsiaResourceDialect
6503 );
6504 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6505 let control_handle =
6506 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6507 Ok(WlanSoftmacBridgeRequest::DisableBeaconing {
6508 responder: WlanSoftmacBridgeDisableBeaconingResponder {
6509 control_handle: std::mem::ManuallyDrop::new(control_handle),
6510 tx_id: header.tx_id,
6511 },
6512 })
6513 }
6514 0x7decf9b4200b9131 => {
6515 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6516 let mut req = fidl::new_empty!(
6517 WlanKeyConfiguration,
6518 fidl::encoding::DefaultFuchsiaResourceDialect
6519 );
6520 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanKeyConfiguration>(&header, _body_bytes, handles, &mut req)?;
6521 let control_handle =
6522 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6523 Ok(WlanSoftmacBridgeRequest::InstallKey {
6524 payload: req,
6525 responder: WlanSoftmacBridgeInstallKeyResponder {
6526 control_handle: std::mem::ManuallyDrop::new(control_handle),
6527 tx_id: header.tx_id,
6528 },
6529 })
6530 }
6531 0x436ffe3ba461d6cd => {
6532 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6533 let mut req = fidl::new_empty!(
6534 WlanSoftmacBaseNotifyAssociationCompleteRequest,
6535 fidl::encoding::DefaultFuchsiaResourceDialect
6536 );
6537 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseNotifyAssociationCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
6538 let control_handle =
6539 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6540 Ok(WlanSoftmacBridgeRequest::NotifyAssociationComplete {
6541 assoc_cfg: req.assoc_cfg,
6542
6543 responder: WlanSoftmacBridgeNotifyAssociationCompleteResponder {
6544 control_handle: std::mem::ManuallyDrop::new(control_handle),
6545 tx_id: header.tx_id,
6546 },
6547 })
6548 }
6549 0x581d76c39190a7dd => {
6550 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6551 let mut req = fidl::new_empty!(
6552 WlanSoftmacBaseClearAssociationRequest,
6553 fidl::encoding::DefaultFuchsiaResourceDialect
6554 );
6555 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseClearAssociationRequest>(&header, _body_bytes, handles, &mut req)?;
6556 let control_handle =
6557 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6558 Ok(WlanSoftmacBridgeRequest::ClearAssociation {
6559 payload: req,
6560 responder: WlanSoftmacBridgeClearAssociationResponder {
6561 control_handle: std::mem::ManuallyDrop::new(control_handle),
6562 tx_id: header.tx_id,
6563 },
6564 })
6565 }
6566 0x5662f989cb4083bb => {
6567 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6568 let mut req = fidl::new_empty!(
6569 WlanSoftmacBaseStartPassiveScanRequest,
6570 fidl::encoding::DefaultFuchsiaResourceDialect
6571 );
6572 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseStartPassiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
6573 let control_handle =
6574 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6575 Ok(WlanSoftmacBridgeRequest::StartPassiveScan {
6576 payload: req,
6577 responder: WlanSoftmacBridgeStartPassiveScanResponder {
6578 control_handle: std::mem::ManuallyDrop::new(control_handle),
6579 tx_id: header.tx_id,
6580 },
6581 })
6582 }
6583 0x4896eafa9937751e => {
6584 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6585 let mut req = fidl::new_empty!(
6586 WlanSoftmacStartActiveScanRequest,
6587 fidl::encoding::DefaultFuchsiaResourceDialect
6588 );
6589 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacStartActiveScanRequest>(&header, _body_bytes, handles, &mut req)?;
6590 let control_handle =
6591 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6592 Ok(WlanSoftmacBridgeRequest::StartActiveScan {
6593 payload: req,
6594 responder: WlanSoftmacBridgeStartActiveScanResponder {
6595 control_handle: std::mem::ManuallyDrop::new(control_handle),
6596 tx_id: header.tx_id,
6597 },
6598 })
6599 }
6600 0xf7d859369764556 => {
6601 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6602 let mut req = fidl::new_empty!(
6603 WlanSoftmacBaseCancelScanRequest,
6604 fidl::encoding::DefaultFuchsiaResourceDialect
6605 );
6606 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseCancelScanRequest>(&header, _body_bytes, handles, &mut req)?;
6607 let control_handle =
6608 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6609 Ok(WlanSoftmacBridgeRequest::CancelScan {
6610 payload: req,
6611 responder: WlanSoftmacBridgeCancelScanResponder {
6612 control_handle: std::mem::ManuallyDrop::new(control_handle),
6613 tx_id: header.tx_id,
6614 },
6615 })
6616 }
6617 0x68522c7122d5f78c => {
6618 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6619 let mut req = fidl::new_empty!(
6620 WlanSoftmacBaseUpdateWmmParametersRequest,
6621 fidl::encoding::DefaultFuchsiaResourceDialect
6622 );
6623 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBaseUpdateWmmParametersRequest>(&header, _body_bytes, handles, &mut req)?;
6624 let control_handle =
6625 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6626 Ok(WlanSoftmacBridgeRequest::UpdateWmmParameters {
6627 payload: req,
6628 responder: WlanSoftmacBridgeUpdateWmmParametersResponder {
6629 control_handle: std::mem::ManuallyDrop::new(control_handle),
6630 tx_id: header.tx_id,
6631 },
6632 })
6633 }
6634 0x7b2c15a507020d4d => {
6635 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6636 let mut req = fidl::new_empty!(
6637 WlanSoftmacBridgeStartRequest,
6638 fidl::encoding::DefaultFuchsiaResourceDialect
6639 );
6640 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBridgeStartRequest>(&header, _body_bytes, handles, &mut req)?;
6641 let control_handle =
6642 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6643 Ok(WlanSoftmacBridgeRequest::Start {
6644 ifc_bridge: req.ifc_bridge,
6645 ethernet_tx: req.ethernet_tx,
6646 wlan_rx: req.wlan_rx,
6647
6648 responder: WlanSoftmacBridgeStartResponder {
6649 control_handle: std::mem::ManuallyDrop::new(control_handle),
6650 tx_id: header.tx_id,
6651 },
6652 })
6653 }
6654 0x412503cb3aaa350b => {
6655 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6656 let mut req = fidl::new_empty!(
6657 WlanSoftmacBridgeSetEthernetStatusRequest,
6658 fidl::encoding::DefaultFuchsiaResourceDialect
6659 );
6660 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacBridgeSetEthernetStatusRequest>(&header, _body_bytes, handles, &mut req)?;
6661 let control_handle =
6662 WlanSoftmacBridgeControlHandle { inner: this.inner.clone() };
6663 Ok(WlanSoftmacBridgeRequest::SetEthernetStatus {
6664 status: req.status,
6665
6666 responder: WlanSoftmacBridgeSetEthernetStatusResponder {
6667 control_handle: std::mem::ManuallyDrop::new(control_handle),
6668 tx_id: header.tx_id,
6669 },
6670 })
6671 }
6672 _ if header.tx_id == 0
6673 && header
6674 .dynamic_flags()
6675 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
6676 {
6677 Ok(WlanSoftmacBridgeRequest::_UnknownMethod {
6678 ordinal: header.ordinal,
6679 control_handle: WlanSoftmacBridgeControlHandle {
6680 inner: this.inner.clone(),
6681 },
6682 method_type: fidl::MethodType::OneWay,
6683 })
6684 }
6685 _ if header
6686 .dynamic_flags()
6687 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
6688 {
6689 this.inner.send_framework_err(
6690 fidl::encoding::FrameworkErr::UnknownMethod,
6691 header.tx_id,
6692 header.ordinal,
6693 header.dynamic_flags(),
6694 (bytes, handles),
6695 )?;
6696 Ok(WlanSoftmacBridgeRequest::_UnknownMethod {
6697 ordinal: header.ordinal,
6698 control_handle: WlanSoftmacBridgeControlHandle {
6699 inner: this.inner.clone(),
6700 },
6701 method_type: fidl::MethodType::TwoWay,
6702 })
6703 }
6704 _ => Err(fidl::Error::UnknownOrdinal {
6705 ordinal: header.ordinal,
6706 protocol_name:
6707 <WlanSoftmacBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6708 }),
6709 }))
6710 },
6711 )
6712 }
6713}
6714
6715#[derive(Debug)]
6719pub enum WlanSoftmacBridgeRequest {
6720 Query { responder: WlanSoftmacBridgeQueryResponder },
6728 QueryDiscoverySupport { responder: WlanSoftmacBridgeQueryDiscoverySupportResponder },
6732 QueryMacSublayerSupport { responder: WlanSoftmacBridgeQueryMacSublayerSupportResponder },
6740 QuerySecuritySupport { responder: WlanSoftmacBridgeQuerySecuritySupportResponder },
6743 QuerySpectrumManagementSupport {
6747 responder: WlanSoftmacBridgeQuerySpectrumManagementSupportResponder,
6748 },
6749 SetChannel {
6757 payload: WlanSoftmacBaseSetChannelRequest,
6758 responder: WlanSoftmacBridgeSetChannelResponder,
6759 },
6760 JoinBss {
6770 join_request: fidl_fuchsia_wlan_common::JoinBssRequest,
6771 responder: WlanSoftmacBridgeJoinBssResponder,
6772 },
6773 EnableBeaconing {
6788 payload: WlanSoftmacBaseEnableBeaconingRequest,
6789 responder: WlanSoftmacBridgeEnableBeaconingResponder,
6790 },
6791 DisableBeaconing { responder: WlanSoftmacBridgeDisableBeaconingResponder },
6793 InstallKey { payload: WlanKeyConfiguration, responder: WlanSoftmacBridgeInstallKeyResponder },
6800 NotifyAssociationComplete {
6810 assoc_cfg: WlanAssociationConfig,
6811 responder: WlanSoftmacBridgeNotifyAssociationCompleteResponder,
6812 },
6813 ClearAssociation {
6815 payload: WlanSoftmacBaseClearAssociationRequest,
6816 responder: WlanSoftmacBridgeClearAssociationResponder,
6817 },
6818 StartPassiveScan {
6832 payload: WlanSoftmacBaseStartPassiveScanRequest,
6833 responder: WlanSoftmacBridgeStartPassiveScanResponder,
6834 },
6835 StartActiveScan {
6849 payload: WlanSoftmacStartActiveScanRequest,
6850 responder: WlanSoftmacBridgeStartActiveScanResponder,
6851 },
6852 CancelScan {
6866 payload: WlanSoftmacBaseCancelScanRequest,
6867 responder: WlanSoftmacBridgeCancelScanResponder,
6868 },
6869 UpdateWmmParameters {
6872 payload: WlanSoftmacBaseUpdateWmmParametersRequest,
6873 responder: WlanSoftmacBridgeUpdateWmmParametersResponder,
6874 },
6875 Start {
6915 ifc_bridge: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
6916 ethernet_tx: u64,
6917 wlan_rx: u64,
6918 responder: WlanSoftmacBridgeStartResponder,
6919 },
6920 SetEthernetStatus { status: u32, responder: WlanSoftmacBridgeSetEthernetStatusResponder },
6938 #[non_exhaustive]
6940 _UnknownMethod {
6941 ordinal: u64,
6943 control_handle: WlanSoftmacBridgeControlHandle,
6944 method_type: fidl::MethodType,
6945 },
6946}
6947
6948impl WlanSoftmacBridgeRequest {
6949 #[allow(irrefutable_let_patterns)]
6950 pub fn into_query(self) -> Option<(WlanSoftmacBridgeQueryResponder)> {
6951 if let WlanSoftmacBridgeRequest::Query { responder } = self {
6952 Some((responder))
6953 } else {
6954 None
6955 }
6956 }
6957
6958 #[allow(irrefutable_let_patterns)]
6959 pub fn into_query_discovery_support(
6960 self,
6961 ) -> Option<(WlanSoftmacBridgeQueryDiscoverySupportResponder)> {
6962 if let WlanSoftmacBridgeRequest::QueryDiscoverySupport { responder } = self {
6963 Some((responder))
6964 } else {
6965 None
6966 }
6967 }
6968
6969 #[allow(irrefutable_let_patterns)]
6970 pub fn into_query_mac_sublayer_support(
6971 self,
6972 ) -> Option<(WlanSoftmacBridgeQueryMacSublayerSupportResponder)> {
6973 if let WlanSoftmacBridgeRequest::QueryMacSublayerSupport { responder } = self {
6974 Some((responder))
6975 } else {
6976 None
6977 }
6978 }
6979
6980 #[allow(irrefutable_let_patterns)]
6981 pub fn into_query_security_support(
6982 self,
6983 ) -> Option<(WlanSoftmacBridgeQuerySecuritySupportResponder)> {
6984 if let WlanSoftmacBridgeRequest::QuerySecuritySupport { responder } = self {
6985 Some((responder))
6986 } else {
6987 None
6988 }
6989 }
6990
6991 #[allow(irrefutable_let_patterns)]
6992 pub fn into_query_spectrum_management_support(
6993 self,
6994 ) -> Option<(WlanSoftmacBridgeQuerySpectrumManagementSupportResponder)> {
6995 if let WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport { responder } = self {
6996 Some((responder))
6997 } else {
6998 None
6999 }
7000 }
7001
7002 #[allow(irrefutable_let_patterns)]
7003 pub fn into_set_channel(
7004 self,
7005 ) -> Option<(WlanSoftmacBaseSetChannelRequest, WlanSoftmacBridgeSetChannelResponder)> {
7006 if let WlanSoftmacBridgeRequest::SetChannel { payload, responder } = self {
7007 Some((payload, responder))
7008 } else {
7009 None
7010 }
7011 }
7012
7013 #[allow(irrefutable_let_patterns)]
7014 pub fn into_join_bss(
7015 self,
7016 ) -> Option<(fidl_fuchsia_wlan_common::JoinBssRequest, WlanSoftmacBridgeJoinBssResponder)> {
7017 if let WlanSoftmacBridgeRequest::JoinBss { join_request, responder } = self {
7018 Some((join_request, responder))
7019 } else {
7020 None
7021 }
7022 }
7023
7024 #[allow(irrefutable_let_patterns)]
7025 pub fn into_enable_beaconing(
7026 self,
7027 ) -> Option<(WlanSoftmacBaseEnableBeaconingRequest, WlanSoftmacBridgeEnableBeaconingResponder)>
7028 {
7029 if let WlanSoftmacBridgeRequest::EnableBeaconing { payload, responder } = self {
7030 Some((payload, responder))
7031 } else {
7032 None
7033 }
7034 }
7035
7036 #[allow(irrefutable_let_patterns)]
7037 pub fn into_disable_beaconing(self) -> Option<(WlanSoftmacBridgeDisableBeaconingResponder)> {
7038 if let WlanSoftmacBridgeRequest::DisableBeaconing { responder } = self {
7039 Some((responder))
7040 } else {
7041 None
7042 }
7043 }
7044
7045 #[allow(irrefutable_let_patterns)]
7046 pub fn into_install_key(
7047 self,
7048 ) -> Option<(WlanKeyConfiguration, WlanSoftmacBridgeInstallKeyResponder)> {
7049 if let WlanSoftmacBridgeRequest::InstallKey { payload, responder } = self {
7050 Some((payload, responder))
7051 } else {
7052 None
7053 }
7054 }
7055
7056 #[allow(irrefutable_let_patterns)]
7057 pub fn into_notify_association_complete(
7058 self,
7059 ) -> Option<(WlanAssociationConfig, WlanSoftmacBridgeNotifyAssociationCompleteResponder)> {
7060 if let WlanSoftmacBridgeRequest::NotifyAssociationComplete { assoc_cfg, responder } = self {
7061 Some((assoc_cfg, responder))
7062 } else {
7063 None
7064 }
7065 }
7066
7067 #[allow(irrefutable_let_patterns)]
7068 pub fn into_clear_association(
7069 self,
7070 ) -> Option<(WlanSoftmacBaseClearAssociationRequest, WlanSoftmacBridgeClearAssociationResponder)>
7071 {
7072 if let WlanSoftmacBridgeRequest::ClearAssociation { payload, responder } = self {
7073 Some((payload, responder))
7074 } else {
7075 None
7076 }
7077 }
7078
7079 #[allow(irrefutable_let_patterns)]
7080 pub fn into_start_passive_scan(
7081 self,
7082 ) -> Option<(WlanSoftmacBaseStartPassiveScanRequest, WlanSoftmacBridgeStartPassiveScanResponder)>
7083 {
7084 if let WlanSoftmacBridgeRequest::StartPassiveScan { payload, responder } = self {
7085 Some((payload, responder))
7086 } else {
7087 None
7088 }
7089 }
7090
7091 #[allow(irrefutable_let_patterns)]
7092 pub fn into_start_active_scan(
7093 self,
7094 ) -> Option<(WlanSoftmacStartActiveScanRequest, WlanSoftmacBridgeStartActiveScanResponder)>
7095 {
7096 if let WlanSoftmacBridgeRequest::StartActiveScan { payload, responder } = self {
7097 Some((payload, responder))
7098 } else {
7099 None
7100 }
7101 }
7102
7103 #[allow(irrefutable_let_patterns)]
7104 pub fn into_cancel_scan(
7105 self,
7106 ) -> Option<(WlanSoftmacBaseCancelScanRequest, WlanSoftmacBridgeCancelScanResponder)> {
7107 if let WlanSoftmacBridgeRequest::CancelScan { payload, responder } = self {
7108 Some((payload, responder))
7109 } else {
7110 None
7111 }
7112 }
7113
7114 #[allow(irrefutable_let_patterns)]
7115 pub fn into_update_wmm_parameters(
7116 self,
7117 ) -> Option<(
7118 WlanSoftmacBaseUpdateWmmParametersRequest,
7119 WlanSoftmacBridgeUpdateWmmParametersResponder,
7120 )> {
7121 if let WlanSoftmacBridgeRequest::UpdateWmmParameters { payload, responder } = self {
7122 Some((payload, responder))
7123 } else {
7124 None
7125 }
7126 }
7127
7128 #[allow(irrefutable_let_patterns)]
7129 pub fn into_start(
7130 self,
7131 ) -> Option<(
7132 fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
7133 u64,
7134 u64,
7135 WlanSoftmacBridgeStartResponder,
7136 )> {
7137 if let WlanSoftmacBridgeRequest::Start { ifc_bridge, ethernet_tx, wlan_rx, responder } =
7138 self
7139 {
7140 Some((ifc_bridge, ethernet_tx, wlan_rx, responder))
7141 } else {
7142 None
7143 }
7144 }
7145
7146 #[allow(irrefutable_let_patterns)]
7147 pub fn into_set_ethernet_status(
7148 self,
7149 ) -> Option<(u32, WlanSoftmacBridgeSetEthernetStatusResponder)> {
7150 if let WlanSoftmacBridgeRequest::SetEthernetStatus { status, responder } = self {
7151 Some((status, responder))
7152 } else {
7153 None
7154 }
7155 }
7156
7157 pub fn method_name(&self) -> &'static str {
7159 match *self {
7160 WlanSoftmacBridgeRequest::Query { .. } => "query",
7161 WlanSoftmacBridgeRequest::QueryDiscoverySupport { .. } => "query_discovery_support",
7162 WlanSoftmacBridgeRequest::QueryMacSublayerSupport { .. } => {
7163 "query_mac_sublayer_support"
7164 }
7165 WlanSoftmacBridgeRequest::QuerySecuritySupport { .. } => "query_security_support",
7166 WlanSoftmacBridgeRequest::QuerySpectrumManagementSupport { .. } => {
7167 "query_spectrum_management_support"
7168 }
7169 WlanSoftmacBridgeRequest::SetChannel { .. } => "set_channel",
7170 WlanSoftmacBridgeRequest::JoinBss { .. } => "join_bss",
7171 WlanSoftmacBridgeRequest::EnableBeaconing { .. } => "enable_beaconing",
7172 WlanSoftmacBridgeRequest::DisableBeaconing { .. } => "disable_beaconing",
7173 WlanSoftmacBridgeRequest::InstallKey { .. } => "install_key",
7174 WlanSoftmacBridgeRequest::NotifyAssociationComplete { .. } => {
7175 "notify_association_complete"
7176 }
7177 WlanSoftmacBridgeRequest::ClearAssociation { .. } => "clear_association",
7178 WlanSoftmacBridgeRequest::StartPassiveScan { .. } => "start_passive_scan",
7179 WlanSoftmacBridgeRequest::StartActiveScan { .. } => "start_active_scan",
7180 WlanSoftmacBridgeRequest::CancelScan { .. } => "cancel_scan",
7181 WlanSoftmacBridgeRequest::UpdateWmmParameters { .. } => "update_wmm_parameters",
7182 WlanSoftmacBridgeRequest::Start { .. } => "start",
7183 WlanSoftmacBridgeRequest::SetEthernetStatus { .. } => "set_ethernet_status",
7184 WlanSoftmacBridgeRequest::_UnknownMethod {
7185 method_type: fidl::MethodType::OneWay,
7186 ..
7187 } => "unknown one-way method",
7188 WlanSoftmacBridgeRequest::_UnknownMethod {
7189 method_type: fidl::MethodType::TwoWay,
7190 ..
7191 } => "unknown two-way method",
7192 }
7193 }
7194}
7195
7196#[derive(Debug, Clone)]
7197pub struct WlanSoftmacBridgeControlHandle {
7198 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7199}
7200
7201impl fidl::endpoints::ControlHandle for WlanSoftmacBridgeControlHandle {
7202 fn shutdown(&self) {
7203 self.inner.shutdown()
7204 }
7205
7206 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7207 self.inner.shutdown_with_epitaph(status)
7208 }
7209
7210 fn is_closed(&self) -> bool {
7211 self.inner.channel().is_closed()
7212 }
7213 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7214 self.inner.channel().on_closed()
7215 }
7216
7217 #[cfg(target_os = "fuchsia")]
7218 fn signal_peer(
7219 &self,
7220 clear_mask: zx::Signals,
7221 set_mask: zx::Signals,
7222 ) -> Result<(), zx_status::Status> {
7223 use fidl::Peered;
7224 self.inner.channel().signal_peer(clear_mask, set_mask)
7225 }
7226}
7227
7228impl WlanSoftmacBridgeControlHandle {}
7229
7230#[must_use = "FIDL methods require a response to be sent"]
7231#[derive(Debug)]
7232pub struct WlanSoftmacBridgeQueryResponder {
7233 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7234 tx_id: u32,
7235}
7236
7237impl std::ops::Drop for WlanSoftmacBridgeQueryResponder {
7241 fn drop(&mut self) {
7242 self.control_handle.shutdown();
7243 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7245 }
7246}
7247
7248impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryResponder {
7249 type ControlHandle = WlanSoftmacBridgeControlHandle;
7250
7251 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7252 &self.control_handle
7253 }
7254
7255 fn drop_without_shutdown(mut self) {
7256 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7258 std::mem::forget(self);
7260 }
7261}
7262
7263impl WlanSoftmacBridgeQueryResponder {
7264 pub fn send(
7268 self,
7269 mut result: Result<&WlanSoftmacQueryResponse, i32>,
7270 ) -> Result<(), fidl::Error> {
7271 let _result = self.send_raw(result);
7272 if _result.is_err() {
7273 self.control_handle.shutdown();
7274 }
7275 self.drop_without_shutdown();
7276 _result
7277 }
7278
7279 pub fn send_no_shutdown_on_err(
7281 self,
7282 mut result: Result<&WlanSoftmacQueryResponse, i32>,
7283 ) -> Result<(), fidl::Error> {
7284 let _result = self.send_raw(result);
7285 self.drop_without_shutdown();
7286 _result
7287 }
7288
7289 fn send_raw(
7290 &self,
7291 mut result: Result<&WlanSoftmacQueryResponse, i32>,
7292 ) -> Result<(), fidl::Error> {
7293 self.control_handle.inner.send::<fidl::encoding::ResultType<WlanSoftmacQueryResponse, i32>>(
7294 result,
7295 self.tx_id,
7296 0x18231a638e508f9d,
7297 fidl::encoding::DynamicFlags::empty(),
7298 )
7299 }
7300}
7301
7302#[must_use = "FIDL methods require a response to be sent"]
7303#[derive(Debug)]
7304pub struct WlanSoftmacBridgeQueryDiscoverySupportResponder {
7305 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7306 tx_id: u32,
7307}
7308
7309impl std::ops::Drop for WlanSoftmacBridgeQueryDiscoverySupportResponder {
7313 fn drop(&mut self) {
7314 self.control_handle.shutdown();
7315 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7317 }
7318}
7319
7320impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryDiscoverySupportResponder {
7321 type ControlHandle = WlanSoftmacBridgeControlHandle;
7322
7323 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7324 &self.control_handle
7325 }
7326
7327 fn drop_without_shutdown(mut self) {
7328 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7330 std::mem::forget(self);
7332 }
7333}
7334
7335impl WlanSoftmacBridgeQueryDiscoverySupportResponder {
7336 pub fn send(self, mut result: Result<&DiscoverySupport, i32>) -> Result<(), fidl::Error> {
7340 let _result = self.send_raw(result);
7341 if _result.is_err() {
7342 self.control_handle.shutdown();
7343 }
7344 self.drop_without_shutdown();
7345 _result
7346 }
7347
7348 pub fn send_no_shutdown_on_err(
7350 self,
7351 mut result: Result<&DiscoverySupport, i32>,
7352 ) -> Result<(), fidl::Error> {
7353 let _result = self.send_raw(result);
7354 self.drop_without_shutdown();
7355 _result
7356 }
7357
7358 fn send_raw(&self, mut result: Result<&DiscoverySupport, i32>) -> Result<(), fidl::Error> {
7359 self.control_handle.inner.send::<fidl::encoding::ResultType<
7360 WlanSoftmacBaseQueryDiscoverySupportResponse,
7361 i32,
7362 >>(
7363 result.map(|resp| (resp,)),
7364 self.tx_id,
7365 0x16797affc0cb58ae,
7366 fidl::encoding::DynamicFlags::empty(),
7367 )
7368 }
7369}
7370
7371#[must_use = "FIDL methods require a response to be sent"]
7372#[derive(Debug)]
7373pub struct WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7374 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7375 tx_id: u32,
7376}
7377
7378impl std::ops::Drop for WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7382 fn drop(&mut self) {
7383 self.control_handle.shutdown();
7384 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7386 }
7387}
7388
7389impl fidl::endpoints::Responder for WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7390 type ControlHandle = WlanSoftmacBridgeControlHandle;
7391
7392 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7393 &self.control_handle
7394 }
7395
7396 fn drop_without_shutdown(mut self) {
7397 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7399 std::mem::forget(self);
7401 }
7402}
7403
7404impl WlanSoftmacBridgeQueryMacSublayerSupportResponder {
7405 pub fn send(
7409 self,
7410 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
7411 ) -> Result<(), fidl::Error> {
7412 let _result = self.send_raw(result);
7413 if _result.is_err() {
7414 self.control_handle.shutdown();
7415 }
7416 self.drop_without_shutdown();
7417 _result
7418 }
7419
7420 pub fn send_no_shutdown_on_err(
7422 self,
7423 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
7424 ) -> Result<(), fidl::Error> {
7425 let _result = self.send_raw(result);
7426 self.drop_without_shutdown();
7427 _result
7428 }
7429
7430 fn send_raw(
7431 &self,
7432 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
7433 ) -> Result<(), fidl::Error> {
7434 self.control_handle.inner.send::<fidl::encoding::ResultType<
7435 WlanSoftmacBaseQueryMacSublayerSupportResponse,
7436 i32,
7437 >>(
7438 result.map(|resp| (resp,)),
7439 self.tx_id,
7440 0x7302c3f8c131f075,
7441 fidl::encoding::DynamicFlags::empty(),
7442 )
7443 }
7444}
7445
7446#[must_use = "FIDL methods require a response to be sent"]
7447#[derive(Debug)]
7448pub struct WlanSoftmacBridgeQuerySecuritySupportResponder {
7449 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7450 tx_id: u32,
7451}
7452
7453impl std::ops::Drop for WlanSoftmacBridgeQuerySecuritySupportResponder {
7457 fn drop(&mut self) {
7458 self.control_handle.shutdown();
7459 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7461 }
7462}
7463
7464impl fidl::endpoints::Responder for WlanSoftmacBridgeQuerySecuritySupportResponder {
7465 type ControlHandle = WlanSoftmacBridgeControlHandle;
7466
7467 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7468 &self.control_handle
7469 }
7470
7471 fn drop_without_shutdown(mut self) {
7472 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7474 std::mem::forget(self);
7476 }
7477}
7478
7479impl WlanSoftmacBridgeQuerySecuritySupportResponder {
7480 pub fn send(
7484 self,
7485 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
7486 ) -> Result<(), fidl::Error> {
7487 let _result = self.send_raw(result);
7488 if _result.is_err() {
7489 self.control_handle.shutdown();
7490 }
7491 self.drop_without_shutdown();
7492 _result
7493 }
7494
7495 pub fn send_no_shutdown_on_err(
7497 self,
7498 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
7499 ) -> Result<(), fidl::Error> {
7500 let _result = self.send_raw(result);
7501 self.drop_without_shutdown();
7502 _result
7503 }
7504
7505 fn send_raw(
7506 &self,
7507 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
7508 ) -> Result<(), fidl::Error> {
7509 self.control_handle.inner.send::<fidl::encoding::ResultType<
7510 WlanSoftmacBaseQuerySecuritySupportResponse,
7511 i32,
7512 >>(
7513 result.map(|resp| (resp,)),
7514 self.tx_id,
7515 0x3691bb75abf6354,
7516 fidl::encoding::DynamicFlags::empty(),
7517 )
7518 }
7519}
7520
7521#[must_use = "FIDL methods require a response to be sent"]
7522#[derive(Debug)]
7523pub struct WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7524 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7525 tx_id: u32,
7526}
7527
7528impl std::ops::Drop for WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7532 fn drop(&mut self) {
7533 self.control_handle.shutdown();
7534 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7536 }
7537}
7538
7539impl fidl::endpoints::Responder for WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7540 type ControlHandle = WlanSoftmacBridgeControlHandle;
7541
7542 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7543 &self.control_handle
7544 }
7545
7546 fn drop_without_shutdown(mut self) {
7547 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7549 std::mem::forget(self);
7551 }
7552}
7553
7554impl WlanSoftmacBridgeQuerySpectrumManagementSupportResponder {
7555 pub fn send(
7559 self,
7560 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
7561 ) -> Result<(), fidl::Error> {
7562 let _result = self.send_raw(result);
7563 if _result.is_err() {
7564 self.control_handle.shutdown();
7565 }
7566 self.drop_without_shutdown();
7567 _result
7568 }
7569
7570 pub fn send_no_shutdown_on_err(
7572 self,
7573 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
7574 ) -> Result<(), fidl::Error> {
7575 let _result = self.send_raw(result);
7576 self.drop_without_shutdown();
7577 _result
7578 }
7579
7580 fn send_raw(
7581 &self,
7582 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
7583 ) -> Result<(), fidl::Error> {
7584 self.control_handle.inner.send::<fidl::encoding::ResultType<
7585 WlanSoftmacBaseQuerySpectrumManagementSupportResponse,
7586 i32,
7587 >>(
7588 result.map(|resp| (resp,)),
7589 self.tx_id,
7590 0x347d78dc1d4d27bf,
7591 fidl::encoding::DynamicFlags::empty(),
7592 )
7593 }
7594}
7595
7596#[must_use = "FIDL methods require a response to be sent"]
7597#[derive(Debug)]
7598pub struct WlanSoftmacBridgeSetChannelResponder {
7599 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7600 tx_id: u32,
7601}
7602
7603impl std::ops::Drop for WlanSoftmacBridgeSetChannelResponder {
7607 fn drop(&mut self) {
7608 self.control_handle.shutdown();
7609 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7611 }
7612}
7613
7614impl fidl::endpoints::Responder for WlanSoftmacBridgeSetChannelResponder {
7615 type ControlHandle = WlanSoftmacBridgeControlHandle;
7616
7617 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7618 &self.control_handle
7619 }
7620
7621 fn drop_without_shutdown(mut self) {
7622 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7624 std::mem::forget(self);
7626 }
7627}
7628
7629impl WlanSoftmacBridgeSetChannelResponder {
7630 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7634 let _result = self.send_raw(result);
7635 if _result.is_err() {
7636 self.control_handle.shutdown();
7637 }
7638 self.drop_without_shutdown();
7639 _result
7640 }
7641
7642 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7644 let _result = self.send_raw(result);
7645 self.drop_without_shutdown();
7646 _result
7647 }
7648
7649 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7650 self.control_handle
7651 .inner
7652 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7653 result,
7654 self.tx_id,
7655 0x12836b533cd63ece,
7656 fidl::encoding::DynamicFlags::empty(),
7657 )
7658 }
7659}
7660
7661#[must_use = "FIDL methods require a response to be sent"]
7662#[derive(Debug)]
7663pub struct WlanSoftmacBridgeJoinBssResponder {
7664 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7665 tx_id: u32,
7666}
7667
7668impl std::ops::Drop for WlanSoftmacBridgeJoinBssResponder {
7672 fn drop(&mut self) {
7673 self.control_handle.shutdown();
7674 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7676 }
7677}
7678
7679impl fidl::endpoints::Responder for WlanSoftmacBridgeJoinBssResponder {
7680 type ControlHandle = WlanSoftmacBridgeControlHandle;
7681
7682 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7683 &self.control_handle
7684 }
7685
7686 fn drop_without_shutdown(mut self) {
7687 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7689 std::mem::forget(self);
7691 }
7692}
7693
7694impl WlanSoftmacBridgeJoinBssResponder {
7695 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7699 let _result = self.send_raw(result);
7700 if _result.is_err() {
7701 self.control_handle.shutdown();
7702 }
7703 self.drop_without_shutdown();
7704 _result
7705 }
7706
7707 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7709 let _result = self.send_raw(result);
7710 self.drop_without_shutdown();
7711 _result
7712 }
7713
7714 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7715 self.control_handle
7716 .inner
7717 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7718 result,
7719 self.tx_id,
7720 0x1336fb5455b77a6e,
7721 fidl::encoding::DynamicFlags::empty(),
7722 )
7723 }
7724}
7725
7726#[must_use = "FIDL methods require a response to be sent"]
7727#[derive(Debug)]
7728pub struct WlanSoftmacBridgeEnableBeaconingResponder {
7729 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7730 tx_id: u32,
7731}
7732
7733impl std::ops::Drop for WlanSoftmacBridgeEnableBeaconingResponder {
7737 fn drop(&mut self) {
7738 self.control_handle.shutdown();
7739 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7741 }
7742}
7743
7744impl fidl::endpoints::Responder for WlanSoftmacBridgeEnableBeaconingResponder {
7745 type ControlHandle = WlanSoftmacBridgeControlHandle;
7746
7747 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7748 &self.control_handle
7749 }
7750
7751 fn drop_without_shutdown(mut self) {
7752 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7754 std::mem::forget(self);
7756 }
7757}
7758
7759impl WlanSoftmacBridgeEnableBeaconingResponder {
7760 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7764 let _result = self.send_raw(result);
7765 if _result.is_err() {
7766 self.control_handle.shutdown();
7767 }
7768 self.drop_without_shutdown();
7769 _result
7770 }
7771
7772 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7774 let _result = self.send_raw(result);
7775 self.drop_without_shutdown();
7776 _result
7777 }
7778
7779 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7780 self.control_handle
7781 .inner
7782 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7783 result,
7784 self.tx_id,
7785 0x6c35807632c64576,
7786 fidl::encoding::DynamicFlags::empty(),
7787 )
7788 }
7789}
7790
7791#[must_use = "FIDL methods require a response to be sent"]
7792#[derive(Debug)]
7793pub struct WlanSoftmacBridgeDisableBeaconingResponder {
7794 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7795 tx_id: u32,
7796}
7797
7798impl std::ops::Drop for WlanSoftmacBridgeDisableBeaconingResponder {
7802 fn drop(&mut self) {
7803 self.control_handle.shutdown();
7804 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7806 }
7807}
7808
7809impl fidl::endpoints::Responder for WlanSoftmacBridgeDisableBeaconingResponder {
7810 type ControlHandle = WlanSoftmacBridgeControlHandle;
7811
7812 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7813 &self.control_handle
7814 }
7815
7816 fn drop_without_shutdown(mut self) {
7817 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7819 std::mem::forget(self);
7821 }
7822}
7823
7824impl WlanSoftmacBridgeDisableBeaconingResponder {
7825 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7829 let _result = self.send_raw(result);
7830 if _result.is_err() {
7831 self.control_handle.shutdown();
7832 }
7833 self.drop_without_shutdown();
7834 _result
7835 }
7836
7837 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7839 let _result = self.send_raw(result);
7840 self.drop_without_shutdown();
7841 _result
7842 }
7843
7844 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7845 self.control_handle
7846 .inner
7847 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7848 result,
7849 self.tx_id,
7850 0x3303b30f99dbb406,
7851 fidl::encoding::DynamicFlags::empty(),
7852 )
7853 }
7854}
7855
7856#[must_use = "FIDL methods require a response to be sent"]
7857#[derive(Debug)]
7858pub struct WlanSoftmacBridgeInstallKeyResponder {
7859 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7860 tx_id: u32,
7861}
7862
7863impl std::ops::Drop for WlanSoftmacBridgeInstallKeyResponder {
7867 fn drop(&mut self) {
7868 self.control_handle.shutdown();
7869 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7871 }
7872}
7873
7874impl fidl::endpoints::Responder for WlanSoftmacBridgeInstallKeyResponder {
7875 type ControlHandle = WlanSoftmacBridgeControlHandle;
7876
7877 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7878 &self.control_handle
7879 }
7880
7881 fn drop_without_shutdown(mut self) {
7882 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7884 std::mem::forget(self);
7886 }
7887}
7888
7889impl WlanSoftmacBridgeInstallKeyResponder {
7890 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7894 let _result = self.send_raw(result);
7895 if _result.is_err() {
7896 self.control_handle.shutdown();
7897 }
7898 self.drop_without_shutdown();
7899 _result
7900 }
7901
7902 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7904 let _result = self.send_raw(result);
7905 self.drop_without_shutdown();
7906 _result
7907 }
7908
7909 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7910 self.control_handle
7911 .inner
7912 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7913 result,
7914 self.tx_id,
7915 0x7decf9b4200b9131,
7916 fidl::encoding::DynamicFlags::empty(),
7917 )
7918 }
7919}
7920
7921#[must_use = "FIDL methods require a response to be sent"]
7922#[derive(Debug)]
7923pub struct WlanSoftmacBridgeNotifyAssociationCompleteResponder {
7924 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7925 tx_id: u32,
7926}
7927
7928impl std::ops::Drop for WlanSoftmacBridgeNotifyAssociationCompleteResponder {
7932 fn drop(&mut self) {
7933 self.control_handle.shutdown();
7934 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7936 }
7937}
7938
7939impl fidl::endpoints::Responder for WlanSoftmacBridgeNotifyAssociationCompleteResponder {
7940 type ControlHandle = WlanSoftmacBridgeControlHandle;
7941
7942 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
7943 &self.control_handle
7944 }
7945
7946 fn drop_without_shutdown(mut self) {
7947 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7949 std::mem::forget(self);
7951 }
7952}
7953
7954impl WlanSoftmacBridgeNotifyAssociationCompleteResponder {
7955 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7959 let _result = self.send_raw(result);
7960 if _result.is_err() {
7961 self.control_handle.shutdown();
7962 }
7963 self.drop_without_shutdown();
7964 _result
7965 }
7966
7967 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7969 let _result = self.send_raw(result);
7970 self.drop_without_shutdown();
7971 _result
7972 }
7973
7974 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7975 self.control_handle
7976 .inner
7977 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7978 result,
7979 self.tx_id,
7980 0x436ffe3ba461d6cd,
7981 fidl::encoding::DynamicFlags::empty(),
7982 )
7983 }
7984}
7985
7986#[must_use = "FIDL methods require a response to be sent"]
7987#[derive(Debug)]
7988pub struct WlanSoftmacBridgeClearAssociationResponder {
7989 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
7990 tx_id: u32,
7991}
7992
7993impl std::ops::Drop for WlanSoftmacBridgeClearAssociationResponder {
7997 fn drop(&mut self) {
7998 self.control_handle.shutdown();
7999 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8001 }
8002}
8003
8004impl fidl::endpoints::Responder for WlanSoftmacBridgeClearAssociationResponder {
8005 type ControlHandle = WlanSoftmacBridgeControlHandle;
8006
8007 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8008 &self.control_handle
8009 }
8010
8011 fn drop_without_shutdown(mut self) {
8012 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8014 std::mem::forget(self);
8016 }
8017}
8018
8019impl WlanSoftmacBridgeClearAssociationResponder {
8020 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8024 let _result = self.send_raw(result);
8025 if _result.is_err() {
8026 self.control_handle.shutdown();
8027 }
8028 self.drop_without_shutdown();
8029 _result
8030 }
8031
8032 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8034 let _result = self.send_raw(result);
8035 self.drop_without_shutdown();
8036 _result
8037 }
8038
8039 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8040 self.control_handle
8041 .inner
8042 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8043 result,
8044 self.tx_id,
8045 0x581d76c39190a7dd,
8046 fidl::encoding::DynamicFlags::empty(),
8047 )
8048 }
8049}
8050
8051#[must_use = "FIDL methods require a response to be sent"]
8052#[derive(Debug)]
8053pub struct WlanSoftmacBridgeStartPassiveScanResponder {
8054 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8055 tx_id: u32,
8056}
8057
8058impl std::ops::Drop for WlanSoftmacBridgeStartPassiveScanResponder {
8062 fn drop(&mut self) {
8063 self.control_handle.shutdown();
8064 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8066 }
8067}
8068
8069impl fidl::endpoints::Responder for WlanSoftmacBridgeStartPassiveScanResponder {
8070 type ControlHandle = WlanSoftmacBridgeControlHandle;
8071
8072 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8073 &self.control_handle
8074 }
8075
8076 fn drop_without_shutdown(mut self) {
8077 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8079 std::mem::forget(self);
8081 }
8082}
8083
8084impl WlanSoftmacBridgeStartPassiveScanResponder {
8085 pub fn send(
8089 self,
8090 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
8091 ) -> Result<(), fidl::Error> {
8092 let _result = self.send_raw(result);
8093 if _result.is_err() {
8094 self.control_handle.shutdown();
8095 }
8096 self.drop_without_shutdown();
8097 _result
8098 }
8099
8100 pub fn send_no_shutdown_on_err(
8102 self,
8103 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
8104 ) -> Result<(), fidl::Error> {
8105 let _result = self.send_raw(result);
8106 self.drop_without_shutdown();
8107 _result
8108 }
8109
8110 fn send_raw(
8111 &self,
8112 mut result: Result<&WlanSoftmacBaseStartPassiveScanResponse, i32>,
8113 ) -> Result<(), fidl::Error> {
8114 self.control_handle.inner.send::<fidl::encoding::ResultType<
8115 WlanSoftmacBaseStartPassiveScanResponse,
8116 i32,
8117 >>(
8118 result,
8119 self.tx_id,
8120 0x5662f989cb4083bb,
8121 fidl::encoding::DynamicFlags::empty(),
8122 )
8123 }
8124}
8125
8126#[must_use = "FIDL methods require a response to be sent"]
8127#[derive(Debug)]
8128pub struct WlanSoftmacBridgeStartActiveScanResponder {
8129 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8130 tx_id: u32,
8131}
8132
8133impl std::ops::Drop for WlanSoftmacBridgeStartActiveScanResponder {
8137 fn drop(&mut self) {
8138 self.control_handle.shutdown();
8139 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8141 }
8142}
8143
8144impl fidl::endpoints::Responder for WlanSoftmacBridgeStartActiveScanResponder {
8145 type ControlHandle = WlanSoftmacBridgeControlHandle;
8146
8147 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8148 &self.control_handle
8149 }
8150
8151 fn drop_without_shutdown(mut self) {
8152 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8154 std::mem::forget(self);
8156 }
8157}
8158
8159impl WlanSoftmacBridgeStartActiveScanResponder {
8160 pub fn send(
8164 self,
8165 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
8166 ) -> Result<(), fidl::Error> {
8167 let _result = self.send_raw(result);
8168 if _result.is_err() {
8169 self.control_handle.shutdown();
8170 }
8171 self.drop_without_shutdown();
8172 _result
8173 }
8174
8175 pub fn send_no_shutdown_on_err(
8177 self,
8178 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
8179 ) -> Result<(), fidl::Error> {
8180 let _result = self.send_raw(result);
8181 self.drop_without_shutdown();
8182 _result
8183 }
8184
8185 fn send_raw(
8186 &self,
8187 mut result: Result<&WlanSoftmacBaseStartActiveScanResponse, i32>,
8188 ) -> Result<(), fidl::Error> {
8189 self.control_handle.inner.send::<fidl::encoding::ResultType<
8190 WlanSoftmacBaseStartActiveScanResponse,
8191 i32,
8192 >>(
8193 result,
8194 self.tx_id,
8195 0x4896eafa9937751e,
8196 fidl::encoding::DynamicFlags::empty(),
8197 )
8198 }
8199}
8200
8201#[must_use = "FIDL methods require a response to be sent"]
8202#[derive(Debug)]
8203pub struct WlanSoftmacBridgeCancelScanResponder {
8204 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8205 tx_id: u32,
8206}
8207
8208impl std::ops::Drop for WlanSoftmacBridgeCancelScanResponder {
8212 fn drop(&mut self) {
8213 self.control_handle.shutdown();
8214 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8216 }
8217}
8218
8219impl fidl::endpoints::Responder for WlanSoftmacBridgeCancelScanResponder {
8220 type ControlHandle = WlanSoftmacBridgeControlHandle;
8221
8222 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8223 &self.control_handle
8224 }
8225
8226 fn drop_without_shutdown(mut self) {
8227 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8229 std::mem::forget(self);
8231 }
8232}
8233
8234impl WlanSoftmacBridgeCancelScanResponder {
8235 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8239 let _result = self.send_raw(result);
8240 if _result.is_err() {
8241 self.control_handle.shutdown();
8242 }
8243 self.drop_without_shutdown();
8244 _result
8245 }
8246
8247 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8249 let _result = self.send_raw(result);
8250 self.drop_without_shutdown();
8251 _result
8252 }
8253
8254 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8255 self.control_handle
8256 .inner
8257 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8258 result,
8259 self.tx_id,
8260 0xf7d859369764556,
8261 fidl::encoding::DynamicFlags::empty(),
8262 )
8263 }
8264}
8265
8266#[must_use = "FIDL methods require a response to be sent"]
8267#[derive(Debug)]
8268pub struct WlanSoftmacBridgeUpdateWmmParametersResponder {
8269 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8270 tx_id: u32,
8271}
8272
8273impl std::ops::Drop for WlanSoftmacBridgeUpdateWmmParametersResponder {
8277 fn drop(&mut self) {
8278 self.control_handle.shutdown();
8279 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8281 }
8282}
8283
8284impl fidl::endpoints::Responder for WlanSoftmacBridgeUpdateWmmParametersResponder {
8285 type ControlHandle = WlanSoftmacBridgeControlHandle;
8286
8287 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8288 &self.control_handle
8289 }
8290
8291 fn drop_without_shutdown(mut self) {
8292 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8294 std::mem::forget(self);
8296 }
8297}
8298
8299impl WlanSoftmacBridgeUpdateWmmParametersResponder {
8300 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8304 let _result = self.send_raw(result);
8305 if _result.is_err() {
8306 self.control_handle.shutdown();
8307 }
8308 self.drop_without_shutdown();
8309 _result
8310 }
8311
8312 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8314 let _result = self.send_raw(result);
8315 self.drop_without_shutdown();
8316 _result
8317 }
8318
8319 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8320 self.control_handle
8321 .inner
8322 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8323 result,
8324 self.tx_id,
8325 0x68522c7122d5f78c,
8326 fidl::encoding::DynamicFlags::empty(),
8327 )
8328 }
8329}
8330
8331#[must_use = "FIDL methods require a response to be sent"]
8332#[derive(Debug)]
8333pub struct WlanSoftmacBridgeStartResponder {
8334 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8335 tx_id: u32,
8336}
8337
8338impl std::ops::Drop for WlanSoftmacBridgeStartResponder {
8342 fn drop(&mut self) {
8343 self.control_handle.shutdown();
8344 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8346 }
8347}
8348
8349impl fidl::endpoints::Responder for WlanSoftmacBridgeStartResponder {
8350 type ControlHandle = WlanSoftmacBridgeControlHandle;
8351
8352 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8353 &self.control_handle
8354 }
8355
8356 fn drop_without_shutdown(mut self) {
8357 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8359 std::mem::forget(self);
8361 }
8362}
8363
8364impl WlanSoftmacBridgeStartResponder {
8365 pub fn send(self, mut result: Result<fidl::Channel, i32>) -> Result<(), fidl::Error> {
8369 let _result = self.send_raw(result);
8370 if _result.is_err() {
8371 self.control_handle.shutdown();
8372 }
8373 self.drop_without_shutdown();
8374 _result
8375 }
8376
8377 pub fn send_no_shutdown_on_err(
8379 self,
8380 mut result: Result<fidl::Channel, i32>,
8381 ) -> Result<(), fidl::Error> {
8382 let _result = self.send_raw(result);
8383 self.drop_without_shutdown();
8384 _result
8385 }
8386
8387 fn send_raw(&self, mut result: Result<fidl::Channel, i32>) -> Result<(), fidl::Error> {
8388 self.control_handle
8389 .inner
8390 .send::<fidl::encoding::ResultType<WlanSoftmacBridgeStartResponse, i32>>(
8391 result.map(|sme_channel| (sme_channel,)),
8392 self.tx_id,
8393 0x7b2c15a507020d4d,
8394 fidl::encoding::DynamicFlags::empty(),
8395 )
8396 }
8397}
8398
8399#[must_use = "FIDL methods require a response to be sent"]
8400#[derive(Debug)]
8401pub struct WlanSoftmacBridgeSetEthernetStatusResponder {
8402 control_handle: std::mem::ManuallyDrop<WlanSoftmacBridgeControlHandle>,
8403 tx_id: u32,
8404}
8405
8406impl std::ops::Drop for WlanSoftmacBridgeSetEthernetStatusResponder {
8410 fn drop(&mut self) {
8411 self.control_handle.shutdown();
8412 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8414 }
8415}
8416
8417impl fidl::endpoints::Responder for WlanSoftmacBridgeSetEthernetStatusResponder {
8418 type ControlHandle = WlanSoftmacBridgeControlHandle;
8419
8420 fn control_handle(&self) -> &WlanSoftmacBridgeControlHandle {
8421 &self.control_handle
8422 }
8423
8424 fn drop_without_shutdown(mut self) {
8425 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8427 std::mem::forget(self);
8429 }
8430}
8431
8432impl WlanSoftmacBridgeSetEthernetStatusResponder {
8433 pub fn send(self) -> Result<(), fidl::Error> {
8437 let _result = self.send_raw();
8438 if _result.is_err() {
8439 self.control_handle.shutdown();
8440 }
8441 self.drop_without_shutdown();
8442 _result
8443 }
8444
8445 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
8447 let _result = self.send_raw();
8448 self.drop_without_shutdown();
8449 _result
8450 }
8451
8452 fn send_raw(&self) -> Result<(), fidl::Error> {
8453 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
8454 (),
8455 self.tx_id,
8456 0x412503cb3aaa350b,
8457 fidl::encoding::DynamicFlags::empty(),
8458 )
8459 }
8460}
8461
8462#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
8463pub struct WlanSoftmacIfcBaseMarker;
8464
8465impl fidl::endpoints::ProtocolMarker for WlanSoftmacIfcBaseMarker {
8466 type Proxy = WlanSoftmacIfcBaseProxy;
8467 type RequestStream = WlanSoftmacIfcBaseRequestStream;
8468 #[cfg(target_os = "fuchsia")]
8469 type SynchronousProxy = WlanSoftmacIfcBaseSynchronousProxy;
8470
8471 const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacIfcBase";
8472}
8473
8474pub trait WlanSoftmacIfcBaseProxyInterface: Send + Sync {
8475 type ReportTxResultResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
8476 fn r#report_tx_result(
8477 &self,
8478 tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
8479 ) -> Self::ReportTxResultResponseFut;
8480 type NotifyScanCompleteResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
8481 fn r#notify_scan_complete(
8482 &self,
8483 payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8484 ) -> Self::NotifyScanCompleteResponseFut;
8485}
8486#[derive(Debug)]
8487#[cfg(target_os = "fuchsia")]
8488pub struct WlanSoftmacIfcBaseSynchronousProxy {
8489 client: fidl::client::sync::Client,
8490}
8491
8492#[cfg(target_os = "fuchsia")]
8493impl fidl::endpoints::SynchronousProxy for WlanSoftmacIfcBaseSynchronousProxy {
8494 type Proxy = WlanSoftmacIfcBaseProxy;
8495 type Protocol = WlanSoftmacIfcBaseMarker;
8496
8497 fn from_channel(inner: fidl::Channel) -> Self {
8498 Self::new(inner)
8499 }
8500
8501 fn into_channel(self) -> fidl::Channel {
8502 self.client.into_channel()
8503 }
8504
8505 fn as_channel(&self) -> &fidl::Channel {
8506 self.client.as_channel()
8507 }
8508}
8509
8510#[cfg(target_os = "fuchsia")]
8511impl WlanSoftmacIfcBaseSynchronousProxy {
8512 pub fn new(channel: fidl::Channel) -> Self {
8513 Self { client: fidl::client::sync::Client::new(channel) }
8514 }
8515
8516 pub fn into_channel(self) -> fidl::Channel {
8517 self.client.into_channel()
8518 }
8519
8520 pub fn wait_for_event(
8523 &self,
8524 deadline: zx::MonotonicInstant,
8525 ) -> Result<WlanSoftmacIfcBaseEvent, fidl::Error> {
8526 WlanSoftmacIfcBaseEvent::decode(
8527 self.client.wait_for_event::<WlanSoftmacIfcBaseMarker>(deadline)?,
8528 )
8529 }
8530
8531 pub fn r#report_tx_result(
8536 &self,
8537 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
8538 ___deadline: zx::MonotonicInstant,
8539 ) -> Result<(), fidl::Error> {
8540 let _response = self.client.send_query::<
8541 WlanSoftmacIfcBaseReportTxResultRequest,
8542 fidl::encoding::EmptyPayload,
8543 WlanSoftmacIfcBaseMarker,
8544 >(
8545 (tx_result,),
8546 0x5835c2f13d94e09a,
8547 fidl::encoding::DynamicFlags::empty(),
8548 ___deadline,
8549 )?;
8550 Ok(_response)
8551 }
8552
8553 pub fn r#notify_scan_complete(
8565 &self,
8566 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8567 ___deadline: zx::MonotonicInstant,
8568 ) -> Result<(), fidl::Error> {
8569 let _response = self.client.send_query::<
8570 WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8571 fidl::encoding::EmptyPayload,
8572 WlanSoftmacIfcBaseMarker,
8573 >(
8574 payload,
8575 0x7045e3cd460dc42c,
8576 fidl::encoding::DynamicFlags::empty(),
8577 ___deadline,
8578 )?;
8579 Ok(_response)
8580 }
8581}
8582
8583#[cfg(target_os = "fuchsia")]
8584impl From<WlanSoftmacIfcBaseSynchronousProxy> for zx::NullableHandle {
8585 fn from(value: WlanSoftmacIfcBaseSynchronousProxy) -> Self {
8586 value.into_channel().into()
8587 }
8588}
8589
8590#[cfg(target_os = "fuchsia")]
8591impl From<fidl::Channel> for WlanSoftmacIfcBaseSynchronousProxy {
8592 fn from(value: fidl::Channel) -> Self {
8593 Self::new(value)
8594 }
8595}
8596
8597#[cfg(target_os = "fuchsia")]
8598impl fidl::endpoints::FromClient for WlanSoftmacIfcBaseSynchronousProxy {
8599 type Protocol = WlanSoftmacIfcBaseMarker;
8600
8601 fn from_client(value: fidl::endpoints::ClientEnd<WlanSoftmacIfcBaseMarker>) -> Self {
8602 Self::new(value.into_channel())
8603 }
8604}
8605
8606#[derive(Debug, Clone)]
8607pub struct WlanSoftmacIfcBaseProxy {
8608 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
8609}
8610
8611impl fidl::endpoints::Proxy for WlanSoftmacIfcBaseProxy {
8612 type Protocol = WlanSoftmacIfcBaseMarker;
8613
8614 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
8615 Self::new(inner)
8616 }
8617
8618 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
8619 self.client.into_channel().map_err(|client| Self { client })
8620 }
8621
8622 fn as_channel(&self) -> &::fidl::AsyncChannel {
8623 self.client.as_channel()
8624 }
8625}
8626
8627impl WlanSoftmacIfcBaseProxy {
8628 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
8630 let protocol_name =
8631 <WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8632 Self { client: fidl::client::Client::new(channel, protocol_name) }
8633 }
8634
8635 pub fn take_event_stream(&self) -> WlanSoftmacIfcBaseEventStream {
8641 WlanSoftmacIfcBaseEventStream { event_receiver: self.client.take_event_receiver() }
8642 }
8643
8644 pub fn r#report_tx_result(
8649 &self,
8650 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
8651 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
8652 WlanSoftmacIfcBaseProxyInterface::r#report_tx_result(self, tx_result)
8653 }
8654
8655 pub fn r#notify_scan_complete(
8667 &self,
8668 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8669 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
8670 WlanSoftmacIfcBaseProxyInterface::r#notify_scan_complete(self, payload)
8671 }
8672}
8673
8674impl WlanSoftmacIfcBaseProxyInterface for WlanSoftmacIfcBaseProxy {
8675 type ReportTxResultResponseFut =
8676 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
8677 fn r#report_tx_result(
8678 &self,
8679 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
8680 ) -> Self::ReportTxResultResponseFut {
8681 fn _decode(
8682 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8683 ) -> Result<(), fidl::Error> {
8684 let _response = fidl::client::decode_transaction_body::<
8685 fidl::encoding::EmptyPayload,
8686 fidl::encoding::DefaultFuchsiaResourceDialect,
8687 0x5835c2f13d94e09a,
8688 >(_buf?)?;
8689 Ok(_response)
8690 }
8691 self.client.send_query_and_decode::<WlanSoftmacIfcBaseReportTxResultRequest, ()>(
8692 (tx_result,),
8693 0x5835c2f13d94e09a,
8694 fidl::encoding::DynamicFlags::empty(),
8695 _decode,
8696 )
8697 }
8698
8699 type NotifyScanCompleteResponseFut =
8700 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
8701 fn r#notify_scan_complete(
8702 &self,
8703 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8704 ) -> Self::NotifyScanCompleteResponseFut {
8705 fn _decode(
8706 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8707 ) -> Result<(), fidl::Error> {
8708 let _response = fidl::client::decode_transaction_body::<
8709 fidl::encoding::EmptyPayload,
8710 fidl::encoding::DefaultFuchsiaResourceDialect,
8711 0x7045e3cd460dc42c,
8712 >(_buf?)?;
8713 Ok(_response)
8714 }
8715 self.client.send_query_and_decode::<WlanSoftmacIfcBaseNotifyScanCompleteRequest, ()>(
8716 payload,
8717 0x7045e3cd460dc42c,
8718 fidl::encoding::DynamicFlags::empty(),
8719 _decode,
8720 )
8721 }
8722}
8723
8724pub struct WlanSoftmacIfcBaseEventStream {
8725 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
8726}
8727
8728impl std::marker::Unpin for WlanSoftmacIfcBaseEventStream {}
8729
8730impl futures::stream::FusedStream for WlanSoftmacIfcBaseEventStream {
8731 fn is_terminated(&self) -> bool {
8732 self.event_receiver.is_terminated()
8733 }
8734}
8735
8736impl futures::Stream for WlanSoftmacIfcBaseEventStream {
8737 type Item = Result<WlanSoftmacIfcBaseEvent, fidl::Error>;
8738
8739 fn poll_next(
8740 mut self: std::pin::Pin<&mut Self>,
8741 cx: &mut std::task::Context<'_>,
8742 ) -> std::task::Poll<Option<Self::Item>> {
8743 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8744 &mut self.event_receiver,
8745 cx
8746 )?) {
8747 Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacIfcBaseEvent::decode(buf))),
8748 None => std::task::Poll::Ready(None),
8749 }
8750 }
8751}
8752
8753#[derive(Debug)]
8754pub enum WlanSoftmacIfcBaseEvent {}
8755
8756impl WlanSoftmacIfcBaseEvent {
8757 fn decode(
8759 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8760 ) -> Result<WlanSoftmacIfcBaseEvent, fidl::Error> {
8761 let (bytes, _handles) = buf.split_mut();
8762 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8763 debug_assert_eq!(tx_header.tx_id, 0);
8764 match tx_header.ordinal {
8765 _ => Err(fidl::Error::UnknownOrdinal {
8766 ordinal: tx_header.ordinal,
8767 protocol_name:
8768 <WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8769 }),
8770 }
8771 }
8772}
8773
8774pub struct WlanSoftmacIfcBaseRequestStream {
8776 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8777 is_terminated: bool,
8778}
8779
8780impl std::marker::Unpin for WlanSoftmacIfcBaseRequestStream {}
8781
8782impl futures::stream::FusedStream for WlanSoftmacIfcBaseRequestStream {
8783 fn is_terminated(&self) -> bool {
8784 self.is_terminated
8785 }
8786}
8787
8788impl fidl::endpoints::RequestStream for WlanSoftmacIfcBaseRequestStream {
8789 type Protocol = WlanSoftmacIfcBaseMarker;
8790 type ControlHandle = WlanSoftmacIfcBaseControlHandle;
8791
8792 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
8793 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8794 }
8795
8796 fn control_handle(&self) -> Self::ControlHandle {
8797 WlanSoftmacIfcBaseControlHandle { inner: self.inner.clone() }
8798 }
8799
8800 fn into_inner(
8801 self,
8802 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
8803 {
8804 (self.inner, self.is_terminated)
8805 }
8806
8807 fn from_inner(
8808 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8809 is_terminated: bool,
8810 ) -> Self {
8811 Self { inner, is_terminated }
8812 }
8813}
8814
8815impl futures::Stream for WlanSoftmacIfcBaseRequestStream {
8816 type Item = Result<WlanSoftmacIfcBaseRequest, fidl::Error>;
8817
8818 fn poll_next(
8819 mut self: std::pin::Pin<&mut Self>,
8820 cx: &mut std::task::Context<'_>,
8821 ) -> std::task::Poll<Option<Self::Item>> {
8822 let this = &mut *self;
8823 if this.inner.check_shutdown(cx) {
8824 this.is_terminated = true;
8825 return std::task::Poll::Ready(None);
8826 }
8827 if this.is_terminated {
8828 panic!("polled WlanSoftmacIfcBaseRequestStream after completion");
8829 }
8830 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
8831 |bytes, handles| {
8832 match this.inner.channel().read_etc(cx, bytes, handles) {
8833 std::task::Poll::Ready(Ok(())) => {}
8834 std::task::Poll::Pending => return std::task::Poll::Pending,
8835 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
8836 this.is_terminated = true;
8837 return std::task::Poll::Ready(None);
8838 }
8839 std::task::Poll::Ready(Err(e)) => {
8840 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8841 e.into(),
8842 ))));
8843 }
8844 }
8845
8846 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8848
8849 std::task::Poll::Ready(Some(match header.ordinal {
8850 0x5835c2f13d94e09a => {
8851 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8852 let mut req = fidl::new_empty!(WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
8853 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseReportTxResultRequest>(&header, _body_bytes, handles, &mut req)?;
8854 let control_handle = WlanSoftmacIfcBaseControlHandle {
8855 inner: this.inner.clone(),
8856 };
8857 Ok(WlanSoftmacIfcBaseRequest::ReportTxResult {tx_result: req.tx_result,
8858
8859 responder: WlanSoftmacIfcBaseReportTxResultResponder {
8860 control_handle: std::mem::ManuallyDrop::new(control_handle),
8861 tx_id: header.tx_id,
8862 },
8863 })
8864 }
8865 0x7045e3cd460dc42c => {
8866 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8867 let mut req = fidl::new_empty!(WlanSoftmacIfcBaseNotifyScanCompleteRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
8868 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseNotifyScanCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
8869 let control_handle = WlanSoftmacIfcBaseControlHandle {
8870 inner: this.inner.clone(),
8871 };
8872 Ok(WlanSoftmacIfcBaseRequest::NotifyScanComplete {payload: req,
8873 responder: WlanSoftmacIfcBaseNotifyScanCompleteResponder {
8874 control_handle: std::mem::ManuallyDrop::new(control_handle),
8875 tx_id: header.tx_id,
8876 },
8877 })
8878 }
8879 _ => Err(fidl::Error::UnknownOrdinal {
8880 ordinal: header.ordinal,
8881 protocol_name: <WlanSoftmacIfcBaseMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8882 }),
8883 }))
8884 },
8885 )
8886 }
8887}
8888
8889#[derive(Debug)]
8900pub enum WlanSoftmacIfcBaseRequest {
8901 ReportTxResult {
8906 tx_result: fidl_fuchsia_wlan_common::WlanTxResult,
8907 responder: WlanSoftmacIfcBaseReportTxResultResponder,
8908 },
8909 NotifyScanComplete {
8921 payload: WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8922 responder: WlanSoftmacIfcBaseNotifyScanCompleteResponder,
8923 },
8924}
8925
8926impl WlanSoftmacIfcBaseRequest {
8927 #[allow(irrefutable_let_patterns)]
8928 pub fn into_report_tx_result(
8929 self,
8930 ) -> Option<(fidl_fuchsia_wlan_common::WlanTxResult, WlanSoftmacIfcBaseReportTxResultResponder)>
8931 {
8932 if let WlanSoftmacIfcBaseRequest::ReportTxResult { tx_result, responder } = self {
8933 Some((tx_result, responder))
8934 } else {
8935 None
8936 }
8937 }
8938
8939 #[allow(irrefutable_let_patterns)]
8940 pub fn into_notify_scan_complete(
8941 self,
8942 ) -> Option<(
8943 WlanSoftmacIfcBaseNotifyScanCompleteRequest,
8944 WlanSoftmacIfcBaseNotifyScanCompleteResponder,
8945 )> {
8946 if let WlanSoftmacIfcBaseRequest::NotifyScanComplete { payload, responder } = self {
8947 Some((payload, responder))
8948 } else {
8949 None
8950 }
8951 }
8952
8953 pub fn method_name(&self) -> &'static str {
8955 match *self {
8956 WlanSoftmacIfcBaseRequest::ReportTxResult { .. } => "report_tx_result",
8957 WlanSoftmacIfcBaseRequest::NotifyScanComplete { .. } => "notify_scan_complete",
8958 }
8959 }
8960}
8961
8962#[derive(Debug, Clone)]
8963pub struct WlanSoftmacIfcBaseControlHandle {
8964 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8965}
8966
8967impl fidl::endpoints::ControlHandle for WlanSoftmacIfcBaseControlHandle {
8968 fn shutdown(&self) {
8969 self.inner.shutdown()
8970 }
8971
8972 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8973 self.inner.shutdown_with_epitaph(status)
8974 }
8975
8976 fn is_closed(&self) -> bool {
8977 self.inner.channel().is_closed()
8978 }
8979 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
8980 self.inner.channel().on_closed()
8981 }
8982
8983 #[cfg(target_os = "fuchsia")]
8984 fn signal_peer(
8985 &self,
8986 clear_mask: zx::Signals,
8987 set_mask: zx::Signals,
8988 ) -> Result<(), zx_status::Status> {
8989 use fidl::Peered;
8990 self.inner.channel().signal_peer(clear_mask, set_mask)
8991 }
8992}
8993
8994impl WlanSoftmacIfcBaseControlHandle {}
8995
8996#[must_use = "FIDL methods require a response to be sent"]
8997#[derive(Debug)]
8998pub struct WlanSoftmacIfcBaseReportTxResultResponder {
8999 control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBaseControlHandle>,
9000 tx_id: u32,
9001}
9002
9003impl std::ops::Drop for WlanSoftmacIfcBaseReportTxResultResponder {
9007 fn drop(&mut self) {
9008 self.control_handle.shutdown();
9009 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9011 }
9012}
9013
9014impl fidl::endpoints::Responder for WlanSoftmacIfcBaseReportTxResultResponder {
9015 type ControlHandle = WlanSoftmacIfcBaseControlHandle;
9016
9017 fn control_handle(&self) -> &WlanSoftmacIfcBaseControlHandle {
9018 &self.control_handle
9019 }
9020
9021 fn drop_without_shutdown(mut self) {
9022 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9024 std::mem::forget(self);
9026 }
9027}
9028
9029impl WlanSoftmacIfcBaseReportTxResultResponder {
9030 pub fn send(self) -> Result<(), fidl::Error> {
9034 let _result = self.send_raw();
9035 if _result.is_err() {
9036 self.control_handle.shutdown();
9037 }
9038 self.drop_without_shutdown();
9039 _result
9040 }
9041
9042 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
9044 let _result = self.send_raw();
9045 self.drop_without_shutdown();
9046 _result
9047 }
9048
9049 fn send_raw(&self) -> Result<(), fidl::Error> {
9050 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
9051 (),
9052 self.tx_id,
9053 0x5835c2f13d94e09a,
9054 fidl::encoding::DynamicFlags::empty(),
9055 )
9056 }
9057}
9058
9059#[must_use = "FIDL methods require a response to be sent"]
9060#[derive(Debug)]
9061pub struct WlanSoftmacIfcBaseNotifyScanCompleteResponder {
9062 control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBaseControlHandle>,
9063 tx_id: u32,
9064}
9065
9066impl std::ops::Drop for WlanSoftmacIfcBaseNotifyScanCompleteResponder {
9070 fn drop(&mut self) {
9071 self.control_handle.shutdown();
9072 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9074 }
9075}
9076
9077impl fidl::endpoints::Responder for WlanSoftmacIfcBaseNotifyScanCompleteResponder {
9078 type ControlHandle = WlanSoftmacIfcBaseControlHandle;
9079
9080 fn control_handle(&self) -> &WlanSoftmacIfcBaseControlHandle {
9081 &self.control_handle
9082 }
9083
9084 fn drop_without_shutdown(mut self) {
9085 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9087 std::mem::forget(self);
9089 }
9090}
9091
9092impl WlanSoftmacIfcBaseNotifyScanCompleteResponder {
9093 pub fn send(self) -> Result<(), fidl::Error> {
9097 let _result = self.send_raw();
9098 if _result.is_err() {
9099 self.control_handle.shutdown();
9100 }
9101 self.drop_without_shutdown();
9102 _result
9103 }
9104
9105 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
9107 let _result = self.send_raw();
9108 self.drop_without_shutdown();
9109 _result
9110 }
9111
9112 fn send_raw(&self) -> Result<(), fidl::Error> {
9113 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
9114 (),
9115 self.tx_id,
9116 0x7045e3cd460dc42c,
9117 fidl::encoding::DynamicFlags::empty(),
9118 )
9119 }
9120}
9121
9122#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
9123pub struct WlanSoftmacIfcBridgeMarker;
9124
9125impl fidl::endpoints::ProtocolMarker for WlanSoftmacIfcBridgeMarker {
9126 type Proxy = WlanSoftmacIfcBridgeProxy;
9127 type RequestStream = WlanSoftmacIfcBridgeRequestStream;
9128 #[cfg(target_os = "fuchsia")]
9129 type SynchronousProxy = WlanSoftmacIfcBridgeSynchronousProxy;
9130
9131 const DEBUG_NAME: &'static str = "(anonymous) WlanSoftmacIfcBridge";
9132}
9133
9134pub trait WlanSoftmacIfcBridgeProxyInterface: Send + Sync {
9135 type ReportTxResultResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
9136 fn r#report_tx_result(
9137 &self,
9138 tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9139 ) -> Self::ReportTxResultResponseFut;
9140 type NotifyScanCompleteResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
9141 fn r#notify_scan_complete(
9142 &self,
9143 payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9144 ) -> Self::NotifyScanCompleteResponseFut;
9145 type StopBridgedDriverResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
9146 fn r#stop_bridged_driver(&self) -> Self::StopBridgedDriverResponseFut;
9147}
9148#[derive(Debug)]
9149#[cfg(target_os = "fuchsia")]
9150pub struct WlanSoftmacIfcBridgeSynchronousProxy {
9151 client: fidl::client::sync::Client,
9152}
9153
9154#[cfg(target_os = "fuchsia")]
9155impl fidl::endpoints::SynchronousProxy for WlanSoftmacIfcBridgeSynchronousProxy {
9156 type Proxy = WlanSoftmacIfcBridgeProxy;
9157 type Protocol = WlanSoftmacIfcBridgeMarker;
9158
9159 fn from_channel(inner: fidl::Channel) -> Self {
9160 Self::new(inner)
9161 }
9162
9163 fn into_channel(self) -> fidl::Channel {
9164 self.client.into_channel()
9165 }
9166
9167 fn as_channel(&self) -> &fidl::Channel {
9168 self.client.as_channel()
9169 }
9170}
9171
9172#[cfg(target_os = "fuchsia")]
9173impl WlanSoftmacIfcBridgeSynchronousProxy {
9174 pub fn new(channel: fidl::Channel) -> Self {
9175 Self { client: fidl::client::sync::Client::new(channel) }
9176 }
9177
9178 pub fn into_channel(self) -> fidl::Channel {
9179 self.client.into_channel()
9180 }
9181
9182 pub fn wait_for_event(
9185 &self,
9186 deadline: zx::MonotonicInstant,
9187 ) -> Result<WlanSoftmacIfcBridgeEvent, fidl::Error> {
9188 WlanSoftmacIfcBridgeEvent::decode(
9189 self.client.wait_for_event::<WlanSoftmacIfcBridgeMarker>(deadline)?,
9190 )
9191 }
9192
9193 pub fn r#report_tx_result(
9198 &self,
9199 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9200 ___deadline: zx::MonotonicInstant,
9201 ) -> Result<(), fidl::Error> {
9202 let _response = self.client.send_query::<
9203 WlanSoftmacIfcBaseReportTxResultRequest,
9204 fidl::encoding::EmptyPayload,
9205 WlanSoftmacIfcBridgeMarker,
9206 >(
9207 (tx_result,),
9208 0x5835c2f13d94e09a,
9209 fidl::encoding::DynamicFlags::empty(),
9210 ___deadline,
9211 )?;
9212 Ok(_response)
9213 }
9214
9215 pub fn r#notify_scan_complete(
9227 &self,
9228 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9229 ___deadline: zx::MonotonicInstant,
9230 ) -> Result<(), fidl::Error> {
9231 let _response = self.client.send_query::<
9232 WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9233 fidl::encoding::EmptyPayload,
9234 WlanSoftmacIfcBridgeMarker,
9235 >(
9236 payload,
9237 0x7045e3cd460dc42c,
9238 fidl::encoding::DynamicFlags::empty(),
9239 ___deadline,
9240 )?;
9241 Ok(_response)
9242 }
9243
9244 pub fn r#stop_bridged_driver(
9252 &self,
9253 ___deadline: zx::MonotonicInstant,
9254 ) -> Result<(), fidl::Error> {
9255 let _response = self.client.send_query::<
9256 fidl::encoding::EmptyPayload,
9257 fidl::encoding::EmptyPayload,
9258 WlanSoftmacIfcBridgeMarker,
9259 >(
9260 (),
9261 0x112dbd0cc2251151,
9262 fidl::encoding::DynamicFlags::empty(),
9263 ___deadline,
9264 )?;
9265 Ok(_response)
9266 }
9267}
9268
9269#[cfg(target_os = "fuchsia")]
9270impl From<WlanSoftmacIfcBridgeSynchronousProxy> for zx::NullableHandle {
9271 fn from(value: WlanSoftmacIfcBridgeSynchronousProxy) -> Self {
9272 value.into_channel().into()
9273 }
9274}
9275
9276#[cfg(target_os = "fuchsia")]
9277impl From<fidl::Channel> for WlanSoftmacIfcBridgeSynchronousProxy {
9278 fn from(value: fidl::Channel) -> Self {
9279 Self::new(value)
9280 }
9281}
9282
9283#[cfg(target_os = "fuchsia")]
9284impl fidl::endpoints::FromClient for WlanSoftmacIfcBridgeSynchronousProxy {
9285 type Protocol = WlanSoftmacIfcBridgeMarker;
9286
9287 fn from_client(value: fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>) -> Self {
9288 Self::new(value.into_channel())
9289 }
9290}
9291
9292#[derive(Debug, Clone)]
9293pub struct WlanSoftmacIfcBridgeProxy {
9294 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
9295}
9296
9297impl fidl::endpoints::Proxy for WlanSoftmacIfcBridgeProxy {
9298 type Protocol = WlanSoftmacIfcBridgeMarker;
9299
9300 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
9301 Self::new(inner)
9302 }
9303
9304 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
9305 self.client.into_channel().map_err(|client| Self { client })
9306 }
9307
9308 fn as_channel(&self) -> &::fidl::AsyncChannel {
9309 self.client.as_channel()
9310 }
9311}
9312
9313impl WlanSoftmacIfcBridgeProxy {
9314 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
9316 let protocol_name =
9317 <WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
9318 Self { client: fidl::client::Client::new(channel, protocol_name) }
9319 }
9320
9321 pub fn take_event_stream(&self) -> WlanSoftmacIfcBridgeEventStream {
9327 WlanSoftmacIfcBridgeEventStream { event_receiver: self.client.take_event_receiver() }
9328 }
9329
9330 pub fn r#report_tx_result(
9335 &self,
9336 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9337 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
9338 WlanSoftmacIfcBridgeProxyInterface::r#report_tx_result(self, tx_result)
9339 }
9340
9341 pub fn r#notify_scan_complete(
9353 &self,
9354 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9355 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
9356 WlanSoftmacIfcBridgeProxyInterface::r#notify_scan_complete(self, payload)
9357 }
9358
9359 pub fn r#stop_bridged_driver(
9367 &self,
9368 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
9369 WlanSoftmacIfcBridgeProxyInterface::r#stop_bridged_driver(self)
9370 }
9371}
9372
9373impl WlanSoftmacIfcBridgeProxyInterface for WlanSoftmacIfcBridgeProxy {
9374 type ReportTxResultResponseFut =
9375 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
9376 fn r#report_tx_result(
9377 &self,
9378 mut tx_result: &fidl_fuchsia_wlan_common::WlanTxResult,
9379 ) -> Self::ReportTxResultResponseFut {
9380 fn _decode(
9381 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9382 ) -> Result<(), fidl::Error> {
9383 let _response = fidl::client::decode_transaction_body::<
9384 fidl::encoding::EmptyPayload,
9385 fidl::encoding::DefaultFuchsiaResourceDialect,
9386 0x5835c2f13d94e09a,
9387 >(_buf?)?;
9388 Ok(_response)
9389 }
9390 self.client.send_query_and_decode::<WlanSoftmacIfcBaseReportTxResultRequest, ()>(
9391 (tx_result,),
9392 0x5835c2f13d94e09a,
9393 fidl::encoding::DynamicFlags::empty(),
9394 _decode,
9395 )
9396 }
9397
9398 type NotifyScanCompleteResponseFut =
9399 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
9400 fn r#notify_scan_complete(
9401 &self,
9402 mut payload: &WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9403 ) -> Self::NotifyScanCompleteResponseFut {
9404 fn _decode(
9405 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9406 ) -> Result<(), fidl::Error> {
9407 let _response = fidl::client::decode_transaction_body::<
9408 fidl::encoding::EmptyPayload,
9409 fidl::encoding::DefaultFuchsiaResourceDialect,
9410 0x7045e3cd460dc42c,
9411 >(_buf?)?;
9412 Ok(_response)
9413 }
9414 self.client.send_query_and_decode::<WlanSoftmacIfcBaseNotifyScanCompleteRequest, ()>(
9415 payload,
9416 0x7045e3cd460dc42c,
9417 fidl::encoding::DynamicFlags::empty(),
9418 _decode,
9419 )
9420 }
9421
9422 type StopBridgedDriverResponseFut =
9423 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
9424 fn r#stop_bridged_driver(&self) -> Self::StopBridgedDriverResponseFut {
9425 fn _decode(
9426 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9427 ) -> Result<(), fidl::Error> {
9428 let _response = fidl::client::decode_transaction_body::<
9429 fidl::encoding::EmptyPayload,
9430 fidl::encoding::DefaultFuchsiaResourceDialect,
9431 0x112dbd0cc2251151,
9432 >(_buf?)?;
9433 Ok(_response)
9434 }
9435 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
9436 (),
9437 0x112dbd0cc2251151,
9438 fidl::encoding::DynamicFlags::empty(),
9439 _decode,
9440 )
9441 }
9442}
9443
9444pub struct WlanSoftmacIfcBridgeEventStream {
9445 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9446}
9447
9448impl std::marker::Unpin for WlanSoftmacIfcBridgeEventStream {}
9449
9450impl futures::stream::FusedStream for WlanSoftmacIfcBridgeEventStream {
9451 fn is_terminated(&self) -> bool {
9452 self.event_receiver.is_terminated()
9453 }
9454}
9455
9456impl futures::Stream for WlanSoftmacIfcBridgeEventStream {
9457 type Item = Result<WlanSoftmacIfcBridgeEvent, fidl::Error>;
9458
9459 fn poll_next(
9460 mut self: std::pin::Pin<&mut Self>,
9461 cx: &mut std::task::Context<'_>,
9462 ) -> std::task::Poll<Option<Self::Item>> {
9463 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9464 &mut self.event_receiver,
9465 cx
9466 )?) {
9467 Some(buf) => std::task::Poll::Ready(Some(WlanSoftmacIfcBridgeEvent::decode(buf))),
9468 None => std::task::Poll::Ready(None),
9469 }
9470 }
9471}
9472
9473#[derive(Debug)]
9474pub enum WlanSoftmacIfcBridgeEvent {}
9475
9476impl WlanSoftmacIfcBridgeEvent {
9477 fn decode(
9479 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9480 ) -> Result<WlanSoftmacIfcBridgeEvent, fidl::Error> {
9481 let (bytes, _handles) = buf.split_mut();
9482 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9483 debug_assert_eq!(tx_header.tx_id, 0);
9484 match tx_header.ordinal {
9485 _ => Err(fidl::Error::UnknownOrdinal {
9486 ordinal: tx_header.ordinal,
9487 protocol_name:
9488 <WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9489 }),
9490 }
9491 }
9492}
9493
9494pub struct WlanSoftmacIfcBridgeRequestStream {
9496 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9497 is_terminated: bool,
9498}
9499
9500impl std::marker::Unpin for WlanSoftmacIfcBridgeRequestStream {}
9501
9502impl futures::stream::FusedStream for WlanSoftmacIfcBridgeRequestStream {
9503 fn is_terminated(&self) -> bool {
9504 self.is_terminated
9505 }
9506}
9507
9508impl fidl::endpoints::RequestStream for WlanSoftmacIfcBridgeRequestStream {
9509 type Protocol = WlanSoftmacIfcBridgeMarker;
9510 type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
9511
9512 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9513 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9514 }
9515
9516 fn control_handle(&self) -> Self::ControlHandle {
9517 WlanSoftmacIfcBridgeControlHandle { inner: self.inner.clone() }
9518 }
9519
9520 fn into_inner(
9521 self,
9522 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9523 {
9524 (self.inner, self.is_terminated)
9525 }
9526
9527 fn from_inner(
9528 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9529 is_terminated: bool,
9530 ) -> Self {
9531 Self { inner, is_terminated }
9532 }
9533}
9534
9535impl futures::Stream for WlanSoftmacIfcBridgeRequestStream {
9536 type Item = Result<WlanSoftmacIfcBridgeRequest, fidl::Error>;
9537
9538 fn poll_next(
9539 mut self: std::pin::Pin<&mut Self>,
9540 cx: &mut std::task::Context<'_>,
9541 ) -> std::task::Poll<Option<Self::Item>> {
9542 let this = &mut *self;
9543 if this.inner.check_shutdown(cx) {
9544 this.is_terminated = true;
9545 return std::task::Poll::Ready(None);
9546 }
9547 if this.is_terminated {
9548 panic!("polled WlanSoftmacIfcBridgeRequestStream after completion");
9549 }
9550 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9551 |bytes, handles| {
9552 match this.inner.channel().read_etc(cx, bytes, handles) {
9553 std::task::Poll::Ready(Ok(())) => {}
9554 std::task::Poll::Pending => return std::task::Poll::Pending,
9555 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9556 this.is_terminated = true;
9557 return std::task::Poll::Ready(None);
9558 }
9559 std::task::Poll::Ready(Err(e)) => {
9560 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9561 e.into(),
9562 ))));
9563 }
9564 }
9565
9566 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9568
9569 std::task::Poll::Ready(Some(match header.ordinal {
9570 0x5835c2f13d94e09a => {
9571 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9572 let mut req = fidl::new_empty!(WlanSoftmacIfcBaseReportTxResultRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
9573 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseReportTxResultRequest>(&header, _body_bytes, handles, &mut req)?;
9574 let control_handle = WlanSoftmacIfcBridgeControlHandle {
9575 inner: this.inner.clone(),
9576 };
9577 Ok(WlanSoftmacIfcBridgeRequest::ReportTxResult {tx_result: req.tx_result,
9578
9579 responder: WlanSoftmacIfcBridgeReportTxResultResponder {
9580 control_handle: std::mem::ManuallyDrop::new(control_handle),
9581 tx_id: header.tx_id,
9582 },
9583 })
9584 }
9585 0x7045e3cd460dc42c => {
9586 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9587 let mut req = fidl::new_empty!(WlanSoftmacIfcBaseNotifyScanCompleteRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
9588 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanSoftmacIfcBaseNotifyScanCompleteRequest>(&header, _body_bytes, handles, &mut req)?;
9589 let control_handle = WlanSoftmacIfcBridgeControlHandle {
9590 inner: this.inner.clone(),
9591 };
9592 Ok(WlanSoftmacIfcBridgeRequest::NotifyScanComplete {payload: req,
9593 responder: WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
9594 control_handle: std::mem::ManuallyDrop::new(control_handle),
9595 tx_id: header.tx_id,
9596 },
9597 })
9598 }
9599 0x112dbd0cc2251151 => {
9600 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9601 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
9602 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9603 let control_handle = WlanSoftmacIfcBridgeControlHandle {
9604 inner: this.inner.clone(),
9605 };
9606 Ok(WlanSoftmacIfcBridgeRequest::StopBridgedDriver {
9607 responder: WlanSoftmacIfcBridgeStopBridgedDriverResponder {
9608 control_handle: std::mem::ManuallyDrop::new(control_handle),
9609 tx_id: header.tx_id,
9610 },
9611 })
9612 }
9613 _ => Err(fidl::Error::UnknownOrdinal {
9614 ordinal: header.ordinal,
9615 protocol_name: <WlanSoftmacIfcBridgeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9616 }),
9617 }))
9618 },
9619 )
9620 }
9621}
9622
9623#[derive(Debug)]
9630pub enum WlanSoftmacIfcBridgeRequest {
9631 ReportTxResult {
9636 tx_result: fidl_fuchsia_wlan_common::WlanTxResult,
9637 responder: WlanSoftmacIfcBridgeReportTxResultResponder,
9638 },
9639 NotifyScanComplete {
9651 payload: WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9652 responder: WlanSoftmacIfcBridgeNotifyScanCompleteResponder,
9653 },
9654 StopBridgedDriver { responder: WlanSoftmacIfcBridgeStopBridgedDriverResponder },
9662}
9663
9664impl WlanSoftmacIfcBridgeRequest {
9665 #[allow(irrefutable_let_patterns)]
9666 pub fn into_report_tx_result(
9667 self,
9668 ) -> Option<(fidl_fuchsia_wlan_common::WlanTxResult, WlanSoftmacIfcBridgeReportTxResultResponder)>
9669 {
9670 if let WlanSoftmacIfcBridgeRequest::ReportTxResult { tx_result, responder } = self {
9671 Some((tx_result, responder))
9672 } else {
9673 None
9674 }
9675 }
9676
9677 #[allow(irrefutable_let_patterns)]
9678 pub fn into_notify_scan_complete(
9679 self,
9680 ) -> Option<(
9681 WlanSoftmacIfcBaseNotifyScanCompleteRequest,
9682 WlanSoftmacIfcBridgeNotifyScanCompleteResponder,
9683 )> {
9684 if let WlanSoftmacIfcBridgeRequest::NotifyScanComplete { payload, responder } = self {
9685 Some((payload, responder))
9686 } else {
9687 None
9688 }
9689 }
9690
9691 #[allow(irrefutable_let_patterns)]
9692 pub fn into_stop_bridged_driver(
9693 self,
9694 ) -> Option<(WlanSoftmacIfcBridgeStopBridgedDriverResponder)> {
9695 if let WlanSoftmacIfcBridgeRequest::StopBridgedDriver { responder } = self {
9696 Some((responder))
9697 } else {
9698 None
9699 }
9700 }
9701
9702 pub fn method_name(&self) -> &'static str {
9704 match *self {
9705 WlanSoftmacIfcBridgeRequest::ReportTxResult { .. } => "report_tx_result",
9706 WlanSoftmacIfcBridgeRequest::NotifyScanComplete { .. } => "notify_scan_complete",
9707 WlanSoftmacIfcBridgeRequest::StopBridgedDriver { .. } => "stop_bridged_driver",
9708 }
9709 }
9710}
9711
9712#[derive(Debug, Clone)]
9713pub struct WlanSoftmacIfcBridgeControlHandle {
9714 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9715}
9716
9717impl fidl::endpoints::ControlHandle for WlanSoftmacIfcBridgeControlHandle {
9718 fn shutdown(&self) {
9719 self.inner.shutdown()
9720 }
9721
9722 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
9723 self.inner.shutdown_with_epitaph(status)
9724 }
9725
9726 fn is_closed(&self) -> bool {
9727 self.inner.channel().is_closed()
9728 }
9729 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
9730 self.inner.channel().on_closed()
9731 }
9732
9733 #[cfg(target_os = "fuchsia")]
9734 fn signal_peer(
9735 &self,
9736 clear_mask: zx::Signals,
9737 set_mask: zx::Signals,
9738 ) -> Result<(), zx_status::Status> {
9739 use fidl::Peered;
9740 self.inner.channel().signal_peer(clear_mask, set_mask)
9741 }
9742}
9743
9744impl WlanSoftmacIfcBridgeControlHandle {}
9745
9746#[must_use = "FIDL methods require a response to be sent"]
9747#[derive(Debug)]
9748pub struct WlanSoftmacIfcBridgeReportTxResultResponder {
9749 control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
9750 tx_id: u32,
9751}
9752
9753impl std::ops::Drop for WlanSoftmacIfcBridgeReportTxResultResponder {
9757 fn drop(&mut self) {
9758 self.control_handle.shutdown();
9759 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9761 }
9762}
9763
9764impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeReportTxResultResponder {
9765 type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
9766
9767 fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
9768 &self.control_handle
9769 }
9770
9771 fn drop_without_shutdown(mut self) {
9772 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9774 std::mem::forget(self);
9776 }
9777}
9778
9779impl WlanSoftmacIfcBridgeReportTxResultResponder {
9780 pub fn send(self) -> Result<(), fidl::Error> {
9784 let _result = self.send_raw();
9785 if _result.is_err() {
9786 self.control_handle.shutdown();
9787 }
9788 self.drop_without_shutdown();
9789 _result
9790 }
9791
9792 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
9794 let _result = self.send_raw();
9795 self.drop_without_shutdown();
9796 _result
9797 }
9798
9799 fn send_raw(&self) -> Result<(), fidl::Error> {
9800 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
9801 (),
9802 self.tx_id,
9803 0x5835c2f13d94e09a,
9804 fidl::encoding::DynamicFlags::empty(),
9805 )
9806 }
9807}
9808
9809#[must_use = "FIDL methods require a response to be sent"]
9810#[derive(Debug)]
9811pub struct WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
9812 control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
9813 tx_id: u32,
9814}
9815
9816impl std::ops::Drop for WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
9820 fn drop(&mut self) {
9821 self.control_handle.shutdown();
9822 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9824 }
9825}
9826
9827impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
9828 type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
9829
9830 fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
9831 &self.control_handle
9832 }
9833
9834 fn drop_without_shutdown(mut self) {
9835 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9837 std::mem::forget(self);
9839 }
9840}
9841
9842impl WlanSoftmacIfcBridgeNotifyScanCompleteResponder {
9843 pub fn send(self) -> Result<(), fidl::Error> {
9847 let _result = self.send_raw();
9848 if _result.is_err() {
9849 self.control_handle.shutdown();
9850 }
9851 self.drop_without_shutdown();
9852 _result
9853 }
9854
9855 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
9857 let _result = self.send_raw();
9858 self.drop_without_shutdown();
9859 _result
9860 }
9861
9862 fn send_raw(&self) -> Result<(), fidl::Error> {
9863 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
9864 (),
9865 self.tx_id,
9866 0x7045e3cd460dc42c,
9867 fidl::encoding::DynamicFlags::empty(),
9868 )
9869 }
9870}
9871
9872#[must_use = "FIDL methods require a response to be sent"]
9873#[derive(Debug)]
9874pub struct WlanSoftmacIfcBridgeStopBridgedDriverResponder {
9875 control_handle: std::mem::ManuallyDrop<WlanSoftmacIfcBridgeControlHandle>,
9876 tx_id: u32,
9877}
9878
9879impl std::ops::Drop for WlanSoftmacIfcBridgeStopBridgedDriverResponder {
9883 fn drop(&mut self) {
9884 self.control_handle.shutdown();
9885 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9887 }
9888}
9889
9890impl fidl::endpoints::Responder for WlanSoftmacIfcBridgeStopBridgedDriverResponder {
9891 type ControlHandle = WlanSoftmacIfcBridgeControlHandle;
9892
9893 fn control_handle(&self) -> &WlanSoftmacIfcBridgeControlHandle {
9894 &self.control_handle
9895 }
9896
9897 fn drop_without_shutdown(mut self) {
9898 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9900 std::mem::forget(self);
9902 }
9903}
9904
9905impl WlanSoftmacIfcBridgeStopBridgedDriverResponder {
9906 pub fn send(self) -> Result<(), fidl::Error> {
9910 let _result = self.send_raw();
9911 if _result.is_err() {
9912 self.control_handle.shutdown();
9913 }
9914 self.drop_without_shutdown();
9915 _result
9916 }
9917
9918 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
9920 let _result = self.send_raw();
9921 self.drop_without_shutdown();
9922 _result
9923 }
9924
9925 fn send_raw(&self) -> Result<(), fidl::Error> {
9926 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
9927 (),
9928 self.tx_id,
9929 0x112dbd0cc2251151,
9930 fidl::encoding::DynamicFlags::empty(),
9931 )
9932 }
9933}
9934
9935#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
9936pub struct WlanTxMarker;
9937
9938impl fidl::endpoints::ProtocolMarker for WlanTxMarker {
9939 type Proxy = WlanTxProxy;
9940 type RequestStream = WlanTxRequestStream;
9941 #[cfg(target_os = "fuchsia")]
9942 type SynchronousProxy = WlanTxSynchronousProxy;
9943
9944 const DEBUG_NAME: &'static str = "(anonymous) WlanTx";
9945}
9946pub type WlanTxTransferResult = Result<(), i32>;
9947
9948pub trait WlanTxProxyInterface: Send + Sync {
9949 type TransferResponseFut: std::future::Future<Output = Result<WlanTxTransferResult, fidl::Error>>
9950 + Send;
9951 fn r#transfer(&self, payload: &WlanTxTransferRequest) -> Self::TransferResponseFut;
9952}
9953#[derive(Debug)]
9954#[cfg(target_os = "fuchsia")]
9955pub struct WlanTxSynchronousProxy {
9956 client: fidl::client::sync::Client,
9957}
9958
9959#[cfg(target_os = "fuchsia")]
9960impl fidl::endpoints::SynchronousProxy for WlanTxSynchronousProxy {
9961 type Proxy = WlanTxProxy;
9962 type Protocol = WlanTxMarker;
9963
9964 fn from_channel(inner: fidl::Channel) -> Self {
9965 Self::new(inner)
9966 }
9967
9968 fn into_channel(self) -> fidl::Channel {
9969 self.client.into_channel()
9970 }
9971
9972 fn as_channel(&self) -> &fidl::Channel {
9973 self.client.as_channel()
9974 }
9975}
9976
9977#[cfg(target_os = "fuchsia")]
9978impl WlanTxSynchronousProxy {
9979 pub fn new(channel: fidl::Channel) -> Self {
9980 Self { client: fidl::client::sync::Client::new(channel) }
9981 }
9982
9983 pub fn into_channel(self) -> fidl::Channel {
9984 self.client.into_channel()
9985 }
9986
9987 pub fn wait_for_event(
9990 &self,
9991 deadline: zx::MonotonicInstant,
9992 ) -> Result<WlanTxEvent, fidl::Error> {
9993 WlanTxEvent::decode(self.client.wait_for_event::<WlanTxMarker>(deadline)?)
9994 }
9995
9996 pub fn r#transfer(
9997 &self,
9998 mut payload: &WlanTxTransferRequest,
9999 ___deadline: zx::MonotonicInstant,
10000 ) -> Result<WlanTxTransferResult, fidl::Error> {
10001 let _response = self.client.send_query::<
10002 WlanTxTransferRequest,
10003 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
10004 WlanTxMarker,
10005 >(
10006 payload,
10007 0x19f8ff7a8b910ab3,
10008 fidl::encoding::DynamicFlags::empty(),
10009 ___deadline,
10010 )?;
10011 Ok(_response.map(|x| x))
10012 }
10013}
10014
10015#[cfg(target_os = "fuchsia")]
10016impl From<WlanTxSynchronousProxy> for zx::NullableHandle {
10017 fn from(value: WlanTxSynchronousProxy) -> Self {
10018 value.into_channel().into()
10019 }
10020}
10021
10022#[cfg(target_os = "fuchsia")]
10023impl From<fidl::Channel> for WlanTxSynchronousProxy {
10024 fn from(value: fidl::Channel) -> Self {
10025 Self::new(value)
10026 }
10027}
10028
10029#[cfg(target_os = "fuchsia")]
10030impl fidl::endpoints::FromClient for WlanTxSynchronousProxy {
10031 type Protocol = WlanTxMarker;
10032
10033 fn from_client(value: fidl::endpoints::ClientEnd<WlanTxMarker>) -> Self {
10034 Self::new(value.into_channel())
10035 }
10036}
10037
10038#[derive(Debug, Clone)]
10039pub struct WlanTxProxy {
10040 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
10041}
10042
10043impl fidl::endpoints::Proxy for WlanTxProxy {
10044 type Protocol = WlanTxMarker;
10045
10046 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
10047 Self::new(inner)
10048 }
10049
10050 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
10051 self.client.into_channel().map_err(|client| Self { client })
10052 }
10053
10054 fn as_channel(&self) -> &::fidl::AsyncChannel {
10055 self.client.as_channel()
10056 }
10057}
10058
10059impl WlanTxProxy {
10060 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
10062 let protocol_name = <WlanTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
10063 Self { client: fidl::client::Client::new(channel, protocol_name) }
10064 }
10065
10066 pub fn take_event_stream(&self) -> WlanTxEventStream {
10072 WlanTxEventStream { event_receiver: self.client.take_event_receiver() }
10073 }
10074
10075 pub fn r#transfer(
10076 &self,
10077 mut payload: &WlanTxTransferRequest,
10078 ) -> fidl::client::QueryResponseFut<
10079 WlanTxTransferResult,
10080 fidl::encoding::DefaultFuchsiaResourceDialect,
10081 > {
10082 WlanTxProxyInterface::r#transfer(self, payload)
10083 }
10084}
10085
10086impl WlanTxProxyInterface for WlanTxProxy {
10087 type TransferResponseFut = fidl::client::QueryResponseFut<
10088 WlanTxTransferResult,
10089 fidl::encoding::DefaultFuchsiaResourceDialect,
10090 >;
10091 fn r#transfer(&self, mut payload: &WlanTxTransferRequest) -> Self::TransferResponseFut {
10092 fn _decode(
10093 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
10094 ) -> Result<WlanTxTransferResult, fidl::Error> {
10095 let _response = fidl::client::decode_transaction_body::<
10096 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
10097 fidl::encoding::DefaultFuchsiaResourceDialect,
10098 0x19f8ff7a8b910ab3,
10099 >(_buf?)?;
10100 Ok(_response.map(|x| x))
10101 }
10102 self.client.send_query_and_decode::<WlanTxTransferRequest, WlanTxTransferResult>(
10103 payload,
10104 0x19f8ff7a8b910ab3,
10105 fidl::encoding::DynamicFlags::empty(),
10106 _decode,
10107 )
10108 }
10109}
10110
10111pub struct WlanTxEventStream {
10112 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
10113}
10114
10115impl std::marker::Unpin for WlanTxEventStream {}
10116
10117impl futures::stream::FusedStream for WlanTxEventStream {
10118 fn is_terminated(&self) -> bool {
10119 self.event_receiver.is_terminated()
10120 }
10121}
10122
10123impl futures::Stream for WlanTxEventStream {
10124 type Item = Result<WlanTxEvent, fidl::Error>;
10125
10126 fn poll_next(
10127 mut self: std::pin::Pin<&mut Self>,
10128 cx: &mut std::task::Context<'_>,
10129 ) -> std::task::Poll<Option<Self::Item>> {
10130 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
10131 &mut self.event_receiver,
10132 cx
10133 )?) {
10134 Some(buf) => std::task::Poll::Ready(Some(WlanTxEvent::decode(buf))),
10135 None => std::task::Poll::Ready(None),
10136 }
10137 }
10138}
10139
10140#[derive(Debug)]
10141pub enum WlanTxEvent {}
10142
10143impl WlanTxEvent {
10144 fn decode(
10146 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
10147 ) -> Result<WlanTxEvent, fidl::Error> {
10148 let (bytes, _handles) = buf.split_mut();
10149 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10150 debug_assert_eq!(tx_header.tx_id, 0);
10151 match tx_header.ordinal {
10152 _ => Err(fidl::Error::UnknownOrdinal {
10153 ordinal: tx_header.ordinal,
10154 protocol_name: <WlanTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
10155 }),
10156 }
10157 }
10158}
10159
10160pub struct WlanTxRequestStream {
10162 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10163 is_terminated: bool,
10164}
10165
10166impl std::marker::Unpin for WlanTxRequestStream {}
10167
10168impl futures::stream::FusedStream for WlanTxRequestStream {
10169 fn is_terminated(&self) -> bool {
10170 self.is_terminated
10171 }
10172}
10173
10174impl fidl::endpoints::RequestStream for WlanTxRequestStream {
10175 type Protocol = WlanTxMarker;
10176 type ControlHandle = WlanTxControlHandle;
10177
10178 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
10179 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
10180 }
10181
10182 fn control_handle(&self) -> Self::ControlHandle {
10183 WlanTxControlHandle { inner: self.inner.clone() }
10184 }
10185
10186 fn into_inner(
10187 self,
10188 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
10189 {
10190 (self.inner, self.is_terminated)
10191 }
10192
10193 fn from_inner(
10194 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10195 is_terminated: bool,
10196 ) -> Self {
10197 Self { inner, is_terminated }
10198 }
10199}
10200
10201impl futures::Stream for WlanTxRequestStream {
10202 type Item = Result<WlanTxRequest, fidl::Error>;
10203
10204 fn poll_next(
10205 mut self: std::pin::Pin<&mut Self>,
10206 cx: &mut std::task::Context<'_>,
10207 ) -> std::task::Poll<Option<Self::Item>> {
10208 let this = &mut *self;
10209 if this.inner.check_shutdown(cx) {
10210 this.is_terminated = true;
10211 return std::task::Poll::Ready(None);
10212 }
10213 if this.is_terminated {
10214 panic!("polled WlanTxRequestStream after completion");
10215 }
10216 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
10217 |bytes, handles| {
10218 match this.inner.channel().read_etc(cx, bytes, handles) {
10219 std::task::Poll::Ready(Ok(())) => {}
10220 std::task::Poll::Pending => return std::task::Poll::Pending,
10221 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
10222 this.is_terminated = true;
10223 return std::task::Poll::Ready(None);
10224 }
10225 std::task::Poll::Ready(Err(e)) => {
10226 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10227 e.into(),
10228 ))));
10229 }
10230 }
10231
10232 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10234
10235 std::task::Poll::Ready(Some(match header.ordinal {
10236 0x19f8ff7a8b910ab3 => {
10237 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
10238 let mut req = fidl::new_empty!(
10239 WlanTxTransferRequest,
10240 fidl::encoding::DefaultFuchsiaResourceDialect
10241 );
10242 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WlanTxTransferRequest>(&header, _body_bytes, handles, &mut req)?;
10243 let control_handle = WlanTxControlHandle { inner: this.inner.clone() };
10244 Ok(WlanTxRequest::Transfer {
10245 payload: req,
10246 responder: WlanTxTransferResponder {
10247 control_handle: std::mem::ManuallyDrop::new(control_handle),
10248 tx_id: header.tx_id,
10249 },
10250 })
10251 }
10252 _ => Err(fidl::Error::UnknownOrdinal {
10253 ordinal: header.ordinal,
10254 protocol_name:
10255 <WlanTxMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
10256 }),
10257 }))
10258 },
10259 )
10260 }
10261}
10262
10263#[derive(Debug)]
10272pub enum WlanTxRequest {
10273 Transfer { payload: WlanTxTransferRequest, responder: WlanTxTransferResponder },
10274}
10275
10276impl WlanTxRequest {
10277 #[allow(irrefutable_let_patterns)]
10278 pub fn into_transfer(self) -> Option<(WlanTxTransferRequest, WlanTxTransferResponder)> {
10279 if let WlanTxRequest::Transfer { payload, responder } = self {
10280 Some((payload, responder))
10281 } else {
10282 None
10283 }
10284 }
10285
10286 pub fn method_name(&self) -> &'static str {
10288 match *self {
10289 WlanTxRequest::Transfer { .. } => "transfer",
10290 }
10291 }
10292}
10293
10294#[derive(Debug, Clone)]
10295pub struct WlanTxControlHandle {
10296 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10297}
10298
10299impl fidl::endpoints::ControlHandle for WlanTxControlHandle {
10300 fn shutdown(&self) {
10301 self.inner.shutdown()
10302 }
10303
10304 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10305 self.inner.shutdown_with_epitaph(status)
10306 }
10307
10308 fn is_closed(&self) -> bool {
10309 self.inner.channel().is_closed()
10310 }
10311 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10312 self.inner.channel().on_closed()
10313 }
10314
10315 #[cfg(target_os = "fuchsia")]
10316 fn signal_peer(
10317 &self,
10318 clear_mask: zx::Signals,
10319 set_mask: zx::Signals,
10320 ) -> Result<(), zx_status::Status> {
10321 use fidl::Peered;
10322 self.inner.channel().signal_peer(clear_mask, set_mask)
10323 }
10324}
10325
10326impl WlanTxControlHandle {}
10327
10328#[must_use = "FIDL methods require a response to be sent"]
10329#[derive(Debug)]
10330pub struct WlanTxTransferResponder {
10331 control_handle: std::mem::ManuallyDrop<WlanTxControlHandle>,
10332 tx_id: u32,
10333}
10334
10335impl std::ops::Drop for WlanTxTransferResponder {
10339 fn drop(&mut self) {
10340 self.control_handle.shutdown();
10341 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10343 }
10344}
10345
10346impl fidl::endpoints::Responder for WlanTxTransferResponder {
10347 type ControlHandle = WlanTxControlHandle;
10348
10349 fn control_handle(&self) -> &WlanTxControlHandle {
10350 &self.control_handle
10351 }
10352
10353 fn drop_without_shutdown(mut self) {
10354 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10356 std::mem::forget(self);
10358 }
10359}
10360
10361impl WlanTxTransferResponder {
10362 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10366 let _result = self.send_raw(result);
10367 if _result.is_err() {
10368 self.control_handle.shutdown();
10369 }
10370 self.drop_without_shutdown();
10371 _result
10372 }
10373
10374 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10376 let _result = self.send_raw(result);
10377 self.drop_without_shutdown();
10378 _result
10379 }
10380
10381 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10382 self.control_handle
10383 .inner
10384 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10385 result,
10386 self.tx_id,
10387 0x19f8ff7a8b910ab3,
10388 fidl::encoding::DynamicFlags::empty(),
10389 )
10390 }
10391}
10392
10393mod internal {
10394 use super::*;
10395
10396 impl fidl::encoding::ResourceTypeMarker for WlanSoftmacBridgeStartRequest {
10397 type Borrowed<'a> = &'a mut Self;
10398 fn take_or_borrow<'a>(
10399 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10400 ) -> Self::Borrowed<'a> {
10401 value
10402 }
10403 }
10404
10405 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBridgeStartRequest {
10406 type Owned = Self;
10407
10408 #[inline(always)]
10409 fn inline_align(_context: fidl::encoding::Context) -> usize {
10410 8
10411 }
10412
10413 #[inline(always)]
10414 fn inline_size(_context: fidl::encoding::Context) -> usize {
10415 24
10416 }
10417 }
10418
10419 unsafe impl
10420 fidl::encoding::Encode<
10421 WlanSoftmacBridgeStartRequest,
10422 fidl::encoding::DefaultFuchsiaResourceDialect,
10423 > for &mut WlanSoftmacBridgeStartRequest
10424 {
10425 #[inline]
10426 unsafe fn encode(
10427 self,
10428 encoder: &mut fidl::encoding::Encoder<
10429 '_,
10430 fidl::encoding::DefaultFuchsiaResourceDialect,
10431 >,
10432 offset: usize,
10433 _depth: fidl::encoding::Depth,
10434 ) -> fidl::Result<()> {
10435 encoder.debug_check_bounds::<WlanSoftmacBridgeStartRequest>(offset);
10436 fidl::encoding::Encode::<
10438 WlanSoftmacBridgeStartRequest,
10439 fidl::encoding::DefaultFuchsiaResourceDialect,
10440 >::encode(
10441 (
10442 <fidl::encoding::Endpoint<
10443 fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
10444 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10445 &mut self.ifc_bridge
10446 ),
10447 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.ethernet_tx),
10448 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.wlan_rx),
10449 ),
10450 encoder,
10451 offset,
10452 _depth,
10453 )
10454 }
10455 }
10456 unsafe impl<
10457 T0: fidl::encoding::Encode<
10458 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>>,
10459 fidl::encoding::DefaultFuchsiaResourceDialect,
10460 >,
10461 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
10462 T2: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
10463 >
10464 fidl::encoding::Encode<
10465 WlanSoftmacBridgeStartRequest,
10466 fidl::encoding::DefaultFuchsiaResourceDialect,
10467 > for (T0, T1, T2)
10468 {
10469 #[inline]
10470 unsafe fn encode(
10471 self,
10472 encoder: &mut fidl::encoding::Encoder<
10473 '_,
10474 fidl::encoding::DefaultFuchsiaResourceDialect,
10475 >,
10476 offset: usize,
10477 depth: fidl::encoding::Depth,
10478 ) -> fidl::Result<()> {
10479 encoder.debug_check_bounds::<WlanSoftmacBridgeStartRequest>(offset);
10480 unsafe {
10483 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10484 (ptr as *mut u64).write_unaligned(0);
10485 }
10486 self.0.encode(encoder, offset + 0, depth)?;
10488 self.1.encode(encoder, offset + 8, depth)?;
10489 self.2.encode(encoder, offset + 16, depth)?;
10490 Ok(())
10491 }
10492 }
10493
10494 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10495 for WlanSoftmacBridgeStartRequest
10496 {
10497 #[inline(always)]
10498 fn new_empty() -> Self {
10499 Self {
10500 ifc_bridge: fidl::new_empty!(
10501 fidl::encoding::Endpoint<
10502 fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>,
10503 >,
10504 fidl::encoding::DefaultFuchsiaResourceDialect
10505 ),
10506 ethernet_tx: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
10507 wlan_rx: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
10508 }
10509 }
10510
10511 #[inline]
10512 unsafe fn decode(
10513 &mut self,
10514 decoder: &mut fidl::encoding::Decoder<
10515 '_,
10516 fidl::encoding::DefaultFuchsiaResourceDialect,
10517 >,
10518 offset: usize,
10519 _depth: fidl::encoding::Depth,
10520 ) -> fidl::Result<()> {
10521 decoder.debug_check_bounds::<Self>(offset);
10522 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10524 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10525 let mask = 0xffffffff00000000u64;
10526 let maskedval = padval & mask;
10527 if maskedval != 0 {
10528 return Err(fidl::Error::NonZeroPadding {
10529 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10530 });
10531 }
10532 fidl::decode!(
10533 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<WlanSoftmacIfcBridgeMarker>>,
10534 fidl::encoding::DefaultFuchsiaResourceDialect,
10535 &mut self.ifc_bridge,
10536 decoder,
10537 offset + 0,
10538 _depth
10539 )?;
10540 fidl::decode!(
10541 u64,
10542 fidl::encoding::DefaultFuchsiaResourceDialect,
10543 &mut self.ethernet_tx,
10544 decoder,
10545 offset + 8,
10546 _depth
10547 )?;
10548 fidl::decode!(
10549 u64,
10550 fidl::encoding::DefaultFuchsiaResourceDialect,
10551 &mut self.wlan_rx,
10552 decoder,
10553 offset + 16,
10554 _depth
10555 )?;
10556 Ok(())
10557 }
10558 }
10559
10560 impl fidl::encoding::ResourceTypeMarker for WlanSoftmacBridgeStartResponse {
10561 type Borrowed<'a> = &'a mut Self;
10562 fn take_or_borrow<'a>(
10563 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10564 ) -> Self::Borrowed<'a> {
10565 value
10566 }
10567 }
10568
10569 unsafe impl fidl::encoding::TypeMarker for WlanSoftmacBridgeStartResponse {
10570 type Owned = Self;
10571
10572 #[inline(always)]
10573 fn inline_align(_context: fidl::encoding::Context) -> usize {
10574 4
10575 }
10576
10577 #[inline(always)]
10578 fn inline_size(_context: fidl::encoding::Context) -> usize {
10579 4
10580 }
10581 }
10582
10583 unsafe impl
10584 fidl::encoding::Encode<
10585 WlanSoftmacBridgeStartResponse,
10586 fidl::encoding::DefaultFuchsiaResourceDialect,
10587 > for &mut WlanSoftmacBridgeStartResponse
10588 {
10589 #[inline]
10590 unsafe fn encode(
10591 self,
10592 encoder: &mut fidl::encoding::Encoder<
10593 '_,
10594 fidl::encoding::DefaultFuchsiaResourceDialect,
10595 >,
10596 offset: usize,
10597 _depth: fidl::encoding::Depth,
10598 ) -> fidl::Result<()> {
10599 encoder.debug_check_bounds::<WlanSoftmacBridgeStartResponse>(offset);
10600 fidl::encoding::Encode::<
10602 WlanSoftmacBridgeStartResponse,
10603 fidl::encoding::DefaultFuchsiaResourceDialect,
10604 >::encode(
10605 (<fidl::encoding::HandleType<
10606 fidl::Channel,
10607 { fidl::ObjectType::CHANNEL.into_raw() },
10608 2147483648,
10609 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10610 &mut self.sme_channel
10611 ),),
10612 encoder,
10613 offset,
10614 _depth,
10615 )
10616 }
10617 }
10618 unsafe impl<
10619 T0: fidl::encoding::Encode<
10620 fidl::encoding::HandleType<
10621 fidl::Channel,
10622 { fidl::ObjectType::CHANNEL.into_raw() },
10623 2147483648,
10624 >,
10625 fidl::encoding::DefaultFuchsiaResourceDialect,
10626 >,
10627 >
10628 fidl::encoding::Encode<
10629 WlanSoftmacBridgeStartResponse,
10630 fidl::encoding::DefaultFuchsiaResourceDialect,
10631 > for (T0,)
10632 {
10633 #[inline]
10634 unsafe fn encode(
10635 self,
10636 encoder: &mut fidl::encoding::Encoder<
10637 '_,
10638 fidl::encoding::DefaultFuchsiaResourceDialect,
10639 >,
10640 offset: usize,
10641 depth: fidl::encoding::Depth,
10642 ) -> fidl::Result<()> {
10643 encoder.debug_check_bounds::<WlanSoftmacBridgeStartResponse>(offset);
10644 self.0.encode(encoder, offset + 0, depth)?;
10648 Ok(())
10649 }
10650 }
10651
10652 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10653 for WlanSoftmacBridgeStartResponse
10654 {
10655 #[inline(always)]
10656 fn new_empty() -> Self {
10657 Self {
10658 sme_channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10659 }
10660 }
10661
10662 #[inline]
10663 unsafe fn decode(
10664 &mut self,
10665 decoder: &mut fidl::encoding::Decoder<
10666 '_,
10667 fidl::encoding::DefaultFuchsiaResourceDialect,
10668 >,
10669 offset: usize,
10670 _depth: fidl::encoding::Depth,
10671 ) -> fidl::Result<()> {
10672 decoder.debug_check_bounds::<Self>(offset);
10673 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.sme_channel, decoder, offset + 0, _depth)?;
10675 Ok(())
10676 }
10677 }
10678}