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_mlme_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct ConnectorConnectRequest {
16 pub request: fidl::endpoints::ServerEnd<MlmeMarker>,
17}
18
19impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ConnectorConnectRequest {}
20
21#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
22pub struct ConnectorMarker;
23
24impl fidl::endpoints::ProtocolMarker for ConnectorMarker {
25 type Proxy = ConnectorProxy;
26 type RequestStream = ConnectorRequestStream;
27 #[cfg(target_os = "fuchsia")]
28 type SynchronousProxy = ConnectorSynchronousProxy;
29
30 const DEBUG_NAME: &'static str = "(anonymous) Connector";
31}
32
33pub trait ConnectorProxyInterface: Send + Sync {
34 fn r#connect(&self, request: fidl::endpoints::ServerEnd<MlmeMarker>)
35 -> Result<(), fidl::Error>;
36}
37#[derive(Debug)]
38#[cfg(target_os = "fuchsia")]
39pub struct ConnectorSynchronousProxy {
40 client: fidl::client::sync::Client,
41}
42
43#[cfg(target_os = "fuchsia")]
44impl fidl::endpoints::SynchronousProxy for ConnectorSynchronousProxy {
45 type Proxy = ConnectorProxy;
46 type Protocol = ConnectorMarker;
47
48 fn from_channel(inner: fidl::Channel) -> Self {
49 Self::new(inner)
50 }
51
52 fn into_channel(self) -> fidl::Channel {
53 self.client.into_channel()
54 }
55
56 fn as_channel(&self) -> &fidl::Channel {
57 self.client.as_channel()
58 }
59}
60
61#[cfg(target_os = "fuchsia")]
62impl ConnectorSynchronousProxy {
63 pub fn new(channel: fidl::Channel) -> Self {
64 let protocol_name = <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
65 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
66 }
67
68 pub fn into_channel(self) -> fidl::Channel {
69 self.client.into_channel()
70 }
71
72 pub fn wait_for_event(
75 &self,
76 deadline: zx::MonotonicInstant,
77 ) -> Result<ConnectorEvent, fidl::Error> {
78 ConnectorEvent::decode(self.client.wait_for_event(deadline)?)
79 }
80
81 pub fn r#connect(
82 &self,
83 mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
84 ) -> Result<(), fidl::Error> {
85 self.client.send::<ConnectorConnectRequest>(
86 (request,),
87 0x42131859717af962,
88 fidl::encoding::DynamicFlags::empty(),
89 )
90 }
91}
92
93#[cfg(target_os = "fuchsia")]
94impl From<ConnectorSynchronousProxy> for zx::Handle {
95 fn from(value: ConnectorSynchronousProxy) -> Self {
96 value.into_channel().into()
97 }
98}
99
100#[cfg(target_os = "fuchsia")]
101impl From<fidl::Channel> for ConnectorSynchronousProxy {
102 fn from(value: fidl::Channel) -> Self {
103 Self::new(value)
104 }
105}
106
107#[derive(Debug, Clone)]
108pub struct ConnectorProxy {
109 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
110}
111
112impl fidl::endpoints::Proxy for ConnectorProxy {
113 type Protocol = ConnectorMarker;
114
115 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
116 Self::new(inner)
117 }
118
119 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
120 self.client.into_channel().map_err(|client| Self { client })
121 }
122
123 fn as_channel(&self) -> &::fidl::AsyncChannel {
124 self.client.as_channel()
125 }
126}
127
128impl ConnectorProxy {
129 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
131 let protocol_name = <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
132 Self { client: fidl::client::Client::new(channel, protocol_name) }
133 }
134
135 pub fn take_event_stream(&self) -> ConnectorEventStream {
141 ConnectorEventStream { event_receiver: self.client.take_event_receiver() }
142 }
143
144 pub fn r#connect(
145 &self,
146 mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
147 ) -> Result<(), fidl::Error> {
148 ConnectorProxyInterface::r#connect(self, request)
149 }
150}
151
152impl ConnectorProxyInterface for ConnectorProxy {
153 fn r#connect(
154 &self,
155 mut request: fidl::endpoints::ServerEnd<MlmeMarker>,
156 ) -> Result<(), fidl::Error> {
157 self.client.send::<ConnectorConnectRequest>(
158 (request,),
159 0x42131859717af962,
160 fidl::encoding::DynamicFlags::empty(),
161 )
162 }
163}
164
165pub struct ConnectorEventStream {
166 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
167}
168
169impl std::marker::Unpin for ConnectorEventStream {}
170
171impl futures::stream::FusedStream for ConnectorEventStream {
172 fn is_terminated(&self) -> bool {
173 self.event_receiver.is_terminated()
174 }
175}
176
177impl futures::Stream for ConnectorEventStream {
178 type Item = Result<ConnectorEvent, fidl::Error>;
179
180 fn poll_next(
181 mut self: std::pin::Pin<&mut Self>,
182 cx: &mut std::task::Context<'_>,
183 ) -> std::task::Poll<Option<Self::Item>> {
184 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
185 &mut self.event_receiver,
186 cx
187 )?) {
188 Some(buf) => std::task::Poll::Ready(Some(ConnectorEvent::decode(buf))),
189 None => std::task::Poll::Ready(None),
190 }
191 }
192}
193
194#[derive(Debug)]
195pub enum ConnectorEvent {}
196
197impl ConnectorEvent {
198 fn decode(
200 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
201 ) -> Result<ConnectorEvent, fidl::Error> {
202 let (bytes, _handles) = buf.split_mut();
203 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
204 debug_assert_eq!(tx_header.tx_id, 0);
205 match tx_header.ordinal {
206 _ => Err(fidl::Error::UnknownOrdinal {
207 ordinal: tx_header.ordinal,
208 protocol_name: <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
209 }),
210 }
211 }
212}
213
214pub struct ConnectorRequestStream {
216 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
217 is_terminated: bool,
218}
219
220impl std::marker::Unpin for ConnectorRequestStream {}
221
222impl futures::stream::FusedStream for ConnectorRequestStream {
223 fn is_terminated(&self) -> bool {
224 self.is_terminated
225 }
226}
227
228impl fidl::endpoints::RequestStream for ConnectorRequestStream {
229 type Protocol = ConnectorMarker;
230 type ControlHandle = ConnectorControlHandle;
231
232 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
233 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
234 }
235
236 fn control_handle(&self) -> Self::ControlHandle {
237 ConnectorControlHandle { inner: self.inner.clone() }
238 }
239
240 fn into_inner(
241 self,
242 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
243 {
244 (self.inner, self.is_terminated)
245 }
246
247 fn from_inner(
248 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
249 is_terminated: bool,
250 ) -> Self {
251 Self { inner, is_terminated }
252 }
253}
254
255impl futures::Stream for ConnectorRequestStream {
256 type Item = Result<ConnectorRequest, fidl::Error>;
257
258 fn poll_next(
259 mut self: std::pin::Pin<&mut Self>,
260 cx: &mut std::task::Context<'_>,
261 ) -> std::task::Poll<Option<Self::Item>> {
262 let this = &mut *self;
263 if this.inner.check_shutdown(cx) {
264 this.is_terminated = true;
265 return std::task::Poll::Ready(None);
266 }
267 if this.is_terminated {
268 panic!("polled ConnectorRequestStream after completion");
269 }
270 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
271 |bytes, handles| {
272 match this.inner.channel().read_etc(cx, bytes, handles) {
273 std::task::Poll::Ready(Ok(())) => {}
274 std::task::Poll::Pending => return std::task::Poll::Pending,
275 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
276 this.is_terminated = true;
277 return std::task::Poll::Ready(None);
278 }
279 std::task::Poll::Ready(Err(e)) => {
280 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
281 e.into(),
282 ))))
283 }
284 }
285
286 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
288
289 std::task::Poll::Ready(Some(match header.ordinal {
290 0x42131859717af962 => {
291 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
292 let mut req = fidl::new_empty!(
293 ConnectorConnectRequest,
294 fidl::encoding::DefaultFuchsiaResourceDialect
295 );
296 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectorConnectRequest>(&header, _body_bytes, handles, &mut req)?;
297 let control_handle = ConnectorControlHandle { inner: this.inner.clone() };
298 Ok(ConnectorRequest::Connect { request: req.request, control_handle })
299 }
300 _ => Err(fidl::Error::UnknownOrdinal {
301 ordinal: header.ordinal,
302 protocol_name:
303 <ConnectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
304 }),
305 }))
306 },
307 )
308 }
309}
310
311#[derive(Debug)]
313pub enum ConnectorRequest {
314 Connect {
315 request: fidl::endpoints::ServerEnd<MlmeMarker>,
316 control_handle: ConnectorControlHandle,
317 },
318}
319
320impl ConnectorRequest {
321 #[allow(irrefutable_let_patterns)]
322 pub fn into_connect(
323 self,
324 ) -> Option<(fidl::endpoints::ServerEnd<MlmeMarker>, ConnectorControlHandle)> {
325 if let ConnectorRequest::Connect { request, control_handle } = self {
326 Some((request, control_handle))
327 } else {
328 None
329 }
330 }
331
332 pub fn method_name(&self) -> &'static str {
334 match *self {
335 ConnectorRequest::Connect { .. } => "connect",
336 }
337 }
338}
339
340#[derive(Debug, Clone)]
341pub struct ConnectorControlHandle {
342 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
343}
344
345impl fidl::endpoints::ControlHandle for ConnectorControlHandle {
346 fn shutdown(&self) {
347 self.inner.shutdown()
348 }
349 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
350 self.inner.shutdown_with_epitaph(status)
351 }
352
353 fn is_closed(&self) -> bool {
354 self.inner.channel().is_closed()
355 }
356 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
357 self.inner.channel().on_closed()
358 }
359
360 #[cfg(target_os = "fuchsia")]
361 fn signal_peer(
362 &self,
363 clear_mask: zx::Signals,
364 set_mask: zx::Signals,
365 ) -> Result<(), zx_status::Status> {
366 use fidl::Peered;
367 self.inner.channel().signal_peer(clear_mask, set_mask)
368 }
369}
370
371impl ConnectorControlHandle {}
372
373#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
374pub struct MlmeMarker;
375
376impl fidl::endpoints::ProtocolMarker for MlmeMarker {
377 type Proxy = MlmeProxy;
378 type RequestStream = MlmeRequestStream;
379 #[cfg(target_os = "fuchsia")]
380 type SynchronousProxy = MlmeSynchronousProxy;
381
382 const DEBUG_NAME: &'static str = "(anonymous) Mlme";
383}
384pub type MlmeQueryTelemetrySupportResult = Result<fidl_fuchsia_wlan_stats::TelemetrySupport, i32>;
385
386pub trait MlmeProxyInterface: Send + Sync {
387 fn r#start_scan(&self, req: &ScanRequest) -> Result<(), fidl::Error>;
388 fn r#connect_req(&self, req: &ConnectRequest) -> Result<(), fidl::Error>;
389 fn r#reconnect_req(&self, req: &ReconnectRequest) -> Result<(), fidl::Error>;
390 fn r#roam_req(&self, req: &RoamRequest) -> Result<(), fidl::Error>;
391 fn r#authenticate_resp(&self, resp: &AuthenticateResponse) -> Result<(), fidl::Error>;
392 fn r#deauthenticate_req(&self, req: &DeauthenticateRequest) -> Result<(), fidl::Error>;
393 fn r#associate_resp(&self, resp: &AssociateResponse) -> Result<(), fidl::Error>;
394 fn r#disassociate_req(&self, req: &DisassociateRequest) -> Result<(), fidl::Error>;
395 fn r#reset_req(&self, req: &ResetRequest) -> Result<(), fidl::Error>;
396 fn r#start_req(&self, req: &StartRequest) -> Result<(), fidl::Error>;
397 fn r#stop_req(&self, req: &StopRequest) -> Result<(), fidl::Error>;
398 fn r#set_keys_req(&self, req: &SetKeysRequest) -> Result<(), fidl::Error>;
399 fn r#delete_keys_req(&self, req: &DeleteKeysRequest) -> Result<(), fidl::Error>;
400 fn r#eapol_req(&self, req: &EapolRequest) -> Result<(), fidl::Error>;
401 fn r#set_controlled_port(&self, req: &SetControlledPortRequest) -> Result<(), fidl::Error>;
402 type QueryDeviceInfoResponseFut: std::future::Future<Output = Result<DeviceInfo, fidl::Error>>
403 + Send;
404 fn r#query_device_info(&self) -> Self::QueryDeviceInfoResponseFut;
405 type QueryTelemetrySupportResponseFut: std::future::Future<Output = Result<MlmeQueryTelemetrySupportResult, fidl::Error>>
406 + Send;
407 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut;
408 type GetIfaceStatsResponseFut: std::future::Future<Output = Result<GetIfaceStatsResponse, fidl::Error>>
409 + Send;
410 fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut;
411 type GetIfaceHistogramStatsResponseFut: std::future::Future<Output = Result<GetIfaceHistogramStatsResponse, fidl::Error>>
412 + Send;
413 fn r#get_iface_histogram_stats(&self) -> Self::GetIfaceHistogramStatsResponseFut;
414 type ListMinstrelPeersResponseFut: std::future::Future<Output = Result<MinstrelListResponse, fidl::Error>>
415 + Send;
416 fn r#list_minstrel_peers(&self) -> Self::ListMinstrelPeersResponseFut;
417 type GetMinstrelStatsResponseFut: std::future::Future<Output = Result<MinstrelStatsResponse, fidl::Error>>
418 + Send;
419 fn r#get_minstrel_stats(&self, req: &MinstrelStatsRequest)
420 -> Self::GetMinstrelStatsResponseFut;
421 type StartCaptureFramesResponseFut: std::future::Future<Output = Result<StartCaptureFramesResponse, fidl::Error>>
422 + Send;
423 fn r#start_capture_frames(
424 &self,
425 req: &StartCaptureFramesRequest,
426 ) -> Self::StartCaptureFramesResponseFut;
427 fn r#stop_capture_frames(&self) -> Result<(), fidl::Error>;
428 fn r#sae_handshake_resp(&self, resp: &SaeHandshakeResponse) -> Result<(), fidl::Error>;
429 fn r#sae_frame_tx(&self, frame: &SaeFrame) -> Result<(), fidl::Error>;
430 fn r#wmm_status_req(&self) -> Result<(), fidl::Error>;
431 fn r#finalize_association_req(
432 &self,
433 negotiated_capabilities: &NegotiatedCapabilities,
434 ) -> Result<(), fidl::Error>;
435}
436#[derive(Debug)]
437#[cfg(target_os = "fuchsia")]
438pub struct MlmeSynchronousProxy {
439 client: fidl::client::sync::Client,
440}
441
442#[cfg(target_os = "fuchsia")]
443impl fidl::endpoints::SynchronousProxy for MlmeSynchronousProxy {
444 type Proxy = MlmeProxy;
445 type Protocol = MlmeMarker;
446
447 fn from_channel(inner: fidl::Channel) -> Self {
448 Self::new(inner)
449 }
450
451 fn into_channel(self) -> fidl::Channel {
452 self.client.into_channel()
453 }
454
455 fn as_channel(&self) -> &fidl::Channel {
456 self.client.as_channel()
457 }
458}
459
460#[cfg(target_os = "fuchsia")]
461impl MlmeSynchronousProxy {
462 pub fn new(channel: fidl::Channel) -> Self {
463 let protocol_name = <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
464 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
465 }
466
467 pub fn into_channel(self) -> fidl::Channel {
468 self.client.into_channel()
469 }
470
471 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<MlmeEvent, fidl::Error> {
474 MlmeEvent::decode(self.client.wait_for_event(deadline)?)
475 }
476
477 pub fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
478 self.client.send::<MlmeStartScanRequest>(
479 (req,),
480 0x342cc5ec6a957479,
481 fidl::encoding::DynamicFlags::empty(),
482 )
483 }
484
485 pub fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
486 self.client.send::<MlmeConnectReqRequest>(
487 (req,),
488 0x31153dc85f8f64c,
489 fidl::encoding::DynamicFlags::empty(),
490 )
491 }
492
493 pub fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
494 self.client.send::<MlmeReconnectReqRequest>(
495 (req,),
496 0x74e0f1bd758b6b78,
497 fidl::encoding::DynamicFlags::empty(),
498 )
499 }
500
501 pub fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
503 self.client.send::<MlmeRoamReqRequest>(
504 (req,),
505 0x3ba163eadf7dba45,
506 fidl::encoding::DynamicFlags::empty(),
507 )
508 }
509
510 pub fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
511 self.client.send::<MlmeAuthenticateRespRequest>(
512 (resp,),
513 0x26108aade2fdd2f4,
514 fidl::encoding::DynamicFlags::empty(),
515 )
516 }
517
518 pub fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
519 self.client.send::<MlmeDeauthenticateReqRequest>(
520 (req,),
521 0x228983b200de5d12,
522 fidl::encoding::DynamicFlags::empty(),
523 )
524 }
525
526 pub fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
527 self.client.send::<MlmeAssociateRespRequest>(
528 (resp,),
529 0x70244dbd652ed6d9,
530 fidl::encoding::DynamicFlags::empty(),
531 )
532 }
533
534 pub fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
535 self.client.send::<MlmeDisassociateReqRequest>(
536 (req,),
537 0x5765807f1387d764,
538 fidl::encoding::DynamicFlags::empty(),
539 )
540 }
541
542 pub fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
543 self.client.send::<MlmeResetReqRequest>(
544 (req,),
545 0x780b98c58a286b9f,
546 fidl::encoding::DynamicFlags::empty(),
547 )
548 }
549
550 pub fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
551 self.client.send::<MlmeStartReqRequest>(
552 (req,),
553 0x5d95885f8053654,
554 fidl::encoding::DynamicFlags::empty(),
555 )
556 }
557
558 pub fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
559 self.client.send::<MlmeStopReqRequest>(
560 (req,),
561 0x27b9a2ab04a2c79f,
562 fidl::encoding::DynamicFlags::empty(),
563 )
564 }
565
566 pub fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
567 self.client.send::<MlmeSetKeysReqRequest>(
568 (req,),
569 0x6b30a07fd3a11a79,
570 fidl::encoding::DynamicFlags::empty(),
571 )
572 }
573
574 pub fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
575 self.client.send::<MlmeDeleteKeysReqRequest>(
576 (req,),
577 0x1e3524d20d190c8f,
578 fidl::encoding::DynamicFlags::empty(),
579 )
580 }
581
582 pub fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
583 self.client.send::<MlmeEapolReqRequest>(
584 (req,),
585 0xc3c096924704d4,
586 fidl::encoding::DynamicFlags::empty(),
587 )
588 }
589
590 pub fn r#set_controlled_port(
591 &self,
592 mut req: &SetControlledPortRequest,
593 ) -> Result<(), fidl::Error> {
594 self.client.send::<MlmeSetControlledPortRequest>(
595 (req,),
596 0x4e47065668890c8d,
597 fidl::encoding::DynamicFlags::empty(),
598 )
599 }
600
601 pub fn r#query_device_info(
602 &self,
603 ___deadline: zx::MonotonicInstant,
604 ) -> Result<DeviceInfo, fidl::Error> {
605 let _response =
606 self.client.send_query::<fidl::encoding::EmptyPayload, MlmeQueryDeviceInfoResponse>(
607 (),
608 0x6ee3e7f63f2b7bc0,
609 fidl::encoding::DynamicFlags::empty(),
610 ___deadline,
611 )?;
612 Ok(_response.info)
613 }
614
615 pub fn r#query_telemetry_support(
616 &self,
617 ___deadline: zx::MonotonicInstant,
618 ) -> Result<MlmeQueryTelemetrySupportResult, fidl::Error> {
619 let _response = self.client.send_query::<
620 fidl::encoding::EmptyPayload,
621 fidl::encoding::ResultType<MlmeQueryTelemetrySupportResponse, i32>,
622 >(
623 (),
624 0x1598879b70332c99,
625 fidl::encoding::DynamicFlags::empty(),
626 ___deadline,
627 )?;
628 Ok(_response.map(|x| x.resp))
629 }
630
631 pub fn r#get_iface_stats(
632 &self,
633 ___deadline: zx::MonotonicInstant,
634 ) -> Result<GetIfaceStatsResponse, fidl::Error> {
635 let _response =
636 self.client.send_query::<fidl::encoding::EmptyPayload, MlmeGetIfaceStatsResponse>(
637 (),
638 0xede1a8342d1b211,
639 fidl::encoding::DynamicFlags::empty(),
640 ___deadline,
641 )?;
642 Ok(_response.resp)
643 }
644
645 pub fn r#get_iface_histogram_stats(
646 &self,
647 ___deadline: zx::MonotonicInstant,
648 ) -> Result<GetIfaceHistogramStatsResponse, fidl::Error> {
649 let _response = self
650 .client
651 .send_query::<fidl::encoding::EmptyPayload, MlmeGetIfaceHistogramStatsResponse>(
652 (),
653 0x1979c9d3449f8675,
654 fidl::encoding::DynamicFlags::empty(),
655 ___deadline,
656 )?;
657 Ok(_response.resp)
658 }
659
660 pub fn r#list_minstrel_peers(
661 &self,
662 ___deadline: zx::MonotonicInstant,
663 ) -> Result<MinstrelListResponse, fidl::Error> {
664 let _response =
665 self.client.send_query::<fidl::encoding::EmptyPayload, MlmeListMinstrelPeersResponse>(
666 (),
667 0x4ac5d1e66fe1ffd5,
668 fidl::encoding::DynamicFlags::empty(),
669 ___deadline,
670 )?;
671 Ok(_response.resp)
672 }
673
674 pub fn r#get_minstrel_stats(
675 &self,
676 mut req: &MinstrelStatsRequest,
677 ___deadline: zx::MonotonicInstant,
678 ) -> Result<MinstrelStatsResponse, fidl::Error> {
679 let _response =
680 self.client.send_query::<MlmeGetMinstrelStatsRequest, MlmeGetMinstrelStatsResponse>(
681 (req,),
682 0x2f688b1245323f4b,
683 fidl::encoding::DynamicFlags::empty(),
684 ___deadline,
685 )?;
686 Ok(_response.resp)
687 }
688
689 pub fn r#start_capture_frames(
690 &self,
691 mut req: &StartCaptureFramesRequest,
692 ___deadline: zx::MonotonicInstant,
693 ) -> Result<StartCaptureFramesResponse, fidl::Error> {
694 let _response = self
695 .client
696 .send_query::<MlmeStartCaptureFramesRequest, MlmeStartCaptureFramesResponse>(
697 (req,),
698 0x23b369ed5749ee69,
699 fidl::encoding::DynamicFlags::empty(),
700 ___deadline,
701 )?;
702 Ok(_response.resp)
703 }
704
705 pub fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
706 self.client.send::<fidl::encoding::EmptyPayload>(
707 (),
708 0x2f1aebbc68bf7c54,
709 fidl::encoding::DynamicFlags::empty(),
710 )
711 }
712
713 pub fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
715 self.client.send::<MlmeSaeHandshakeRespRequest>(
716 (resp,),
717 0x28477bd2f7a5ab0c,
718 fidl::encoding::DynamicFlags::empty(),
719 )
720 }
721
722 pub fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
724 self.client.send::<MlmeSaeFrameTxRequest>(
725 (frame,),
726 0x7700c0d536733d8c,
727 fidl::encoding::DynamicFlags::empty(),
728 )
729 }
730
731 pub fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
732 self.client.send::<fidl::encoding::EmptyPayload>(
733 (),
734 0xef4851f6088fede,
735 fidl::encoding::DynamicFlags::empty(),
736 )
737 }
738
739 pub fn r#finalize_association_req(
740 &self,
741 mut negotiated_capabilities: &NegotiatedCapabilities,
742 ) -> Result<(), fidl::Error> {
743 self.client.send::<MlmeFinalizeAssociationReqRequest>(
744 (negotiated_capabilities,),
745 0x7aea59787cfd385a,
746 fidl::encoding::DynamicFlags::empty(),
747 )
748 }
749}
750
751#[cfg(target_os = "fuchsia")]
752impl From<MlmeSynchronousProxy> for zx::Handle {
753 fn from(value: MlmeSynchronousProxy) -> Self {
754 value.into_channel().into()
755 }
756}
757
758#[cfg(target_os = "fuchsia")]
759impl From<fidl::Channel> for MlmeSynchronousProxy {
760 fn from(value: fidl::Channel) -> Self {
761 Self::new(value)
762 }
763}
764
765#[derive(Debug, Clone)]
766pub struct MlmeProxy {
767 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
768}
769
770impl fidl::endpoints::Proxy for MlmeProxy {
771 type Protocol = MlmeMarker;
772
773 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
774 Self::new(inner)
775 }
776
777 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
778 self.client.into_channel().map_err(|client| Self { client })
779 }
780
781 fn as_channel(&self) -> &::fidl::AsyncChannel {
782 self.client.as_channel()
783 }
784}
785
786impl MlmeProxy {
787 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
789 let protocol_name = <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
790 Self { client: fidl::client::Client::new(channel, protocol_name) }
791 }
792
793 pub fn take_event_stream(&self) -> MlmeEventStream {
799 MlmeEventStream { event_receiver: self.client.take_event_receiver() }
800 }
801
802 pub fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
803 MlmeProxyInterface::r#start_scan(self, req)
804 }
805
806 pub fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
807 MlmeProxyInterface::r#connect_req(self, req)
808 }
809
810 pub fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
811 MlmeProxyInterface::r#reconnect_req(self, req)
812 }
813
814 pub fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
816 MlmeProxyInterface::r#roam_req(self, req)
817 }
818
819 pub fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
820 MlmeProxyInterface::r#authenticate_resp(self, resp)
821 }
822
823 pub fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
824 MlmeProxyInterface::r#deauthenticate_req(self, req)
825 }
826
827 pub fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
828 MlmeProxyInterface::r#associate_resp(self, resp)
829 }
830
831 pub fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
832 MlmeProxyInterface::r#disassociate_req(self, req)
833 }
834
835 pub fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
836 MlmeProxyInterface::r#reset_req(self, req)
837 }
838
839 pub fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
840 MlmeProxyInterface::r#start_req(self, req)
841 }
842
843 pub fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
844 MlmeProxyInterface::r#stop_req(self, req)
845 }
846
847 pub fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
848 MlmeProxyInterface::r#set_keys_req(self, req)
849 }
850
851 pub fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
852 MlmeProxyInterface::r#delete_keys_req(self, req)
853 }
854
855 pub fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
856 MlmeProxyInterface::r#eapol_req(self, req)
857 }
858
859 pub fn r#set_controlled_port(
860 &self,
861 mut req: &SetControlledPortRequest,
862 ) -> Result<(), fidl::Error> {
863 MlmeProxyInterface::r#set_controlled_port(self, req)
864 }
865
866 pub fn r#query_device_info(
867 &self,
868 ) -> fidl::client::QueryResponseFut<DeviceInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
869 {
870 MlmeProxyInterface::r#query_device_info(self)
871 }
872
873 pub fn r#query_telemetry_support(
874 &self,
875 ) -> fidl::client::QueryResponseFut<
876 MlmeQueryTelemetrySupportResult,
877 fidl::encoding::DefaultFuchsiaResourceDialect,
878 > {
879 MlmeProxyInterface::r#query_telemetry_support(self)
880 }
881
882 pub fn r#get_iface_stats(
883 &self,
884 ) -> fidl::client::QueryResponseFut<
885 GetIfaceStatsResponse,
886 fidl::encoding::DefaultFuchsiaResourceDialect,
887 > {
888 MlmeProxyInterface::r#get_iface_stats(self)
889 }
890
891 pub fn r#get_iface_histogram_stats(
892 &self,
893 ) -> fidl::client::QueryResponseFut<
894 GetIfaceHistogramStatsResponse,
895 fidl::encoding::DefaultFuchsiaResourceDialect,
896 > {
897 MlmeProxyInterface::r#get_iface_histogram_stats(self)
898 }
899
900 pub fn r#list_minstrel_peers(
901 &self,
902 ) -> fidl::client::QueryResponseFut<
903 MinstrelListResponse,
904 fidl::encoding::DefaultFuchsiaResourceDialect,
905 > {
906 MlmeProxyInterface::r#list_minstrel_peers(self)
907 }
908
909 pub fn r#get_minstrel_stats(
910 &self,
911 mut req: &MinstrelStatsRequest,
912 ) -> fidl::client::QueryResponseFut<
913 MinstrelStatsResponse,
914 fidl::encoding::DefaultFuchsiaResourceDialect,
915 > {
916 MlmeProxyInterface::r#get_minstrel_stats(self, req)
917 }
918
919 pub fn r#start_capture_frames(
920 &self,
921 mut req: &StartCaptureFramesRequest,
922 ) -> fidl::client::QueryResponseFut<
923 StartCaptureFramesResponse,
924 fidl::encoding::DefaultFuchsiaResourceDialect,
925 > {
926 MlmeProxyInterface::r#start_capture_frames(self, req)
927 }
928
929 pub fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
930 MlmeProxyInterface::r#stop_capture_frames(self)
931 }
932
933 pub fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
935 MlmeProxyInterface::r#sae_handshake_resp(self, resp)
936 }
937
938 pub fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
940 MlmeProxyInterface::r#sae_frame_tx(self, frame)
941 }
942
943 pub fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
944 MlmeProxyInterface::r#wmm_status_req(self)
945 }
946
947 pub fn r#finalize_association_req(
948 &self,
949 mut negotiated_capabilities: &NegotiatedCapabilities,
950 ) -> Result<(), fidl::Error> {
951 MlmeProxyInterface::r#finalize_association_req(self, negotiated_capabilities)
952 }
953}
954
955impl MlmeProxyInterface for MlmeProxy {
956 fn r#start_scan(&self, mut req: &ScanRequest) -> Result<(), fidl::Error> {
957 self.client.send::<MlmeStartScanRequest>(
958 (req,),
959 0x342cc5ec6a957479,
960 fidl::encoding::DynamicFlags::empty(),
961 )
962 }
963
964 fn r#connect_req(&self, mut req: &ConnectRequest) -> Result<(), fidl::Error> {
965 self.client.send::<MlmeConnectReqRequest>(
966 (req,),
967 0x31153dc85f8f64c,
968 fidl::encoding::DynamicFlags::empty(),
969 )
970 }
971
972 fn r#reconnect_req(&self, mut req: &ReconnectRequest) -> Result<(), fidl::Error> {
973 self.client.send::<MlmeReconnectReqRequest>(
974 (req,),
975 0x74e0f1bd758b6b78,
976 fidl::encoding::DynamicFlags::empty(),
977 )
978 }
979
980 fn r#roam_req(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
981 self.client.send::<MlmeRoamReqRequest>(
982 (req,),
983 0x3ba163eadf7dba45,
984 fidl::encoding::DynamicFlags::empty(),
985 )
986 }
987
988 fn r#authenticate_resp(&self, mut resp: &AuthenticateResponse) -> Result<(), fidl::Error> {
989 self.client.send::<MlmeAuthenticateRespRequest>(
990 (resp,),
991 0x26108aade2fdd2f4,
992 fidl::encoding::DynamicFlags::empty(),
993 )
994 }
995
996 fn r#deauthenticate_req(&self, mut req: &DeauthenticateRequest) -> Result<(), fidl::Error> {
997 self.client.send::<MlmeDeauthenticateReqRequest>(
998 (req,),
999 0x228983b200de5d12,
1000 fidl::encoding::DynamicFlags::empty(),
1001 )
1002 }
1003
1004 fn r#associate_resp(&self, mut resp: &AssociateResponse) -> Result<(), fidl::Error> {
1005 self.client.send::<MlmeAssociateRespRequest>(
1006 (resp,),
1007 0x70244dbd652ed6d9,
1008 fidl::encoding::DynamicFlags::empty(),
1009 )
1010 }
1011
1012 fn r#disassociate_req(&self, mut req: &DisassociateRequest) -> Result<(), fidl::Error> {
1013 self.client.send::<MlmeDisassociateReqRequest>(
1014 (req,),
1015 0x5765807f1387d764,
1016 fidl::encoding::DynamicFlags::empty(),
1017 )
1018 }
1019
1020 fn r#reset_req(&self, mut req: &ResetRequest) -> Result<(), fidl::Error> {
1021 self.client.send::<MlmeResetReqRequest>(
1022 (req,),
1023 0x780b98c58a286b9f,
1024 fidl::encoding::DynamicFlags::empty(),
1025 )
1026 }
1027
1028 fn r#start_req(&self, mut req: &StartRequest) -> Result<(), fidl::Error> {
1029 self.client.send::<MlmeStartReqRequest>(
1030 (req,),
1031 0x5d95885f8053654,
1032 fidl::encoding::DynamicFlags::empty(),
1033 )
1034 }
1035
1036 fn r#stop_req(&self, mut req: &StopRequest) -> Result<(), fidl::Error> {
1037 self.client.send::<MlmeStopReqRequest>(
1038 (req,),
1039 0x27b9a2ab04a2c79f,
1040 fidl::encoding::DynamicFlags::empty(),
1041 )
1042 }
1043
1044 fn r#set_keys_req(&self, mut req: &SetKeysRequest) -> Result<(), fidl::Error> {
1045 self.client.send::<MlmeSetKeysReqRequest>(
1046 (req,),
1047 0x6b30a07fd3a11a79,
1048 fidl::encoding::DynamicFlags::empty(),
1049 )
1050 }
1051
1052 fn r#delete_keys_req(&self, mut req: &DeleteKeysRequest) -> Result<(), fidl::Error> {
1053 self.client.send::<MlmeDeleteKeysReqRequest>(
1054 (req,),
1055 0x1e3524d20d190c8f,
1056 fidl::encoding::DynamicFlags::empty(),
1057 )
1058 }
1059
1060 fn r#eapol_req(&self, mut req: &EapolRequest) -> Result<(), fidl::Error> {
1061 self.client.send::<MlmeEapolReqRequest>(
1062 (req,),
1063 0xc3c096924704d4,
1064 fidl::encoding::DynamicFlags::empty(),
1065 )
1066 }
1067
1068 fn r#set_controlled_port(&self, mut req: &SetControlledPortRequest) -> Result<(), fidl::Error> {
1069 self.client.send::<MlmeSetControlledPortRequest>(
1070 (req,),
1071 0x4e47065668890c8d,
1072 fidl::encoding::DynamicFlags::empty(),
1073 )
1074 }
1075
1076 type QueryDeviceInfoResponseFut =
1077 fidl::client::QueryResponseFut<DeviceInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
1078 fn r#query_device_info(&self) -> Self::QueryDeviceInfoResponseFut {
1079 fn _decode(
1080 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1081 ) -> Result<DeviceInfo, fidl::Error> {
1082 let _response = fidl::client::decode_transaction_body::<
1083 MlmeQueryDeviceInfoResponse,
1084 fidl::encoding::DefaultFuchsiaResourceDialect,
1085 0x6ee3e7f63f2b7bc0,
1086 >(_buf?)?;
1087 Ok(_response.info)
1088 }
1089 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, DeviceInfo>(
1090 (),
1091 0x6ee3e7f63f2b7bc0,
1092 fidl::encoding::DynamicFlags::empty(),
1093 _decode,
1094 )
1095 }
1096
1097 type QueryTelemetrySupportResponseFut = fidl::client::QueryResponseFut<
1098 MlmeQueryTelemetrySupportResult,
1099 fidl::encoding::DefaultFuchsiaResourceDialect,
1100 >;
1101 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut {
1102 fn _decode(
1103 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1104 ) -> Result<MlmeQueryTelemetrySupportResult, fidl::Error> {
1105 let _response = fidl::client::decode_transaction_body::<
1106 fidl::encoding::ResultType<MlmeQueryTelemetrySupportResponse, i32>,
1107 fidl::encoding::DefaultFuchsiaResourceDialect,
1108 0x1598879b70332c99,
1109 >(_buf?)?;
1110 Ok(_response.map(|x| x.resp))
1111 }
1112 self.client
1113 .send_query_and_decode::<fidl::encoding::EmptyPayload, MlmeQueryTelemetrySupportResult>(
1114 (),
1115 0x1598879b70332c99,
1116 fidl::encoding::DynamicFlags::empty(),
1117 _decode,
1118 )
1119 }
1120
1121 type GetIfaceStatsResponseFut = fidl::client::QueryResponseFut<
1122 GetIfaceStatsResponse,
1123 fidl::encoding::DefaultFuchsiaResourceDialect,
1124 >;
1125 fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut {
1126 fn _decode(
1127 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1128 ) -> Result<GetIfaceStatsResponse, fidl::Error> {
1129 let _response = fidl::client::decode_transaction_body::<
1130 MlmeGetIfaceStatsResponse,
1131 fidl::encoding::DefaultFuchsiaResourceDialect,
1132 0xede1a8342d1b211,
1133 >(_buf?)?;
1134 Ok(_response.resp)
1135 }
1136 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, GetIfaceStatsResponse>(
1137 (),
1138 0xede1a8342d1b211,
1139 fidl::encoding::DynamicFlags::empty(),
1140 _decode,
1141 )
1142 }
1143
1144 type GetIfaceHistogramStatsResponseFut = fidl::client::QueryResponseFut<
1145 GetIfaceHistogramStatsResponse,
1146 fidl::encoding::DefaultFuchsiaResourceDialect,
1147 >;
1148 fn r#get_iface_histogram_stats(&self) -> Self::GetIfaceHistogramStatsResponseFut {
1149 fn _decode(
1150 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1151 ) -> Result<GetIfaceHistogramStatsResponse, fidl::Error> {
1152 let _response = fidl::client::decode_transaction_body::<
1153 MlmeGetIfaceHistogramStatsResponse,
1154 fidl::encoding::DefaultFuchsiaResourceDialect,
1155 0x1979c9d3449f8675,
1156 >(_buf?)?;
1157 Ok(_response.resp)
1158 }
1159 self.client
1160 .send_query_and_decode::<fidl::encoding::EmptyPayload, GetIfaceHistogramStatsResponse>(
1161 (),
1162 0x1979c9d3449f8675,
1163 fidl::encoding::DynamicFlags::empty(),
1164 _decode,
1165 )
1166 }
1167
1168 type ListMinstrelPeersResponseFut = fidl::client::QueryResponseFut<
1169 MinstrelListResponse,
1170 fidl::encoding::DefaultFuchsiaResourceDialect,
1171 >;
1172 fn r#list_minstrel_peers(&self) -> Self::ListMinstrelPeersResponseFut {
1173 fn _decode(
1174 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1175 ) -> Result<MinstrelListResponse, fidl::Error> {
1176 let _response = fidl::client::decode_transaction_body::<
1177 MlmeListMinstrelPeersResponse,
1178 fidl::encoding::DefaultFuchsiaResourceDialect,
1179 0x4ac5d1e66fe1ffd5,
1180 >(_buf?)?;
1181 Ok(_response.resp)
1182 }
1183 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, MinstrelListResponse>(
1184 (),
1185 0x4ac5d1e66fe1ffd5,
1186 fidl::encoding::DynamicFlags::empty(),
1187 _decode,
1188 )
1189 }
1190
1191 type GetMinstrelStatsResponseFut = fidl::client::QueryResponseFut<
1192 MinstrelStatsResponse,
1193 fidl::encoding::DefaultFuchsiaResourceDialect,
1194 >;
1195 fn r#get_minstrel_stats(
1196 &self,
1197 mut req: &MinstrelStatsRequest,
1198 ) -> Self::GetMinstrelStatsResponseFut {
1199 fn _decode(
1200 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1201 ) -> Result<MinstrelStatsResponse, fidl::Error> {
1202 let _response = fidl::client::decode_transaction_body::<
1203 MlmeGetMinstrelStatsResponse,
1204 fidl::encoding::DefaultFuchsiaResourceDialect,
1205 0x2f688b1245323f4b,
1206 >(_buf?)?;
1207 Ok(_response.resp)
1208 }
1209 self.client.send_query_and_decode::<MlmeGetMinstrelStatsRequest, MinstrelStatsResponse>(
1210 (req,),
1211 0x2f688b1245323f4b,
1212 fidl::encoding::DynamicFlags::empty(),
1213 _decode,
1214 )
1215 }
1216
1217 type StartCaptureFramesResponseFut = fidl::client::QueryResponseFut<
1218 StartCaptureFramesResponse,
1219 fidl::encoding::DefaultFuchsiaResourceDialect,
1220 >;
1221 fn r#start_capture_frames(
1222 &self,
1223 mut req: &StartCaptureFramesRequest,
1224 ) -> Self::StartCaptureFramesResponseFut {
1225 fn _decode(
1226 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1227 ) -> Result<StartCaptureFramesResponse, fidl::Error> {
1228 let _response = fidl::client::decode_transaction_body::<
1229 MlmeStartCaptureFramesResponse,
1230 fidl::encoding::DefaultFuchsiaResourceDialect,
1231 0x23b369ed5749ee69,
1232 >(_buf?)?;
1233 Ok(_response.resp)
1234 }
1235 self.client
1236 .send_query_and_decode::<MlmeStartCaptureFramesRequest, StartCaptureFramesResponse>(
1237 (req,),
1238 0x23b369ed5749ee69,
1239 fidl::encoding::DynamicFlags::empty(),
1240 _decode,
1241 )
1242 }
1243
1244 fn r#stop_capture_frames(&self) -> Result<(), fidl::Error> {
1245 self.client.send::<fidl::encoding::EmptyPayload>(
1246 (),
1247 0x2f1aebbc68bf7c54,
1248 fidl::encoding::DynamicFlags::empty(),
1249 )
1250 }
1251
1252 fn r#sae_handshake_resp(&self, mut resp: &SaeHandshakeResponse) -> Result<(), fidl::Error> {
1253 self.client.send::<MlmeSaeHandshakeRespRequest>(
1254 (resp,),
1255 0x28477bd2f7a5ab0c,
1256 fidl::encoding::DynamicFlags::empty(),
1257 )
1258 }
1259
1260 fn r#sae_frame_tx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
1261 self.client.send::<MlmeSaeFrameTxRequest>(
1262 (frame,),
1263 0x7700c0d536733d8c,
1264 fidl::encoding::DynamicFlags::empty(),
1265 )
1266 }
1267
1268 fn r#wmm_status_req(&self) -> Result<(), fidl::Error> {
1269 self.client.send::<fidl::encoding::EmptyPayload>(
1270 (),
1271 0xef4851f6088fede,
1272 fidl::encoding::DynamicFlags::empty(),
1273 )
1274 }
1275
1276 fn r#finalize_association_req(
1277 &self,
1278 mut negotiated_capabilities: &NegotiatedCapabilities,
1279 ) -> Result<(), fidl::Error> {
1280 self.client.send::<MlmeFinalizeAssociationReqRequest>(
1281 (negotiated_capabilities,),
1282 0x7aea59787cfd385a,
1283 fidl::encoding::DynamicFlags::empty(),
1284 )
1285 }
1286}
1287
1288pub struct MlmeEventStream {
1289 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1290}
1291
1292impl std::marker::Unpin for MlmeEventStream {}
1293
1294impl futures::stream::FusedStream for MlmeEventStream {
1295 fn is_terminated(&self) -> bool {
1296 self.event_receiver.is_terminated()
1297 }
1298}
1299
1300impl futures::Stream for MlmeEventStream {
1301 type Item = Result<MlmeEvent, fidl::Error>;
1302
1303 fn poll_next(
1304 mut self: std::pin::Pin<&mut Self>,
1305 cx: &mut std::task::Context<'_>,
1306 ) -> std::task::Poll<Option<Self::Item>> {
1307 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1308 &mut self.event_receiver,
1309 cx
1310 )?) {
1311 Some(buf) => std::task::Poll::Ready(Some(MlmeEvent::decode(buf))),
1312 None => std::task::Poll::Ready(None),
1313 }
1314 }
1315}
1316
1317#[derive(Debug)]
1318pub enum MlmeEvent {
1319 OnScanResult { result: ScanResult },
1320 OnScanEnd { end: ScanEnd },
1321 ConnectConf { resp: ConnectConfirm },
1322 RoamConf { conf: RoamConfirm },
1323 RoamStartInd { ind: RoamStartIndication },
1324 RoamResultInd { ind: RoamResultIndication },
1325 AuthenticateInd { ind: AuthenticateIndication },
1326 DeauthenticateConf { resp: DeauthenticateConfirm },
1327 DeauthenticateInd { ind: DeauthenticateIndication },
1328 AssociateInd { ind: AssociateIndication },
1329 DisassociateConf { resp: DisassociateConfirm },
1330 DisassociateInd { ind: DisassociateIndication },
1331 StartConf { resp: StartConfirm },
1332 StopConf { resp: StopConfirm },
1333 SetKeysConf { conf: SetKeysConfirm },
1334 EapolConf { resp: EapolConfirm },
1335 SignalReport { ind: fidl_fuchsia_wlan_internal::SignalReportIndication },
1336 EapolInd { ind: EapolIndication },
1337 RelayCapturedFrame { result: CapturedFrameResult },
1338 OnChannelSwitched { info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo },
1339 OnPmkAvailable { info: PmkInfo },
1340 OnSaeHandshakeInd { ind: SaeHandshakeIndication },
1341 OnSaeFrameRx { frame: SaeFrame },
1342 OnWmmStatusResp { status: i32, resp: fidl_fuchsia_wlan_internal::WmmStatusResponse },
1343}
1344
1345impl MlmeEvent {
1346 #[allow(irrefutable_let_patterns)]
1347 pub fn into_on_scan_result(self) -> Option<ScanResult> {
1348 if let MlmeEvent::OnScanResult { result } = self {
1349 Some((result))
1350 } else {
1351 None
1352 }
1353 }
1354 #[allow(irrefutable_let_patterns)]
1355 pub fn into_on_scan_end(self) -> Option<ScanEnd> {
1356 if let MlmeEvent::OnScanEnd { end } = self {
1357 Some((end))
1358 } else {
1359 None
1360 }
1361 }
1362 #[allow(irrefutable_let_patterns)]
1363 pub fn into_connect_conf(self) -> Option<ConnectConfirm> {
1364 if let MlmeEvent::ConnectConf { resp } = self {
1365 Some((resp))
1366 } else {
1367 None
1368 }
1369 }
1370 #[allow(irrefutable_let_patterns)]
1371 pub fn into_roam_conf(self) -> Option<RoamConfirm> {
1372 if let MlmeEvent::RoamConf { conf } = self {
1373 Some((conf))
1374 } else {
1375 None
1376 }
1377 }
1378 #[allow(irrefutable_let_patterns)]
1379 pub fn into_roam_start_ind(self) -> Option<RoamStartIndication> {
1380 if let MlmeEvent::RoamStartInd { ind } = self {
1381 Some((ind))
1382 } else {
1383 None
1384 }
1385 }
1386 #[allow(irrefutable_let_patterns)]
1387 pub fn into_roam_result_ind(self) -> Option<RoamResultIndication> {
1388 if let MlmeEvent::RoamResultInd { ind } = self {
1389 Some((ind))
1390 } else {
1391 None
1392 }
1393 }
1394 #[allow(irrefutable_let_patterns)]
1395 pub fn into_authenticate_ind(self) -> Option<AuthenticateIndication> {
1396 if let MlmeEvent::AuthenticateInd { ind } = self {
1397 Some((ind))
1398 } else {
1399 None
1400 }
1401 }
1402 #[allow(irrefutable_let_patterns)]
1403 pub fn into_deauthenticate_conf(self) -> Option<DeauthenticateConfirm> {
1404 if let MlmeEvent::DeauthenticateConf { resp } = self {
1405 Some((resp))
1406 } else {
1407 None
1408 }
1409 }
1410 #[allow(irrefutable_let_patterns)]
1411 pub fn into_deauthenticate_ind(self) -> Option<DeauthenticateIndication> {
1412 if let MlmeEvent::DeauthenticateInd { ind } = self {
1413 Some((ind))
1414 } else {
1415 None
1416 }
1417 }
1418 #[allow(irrefutable_let_patterns)]
1419 pub fn into_associate_ind(self) -> Option<AssociateIndication> {
1420 if let MlmeEvent::AssociateInd { ind } = self {
1421 Some((ind))
1422 } else {
1423 None
1424 }
1425 }
1426 #[allow(irrefutable_let_patterns)]
1427 pub fn into_disassociate_conf(self) -> Option<DisassociateConfirm> {
1428 if let MlmeEvent::DisassociateConf { resp } = self {
1429 Some((resp))
1430 } else {
1431 None
1432 }
1433 }
1434 #[allow(irrefutable_let_patterns)]
1435 pub fn into_disassociate_ind(self) -> Option<DisassociateIndication> {
1436 if let MlmeEvent::DisassociateInd { ind } = self {
1437 Some((ind))
1438 } else {
1439 None
1440 }
1441 }
1442 #[allow(irrefutable_let_patterns)]
1443 pub fn into_start_conf(self) -> Option<StartConfirm> {
1444 if let MlmeEvent::StartConf { resp } = self {
1445 Some((resp))
1446 } else {
1447 None
1448 }
1449 }
1450 #[allow(irrefutable_let_patterns)]
1451 pub fn into_stop_conf(self) -> Option<StopConfirm> {
1452 if let MlmeEvent::StopConf { resp } = self {
1453 Some((resp))
1454 } else {
1455 None
1456 }
1457 }
1458 #[allow(irrefutable_let_patterns)]
1459 pub fn into_set_keys_conf(self) -> Option<SetKeysConfirm> {
1460 if let MlmeEvent::SetKeysConf { conf } = self {
1461 Some((conf))
1462 } else {
1463 None
1464 }
1465 }
1466 #[allow(irrefutable_let_patterns)]
1467 pub fn into_eapol_conf(self) -> Option<EapolConfirm> {
1468 if let MlmeEvent::EapolConf { resp } = self {
1469 Some((resp))
1470 } else {
1471 None
1472 }
1473 }
1474 #[allow(irrefutable_let_patterns)]
1475 pub fn into_signal_report(self) -> Option<fidl_fuchsia_wlan_internal::SignalReportIndication> {
1476 if let MlmeEvent::SignalReport { ind } = self {
1477 Some((ind))
1478 } else {
1479 None
1480 }
1481 }
1482 #[allow(irrefutable_let_patterns)]
1483 pub fn into_eapol_ind(self) -> Option<EapolIndication> {
1484 if let MlmeEvent::EapolInd { ind } = self {
1485 Some((ind))
1486 } else {
1487 None
1488 }
1489 }
1490 #[allow(irrefutable_let_patterns)]
1491 pub fn into_relay_captured_frame(self) -> Option<CapturedFrameResult> {
1492 if let MlmeEvent::RelayCapturedFrame { result } = self {
1493 Some((result))
1494 } else {
1495 None
1496 }
1497 }
1498 #[allow(irrefutable_let_patterns)]
1499 pub fn into_on_channel_switched(self) -> Option<fidl_fuchsia_wlan_internal::ChannelSwitchInfo> {
1500 if let MlmeEvent::OnChannelSwitched { info } = self {
1501 Some((info))
1502 } else {
1503 None
1504 }
1505 }
1506 #[allow(irrefutable_let_patterns)]
1507 pub fn into_on_pmk_available(self) -> Option<PmkInfo> {
1508 if let MlmeEvent::OnPmkAvailable { info } = self {
1509 Some((info))
1510 } else {
1511 None
1512 }
1513 }
1514 #[allow(irrefutable_let_patterns)]
1515 pub fn into_on_sae_handshake_ind(self) -> Option<SaeHandshakeIndication> {
1516 if let MlmeEvent::OnSaeHandshakeInd { ind } = self {
1517 Some((ind))
1518 } else {
1519 None
1520 }
1521 }
1522 #[allow(irrefutable_let_patterns)]
1523 pub fn into_on_sae_frame_rx(self) -> Option<SaeFrame> {
1524 if let MlmeEvent::OnSaeFrameRx { frame } = self {
1525 Some((frame))
1526 } else {
1527 None
1528 }
1529 }
1530 #[allow(irrefutable_let_patterns)]
1531 pub fn into_on_wmm_status_resp(
1532 self,
1533 ) -> Option<(i32, fidl_fuchsia_wlan_internal::WmmStatusResponse)> {
1534 if let MlmeEvent::OnWmmStatusResp { status, resp } = self {
1535 Some((status, resp))
1536 } else {
1537 None
1538 }
1539 }
1540
1541 fn decode(
1543 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1544 ) -> Result<MlmeEvent, fidl::Error> {
1545 let (bytes, _handles) = buf.split_mut();
1546 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1547 debug_assert_eq!(tx_header.tx_id, 0);
1548 match tx_header.ordinal {
1549 0x681af7466a75074d => {
1550 let mut out = fidl::new_empty!(
1551 MlmeOnScanResultRequest,
1552 fidl::encoding::DefaultFuchsiaResourceDialect
1553 );
1554 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnScanResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1555 Ok((MlmeEvent::OnScanResult { result: out.result }))
1556 }
1557 0x7f2702d253e7ca59 => {
1558 let mut out = fidl::new_empty!(
1559 MlmeOnScanEndRequest,
1560 fidl::encoding::DefaultFuchsiaResourceDialect
1561 );
1562 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnScanEndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1563 Ok((MlmeEvent::OnScanEnd { end: out.end }))
1564 }
1565 0x77b27623279b981e => {
1566 let mut out = fidl::new_empty!(
1567 MlmeConnectConfRequest,
1568 fidl::encoding::DefaultFuchsiaResourceDialect
1569 );
1570 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeConnectConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1571 Ok((MlmeEvent::ConnectConf { resp: out.resp }))
1572 }
1573 0x3f608034faa054bc => {
1574 let mut out = fidl::new_empty!(
1575 MlmeRoamConfRequest,
1576 fidl::encoding::DefaultFuchsiaResourceDialect
1577 );
1578 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1579 Ok((MlmeEvent::RoamConf { conf: out.conf }))
1580 }
1581 0x270a1ec78672d094 => {
1582 let mut out = fidl::new_empty!(
1583 MlmeRoamStartIndRequest,
1584 fidl::encoding::DefaultFuchsiaResourceDialect
1585 );
1586 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamStartIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1587 Ok((MlmeEvent::RoamStartInd { ind: out.ind }))
1588 }
1589 0x26d074364fc84865 => {
1590 let mut out = fidl::new_empty!(
1591 MlmeRoamResultIndRequest,
1592 fidl::encoding::DefaultFuchsiaResourceDialect
1593 );
1594 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamResultIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1595 Ok((MlmeEvent::RoamResultInd { ind: out.ind }))
1596 }
1597 0x460f49ae891adbe9 => {
1598 let mut out = fidl::new_empty!(
1599 MlmeAuthenticateIndRequest,
1600 fidl::encoding::DefaultFuchsiaResourceDialect
1601 );
1602 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAuthenticateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1603 Ok((MlmeEvent::AuthenticateInd { ind: out.ind }))
1604 }
1605 0x3b44debc21b88c8c => {
1606 let mut out = fidl::new_empty!(
1607 MlmeDeauthenticateConfRequest,
1608 fidl::encoding::DefaultFuchsiaResourceDialect
1609 );
1610 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1611 Ok((MlmeEvent::DeauthenticateConf { resp: out.resp }))
1612 }
1613 0x7ee0889b326da1d7 => {
1614 let mut out = fidl::new_empty!(
1615 MlmeDeauthenticateIndRequest,
1616 fidl::encoding::DefaultFuchsiaResourceDialect
1617 );
1618 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1619 Ok((MlmeEvent::DeauthenticateInd { ind: out.ind }))
1620 }
1621 0x6a86f20e3063dd63 => {
1622 let mut out = fidl::new_empty!(
1623 MlmeAssociateIndRequest,
1624 fidl::encoding::DefaultFuchsiaResourceDialect
1625 );
1626 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAssociateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1627 Ok((MlmeEvent::AssociateInd { ind: out.ind }))
1628 }
1629 0x61345fbce732a28d => {
1630 let mut out = fidl::new_empty!(
1631 MlmeDisassociateConfRequest,
1632 fidl::encoding::DefaultFuchsiaResourceDialect
1633 );
1634 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1635 Ok((MlmeEvent::DisassociateConf { resp: out.resp }))
1636 }
1637 0x77ac0ebf387c1f35 => {
1638 let mut out = fidl::new_empty!(
1639 MlmeDisassociateIndRequest,
1640 fidl::encoding::DefaultFuchsiaResourceDialect
1641 );
1642 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1643 Ok((MlmeEvent::DisassociateInd { ind: out.ind }))
1644 }
1645 0x15ea6cdf3b8382b3 => {
1646 let mut out = fidl::new_empty!(
1647 MlmeStartConfRequest,
1648 fidl::encoding::DefaultFuchsiaResourceDialect
1649 );
1650 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1651 Ok((MlmeEvent::StartConf { resp: out.resp }))
1652 }
1653 0x50b426ef4a84a2df => {
1654 let mut out = fidl::new_empty!(
1655 MlmeStopConfRequest,
1656 fidl::encoding::DefaultFuchsiaResourceDialect
1657 );
1658 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStopConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1659 Ok((MlmeEvent::StopConf { resp: out.resp }))
1660 }
1661 0x5bafb3a8d4039380 => {
1662 let mut out = fidl::new_empty!(
1663 MlmeSetKeysConfRequest,
1664 fidl::encoding::DefaultFuchsiaResourceDialect
1665 );
1666 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetKeysConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1667 Ok((MlmeEvent::SetKeysConf { conf: out.conf }))
1668 }
1669 0x6ffa21f4ee73ce64 => {
1670 let mut out = fidl::new_empty!(
1671 MlmeEapolConfRequest,
1672 fidl::encoding::DefaultFuchsiaResourceDialect
1673 );
1674 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolConfRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1675 Ok((MlmeEvent::EapolConf { resp: out.resp }))
1676 }
1677 0x48f32a876aa53d8f => {
1678 let mut out = fidl::new_empty!(
1679 MlmeSignalReportRequest,
1680 fidl::encoding::DefaultFuchsiaResourceDialect
1681 );
1682 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSignalReportRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1683 Ok((MlmeEvent::SignalReport { ind: out.ind }))
1684 }
1685 0x7038dca46a3142fc => {
1686 let mut out = fidl::new_empty!(
1687 MlmeEapolIndRequest,
1688 fidl::encoding::DefaultFuchsiaResourceDialect
1689 );
1690 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1691 Ok((MlmeEvent::EapolInd { ind: out.ind }))
1692 }
1693 0x6f00a6f3cff9b1f5 => {
1694 let mut out = fidl::new_empty!(
1695 MlmeRelayCapturedFrameRequest,
1696 fidl::encoding::DefaultFuchsiaResourceDialect
1697 );
1698 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRelayCapturedFrameRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1699 Ok((MlmeEvent::RelayCapturedFrame { result: out.result }))
1700 }
1701 0x581750594e4c0c1 => {
1702 let mut out = fidl::new_empty!(
1703 MlmeOnChannelSwitchedRequest,
1704 fidl::encoding::DefaultFuchsiaResourceDialect
1705 );
1706 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnChannelSwitchedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1707 Ok((MlmeEvent::OnChannelSwitched { info: out.info }))
1708 }
1709 0x1314fc2c79643f90 => {
1710 let mut out = fidl::new_empty!(
1711 MlmeOnPmkAvailableRequest,
1712 fidl::encoding::DefaultFuchsiaResourceDialect
1713 );
1714 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnPmkAvailableRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1715 Ok((MlmeEvent::OnPmkAvailable { info: out.info }))
1716 }
1717 0x6308b10e18986d7e => {
1718 let mut out = fidl::new_empty!(
1719 MlmeOnSaeHandshakeIndRequest,
1720 fidl::encoding::DefaultFuchsiaResourceDialect
1721 );
1722 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnSaeHandshakeIndRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1723 Ok((MlmeEvent::OnSaeHandshakeInd { ind: out.ind }))
1724 }
1725 0x4ebf51c86ef5f3cd => {
1726 let mut out = fidl::new_empty!(
1727 MlmeOnSaeFrameRxRequest,
1728 fidl::encoding::DefaultFuchsiaResourceDialect
1729 );
1730 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnSaeFrameRxRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1731 Ok((MlmeEvent::OnSaeFrameRx { frame: out.frame }))
1732 }
1733 0x53f056b432e7b5cb => {
1734 let mut out = fidl::new_empty!(
1735 MlmeOnWmmStatusRespRequest,
1736 fidl::encoding::DefaultFuchsiaResourceDialect
1737 );
1738 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeOnWmmStatusRespRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
1739 Ok((MlmeEvent::OnWmmStatusResp { status: out.status, resp: out.resp }))
1740 }
1741 _ => Err(fidl::Error::UnknownOrdinal {
1742 ordinal: tx_header.ordinal,
1743 protocol_name: <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1744 }),
1745 }
1746 }
1747}
1748
1749pub struct MlmeRequestStream {
1751 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1752 is_terminated: bool,
1753}
1754
1755impl std::marker::Unpin for MlmeRequestStream {}
1756
1757impl futures::stream::FusedStream for MlmeRequestStream {
1758 fn is_terminated(&self) -> bool {
1759 self.is_terminated
1760 }
1761}
1762
1763impl fidl::endpoints::RequestStream for MlmeRequestStream {
1764 type Protocol = MlmeMarker;
1765 type ControlHandle = MlmeControlHandle;
1766
1767 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1768 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1769 }
1770
1771 fn control_handle(&self) -> Self::ControlHandle {
1772 MlmeControlHandle { inner: self.inner.clone() }
1773 }
1774
1775 fn into_inner(
1776 self,
1777 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1778 {
1779 (self.inner, self.is_terminated)
1780 }
1781
1782 fn from_inner(
1783 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1784 is_terminated: bool,
1785 ) -> Self {
1786 Self { inner, is_terminated }
1787 }
1788}
1789
1790impl futures::Stream for MlmeRequestStream {
1791 type Item = Result<MlmeRequest, fidl::Error>;
1792
1793 fn poll_next(
1794 mut self: std::pin::Pin<&mut Self>,
1795 cx: &mut std::task::Context<'_>,
1796 ) -> std::task::Poll<Option<Self::Item>> {
1797 let this = &mut *self;
1798 if this.inner.check_shutdown(cx) {
1799 this.is_terminated = true;
1800 return std::task::Poll::Ready(None);
1801 }
1802 if this.is_terminated {
1803 panic!("polled MlmeRequestStream after completion");
1804 }
1805 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1806 |bytes, handles| {
1807 match this.inner.channel().read_etc(cx, bytes, handles) {
1808 std::task::Poll::Ready(Ok(())) => {}
1809 std::task::Poll::Pending => return std::task::Poll::Pending,
1810 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1811 this.is_terminated = true;
1812 return std::task::Poll::Ready(None);
1813 }
1814 std::task::Poll::Ready(Err(e)) => {
1815 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1816 e.into(),
1817 ))))
1818 }
1819 }
1820
1821 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1823
1824 std::task::Poll::Ready(Some(match header.ordinal {
1825 0x342cc5ec6a957479 => {
1826 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1827 let mut req = fidl::new_empty!(
1828 MlmeStartScanRequest,
1829 fidl::encoding::DefaultFuchsiaResourceDialect
1830 );
1831 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartScanRequest>(&header, _body_bytes, handles, &mut req)?;
1832 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1833 Ok(MlmeRequest::StartScan { req: req.req, control_handle })
1834 }
1835 0x31153dc85f8f64c => {
1836 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1837 let mut req = fidl::new_empty!(
1838 MlmeConnectReqRequest,
1839 fidl::encoding::DefaultFuchsiaResourceDialect
1840 );
1841 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeConnectReqRequest>(&header, _body_bytes, handles, &mut req)?;
1842 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1843 Ok(MlmeRequest::ConnectReq { req: req.req, control_handle })
1844 }
1845 0x74e0f1bd758b6b78 => {
1846 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1847 let mut req = fidl::new_empty!(
1848 MlmeReconnectReqRequest,
1849 fidl::encoding::DefaultFuchsiaResourceDialect
1850 );
1851 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeReconnectReqRequest>(&header, _body_bytes, handles, &mut req)?;
1852 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1853 Ok(MlmeRequest::ReconnectReq { req: req.req, control_handle })
1854 }
1855 0x3ba163eadf7dba45 => {
1856 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1857 let mut req = fidl::new_empty!(
1858 MlmeRoamReqRequest,
1859 fidl::encoding::DefaultFuchsiaResourceDialect
1860 );
1861 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeRoamReqRequest>(&header, _body_bytes, handles, &mut req)?;
1862 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1863 Ok(MlmeRequest::RoamReq { req: req.req, control_handle })
1864 }
1865 0x26108aade2fdd2f4 => {
1866 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1867 let mut req = fidl::new_empty!(
1868 MlmeAuthenticateRespRequest,
1869 fidl::encoding::DefaultFuchsiaResourceDialect
1870 );
1871 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAuthenticateRespRequest>(&header, _body_bytes, handles, &mut req)?;
1872 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1873 Ok(MlmeRequest::AuthenticateResp { resp: req.resp, control_handle })
1874 }
1875 0x228983b200de5d12 => {
1876 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1877 let mut req = fidl::new_empty!(
1878 MlmeDeauthenticateReqRequest,
1879 fidl::encoding::DefaultFuchsiaResourceDialect
1880 );
1881 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeauthenticateReqRequest>(&header, _body_bytes, handles, &mut req)?;
1882 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1883 Ok(MlmeRequest::DeauthenticateReq { req: req.req, control_handle })
1884 }
1885 0x70244dbd652ed6d9 => {
1886 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1887 let mut req = fidl::new_empty!(
1888 MlmeAssociateRespRequest,
1889 fidl::encoding::DefaultFuchsiaResourceDialect
1890 );
1891 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeAssociateRespRequest>(&header, _body_bytes, handles, &mut req)?;
1892 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1893 Ok(MlmeRequest::AssociateResp { resp: req.resp, control_handle })
1894 }
1895 0x5765807f1387d764 => {
1896 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1897 let mut req = fidl::new_empty!(
1898 MlmeDisassociateReqRequest,
1899 fidl::encoding::DefaultFuchsiaResourceDialect
1900 );
1901 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDisassociateReqRequest>(&header, _body_bytes, handles, &mut req)?;
1902 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1903 Ok(MlmeRequest::DisassociateReq { req: req.req, control_handle })
1904 }
1905 0x780b98c58a286b9f => {
1906 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1907 let mut req = fidl::new_empty!(
1908 MlmeResetReqRequest,
1909 fidl::encoding::DefaultFuchsiaResourceDialect
1910 );
1911 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeResetReqRequest>(&header, _body_bytes, handles, &mut req)?;
1912 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1913 Ok(MlmeRequest::ResetReq { req: req.req, control_handle })
1914 }
1915 0x5d95885f8053654 => {
1916 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1917 let mut req = fidl::new_empty!(
1918 MlmeStartReqRequest,
1919 fidl::encoding::DefaultFuchsiaResourceDialect
1920 );
1921 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartReqRequest>(&header, _body_bytes, handles, &mut req)?;
1922 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1923 Ok(MlmeRequest::StartReq { req: req.req, control_handle })
1924 }
1925 0x27b9a2ab04a2c79f => {
1926 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1927 let mut req = fidl::new_empty!(
1928 MlmeStopReqRequest,
1929 fidl::encoding::DefaultFuchsiaResourceDialect
1930 );
1931 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStopReqRequest>(&header, _body_bytes, handles, &mut req)?;
1932 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1933 Ok(MlmeRequest::StopReq { req: req.req, control_handle })
1934 }
1935 0x6b30a07fd3a11a79 => {
1936 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1937 let mut req = fidl::new_empty!(
1938 MlmeSetKeysReqRequest,
1939 fidl::encoding::DefaultFuchsiaResourceDialect
1940 );
1941 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetKeysReqRequest>(&header, _body_bytes, handles, &mut req)?;
1942 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1943 Ok(MlmeRequest::SetKeysReq { req: req.req, control_handle })
1944 }
1945 0x1e3524d20d190c8f => {
1946 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1947 let mut req = fidl::new_empty!(
1948 MlmeDeleteKeysReqRequest,
1949 fidl::encoding::DefaultFuchsiaResourceDialect
1950 );
1951 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeDeleteKeysReqRequest>(&header, _body_bytes, handles, &mut req)?;
1952 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1953 Ok(MlmeRequest::DeleteKeysReq { req: req.req, control_handle })
1954 }
1955 0xc3c096924704d4 => {
1956 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1957 let mut req = fidl::new_empty!(
1958 MlmeEapolReqRequest,
1959 fidl::encoding::DefaultFuchsiaResourceDialect
1960 );
1961 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeEapolReqRequest>(&header, _body_bytes, handles, &mut req)?;
1962 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1963 Ok(MlmeRequest::EapolReq { req: req.req, control_handle })
1964 }
1965 0x4e47065668890c8d => {
1966 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1967 let mut req = fidl::new_empty!(
1968 MlmeSetControlledPortRequest,
1969 fidl::encoding::DefaultFuchsiaResourceDialect
1970 );
1971 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSetControlledPortRequest>(&header, _body_bytes, handles, &mut req)?;
1972 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1973 Ok(MlmeRequest::SetControlledPort { req: req.req, control_handle })
1974 }
1975 0x6ee3e7f63f2b7bc0 => {
1976 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1977 let mut req = fidl::new_empty!(
1978 fidl::encoding::EmptyPayload,
1979 fidl::encoding::DefaultFuchsiaResourceDialect
1980 );
1981 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1982 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1983 Ok(MlmeRequest::QueryDeviceInfo {
1984 responder: MlmeQueryDeviceInfoResponder {
1985 control_handle: std::mem::ManuallyDrop::new(control_handle),
1986 tx_id: header.tx_id,
1987 },
1988 })
1989 }
1990 0x1598879b70332c99 => {
1991 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1992 let mut req = fidl::new_empty!(
1993 fidl::encoding::EmptyPayload,
1994 fidl::encoding::DefaultFuchsiaResourceDialect
1995 );
1996 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1997 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
1998 Ok(MlmeRequest::QueryTelemetrySupport {
1999 responder: MlmeQueryTelemetrySupportResponder {
2000 control_handle: std::mem::ManuallyDrop::new(control_handle),
2001 tx_id: header.tx_id,
2002 },
2003 })
2004 }
2005 0xede1a8342d1b211 => {
2006 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2007 let mut req = fidl::new_empty!(
2008 fidl::encoding::EmptyPayload,
2009 fidl::encoding::DefaultFuchsiaResourceDialect
2010 );
2011 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2012 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2013 Ok(MlmeRequest::GetIfaceStats {
2014 responder: MlmeGetIfaceStatsResponder {
2015 control_handle: std::mem::ManuallyDrop::new(control_handle),
2016 tx_id: header.tx_id,
2017 },
2018 })
2019 }
2020 0x1979c9d3449f8675 => {
2021 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2022 let mut req = fidl::new_empty!(
2023 fidl::encoding::EmptyPayload,
2024 fidl::encoding::DefaultFuchsiaResourceDialect
2025 );
2026 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2027 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2028 Ok(MlmeRequest::GetIfaceHistogramStats {
2029 responder: MlmeGetIfaceHistogramStatsResponder {
2030 control_handle: std::mem::ManuallyDrop::new(control_handle),
2031 tx_id: header.tx_id,
2032 },
2033 })
2034 }
2035 0x4ac5d1e66fe1ffd5 => {
2036 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2037 let mut req = fidl::new_empty!(
2038 fidl::encoding::EmptyPayload,
2039 fidl::encoding::DefaultFuchsiaResourceDialect
2040 );
2041 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2042 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2043 Ok(MlmeRequest::ListMinstrelPeers {
2044 responder: MlmeListMinstrelPeersResponder {
2045 control_handle: std::mem::ManuallyDrop::new(control_handle),
2046 tx_id: header.tx_id,
2047 },
2048 })
2049 }
2050 0x2f688b1245323f4b => {
2051 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2052 let mut req = fidl::new_empty!(
2053 MlmeGetMinstrelStatsRequest,
2054 fidl::encoding::DefaultFuchsiaResourceDialect
2055 );
2056 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeGetMinstrelStatsRequest>(&header, _body_bytes, handles, &mut req)?;
2057 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2058 Ok(MlmeRequest::GetMinstrelStats {
2059 req: req.req,
2060
2061 responder: MlmeGetMinstrelStatsResponder {
2062 control_handle: std::mem::ManuallyDrop::new(control_handle),
2063 tx_id: header.tx_id,
2064 },
2065 })
2066 }
2067 0x23b369ed5749ee69 => {
2068 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2069 let mut req = fidl::new_empty!(
2070 MlmeStartCaptureFramesRequest,
2071 fidl::encoding::DefaultFuchsiaResourceDialect
2072 );
2073 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeStartCaptureFramesRequest>(&header, _body_bytes, handles, &mut req)?;
2074 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2075 Ok(MlmeRequest::StartCaptureFrames {
2076 req: req.req,
2077
2078 responder: MlmeStartCaptureFramesResponder {
2079 control_handle: std::mem::ManuallyDrop::new(control_handle),
2080 tx_id: header.tx_id,
2081 },
2082 })
2083 }
2084 0x2f1aebbc68bf7c54 => {
2085 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2086 let mut req = fidl::new_empty!(
2087 fidl::encoding::EmptyPayload,
2088 fidl::encoding::DefaultFuchsiaResourceDialect
2089 );
2090 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2091 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2092 Ok(MlmeRequest::StopCaptureFrames { control_handle })
2093 }
2094 0x28477bd2f7a5ab0c => {
2095 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2096 let mut req = fidl::new_empty!(
2097 MlmeSaeHandshakeRespRequest,
2098 fidl::encoding::DefaultFuchsiaResourceDialect
2099 );
2100 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSaeHandshakeRespRequest>(&header, _body_bytes, handles, &mut req)?;
2101 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2102 Ok(MlmeRequest::SaeHandshakeResp { resp: req.resp, control_handle })
2103 }
2104 0x7700c0d536733d8c => {
2105 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2106 let mut req = fidl::new_empty!(
2107 MlmeSaeFrameTxRequest,
2108 fidl::encoding::DefaultFuchsiaResourceDialect
2109 );
2110 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeSaeFrameTxRequest>(&header, _body_bytes, handles, &mut req)?;
2111 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2112 Ok(MlmeRequest::SaeFrameTx { frame: req.frame, control_handle })
2113 }
2114 0xef4851f6088fede => {
2115 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2116 let mut req = fidl::new_empty!(
2117 fidl::encoding::EmptyPayload,
2118 fidl::encoding::DefaultFuchsiaResourceDialect
2119 );
2120 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2121 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2122 Ok(MlmeRequest::WmmStatusReq { control_handle })
2123 }
2124 0x7aea59787cfd385a => {
2125 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2126 let mut req = fidl::new_empty!(
2127 MlmeFinalizeAssociationReqRequest,
2128 fidl::encoding::DefaultFuchsiaResourceDialect
2129 );
2130 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MlmeFinalizeAssociationReqRequest>(&header, _body_bytes, handles, &mut req)?;
2131 let control_handle = MlmeControlHandle { inner: this.inner.clone() };
2132 Ok(MlmeRequest::FinalizeAssociationReq {
2133 negotiated_capabilities: req.negotiated_capabilities,
2134
2135 control_handle,
2136 })
2137 }
2138 _ => Err(fidl::Error::UnknownOrdinal {
2139 ordinal: header.ordinal,
2140 protocol_name: <MlmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2141 }),
2142 }))
2143 },
2144 )
2145 }
2146}
2147
2148#[derive(Debug)]
2149pub enum MlmeRequest {
2150 StartScan {
2151 req: ScanRequest,
2152 control_handle: MlmeControlHandle,
2153 },
2154 ConnectReq {
2155 req: ConnectRequest,
2156 control_handle: MlmeControlHandle,
2157 },
2158 ReconnectReq {
2159 req: ReconnectRequest,
2160 control_handle: MlmeControlHandle,
2161 },
2162 RoamReq {
2164 req: RoamRequest,
2165 control_handle: MlmeControlHandle,
2166 },
2167 AuthenticateResp {
2168 resp: AuthenticateResponse,
2169 control_handle: MlmeControlHandle,
2170 },
2171 DeauthenticateReq {
2172 req: DeauthenticateRequest,
2173 control_handle: MlmeControlHandle,
2174 },
2175 AssociateResp {
2176 resp: AssociateResponse,
2177 control_handle: MlmeControlHandle,
2178 },
2179 DisassociateReq {
2180 req: DisassociateRequest,
2181 control_handle: MlmeControlHandle,
2182 },
2183 ResetReq {
2184 req: ResetRequest,
2185 control_handle: MlmeControlHandle,
2186 },
2187 StartReq {
2188 req: StartRequest,
2189 control_handle: MlmeControlHandle,
2190 },
2191 StopReq {
2192 req: StopRequest,
2193 control_handle: MlmeControlHandle,
2194 },
2195 SetKeysReq {
2196 req: SetKeysRequest,
2197 control_handle: MlmeControlHandle,
2198 },
2199 DeleteKeysReq {
2200 req: DeleteKeysRequest,
2201 control_handle: MlmeControlHandle,
2202 },
2203 EapolReq {
2204 req: EapolRequest,
2205 control_handle: MlmeControlHandle,
2206 },
2207 SetControlledPort {
2208 req: SetControlledPortRequest,
2209 control_handle: MlmeControlHandle,
2210 },
2211 QueryDeviceInfo {
2212 responder: MlmeQueryDeviceInfoResponder,
2213 },
2214 QueryTelemetrySupport {
2215 responder: MlmeQueryTelemetrySupportResponder,
2216 },
2217 GetIfaceStats {
2218 responder: MlmeGetIfaceStatsResponder,
2219 },
2220 GetIfaceHistogramStats {
2221 responder: MlmeGetIfaceHistogramStatsResponder,
2222 },
2223 ListMinstrelPeers {
2224 responder: MlmeListMinstrelPeersResponder,
2225 },
2226 GetMinstrelStats {
2227 req: MinstrelStatsRequest,
2228 responder: MlmeGetMinstrelStatsResponder,
2229 },
2230 StartCaptureFrames {
2231 req: StartCaptureFramesRequest,
2232 responder: MlmeStartCaptureFramesResponder,
2233 },
2234 StopCaptureFrames {
2235 control_handle: MlmeControlHandle,
2236 },
2237 SaeHandshakeResp {
2239 resp: SaeHandshakeResponse,
2240 control_handle: MlmeControlHandle,
2241 },
2242 SaeFrameTx {
2244 frame: SaeFrame,
2245 control_handle: MlmeControlHandle,
2246 },
2247 WmmStatusReq {
2248 control_handle: MlmeControlHandle,
2249 },
2250 FinalizeAssociationReq {
2251 negotiated_capabilities: NegotiatedCapabilities,
2252 control_handle: MlmeControlHandle,
2253 },
2254}
2255
2256impl MlmeRequest {
2257 #[allow(irrefutable_let_patterns)]
2258 pub fn into_start_scan(self) -> Option<(ScanRequest, MlmeControlHandle)> {
2259 if let MlmeRequest::StartScan { req, control_handle } = self {
2260 Some((req, control_handle))
2261 } else {
2262 None
2263 }
2264 }
2265
2266 #[allow(irrefutable_let_patterns)]
2267 pub fn into_connect_req(self) -> Option<(ConnectRequest, MlmeControlHandle)> {
2268 if let MlmeRequest::ConnectReq { req, control_handle } = self {
2269 Some((req, control_handle))
2270 } else {
2271 None
2272 }
2273 }
2274
2275 #[allow(irrefutable_let_patterns)]
2276 pub fn into_reconnect_req(self) -> Option<(ReconnectRequest, MlmeControlHandle)> {
2277 if let MlmeRequest::ReconnectReq { req, control_handle } = self {
2278 Some((req, control_handle))
2279 } else {
2280 None
2281 }
2282 }
2283
2284 #[allow(irrefutable_let_patterns)]
2285 pub fn into_roam_req(self) -> Option<(RoamRequest, MlmeControlHandle)> {
2286 if let MlmeRequest::RoamReq { req, control_handle } = self {
2287 Some((req, control_handle))
2288 } else {
2289 None
2290 }
2291 }
2292
2293 #[allow(irrefutable_let_patterns)]
2294 pub fn into_authenticate_resp(self) -> Option<(AuthenticateResponse, MlmeControlHandle)> {
2295 if let MlmeRequest::AuthenticateResp { resp, control_handle } = self {
2296 Some((resp, control_handle))
2297 } else {
2298 None
2299 }
2300 }
2301
2302 #[allow(irrefutable_let_patterns)]
2303 pub fn into_deauthenticate_req(self) -> Option<(DeauthenticateRequest, MlmeControlHandle)> {
2304 if let MlmeRequest::DeauthenticateReq { req, control_handle } = self {
2305 Some((req, control_handle))
2306 } else {
2307 None
2308 }
2309 }
2310
2311 #[allow(irrefutable_let_patterns)]
2312 pub fn into_associate_resp(self) -> Option<(AssociateResponse, MlmeControlHandle)> {
2313 if let MlmeRequest::AssociateResp { resp, control_handle } = self {
2314 Some((resp, control_handle))
2315 } else {
2316 None
2317 }
2318 }
2319
2320 #[allow(irrefutable_let_patterns)]
2321 pub fn into_disassociate_req(self) -> Option<(DisassociateRequest, MlmeControlHandle)> {
2322 if let MlmeRequest::DisassociateReq { req, control_handle } = self {
2323 Some((req, control_handle))
2324 } else {
2325 None
2326 }
2327 }
2328
2329 #[allow(irrefutable_let_patterns)]
2330 pub fn into_reset_req(self) -> Option<(ResetRequest, MlmeControlHandle)> {
2331 if let MlmeRequest::ResetReq { req, control_handle } = self {
2332 Some((req, control_handle))
2333 } else {
2334 None
2335 }
2336 }
2337
2338 #[allow(irrefutable_let_patterns)]
2339 pub fn into_start_req(self) -> Option<(StartRequest, MlmeControlHandle)> {
2340 if let MlmeRequest::StartReq { req, control_handle } = self {
2341 Some((req, control_handle))
2342 } else {
2343 None
2344 }
2345 }
2346
2347 #[allow(irrefutable_let_patterns)]
2348 pub fn into_stop_req(self) -> Option<(StopRequest, MlmeControlHandle)> {
2349 if let MlmeRequest::StopReq { req, control_handle } = self {
2350 Some((req, control_handle))
2351 } else {
2352 None
2353 }
2354 }
2355
2356 #[allow(irrefutable_let_patterns)]
2357 pub fn into_set_keys_req(self) -> Option<(SetKeysRequest, MlmeControlHandle)> {
2358 if let MlmeRequest::SetKeysReq { req, control_handle } = self {
2359 Some((req, control_handle))
2360 } else {
2361 None
2362 }
2363 }
2364
2365 #[allow(irrefutable_let_patterns)]
2366 pub fn into_delete_keys_req(self) -> Option<(DeleteKeysRequest, MlmeControlHandle)> {
2367 if let MlmeRequest::DeleteKeysReq { req, control_handle } = self {
2368 Some((req, control_handle))
2369 } else {
2370 None
2371 }
2372 }
2373
2374 #[allow(irrefutable_let_patterns)]
2375 pub fn into_eapol_req(self) -> Option<(EapolRequest, MlmeControlHandle)> {
2376 if let MlmeRequest::EapolReq { req, control_handle } = self {
2377 Some((req, control_handle))
2378 } else {
2379 None
2380 }
2381 }
2382
2383 #[allow(irrefutable_let_patterns)]
2384 pub fn into_set_controlled_port(self) -> Option<(SetControlledPortRequest, MlmeControlHandle)> {
2385 if let MlmeRequest::SetControlledPort { req, control_handle } = self {
2386 Some((req, control_handle))
2387 } else {
2388 None
2389 }
2390 }
2391
2392 #[allow(irrefutable_let_patterns)]
2393 pub fn into_query_device_info(self) -> Option<(MlmeQueryDeviceInfoResponder)> {
2394 if let MlmeRequest::QueryDeviceInfo { responder } = self {
2395 Some((responder))
2396 } else {
2397 None
2398 }
2399 }
2400
2401 #[allow(irrefutable_let_patterns)]
2402 pub fn into_query_telemetry_support(self) -> Option<(MlmeQueryTelemetrySupportResponder)> {
2403 if let MlmeRequest::QueryTelemetrySupport { responder } = self {
2404 Some((responder))
2405 } else {
2406 None
2407 }
2408 }
2409
2410 #[allow(irrefutable_let_patterns)]
2411 pub fn into_get_iface_stats(self) -> Option<(MlmeGetIfaceStatsResponder)> {
2412 if let MlmeRequest::GetIfaceStats { responder } = self {
2413 Some((responder))
2414 } else {
2415 None
2416 }
2417 }
2418
2419 #[allow(irrefutable_let_patterns)]
2420 pub fn into_get_iface_histogram_stats(self) -> Option<(MlmeGetIfaceHistogramStatsResponder)> {
2421 if let MlmeRequest::GetIfaceHistogramStats { responder } = self {
2422 Some((responder))
2423 } else {
2424 None
2425 }
2426 }
2427
2428 #[allow(irrefutable_let_patterns)]
2429 pub fn into_list_minstrel_peers(self) -> Option<(MlmeListMinstrelPeersResponder)> {
2430 if let MlmeRequest::ListMinstrelPeers { responder } = self {
2431 Some((responder))
2432 } else {
2433 None
2434 }
2435 }
2436
2437 #[allow(irrefutable_let_patterns)]
2438 pub fn into_get_minstrel_stats(
2439 self,
2440 ) -> Option<(MinstrelStatsRequest, MlmeGetMinstrelStatsResponder)> {
2441 if let MlmeRequest::GetMinstrelStats { req, responder } = self {
2442 Some((req, responder))
2443 } else {
2444 None
2445 }
2446 }
2447
2448 #[allow(irrefutable_let_patterns)]
2449 pub fn into_start_capture_frames(
2450 self,
2451 ) -> Option<(StartCaptureFramesRequest, MlmeStartCaptureFramesResponder)> {
2452 if let MlmeRequest::StartCaptureFrames { req, responder } = self {
2453 Some((req, responder))
2454 } else {
2455 None
2456 }
2457 }
2458
2459 #[allow(irrefutable_let_patterns)]
2460 pub fn into_stop_capture_frames(self) -> Option<(MlmeControlHandle)> {
2461 if let MlmeRequest::StopCaptureFrames { control_handle } = self {
2462 Some((control_handle))
2463 } else {
2464 None
2465 }
2466 }
2467
2468 #[allow(irrefutable_let_patterns)]
2469 pub fn into_sae_handshake_resp(self) -> Option<(SaeHandshakeResponse, MlmeControlHandle)> {
2470 if let MlmeRequest::SaeHandshakeResp { resp, control_handle } = self {
2471 Some((resp, control_handle))
2472 } else {
2473 None
2474 }
2475 }
2476
2477 #[allow(irrefutable_let_patterns)]
2478 pub fn into_sae_frame_tx(self) -> Option<(SaeFrame, MlmeControlHandle)> {
2479 if let MlmeRequest::SaeFrameTx { frame, control_handle } = self {
2480 Some((frame, control_handle))
2481 } else {
2482 None
2483 }
2484 }
2485
2486 #[allow(irrefutable_let_patterns)]
2487 pub fn into_wmm_status_req(self) -> Option<(MlmeControlHandle)> {
2488 if let MlmeRequest::WmmStatusReq { control_handle } = self {
2489 Some((control_handle))
2490 } else {
2491 None
2492 }
2493 }
2494
2495 #[allow(irrefutable_let_patterns)]
2496 pub fn into_finalize_association_req(
2497 self,
2498 ) -> Option<(NegotiatedCapabilities, MlmeControlHandle)> {
2499 if let MlmeRequest::FinalizeAssociationReq { negotiated_capabilities, control_handle } =
2500 self
2501 {
2502 Some((negotiated_capabilities, control_handle))
2503 } else {
2504 None
2505 }
2506 }
2507
2508 pub fn method_name(&self) -> &'static str {
2510 match *self {
2511 MlmeRequest::StartScan { .. } => "start_scan",
2512 MlmeRequest::ConnectReq { .. } => "connect_req",
2513 MlmeRequest::ReconnectReq { .. } => "reconnect_req",
2514 MlmeRequest::RoamReq { .. } => "roam_req",
2515 MlmeRequest::AuthenticateResp { .. } => "authenticate_resp",
2516 MlmeRequest::DeauthenticateReq { .. } => "deauthenticate_req",
2517 MlmeRequest::AssociateResp { .. } => "associate_resp",
2518 MlmeRequest::DisassociateReq { .. } => "disassociate_req",
2519 MlmeRequest::ResetReq { .. } => "reset_req",
2520 MlmeRequest::StartReq { .. } => "start_req",
2521 MlmeRequest::StopReq { .. } => "stop_req",
2522 MlmeRequest::SetKeysReq { .. } => "set_keys_req",
2523 MlmeRequest::DeleteKeysReq { .. } => "delete_keys_req",
2524 MlmeRequest::EapolReq { .. } => "eapol_req",
2525 MlmeRequest::SetControlledPort { .. } => "set_controlled_port",
2526 MlmeRequest::QueryDeviceInfo { .. } => "query_device_info",
2527 MlmeRequest::QueryTelemetrySupport { .. } => "query_telemetry_support",
2528 MlmeRequest::GetIfaceStats { .. } => "get_iface_stats",
2529 MlmeRequest::GetIfaceHistogramStats { .. } => "get_iface_histogram_stats",
2530 MlmeRequest::ListMinstrelPeers { .. } => "list_minstrel_peers",
2531 MlmeRequest::GetMinstrelStats { .. } => "get_minstrel_stats",
2532 MlmeRequest::StartCaptureFrames { .. } => "start_capture_frames",
2533 MlmeRequest::StopCaptureFrames { .. } => "stop_capture_frames",
2534 MlmeRequest::SaeHandshakeResp { .. } => "sae_handshake_resp",
2535 MlmeRequest::SaeFrameTx { .. } => "sae_frame_tx",
2536 MlmeRequest::WmmStatusReq { .. } => "wmm_status_req",
2537 MlmeRequest::FinalizeAssociationReq { .. } => "finalize_association_req",
2538 }
2539 }
2540}
2541
2542#[derive(Debug, Clone)]
2543pub struct MlmeControlHandle {
2544 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2545}
2546
2547impl fidl::endpoints::ControlHandle for MlmeControlHandle {
2548 fn shutdown(&self) {
2549 self.inner.shutdown()
2550 }
2551 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2552 self.inner.shutdown_with_epitaph(status)
2553 }
2554
2555 fn is_closed(&self) -> bool {
2556 self.inner.channel().is_closed()
2557 }
2558 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2559 self.inner.channel().on_closed()
2560 }
2561
2562 #[cfg(target_os = "fuchsia")]
2563 fn signal_peer(
2564 &self,
2565 clear_mask: zx::Signals,
2566 set_mask: zx::Signals,
2567 ) -> Result<(), zx_status::Status> {
2568 use fidl::Peered;
2569 self.inner.channel().signal_peer(clear_mask, set_mask)
2570 }
2571}
2572
2573impl MlmeControlHandle {
2574 pub fn send_on_scan_result(&self, mut result: &ScanResult) -> Result<(), fidl::Error> {
2575 self.inner.send::<MlmeOnScanResultRequest>(
2576 (result,),
2577 0,
2578 0x681af7466a75074d,
2579 fidl::encoding::DynamicFlags::empty(),
2580 )
2581 }
2582
2583 pub fn send_on_scan_end(&self, mut end: &ScanEnd) -> Result<(), fidl::Error> {
2584 self.inner.send::<MlmeOnScanEndRequest>(
2585 (end,),
2586 0,
2587 0x7f2702d253e7ca59,
2588 fidl::encoding::DynamicFlags::empty(),
2589 )
2590 }
2591
2592 pub fn send_connect_conf(&self, mut resp: &ConnectConfirm) -> Result<(), fidl::Error> {
2593 self.inner.send::<MlmeConnectConfRequest>(
2594 (resp,),
2595 0,
2596 0x77b27623279b981e,
2597 fidl::encoding::DynamicFlags::empty(),
2598 )
2599 }
2600
2601 pub fn send_roam_conf(&self, mut conf: &RoamConfirm) -> Result<(), fidl::Error> {
2602 self.inner.send::<MlmeRoamConfRequest>(
2603 (conf,),
2604 0,
2605 0x3f608034faa054bc,
2606 fidl::encoding::DynamicFlags::empty(),
2607 )
2608 }
2609
2610 pub fn send_roam_start_ind(&self, mut ind: &RoamStartIndication) -> Result<(), fidl::Error> {
2611 self.inner.send::<MlmeRoamStartIndRequest>(
2612 (ind,),
2613 0,
2614 0x270a1ec78672d094,
2615 fidl::encoding::DynamicFlags::empty(),
2616 )
2617 }
2618
2619 pub fn send_roam_result_ind(&self, mut ind: &RoamResultIndication) -> Result<(), fidl::Error> {
2620 self.inner.send::<MlmeRoamResultIndRequest>(
2621 (ind,),
2622 0,
2623 0x26d074364fc84865,
2624 fidl::encoding::DynamicFlags::empty(),
2625 )
2626 }
2627
2628 pub fn send_authenticate_ind(
2629 &self,
2630 mut ind: &AuthenticateIndication,
2631 ) -> Result<(), fidl::Error> {
2632 self.inner.send::<MlmeAuthenticateIndRequest>(
2633 (ind,),
2634 0,
2635 0x460f49ae891adbe9,
2636 fidl::encoding::DynamicFlags::empty(),
2637 )
2638 }
2639
2640 pub fn send_deauthenticate_conf(
2641 &self,
2642 mut resp: &DeauthenticateConfirm,
2643 ) -> Result<(), fidl::Error> {
2644 self.inner.send::<MlmeDeauthenticateConfRequest>(
2645 (resp,),
2646 0,
2647 0x3b44debc21b88c8c,
2648 fidl::encoding::DynamicFlags::empty(),
2649 )
2650 }
2651
2652 pub fn send_deauthenticate_ind(
2653 &self,
2654 mut ind: &DeauthenticateIndication,
2655 ) -> Result<(), fidl::Error> {
2656 self.inner.send::<MlmeDeauthenticateIndRequest>(
2657 (ind,),
2658 0,
2659 0x7ee0889b326da1d7,
2660 fidl::encoding::DynamicFlags::empty(),
2661 )
2662 }
2663
2664 pub fn send_associate_ind(&self, mut ind: &AssociateIndication) -> Result<(), fidl::Error> {
2665 self.inner.send::<MlmeAssociateIndRequest>(
2666 (ind,),
2667 0,
2668 0x6a86f20e3063dd63,
2669 fidl::encoding::DynamicFlags::empty(),
2670 )
2671 }
2672
2673 pub fn send_disassociate_conf(
2674 &self,
2675 mut resp: &DisassociateConfirm,
2676 ) -> Result<(), fidl::Error> {
2677 self.inner.send::<MlmeDisassociateConfRequest>(
2678 (resp,),
2679 0,
2680 0x61345fbce732a28d,
2681 fidl::encoding::DynamicFlags::empty(),
2682 )
2683 }
2684
2685 pub fn send_disassociate_ind(
2686 &self,
2687 mut ind: &DisassociateIndication,
2688 ) -> Result<(), fidl::Error> {
2689 self.inner.send::<MlmeDisassociateIndRequest>(
2690 (ind,),
2691 0,
2692 0x77ac0ebf387c1f35,
2693 fidl::encoding::DynamicFlags::empty(),
2694 )
2695 }
2696
2697 pub fn send_start_conf(&self, mut resp: &StartConfirm) -> Result<(), fidl::Error> {
2698 self.inner.send::<MlmeStartConfRequest>(
2699 (resp,),
2700 0,
2701 0x15ea6cdf3b8382b3,
2702 fidl::encoding::DynamicFlags::empty(),
2703 )
2704 }
2705
2706 pub fn send_stop_conf(&self, mut resp: &StopConfirm) -> Result<(), fidl::Error> {
2707 self.inner.send::<MlmeStopConfRequest>(
2708 (resp,),
2709 0,
2710 0x50b426ef4a84a2df,
2711 fidl::encoding::DynamicFlags::empty(),
2712 )
2713 }
2714
2715 pub fn send_set_keys_conf(&self, mut conf: &SetKeysConfirm) -> Result<(), fidl::Error> {
2716 self.inner.send::<MlmeSetKeysConfRequest>(
2717 (conf,),
2718 0,
2719 0x5bafb3a8d4039380,
2720 fidl::encoding::DynamicFlags::empty(),
2721 )
2722 }
2723
2724 pub fn send_eapol_conf(&self, mut resp: &EapolConfirm) -> Result<(), fidl::Error> {
2725 self.inner.send::<MlmeEapolConfRequest>(
2726 (resp,),
2727 0,
2728 0x6ffa21f4ee73ce64,
2729 fidl::encoding::DynamicFlags::empty(),
2730 )
2731 }
2732
2733 pub fn send_signal_report(
2734 &self,
2735 mut ind: &fidl_fuchsia_wlan_internal::SignalReportIndication,
2736 ) -> Result<(), fidl::Error> {
2737 self.inner.send::<MlmeSignalReportRequest>(
2738 (ind,),
2739 0,
2740 0x48f32a876aa53d8f,
2741 fidl::encoding::DynamicFlags::empty(),
2742 )
2743 }
2744
2745 pub fn send_eapol_ind(&self, mut ind: &EapolIndication) -> Result<(), fidl::Error> {
2746 self.inner.send::<MlmeEapolIndRequest>(
2747 (ind,),
2748 0,
2749 0x7038dca46a3142fc,
2750 fidl::encoding::DynamicFlags::empty(),
2751 )
2752 }
2753
2754 pub fn send_relay_captured_frame(
2755 &self,
2756 mut result: &CapturedFrameResult,
2757 ) -> Result<(), fidl::Error> {
2758 self.inner.send::<MlmeRelayCapturedFrameRequest>(
2759 (result,),
2760 0,
2761 0x6f00a6f3cff9b1f5,
2762 fidl::encoding::DynamicFlags::empty(),
2763 )
2764 }
2765
2766 pub fn send_on_channel_switched(
2767 &self,
2768 mut info: &fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
2769 ) -> Result<(), fidl::Error> {
2770 self.inner.send::<MlmeOnChannelSwitchedRequest>(
2771 (info,),
2772 0,
2773 0x581750594e4c0c1,
2774 fidl::encoding::DynamicFlags::empty(),
2775 )
2776 }
2777
2778 pub fn send_on_pmk_available(&self, mut info: &PmkInfo) -> Result<(), fidl::Error> {
2779 self.inner.send::<MlmeOnPmkAvailableRequest>(
2780 (info,),
2781 0,
2782 0x1314fc2c79643f90,
2783 fidl::encoding::DynamicFlags::empty(),
2784 )
2785 }
2786
2787 pub fn send_on_sae_handshake_ind(
2788 &self,
2789 mut ind: &SaeHandshakeIndication,
2790 ) -> Result<(), fidl::Error> {
2791 self.inner.send::<MlmeOnSaeHandshakeIndRequest>(
2792 (ind,),
2793 0,
2794 0x6308b10e18986d7e,
2795 fidl::encoding::DynamicFlags::empty(),
2796 )
2797 }
2798
2799 pub fn send_on_sae_frame_rx(&self, mut frame: &SaeFrame) -> Result<(), fidl::Error> {
2800 self.inner.send::<MlmeOnSaeFrameRxRequest>(
2801 (frame,),
2802 0,
2803 0x4ebf51c86ef5f3cd,
2804 fidl::encoding::DynamicFlags::empty(),
2805 )
2806 }
2807
2808 pub fn send_on_wmm_status_resp(
2809 &self,
2810 mut status: i32,
2811 mut resp: &fidl_fuchsia_wlan_internal::WmmStatusResponse,
2812 ) -> Result<(), fidl::Error> {
2813 self.inner.send::<MlmeOnWmmStatusRespRequest>(
2814 (status, resp),
2815 0,
2816 0x53f056b432e7b5cb,
2817 fidl::encoding::DynamicFlags::empty(),
2818 )
2819 }
2820}
2821
2822#[must_use = "FIDL methods require a response to be sent"]
2823#[derive(Debug)]
2824pub struct MlmeQueryDeviceInfoResponder {
2825 control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
2826 tx_id: u32,
2827}
2828
2829impl std::ops::Drop for MlmeQueryDeviceInfoResponder {
2833 fn drop(&mut self) {
2834 self.control_handle.shutdown();
2835 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2837 }
2838}
2839
2840impl fidl::endpoints::Responder for MlmeQueryDeviceInfoResponder {
2841 type ControlHandle = MlmeControlHandle;
2842
2843 fn control_handle(&self) -> &MlmeControlHandle {
2844 &self.control_handle
2845 }
2846
2847 fn drop_without_shutdown(mut self) {
2848 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2850 std::mem::forget(self);
2852 }
2853}
2854
2855impl MlmeQueryDeviceInfoResponder {
2856 pub fn send(self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
2860 let _result = self.send_raw(info);
2861 if _result.is_err() {
2862 self.control_handle.shutdown();
2863 }
2864 self.drop_without_shutdown();
2865 _result
2866 }
2867
2868 pub fn send_no_shutdown_on_err(self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
2870 let _result = self.send_raw(info);
2871 self.drop_without_shutdown();
2872 _result
2873 }
2874
2875 fn send_raw(&self, mut info: &DeviceInfo) -> Result<(), fidl::Error> {
2876 self.control_handle.inner.send::<MlmeQueryDeviceInfoResponse>(
2877 (info,),
2878 self.tx_id,
2879 0x6ee3e7f63f2b7bc0,
2880 fidl::encoding::DynamicFlags::empty(),
2881 )
2882 }
2883}
2884
2885#[must_use = "FIDL methods require a response to be sent"]
2886#[derive(Debug)]
2887pub struct MlmeQueryTelemetrySupportResponder {
2888 control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
2889 tx_id: u32,
2890}
2891
2892impl std::ops::Drop for MlmeQueryTelemetrySupportResponder {
2896 fn drop(&mut self) {
2897 self.control_handle.shutdown();
2898 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2900 }
2901}
2902
2903impl fidl::endpoints::Responder for MlmeQueryTelemetrySupportResponder {
2904 type ControlHandle = MlmeControlHandle;
2905
2906 fn control_handle(&self) -> &MlmeControlHandle {
2907 &self.control_handle
2908 }
2909
2910 fn drop_without_shutdown(mut self) {
2911 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2913 std::mem::forget(self);
2915 }
2916}
2917
2918impl MlmeQueryTelemetrySupportResponder {
2919 pub fn send(
2923 self,
2924 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
2925 ) -> Result<(), fidl::Error> {
2926 let _result = self.send_raw(result);
2927 if _result.is_err() {
2928 self.control_handle.shutdown();
2929 }
2930 self.drop_without_shutdown();
2931 _result
2932 }
2933
2934 pub fn send_no_shutdown_on_err(
2936 self,
2937 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
2938 ) -> Result<(), fidl::Error> {
2939 let _result = self.send_raw(result);
2940 self.drop_without_shutdown();
2941 _result
2942 }
2943
2944 fn send_raw(
2945 &self,
2946 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
2947 ) -> Result<(), fidl::Error> {
2948 self.control_handle
2949 .inner
2950 .send::<fidl::encoding::ResultType<MlmeQueryTelemetrySupportResponse, i32>>(
2951 result.map(|resp| (resp,)),
2952 self.tx_id,
2953 0x1598879b70332c99,
2954 fidl::encoding::DynamicFlags::empty(),
2955 )
2956 }
2957}
2958
2959#[must_use = "FIDL methods require a response to be sent"]
2960#[derive(Debug)]
2961pub struct MlmeGetIfaceStatsResponder {
2962 control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
2963 tx_id: u32,
2964}
2965
2966impl std::ops::Drop for MlmeGetIfaceStatsResponder {
2970 fn drop(&mut self) {
2971 self.control_handle.shutdown();
2972 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2974 }
2975}
2976
2977impl fidl::endpoints::Responder for MlmeGetIfaceStatsResponder {
2978 type ControlHandle = MlmeControlHandle;
2979
2980 fn control_handle(&self) -> &MlmeControlHandle {
2981 &self.control_handle
2982 }
2983
2984 fn drop_without_shutdown(mut self) {
2985 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2987 std::mem::forget(self);
2989 }
2990}
2991
2992impl MlmeGetIfaceStatsResponder {
2993 pub fn send(self, mut resp: &GetIfaceStatsResponse) -> Result<(), fidl::Error> {
2997 let _result = self.send_raw(resp);
2998 if _result.is_err() {
2999 self.control_handle.shutdown();
3000 }
3001 self.drop_without_shutdown();
3002 _result
3003 }
3004
3005 pub fn send_no_shutdown_on_err(
3007 self,
3008 mut resp: &GetIfaceStatsResponse,
3009 ) -> Result<(), fidl::Error> {
3010 let _result = self.send_raw(resp);
3011 self.drop_without_shutdown();
3012 _result
3013 }
3014
3015 fn send_raw(&self, mut resp: &GetIfaceStatsResponse) -> Result<(), fidl::Error> {
3016 self.control_handle.inner.send::<MlmeGetIfaceStatsResponse>(
3017 (resp,),
3018 self.tx_id,
3019 0xede1a8342d1b211,
3020 fidl::encoding::DynamicFlags::empty(),
3021 )
3022 }
3023}
3024
3025#[must_use = "FIDL methods require a response to be sent"]
3026#[derive(Debug)]
3027pub struct MlmeGetIfaceHistogramStatsResponder {
3028 control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3029 tx_id: u32,
3030}
3031
3032impl std::ops::Drop for MlmeGetIfaceHistogramStatsResponder {
3036 fn drop(&mut self) {
3037 self.control_handle.shutdown();
3038 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3040 }
3041}
3042
3043impl fidl::endpoints::Responder for MlmeGetIfaceHistogramStatsResponder {
3044 type ControlHandle = MlmeControlHandle;
3045
3046 fn control_handle(&self) -> &MlmeControlHandle {
3047 &self.control_handle
3048 }
3049
3050 fn drop_without_shutdown(mut self) {
3051 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3053 std::mem::forget(self);
3055 }
3056}
3057
3058impl MlmeGetIfaceHistogramStatsResponder {
3059 pub fn send(self, mut resp: &GetIfaceHistogramStatsResponse) -> Result<(), fidl::Error> {
3063 let _result = self.send_raw(resp);
3064 if _result.is_err() {
3065 self.control_handle.shutdown();
3066 }
3067 self.drop_without_shutdown();
3068 _result
3069 }
3070
3071 pub fn send_no_shutdown_on_err(
3073 self,
3074 mut resp: &GetIfaceHistogramStatsResponse,
3075 ) -> Result<(), fidl::Error> {
3076 let _result = self.send_raw(resp);
3077 self.drop_without_shutdown();
3078 _result
3079 }
3080
3081 fn send_raw(&self, mut resp: &GetIfaceHistogramStatsResponse) -> Result<(), fidl::Error> {
3082 self.control_handle.inner.send::<MlmeGetIfaceHistogramStatsResponse>(
3083 (resp,),
3084 self.tx_id,
3085 0x1979c9d3449f8675,
3086 fidl::encoding::DynamicFlags::empty(),
3087 )
3088 }
3089}
3090
3091#[must_use = "FIDL methods require a response to be sent"]
3092#[derive(Debug)]
3093pub struct MlmeListMinstrelPeersResponder {
3094 control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3095 tx_id: u32,
3096}
3097
3098impl std::ops::Drop for MlmeListMinstrelPeersResponder {
3102 fn drop(&mut self) {
3103 self.control_handle.shutdown();
3104 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3106 }
3107}
3108
3109impl fidl::endpoints::Responder for MlmeListMinstrelPeersResponder {
3110 type ControlHandle = MlmeControlHandle;
3111
3112 fn control_handle(&self) -> &MlmeControlHandle {
3113 &self.control_handle
3114 }
3115
3116 fn drop_without_shutdown(mut self) {
3117 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3119 std::mem::forget(self);
3121 }
3122}
3123
3124impl MlmeListMinstrelPeersResponder {
3125 pub fn send(self, mut resp: &MinstrelListResponse) -> Result<(), fidl::Error> {
3129 let _result = self.send_raw(resp);
3130 if _result.is_err() {
3131 self.control_handle.shutdown();
3132 }
3133 self.drop_without_shutdown();
3134 _result
3135 }
3136
3137 pub fn send_no_shutdown_on_err(
3139 self,
3140 mut resp: &MinstrelListResponse,
3141 ) -> Result<(), fidl::Error> {
3142 let _result = self.send_raw(resp);
3143 self.drop_without_shutdown();
3144 _result
3145 }
3146
3147 fn send_raw(&self, mut resp: &MinstrelListResponse) -> Result<(), fidl::Error> {
3148 self.control_handle.inner.send::<MlmeListMinstrelPeersResponse>(
3149 (resp,),
3150 self.tx_id,
3151 0x4ac5d1e66fe1ffd5,
3152 fidl::encoding::DynamicFlags::empty(),
3153 )
3154 }
3155}
3156
3157#[must_use = "FIDL methods require a response to be sent"]
3158#[derive(Debug)]
3159pub struct MlmeGetMinstrelStatsResponder {
3160 control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3161 tx_id: u32,
3162}
3163
3164impl std::ops::Drop for MlmeGetMinstrelStatsResponder {
3168 fn drop(&mut self) {
3169 self.control_handle.shutdown();
3170 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3172 }
3173}
3174
3175impl fidl::endpoints::Responder for MlmeGetMinstrelStatsResponder {
3176 type ControlHandle = MlmeControlHandle;
3177
3178 fn control_handle(&self) -> &MlmeControlHandle {
3179 &self.control_handle
3180 }
3181
3182 fn drop_without_shutdown(mut self) {
3183 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3185 std::mem::forget(self);
3187 }
3188}
3189
3190impl MlmeGetMinstrelStatsResponder {
3191 pub fn send(self, mut resp: &MinstrelStatsResponse) -> Result<(), fidl::Error> {
3195 let _result = self.send_raw(resp);
3196 if _result.is_err() {
3197 self.control_handle.shutdown();
3198 }
3199 self.drop_without_shutdown();
3200 _result
3201 }
3202
3203 pub fn send_no_shutdown_on_err(
3205 self,
3206 mut resp: &MinstrelStatsResponse,
3207 ) -> Result<(), fidl::Error> {
3208 let _result = self.send_raw(resp);
3209 self.drop_without_shutdown();
3210 _result
3211 }
3212
3213 fn send_raw(&self, mut resp: &MinstrelStatsResponse) -> Result<(), fidl::Error> {
3214 self.control_handle.inner.send::<MlmeGetMinstrelStatsResponse>(
3215 (resp,),
3216 self.tx_id,
3217 0x2f688b1245323f4b,
3218 fidl::encoding::DynamicFlags::empty(),
3219 )
3220 }
3221}
3222
3223#[must_use = "FIDL methods require a response to be sent"]
3224#[derive(Debug)]
3225pub struct MlmeStartCaptureFramesResponder {
3226 control_handle: std::mem::ManuallyDrop<MlmeControlHandle>,
3227 tx_id: u32,
3228}
3229
3230impl std::ops::Drop for MlmeStartCaptureFramesResponder {
3234 fn drop(&mut self) {
3235 self.control_handle.shutdown();
3236 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3238 }
3239}
3240
3241impl fidl::endpoints::Responder for MlmeStartCaptureFramesResponder {
3242 type ControlHandle = MlmeControlHandle;
3243
3244 fn control_handle(&self) -> &MlmeControlHandle {
3245 &self.control_handle
3246 }
3247
3248 fn drop_without_shutdown(mut self) {
3249 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3251 std::mem::forget(self);
3253 }
3254}
3255
3256impl MlmeStartCaptureFramesResponder {
3257 pub fn send(self, mut resp: &StartCaptureFramesResponse) -> Result<(), fidl::Error> {
3261 let _result = self.send_raw(resp);
3262 if _result.is_err() {
3263 self.control_handle.shutdown();
3264 }
3265 self.drop_without_shutdown();
3266 _result
3267 }
3268
3269 pub fn send_no_shutdown_on_err(
3271 self,
3272 mut resp: &StartCaptureFramesResponse,
3273 ) -> Result<(), fidl::Error> {
3274 let _result = self.send_raw(resp);
3275 self.drop_without_shutdown();
3276 _result
3277 }
3278
3279 fn send_raw(&self, mut resp: &StartCaptureFramesResponse) -> Result<(), fidl::Error> {
3280 self.control_handle.inner.send::<MlmeStartCaptureFramesResponse>(
3281 (resp,),
3282 self.tx_id,
3283 0x23b369ed5749ee69,
3284 fidl::encoding::DynamicFlags::empty(),
3285 )
3286 }
3287}
3288
3289mod internal {
3290 use super::*;
3291
3292 impl fidl::encoding::ResourceTypeMarker for ConnectorConnectRequest {
3293 type Borrowed<'a> = &'a mut Self;
3294 fn take_or_borrow<'a>(
3295 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
3296 ) -> Self::Borrowed<'a> {
3297 value
3298 }
3299 }
3300
3301 unsafe impl fidl::encoding::TypeMarker for ConnectorConnectRequest {
3302 type Owned = Self;
3303
3304 #[inline(always)]
3305 fn inline_align(_context: fidl::encoding::Context) -> usize {
3306 4
3307 }
3308
3309 #[inline(always)]
3310 fn inline_size(_context: fidl::encoding::Context) -> usize {
3311 4
3312 }
3313 }
3314
3315 unsafe impl
3316 fidl::encoding::Encode<
3317 ConnectorConnectRequest,
3318 fidl::encoding::DefaultFuchsiaResourceDialect,
3319 > for &mut ConnectorConnectRequest
3320 {
3321 #[inline]
3322 unsafe fn encode(
3323 self,
3324 encoder: &mut fidl::encoding::Encoder<
3325 '_,
3326 fidl::encoding::DefaultFuchsiaResourceDialect,
3327 >,
3328 offset: usize,
3329 _depth: fidl::encoding::Depth,
3330 ) -> fidl::Result<()> {
3331 encoder.debug_check_bounds::<ConnectorConnectRequest>(offset);
3332 fidl::encoding::Encode::<ConnectorConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
3334 (
3335 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.request),
3336 ),
3337 encoder, offset, _depth
3338 )
3339 }
3340 }
3341 unsafe impl<
3342 T0: fidl::encoding::Encode<
3343 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>>,
3344 fidl::encoding::DefaultFuchsiaResourceDialect,
3345 >,
3346 >
3347 fidl::encoding::Encode<
3348 ConnectorConnectRequest,
3349 fidl::encoding::DefaultFuchsiaResourceDialect,
3350 > for (T0,)
3351 {
3352 #[inline]
3353 unsafe fn encode(
3354 self,
3355 encoder: &mut fidl::encoding::Encoder<
3356 '_,
3357 fidl::encoding::DefaultFuchsiaResourceDialect,
3358 >,
3359 offset: usize,
3360 depth: fidl::encoding::Depth,
3361 ) -> fidl::Result<()> {
3362 encoder.debug_check_bounds::<ConnectorConnectRequest>(offset);
3363 self.0.encode(encoder, offset + 0, depth)?;
3367 Ok(())
3368 }
3369 }
3370
3371 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
3372 for ConnectorConnectRequest
3373 {
3374 #[inline(always)]
3375 fn new_empty() -> Self {
3376 Self {
3377 request: fidl::new_empty!(
3378 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>>,
3379 fidl::encoding::DefaultFuchsiaResourceDialect
3380 ),
3381 }
3382 }
3383
3384 #[inline]
3385 unsafe fn decode(
3386 &mut self,
3387 decoder: &mut fidl::encoding::Decoder<
3388 '_,
3389 fidl::encoding::DefaultFuchsiaResourceDialect,
3390 >,
3391 offset: usize,
3392 _depth: fidl::encoding::Depth,
3393 ) -> fidl::Result<()> {
3394 decoder.debug_check_bounds::<Self>(offset);
3395 fidl::decode!(
3397 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<MlmeMarker>>,
3398 fidl::encoding::DefaultFuchsiaResourceDialect,
3399 &mut self.request,
3400 decoder,
3401 offset + 0,
3402 _depth
3403 )?;
3404 Ok(())
3405 }
3406 }
3407}