1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_fuchsia_wlan_phy::natural::*;
8
9 #[derive(Debug, Default, PartialEq)]
10 pub struct WlanPhyInitRequest {
11 pub notify_client: ::core::option::Option<
12 ::fidl_next::ClientEnd<crate::WlanPhyNotify, ::fidl_next::fuchsia::zx::Channel>,
13 >,
14 }
15
16 impl WlanPhyInitRequest {
17 fn __max_ordinal(&self) -> usize {
18 if self.notify_client.is_some() {
19 return 1;
20 }
21
22 0
23 }
24 }
25
26 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanPhyInitRequest<'static>, ___E>
27 for WlanPhyInitRequest
28 where
29 ___E: ::fidl_next::Encoder + ?Sized,
30 ___E: ::fidl_next::fuchsia::HandleEncoder,
31 {
32 #[inline]
33 fn encode(
34 mut self,
35 encoder: &mut ___E,
36 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanPhyInitRequest<'static>>,
37 _: (),
38 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
39 ::fidl_next::munge!(let crate::wire::WlanPhyInitRequest { table } = out);
40
41 let max_ord = self.__max_ordinal();
42
43 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
44 ::fidl_next::Wire::zero_padding(&mut out);
45
46 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
47 ::fidl_next::wire::Envelope,
48 >(encoder, max_ord);
49
50 for i in 1..=max_ord {
51 match i {
52 1 => {
53 if let Some(value) = self.notify_client.take() {
54 ::fidl_next::wire::Envelope::encode_value::<
55 ::fidl_next::ClientEnd<
56 crate::WlanPhyNotify,
57 ::fidl_next::wire::fuchsia::Channel,
58 >,
59 ___E,
60 >(
61 value, preallocated.encoder, &mut out, ()
62 )?;
63 } else {
64 ::fidl_next::wire::Envelope::encode_zero(&mut out)
65 }
66 }
67
68 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
69 }
70 unsafe {
71 preallocated.write_next(out.assume_init_ref());
72 }
73 }
74
75 ::fidl_next::wire::Table::encode_len(table, max_ord);
76
77 Ok(())
78 }
79 }
80
81 impl<'de> ::fidl_next::FromWire<crate::wire::WlanPhyInitRequest<'de>> for WlanPhyInitRequest {
82 #[inline]
83 fn from_wire(wire_: crate::wire::WlanPhyInitRequest<'de>) -> Self {
84 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
85
86 let notify_client = wire_.table.get(1);
87
88 Self {
89 notify_client: notify_client.map(|envelope| {
90 ::fidl_next::FromWire::from_wire(unsafe {
91 envelope.read_unchecked::<::fidl_next::ClientEnd<
92 crate::WlanPhyNotify,
93 ::fidl_next::wire::fuchsia::Channel,
94 >>()
95 })
96 }),
97 }
98 }
99 }
100
101 #[derive(Debug, Default, PartialEq)]
102 pub struct WlanPhyCreateIfaceRequest {
103 pub role: ::core::option::Option<::fidl_next_fuchsia_wlan_common::natural::WlanMacRole>,
104
105 pub mlme_channel: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
106
107 pub init_sta_addr: ::core::option::Option<[u8; 6]>,
108 }
109
110 impl WlanPhyCreateIfaceRequest {
111 fn __max_ordinal(&self) -> usize {
112 if self.init_sta_addr.is_some() {
113 return 3;
114 }
115
116 if self.mlme_channel.is_some() {
117 return 2;
118 }
119
120 if self.role.is_some() {
121 return 1;
122 }
123
124 0
125 }
126 }
127
128 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanPhyCreateIfaceRequest<'static>, ___E>
129 for WlanPhyCreateIfaceRequest
130 where
131 ___E: ::fidl_next::Encoder + ?Sized,
132 ___E: ::fidl_next::fuchsia::HandleEncoder,
133 {
134 #[inline]
135 fn encode(
136 mut self,
137 encoder: &mut ___E,
138 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanPhyCreateIfaceRequest<'static>>,
139 _: (),
140 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
141 ::fidl_next::munge!(let crate::wire::WlanPhyCreateIfaceRequest { table } = out);
142
143 let max_ord = self.__max_ordinal();
144
145 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
146 ::fidl_next::Wire::zero_padding(&mut out);
147
148 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
149 ::fidl_next::wire::Envelope,
150 >(encoder, max_ord);
151
152 for i in 1..=max_ord {
153 match i {
154 3 => {
155 if let Some(value) = self.init_sta_addr.take() {
156 ::fidl_next::wire::Envelope::encode_value::<[u8; 6], ___E>(
157 value,
158 preallocated.encoder,
159 &mut out,
160 (),
161 )?;
162 } else {
163 ::fidl_next::wire::Envelope::encode_zero(&mut out)
164 }
165 }
166
167 2 => {
168 if let Some(value) = self.mlme_channel.take() {
169 ::fidl_next::wire::Envelope::encode_value::<
170 ::fidl_next::wire::fuchsia::Channel,
171 ___E,
172 >(
173 value, preallocated.encoder, &mut out, ()
174 )?;
175 } else {
176 ::fidl_next::wire::Envelope::encode_zero(&mut out)
177 }
178 }
179
180 1 => {
181 if let Some(value) = self.role.take() {
182 ::fidl_next::wire::Envelope::encode_value::<
183 ::fidl_next_fuchsia_wlan_common::wire::WlanMacRole,
184 ___E,
185 >(
186 value, preallocated.encoder, &mut out, ()
187 )?;
188 } else {
189 ::fidl_next::wire::Envelope::encode_zero(&mut out)
190 }
191 }
192
193 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
194 }
195 unsafe {
196 preallocated.write_next(out.assume_init_ref());
197 }
198 }
199
200 ::fidl_next::wire::Table::encode_len(table, max_ord);
201
202 Ok(())
203 }
204 }
205
206 impl<'de> ::fidl_next::FromWire<crate::wire::WlanPhyCreateIfaceRequest<'de>>
207 for WlanPhyCreateIfaceRequest
208 {
209 #[inline]
210 fn from_wire(wire_: crate::wire::WlanPhyCreateIfaceRequest<'de>) -> Self {
211 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
212
213 let role = wire_.table.get(1);
214
215 let mlme_channel = wire_.table.get(2);
216
217 let init_sta_addr = wire_.table.get(3);
218
219 Self {
220 role: role.map(|envelope| {
221 ::fidl_next::FromWire::from_wire(unsafe {
222 envelope
223 .read_unchecked::<::fidl_next_fuchsia_wlan_common::wire::WlanMacRole>()
224 })
225 }),
226
227 mlme_channel: mlme_channel.map(|envelope| {
228 ::fidl_next::FromWire::from_wire(unsafe {
229 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
230 })
231 }),
232
233 init_sta_addr: init_sta_addr.map(|envelope| {
234 ::fidl_next::FromWire::from_wire(unsafe {
235 envelope.read_unchecked::<[u8; 6]>()
236 })
237 }),
238 }
239 }
240 }
241}
242
243pub mod wire {
244
245 pub use fidl_next_common_fuchsia_wlan_phy::wire::*;
246
247 #[repr(C)]
249 pub struct WlanPhyInitRequest<'de> {
250 pub(crate) table: ::fidl_next::wire::Table<'de>,
251 }
252
253 impl<'de> Drop for WlanPhyInitRequest<'de> {
254 fn drop(&mut self) {
255 let _ = self.table.get(1).map(|envelope| unsafe {
256 envelope.read_unchecked::<::fidl_next::ClientEnd<
257 crate::WlanPhyNotify,
258 ::fidl_next::wire::fuchsia::Channel,
259 >>()
260 });
261 }
262 }
263
264 impl ::fidl_next::Constrained for WlanPhyInitRequest<'_> {
265 type Constraint = ();
266
267 fn validate(
268 _: ::fidl_next::Slot<'_, Self>,
269 _: Self::Constraint,
270 ) -> Result<(), ::fidl_next::ValidationError> {
271 Ok(())
272 }
273 }
274
275 unsafe impl ::fidl_next::Wire for WlanPhyInitRequest<'static> {
276 type Narrowed<'de> = WlanPhyInitRequest<'de>;
277
278 #[inline]
279 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
280 ::fidl_next::munge!(let Self { table } = out);
281 ::fidl_next::wire::Table::zero_padding(table);
282 }
283 }
284
285 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WlanPhyInitRequest<'de>
286 where
287 ___D: ::fidl_next::Decoder<'de> + ?Sized,
288 ___D: ::fidl_next::fuchsia::HandleDecoder,
289 {
290 fn decode(
291 slot: ::fidl_next::Slot<'_, Self>,
292 decoder: &mut ___D,
293 _: (),
294 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
295 ::fidl_next::munge!(let Self { table } = slot);
296
297 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
298 match ordinal {
299 0 => unsafe { ::core::hint::unreachable_unchecked() },
300
301 1 => {
302 ::fidl_next::wire::Envelope::decode_as::<
303 ___D,
304 ::fidl_next::ClientEnd<
305 crate::WlanPhyNotify,
306 ::fidl_next::wire::fuchsia::Channel,
307 >,
308 >(slot.as_mut(), decoder, ())?;
309
310 Ok(())
311 }
312
313 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
314 }
315 })
316 }
317 }
318
319 impl<'de> WlanPhyInitRequest<'de> {
320 pub fn notify_client(
321 &self,
322 ) -> ::core::option::Option<
323 &::fidl_next::ClientEnd<crate::WlanPhyNotify, ::fidl_next::wire::fuchsia::Channel>,
324 > {
325 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
326 }
327
328 pub fn take_notify_client(
329 &mut self,
330 ) -> ::core::option::Option<
331 ::fidl_next::ClientEnd<crate::WlanPhyNotify, ::fidl_next::wire::fuchsia::Channel>,
332 > {
333 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
334 }
335 }
336
337 impl<'de> ::core::fmt::Debug for WlanPhyInitRequest<'de> {
338 fn fmt(
339 &self,
340 f: &mut ::core::fmt::Formatter<'_>,
341 ) -> ::core::result::Result<(), ::core::fmt::Error> {
342 f.debug_struct("WlanPhyInitRequest")
343 .field("notify_client", &self.notify_client())
344 .finish()
345 }
346 }
347
348 impl<'de> ::fidl_next::IntoNatural for WlanPhyInitRequest<'de> {
349 type Natural = crate::natural::WlanPhyInitRequest;
350 }
351
352 #[repr(C)]
354 pub struct WlanPhyCreateIfaceRequest<'de> {
355 pub(crate) table: ::fidl_next::wire::Table<'de>,
356 }
357
358 impl<'de> Drop for WlanPhyCreateIfaceRequest<'de> {
359 fn drop(&mut self) {
360 let _ = self.table.get(1).map(|envelope| unsafe {
361 envelope.read_unchecked::<::fidl_next_fuchsia_wlan_common::wire::WlanMacRole>()
362 });
363
364 let _ = self.table.get(2).map(|envelope| unsafe {
365 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
366 });
367
368 let _ =
369 self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 6]>() });
370 }
371 }
372
373 impl ::fidl_next::Constrained for WlanPhyCreateIfaceRequest<'_> {
374 type Constraint = ();
375
376 fn validate(
377 _: ::fidl_next::Slot<'_, Self>,
378 _: Self::Constraint,
379 ) -> Result<(), ::fidl_next::ValidationError> {
380 Ok(())
381 }
382 }
383
384 unsafe impl ::fidl_next::Wire for WlanPhyCreateIfaceRequest<'static> {
385 type Narrowed<'de> = WlanPhyCreateIfaceRequest<'de>;
386
387 #[inline]
388 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
389 ::fidl_next::munge!(let Self { table } = out);
390 ::fidl_next::wire::Table::zero_padding(table);
391 }
392 }
393
394 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WlanPhyCreateIfaceRequest<'de>
395 where
396 ___D: ::fidl_next::Decoder<'de> + ?Sized,
397 ___D: ::fidl_next::fuchsia::HandleDecoder,
398 {
399 fn decode(
400 slot: ::fidl_next::Slot<'_, Self>,
401 decoder: &mut ___D,
402 _: (),
403 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
404 ::fidl_next::munge!(let Self { table } = slot);
405
406 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
407 match ordinal {
408 0 => unsafe { ::core::hint::unreachable_unchecked() },
409
410 1 => {
411 ::fidl_next::wire::Envelope::decode_as::<
412 ___D,
413 ::fidl_next_fuchsia_wlan_common::wire::WlanMacRole,
414 >(slot.as_mut(), decoder, ())?;
415
416 Ok(())
417 }
418
419 2 => {
420 ::fidl_next::wire::Envelope::decode_as::<
421 ___D,
422 ::fidl_next::wire::fuchsia::Channel,
423 >(slot.as_mut(), decoder, ())?;
424
425 Ok(())
426 }
427
428 3 => {
429 ::fidl_next::wire::Envelope::decode_as::<___D, [u8; 6]>(
430 slot.as_mut(),
431 decoder,
432 (),
433 )?;
434
435 Ok(())
436 }
437
438 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
439 }
440 })
441 }
442 }
443
444 impl<'de> WlanPhyCreateIfaceRequest<'de> {
445 pub fn role(
446 &self,
447 ) -> ::core::option::Option<&::fidl_next_fuchsia_wlan_common::wire::WlanMacRole> {
448 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
449 }
450
451 pub fn take_role(
452 &mut self,
453 ) -> ::core::option::Option<::fidl_next_fuchsia_wlan_common::wire::WlanMacRole> {
454 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
455 }
456
457 pub fn mlme_channel(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Channel> {
458 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
459 }
460
461 pub fn take_mlme_channel(
462 &mut self,
463 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Channel> {
464 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
465 }
466
467 pub fn init_sta_addr(&self) -> ::core::option::Option<&[u8; 6]> {
468 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
469 }
470
471 pub fn take_init_sta_addr(&mut self) -> ::core::option::Option<[u8; 6]> {
472 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
473 }
474 }
475
476 impl<'de> ::core::fmt::Debug for WlanPhyCreateIfaceRequest<'de> {
477 fn fmt(
478 &self,
479 f: &mut ::core::fmt::Formatter<'_>,
480 ) -> ::core::result::Result<(), ::core::fmt::Error> {
481 f.debug_struct("WlanPhyCreateIfaceRequest")
482 .field("role", &self.role())
483 .field("mlme_channel", &self.mlme_channel())
484 .field("init_sta_addr", &self.init_sta_addr())
485 .finish()
486 }
487 }
488
489 impl<'de> ::fidl_next::IntoNatural for WlanPhyCreateIfaceRequest<'de> {
490 type Natural = crate::natural::WlanPhyCreateIfaceRequest;
491 }
492}
493
494pub mod wire_optional {
495
496 pub use fidl_next_common_fuchsia_wlan_phy::wire_optional::*;
497}
498
499pub mod generic {
500
501 pub use fidl_next_common_fuchsia_wlan_phy::generic::*;
502}
503
504pub use self::natural::*;
505
506#[derive(Debug)]
508pub struct Service;
509
510impl ::fidl_next::DiscoverableService for Service {
511 const SERVICE_NAME: &'static str = "fuchsia.wlan.phy.Service";
512 const MEMBER_NAMES: &'static [&'static str] = &["device"];
513}
514
515impl ::fidl_next::HasServiceRequest<::fidl_next::fuchsia::zx::Channel> for Service {}
516
517impl<___C> ::fidl_next::Service<___C> for Service
518where
519 ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
520{
521 type Connector = ServiceConnector<___C>;
522}
523
524#[repr(transparent)]
526pub struct ServiceConnector<___C> {
527 #[allow(dead_code)]
528 connector: ___C,
529}
530
531impl<___C> ServiceConnector<___C>
532where
533 ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
534{
535 pub fn device(
537 &self,
538 server_end: ::fidl_next::ServerEnd<crate::WlanPhy, ::fidl_next::fuchsia::zx::Channel>,
539 ) -> ::core::result::Result<
540 (),
541 <___C as ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>>::Error,
542 > {
543 ::fidl_next::protocol::ServiceConnector::<
544 ::fidl_next::fuchsia::zx::Channel
545 >::connect_to_member(
546 &self.connector,
547 "device",
548 server_end.into_untyped(),
549 )
550 }
551}
552
553pub trait ServiceHandler {
555 fn device(
557 &self,
558 server_end: ::fidl_next::ServerEnd<crate::WlanPhy, ::fidl_next::fuchsia::zx::Channel>,
559 );
560}
561
562impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for Service
563where
564 ___H: ServiceHandler,
565 ::fidl_next::fuchsia::zx::Channel: ::fidl_next::InstanceFromServiceTransport<___T>,
566{
567 fn on_connection(handler: &___H, member: &str, server_end: ___T) {
568 use ::fidl_next::InstanceFromServiceTransport;
569 match member {
570 "device" => handler.device(::fidl_next::ServerEnd::from_untyped(
571 ::fidl_next::fuchsia::zx::Channel::from_service_transport(server_end),
572 )),
573
574 _ => unreachable!(),
575 }
576 }
577}
578
579#[derive(PartialEq, Debug)]
581pub struct WlanPhy;
582
583impl ::fidl_next::Discoverable for WlanPhy {
584 const PROTOCOL_NAME: &'static str = "fuchsia.wlan.phy.WlanPhy";
585}
586
587#[cfg(target_os = "fuchsia")]
588impl ::fidl_next::HasTransport for WlanPhy {
589 type Transport = ::fidl_next::fuchsia::zx::Channel;
590}
591
592pub mod wlan_phy {
593 pub mod prelude {
594 pub use crate::{
595 WlanPhy, WlanPhyClientHandler, WlanPhyLocalClientHandler, WlanPhyLocalServerHandler,
596 WlanPhyServerHandler, wlan_phy,
597 };
598
599 pub use crate::natural::WlanPhyCreateIfaceRequest;
600
601 pub use crate::natural::WlanPhyDestroyIfaceRequest;
602
603 pub use crate::natural::WlanPhyInitRequest;
604
605 pub use crate::natural::WlanPhySetBtCoexistenceModeRequest;
606
607 pub use crate::natural::WlanPhySetCountryRequest;
608
609 pub use crate::natural::WlanPhySetPowerSaveModeRequest;
610
611 pub use crate::natural::WlanPhySetTxPowerScenarioRequest;
612
613 pub use crate::natural::WlanPhyClearCountryResponse;
614
615 pub use crate::natural::WlanPhyCreateIfaceResponse;
616
617 pub use crate::natural::WlanPhyDestroyIfaceResponse;
618
619 pub use crate::natural::WlanPhyGetCountryResponse;
620
621 pub use crate::natural::WlanPhyGetPowerSaveModeResponse;
622
623 pub use crate::natural::WlanPhyGetPowerStateResponse;
624
625 pub use crate::natural::WlanPhyGetSupportedMacRolesResponse;
626
627 pub use crate::natural::WlanPhyGetTxPowerScenarioResponse;
628
629 pub use crate::natural::WlanPhyInitResponse;
630
631 pub use crate::natural::WlanPhyPowerDownResponse;
632
633 pub use crate::natural::WlanPhyPowerUpResponse;
634
635 pub use crate::natural::WlanPhyResetTxPowerScenarioResponse;
636
637 pub use crate::natural::WlanPhyResetResponse;
638
639 pub use crate::natural::WlanPhySetBtCoexistenceModeResponse;
640
641 pub use crate::natural::WlanPhySetCountryResponse;
642
643 pub use crate::natural::WlanPhySetPowerSaveModeResponse;
644
645 pub use crate::natural::WlanPhySetTxPowerScenarioResponse;
646 }
647
648 pub struct Init;
649
650 impl ::fidl_next::Method for Init {
651 const ORDINAL: u64 = 4152290172424220659;
652 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
653 ::fidl_next::protocol::Flexibility::Flexible;
654
655 type Protocol = crate::WlanPhy;
656
657 type Request = crate::wire::WlanPhyInitRequest<'static>;
658 }
659
660 impl ::fidl_next::TwoWayMethod for Init {
661 type Response = ::fidl_next::wire::Result<
662 'static,
663 crate::wire::WlanPhyInitResponse,
664 ::fidl_next::wire::fuchsia::Status,
665 >;
666 }
667
668 impl<___R> ::fidl_next::Respond<___R> for Init {
669 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
670
671 fn respond(response: ___R) -> Self::Output {
672 ::core::result::Result::Ok(response)
673 }
674 }
675
676 impl<___R> ::fidl_next::RespondErr<___R> for Init {
677 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
678
679 fn respond_err(response: ___R) -> Self::Output {
680 ::core::result::Result::Err(response)
681 }
682 }
683
684 pub struct GetSupportedMacRoles;
685
686 impl ::fidl_next::Method for GetSupportedMacRoles {
687 const ORDINAL: u64 = 3929702727467848522;
688 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
689 ::fidl_next::protocol::Flexibility::Flexible;
690
691 type Protocol = crate::WlanPhy;
692
693 type Request = ::fidl_next::wire::EmptyMessageBody;
694 }
695
696 impl ::fidl_next::TwoWayMethod for GetSupportedMacRoles {
697 type Response = ::fidl_next::wire::Result<
698 'static,
699 crate::wire::WlanPhyGetSupportedMacRolesResponse<'static>,
700 ::fidl_next::wire::fuchsia::Status,
701 >;
702 }
703
704 impl<___R> ::fidl_next::Respond<___R> for GetSupportedMacRoles {
705 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
706
707 fn respond(response: ___R) -> Self::Output {
708 ::core::result::Result::Ok(response)
709 }
710 }
711
712 impl<___R> ::fidl_next::RespondErr<___R> for GetSupportedMacRoles {
713 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
714
715 fn respond_err(response: ___R) -> Self::Output {
716 ::core::result::Result::Err(response)
717 }
718 }
719
720 pub struct CreateIface;
721
722 impl ::fidl_next::Method for CreateIface {
723 const ORDINAL: u64 = 5530435827689044878;
724 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
725 ::fidl_next::protocol::Flexibility::Flexible;
726
727 type Protocol = crate::WlanPhy;
728
729 type Request = crate::wire::WlanPhyCreateIfaceRequest<'static>;
730 }
731
732 impl ::fidl_next::TwoWayMethod for CreateIface {
733 type Response = ::fidl_next::wire::Result<
734 'static,
735 crate::wire::WlanPhyCreateIfaceResponse<'static>,
736 ::fidl_next::wire::fuchsia::Status,
737 >;
738 }
739
740 impl<___R> ::fidl_next::Respond<___R> for CreateIface {
741 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
742
743 fn respond(response: ___R) -> Self::Output {
744 ::core::result::Result::Ok(response)
745 }
746 }
747
748 impl<___R> ::fidl_next::RespondErr<___R> for CreateIface {
749 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
750
751 fn respond_err(response: ___R) -> Self::Output {
752 ::core::result::Result::Err(response)
753 }
754 }
755
756 pub struct DestroyIface;
757
758 impl ::fidl_next::Method for DestroyIface {
759 const ORDINAL: u64 = 1127035624611379388;
760 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
761 ::fidl_next::protocol::Flexibility::Flexible;
762
763 type Protocol = crate::WlanPhy;
764
765 type Request = crate::wire::WlanPhyDestroyIfaceRequest<'static>;
766 }
767
768 impl ::fidl_next::TwoWayMethod for DestroyIface {
769 type Response = ::fidl_next::wire::Result<
770 'static,
771 crate::wire::WlanPhyDestroyIfaceResponse,
772 ::fidl_next::wire::fuchsia::Status,
773 >;
774 }
775
776 impl<___R> ::fidl_next::Respond<___R> for DestroyIface {
777 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
778
779 fn respond(response: ___R) -> Self::Output {
780 ::core::result::Result::Ok(response)
781 }
782 }
783
784 impl<___R> ::fidl_next::RespondErr<___R> for DestroyIface {
785 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
786
787 fn respond_err(response: ___R) -> Self::Output {
788 ::core::result::Result::Err(response)
789 }
790 }
791
792 pub struct SetCountry;
793
794 impl ::fidl_next::Method for SetCountry {
795 const ORDINAL: u64 = 7859442075277675023;
796 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
797 ::fidl_next::protocol::Flexibility::Flexible;
798
799 type Protocol = crate::WlanPhy;
800
801 type Request = crate::wire::WlanPhySetCountryRequest;
802 }
803
804 impl ::fidl_next::TwoWayMethod for SetCountry {
805 type Response = ::fidl_next::wire::Result<
806 'static,
807 crate::wire::WlanPhySetCountryResponse,
808 ::fidl_next::wire::fuchsia::Status,
809 >;
810 }
811
812 impl<___R> ::fidl_next::Respond<___R> for SetCountry {
813 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
814
815 fn respond(response: ___R) -> Self::Output {
816 ::core::result::Result::Ok(response)
817 }
818 }
819
820 impl<___R> ::fidl_next::RespondErr<___R> for SetCountry {
821 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
822
823 fn respond_err(response: ___R) -> Self::Output {
824 ::core::result::Result::Err(response)
825 }
826 }
827
828 pub struct ClearCountry;
829
830 impl ::fidl_next::Method for ClearCountry {
831 const ORDINAL: u64 = 8355078711339303759;
832 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
833 ::fidl_next::protocol::Flexibility::Flexible;
834
835 type Protocol = crate::WlanPhy;
836
837 type Request = ::fidl_next::wire::EmptyMessageBody;
838 }
839
840 impl ::fidl_next::TwoWayMethod for ClearCountry {
841 type Response = ::fidl_next::wire::Result<
842 'static,
843 crate::wire::WlanPhyClearCountryResponse,
844 ::fidl_next::wire::fuchsia::Status,
845 >;
846 }
847
848 impl<___R> ::fidl_next::Respond<___R> for ClearCountry {
849 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
850
851 fn respond(response: ___R) -> Self::Output {
852 ::core::result::Result::Ok(response)
853 }
854 }
855
856 impl<___R> ::fidl_next::RespondErr<___R> for ClearCountry {
857 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
858
859 fn respond_err(response: ___R) -> Self::Output {
860 ::core::result::Result::Err(response)
861 }
862 }
863
864 pub struct GetCountry;
865
866 impl ::fidl_next::Method for GetCountry {
867 const ORDINAL: u64 = 1436134059072311418;
868 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
869 ::fidl_next::protocol::Flexibility::Flexible;
870
871 type Protocol = crate::WlanPhy;
872
873 type Request = ::fidl_next::wire::EmptyMessageBody;
874 }
875
876 impl ::fidl_next::TwoWayMethod for GetCountry {
877 type Response = ::fidl_next::wire::Result<
878 'static,
879 crate::wire::WlanPhyGetCountryResponse,
880 ::fidl_next::wire::fuchsia::Status,
881 >;
882 }
883
884 impl<___R> ::fidl_next::Respond<___R> for GetCountry {
885 type Output = ::core::result::Result<
886 crate::generic::WlanPhyGetCountryResponse<___R>,
887 ::fidl_next::never::Never,
888 >;
889
890 fn respond(response: ___R) -> Self::Output {
891 ::core::result::Result::Ok(crate::generic::WlanPhyGetCountryResponse {
892 country: response,
893 })
894 }
895 }
896
897 impl<___R> ::fidl_next::RespondErr<___R> for GetCountry {
898 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
899
900 fn respond_err(response: ___R) -> Self::Output {
901 ::core::result::Result::Err(response)
902 }
903 }
904
905 pub struct SetPowerSaveMode;
906
907 impl ::fidl_next::Method for SetPowerSaveMode {
908 const ORDINAL: u64 = 5626768781239879949;
909 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
910 ::fidl_next::protocol::Flexibility::Flexible;
911
912 type Protocol = crate::WlanPhy;
913
914 type Request = crate::wire::WlanPhySetPowerSaveModeRequest<'static>;
915 }
916
917 impl ::fidl_next::TwoWayMethod for SetPowerSaveMode {
918 type Response = ::fidl_next::wire::Result<
919 'static,
920 crate::wire::WlanPhySetPowerSaveModeResponse,
921 ::fidl_next::wire::fuchsia::Status,
922 >;
923 }
924
925 impl<___R> ::fidl_next::Respond<___R> for SetPowerSaveMode {
926 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
927
928 fn respond(response: ___R) -> Self::Output {
929 ::core::result::Result::Ok(response)
930 }
931 }
932
933 impl<___R> ::fidl_next::RespondErr<___R> for SetPowerSaveMode {
934 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
935
936 fn respond_err(response: ___R) -> Self::Output {
937 ::core::result::Result::Err(response)
938 }
939 }
940
941 pub struct GetPowerSaveMode;
942
943 impl ::fidl_next::Method for GetPowerSaveMode {
944 const ORDINAL: u64 = 2070868099982362662;
945 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
946 ::fidl_next::protocol::Flexibility::Flexible;
947
948 type Protocol = crate::WlanPhy;
949
950 type Request = ::fidl_next::wire::EmptyMessageBody;
951 }
952
953 impl ::fidl_next::TwoWayMethod for GetPowerSaveMode {
954 type Response = ::fidl_next::wire::Result<
955 'static,
956 crate::wire::WlanPhyGetPowerSaveModeResponse<'static>,
957 ::fidl_next::wire::fuchsia::Status,
958 >;
959 }
960
961 impl<___R> ::fidl_next::Respond<___R> for GetPowerSaveMode {
962 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
963
964 fn respond(response: ___R) -> Self::Output {
965 ::core::result::Result::Ok(response)
966 }
967 }
968
969 impl<___R> ::fidl_next::RespondErr<___R> for GetPowerSaveMode {
970 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
971
972 fn respond_err(response: ___R) -> Self::Output {
973 ::core::result::Result::Err(response)
974 }
975 }
976
977 pub struct PowerDown;
978
979 impl ::fidl_next::Method for PowerDown {
980 const ORDINAL: u64 = 8789636981017894154;
981 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
982 ::fidl_next::protocol::Flexibility::Flexible;
983
984 type Protocol = crate::WlanPhy;
985
986 type Request = ::fidl_next::wire::EmptyMessageBody;
987 }
988
989 impl ::fidl_next::TwoWayMethod for PowerDown {
990 type Response = ::fidl_next::wire::Result<
991 'static,
992 crate::wire::WlanPhyPowerDownResponse,
993 ::fidl_next::wire::fuchsia::Status,
994 >;
995 }
996
997 impl<___R> ::fidl_next::Respond<___R> for PowerDown {
998 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
999
1000 fn respond(response: ___R) -> Self::Output {
1001 ::core::result::Result::Ok(response)
1002 }
1003 }
1004
1005 impl<___R> ::fidl_next::RespondErr<___R> for PowerDown {
1006 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1007
1008 fn respond_err(response: ___R) -> Self::Output {
1009 ::core::result::Result::Err(response)
1010 }
1011 }
1012
1013 pub struct PowerUp;
1014
1015 impl ::fidl_next::Method for PowerUp {
1016 const ORDINAL: u64 = 7912237011574232306;
1017 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1018 ::fidl_next::protocol::Flexibility::Flexible;
1019
1020 type Protocol = crate::WlanPhy;
1021
1022 type Request = ::fidl_next::wire::EmptyMessageBody;
1023 }
1024
1025 impl ::fidl_next::TwoWayMethod for PowerUp {
1026 type Response = ::fidl_next::wire::Result<
1027 'static,
1028 crate::wire::WlanPhyPowerUpResponse,
1029 ::fidl_next::wire::fuchsia::Status,
1030 >;
1031 }
1032
1033 impl<___R> ::fidl_next::Respond<___R> for PowerUp {
1034 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1035
1036 fn respond(response: ___R) -> Self::Output {
1037 ::core::result::Result::Ok(response)
1038 }
1039 }
1040
1041 impl<___R> ::fidl_next::RespondErr<___R> for PowerUp {
1042 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1043
1044 fn respond_err(response: ___R) -> Self::Output {
1045 ::core::result::Result::Err(response)
1046 }
1047 }
1048
1049 pub struct Reset;
1050
1051 impl ::fidl_next::Method for Reset {
1052 const ORDINAL: u64 = 3390961545241598095;
1053 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1054 ::fidl_next::protocol::Flexibility::Flexible;
1055
1056 type Protocol = crate::WlanPhy;
1057
1058 type Request = ::fidl_next::wire::EmptyMessageBody;
1059 }
1060
1061 impl ::fidl_next::TwoWayMethod for Reset {
1062 type Response = ::fidl_next::wire::Result<
1063 'static,
1064 crate::wire::WlanPhyResetResponse,
1065 ::fidl_next::wire::fuchsia::Status,
1066 >;
1067 }
1068
1069 impl<___R> ::fidl_next::Respond<___R> for Reset {
1070 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1071
1072 fn respond(response: ___R) -> Self::Output {
1073 ::core::result::Result::Ok(response)
1074 }
1075 }
1076
1077 impl<___R> ::fidl_next::RespondErr<___R> for Reset {
1078 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1079
1080 fn respond_err(response: ___R) -> Self::Output {
1081 ::core::result::Result::Err(response)
1082 }
1083 }
1084
1085 pub struct GetPowerState;
1086
1087 impl ::fidl_next::Method for GetPowerState {
1088 const ORDINAL: u64 = 5060306441717482177;
1089 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1090 ::fidl_next::protocol::Flexibility::Flexible;
1091
1092 type Protocol = crate::WlanPhy;
1093
1094 type Request = ::fidl_next::wire::EmptyMessageBody;
1095 }
1096
1097 impl ::fidl_next::TwoWayMethod for GetPowerState {
1098 type Response = ::fidl_next::wire::Result<
1099 'static,
1100 crate::wire::WlanPhyGetPowerStateResponse<'static>,
1101 ::fidl_next::wire::fuchsia::Status,
1102 >;
1103 }
1104
1105 impl<___R> ::fidl_next::Respond<___R> for GetPowerState {
1106 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1107
1108 fn respond(response: ___R) -> Self::Output {
1109 ::core::result::Result::Ok(response)
1110 }
1111 }
1112
1113 impl<___R> ::fidl_next::RespondErr<___R> for GetPowerState {
1114 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1115
1116 fn respond_err(response: ___R) -> Self::Output {
1117 ::core::result::Result::Err(response)
1118 }
1119 }
1120
1121 pub struct SetBtCoexistenceMode;
1122
1123 impl ::fidl_next::Method for SetBtCoexistenceMode {
1124 const ORDINAL: u64 = 6541090488596605957;
1125 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1126 ::fidl_next::protocol::Flexibility::Flexible;
1127
1128 type Protocol = crate::WlanPhy;
1129
1130 type Request = crate::wire::WlanPhySetBtCoexistenceModeRequest<'static>;
1131 }
1132
1133 impl ::fidl_next::TwoWayMethod for SetBtCoexistenceMode {
1134 type Response = ::fidl_next::wire::Result<
1135 'static,
1136 crate::wire::WlanPhySetBtCoexistenceModeResponse,
1137 ::fidl_next::wire::fuchsia::Status,
1138 >;
1139 }
1140
1141 impl<___R> ::fidl_next::Respond<___R> for SetBtCoexistenceMode {
1142 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1143
1144 fn respond(response: ___R) -> Self::Output {
1145 ::core::result::Result::Ok(response)
1146 }
1147 }
1148
1149 impl<___R> ::fidl_next::RespondErr<___R> for SetBtCoexistenceMode {
1150 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1151
1152 fn respond_err(response: ___R) -> Self::Output {
1153 ::core::result::Result::Err(response)
1154 }
1155 }
1156
1157 pub struct SetTxPowerScenario;
1158
1159 impl ::fidl_next::Method for SetTxPowerScenario {
1160 const ORDINAL: u64 = 8278971081947748572;
1161 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1162 ::fidl_next::protocol::Flexibility::Flexible;
1163
1164 type Protocol = crate::WlanPhy;
1165
1166 type Request = crate::wire::WlanPhySetTxPowerScenarioRequest<'static>;
1167 }
1168
1169 impl ::fidl_next::TwoWayMethod for SetTxPowerScenario {
1170 type Response = ::fidl_next::wire::Result<
1171 'static,
1172 crate::wire::WlanPhySetTxPowerScenarioResponse,
1173 ::fidl_next::wire::fuchsia::Status,
1174 >;
1175 }
1176
1177 impl<___R> ::fidl_next::Respond<___R> for SetTxPowerScenario {
1178 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1179
1180 fn respond(response: ___R) -> Self::Output {
1181 ::core::result::Result::Ok(response)
1182 }
1183 }
1184
1185 impl<___R> ::fidl_next::RespondErr<___R> for SetTxPowerScenario {
1186 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1187
1188 fn respond_err(response: ___R) -> Self::Output {
1189 ::core::result::Result::Err(response)
1190 }
1191 }
1192
1193 pub struct ResetTxPowerScenario;
1194
1195 impl ::fidl_next::Method for ResetTxPowerScenario {
1196 const ORDINAL: u64 = 8702006880668202770;
1197 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1198 ::fidl_next::protocol::Flexibility::Flexible;
1199
1200 type Protocol = crate::WlanPhy;
1201
1202 type Request = ::fidl_next::wire::EmptyMessageBody;
1203 }
1204
1205 impl ::fidl_next::TwoWayMethod for ResetTxPowerScenario {
1206 type Response = ::fidl_next::wire::Result<
1207 'static,
1208 crate::wire::WlanPhyResetTxPowerScenarioResponse,
1209 ::fidl_next::wire::fuchsia::Status,
1210 >;
1211 }
1212
1213 impl<___R> ::fidl_next::Respond<___R> for ResetTxPowerScenario {
1214 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1215
1216 fn respond(response: ___R) -> Self::Output {
1217 ::core::result::Result::Ok(response)
1218 }
1219 }
1220
1221 impl<___R> ::fidl_next::RespondErr<___R> for ResetTxPowerScenario {
1222 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1223
1224 fn respond_err(response: ___R) -> Self::Output {
1225 ::core::result::Result::Err(response)
1226 }
1227 }
1228
1229 pub struct GetTxPowerScenario;
1230
1231 impl ::fidl_next::Method for GetTxPowerScenario {
1232 const ORDINAL: u64 = 7131856269124254862;
1233 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1234 ::fidl_next::protocol::Flexibility::Flexible;
1235
1236 type Protocol = crate::WlanPhy;
1237
1238 type Request = ::fidl_next::wire::EmptyMessageBody;
1239 }
1240
1241 impl ::fidl_next::TwoWayMethod for GetTxPowerScenario {
1242 type Response = ::fidl_next::wire::Result<
1243 'static,
1244 crate::wire::WlanPhyGetTxPowerScenarioResponse,
1245 ::fidl_next::wire::fuchsia::Status,
1246 >;
1247 }
1248
1249 impl<___R> ::fidl_next::Respond<___R> for GetTxPowerScenario {
1250 type Output = ::core::result::Result<
1251 crate::generic::WlanPhyGetTxPowerScenarioResponse<___R>,
1252 ::fidl_next::never::Never,
1253 >;
1254
1255 fn respond(response: ___R) -> Self::Output {
1256 ::core::result::Result::Ok(crate::generic::WlanPhyGetTxPowerScenarioResponse {
1257 scenario: response,
1258 })
1259 }
1260 }
1261
1262 impl<___R> ::fidl_next::RespondErr<___R> for GetTxPowerScenario {
1263 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1264
1265 fn respond_err(response: ___R) -> Self::Output {
1266 ::core::result::Result::Err(response)
1267 }
1268 }
1269
1270 mod ___detail {
1271 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::WlanPhy
1272 where
1273 ___T: ::fidl_next::Transport,
1274 {
1275 type Client = WlanPhyClient<___T>;
1276 type Server = WlanPhyServer<___T>;
1277 }
1278
1279 #[repr(transparent)]
1281 pub struct WlanPhyClient<___T: ::fidl_next::Transport> {
1282 #[allow(dead_code)]
1283 client: ::fidl_next::protocol::Client<___T>,
1284 }
1285
1286 impl<___T> WlanPhyClient<___T>
1287 where
1288 ___T: ::fidl_next::Transport,
1289 {
1290 #[doc = " This method can be used by the WlanPhy client to send the client end of the\n WlanPhyNotify endpoint for the WlanPhy server to use. If the WlanPhy client\n never invokes this method that is an indirect implication that the WlanPhyNotify is not\n supported. Some possible error codes are:\n ZX_ERR_NOT_SUPPORTED: The WlanPhy server does not support the WlanPhyNotify protocol.\n"]
1291 pub fn init_with<___R>(
1292 &self,
1293 request: ___R,
1294 ) -> ::fidl_next::TwoWayFuture<'_, super::Init, ___T>
1295 where
1296 ___R: ::fidl_next::Encode<
1297 crate::wire::WlanPhyInitRequest<'static>,
1298 <___T as ::fidl_next::Transport>::SendBuffer,
1299 >,
1300 {
1301 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1302 4152290172424220659,
1303 <super::Init as ::fidl_next::Method>::FLEXIBILITY,
1304 request,
1305 ))
1306 }
1307
1308 #[doc = " MAC roles supported for ifaces on the physical device.\n"]
1309 pub fn get_supported_mac_roles(
1310 &self,
1311 ) -> ::fidl_next::TwoWayFuture<'_, super::GetSupportedMacRoles, ___T> {
1312 ::fidl_next::TwoWayFuture::from_untyped(
1313 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1314 3929702727467848522,
1315 <super::GetSupportedMacRoles as ::fidl_next::Method>::FLEXIBILITY,
1316 (),
1317 ),
1318 )
1319 }
1320
1321 #[doc = " Create a new interface with the specified role, returning the interface id. \\\n Some common error codes are: \\\n ZX_ERR_NO_RESOURCES: maximum number of interfaces have already been created. \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified role.\n"]
1322 pub fn create_iface_with<___R>(
1323 &self,
1324 request: ___R,
1325 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateIface, ___T>
1326 where
1327 ___R: ::fidl_next::Encode<
1328 crate::wire::WlanPhyCreateIfaceRequest<'static>,
1329 <___T as ::fidl_next::Transport>::SendBuffer,
1330 >,
1331 {
1332 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1333 5530435827689044878,
1334 <super::CreateIface as ::fidl_next::Method>::FLEXIBILITY,
1335 request,
1336 ))
1337 }
1338
1339 #[doc = " Destroy the interface with the matching id. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified iface does not exist or has already been removed. \\\n ZX_ERR_SHOULD_WAIT: Device is busy and cannot be removed, try again later.\n"]
1340 pub fn destroy_iface_with<___R>(
1341 &self,
1342 request: ___R,
1343 ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyIface, ___T>
1344 where
1345 ___R: ::fidl_next::Encode<
1346 crate::wire::WlanPhyDestroyIfaceRequest<'static>,
1347 <___T as ::fidl_next::Transport>::SendBuffer,
1348 >,
1349 {
1350 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1351 1127035624611379388,
1352 <super::DestroyIface as ::fidl_next::Method>::FLEXIBILITY,
1353 request,
1354 ))
1355 }
1356
1357 #[doc = " Set country with a 2-byte country code. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified country code not supported. PHY state is left unchanged.\n"]
1358 pub fn set_country(
1359 &self,
1360
1361 country: impl ::fidl_next::Encode<[u8; 2], <___T as ::fidl_next::Transport>::SendBuffer>,
1362 ) -> ::fidl_next::TwoWayFuture<'_, super::SetCountry, ___T>
1363 where
1364 <___T as ::fidl_next::Transport>::SendBuffer:
1365 ::fidl_next::encoder::InternalHandleEncoder,
1366 {
1367 self.set_country_with(crate::generic::WlanPhySetCountryRequest { country })
1368 }
1369
1370 #[doc = " Set country with a 2-byte country code. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified country code not supported. PHY state is left unchanged.\n"]
1371 pub fn set_country_with<___R>(
1372 &self,
1373 request: ___R,
1374 ) -> ::fidl_next::TwoWayFuture<'_, super::SetCountry, ___T>
1375 where
1376 ___R: ::fidl_next::Encode<
1377 crate::wire::WlanPhySetCountryRequest,
1378 <___T as ::fidl_next::Transport>::SendBuffer,
1379 >,
1380 {
1381 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1382 7859442075277675023,
1383 <super::SetCountry as ::fidl_next::Method>::FLEXIBILITY,
1384 request,
1385 ))
1386 }
1387
1388 #[doc = " Set device to a world-safe country, i.e. a mode that conforms to all\n regulatory constraints globally. \\\n Generally expected to succeed if the device is in a functional state.\n"]
1389 pub fn clear_country(
1390 &self,
1391 ) -> ::fidl_next::TwoWayFuture<'_, super::ClearCountry, ___T> {
1392 ::fidl_next::TwoWayFuture::from_untyped(
1393 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1394 8355078711339303759,
1395 <super::ClearCountry as ::fidl_next::Method>::FLEXIBILITY,
1396 (),
1397 ),
1398 )
1399 }
1400
1401 #[doc = " Read currently configured country. Implementations are advised to read the\n country directly from the firmware, where possible. \\\n Generally expected to succeed if the device is in a functional state.\n"]
1402 pub fn get_country(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetCountry, ___T> {
1403 ::fidl_next::TwoWayFuture::from_untyped(
1404 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1405 1436134059072311418,
1406 <super::GetCountry as ::fidl_next::Method>::FLEXIBILITY,
1407 (),
1408 ),
1409 )
1410 }
1411
1412 #[doc = " Set Power Save mode on device. In most implementations this\n likely to be set in Firmware. \\\n Some common error codes are: \\\n ZX_ERR_NOT_SUPPORTED: Specified Power Save mode not supported.\n"]
1413 pub fn set_power_save_mode_with<___R>(
1414 &self,
1415 request: ___R,
1416 ) -> ::fidl_next::TwoWayFuture<'_, super::SetPowerSaveMode, ___T>
1417 where
1418 ___R: ::fidl_next::Encode<
1419 crate::wire::WlanPhySetPowerSaveModeRequest<'static>,
1420 <___T as ::fidl_next::Transport>::SendBuffer,
1421 >,
1422 {
1423 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1424 5626768781239879949,
1425 <super::SetPowerSaveMode as ::fidl_next::Method>::FLEXIBILITY,
1426 request,
1427 ))
1428 }
1429
1430 #[doc = " Get current Power Save mode from device. In most implementation this\n likely to be retrieved from Firmware.\n"]
1431 pub fn get_power_save_mode(
1432 &self,
1433 ) -> ::fidl_next::TwoWayFuture<'_, super::GetPowerSaveMode, ___T> {
1434 ::fidl_next::TwoWayFuture::from_untyped(
1435 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1436 2070868099982362662,
1437 <super::GetPowerSaveMode as ::fidl_next::Method>::FLEXIBILITY,
1438 (),
1439 ),
1440 )
1441 }
1442
1443 #[doc = " Power up/down/reset the wlan chip.\n If supported, PowerDown will power down the wlan chip if it is currently powered on.\n Any existing interfaces should have already been deleted before making this call or else the\n driver will fail the call with error code ZX_ERR_INTERNAL.\n Other possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered down.\n"]
1444 pub fn power_down(&self) -> ::fidl_next::TwoWayFuture<'_, super::PowerDown, ___T> {
1445 ::fidl_next::TwoWayFuture::from_untyped(
1446 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1447 8789636981017894154,
1448 <super::PowerDown as ::fidl_next::Method>::FLEXIBILITY,
1449 (),
1450 ),
1451 )
1452 }
1453
1454 #[doc = " If supported, PowerUp will power up the wlan chip if it is currently powered down.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered up.\n"]
1455 pub fn power_up(&self) -> ::fidl_next::TwoWayFuture<'_, super::PowerUp, ___T> {
1456 ::fidl_next::TwoWayFuture::from_untyped(
1457 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1458 7912237011574232306,
1459 <super::PowerUp as ::fidl_next::Method>::FLEXIBILITY,
1460 (),
1461 ),
1462 )
1463 }
1464
1465 #[doc = " If supported, Reset functionality implements PowerDown then PowerUp in an attempt to\n recover from an error state. For example, if an interface gets into a bad state or if\n firmware crashes, the firmware/chip may be unable to perform some actions and Reset\n may be able to clear the bad state.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered down.\n"]
1466 pub fn reset(&self) -> ::fidl_next::TwoWayFuture<'_, super::Reset, ___T> {
1467 ::fidl_next::TwoWayFuture::from_untyped(
1468 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1469 3390961545241598095,
1470 <super::Reset as ::fidl_next::Method>::FLEXIBILITY,
1471 (),
1472 ),
1473 )
1474 }
1475
1476 #[doc = " Returns the current power state of the wlan chip. After successful initialization\n of the wlan driver, the state is set to true (power on) by default. power_on set to\n true indicates that the wlan chip is powered on and false indicates the wlan chip\n is powered off.\n"]
1477 pub fn get_power_state(
1478 &self,
1479 ) -> ::fidl_next::TwoWayFuture<'_, super::GetPowerState, ___T> {
1480 ::fidl_next::TwoWayFuture::from_untyped(
1481 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1482 5060306441717482177,
1483 <super::GetPowerState as ::fidl_next::Method>::FLEXIBILITY,
1484 (),
1485 ),
1486 )
1487 }
1488
1489 #[doc = " Set the Bluetooth coexistence mode.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified BT coexistence mode.\n"]
1490 pub fn set_bt_coexistence_mode_with<___R>(
1491 &self,
1492 request: ___R,
1493 ) -> ::fidl_next::TwoWayFuture<'_, super::SetBtCoexistenceMode, ___T>
1494 where
1495 ___R: ::fidl_next::Encode<
1496 crate::wire::WlanPhySetBtCoexistenceModeRequest<'static>,
1497 <___T as ::fidl_next::Transport>::SendBuffer,
1498 >,
1499 {
1500 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1501 6541090488596605957,
1502 <super::SetBtCoexistenceMode as ::fidl_next::Method>::FLEXIBILITY,
1503 request,
1504 ))
1505 }
1506
1507 pub fn set_tx_power_scenario_with<___R>(
1508 &self,
1509 request: ___R,
1510 ) -> ::fidl_next::TwoWayFuture<'_, super::SetTxPowerScenario, ___T>
1511 where
1512 ___R: ::fidl_next::Encode<
1513 crate::wire::WlanPhySetTxPowerScenarioRequest<'static>,
1514 <___T as ::fidl_next::Transport>::SendBuffer,
1515 >,
1516 {
1517 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1518 8278971081947748572,
1519 <super::SetTxPowerScenario as ::fidl_next::Method>::FLEXIBILITY,
1520 request,
1521 ))
1522 }
1523
1524 pub fn reset_tx_power_scenario(
1525 &self,
1526 ) -> ::fidl_next::TwoWayFuture<'_, super::ResetTxPowerScenario, ___T> {
1527 ::fidl_next::TwoWayFuture::from_untyped(
1528 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1529 8702006880668202770,
1530 <super::ResetTxPowerScenario as ::fidl_next::Method>::FLEXIBILITY,
1531 (),
1532 ),
1533 )
1534 }
1535
1536 pub fn get_tx_power_scenario(
1537 &self,
1538 ) -> ::fidl_next::TwoWayFuture<'_, super::GetTxPowerScenario, ___T> {
1539 ::fidl_next::TwoWayFuture::from_untyped(
1540 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1541 7131856269124254862,
1542 <super::GetTxPowerScenario as ::fidl_next::Method>::FLEXIBILITY,
1543 (),
1544 ),
1545 )
1546 }
1547 }
1548
1549 #[repr(transparent)]
1551 pub struct WlanPhyServer<___T: ::fidl_next::Transport> {
1552 server: ::fidl_next::protocol::Server<___T>,
1553 }
1554
1555 impl<___T> WlanPhyServer<___T> where ___T: ::fidl_next::Transport {}
1556 }
1557}
1558
1559#[diagnostic::on_unimplemented(
1560 note = "If {Self} implements the non-local WlanPhyClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1561)]
1562
1563pub trait WlanPhyLocalClientHandler<
1567 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1568 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1569>
1570{
1571 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1572 ::core::future::ready(())
1573 }
1574}
1575
1576impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for WlanPhy
1577where
1578 ___H: WlanPhyLocalClientHandler<___T>,
1579 ___T: ::fidl_next::Transport,
1580{
1581 async fn on_event(
1582 handler: &mut ___H,
1583 mut message: ::fidl_next::Message<___T>,
1584 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1585 match *message.header().ordinal {
1586 ordinal => {
1587 handler.on_unknown_interaction(ordinal).await;
1588 if ::core::matches!(
1589 message.header().flexibility(),
1590 ::fidl_next::protocol::Flexibility::Strict
1591 ) {
1592 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1593 } else {
1594 Ok(())
1595 }
1596 }
1597 }
1598 }
1599}
1600
1601#[diagnostic::on_unimplemented(
1602 note = "If {Self} implements the non-local WlanPhyServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
1603)]
1604
1605pub trait WlanPhyLocalServerHandler<
1609 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1610 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1611>
1612{
1613 #[doc = " This method can be used by the WlanPhy client to send the client end of the\n WlanPhyNotify endpoint for the WlanPhy server to use. If the WlanPhy client\n never invokes this method that is an indirect implication that the WlanPhyNotify is not\n supported. Some possible error codes are:\n ZX_ERR_NOT_SUPPORTED: The WlanPhy server does not support the WlanPhyNotify protocol.\n"]
1614 fn init(
1615 &mut self,
1616
1617 request: ::fidl_next::Request<wlan_phy::Init, ___T>,
1618
1619 responder: ::fidl_next::Responder<wlan_phy::Init, ___T>,
1620 ) -> impl ::core::future::Future<Output = ()>;
1621
1622 #[doc = " MAC roles supported for ifaces on the physical device.\n"]
1623 fn get_supported_mac_roles(
1624 &mut self,
1625
1626 responder: ::fidl_next::Responder<wlan_phy::GetSupportedMacRoles, ___T>,
1627 ) -> impl ::core::future::Future<Output = ()>;
1628
1629 #[doc = " Create a new interface with the specified role, returning the interface id. \\\n Some common error codes are: \\\n ZX_ERR_NO_RESOURCES: maximum number of interfaces have already been created. \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified role.\n"]
1630 fn create_iface(
1631 &mut self,
1632
1633 request: ::fidl_next::Request<wlan_phy::CreateIface, ___T>,
1634
1635 responder: ::fidl_next::Responder<wlan_phy::CreateIface, ___T>,
1636 ) -> impl ::core::future::Future<Output = ()>;
1637
1638 #[doc = " Destroy the interface with the matching id. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified iface does not exist or has already been removed. \\\n ZX_ERR_SHOULD_WAIT: Device is busy and cannot be removed, try again later.\n"]
1639 fn destroy_iface(
1640 &mut self,
1641
1642 request: ::fidl_next::Request<wlan_phy::DestroyIface, ___T>,
1643
1644 responder: ::fidl_next::Responder<wlan_phy::DestroyIface, ___T>,
1645 ) -> impl ::core::future::Future<Output = ()>;
1646
1647 #[doc = " Set country with a 2-byte country code. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified country code not supported. PHY state is left unchanged.\n"]
1648 fn set_country(
1649 &mut self,
1650
1651 request: ::fidl_next::Request<wlan_phy::SetCountry, ___T>,
1652
1653 responder: ::fidl_next::Responder<wlan_phy::SetCountry, ___T>,
1654 ) -> impl ::core::future::Future<Output = ()>;
1655
1656 #[doc = " Set device to a world-safe country, i.e. a mode that conforms to all\n regulatory constraints globally. \\\n Generally expected to succeed if the device is in a functional state.\n"]
1657 fn clear_country(
1658 &mut self,
1659
1660 responder: ::fidl_next::Responder<wlan_phy::ClearCountry, ___T>,
1661 ) -> impl ::core::future::Future<Output = ()>;
1662
1663 #[doc = " Read currently configured country. Implementations are advised to read the\n country directly from the firmware, where possible. \\\n Generally expected to succeed if the device is in a functional state.\n"]
1664 fn get_country(
1665 &mut self,
1666
1667 responder: ::fidl_next::Responder<wlan_phy::GetCountry, ___T>,
1668 ) -> impl ::core::future::Future<Output = ()>;
1669
1670 #[doc = " Set Power Save mode on device. In most implementations this\n likely to be set in Firmware. \\\n Some common error codes are: \\\n ZX_ERR_NOT_SUPPORTED: Specified Power Save mode not supported.\n"]
1671 fn set_power_save_mode(
1672 &mut self,
1673
1674 request: ::fidl_next::Request<wlan_phy::SetPowerSaveMode, ___T>,
1675
1676 responder: ::fidl_next::Responder<wlan_phy::SetPowerSaveMode, ___T>,
1677 ) -> impl ::core::future::Future<Output = ()>;
1678
1679 #[doc = " Get current Power Save mode from device. In most implementation this\n likely to be retrieved from Firmware.\n"]
1680 fn get_power_save_mode(
1681 &mut self,
1682
1683 responder: ::fidl_next::Responder<wlan_phy::GetPowerSaveMode, ___T>,
1684 ) -> impl ::core::future::Future<Output = ()>;
1685
1686 #[doc = " Power up/down/reset the wlan chip.\n If supported, PowerDown will power down the wlan chip if it is currently powered on.\n Any existing interfaces should have already been deleted before making this call or else the\n driver will fail the call with error code ZX_ERR_INTERNAL.\n Other possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered down.\n"]
1687 fn power_down(
1688 &mut self,
1689
1690 responder: ::fidl_next::Responder<wlan_phy::PowerDown, ___T>,
1691 ) -> impl ::core::future::Future<Output = ()>;
1692
1693 #[doc = " If supported, PowerUp will power up the wlan chip if it is currently powered down.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered up.\n"]
1694 fn power_up(
1695 &mut self,
1696
1697 responder: ::fidl_next::Responder<wlan_phy::PowerUp, ___T>,
1698 ) -> impl ::core::future::Future<Output = ()>;
1699
1700 #[doc = " If supported, Reset functionality implements PowerDown then PowerUp in an attempt to\n recover from an error state. For example, if an interface gets into a bad state or if\n firmware crashes, the firmware/chip may be unable to perform some actions and Reset\n may be able to clear the bad state.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered down.\n"]
1701 fn reset(
1702 &mut self,
1703
1704 responder: ::fidl_next::Responder<wlan_phy::Reset, ___T>,
1705 ) -> impl ::core::future::Future<Output = ()>;
1706
1707 #[doc = " Returns the current power state of the wlan chip. After successful initialization\n of the wlan driver, the state is set to true (power on) by default. power_on set to\n true indicates that the wlan chip is powered on and false indicates the wlan chip\n is powered off.\n"]
1708 fn get_power_state(
1709 &mut self,
1710
1711 responder: ::fidl_next::Responder<wlan_phy::GetPowerState, ___T>,
1712 ) -> impl ::core::future::Future<Output = ()>;
1713
1714 #[doc = " Set the Bluetooth coexistence mode.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified BT coexistence mode.\n"]
1715 fn set_bt_coexistence_mode(
1716 &mut self,
1717
1718 request: ::fidl_next::Request<wlan_phy::SetBtCoexistenceMode, ___T>,
1719
1720 responder: ::fidl_next::Responder<wlan_phy::SetBtCoexistenceMode, ___T>,
1721 ) -> impl ::core::future::Future<Output = ()>;
1722
1723 fn set_tx_power_scenario(
1724 &mut self,
1725
1726 request: ::fidl_next::Request<wlan_phy::SetTxPowerScenario, ___T>,
1727
1728 responder: ::fidl_next::Responder<wlan_phy::SetTxPowerScenario, ___T>,
1729 ) -> impl ::core::future::Future<Output = ()>;
1730
1731 fn reset_tx_power_scenario(
1732 &mut self,
1733
1734 responder: ::fidl_next::Responder<wlan_phy::ResetTxPowerScenario, ___T>,
1735 ) -> impl ::core::future::Future<Output = ()>;
1736
1737 fn get_tx_power_scenario(
1738 &mut self,
1739
1740 responder: ::fidl_next::Responder<wlan_phy::GetTxPowerScenario, ___T>,
1741 ) -> impl ::core::future::Future<Output = ()>;
1742
1743 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1744 ::core::future::ready(())
1745 }
1746}
1747
1748impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for WlanPhy
1749where
1750 ___H: WlanPhyLocalServerHandler<___T>,
1751 ___T: ::fidl_next::Transport,
1752 for<'de> crate::wire::WlanPhyInitRequest<'de>: ::fidl_next::Decode<
1753 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1754 Constraint = (),
1755 >,
1756 for<'de> crate::wire::WlanPhyCreateIfaceRequest<'de>: ::fidl_next::Decode<
1757 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1758 Constraint = (),
1759 >,
1760 for<'de> crate::wire::WlanPhyDestroyIfaceRequest<'de>: ::fidl_next::Decode<
1761 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1762 Constraint = (),
1763 >,
1764 for<'de> crate::wire::WlanPhySetCountryRequest: ::fidl_next::Decode<
1765 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1766 Constraint = (),
1767 >,
1768 for<'de> crate::wire::WlanPhySetPowerSaveModeRequest<'de>: ::fidl_next::Decode<
1769 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1770 Constraint = (),
1771 >,
1772 for<'de> crate::wire::WlanPhySetBtCoexistenceModeRequest<'de>: ::fidl_next::Decode<
1773 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1774 Constraint = (),
1775 >,
1776 for<'de> crate::wire::WlanPhySetTxPowerScenarioRequest<'de>: ::fidl_next::Decode<
1777 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1778 Constraint = (),
1779 >,
1780{
1781 async fn on_one_way(
1782 handler: &mut ___H,
1783 mut message: ::fidl_next::Message<___T>,
1784 ) -> ::core::result::Result<
1785 (),
1786 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1787 > {
1788 match *message.header().ordinal {
1789 ordinal => {
1790 handler.on_unknown_interaction(ordinal).await;
1791 if ::core::matches!(
1792 message.header().flexibility(),
1793 ::fidl_next::protocol::Flexibility::Strict
1794 ) {
1795 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1796 } else {
1797 Ok(())
1798 }
1799 }
1800 }
1801 }
1802
1803 async fn on_two_way(
1804 handler: &mut ___H,
1805 mut message: ::fidl_next::Message<___T>,
1806 responder: ::fidl_next::protocol::Responder<___T>,
1807 ) -> ::core::result::Result<
1808 (),
1809 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1810 > {
1811 match *message.header().ordinal {
1812 4152290172424220659 => {
1813 let responder = ::fidl_next::Responder::from_untyped(responder);
1814
1815 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1816 Ok(decoded) => {
1817 handler.init(::fidl_next::Request::from_decoded(decoded), responder).await;
1818 Ok(())
1819 }
1820 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1821 ordinal: 4152290172424220659,
1822 error,
1823 }),
1824 }
1825 }
1826
1827 3929702727467848522 => {
1828 let responder = ::fidl_next::Responder::from_untyped(responder);
1829
1830 handler.get_supported_mac_roles(responder).await;
1831 Ok(())
1832 }
1833
1834 5530435827689044878 => {
1835 let responder = ::fidl_next::Responder::from_untyped(responder);
1836
1837 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1838 Ok(decoded) => {
1839 handler
1840 .create_iface(::fidl_next::Request::from_decoded(decoded), responder)
1841 .await;
1842 Ok(())
1843 }
1844 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1845 ordinal: 5530435827689044878,
1846 error,
1847 }),
1848 }
1849 }
1850
1851 1127035624611379388 => {
1852 let responder = ::fidl_next::Responder::from_untyped(responder);
1853
1854 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1855 Ok(decoded) => {
1856 handler
1857 .destroy_iface(::fidl_next::Request::from_decoded(decoded), responder)
1858 .await;
1859 Ok(())
1860 }
1861 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1862 ordinal: 1127035624611379388,
1863 error,
1864 }),
1865 }
1866 }
1867
1868 7859442075277675023 => {
1869 let responder = ::fidl_next::Responder::from_untyped(responder);
1870
1871 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1872 Ok(decoded) => {
1873 handler
1874 .set_country(::fidl_next::Request::from_decoded(decoded), responder)
1875 .await;
1876 Ok(())
1877 }
1878 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1879 ordinal: 7859442075277675023,
1880 error,
1881 }),
1882 }
1883 }
1884
1885 8355078711339303759 => {
1886 let responder = ::fidl_next::Responder::from_untyped(responder);
1887
1888 handler.clear_country(responder).await;
1889 Ok(())
1890 }
1891
1892 1436134059072311418 => {
1893 let responder = ::fidl_next::Responder::from_untyped(responder);
1894
1895 handler.get_country(responder).await;
1896 Ok(())
1897 }
1898
1899 5626768781239879949 => {
1900 let responder = ::fidl_next::Responder::from_untyped(responder);
1901
1902 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1903 Ok(decoded) => {
1904 handler
1905 .set_power_save_mode(
1906 ::fidl_next::Request::from_decoded(decoded),
1907 responder,
1908 )
1909 .await;
1910 Ok(())
1911 }
1912 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1913 ordinal: 5626768781239879949,
1914 error,
1915 }),
1916 }
1917 }
1918
1919 2070868099982362662 => {
1920 let responder = ::fidl_next::Responder::from_untyped(responder);
1921
1922 handler.get_power_save_mode(responder).await;
1923 Ok(())
1924 }
1925
1926 8789636981017894154 => {
1927 let responder = ::fidl_next::Responder::from_untyped(responder);
1928
1929 handler.power_down(responder).await;
1930 Ok(())
1931 }
1932
1933 7912237011574232306 => {
1934 let responder = ::fidl_next::Responder::from_untyped(responder);
1935
1936 handler.power_up(responder).await;
1937 Ok(())
1938 }
1939
1940 3390961545241598095 => {
1941 let responder = ::fidl_next::Responder::from_untyped(responder);
1942
1943 handler.reset(responder).await;
1944 Ok(())
1945 }
1946
1947 5060306441717482177 => {
1948 let responder = ::fidl_next::Responder::from_untyped(responder);
1949
1950 handler.get_power_state(responder).await;
1951 Ok(())
1952 }
1953
1954 6541090488596605957 => {
1955 let responder = ::fidl_next::Responder::from_untyped(responder);
1956
1957 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1958 Ok(decoded) => {
1959 handler
1960 .set_bt_coexistence_mode(
1961 ::fidl_next::Request::from_decoded(decoded),
1962 responder,
1963 )
1964 .await;
1965 Ok(())
1966 }
1967 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1968 ordinal: 6541090488596605957,
1969 error,
1970 }),
1971 }
1972 }
1973
1974 8278971081947748572 => {
1975 let responder = ::fidl_next::Responder::from_untyped(responder);
1976
1977 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1978 Ok(decoded) => {
1979 handler
1980 .set_tx_power_scenario(
1981 ::fidl_next::Request::from_decoded(decoded),
1982 responder,
1983 )
1984 .await;
1985 Ok(())
1986 }
1987 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1988 ordinal: 8278971081947748572,
1989 error,
1990 }),
1991 }
1992 }
1993
1994 8702006880668202770 => {
1995 let responder = ::fidl_next::Responder::from_untyped(responder);
1996
1997 handler.reset_tx_power_scenario(responder).await;
1998 Ok(())
1999 }
2000
2001 7131856269124254862 => {
2002 let responder = ::fidl_next::Responder::from_untyped(responder);
2003
2004 handler.get_tx_power_scenario(responder).await;
2005 Ok(())
2006 }
2007
2008 ordinal => {
2009 handler.on_unknown_interaction(ordinal).await;
2010 if ::core::matches!(
2011 message.header().flexibility(),
2012 ::fidl_next::protocol::Flexibility::Strict
2013 ) {
2014 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2015 } else {
2016 responder
2017 .respond_framework_error(
2018 ordinal,
2019 ::fidl_next::FrameworkError::UnknownMethod,
2020 )
2021 .expect("encoding a framework error should never fail")
2022 .await?;
2023 Ok(())
2024 }
2025 }
2026 }
2027 }
2028}
2029
2030pub trait WlanPhyClientHandler<
2034 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2035 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2036>
2037{
2038 fn on_unknown_interaction(
2039 &mut self,
2040 ordinal: u64,
2041 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2042 ::core::future::ready(())
2043 }
2044}
2045
2046impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for WlanPhy
2047where
2048 ___H: WlanPhyClientHandler<___T> + ::core::marker::Send,
2049 ___T: ::fidl_next::Transport,
2050{
2051 async fn on_event(
2052 handler: &mut ___H,
2053 mut message: ::fidl_next::Message<___T>,
2054 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2055 match *message.header().ordinal {
2056 ordinal => {
2057 handler.on_unknown_interaction(ordinal).await;
2058 if ::core::matches!(
2059 message.header().flexibility(),
2060 ::fidl_next::protocol::Flexibility::Strict
2061 ) {
2062 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2063 } else {
2064 Ok(())
2065 }
2066 }
2067 }
2068 }
2069}
2070
2071pub trait WlanPhyServerHandler<
2075 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2076 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2077>
2078{
2079 #[doc = " This method can be used by the WlanPhy client to send the client end of the\n WlanPhyNotify endpoint for the WlanPhy server to use. If the WlanPhy client\n never invokes this method that is an indirect implication that the WlanPhyNotify is not\n supported. Some possible error codes are:\n ZX_ERR_NOT_SUPPORTED: The WlanPhy server does not support the WlanPhyNotify protocol.\n"]
2080 fn init(
2081 &mut self,
2082
2083 request: ::fidl_next::Request<wlan_phy::Init, ___T>,
2084
2085 responder: ::fidl_next::Responder<wlan_phy::Init, ___T>,
2086 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2087
2088 #[doc = " MAC roles supported for ifaces on the physical device.\n"]
2089 fn get_supported_mac_roles(
2090 &mut self,
2091
2092 responder: ::fidl_next::Responder<wlan_phy::GetSupportedMacRoles, ___T>,
2093 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2094
2095 #[doc = " Create a new interface with the specified role, returning the interface id. \\\n Some common error codes are: \\\n ZX_ERR_NO_RESOURCES: maximum number of interfaces have already been created. \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified role.\n"]
2096 fn create_iface(
2097 &mut self,
2098
2099 request: ::fidl_next::Request<wlan_phy::CreateIface, ___T>,
2100
2101 responder: ::fidl_next::Responder<wlan_phy::CreateIface, ___T>,
2102 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2103
2104 #[doc = " Destroy the interface with the matching id. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified iface does not exist or has already been removed. \\\n ZX_ERR_SHOULD_WAIT: Device is busy and cannot be removed, try again later.\n"]
2105 fn destroy_iface(
2106 &mut self,
2107
2108 request: ::fidl_next::Request<wlan_phy::DestroyIface, ___T>,
2109
2110 responder: ::fidl_next::Responder<wlan_phy::DestroyIface, ___T>,
2111 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2112
2113 #[doc = " Set country with a 2-byte country code. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified country code not supported. PHY state is left unchanged.\n"]
2114 fn set_country(
2115 &mut self,
2116
2117 request: ::fidl_next::Request<wlan_phy::SetCountry, ___T>,
2118
2119 responder: ::fidl_next::Responder<wlan_phy::SetCountry, ___T>,
2120 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2121
2122 #[doc = " Set device to a world-safe country, i.e. a mode that conforms to all\n regulatory constraints globally. \\\n Generally expected to succeed if the device is in a functional state.\n"]
2123 fn clear_country(
2124 &mut self,
2125
2126 responder: ::fidl_next::Responder<wlan_phy::ClearCountry, ___T>,
2127 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2128
2129 #[doc = " Read currently configured country. Implementations are advised to read the\n country directly from the firmware, where possible. \\\n Generally expected to succeed if the device is in a functional state.\n"]
2130 fn get_country(
2131 &mut self,
2132
2133 responder: ::fidl_next::Responder<wlan_phy::GetCountry, ___T>,
2134 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2135
2136 #[doc = " Set Power Save mode on device. In most implementations this\n likely to be set in Firmware. \\\n Some common error codes are: \\\n ZX_ERR_NOT_SUPPORTED: Specified Power Save mode not supported.\n"]
2137 fn set_power_save_mode(
2138 &mut self,
2139
2140 request: ::fidl_next::Request<wlan_phy::SetPowerSaveMode, ___T>,
2141
2142 responder: ::fidl_next::Responder<wlan_phy::SetPowerSaveMode, ___T>,
2143 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2144
2145 #[doc = " Get current Power Save mode from device. In most implementation this\n likely to be retrieved from Firmware.\n"]
2146 fn get_power_save_mode(
2147 &mut self,
2148
2149 responder: ::fidl_next::Responder<wlan_phy::GetPowerSaveMode, ___T>,
2150 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2151
2152 #[doc = " Power up/down/reset the wlan chip.\n If supported, PowerDown will power down the wlan chip if it is currently powered on.\n Any existing interfaces should have already been deleted before making this call or else the\n driver will fail the call with error code ZX_ERR_INTERNAL.\n Other possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered down.\n"]
2153 fn power_down(
2154 &mut self,
2155
2156 responder: ::fidl_next::Responder<wlan_phy::PowerDown, ___T>,
2157 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2158
2159 #[doc = " If supported, PowerUp will power up the wlan chip if it is currently powered down.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered up.\n"]
2160 fn power_up(
2161 &mut self,
2162
2163 responder: ::fidl_next::Responder<wlan_phy::PowerUp, ___T>,
2164 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2165
2166 #[doc = " If supported, Reset functionality implements PowerDown then PowerUp in an attempt to\n recover from an error state. For example, if an interface gets into a bad state or if\n firmware crashes, the firmware/chip may be unable to perform some actions and Reset\n may be able to clear the bad state.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered down.\n"]
2167 fn reset(
2168 &mut self,
2169
2170 responder: ::fidl_next::Responder<wlan_phy::Reset, ___T>,
2171 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2172
2173 #[doc = " Returns the current power state of the wlan chip. After successful initialization\n of the wlan driver, the state is set to true (power on) by default. power_on set to\n true indicates that the wlan chip is powered on and false indicates the wlan chip\n is powered off.\n"]
2174 fn get_power_state(
2175 &mut self,
2176
2177 responder: ::fidl_next::Responder<wlan_phy::GetPowerState, ___T>,
2178 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2179
2180 #[doc = " Set the Bluetooth coexistence mode.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified BT coexistence mode.\n"]
2181 fn set_bt_coexistence_mode(
2182 &mut self,
2183
2184 request: ::fidl_next::Request<wlan_phy::SetBtCoexistenceMode, ___T>,
2185
2186 responder: ::fidl_next::Responder<wlan_phy::SetBtCoexistenceMode, ___T>,
2187 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2188
2189 fn set_tx_power_scenario(
2190 &mut self,
2191
2192 request: ::fidl_next::Request<wlan_phy::SetTxPowerScenario, ___T>,
2193
2194 responder: ::fidl_next::Responder<wlan_phy::SetTxPowerScenario, ___T>,
2195 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2196
2197 fn reset_tx_power_scenario(
2198 &mut self,
2199
2200 responder: ::fidl_next::Responder<wlan_phy::ResetTxPowerScenario, ___T>,
2201 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2202
2203 fn get_tx_power_scenario(
2204 &mut self,
2205
2206 responder: ::fidl_next::Responder<wlan_phy::GetTxPowerScenario, ___T>,
2207 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2208
2209 fn on_unknown_interaction(
2210 &mut self,
2211 ordinal: u64,
2212 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2213 ::core::future::ready(())
2214 }
2215}
2216
2217impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for WlanPhy
2218where
2219 ___H: WlanPhyServerHandler<___T> + ::core::marker::Send,
2220 ___T: ::fidl_next::Transport,
2221 for<'de> crate::wire::WlanPhyInitRequest<'de>: ::fidl_next::Decode<
2222 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2223 Constraint = (),
2224 >,
2225 for<'de> crate::wire::WlanPhyCreateIfaceRequest<'de>: ::fidl_next::Decode<
2226 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2227 Constraint = (),
2228 >,
2229 for<'de> crate::wire::WlanPhyDestroyIfaceRequest<'de>: ::fidl_next::Decode<
2230 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2231 Constraint = (),
2232 >,
2233 for<'de> crate::wire::WlanPhySetCountryRequest: ::fidl_next::Decode<
2234 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2235 Constraint = (),
2236 >,
2237 for<'de> crate::wire::WlanPhySetPowerSaveModeRequest<'de>: ::fidl_next::Decode<
2238 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2239 Constraint = (),
2240 >,
2241 for<'de> crate::wire::WlanPhySetBtCoexistenceModeRequest<'de>: ::fidl_next::Decode<
2242 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2243 Constraint = (),
2244 >,
2245 for<'de> crate::wire::WlanPhySetTxPowerScenarioRequest<'de>: ::fidl_next::Decode<
2246 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2247 Constraint = (),
2248 >,
2249{
2250 async fn on_one_way(
2251 handler: &mut ___H,
2252 mut message: ::fidl_next::Message<___T>,
2253 ) -> ::core::result::Result<
2254 (),
2255 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2256 > {
2257 match *message.header().ordinal {
2258 ordinal => {
2259 handler.on_unknown_interaction(ordinal).await;
2260 if ::core::matches!(
2261 message.header().flexibility(),
2262 ::fidl_next::protocol::Flexibility::Strict
2263 ) {
2264 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2265 } else {
2266 Ok(())
2267 }
2268 }
2269 }
2270 }
2271
2272 async fn on_two_way(
2273 handler: &mut ___H,
2274 mut message: ::fidl_next::Message<___T>,
2275 responder: ::fidl_next::protocol::Responder<___T>,
2276 ) -> ::core::result::Result<
2277 (),
2278 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2279 > {
2280 match *message.header().ordinal {
2281 4152290172424220659 => {
2282 let responder = ::fidl_next::Responder::from_untyped(responder);
2283
2284 match ::fidl_next::AsDecoderExt::into_decoded(message) {
2285 Ok(decoded) => {
2286 handler.init(::fidl_next::Request::from_decoded(decoded), responder).await;
2287 Ok(())
2288 }
2289 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2290 ordinal: 4152290172424220659,
2291 error,
2292 }),
2293 }
2294 }
2295
2296 3929702727467848522 => {
2297 let responder = ::fidl_next::Responder::from_untyped(responder);
2298
2299 handler.get_supported_mac_roles(responder).await;
2300 Ok(())
2301 }
2302
2303 5530435827689044878 => {
2304 let responder = ::fidl_next::Responder::from_untyped(responder);
2305
2306 match ::fidl_next::AsDecoderExt::into_decoded(message) {
2307 Ok(decoded) => {
2308 handler
2309 .create_iface(::fidl_next::Request::from_decoded(decoded), responder)
2310 .await;
2311 Ok(())
2312 }
2313 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2314 ordinal: 5530435827689044878,
2315 error,
2316 }),
2317 }
2318 }
2319
2320 1127035624611379388 => {
2321 let responder = ::fidl_next::Responder::from_untyped(responder);
2322
2323 match ::fidl_next::AsDecoderExt::into_decoded(message) {
2324 Ok(decoded) => {
2325 handler
2326 .destroy_iface(::fidl_next::Request::from_decoded(decoded), responder)
2327 .await;
2328 Ok(())
2329 }
2330 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2331 ordinal: 1127035624611379388,
2332 error,
2333 }),
2334 }
2335 }
2336
2337 7859442075277675023 => {
2338 let responder = ::fidl_next::Responder::from_untyped(responder);
2339
2340 match ::fidl_next::AsDecoderExt::into_decoded(message) {
2341 Ok(decoded) => {
2342 handler
2343 .set_country(::fidl_next::Request::from_decoded(decoded), responder)
2344 .await;
2345 Ok(())
2346 }
2347 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2348 ordinal: 7859442075277675023,
2349 error,
2350 }),
2351 }
2352 }
2353
2354 8355078711339303759 => {
2355 let responder = ::fidl_next::Responder::from_untyped(responder);
2356
2357 handler.clear_country(responder).await;
2358 Ok(())
2359 }
2360
2361 1436134059072311418 => {
2362 let responder = ::fidl_next::Responder::from_untyped(responder);
2363
2364 handler.get_country(responder).await;
2365 Ok(())
2366 }
2367
2368 5626768781239879949 => {
2369 let responder = ::fidl_next::Responder::from_untyped(responder);
2370
2371 match ::fidl_next::AsDecoderExt::into_decoded(message) {
2372 Ok(decoded) => {
2373 handler
2374 .set_power_save_mode(
2375 ::fidl_next::Request::from_decoded(decoded),
2376 responder,
2377 )
2378 .await;
2379 Ok(())
2380 }
2381 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2382 ordinal: 5626768781239879949,
2383 error,
2384 }),
2385 }
2386 }
2387
2388 2070868099982362662 => {
2389 let responder = ::fidl_next::Responder::from_untyped(responder);
2390
2391 handler.get_power_save_mode(responder).await;
2392 Ok(())
2393 }
2394
2395 8789636981017894154 => {
2396 let responder = ::fidl_next::Responder::from_untyped(responder);
2397
2398 handler.power_down(responder).await;
2399 Ok(())
2400 }
2401
2402 7912237011574232306 => {
2403 let responder = ::fidl_next::Responder::from_untyped(responder);
2404
2405 handler.power_up(responder).await;
2406 Ok(())
2407 }
2408
2409 3390961545241598095 => {
2410 let responder = ::fidl_next::Responder::from_untyped(responder);
2411
2412 handler.reset(responder).await;
2413 Ok(())
2414 }
2415
2416 5060306441717482177 => {
2417 let responder = ::fidl_next::Responder::from_untyped(responder);
2418
2419 handler.get_power_state(responder).await;
2420 Ok(())
2421 }
2422
2423 6541090488596605957 => {
2424 let responder = ::fidl_next::Responder::from_untyped(responder);
2425
2426 match ::fidl_next::AsDecoderExt::into_decoded(message) {
2427 Ok(decoded) => {
2428 handler
2429 .set_bt_coexistence_mode(
2430 ::fidl_next::Request::from_decoded(decoded),
2431 responder,
2432 )
2433 .await;
2434 Ok(())
2435 }
2436 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2437 ordinal: 6541090488596605957,
2438 error,
2439 }),
2440 }
2441 }
2442
2443 8278971081947748572 => {
2444 let responder = ::fidl_next::Responder::from_untyped(responder);
2445
2446 match ::fidl_next::AsDecoderExt::into_decoded(message) {
2447 Ok(decoded) => {
2448 handler
2449 .set_tx_power_scenario(
2450 ::fidl_next::Request::from_decoded(decoded),
2451 responder,
2452 )
2453 .await;
2454 Ok(())
2455 }
2456 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2457 ordinal: 8278971081947748572,
2458 error,
2459 }),
2460 }
2461 }
2462
2463 8702006880668202770 => {
2464 let responder = ::fidl_next::Responder::from_untyped(responder);
2465
2466 handler.reset_tx_power_scenario(responder).await;
2467 Ok(())
2468 }
2469
2470 7131856269124254862 => {
2471 let responder = ::fidl_next::Responder::from_untyped(responder);
2472
2473 handler.get_tx_power_scenario(responder).await;
2474 Ok(())
2475 }
2476
2477 ordinal => {
2478 handler.on_unknown_interaction(ordinal).await;
2479 if ::core::matches!(
2480 message.header().flexibility(),
2481 ::fidl_next::protocol::Flexibility::Strict
2482 ) {
2483 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2484 } else {
2485 responder
2486 .respond_framework_error(
2487 ordinal,
2488 ::fidl_next::FrameworkError::UnknownMethod,
2489 )
2490 .expect("encoding a framework error should never fail")
2491 .await?;
2492 Ok(())
2493 }
2494 }
2495 }
2496 }
2497}
2498
2499impl<___T> WlanPhyClientHandler<___T> for ::fidl_next::IgnoreEvents
2500where
2501 ___T: ::fidl_next::Transport,
2502{
2503 async fn on_unknown_interaction(&mut self, _: u64) {}
2504}
2505
2506impl<___H, ___T> WlanPhyLocalClientHandler<___T> for ::fidl_next::Local<___H>
2507where
2508 ___H: WlanPhyClientHandler<___T>,
2509 ___T: ::fidl_next::Transport,
2510{
2511 async fn on_unknown_interaction(&mut self, ordinal: u64) {
2512 ___H::on_unknown_interaction(&mut self.0, ordinal).await
2513 }
2514}
2515
2516impl<___H, ___T> WlanPhyLocalServerHandler<___T> for ::fidl_next::Local<___H>
2517where
2518 ___H: WlanPhyServerHandler<___T>,
2519 ___T: ::fidl_next::Transport,
2520{
2521 async fn init(
2522 &mut self,
2523
2524 request: ::fidl_next::Request<wlan_phy::Init, ___T>,
2525
2526 responder: ::fidl_next::Responder<wlan_phy::Init, ___T>,
2527 ) {
2528 ___H::init(&mut self.0, request, responder).await
2529 }
2530
2531 async fn get_supported_mac_roles(
2532 &mut self,
2533
2534 responder: ::fidl_next::Responder<wlan_phy::GetSupportedMacRoles, ___T>,
2535 ) {
2536 ___H::get_supported_mac_roles(&mut self.0, responder).await
2537 }
2538
2539 async fn create_iface(
2540 &mut self,
2541
2542 request: ::fidl_next::Request<wlan_phy::CreateIface, ___T>,
2543
2544 responder: ::fidl_next::Responder<wlan_phy::CreateIface, ___T>,
2545 ) {
2546 ___H::create_iface(&mut self.0, request, responder).await
2547 }
2548
2549 async fn destroy_iface(
2550 &mut self,
2551
2552 request: ::fidl_next::Request<wlan_phy::DestroyIface, ___T>,
2553
2554 responder: ::fidl_next::Responder<wlan_phy::DestroyIface, ___T>,
2555 ) {
2556 ___H::destroy_iface(&mut self.0, request, responder).await
2557 }
2558
2559 async fn set_country(
2560 &mut self,
2561
2562 request: ::fidl_next::Request<wlan_phy::SetCountry, ___T>,
2563
2564 responder: ::fidl_next::Responder<wlan_phy::SetCountry, ___T>,
2565 ) {
2566 ___H::set_country(&mut self.0, request, responder).await
2567 }
2568
2569 async fn clear_country(
2570 &mut self,
2571
2572 responder: ::fidl_next::Responder<wlan_phy::ClearCountry, ___T>,
2573 ) {
2574 ___H::clear_country(&mut self.0, responder).await
2575 }
2576
2577 async fn get_country(&mut self, responder: ::fidl_next::Responder<wlan_phy::GetCountry, ___T>) {
2578 ___H::get_country(&mut self.0, responder).await
2579 }
2580
2581 async fn set_power_save_mode(
2582 &mut self,
2583
2584 request: ::fidl_next::Request<wlan_phy::SetPowerSaveMode, ___T>,
2585
2586 responder: ::fidl_next::Responder<wlan_phy::SetPowerSaveMode, ___T>,
2587 ) {
2588 ___H::set_power_save_mode(&mut self.0, request, responder).await
2589 }
2590
2591 async fn get_power_save_mode(
2592 &mut self,
2593
2594 responder: ::fidl_next::Responder<wlan_phy::GetPowerSaveMode, ___T>,
2595 ) {
2596 ___H::get_power_save_mode(&mut self.0, responder).await
2597 }
2598
2599 async fn power_down(&mut self, responder: ::fidl_next::Responder<wlan_phy::PowerDown, ___T>) {
2600 ___H::power_down(&mut self.0, responder).await
2601 }
2602
2603 async fn power_up(&mut self, responder: ::fidl_next::Responder<wlan_phy::PowerUp, ___T>) {
2604 ___H::power_up(&mut self.0, responder).await
2605 }
2606
2607 async fn reset(&mut self, responder: ::fidl_next::Responder<wlan_phy::Reset, ___T>) {
2608 ___H::reset(&mut self.0, responder).await
2609 }
2610
2611 async fn get_power_state(
2612 &mut self,
2613
2614 responder: ::fidl_next::Responder<wlan_phy::GetPowerState, ___T>,
2615 ) {
2616 ___H::get_power_state(&mut self.0, responder).await
2617 }
2618
2619 async fn set_bt_coexistence_mode(
2620 &mut self,
2621
2622 request: ::fidl_next::Request<wlan_phy::SetBtCoexistenceMode, ___T>,
2623
2624 responder: ::fidl_next::Responder<wlan_phy::SetBtCoexistenceMode, ___T>,
2625 ) {
2626 ___H::set_bt_coexistence_mode(&mut self.0, request, responder).await
2627 }
2628
2629 async fn set_tx_power_scenario(
2630 &mut self,
2631
2632 request: ::fidl_next::Request<wlan_phy::SetTxPowerScenario, ___T>,
2633
2634 responder: ::fidl_next::Responder<wlan_phy::SetTxPowerScenario, ___T>,
2635 ) {
2636 ___H::set_tx_power_scenario(&mut self.0, request, responder).await
2637 }
2638
2639 async fn reset_tx_power_scenario(
2640 &mut self,
2641
2642 responder: ::fidl_next::Responder<wlan_phy::ResetTxPowerScenario, ___T>,
2643 ) {
2644 ___H::reset_tx_power_scenario(&mut self.0, responder).await
2645 }
2646
2647 async fn get_tx_power_scenario(
2648 &mut self,
2649
2650 responder: ::fidl_next::Responder<wlan_phy::GetTxPowerScenario, ___T>,
2651 ) {
2652 ___H::get_tx_power_scenario(&mut self.0, responder).await
2653 }
2654
2655 async fn on_unknown_interaction(&mut self, ordinal: u64) {
2656 ___H::on_unknown_interaction(&mut self.0, ordinal).await
2657 }
2658}
2659
2660pub use fidl_next_common_fuchsia_wlan_phy::*;