objc2_core_wlan/generated/
CWChannel.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Represents an IEEE 802.11 channel.
11    ///
12    ///
13    /// The CWChannel class is used by both CWInterface and CWNetwork as a representation of an IEEE 802.11 Wi-Fi channel.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/corewlan/cwchannel?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct CWChannel;
19);
20
21extern_conformance!(
22    unsafe impl NSCoding for CWChannel {}
23);
24
25extern_conformance!(
26    unsafe impl NSCopying for CWChannel {}
27);
28
29unsafe impl CopyingHelper for CWChannel {
30    type Result = Self;
31}
32
33extern_conformance!(
34    unsafe impl NSObjectProtocol for CWChannel {}
35);
36
37extern_conformance!(
38    unsafe impl NSSecureCoding for CWChannel {}
39);
40
41impl CWChannel {
42    extern_methods!(
43        /// The channel number represented as an integer value.
44        #[unsafe(method(channelNumber))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn channelNumber(&self) -> NSInteger;
47
48        #[cfg(feature = "CoreWLANTypes")]
49        /// The channel width as indicated by the CWChannelWidth type.
50        #[unsafe(method(channelWidth))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn channelWidth(&self) -> CWChannelWidth;
53
54        #[cfg(feature = "CoreWLANTypes")]
55        /// The channel band as indicated by the CWChannelBand type.
56        #[unsafe(method(channelBand))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn channelBand(&self) -> CWChannelBand;
59
60        /// Parameter `channel`: The CWChannel with which to compare the receiver.
61        ///
62        ///
63        /// Returns: YES if the objects are equal, otherwise NO.
64        ///
65        ///
66        /// Determine CWChannel equality.
67        ///
68        ///
69        /// CWChannel objects are considered equal if all their corresponding properties are equal.
70        #[unsafe(method(isEqualToChannel:))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn isEqualToChannel(&self, channel: &CWChannel) -> bool;
73    );
74}
75
76/// Methods declared on superclass `NSObject`.
77impl CWChannel {
78    extern_methods!(
79        #[unsafe(method(init))]
80        #[unsafe(method_family = init)]
81        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82
83        #[unsafe(method(new))]
84        #[unsafe(method_family = new)]
85        pub unsafe fn new() -> Retained<Self>;
86    );
87}