corewlan

package
v0.6.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package corewlan provides Go bindings for the CoreWLAN framework.

Query AirPort interfaces and choose wireless networks.

The CoreWLAN framework provides APIs for querying AirPort interfaces and choosing networks.

Classes

  • CWChannel: Encapsulates an IEEE 802.11 channel.
  • CWConfiguration: Encapsulates an immutable configuration for an AirPort WLAN interface.
  • CWInterface: Encapsulates an IEEE 802.11 interface.
  • CWMutableConfiguration: Encapsulates a mutable configuration for an AirPort WLAN interface.
  • CWMutableNetworkProfile: Encapsulates a mutable network profile entry.
  • CWNetwork: Encapsulates an IEEE 802.11 network, providing read-only accessors to various properties of the network.
  • CWNetworkProfile: Encapsulates an immutable network profile entry.
  • CWWiFiClient: A wrapper around the entire Wi-Fi subsystem that you use to access interfaces and set up event notifications.

Protocols

  • CWEventDelegate: The interface a Wi-Fi client object uses to notify its delegate about Wi-Fi events.

Key Types

  • CWInterface - Encapsulates an IEEE 802.11 interface.
  • CWNetwork - Encapsulates an IEEE 802.11 network, providing read-only accessors to various properties of the network.
  • CWWiFiClient - A wrapper around the entire Wi-Fi subsystem that you use to access interfaces and set up event notifications.
  • CWConfiguration - Encapsulates an immutable configuration for an AirPort WLAN interface.
  • CWMutableConfiguration - Encapsulates a mutable configuration for an AirPort WLAN interface.
  • CWNetworkProfile - Encapsulates an immutable network profile entry.
  • CWChannel - Encapsulates an IEEE 802.11 channel.
  • CWMutableNetworkProfile - Encapsulates a mutable network profile entry.

Code generated from Apple documentation. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

Functions

func CWKeychainCopyEAPIdentity deprecated

func CWKeychainCopyEAPIdentity(ssidData corefoundation.CFDataRef, identity *security.SecIdentityRef) int32

CWKeychainCopyEAPIdentity finds and returns the identity stored for corresponding network with the specified SSID.

Deprecated: Deprecated since macOS 10.9.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainCopyEAPIdentity

func CWKeychainCopyEAPIdentityList

func CWKeychainCopyEAPIdentityList(list *corefoundation.CFArrayRef) int32

CWKeychainCopyEAPIdentityList finds and returns the available identities stored in the keychain.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainCopyEAPIdentityList(_:)

func CWKeychainCopyEAPUsernameAndPassword deprecated

func CWKeychainCopyEAPUsernameAndPassword(ssidData corefoundation.CFDataRef, username *corefoundation.CFStringRef, password *corefoundation.CFStringRef) int32

CWKeychainCopyEAPUsernameAndPassword finds and returns the username and password stored for corresponding network with the specified SSID.

Deprecated: Deprecated since macOS 10.9.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainCopyEAPUsernameAndPassword

func CWKeychainCopyPassword deprecated

func CWKeychainCopyPassword(ssidData corefoundation.CFDataRef, password *corefoundation.CFStringRef) int32

CWKeychainCopyPassword finds and returns the keychain password stored for the corresponding network with the specified SSID.

Deprecated: Deprecated since macOS 10.9.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainCopyPassword

func CWKeychainCopyWiFiEAPIdentity

func CWKeychainCopyWiFiEAPIdentity(domain CWKeychainDomain, ssid *foundation.NSData, identity *security.SecIdentityRef) int32

CWKeychainCopyWiFiEAPIdentity finds and returns the identity stored for the SSID and keychain domain you specify.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainCopyWiFiEAPIdentity(_:_:_:)

func CWKeychainDeleteEAPUsernameAndPassword deprecated

func CWKeychainDeleteEAPUsernameAndPassword(ssidData corefoundation.CFDataRef) int32

CWKeychainDeleteEAPUsernameAndPassword deletes the keychain item containing the 802.1X username and password for the specified SSID.

Deprecated: Deprecated since macOS 10.9.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainDeleteEAPUsernameAndPassword

func CWKeychainDeletePassword deprecated

func CWKeychainDeletePassword(ssidData corefoundation.CFDataRef) int32

CWKeychainDeletePassword deletes the network password for the specified SSID from the default keychain.

Deprecated: Deprecated since macOS 10.9.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainDeletePassword

func CWKeychainDeleteWiFiEAPUsernameAndPassword

func CWKeychainDeleteWiFiEAPUsernameAndPassword(domain CWKeychainDomain, ssid *foundation.NSData) int32

CWKeychainDeleteWiFiEAPUsernameAndPassword deletes the 802.1X username and password for the SSID and keychain domain you specify.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainDeleteWiFiEAPUsernameAndPassword(_:_:)

func CWKeychainDeleteWiFiPassword

func CWKeychainDeleteWiFiPassword(domain CWKeychainDomain, ssid *foundation.NSData) int32

CWKeychainDeleteWiFiPassword deletes the password for the SSID and keychain domain you specify.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainDeleteWiFiPassword(_:_:)

func CWKeychainFindWiFiEAPUsernameAndPassword

func CWKeychainFindWiFiEAPUsernameAndPassword(domain CWKeychainDomain, ssid *foundation.NSData, username foundation.NSString, password foundation.NSString) int32

CWKeychainFindWiFiEAPUsernameAndPassword finds and returns the 802.1X username and password stored for the SSID and keychain domain you specify.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainFindWiFiEAPUsernameAndPassword(_:_:_:_:)

func CWKeychainFindWiFiPassword

func CWKeychainFindWiFiPassword(domain CWKeychainDomain, ssid *foundation.NSData, password foundation.NSString) int32

CWKeychainFindWiFiPassword finds and returns, by reference, the password for the SSID and keychain domain you specify.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainFindWiFiPassword(_:_:_:)

func CWKeychainSetEAPIdentity deprecated

func CWKeychainSetEAPIdentity(ssidData corefoundation.CFDataRef, identity security.SecIdentityRef) int32

CWKeychainSetEAPIdentity associates an exisiting identity item to the specified SSID.

Deprecated: Deprecated since macOS 10.9.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainSetEAPIdentity

func CWKeychainSetEAPUsernameAndPassword deprecated

func CWKeychainSetEAPUsernameAndPassword(ssidData corefoundation.CFDataRef, username corefoundation.CFStringRef, password corefoundation.CFStringRef) int32

CWKeychainSetEAPUsernameAndPassword sets the keychain item containing the 802.1X username and password for the specified SSID.

Deprecated: Deprecated since macOS 10.9.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainSetEAPUsernameAndPassword

func CWKeychainSetPassword deprecated

func CWKeychainSetPassword(ssidData corefoundation.CFDataRef, password corefoundation.CFStringRef) int32

CWKeychainSetPassword sets the network keychain password for the specified SSID.

Deprecated: Deprecated since macOS 10.9.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainSetPassword

func CWKeychainSetWiFiEAPIdentity

func CWKeychainSetWiFiEAPIdentity(domain CWKeychainDomain, ssid *foundation.NSData, identity security.SecIdentityRef) int32

CWKeychainSetWiFiEAPIdentity associates an identity to the SSID and keychain domain you specify.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainSetWiFiEAPIdentity(_:_:_:)

func CWKeychainSetWiFiEAPUsernameAndPassword

func CWKeychainSetWiFiEAPUsernameAndPassword(domain CWKeychainDomain, ssid *foundation.NSData, username *foundation.NSString, password *foundation.NSString) int32

CWKeychainSetWiFiEAPUsernameAndPassword sets the 802.1X username and password for the SSID and keychain domain you specify.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainSetWiFiEAPUsernameAndPassword(_:_:_:_:)

func CWKeychainSetWiFiPassword

func CWKeychainSetWiFiPassword(domain CWKeychainDomain, ssid *foundation.NSData, password *foundation.NSString) int32

CWKeychainSetWiFiPassword sets the Wi-Fi network keychain password for the SSID and keychain domain you specify.

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainSetWiFiPassword(_:_:_:)

func CWMergeNetworks

func CWMergeNetworks(networks uintptr) uintptr

CWMergeNetworks merges the specified set of CWNetwork objects.

See: https://developer.apple.com/documentation/CoreWLAN/CWMergeNetworks(_:)

Types

type CWChannel

type CWChannel struct {
	objectivec.Object
}

Encapsulates an IEEE 802.11 channel.

Comparing channels

Instance Properties

Initializers

See: https://developer.apple.com/documentation/CoreWLAN/CWChannel

func CWChannelFromID

func CWChannelFromID(id objc.ID) CWChannel

CWChannelFromID constructs a CWChannel from an objc.ID.

Encapsulates an IEEE 802.11 channel.

func NewCWChannel

func NewCWChannel() CWChannel

NewCWChannel creates a new CWChannel instance.

func (CWChannel) Autorelease

func (c CWChannel) Autorelease() CWChannel

Autorelease adds the receiver to the current autorelease pool.

func (CWChannel) ChannelNumber

func (c CWChannel) ChannelNumber() int

The channel number.

See: https://developer.apple.com/documentation/CoreWLAN/CWChannel/channelNumber

func (CWChannel) EncodeWithCoder

func (c CWChannel) EncodeWithCoder(coder foundation.INSCoder)

func (CWChannel) Init

func (c CWChannel) Init() CWChannel

Init initializes the instance.

func (CWChannel) IsEqualToChannel

func (c CWChannel) IsEqualToChannel(channel ICWChannel) bool

Determine CWChannel object equality.

channel: The CWChannel object with which to compare the receiver.

Return Value

YES if the objects are equal.

Discussion

CWChannel objects are considered equal if all their corresponding properties are equal.

See: https://developer.apple.com/documentation/CoreWLAN/CWChannel/isEqual(to:)

type CWChannelBand

type CWChannelBand int

See: https://developer.apple.com/documentation/CoreWLAN/CWChannelBand

const (
	// KCWChannelBand2GHz: 2.4GHz channel band.
	KCWChannelBand2GHz CWChannelBand = 1
	// KCWChannelBand5GHz: 5GHz channel band.
	KCWChannelBand5GHz CWChannelBand = 2
	// KCWChannelBandUnknown: Unknown channel band.
	KCWChannelBandUnknown CWChannelBand = 0
)

func (CWChannelBand) String

func (e CWChannelBand) String() string

type CWChannelClass

type CWChannelClass struct {
	// contains filtered or unexported fields
}

func GetCWChannelClass

func GetCWChannelClass() CWChannelClass

GetCWChannelClass returns the class object for CWChannel.

func (CWChannelClass) Alloc

func (cc CWChannelClass) Alloc() CWChannel

Alloc allocates memory for a new instance of the class.

func (CWChannelClass) Class

func (cc CWChannelClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type CWChannelWidth

type CWChannelWidth int

See: https://developer.apple.com/documentation/CoreWLAN/CWChannelWidth

const (
	// KCWChannelWidth160MHz: 160MHz channel width.
	KCWChannelWidth160MHz CWChannelWidth = 4
	// KCWChannelWidth20MHz: 20MHz channel width.
	KCWChannelWidth20MHz CWChannelWidth = 1
	// KCWChannelWidth40MHz: 40MHz channel width.
	KCWChannelWidth40MHz CWChannelWidth = 2
	// KCWChannelWidth80MHz: 80MHz channel width.
	KCWChannelWidth80MHz CWChannelWidth = 3
	// KCWChannelWidthUnknown: Unknown channel width.
	KCWChannelWidthUnknown CWChannelWidth = 0
)

func (CWChannelWidth) String

func (e CWChannelWidth) String() string

type CWCipherKeyFlags

type CWCipherKeyFlags uint

See: https://developer.apple.com/documentation/CoreWLAN/CWCipherKeyFlags

const (
	// KCWCipherKeyFlagsMulticast: A flag that indicates to use the cipher key for multicast packets.
	KCWCipherKeyFlagsMulticast CWCipherKeyFlags = 4
	// KCWCipherKeyFlagsNone: Open System authentication.
	KCWCipherKeyFlagsNone CWCipherKeyFlags = 0
	// KCWCipherKeyFlagsRx: A flag that indicates to use the cipher key for packets received by the interface.
	KCWCipherKeyFlagsRx CWCipherKeyFlags = 16
	// KCWCipherKeyFlagsTx: A flag that indicates to use the cipher key for packets sent from the interface.
	KCWCipherKeyFlagsTx CWCipherKeyFlags = 8
	// KCWCipherKeyFlagsUnicast: A flag that indicates to use the cipher key for unicast packets.
	KCWCipherKeyFlagsUnicast CWCipherKeyFlags = 2
)

func (CWCipherKeyFlags) String

func (e CWCipherKeyFlags) String() string

type CWConfiguration

type CWConfiguration struct {
	objectivec.Object
}

Encapsulates an immutable configuration for an AirPort WLAN interface.

Creating a configuration

Comparing configurations

Instance Properties

Initializers

See: https://developer.apple.com/documentation/CoreWLAN/CWConfiguration

func CWConfigurationFromID

func CWConfigurationFromID(id objc.ID) CWConfiguration

CWConfigurationFromID constructs a CWConfiguration from an objc.ID.

Encapsulates an immutable configuration for an AirPort WLAN interface.

func NewCWConfiguration

func NewCWConfiguration() CWConfiguration

NewCWConfiguration creates a new CWConfiguration instance.

func NewCWConfigurationWithConfiguration

func NewCWConfigurationWithConfiguration(configuration ICWConfiguration) CWConfiguration

Creates and returns a CWConfiguration object initialized with the given CWConfiguration object.

configuration: The CWConfiguration object to use to initialize a new CWConfiguration object.

Return Value

A CWConfiguration object.

See: https://developer.apple.com/documentation/CoreWLAN/CWConfiguration/init(configuration:)

func (CWConfiguration) Autorelease

func (c CWConfiguration) Autorelease() CWConfiguration

Autorelease adds the receiver to the current autorelease pool.

func (CWConfiguration) EncodeWithCoder

func (c CWConfiguration) EncodeWithCoder(coder foundation.INSCoder)

func (CWConfiguration) Init

Init initializes the instance.

func (CWConfiguration) InitWithConfiguration

func (c CWConfiguration) InitWithConfiguration(configuration ICWConfiguration) CWConfiguration

Creates and returns a CWConfiguration object initialized with the given CWConfiguration object.

configuration: The CWConfiguration object to use to initialize a new CWConfiguration object.

Return Value

A CWConfiguration object.

See: https://developer.apple.com/documentation/CoreWLAN/CWConfiguration/init(configuration:)

func (CWConfiguration) IsEqualToConfiguration

func (c CWConfiguration) IsEqualToConfiguration(configuration ICWConfiguration) bool

Determine CWConfiguration object equality.

configuration: The CWConfiguration object with which to compare the receiver.

Return Value

YES if the objects are equal.

Discussion

CWConfiguration objects are considered equal if all their corresponding properties are equal.

See: https://developer.apple.com/documentation/CoreWLAN/CWConfiguration/isEqual(to:)

func (CWConfiguration) NetworkProfiles

func (c CWConfiguration) NetworkProfiles() foundation.INSOrderedSet

An array of remembered CWNetworkProfile objects.

Discussion

The order of this array corresponds to the order in which the the CWNetworkProfile objects participate in the auto-join process.

See: https://developer.apple.com/documentation/CoreWLAN/CWConfiguration/networkProfiles

func (CWConfiguration) RememberJoinedNetworks

func (c CWConfiguration) RememberJoinedNetworks() bool

AirPort client will remember all joined networks.

See: https://developer.apple.com/documentation/CoreWLAN/CWConfiguration/rememberJoinedNetworks

func (CWConfiguration) RequireAdministratorForAssociation

func (c CWConfiguration) RequireAdministratorForAssociation() bool

Require an administrator password to change networks.

See: https://developer.apple.com/documentation/CoreWLAN/CWConfiguration/requireAdministratorForAssociation

func (CWConfiguration) RequireAdministratorForIBSSMode

func (c CWConfiguration) RequireAdministratorForIBSSMode() bool

Require an administrator password to create a computer-to-computer network.

See: https://developer.apple.com/documentation/CoreWLAN/CWConfiguration/requireAdministratorForIBSSMode

func (CWConfiguration) RequireAdministratorForPower

func (c CWConfiguration) RequireAdministratorForPower() bool

Require an administrator password to change the interface power state.

See: https://developer.apple.com/documentation/CoreWLAN/CWConfiguration/requireAdministratorForPower

type CWConfigurationClass

type CWConfigurationClass struct {
	// contains filtered or unexported fields
}

func GetCWConfigurationClass

func GetCWConfigurationClass() CWConfigurationClass

GetCWConfigurationClass returns the class object for CWConfiguration.

func (CWConfigurationClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CWConfigurationClass) Class

func (cc CWConfigurationClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type CWEventDelegate

type CWEventDelegate interface {
	objectivec.IObject
}

The interface a Wi-Fi client object uses to notify its delegate about Wi-Fi events.

See: https://developer.apple.com/documentation/CoreWLAN/CWEventDelegate

type CWEventDelegateConfig

type CWEventDelegateConfig struct {

	// Instance Methods
	// ClientConnectionInterrupted — Tells the delegate that the connection to the Wi-Fi subsystem is temporarily interrupted.
	ClientConnectionInterrupted func()
	// ClientConnectionInvalidated — Tells the delegate that the connection to the Wi-Fi subsystem is permanently invalidated.
	ClientConnectionInvalidated func()
}

CWEventDelegateConfig holds optional typed callbacks for CWEventDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type CWEventDelegateObject

type CWEventDelegateObject struct {
	objectivec.Object
}

CWEventDelegateObject wraps an existing Objective-C object that conforms to the CWEventDelegate protocol.

func CWEventDelegateObjectFromID

func CWEventDelegateObjectFromID(id objc.ID) CWEventDelegateObject

CWEventDelegateObjectFromID constructs a CWEventDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func NewCWEventDelegate

func NewCWEventDelegate(config CWEventDelegateConfig) CWEventDelegateObject

NewCWEventDelegate creates an Objective-C object implementing the CWEventDelegate protocol.

Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.

The returned CWEventDelegateObject satisfies the CWEventDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func (CWEventDelegateObject) BaseObject

func (o CWEventDelegateObject) BaseObject() objectivec.Object

func (CWEventDelegateObject) BssidDidChangeForWiFiInterfaceWithName

func (o CWEventDelegateObject) BssidDidChangeForWiFiInterfaceWithName(interfaceName string)

Tells the delegate that the current BSSID has changed.

interfaceName: The name of the Wi-Fi interface on which the BSSID changed.

Discussion

Register for BSSID change notifications by sending the CWWiFiClient.StartMonitoringEventWithTypeError message to a Wi-Fi client object with the CWEventType.bssidDidChange event type.

Use the Wi-Fi interface’s CWInterface.Bssid method to query the current BSSID.

See: https://developer.apple.com/documentation/CoreWLAN/CWEventDelegate/bssidDidChangeForWiFiInterface(withName:)

func (CWEventDelegateObject) ClientConnectionInterrupted

func (o CWEventDelegateObject) ClientConnectionInterrupted()

Tells the delegate that the connection to the Wi-Fi subsystem is temporarily interrupted.

Discussion

All event notifications for which the Wi-Fi client is registered are automatically re-registered when the connection resumes.

See: https://developer.apple.com/documentation/CoreWLAN/CWEventDelegate/clientConnectionInterrupted()

func (CWEventDelegateObject) ClientConnectionInvalidated

func (o CWEventDelegateObject) ClientConnectionInvalidated()

Tells the delegate that the connection to the Wi-Fi subsystem is permanently invalidated.

See: https://developer.apple.com/documentation/CoreWLAN/CWEventDelegate/clientConnectionInvalidated()

func (CWEventDelegateObject) CountryCodeDidChangeForWiFiInterfaceWithName

func (o CWEventDelegateObject) CountryCodeDidChangeForWiFiInterfaceWithName(interfaceName string)

Tells the delegate that the currently adopted country code has changed.

interfaceName: The name of the Wi-Fi interface on which the country code changed.

Discussion

Register for country code change notifications by sending the CWWiFiClient.StartMonitoringEventWithTypeError message to a Wi-Fi client object with the CWEventType.countryCodeDidChange event type.

Use the Wi-Fi interface’s CWInterface.CountryCode method to query the currently adopted country code.

See: https://developer.apple.com/documentation/CoreWLAN/CWEventDelegate/countryCodeDidChangeForWiFiInterface(withName:)

func (CWEventDelegateObject) LinkDidChangeForWiFiInterfaceWithName

func (o CWEventDelegateObject) LinkDidChangeForWiFiInterfaceWithName(interfaceName string)

Tells the delegate that the Wi-Fi link state changed.

interfaceName: The name of the Wi-Fi interface on which the link state changed.

Discussion

Register for link state change notifications by sending the CWWiFiClient.StartMonitoringEventWithTypeError message to a Wi-Fi client object with the CWEventType.linkDidChange event type.

See: https://developer.apple.com/documentation/CoreWLAN/CWEventDelegate/linkDidChangeForWiFiInterface(withName:)

func (CWEventDelegateObject) LinkQualityDidChangeForWiFiInterfaceWithNameRssiTransmitRate

func (o CWEventDelegateObject) LinkQualityDidChangeForWiFiInterfaceWithNameRssiTransmitRate(interfaceName string, rssi int, transmitRate float64)

Tells the delegate that the link quality has changed.

interfaceName: The name of the Wi-Fi interface on which the link quality changed.

rssi: The receive signal strength indicator (RSSI) value measured in dBm for the currently associated network.

transmitRate: The transmit rate measured in Mbps for the currently associated network.

Discussion

Register for link quality change notifications by sending the CWWiFiClient.StartMonitoringEventWithTypeError message to a Wi-Fi client object with the CWEventType.linkQualityDidChange event type.

Use the Wi-Fi interface’s CWInterface.RssiValue and CWInterface.TransmitRate methods to query the current RSSI and transmit rate, respectively.

See: https://developer.apple.com/documentation/CoreWLAN/CWEventDelegate/linkQualityDidChangeForWiFiInterface(withName:rssi:transmitRate:)

func (CWEventDelegateObject) ModeDidChangeForWiFiInterfaceWithName

func (o CWEventDelegateObject) ModeDidChangeForWiFiInterfaceWithName(interfaceName string)

Tells the delegate that the operating mode has changed.

interfaceName: The name of the Wi-Fi interface on which the operating mode changed.

Discussion

Register for operating mode change notifications by sending the CWWiFiClient.StartMonitoringEventWithTypeError message to a Wi-Fi client object with the CWEventType.modeDidChange event type.

Use the Wi-Fi interface’s CWInterface.InterfaceMode method to query the current operating mode.

See: https://developer.apple.com/documentation/CoreWLAN/CWEventDelegate/modeDidChangeForWiFiInterface(withName:)

func (CWEventDelegateObject) PowerStateDidChangeForWiFiInterfaceWithName

func (o CWEventDelegateObject) PowerStateDidChangeForWiFiInterfaceWithName(interfaceName string)

Tells the delegate that the Wi-Fi power state changed.

interfaceName: The name of the Wi-Fi interface on which the power changed.

Discussion

Register for power state change notifications by sending the CWWiFiClient.StartMonitoringEventWithTypeError message to a Wi-Fi client object with the CWEventType.powerDidChange event type.

Use the Wi-Fi interface’s CWInterface.PowerOn method to query the current Wi-Fi power state.

See: https://developer.apple.com/documentation/CoreWLAN/CWEventDelegate/powerStateDidChangeForWiFiInterface(withName:)

func (CWEventDelegateObject) ScanCacheUpdatedForWiFiInterfaceWithName

func (o CWEventDelegateObject) ScanCacheUpdatedForWiFiInterfaceWithName(interfaceName string)

Tells the delegate that the Wi-Fi interface’s scan cache has been updated with new results.

interfaceName: The name of the Wi-Fi interface for which the scan cache results have been updated.

Discussion

Register for scan cache update notifications by sending the CWWiFiClient.StartMonitoringEventWithTypeError message to a Wi-Fi client object with the CWEventType.scanCacheUpdated event type.

Use the Wi-Fi interface’s CWInterface.CachedScanResults method to query the scan cache results from the last scan.

See: https://developer.apple.com/documentation/CoreWLAN/CWEventDelegate/scanCacheUpdatedForWiFiInterface(withName:)

func (CWEventDelegateObject) SsidDidChangeForWiFiInterfaceWithName

func (o CWEventDelegateObject) SsidDidChangeForWiFiInterfaceWithName(interfaceName string)

Tells the delegate that the current SSID has changed.

interfaceName: The name of the Wi-Fi interface on which the SSID changed.

Discussion

Register for SSID change notifications by sending the CWWiFiClient.StartMonitoringEventWithTypeError message to a Wi-Fi client object with the CWEventType.ssidDidChange event type.

Use the Wi-Fi interface’s CWInterface.SsidData or CWInterface.Ssid method to query the current SSID.

See: https://developer.apple.com/documentation/CoreWLAN/CWEventDelegate/ssidDidChangeForWiFiInterface(withName:)

type CWEventType

type CWEventType int

See: https://developer.apple.com/documentation/CoreWLAN/CWEventType

const (
	// CWEventTypeBSSIDDidChange: Posts when the current BSSID of any Wi-Fi interface changes.
	CWEventTypeBSSIDDidChange CWEventType = 3
	CWEventTypeBtCoexStats    CWEventType = 9
	// CWEventTypeCountryCodeDidChange: Posts when the adopted country code of any Wi-Fi interface changes.
	CWEventTypeCountryCodeDidChange CWEventType = 4
	// CWEventTypeLinkDidChange: Posts when the link state for any Wi-Fi interface changes.
	CWEventTypeLinkDidChange CWEventType = 5
	// CWEventTypeLinkQualityDidChange: Posts when the RSSI or transmit rate for any Wi-Fi interface changes.
	CWEventTypeLinkQualityDidChange CWEventType = 6
	// CWEventTypeModeDidChange: Posts when the operating mode of any Wi-Fi interface changes.
	CWEventTypeModeDidChange CWEventType = 7
	// CWEventTypeNone: No specified event type.
	CWEventTypeNone CWEventType = 0
	// CWEventTypePowerDidChange: Posts when the power state of any Wi-Fi interface changes.
	CWEventTypePowerDidChange CWEventType = 1
	// CWEventTypeSSIDDidChange: Posts when the current SSID of any Wi-Fi interface changes.
	CWEventTypeSSIDDidChange CWEventType = 2
	// CWEventTypeScanCacheUpdated: Posts when the scan cache of any Wi-Fi interface is updated with new scan results.
	CWEventTypeScanCacheUpdated CWEventType = 8
	// CWEventTypeUnknown: Unknown event type.
	CWEventTypeUnknown CWEventType = 9223372036854775807
)

func (CWEventType) String

func (e CWEventType) String() string

type CWIBSSModeSecurity

type CWIBSSModeSecurity int

See: https://developer.apple.com/documentation/CoreWLAN/CWIBSSModeSecurity

const (
	// KCWIBSSModeSecurityNone: Open System authentication.
	KCWIBSSModeSecurityNone CWIBSSModeSecurity = 0
	// KCWIBSSModeSecurityWEP104: WPA Personal authentication.
	KCWIBSSModeSecurityWEP104 CWIBSSModeSecurity = 2
	// KCWIBSSModeSecurityWEP40: WEP security.
	KCWIBSSModeSecurityWEP40 CWIBSSModeSecurity = 1
)

func (CWIBSSModeSecurity) String

func (e CWIBSSModeSecurity) String() string

type CWInterface

type CWInterface struct {
	objectivec.Object
}

Encapsulates an IEEE 802.11 interface.

Overview

Provides access to various WLAN interface parameters, and operations such as scanning for networks, association, and creating computer-to-computer (ad-hoc) networks.

Setting interface parameters

Scanning for networks

Disassociating from a network

Committing a configuration

Associating to a network

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface

func CWInterfaceFromID

func CWInterfaceFromID(id objc.ID) CWInterface

CWInterfaceFromID constructs a CWInterface from an objc.ID.

Encapsulates an IEEE 802.11 interface.

func NewCWInterface

func NewCWInterface() CWInterface

NewCWInterface creates a new CWInterface instance.

func (CWInterface) ActivePHYMode

func (c CWInterface) ActivePHYMode() CWPHYMode

The current active PHY modes for the interface.

Discussion

Dynamically queries the interface for the current active PHY mode. Returns kCWPHYModeNone in the case of an error, or if the interface is not participating in a network.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/activePHYMode()

func (CWInterface) AssociateToEnterpriseNetworkIdentityUsernamePasswordError

func (c CWInterface) AssociateToEnterpriseNetworkIdentityUsernamePasswordError(network ICWNetwork, identity security.SecIdentityRef, username string, password string) (bool, error)

Connects to the given enterprise network.

network: The network to which the interface will associate.

identity: The identity to use for IEEE 802.1X authentication. Holds the corresponding client certificate.

username: The username to use for IEEE 802.1X authentication.

password: The password to use for IEEE 802.1X authentication.

Discussion

This method will block for the duration of the association. This operation may require an administrator password.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/associate(toEnterpriseNetwork:identity:username:password:)

func (CWInterface) AssociateToNetworkPasswordError

func (c CWInterface) AssociateToNetworkPasswordError(network ICWNetwork, password string) (bool, error)

Associates to a given network using the given network passphrase.

network: The network to which the interface will associate.

password: The network passphrase or key. Required for association to WEP, WPA Personal, and WPA2 Personal networks.

Discussion

This method will block for the duration of the association. This operation may require an administrator password.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/associate(to:password:)

func (CWInterface) Autorelease

func (c CWInterface) Autorelease() CWInterface

Autorelease adds the receiver to the current autorelease pool.

func (CWInterface) Bssid

func (c CWInterface) Bssid() string

The current basic service set identifier (BSSID) for the interface, returned as a UTF-8 string.

Discussion

Dynamically queries the interface for the current BSSID. Returns a UTF-8 string formatted as , or nil in the case of an error, or if the interface is not participating in a network.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/bssid()

func (CWInterface) CachedScanResults

func (c CWInterface) CachedScanResults() foundation.INSSet

The networks currently in the scan cache for the WLAN interface.

Discussion

Returns nil in the case of an error.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/cachedScanResults()

func (CWInterface) CommitConfigurationAuthorizationError

func (c CWInterface) CommitConfigurationAuthorizationError(configuration ICWConfiguration, authorization objectivec.IObject) (bool, error)

Commit a configuration for the given WLAN interface.

configuration: The configuration to commit.

authorization: An SFAuthorization object to use for authorizing the commit. This parameter is optional and can be passed as nil.

authorization is a [*securityfoundation.SFAuthorization].

Discussion

This method requires the caller have root privileges or obtain administrator privileges with the authorization parameter.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/commitConfiguration(_:authorization:)

func (CWInterface) Configuration

func (c CWInterface) Configuration() ICWConfiguration

The current configuration for the given WLAN interface.

Discussion

Returns nil in the case of an error.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/configuration()

func (CWInterface) CountryCode

func (c CWInterface) CountryCode() string

The current country code (ISO/IEC 3166-1:1997) for the interface.

Discussion

Dynamically queries the interface for the current country code. Returns nil in the case of an error, or if the interface is OFF.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/countryCode()

func (CWInterface) Disassociate

func (c CWInterface) Disassociate()

Disassociates from the current network.

Discussion

This method has no effect if the interface is not associated to a network. This operation may require an administrator password.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/disassociate()

func (CWInterface) HardwareAddress

func (c CWInterface) HardwareAddress() string

The hardware media access control (MAC) address for the interface, returned as a UTF-8 string.

Discussion

The standard format for printing a MAC-48 address is used to represent the MAC address as a string. Returns nil in the case of an error.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/hardwareAddress()

func (CWInterface) Init

func (c CWInterface) Init() CWInterface

Init initializes the instance.

func (CWInterface) InterfaceMode

func (c CWInterface) InterfaceMode() CWInterfaceMode

The current mode for the interface.

Discussion

Dynamically queries the interface for the current mode. Returns kCWInterfaceModeNone in the case of an error, or if the interface is not participating in a network.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/interfaceMode()

func (CWInterface) InterfaceName

func (c CWInterface) InterfaceName() string

The BSD name of the interface.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/interfaceName

func (CWInterface) NoiseMeasurement

func (c CWInterface) NoiseMeasurement() int

The current aggregate noise measurement (dBm) for the interface.

Discussion

Dynamically queries the interface for the current aggregate noise measurement. Returns 0 in the case of an error, or if the interface is not participating in a network.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/noiseMeasurement()

func (CWInterface) PowerOn

func (c CWInterface) PowerOn() bool

The interface power state is set to “ON”.

Discussion

Dynamically queries the interface for the current power state. Returns NO in the case of an error.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/powerOn()

func (CWInterface) RssiValue

func (c CWInterface) RssiValue() int

The current aggregate received signal strength indication (RSSI) measurement (dBm) for the interface.

Discussion

Dynamically queries the interface for the current aggregate RSSI measurement. Returns 0 in the case of an error, or if the interface is not participating in a network.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/rssiValue()

func (CWInterface) ScanForNetworksWithNameError

func (c CWInterface) ScanForNetworksWithNameError(networkName string) (foundation.INSSet, error)

Scans for networks.

networkName: The name (SSID) of the network for which to scan.

Return Value

A set of CWNetwork objects.

Discussion

If ssid parameter is present, a directed scan will be performed by the interface, otherwise a broadcast scan will be performed. This method will block for the duration of the scan.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/scanForNetworks(withName:)

func (CWInterface) ScanForNetworksWithNameIncludeHiddenError

func (c CWInterface) ScanForNetworksWithNameIncludeHiddenError(networkName string, includeHidden bool) (foundation.INSSet, error)

Scans for networks with the name you specify, optionally including hidden networks.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/scanForNetworks(withName:includeHidden:)

func (CWInterface) ScanForNetworksWithSSIDError

func (c CWInterface) ScanForNetworksWithSSIDError(ssid foundation.NSData) (foundation.INSSet, error)

Scans for networks.

ssid: The SSID for which to scan.

Return Value

A set of CWNetwork objects.

Discussion

If ssid parameter is present, a directed scan will be performed by the interface, otherwise a broadcast scan will be performed. This method will block for the duration of the scan.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/scanForNetworks(withSSID:)

func (CWInterface) ScanForNetworksWithSSIDIncludeHiddenError

func (c CWInterface) ScanForNetworksWithSSIDIncludeHiddenError(ssid foundation.NSData, includeHidden bool) (foundation.INSSet, error)

Scans for networks with the SSID you specify, optionally including hidden networks.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/scanForNetworks(withSSID:includeHidden:)

func (CWInterface) Security

func (c CWInterface) Security() CWSecurity

The current security mode for the interface.

Discussion

Dynamically queries the interface for the security mode. Returns kCWSecurityUnknown in the case of an error, or if the interface is not participating in a network.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/security()

func (CWInterface) ServiceActive

func (c CWInterface) ServiceActive() bool

The interface has its corresponding network service enabled.

Discussion

Returns NO in the case of an error.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/serviceActive()

func (CWInterface) SetPairwiseMasterKeyError

func (c CWInterface) SetPairwiseMasterKeyError(key foundation.NSData) (bool, error)

Sets the interface pairwise primary key (PMK).

key: An NSData object containing the pairwise primary key (PMK).

Discussion

key must be 32 octets. If key is nil, this method clears the PMK for the interface.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/setPairwiseMasterKey(_:)

func (CWInterface) SetPowerError

func (c CWInterface) SetPowerError(power bool) (bool, error)

Sets the interface power state.

power: A Boolean value corresponding to the power state. NO indicates the “OFF” state.

Discussion

This operation may require an administrator password.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/setPower(_:)

func (CWInterface) SetWEPKeyFlagsIndexError

func (c CWInterface) SetWEPKeyFlagsIndexError(key foundation.NSData, flags CWCipherKeyFlags, index int) (bool, error)

Sets the interface WEP key.

key: An NSData object containing the WEP key.

flags: An NSUInteger indicating which cipher key flags to use for the specified key.

index: An NSUInteger indicating which default key index to use for the specified key.

Discussion

key must be 5 octets for WEP-40 or 13 octets for WEP-104. If key is nil, this method clears the WEP key for the interface. index must correspond to default key index 1-4.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/setWEPKey(_:flags:index:)

func (CWInterface) SetWLANChannelError

func (c CWInterface) SetWLANChannelError(channel ICWChannel) (bool, error)

Sets the interface channel.

channel: A CWChannel object corresponding to the channel.

Discussion

The channel cannot be changed if the interface is associated to a network.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/setWLANChannel(_:)

func (CWInterface) Ssid

func (c CWInterface) Ssid() string

The current service set identifier (SSID) for the interface, encoded as a string.

Discussion

Dynamically queries the interface for the current SSID. Returns nil in the case of an error, or if the interface is not participating in a network, or if the SSID can not be encoded as a valid UTF-8 or WinLatin1 string.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/ssid()

func (CWInterface) SsidData

func (c CWInterface) SsidData() foundation.NSData

The current service set identifier (SSID) for the interface, returned as data.

Discussion

Dynamically queries the interface for the current SSID. The SSID is 1-32 octets. Returns nil in the case of an error, or if the interface is not participating in a network.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/ssidData()

func (CWInterface) SupportedWLANChannels

func (c CWInterface) SupportedWLANChannels() foundation.INSSet

An array of channels supported by the interface for the active country code.

Discussion

Dynamically queries the interface for the supported channels. Returns an array of CWChannel objects, or nil in the case of an error.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/supportedWLANChannels()

func (CWInterface) TransmitPower

func (c CWInterface) TransmitPower() int

The current transmit power (mW) for the interface.

Discussion

Dynamically queries the interface for the current transmit power. Returns 0 in the case of an error.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/transmitPower()

func (CWInterface) TransmitRate

func (c CWInterface) TransmitRate() float64

The current transmit rate (Mbps) for the interface.

Discussion

Dynamically queries the interface for the current transmit rate. Returns 0 in the case of an error, or if the interface is not participating in a network.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/transmitRate()

func (CWInterface) WlanChannel

func (c CWInterface) WlanChannel() ICWChannel

The current channel for the interface.

Discussion

Dynamically queries the interface for the current channel. Returns nil in the case of an error, or if the interface is not participating in a network.

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface/wlanChannel()

type CWInterfaceClass

type CWInterfaceClass struct {
	// contains filtered or unexported fields
}

func GetCWInterfaceClass

func GetCWInterfaceClass() CWInterfaceClass

GetCWInterfaceClass returns the class object for CWInterface.

func (CWInterfaceClass) Alloc

func (cc CWInterfaceClass) Alloc() CWInterface

Alloc allocates memory for a new instance of the class.

func (CWInterfaceClass) Class

func (cc CWInterfaceClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type CWInterfaceMode

type CWInterfaceMode int

See: https://developer.apple.com/documentation/CoreWLAN/CWInterfaceMode

const (
	// KCWInterfaceModeHostAP: Interface is participating in an infrastructure network as an access point.
	KCWInterfaceModeHostAP CWInterfaceMode = 3
	// KCWInterfaceModeIBSS: Interface is participating in an IBSS network.
	KCWInterfaceModeIBSS CWInterfaceMode = 2
	// KCWInterfaceModeNone: Interface is not in any mode.
	KCWInterfaceModeNone CWInterfaceMode = 0
	// KCWInterfaceModeStation: Interface is participating in an infrastructure network as a non-AP station.
	KCWInterfaceModeStation CWInterfaceMode = 1
)

func (CWInterfaceMode) String

func (e CWInterfaceMode) String() string

type CWKeychainDomain

type CWKeychainDomain int

See: https://developer.apple.com/documentation/CoreWLAN/CWKeychainDomain

const (
	// KCWKeychainDomainNone: No keychain domain specified.
	KCWKeychainDomainNone CWKeychainDomain = 0
	// KCWKeychainDomainSystem: The system keychain domain.
	KCWKeychainDomainSystem CWKeychainDomain = 2
	// KCWKeychainDomainUser: The user keychain domain.
	KCWKeychainDomainUser CWKeychainDomain = 1
)

func (CWKeychainDomain) String

func (e CWKeychainDomain) String() string

type CWMutableConfiguration

type CWMutableConfiguration struct {
	CWConfiguration
}

Encapsulates a mutable configuration for an AirPort WLAN interface.

Overview

Use this class to change configuration settings or the preferred networks list. To commit configuration changes, use CWInterface.CommitConfigurationAuthorizationError.

See: https://developer.apple.com/documentation/CoreWLAN/CWMutableConfiguration

func CWMutableConfigurationFromID

func CWMutableConfigurationFromID(id objc.ID) CWMutableConfiguration

CWMutableConfigurationFromID constructs a CWMutableConfiguration from an objc.ID.

Encapsulates a mutable configuration for an AirPort WLAN interface.

func NewCWMutableConfiguration

func NewCWMutableConfiguration() CWMutableConfiguration

NewCWMutableConfiguration creates a new CWMutableConfiguration instance.

func NewCWMutableConfigurationWithConfiguration

func NewCWMutableConfigurationWithConfiguration(configuration ICWConfiguration) CWMutableConfiguration

Creates and returns a CWConfiguration object initialized with the given CWConfiguration object.

configuration: The CWConfiguration object to use to initialize a new CWConfiguration object.

Return Value

A CWConfiguration object.

See: https://developer.apple.com/documentation/CoreWLAN/CWConfiguration/init(configuration:)

func (CWMutableConfiguration) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (CWMutableConfiguration) Init

Init initializes the instance.

type CWMutableConfigurationClass

type CWMutableConfigurationClass struct {
	// contains filtered or unexported fields
}

func GetCWMutableConfigurationClass

func GetCWMutableConfigurationClass() CWMutableConfigurationClass

GetCWMutableConfigurationClass returns the class object for CWMutableConfiguration.

func (CWMutableConfigurationClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CWMutableConfigurationClass) Class

Class returns the underlying Objective-C class pointer.

type CWMutableNetworkProfile

type CWMutableNetworkProfile struct {
	CWNetworkProfile
}

Encapsulates a mutable network profile entry.

Overview

Use this class to change profile properties. To commit Wi-Fi network profile changes, use [CWMutableConfiguration.NetworkProfiles] and CWInterface.CommitConfigurationAuthorizationError.

See: https://developer.apple.com/documentation/CoreWLAN/CWMutableNetworkProfile

func CWMutableNetworkProfileFromID

func CWMutableNetworkProfileFromID(id objc.ID) CWMutableNetworkProfile

CWMutableNetworkProfileFromID constructs a CWMutableNetworkProfile from an objc.ID.

Encapsulates a mutable network profile entry.

func NewCWMutableNetworkProfile

func NewCWMutableNetworkProfile() CWMutableNetworkProfile

NewCWMutableNetworkProfile creates a new CWMutableNetworkProfile instance.

func NewCWMutableNetworkProfileWithNetworkProfile

func NewCWMutableNetworkProfileWithNetworkProfile(networkProfile ICWNetworkProfile) CWMutableNetworkProfile

Creates and returns a CWNetworkProfile object initialized with the given CWNetworkProfile object.

networkProfile: The CWNetworkProfile object to use to initialize a new CWNetworkProfile object.

Return Value

A CWNetworkProfile object.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetworkProfile/init(networkProfile:)

func (CWMutableNetworkProfile) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (CWMutableNetworkProfile) Init

Init initializes the instance.

type CWMutableNetworkProfileClass

type CWMutableNetworkProfileClass struct {
	// contains filtered or unexported fields
}

func GetCWMutableNetworkProfileClass

func GetCWMutableNetworkProfileClass() CWMutableNetworkProfileClass

GetCWMutableNetworkProfileClass returns the class object for CWMutableNetworkProfile.

func (CWMutableNetworkProfileClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CWMutableNetworkProfileClass) Class

Class returns the underlying Objective-C class pointer.

type CWNetwork

type CWNetwork struct {
	objectivec.Object
}

Encapsulates an IEEE 802.11 network, providing read-only accessors to various properties of the network.

Getting supported security types

Getting supported PHY modes

Comparing wireless networks

Instance Properties

Initializers

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork

func CWNetworkFromID

func CWNetworkFromID(id objc.ID) CWNetwork

CWNetworkFromID constructs a CWNetwork from an objc.ID.

Encapsulates an IEEE 802.11 network, providing read-only accessors to various properties of the network.

func NewCWNetwork

func NewCWNetwork() CWNetwork

NewCWNetwork creates a new CWNetwork instance.

func (CWNetwork) Autorelease

func (c CWNetwork) Autorelease() CWNetwork

Autorelease adds the receiver to the current autorelease pool.

func (CWNetwork) BeaconInterval

func (c CWNetwork) BeaconInterval() int

The beacon interval (ms) for the network.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/beaconInterval

func (CWNetwork) Bssid

func (c CWNetwork) Bssid() string

The basic service set identifier (BSSID) for the network, returned as UTF-8 string.

Discussion

Returns a UTF-8 string formatted as .

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/bssid

func (CWNetwork) CountryCode

func (c CWNetwork) CountryCode() string

The country code (ISO/IEC 3166-1:1997) for the network.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/countryCode

func (CWNetwork) EncodeWithCoder

func (c CWNetwork) EncodeWithCoder(coder foundation.INSCoder)

func (CWNetwork) Ibss

func (c CWNetwork) Ibss() bool

The network is an IBSS network.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/ibss

func (CWNetwork) InformationElementData

func (c CWNetwork) InformationElementData() foundation.NSData

Information element data included in beacon or probe response frames.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/informationElementData

func (CWNetwork) Init

func (c CWNetwork) Init() CWNetwork

Init initializes the instance.

func (CWNetwork) IsEqualToNetwork

func (c CWNetwork) IsEqualToNetwork(network ICWNetwork) bool

Method for determining CWNetwork object equality.

network: The CWNetwork object for which to test equality.

Return Value

YES if the objects are equal.

Discussion

Two CWNetwork objects are considered equal if their corresponding ssidData, securityType, and networkType properties are equal.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/isEqual(to:)

func (CWNetwork) NoiseMeasurement

func (c CWNetwork) NoiseMeasurement() int

The aggregate noise measurement (dBm) for the network.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/noiseMeasurement

func (CWNetwork) RssiValue

func (c CWNetwork) RssiValue() int

The aggregate received signal strength indication (RSSI) measurement (dBm) for the network.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/rssiValue

func (CWNetwork) Ssid

func (c CWNetwork) Ssid() string

The service set identifier (SSID) for the network, encoded as a string.

Discussion

If the SSID can not be encoded as a valid UTF-8 or WinLatin1 string, this method returns nil.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/ssid

func (CWNetwork) SsidData

func (c CWNetwork) SsidData() foundation.NSData

The service set identifier (SSID) for the network, returned as data.

Discussion

The SSID is defined as 1-32 octets.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/ssidData

func (CWNetwork) SupportsPHYMode

func (c CWNetwork) SupportsPHYMode(phyMode CWPHYMode) bool

Method for determining which PHY modes a network supports.

Return Value

YES if the network supports the specified PHY mode.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/supportsPHYMode(_:)

func (CWNetwork) SupportsSecurity

func (c CWNetwork) SupportsSecurity(security CWSecurity) bool

Method for determining which security types a network supports.

security: The security type.

Return Value

YES if the network supports the specified security type.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/supportsSecurity(_:)

func (CWNetwork) WlanChannel

func (c CWNetwork) WlanChannel() ICWChannel

The channel for the network.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork/wlanChannel

type CWNetworkClass

type CWNetworkClass struct {
	// contains filtered or unexported fields
}

func GetCWNetworkClass

func GetCWNetworkClass() CWNetworkClass

GetCWNetworkClass returns the class object for CWNetwork.

func (CWNetworkClass) Alloc

func (cc CWNetworkClass) Alloc() CWNetwork

Alloc allocates memory for a new instance of the class.

func (CWNetworkClass) Class

func (cc CWNetworkClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type CWNetworkProfile

type CWNetworkProfile struct {
	objectivec.Object
}

Encapsulates an immutable network profile entry.

Getting a network profile

Comparing network profiles

Instance Properties

Initializers

See: https://developer.apple.com/documentation/CoreWLAN/CWNetworkProfile

func CWNetworkProfileFromID

func CWNetworkProfileFromID(id objc.ID) CWNetworkProfile

CWNetworkProfileFromID constructs a CWNetworkProfile from an objc.ID.

Encapsulates an immutable network profile entry.

func NewCWNetworkProfile

func NewCWNetworkProfile() CWNetworkProfile

NewCWNetworkProfile creates a new CWNetworkProfile instance.

func NewCWNetworkProfileWithNetworkProfile

func NewCWNetworkProfileWithNetworkProfile(networkProfile ICWNetworkProfile) CWNetworkProfile

Creates and returns a CWNetworkProfile object initialized with the given CWNetworkProfile object.

networkProfile: The CWNetworkProfile object to use to initialize a new CWNetworkProfile object.

Return Value

A CWNetworkProfile object.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetworkProfile/init(networkProfile:)

func (CWNetworkProfile) Autorelease

func (c CWNetworkProfile) Autorelease() CWNetworkProfile

Autorelease adds the receiver to the current autorelease pool.

func (CWNetworkProfile) EncodeWithCoder

func (c CWNetworkProfile) EncodeWithCoder(coder foundation.INSCoder)

func (CWNetworkProfile) Init

Init initializes the instance.

func (CWNetworkProfile) InitWithNetworkProfile

func (c CWNetworkProfile) InitWithNetworkProfile(networkProfile ICWNetworkProfile) CWNetworkProfile

Creates and returns a CWNetworkProfile object initialized with the given CWNetworkProfile object.

networkProfile: The CWNetworkProfile object to use to initialize a new CWNetworkProfile object.

Return Value

A CWNetworkProfile object.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetworkProfile/init(networkProfile:)

func (CWNetworkProfile) IsEqualToNetworkProfile

func (c CWNetworkProfile) IsEqualToNetworkProfile(networkProfile ICWNetworkProfile) bool

Determine CWNetworkProfile object equality.

networkProfile: The CWNetworkProfile object with which to compare the receiver.

Return Value

YES if the objects are equal.

Discussion

CWNetwork objects are considered equal if their corresponding ssidData and securityType properties are equal.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetworkProfile/isEqual(to:)

func (CWNetworkProfile) Security

func (c CWNetworkProfile) Security() CWSecurity

The security mode for the network profile.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetworkProfile/security

func (CWNetworkProfile) Ssid

func (c CWNetworkProfile) Ssid() string

The service set identifier (SSID) for the network profile, encoded as a string.

Discussion

If the SSID can not be encoded as a valid UTF-8 or WinLatin1 string, this method returns nil.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetworkProfile/ssid

func (CWNetworkProfile) SsidData

func (c CWNetworkProfile) SsidData() foundation.NSData

The service set identifier (SSID) for the network profile, returned as data.

Discussion

The SSID is 1-32 octets.

See: https://developer.apple.com/documentation/CoreWLAN/CWNetworkProfile/ssidData

type CWNetworkProfileClass

type CWNetworkProfileClass struct {
	// contains filtered or unexported fields
}

func GetCWNetworkProfileClass

func GetCWNetworkProfileClass() CWNetworkProfileClass

GetCWNetworkProfileClass returns the class object for CWNetworkProfile.

func (CWNetworkProfileClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CWNetworkProfileClass) Class

func (cc CWNetworkProfileClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type CWPHYMode

type CWPHYMode int

See: https://developer.apple.com/documentation/CoreWLAN/CWPHYMode

const (
	// KCWPHYMode11a: IEEE 802.11a PHY.
	KCWPHYMode11a CWPHYMode = 1
	// KCWPHYMode11ac: IEEE 802.11ac PHY.
	KCWPHYMode11ac CWPHYMode = 5
	// KCWPHYMode11b: IEEE 802.11b PHY.
	KCWPHYMode11b CWPHYMode = 2
	// KCWPHYMode11g: IEEE 802.11g PHY.
	KCWPHYMode11g CWPHYMode = 3
	// KCWPHYMode11n: IEEE 802.11n PHY.
	KCWPHYMode11n CWPHYMode = 4
	// KCWPHYModeNone: No specified mode.
	KCWPHYModeNone CWPHYMode = 0
)

func (CWPHYMode) String

func (e CWPHYMode) String() string

type CWSecurity

type CWSecurity int

See: https://developer.apple.com/documentation/CoreWLAN/CWSecurity

const (
	// KCWSecurityDynamicWEP: Dynamic WEP security.
	KCWSecurityDynamicWEP CWSecurity = 6
	// KCWSecurityEnterprise: Enterprise authentication.
	KCWSecurityEnterprise CWSecurity = 10
	// KCWSecurityNone: Open System authentication.
	KCWSecurityNone CWSecurity = 0
	// KCWSecurityPersonal: Personal authentication.
	KCWSecurityPersonal CWSecurity = 5
	// KCWSecurityUnknown: Unknown security type.
	KCWSecurityUnknown CWSecurity = 9223372036854775807
	// KCWSecurityWEP: WEP security.
	KCWSecurityWEP CWSecurity = 1
	// KCWSecurityWPA2Enterprise: WPA2 Enterprise authentication.
	KCWSecurityWPA2Enterprise CWSecurity = 9
	// KCWSecurityWPA2Personal: WPA2 Personal authentication.
	KCWSecurityWPA2Personal CWSecurity = 4
	// KCWSecurityWPA3Enterprise: WPA3 Enterprise authentication.
	KCWSecurityWPA3Enterprise CWSecurity = 12
	// KCWSecurityWPA3Personal: WPA3 Personal authentication.
	KCWSecurityWPA3Personal CWSecurity = 11
	// KCWSecurityWPA3Transition: WPA3 Transition (WPA3/WPA2 Personal) authentication.
	KCWSecurityWPA3Transition CWSecurity = 13
	// KCWSecurityWPAEnterprise: WPA Enterprise authentication.
	KCWSecurityWPAEnterprise CWSecurity = 7
	// KCWSecurityWPAEnterpriseMixed: WPA/WPA2 Enterprise authentication.
	KCWSecurityWPAEnterpriseMixed CWSecurity = 8
	// KCWSecurityWPAPersonal: WPA Personal authentication.
	KCWSecurityWPAPersonal CWSecurity = 2
	// KCWSecurityWPAPersonalMixed: WPA/WPA2 Personal authentication.
	KCWSecurityWPAPersonalMixed CWSecurity = 3
)

func (CWSecurity) String

func (e CWSecurity) String() string

type CWWiFiClient

type CWWiFiClient struct {
	objectivec.Object
}

A wrapper around the entire Wi-Fi subsystem that you use to access interfaces and set up event notifications.

Overview

Wi-Fi client objects are heavy. Therefore, it’s more efficient to use a single, long-running client instance, rather than creating several short-lived instances. For convenience, you can use the singleton instance returned by the CWWiFiClientClass.SharedWiFiClient class method.

Instead of instantiating CWInterface objects directly, use the ones provided by the instance methods of this class. For example, the CWWiFiClient.Interface method returns the default Wi-Fi interface.

Setting a Delegate

Getting Interfaces

Monitoring Events

Instance Methods

See: https://developer.apple.com/documentation/CoreWLAN/CWWiFiClient

func CWWiFiClientFromID

func CWWiFiClientFromID(id objc.ID) CWWiFiClient

CWWiFiClientFromID constructs a CWWiFiClient from an objc.ID.

A wrapper around the entire Wi-Fi subsystem that you use to access interfaces and set up event notifications.

func NewCWWiFiClient

func NewCWWiFiClient() CWWiFiClient

NewCWWiFiClient creates a new CWWiFiClient instance.

func (CWWiFiClient) Autorelease

func (c CWWiFiClient) Autorelease() CWWiFiClient

Autorelease adds the receiver to the current autorelease pool.

func (CWWiFiClient) Delegate

func (c CWWiFiClient) Delegate() objectivec.IObject

An object that provides Wi-Fi event handling.

Discussion

When a client registers for Wi-Fi events with the CWWiFiClient.StartMonitoringEventWithTypeError method, the client’s delegate receives messages in response to Wi-Fi events. The delegate should adopt the CWEventDelegate protocol to receive these messages.

See: https://developer.apple.com/documentation/CoreWLAN/CWWiFiClient/delegate

func (CWWiFiClient) Init

func (c CWWiFiClient) Init() CWWiFiClient

Init initializes the instance.

func (CWWiFiClient) Interface

func (c CWWiFiClient) Interface() ICWInterface

Returns the default Wi-Fi interface.

Return Value

The CWInterface object that represents the default Wi-Fi interface.

See: https://developer.apple.com/documentation/CoreWLAN/CWWiFiClient/interface()

func (CWWiFiClient) InterfaceWithName

func (c CWWiFiClient) InterfaceWithName(interfaceName string) ICWInterface

Returns the Wi-Fi interface with the given name.

interfaceName: The name of an available Wi-Fi interface. Use the interfaceNames() class method to obtain a list of valid interface names.

Return Value

The CWInterface object bound to the given interface name, or the default interface if no name is specified.

See: https://developer.apple.com/documentation/CoreWLAN/CWWiFiClient/interface(withName:)

func (CWWiFiClient) Interfaces

func (c CWWiFiClient) Interfaces() []CWInterface

Returns all available Wi-Fi interfaces.

Return Value

An array of CWInterface objects, representing all of the available Wi-Fi interfaces in the system.

See: https://developer.apple.com/documentation/CoreWLAN/CWWiFiClient/interfaces()

func (CWWiFiClient) SetDelegate

func (c CWWiFiClient) SetDelegate(value objectivec.IObject)

func (CWWiFiClient) StartMonitoringEventWithTypeError

func (c CWWiFiClient) StartMonitoringEventWithTypeError(type_ CWEventType) (bool, error)

Register for specific Wi-Fi event notifications.

type: The type of event notifications to register for. See CWEventType for a list of possible values.

Discussion

After registering for notifications, when an event of the given type happens, the client sends an appropriate message to its delegate. See the CWEventDelegate protocol for the complete list of possible messages.

Use the CWWiFiClient.StopMonitoringEventWithTypeError method when you want to stop receiving notifications of the given event type. Use CWWiFiClient.StopMonitoringAllEventsAndReturnError to stop receiving all notifications from a client.

See: https://developer.apple.com/documentation/CoreWLAN/CWWiFiClient/startMonitoringEvent(with:)

func (CWWiFiClient) StopMonitoringAllEventsAndReturnError

func (c CWWiFiClient) StopMonitoringAllEventsAndReturnError() (bool, error)

Unregister for all Wi-Fi event notifications.

Discussion

Use this method when you no longer want to receive any Wi-Fi notifications from the client.

See: https://developer.apple.com/documentation/CoreWLAN/CWWiFiClient/stopMonitoringAllEvents()

func (CWWiFiClient) StopMonitoringEventWithTypeError

func (c CWWiFiClient) StopMonitoringEventWithTypeError(type_ CWEventType) (bool, error)

Unregister for specific Wi-Fi event notifications.

type: The type of event notifications to unregister for. See CWEventType for a list of possible values.

Discussion

Use this method to indicate that the client should no longer send notifications for the given event type.

See: https://developer.apple.com/documentation/CoreWLAN/CWWiFiClient/stopMonitoringEvent(with:)

type CWWiFiClientClass

type CWWiFiClientClass struct {
	// contains filtered or unexported fields
}

func GetCWWiFiClientClass

func GetCWWiFiClientClass() CWWiFiClientClass

GetCWWiFiClientClass returns the class object for CWWiFiClient.

func (CWWiFiClientClass) Alloc

func (cc CWWiFiClientClass) Alloc() CWWiFiClient

Alloc allocates memory for a new instance of the class.

func (CWWiFiClientClass) Class

func (cc CWWiFiClientClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

func (CWWiFiClientClass) SharedWiFiClient

func (_CWWiFiClientClass CWWiFiClientClass) SharedWiFiClient() CWWiFiClient

The shared Wi-Fi client object.

Discussion

Each process spawns its own shared instance.

See: https://developer.apple.com/documentation/CoreWLAN/CWWiFiClient/shared()

type ICWChannel

type ICWChannel interface {
	objectivec.IObject

	// Determine CWChannel object equality.
	IsEqualToChannel(channel ICWChannel) bool

	// The channel band.
	ChannelBand() CWChannelBand
	// The channel number.
	ChannelNumber() int
	// The channel width.
	ChannelWidth() CWChannelWidth

	InitWithCoder(coder foundation.INSCoder) CWChannel

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the CWChannel class.

Comparing channels

Instance Properties

Initializers

See: https://developer.apple.com/documentation/CoreWLAN/CWChannel

type ICWConfiguration

type ICWConfiguration interface {
	objectivec.IObject

	// Creates and returns a CWConfiguration object initialized with the given CWConfiguration object.
	InitWithConfiguration(configuration ICWConfiguration) CWConfiguration

	// Determine CWConfiguration object equality.
	IsEqualToConfiguration(configuration ICWConfiguration) bool

	// An array of remembered CWNetworkProfile objects.
	NetworkProfiles() foundation.INSOrderedSet
	// AirPort client will remember all joined networks.
	RememberJoinedNetworks() bool
	// Require an administrator password to change networks.
	RequireAdministratorForAssociation() bool
	// Require an administrator password to create a computer-to-computer network.
	RequireAdministratorForIBSSMode() bool
	// Require an administrator password to change the interface power state.
	RequireAdministratorForPower() bool

	InitWithCoder(coder foundation.INSCoder) CWConfiguration

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the CWConfiguration class.

Creating a configuration

Comparing configurations

Instance Properties

Initializers

See: https://developer.apple.com/documentation/CoreWLAN/CWConfiguration

type ICWInterface

type ICWInterface interface {
	objectivec.IObject

	// Sets the interface pairwise primary key (PMK).
	SetPairwiseMasterKeyError(key foundation.NSData) (bool, error)
	// Sets the interface power state.
	SetPowerError(power bool) (bool, error)
	// Sets the interface WEP key.
	SetWEPKeyFlagsIndexError(key foundation.NSData, flags CWCipherKeyFlags, index int) (bool, error)
	// Sets the interface channel.
	SetWLANChannelError(channel ICWChannel) (bool, error)

	// Scans for networks.
	ScanForNetworksWithNameError(networkName string) (foundation.INSSet, error)
	// Scans for networks.
	ScanForNetworksWithSSIDError(ssid foundation.NSData) (foundation.INSSet, error)

	// Disassociates from the current network.
	Disassociate()

	// Commit a configuration for the given WLAN interface.
	CommitConfigurationAuthorizationError(configuration ICWConfiguration, authorization objectivec.IObject) (bool, error)

	// Connects to the given enterprise network.
	AssociateToEnterpriseNetworkIdentityUsernamePasswordError(network ICWNetwork, identity security.SecIdentityRef, username string, password string) (bool, error)
	// Associates to a given network using the given network passphrase.
	AssociateToNetworkPasswordError(network ICWNetwork, password string) (bool, error)

	// The BSD name of the interface.
	InterfaceName() string

	// The current active PHY modes for the interface.
	ActivePHYMode() CWPHYMode
	// The current basic service set identifier (BSSID) for the interface, returned as a UTF-8 string.
	Bssid() string
	// The networks currently in the scan cache for the WLAN interface.
	CachedScanResults() foundation.INSSet
	// The current configuration for the given WLAN interface.
	Configuration() ICWConfiguration
	// The current country code (ISO/IEC 3166-1:1997) for the interface.
	CountryCode() string
	// The hardware media access control (MAC) address for the interface, returned as a UTF-8 string.
	HardwareAddress() string
	// The current mode for the interface.
	InterfaceMode() CWInterfaceMode
	// The current aggregate noise measurement (dBm) for the interface.
	NoiseMeasurement() int
	// The interface power state is set to “ON”.
	PowerOn() bool
	// The current aggregate received signal strength indication (RSSI) measurement (dBm) for the interface.
	RssiValue() int
	// Scans for networks with the name you specify, optionally including hidden networks.
	ScanForNetworksWithNameIncludeHiddenError(networkName string, includeHidden bool) (foundation.INSSet, error)
	// Scans for networks with the SSID you specify, optionally including hidden networks.
	ScanForNetworksWithSSIDIncludeHiddenError(ssid foundation.NSData, includeHidden bool) (foundation.INSSet, error)
	// The current security mode for the interface.
	Security() CWSecurity
	// The interface has its corresponding network service enabled.
	ServiceActive() bool
	// The current service set identifier (SSID) for the interface, encoded as a string.
	Ssid() string
	// The current service set identifier (SSID) for the interface, returned as data.
	SsidData() foundation.NSData
	// An array of channels supported by the interface for the active country code.
	SupportedWLANChannels() foundation.INSSet
	// The current transmit power (mW) for the interface.
	TransmitPower() int
	// The current transmit rate (Mbps) for the interface.
	TransmitRate() float64
	// The current channel for the interface.
	WlanChannel() ICWChannel
}

An interface definition for the CWInterface class.

Setting interface parameters

Scanning for networks

Disassociating from a network

Committing a configuration

Associating to a network

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/CoreWLAN/CWInterface

type ICWMutableConfiguration

type ICWMutableConfiguration interface {
	ICWConfiguration
}

An interface definition for the CWMutableConfiguration class.

See: https://developer.apple.com/documentation/CoreWLAN/CWMutableConfiguration

type ICWMutableNetworkProfile

type ICWMutableNetworkProfile interface {
	ICWNetworkProfile
}

An interface definition for the CWMutableNetworkProfile class.

See: https://developer.apple.com/documentation/CoreWLAN/CWMutableNetworkProfile

type ICWNetwork

type ICWNetwork interface {
	objectivec.IObject

	// Method for determining which security types a network supports.
	SupportsSecurity(security CWSecurity) bool

	// Method for determining which PHY modes a network supports.
	SupportsPHYMode(phyMode CWPHYMode) bool

	// Method for determining CWNetwork object equality.
	IsEqualToNetwork(network ICWNetwork) bool

	// The beacon interval (ms) for the network.
	BeaconInterval() int
	// The basic service set identifier (BSSID) for the network, returned as UTF-8 string.
	Bssid() string
	// The country code (ISO/IEC 3166-1:1997) for the network.
	CountryCode() string
	// The network is an IBSS network.
	Ibss() bool
	// Information element data included in beacon or probe response frames.
	InformationElementData() foundation.NSData
	// The aggregate noise measurement (dBm) for the network.
	NoiseMeasurement() int
	// The aggregate received signal strength indication (RSSI) measurement (dBm) for the network.
	RssiValue() int
	// The service set identifier (SSID) for the network, encoded as a string.
	Ssid() string
	// The service set identifier (SSID) for the network, returned as data.
	SsidData() foundation.NSData
	// The channel for the network.
	WlanChannel() ICWChannel

	InitWithCoder(coder foundation.INSCoder) CWNetwork

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the CWNetwork class.

Getting supported security types

Getting supported PHY modes

Comparing wireless networks

Instance Properties

Initializers

See: https://developer.apple.com/documentation/CoreWLAN/CWNetwork

type ICWNetworkProfile

type ICWNetworkProfile interface {
	objectivec.IObject

	// Creates and returns a CWNetworkProfile object initialized with the given CWNetworkProfile object.
	InitWithNetworkProfile(networkProfile ICWNetworkProfile) CWNetworkProfile

	// Determine CWNetworkProfile object equality.
	IsEqualToNetworkProfile(networkProfile ICWNetworkProfile) bool

	// The security mode for the network profile.
	Security() CWSecurity
	// The service set identifier (SSID) for the network profile, encoded as a string.
	Ssid() string
	// The service set identifier (SSID) for the network profile, returned as data.
	SsidData() foundation.NSData

	InitWithCoder(coder foundation.INSCoder) CWNetworkProfile

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the CWNetworkProfile class.

Getting a network profile

Comparing network profiles

Instance Properties

Initializers

See: https://developer.apple.com/documentation/CoreWLAN/CWNetworkProfile

type ICWWiFiClient

type ICWWiFiClient interface {
	objectivec.IObject

	// An object that provides Wi-Fi event handling.
	Delegate() objectivec.IObject
	SetDelegate(value objectivec.IObject)

	// Returns the default Wi-Fi interface.
	Interface() ICWInterface
	// Returns the Wi-Fi interface with the given name.
	InterfaceWithName(interfaceName string) ICWInterface
	// Returns all available Wi-Fi interfaces.
	Interfaces() []CWInterface

	// Register for specific Wi-Fi event notifications.
	StartMonitoringEventWithTypeError(type_ CWEventType) (bool, error)
	// Unregister for all Wi-Fi event notifications.
	StopMonitoringAllEventsAndReturnError() (bool, error)
	// Unregister for specific Wi-Fi event notifications.
	StopMonitoringEventWithTypeError(type_ CWEventType) (bool, error)

	InterfaceNames() []string
}

An interface definition for the CWWiFiClient class.

Setting a Delegate

Getting Interfaces

Monitoring Events

Instance Methods

See: https://developer.apple.com/documentation/CoreWLAN/CWWiFiClient

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL