Documentation
¶
Overview ¶
Package corebluetooth provides a fluent Go API over the macOS CoreBluetooth framework.
Construction ¶
New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.
Lifecycle ¶
A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.
Delegates ¶
A …Delegate interface is implemented by a plain Go value and installed with the matching With… setter; the package builds the Objective-C delegate object behind the scenes. Optional protocol methods are separate one-method …Handler interfaces — implement the ones you need on the same value and the framework calls them too.
Types ¶
Each base type below lists the concrete types you construct and pass where the base is accepted:
- Attribute: Characteristic, Descriptor, Service
- Characteristic: MutableCharacteristic
- Descriptor: MutableDescriptor
- Manager: CentralManager, PeripheralManager
- Peer: Central, Peripheral
- Service: MutableService
Index ¶
- func CBAdvertisementDataIsConnectable() obj.Object
- func CBAdvertisementDataLocalNameKey() obj.Object
- func CBAdvertisementDataManufacturerDataKey() obj.Object
- func CBAdvertisementDataOverflowServiceUUIDsKey() obj.Object
- func CBAdvertisementDataServiceDataKey() obj.Object
- func CBAdvertisementDataServiceUUIDsKey() obj.Object
- func CBAdvertisementDataSolicitedServiceUUIDsKey() obj.Object
- func CBAdvertisementDataTxPowerLevelKey() obj.Object
- func CBCentralManagerOptionRestoreIdentifierKey() obj.Object
- func CBCentralManagerOptionShowPowerAlertKey() obj.Object
- func CBCentralManagerRestoredStatePeripheralsKey() obj.Object
- func CBCentralManagerRestoredStateScanOptionsKey() obj.Object
- func CBCentralManagerRestoredStateScanServicesKey() obj.Object
- func CBCentralManagerScanOptionAllowDuplicatesKey() obj.Object
- func CBCentralManagerScanOptionSolicitedServiceUUIDsKey() obj.Object
- func CBConnectPeripheralOptionEnableAutoReconnect() obj.Object
- func CBConnectPeripheralOptionNotifyOnConnectionKey() obj.Object
- func CBConnectPeripheralOptionNotifyOnDisconnectionKey() obj.Object
- func CBConnectPeripheralOptionNotifyOnNotificationKey() obj.Object
- func CBConnectPeripheralOptionStartDelayKey() obj.Object
- func CBErrorDomain() obj.Object
- func CBPeripheralManagerOptionRestoreIdentifierKey() obj.Object
- func CBPeripheralManagerOptionShowPowerAlertKey() obj.Object
- func CBPeripheralManagerRestoredStateAdvertisementDataKey() obj.Object
- func CBPeripheralManagerRestoredStateServicesKey() obj.Object
- func CBUUIDCharacteristicAggregateFormatString() obj.Object
- func CBUUIDCharacteristicExtendedPropertiesString() obj.Object
- func CBUUIDCharacteristicFormatString() obj.Object
- func CBUUIDCharacteristicObservationScheduleString() obj.Object
- func CBUUIDCharacteristicUserDescriptionString() obj.Object
- func CBUUIDCharacteristicValidRangeString() obj.Object
- func CBUUIDClientCharacteristicConfigurationString() obj.Object
- func CBUUIDL2CAPPSMCharacteristicString() obj.Object
- func CBUUIDServerCharacteristicConfigurationString() obj.Object
- type ATTError
- type ATTRequest
- func (ar *ATTRequest) Central() *Central
- func (ar *ATTRequest) Characteristic() *Characteristic
- func (ar *ATTRequest) Description() string
- func (ar *ATTRequest) IsEqual(other obj.Object) bool
- func (ar *ATTRequest) IsKind(className string) bool
- func (ar *ATTRequest) Offset() int
- func (ar *ATTRequest) String() string
- func (ar *ATTRequest) Value() []byte
- func (ar *ATTRequest) WithValue(value []byte) *ATTRequest
- type Attribute
- type AttributePermissions
- type AttributeProvider
- type Central
- type CentralManager
- func (cm *CentralManager) CancelPeripheralConnection(peripheral *Peripheral)
- func (cm *CentralManager) ConnectPeripheralOptions(peripheral *Peripheral, options map[string]obj.Object)
- func (cm *CentralManager) IsScanning() bool
- func (cm *CentralManager) RetrieveConnectedPeripheralsWithServices(serviceUUIDs []*UUID) []*Peripheral
- func (cm *CentralManager) RetrievePeripheralsWithIdentifiers(identifiers []*foundation.UUID) []*Peripheral
- func (cm *CentralManager) ScanForPeripheralsWithServicesOptions(serviceUUIDs []*UUID, options map[string]obj.Object)
- func (cm *CentralManager) StopScan()
- func (cm *CentralManager) WithDelegate(delegate CentralManagerDelegate) *CentralManager
- type CentralManagerDelegate
- type CentralManagerDelegateCentralManagerDidConnectPeripheralHandler
- type CentralManagerDelegateCentralManagerDidDisconnectPeripheralErrorHandler
- type CentralManagerDelegateCentralManagerDidDisconnectPeripheralTimestampIsReconnectingErrorHandler
- type CentralManagerDelegateCentralManagerDidDiscoverPeripheralAdvertisementDataRSSIHandler
- type CentralManagerDelegateCentralManagerDidFailToConnectPeripheralErrorHandler
- type CentralManagerDelegateCentralManagerWillRestoreStateHandler
- type CentralManagerFeature
- type CentralManagerStatedeprecated
- type Characteristic
- type CharacteristicProperties
- type CharacteristicProvider
- type CharacteristicWriteType
- type Clockid
- type ConnectionEvent
- type Descriptor
- type DescriptorProvider
- type DispatchAutoreleaseFrequency
- type DispatchBlockFlags
- type EntryID
- type Error
- type FilesecProperty
- type Flag
- type Idtype
- type IpcInfoObjectType
- type L2CAPChannel
- func (lcc *L2CAPChannel) Description() string
- func (lcc *L2CAPChannel) InputStream() *foundation.InputStream
- func (lcc *L2CAPChannel) IsEqual(other obj.Object) bool
- func (lcc *L2CAPChannel) IsKind(className string) bool
- func (lcc *L2CAPChannel) OutputStream() *foundation.OutputStream
- func (lcc *L2CAPChannel) PSM() uint16
- func (lcc *L2CAPChannel) Peer() *Peer
- func (lcc *L2CAPChannel) String() string
- type LaunchDataType
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type MachVMRangeFlags
- type MachVMRangeFlavor
- type MachVMRangeTag
- type Manager
- type ManagerAuthorization
- type ManagerProvider
- type ManagerState
- type MpoFlags
- type MutableCharacteristic
- func (mc *MutableCharacteristic) Permissions() AttributePermissions
- func (mc *MutableCharacteristic) SubscribedCentrals() []*Central
- func (mc *MutableCharacteristic) WithDescriptors(items ...DescriptorProvider) *MutableCharacteristic
- func (mc *MutableCharacteristic) WithPermissions(permissions AttributePermissions) *MutableCharacteristic
- func (mc *MutableCharacteristic) WithProperties(properties CharacteristicProperties) *MutableCharacteristic
- func (mc *MutableCharacteristic) WithValue(value []byte) *MutableCharacteristic
- type MutableDescriptor
- type MutableService
- type OSClockid
- type Peer
- type PeerProvider
- type Peripheral
- func (p *Peripheral) CanSendWriteWithoutResponse() bool
- func (p *Peripheral) DiscoverCharacteristicsForService(characteristicUUIDs []*UUID, service *Service)
- func (p *Peripheral) DiscoverDescriptorsForCharacteristic(characteristic *Characteristic)
- func (p *Peripheral) DiscoverIncludedServicesForService(includedServiceUUIDs []*UUID, service *Service)
- func (p *Peripheral) DiscoverServices(serviceUUIDs []*UUID)
- func (p *Peripheral) MaximumWriteValueLengthForType(type_ CharacteristicWriteType) int
- func (p *Peripheral) Name() string
- func (p *Peripheral) OpenL2CAPChannel(psm uint16)
- func (p *Peripheral) RSSI() *foundation.Number
- func (p *Peripheral) ReadRSSI()
- func (p *Peripheral) ReadValueForCharacteristic(characteristic *Characteristic)
- func (p *Peripheral) ReadValueForDescriptor(descriptor *Descriptor)
- func (p *Peripheral) Services() []*Service
- func (p *Peripheral) SetNotifyValueForCharacteristic(enabled bool, characteristic *Characteristic)
- func (p *Peripheral) State() PeripheralState
- func (p *Peripheral) WithDelegate(delegate PeripheralDelegate) *Peripheral
- func (p *Peripheral) WriteValueForCharacteristicType(data []byte, characteristic *Characteristic, type_ CharacteristicWriteType)
- func (p *Peripheral) WriteValueForDescriptor(data []byte, descriptor *Descriptor)
- type PeripheralDelegate
- type PeripheralDelegatePeripheralDidDiscoverCharacteristicsForServiceErrorHandler
- type PeripheralDelegatePeripheralDidDiscoverDescriptorsForCharacteristicErrorHandler
- type PeripheralDelegatePeripheralDidDiscoverIncludedServicesForServiceErrorHandler
- type PeripheralDelegatePeripheralDidDiscoverServicesHandler
- type PeripheralDelegatePeripheralDidModifyServicesHandler
- type PeripheralDelegatePeripheralDidOpenL2CAPChannelErrorHandler
- type PeripheralDelegatePeripheralDidReadRSSIErrorHandler
- type PeripheralDelegatePeripheralDidUpdateNameHandler
- type PeripheralDelegatePeripheralDidUpdateNotificationStateForCharacteristicErrorHandler
- type PeripheralDelegatePeripheralDidUpdateRSSIErrorHandler
- type PeripheralDelegatePeripheralDidUpdateValueForCharacteristicErrorHandler
- type PeripheralDelegatePeripheralDidUpdateValueForDescriptorErrorHandler
- type PeripheralDelegatePeripheralDidWriteValueForCharacteristicErrorHandler
- type PeripheralDelegatePeripheralDidWriteValueForDescriptorErrorHandler
- type PeripheralDelegatePeripheralIsReadyToSendWriteWithoutResponseHandler
- type PeripheralManager
- func (pm *PeripheralManager) AddService(service *MutableService)
- func (pm *PeripheralManager) IsAdvertising() bool
- func (pm *PeripheralManager) PublishL2CAPChannelWithEncryption(encryptionRequired bool)
- func (pm *PeripheralManager) RemoveAllServices()
- func (pm *PeripheralManager) RemoveService(service *MutableService)
- func (pm *PeripheralManager) RespondToRequestWithResult(request *ATTRequest, result ATTError)
- func (pm *PeripheralManager) SetDesiredConnectionLatencyForCentral(latency PeripheralManagerConnectionLatency, central *Central)
- func (pm *PeripheralManager) StartAdvertising(advertisementData map[string]obj.Object)
- func (pm *PeripheralManager) StopAdvertising()
- func (pm *PeripheralManager) UnpublishL2CAPChannel(psm uint16)
- func (pm *PeripheralManager) UpdateValueForCharacteristicOnSubscribedCentrals(value []byte, characteristic *MutableCharacteristic, centrals []*Central) bool
- func (pm *PeripheralManager) WithDelegate(delegate PeripheralManagerDelegate) *PeripheralManager
- type PeripheralManagerAuthorizationStatusdeprecated
- type PeripheralManagerConnectionLatency
- type PeripheralManagerDelegate
- type PeripheralManagerDelegatePeripheralManagerCentralDidSubscribeToCharacteristicHandler
- type PeripheralManagerDelegatePeripheralManagerCentralDidUnsubscribeFromCharacteristicHandler
- type PeripheralManagerDelegatePeripheralManagerDidAddServiceErrorHandler
- type PeripheralManagerDelegatePeripheralManagerDidOpenL2CAPChannelErrorHandler
- type PeripheralManagerDelegatePeripheralManagerDidPublishL2CAPChannelErrorHandler
- type PeripheralManagerDelegatePeripheralManagerDidReceiveReadRequestHandler
- type PeripheralManagerDelegatePeripheralManagerDidReceiveWriteRequestsHandler
- type PeripheralManagerDelegatePeripheralManagerDidStartAdvertisingErrorHandler
- type PeripheralManagerDelegatePeripheralManagerDidUnpublishL2CAPChannelErrorHandler
- type PeripheralManagerDelegatePeripheralManagerIsReadyToUpdateSubscribersHandler
- type PeripheralManagerDelegatePeripheralManagerWillRestoreStateHandler
- type PeripheralManagerStatedeprecated
- type PeripheralState
- type Perm
- type PtrauthKey
- type QosClass
- type Service
- type ServiceProvider
- type Tag
- type Type
- type UUID
- type VirtualMemoryGuardExceptionCode
- type XpcListenerCreateFlags
- type XpcSessionCreateFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CBAdvertisementDataIsConnectable ¶
CBAdvertisementDataIsConnectable returns the string constant CBAdvertisementDataIsConnectable, for use as a dictionary key or argument.
func CBAdvertisementDataLocalNameKey ¶
CBAdvertisementDataLocalNameKey returns the string constant CBAdvertisementDataLocalNameKey, for use as a dictionary key or argument.
func CBAdvertisementDataManufacturerDataKey ¶
CBAdvertisementDataManufacturerDataKey returns the string constant CBAdvertisementDataManufacturerDataKey, for use as a dictionary key or argument.
func CBAdvertisementDataOverflowServiceUUIDsKey ¶
CBAdvertisementDataOverflowServiceUUIDsKey returns the string constant CBAdvertisementDataOverflowServiceUUIDsKey, for use as a dictionary key or argument.
func CBAdvertisementDataServiceDataKey ¶
CBAdvertisementDataServiceDataKey returns the string constant CBAdvertisementDataServiceDataKey, for use as a dictionary key or argument.
func CBAdvertisementDataServiceUUIDsKey ¶
CBAdvertisementDataServiceUUIDsKey returns the string constant CBAdvertisementDataServiceUUIDsKey, for use as a dictionary key or argument.
func CBAdvertisementDataSolicitedServiceUUIDsKey ¶
CBAdvertisementDataSolicitedServiceUUIDsKey returns the string constant CBAdvertisementDataSolicitedServiceUUIDsKey, for use as a dictionary key or argument.
func CBAdvertisementDataTxPowerLevelKey ¶
CBAdvertisementDataTxPowerLevelKey returns the string constant CBAdvertisementDataTxPowerLevelKey, for use as a dictionary key or argument.
func CBCentralManagerOptionRestoreIdentifierKey ¶
CBCentralManagerOptionRestoreIdentifierKey returns the string constant CBCentralManagerOptionRestoreIdentifierKey, for use as a dictionary key or argument.
func CBCentralManagerOptionShowPowerAlertKey ¶
CBCentralManagerOptionShowPowerAlertKey returns the string constant CBCentralManagerOptionShowPowerAlertKey, for use as a dictionary key or argument.
func CBCentralManagerRestoredStatePeripheralsKey ¶
CBCentralManagerRestoredStatePeripheralsKey returns the string constant CBCentralManagerRestoredStatePeripheralsKey, for use as a dictionary key or argument.
func CBCentralManagerRestoredStateScanOptionsKey ¶
CBCentralManagerRestoredStateScanOptionsKey returns the string constant CBCentralManagerRestoredStateScanOptionsKey, for use as a dictionary key or argument.
func CBCentralManagerRestoredStateScanServicesKey ¶
CBCentralManagerRestoredStateScanServicesKey returns the string constant CBCentralManagerRestoredStateScanServicesKey, for use as a dictionary key or argument.
func CBCentralManagerScanOptionAllowDuplicatesKey ¶
CBCentralManagerScanOptionAllowDuplicatesKey returns the string constant CBCentralManagerScanOptionAllowDuplicatesKey, for use as a dictionary key or argument.
func CBCentralManagerScanOptionSolicitedServiceUUIDsKey ¶
CBCentralManagerScanOptionSolicitedServiceUUIDsKey returns the string constant CBCentralManagerScanOptionSolicitedServiceUUIDsKey, for use as a dictionary key or argument.
func CBConnectPeripheralOptionEnableAutoReconnect ¶
CBConnectPeripheralOptionEnableAutoReconnect returns the string constant CBConnectPeripheralOptionEnableAutoReconnect, for use as a dictionary key or argument.
func CBConnectPeripheralOptionNotifyOnConnectionKey ¶
CBConnectPeripheralOptionNotifyOnConnectionKey returns the string constant CBConnectPeripheralOptionNotifyOnConnectionKey, for use as a dictionary key or argument.
func CBConnectPeripheralOptionNotifyOnDisconnectionKey ¶
CBConnectPeripheralOptionNotifyOnDisconnectionKey returns the string constant CBConnectPeripheralOptionNotifyOnDisconnectionKey, for use as a dictionary key or argument.
func CBConnectPeripheralOptionNotifyOnNotificationKey ¶
CBConnectPeripheralOptionNotifyOnNotificationKey returns the string constant CBConnectPeripheralOptionNotifyOnNotificationKey, for use as a dictionary key or argument.
func CBConnectPeripheralOptionStartDelayKey ¶
CBConnectPeripheralOptionStartDelayKey returns the string constant CBConnectPeripheralOptionStartDelayKey, for use as a dictionary key or argument.
func CBErrorDomain ¶
CBErrorDomain returns the string constant CBErrorDomain, for use as a dictionary key or argument.
func CBPeripheralManagerOptionRestoreIdentifierKey ¶
CBPeripheralManagerOptionRestoreIdentifierKey returns the string constant CBPeripheralManagerOptionRestoreIdentifierKey, for use as a dictionary key or argument.
func CBPeripheralManagerOptionShowPowerAlertKey ¶
CBPeripheralManagerOptionShowPowerAlertKey returns the string constant CBPeripheralManagerOptionShowPowerAlertKey, for use as a dictionary key or argument.
func CBPeripheralManagerRestoredStateAdvertisementDataKey ¶
CBPeripheralManagerRestoredStateAdvertisementDataKey returns the string constant CBPeripheralManagerRestoredStateAdvertisementDataKey, for use as a dictionary key or argument.
func CBPeripheralManagerRestoredStateServicesKey ¶
CBPeripheralManagerRestoredStateServicesKey returns the string constant CBPeripheralManagerRestoredStateServicesKey, for use as a dictionary key or argument.
func CBUUIDCharacteristicAggregateFormatString ¶
CBUUIDCharacteristicAggregateFormatString returns the string constant CBUUIDCharacteristicAggregateFormatString, for use as a dictionary key or argument.
func CBUUIDCharacteristicExtendedPropertiesString ¶
CBUUIDCharacteristicExtendedPropertiesString returns the string constant CBUUIDCharacteristicExtendedPropertiesString, for use as a dictionary key or argument.
func CBUUIDCharacteristicFormatString ¶
CBUUIDCharacteristicFormatString returns the string constant CBUUIDCharacteristicFormatString, for use as a dictionary key or argument.
func CBUUIDCharacteristicObservationScheduleString ¶
CBUUIDCharacteristicObservationScheduleString returns the string constant CBUUIDCharacteristicObservationScheduleString, for use as a dictionary key or argument.
func CBUUIDCharacteristicUserDescriptionString ¶
CBUUIDCharacteristicUserDescriptionString returns the string constant CBUUIDCharacteristicUserDescriptionString, for use as a dictionary key or argument.
func CBUUIDCharacteristicValidRangeString ¶
CBUUIDCharacteristicValidRangeString returns the string constant CBUUIDCharacteristicValidRangeString, for use as a dictionary key or argument.
func CBUUIDClientCharacteristicConfigurationString ¶
CBUUIDClientCharacteristicConfigurationString returns the string constant CBUUIDClientCharacteristicConfigurationString, for use as a dictionary key or argument.
func CBUUIDL2CAPPSMCharacteristicString ¶
CBUUIDL2CAPPSMCharacteristicString returns the string constant CBUUIDL2CAPPSMCharacteristicString, for use as a dictionary key or argument.
func CBUUIDServerCharacteristicConfigurationString ¶
CBUUIDServerCharacteristicConfigurationString returns the string constant CBUUIDServerCharacteristicConfigurationString, for use as a dictionary key or argument.
Types ¶
type ATTError ¶ added in v0.17.0
type ATTError int64
An error that Core Bluetooth returns while using Attribute Protocol (ATT).
const ( ATTErrorSuccess ATTError = 0 ATTErrorInvalidHandle ATTError = 1 ATTErrorReadNotPermitted ATTError = 2 ATTErrorWriteNotPermitted ATTError = 3 ATTErrorInvalidPdu ATTError = 4 ATTErrorInsufficientAuthentication ATTError = 5 ATTErrorRequestNotSupported ATTError = 6 ATTErrorInvalidOffset ATTError = 7 ATTErrorInsufficientAuthorization ATTError = 8 ATTErrorPrepareQueueFull ATTError = 9 ATTErrorAttributeNotFound ATTError = 10 ATTErrorAttributeNotLong ATTError = 11 ATTErrorInsufficientEncryptionKeySize ATTError = 12 ATTErrorInvalidAttributeValueLength ATTError = 13 ATTErrorUnlikelyError ATTError = 14 ATTErrorInsufficientEncryption ATTError = 15 ATTErrorUnsupportedGroupType ATTError = 16 ATTErrorInsufficientResources ATTError = 17 )
type ATTRequest ¶ added in v0.17.0
ATTRequest is an idiomatic wrapper over the Objective-C class CBATTRequest.
A request that uses the Attribute Protocol (ATT).
func ATTRequestFromID ¶ added in v0.17.0
func ATTRequestFromID(id objc.ID) *ATTRequest
ATTRequestFromID adopts an existing Objective-C object as a ATTRequest (nil for 0), retaining it and registering a release finalizer.
func NewATTRequest ¶ added in v0.17.0
func NewATTRequest() *ATTRequest
NewATTRequest creates a new ATTRequest.
func (*ATTRequest) Central ¶ added in v0.17.0
func (ar *ATTRequest) Central() *Central
Central returns the central that originated the request.
func (*ATTRequest) Characteristic ¶ added in v0.17.0
func (ar *ATTRequest) Characteristic() *Characteristic
Characteristic returns the characteristic whose value will be read or written.
func (*ATTRequest) Description ¶ added in v0.17.0
func (ar *ATTRequest) Description() string
Description returns the object's -description text.
func (*ATTRequest) IsEqual ¶ added in v0.17.0
func (ar *ATTRequest) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ATTRequest) IsKind ¶ added in v0.17.0
func (ar *ATTRequest) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ATTRequest) Offset ¶ added in v0.17.0
func (ar *ATTRequest) Offset() int
Offset returns the zero-based index of the first byte for the read or write.
func (*ATTRequest) String ¶ added in v0.17.0
func (ar *ATTRequest) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*ATTRequest) Value ¶ added in v0.17.0
func (ar *ATTRequest) Value() []byte
Value returns the data being read or written. For read requests, <i>value</i> will be nil and should be set before responding via
func (*ATTRequest) WithValue ¶ added in v0.17.0
func (ar *ATTRequest) WithValue(value []byte) *ATTRequest
WithValue sets the data that the central reads from or writes to the peripheral.
type Attribute ¶ added in v0.17.0
Attribute is an idiomatic wrapper over the Objective-C class CBAttribute.
Attribute is an abstract base — you do not construct it directly. Construct one of Characteristic, Descriptor, Service and pass it where a Attribute is accepted.
A representation of common aspects of services offered by a peripheral.
func AttributeFromID ¶ added in v0.17.0
AttributeFromID adopts an existing Objective-C object as a Attribute (nil for 0), retaining it and registering a release finalizer.
func (*Attribute) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Attribute) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Attribute) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
type AttributePermissions ¶ added in v0.17.0
type AttributePermissions uint64
Values that represent the read, write, and encryption permissions for a characteristic’s value. Bitmask — values may be combined with |.
const ( // A permission that indicates a peripheral can read the attribute’s value. AttributePermissionsReadable AttributePermissions = 1 // A permission that indicates a peripheral can write the attribute’s value. AttributePermissionsWriteable AttributePermissions = 2 // A permission that indicates only trusted devices can read the attribute’s value. AttributePermissionsReadEncryptionRequired AttributePermissions = 4 // A permission that indicates only trusted devices can write the attribute’s value. AttributePermissionsWriteEncryptionRequired AttributePermissions = 8 )
func (AttributePermissions) String ¶ added in v0.17.0
func (e AttributePermissions) String() string
String returns the AttributePermissions constant's name, or its numeric form when the value is not a known constant.
type AttributeProvider ¶ added in v0.17.0
AttributeProvider is accepted wherever a CBAttribute (or one of its subclasses) is expected.
type Central ¶ added in v0.17.0
type Central struct {
Peer
}
Central is an idiomatic wrapper over the Objective-C class CBCentral.
It embeds Peer, promoting that type's methods.
A remote device connected to a local app, which is acting as a peripheral.
func CentralFromID ¶ added in v0.17.0
CentralFromID adopts an existing Objective-C object as a Central (nil for 0), retaining it and registering a release finalizer.
func (*Central) MaximumUpdateValueLength ¶ added in v0.17.0
MaximumUpdateValueLength returns the maximum update value length.
type CentralManager ¶ added in v0.17.0
type CentralManager struct {
Manager
}
CentralManager is an idiomatic wrapper over the Objective-C class CBCentralManager.
It embeds Manager, promoting that type's methods.
An object that scans for, discovers, connects to, and manages peripherals.
func CentralManagerFromID ¶ added in v0.17.0
func CentralManagerFromID(id objc.ID) *CentralManager
CentralManagerFromID adopts an existing Objective-C object as a CentralManager (nil for 0), retaining it and registering a release finalizer.
func NewCentralManager ¶ added in v0.17.0
func NewCentralManager() *CentralManager
NewCentralManager creates a new CentralManager.
func (*CentralManager) CancelPeripheralConnection ¶ added in v0.17.0
func (cm *CentralManager) CancelPeripheralConnection(peripheral *Peripheral)
CancelPeripheralConnection cancels an active or pending local connection to a peripheral.
func (*CentralManager) ConnectPeripheralOptions ¶ added in v0.17.0
func (cm *CentralManager) ConnectPeripheralOptions(peripheral *Peripheral, options map[string]obj.Object)
ConnectPeripheralOptions establishes a local connection to a peripheral.
func (*CentralManager) IsScanning ¶ added in v0.17.0
func (cm *CentralManager) IsScanning() bool
IsScanning reports whether the central is currently scanning.
func (*CentralManager) RetrieveConnectedPeripheralsWithServices ¶ added in v0.17.0
func (cm *CentralManager) RetrieveConnectedPeripheralsWithServices(serviceUUIDs []*UUID) []*Peripheral
RetrieveConnectedPeripheralsWithServices returns a list of the peripherals connected to the system whose services match a given set of criteria.
func (*CentralManager) RetrievePeripheralsWithIdentifiers ¶ added in v0.17.0
func (cm *CentralManager) RetrievePeripheralsWithIdentifiers(identifiers []*foundation.UUID) []*Peripheral
RetrievePeripheralsWithIdentifiers returns a list of known peripherals by their identifiers.
func (*CentralManager) ScanForPeripheralsWithServicesOptions ¶ added in v0.17.0
func (cm *CentralManager) ScanForPeripheralsWithServicesOptions(serviceUUIDs []*UUID, options map[string]obj.Object)
ScanForPeripheralsWithServicesOptions scans for peripherals that are advertising services.
func (*CentralManager) StopScan ¶ added in v0.17.0
func (cm *CentralManager) StopScan()
StopScan asks the central manager to stop scanning for peripherals.
func (*CentralManager) WithDelegate ¶ added in v0.17.0
func (cm *CentralManager) WithDelegate(delegate CentralManagerDelegate) *CentralManager
WithDelegate sets the delegate object that you want to receive central manager events.
type CentralManagerDelegate ¶ added in v0.17.0
type CentralManagerDelegate interface {
// CentralManagerDidUpdateState invoked whenever the central manager's state has been updated. Commands should only be issued when the state is <code>CBCentralManagerStatePoweredOn</code>. A state below <code>CBCentralManagerStatePoweredOn</code> implies that scanning has stopped and any connected peripherals have been disconnected. If the state moves below <code>CBCentralManagerStatePoweredOff</code>, all <code>CBPeripheral</code> objects obtained from this central manager become invalid and must be retrieved or discovered again.
CentralManagerDidUpdateState(central *CentralManager)
}
CentralManagerDelegate receives the callbacks of the Objective-C protocol CBCentralManagerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (CentralManagerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type CentralManagerDelegateCentralManagerDidConnectPeripheralHandler ¶ added in v0.17.0
type CentralManagerDelegateCentralManagerDidConnectPeripheralHandler interface {
CentralManagerDidConnectPeripheral(central *CentralManager, peripheral *Peripheral)
}
CentralManagerDelegateCentralManagerDidConnectPeripheralHandler is the optional CBCentralManagerDelegate method centralManager:didConnectPeripheral:. Implement it on a CentralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type CentralManagerDelegateCentralManagerDidDisconnectPeripheralErrorHandler ¶ added in v0.17.0
type CentralManagerDelegateCentralManagerDidDisconnectPeripheralErrorHandler interface {
CentralManagerDidDisconnectPeripheralError(central *CentralManager, peripheral *Peripheral, err error)
}
CentralManagerDelegateCentralManagerDidDisconnectPeripheralErrorHandler is the optional CBCentralManagerDelegate method centralManager:didDisconnectPeripheral:error:. Implement it on a CentralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type CentralManagerDelegateCentralManagerDidDisconnectPeripheralTimestampIsReconnectingErrorHandler ¶ added in v0.17.0
type CentralManagerDelegateCentralManagerDidDisconnectPeripheralTimestampIsReconnectingErrorHandler interface {
CentralManagerDidDisconnectPeripheralTimestampIsReconnectingError(central *CentralManager, peripheral *Peripheral, timestamp float64, isReconnecting bool, err error)
}
CentralManagerDelegateCentralManagerDidDisconnectPeripheralTimestampIsReconnectingErrorHandler is the optional CBCentralManagerDelegate method centralManager:didDisconnectPeripheral:timestamp:isReconnecting:error:. Implement it on a CentralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type CentralManagerDelegateCentralManagerDidDiscoverPeripheralAdvertisementDataRSSIHandler ¶ added in v0.17.0
type CentralManagerDelegateCentralManagerDidDiscoverPeripheralAdvertisementDataRSSIHandler interface {
CentralManagerDidDiscoverPeripheralAdvertisementDataRSSI(central *CentralManager, peripheral *Peripheral, advertisementData obj.Object, rssi obj.Object)
}
CentralManagerDelegateCentralManagerDidDiscoverPeripheralAdvertisementDataRSSIHandler is the optional CBCentralManagerDelegate method centralManager:didDiscoverPeripheral:advertisementData:RSSI:. Implement it on a CentralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type CentralManagerDelegateCentralManagerDidFailToConnectPeripheralErrorHandler ¶ added in v0.17.0
type CentralManagerDelegateCentralManagerDidFailToConnectPeripheralErrorHandler interface {
CentralManagerDidFailToConnectPeripheralError(central *CentralManager, peripheral *Peripheral, err error)
}
CentralManagerDelegateCentralManagerDidFailToConnectPeripheralErrorHandler is the optional CBCentralManagerDelegate method centralManager:didFailToConnectPeripheral:error:. Implement it on a CentralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type CentralManagerDelegateCentralManagerWillRestoreStateHandler ¶ added in v0.17.0
type CentralManagerDelegateCentralManagerWillRestoreStateHandler interface {
CentralManagerWillRestoreState(central *CentralManager, dict obj.Object)
}
CentralManagerDelegateCentralManagerWillRestoreStateHandler is the optional CBCentralManagerDelegate method centralManager:willRestoreState:. Implement it on a CentralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type CentralManagerFeature ¶ added in v0.17.0
type CentralManagerFeature uint64
An option set of device-specific features. Bitmask — values may be combined with |.
func (CentralManagerFeature) String ¶ added in v0.17.0
func (e CentralManagerFeature) String() string
String returns the CentralManagerFeature constant's name, or its numeric form when the value is not a known constant.
type CentralManagerState
deprecated
added in
v0.17.0
type CentralManagerState int64
Values that represent the current state of a central manager object.
Deprecated: since macOS 10.13.
const ( // The manager’s state is unknown. CentralManagerStateUnknown CentralManagerState = 0 // A state that indicates the connection with the system service was momentarily lost. CentralManagerStateResetting CentralManagerState = 1 // A state that indicates this device doesn’t support the Bluetooth low energy central or client role. CentralManagerStateUnsupported CentralManagerState = 2 CentralManagerStateUnauthorized CentralManagerState = 3 // A state that indicates Bluetooth is currently powered off. CentralManagerStatePoweredOff CentralManagerState = 4 // A state that indicates Bluetooth is currently powered on and available to use. CentralManagerStatePoweredOn CentralManagerState = 5 )
func (CentralManagerState) String ¶ added in v0.17.0
func (e CentralManagerState) String() string
String returns the CentralManagerState constant's name, or its numeric form when the value is not a known constant.
type Characteristic ¶ added in v0.17.0
type Characteristic struct {
Attribute
}
Characteristic is an idiomatic wrapper over the Objective-C class CBCharacteristic.
Characteristic is an abstract base — you do not construct it directly. Construct one of MutableCharacteristic and pass it where a Characteristic is accepted.
A characteristic of a remote peripheral’s service.
func CharacteristicFromID ¶ added in v0.17.0
func CharacteristicFromID(id objc.ID) *Characteristic
CharacteristicFromID adopts an existing Objective-C object as a Characteristic (nil for 0), retaining it and registering a release finalizer.
func (*Characteristic) Descriptors ¶ added in v0.17.0
func (c *Characteristic) Descriptors() []*Descriptor
Descriptors returns a list of the CBDescriptors that have so far been discovered in this characteristic.
Descriptors returns the collection as a Go slice.
func (*Characteristic) IsBroadcasted ¶ added in v0.17.0
func (c *Characteristic) IsBroadcasted() bool
IsBroadcasted reports whether the characteristic is currently broadcasted or not.
func (*Characteristic) IsNotifying ¶ added in v0.17.0
func (c *Characteristic) IsNotifying() bool
IsNotifying reports whether the characteristic is currently notifying or not.
func (*Characteristic) Properties ¶ added in v0.17.0
func (c *Characteristic) Properties() CharacteristicProperties
Properties returns the properties of the characteristic.
func (*Characteristic) Service ¶ added in v0.17.0
func (c *Characteristic) Service() *Service
Service returns a back-pointer to the service this characteristic belongs to.
func (*Characteristic) Value ¶ added in v0.17.0
func (c *Characteristic) Value() []byte
Value returns the value of the characteristic.
type CharacteristicProperties ¶ added in v0.17.0
type CharacteristicProperties uint64
Values that represent the possible properties of a characteristic. Bitmask — values may be combined with |.
const ( // A property that indicates the characteristic can broadcast its value using a characteristic configuration descriptor. CharacteristicPropertyBroadcast CharacteristicProperties = 1 // A property that indicates a peripheral can read the characteristic’s value. CharacteristicPropertyRead CharacteristicProperties = 2 // A property that indicates a peripheral can write the characteristic’s value, without a response to indicate that the write succeeded. CharacteristicPropertyWriteWithoutResponse CharacteristicProperties = 4 // A property that indicates a peripheral can write the characteristic’s value, with a response to indicate that the write succeeded. CharacteristicPropertyWrite CharacteristicProperties = 8 // A property that indicates the peripheral permits notifications of the characteristic’s value, without a response from the central to indicate receipt of the notification. CharacteristicPropertyNotify CharacteristicProperties = 16 // A property that indicates the peripheral permits notifications of the characteristic’s value, with a response from the central to indicate receipt of the notification. CharacteristicPropertyIndicate CharacteristicProperties = 32 // A property that indicates the perhipheral allows signed writes of the characteristic’s value, without a response to indicate the write succeeded. CharacteristicPropertyAuthenticatedSignedWrites CharacteristicProperties = 64 // A property that indicates the characteristic defines additional properties in the extended properties descriptor. CharacteristicPropertyExtendedProperties CharacteristicProperties = 128 // A property that indicates that only trusted devices can enable notifications of the characteristic’s value. CharacteristicPropertyNotifyEncryptionRequired CharacteristicProperties = 256 // A property that indicates only trusted devices can enable indications of the characteristic’s value. CharacteristicPropertyIndicateEncryptionRequired CharacteristicProperties = 512 )
func (CharacteristicProperties) String ¶ added in v0.17.0
func (e CharacteristicProperties) String() string
String returns the CharacteristicProperties constant's name, or its numeric form when the value is not a known constant.
type CharacteristicProvider ¶ added in v0.17.0
CharacteristicProvider is accepted wherever a CBCharacteristic (or one of its subclasses) is expected.
type CharacteristicWriteType ¶ added in v0.17.0
type CharacteristicWriteType int64
Values representing the possible write types to a characteristic’s value.
const ( // Write a characteristic value, with a response from the peripheral to indicate whether the write was successful. CharacteristicWriteWithResponse CharacteristicWriteType = 0 // Write a characteristic value, without any response from the peripheral to indicate whether the write was successful. CharacteristicWriteWithoutResponse CharacteristicWriteType = 1 )
func (CharacteristicWriteType) String ¶ added in v0.17.0
func (e CharacteristicWriteType) String() string
String returns the CharacteristicWriteType constant's name, or its numeric form when the value is not a known constant.
type ConnectionEvent ¶ added in v0.17.0
type ConnectionEvent int64
A change to the connection state of a peer.
const ( // The peer has disconnected from the local device. ConnectionEventPeerDisconnected ConnectionEvent = 0 // The peer has connected to the local device. ConnectionEventPeerConnected ConnectionEvent = 1 )
func (ConnectionEvent) String ¶ added in v0.17.0
func (e ConnectionEvent) String() string
String returns the ConnectionEvent constant's name, or its numeric form when the value is not a known constant.
type Descriptor ¶ added in v0.17.0
type Descriptor struct {
Attribute
}
Descriptor is an idiomatic wrapper over the Objective-C class CBDescriptor.
Descriptor is an abstract base — you do not construct it directly. Construct one of MutableDescriptor and pass it where a Descriptor is accepted.
An object that provides further information about a remote peripheral’s characteristic.
func DescriptorFromID ¶ added in v0.17.0
func DescriptorFromID(id objc.ID) *Descriptor
DescriptorFromID adopts an existing Objective-C object as a Descriptor (nil for 0), retaining it and registering a release finalizer.
func (*Descriptor) Characteristic ¶ added in v0.17.0
func (d *Descriptor) Characteristic() *Characteristic
Characteristic returns a back-pointer to the characteristic this descriptor belongs to.
func (*Descriptor) Value ¶ added in v0.17.0
func (d *Descriptor) Value() obj.Object
Value returns the value of the descriptor. The corresponding value types for the various descriptors are detailed in
type DescriptorProvider ¶ added in v0.17.0
DescriptorProvider is accepted wherever a CBDescriptor (or one of its subclasses) is expected.
type DispatchAutoreleaseFrequency ¶ added in v0.17.0
type DispatchAutoreleaseFrequency uint64
const ( DispatchAutoreleaseFrequencyInherit DispatchAutoreleaseFrequency = 0 DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1 DispatchAutoreleaseFrequencyNever DispatchAutoreleaseFrequency = 2 )
func (DispatchAutoreleaseFrequency) String ¶ added in v0.17.0
func (e DispatchAutoreleaseFrequency) String() string
String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.
type DispatchBlockFlags ¶ added in v0.17.0
type DispatchBlockFlags uint64
Bitmask — values may be combined with |.
const ( DispatchBlockFlagsBarrier DispatchBlockFlags = 1 DispatchBlockFlagsDetached DispatchBlockFlags = 2 DispatchBlockFlagsAssignCurrent DispatchBlockFlags = 4 DispatchBlockFlagsNoQosClass DispatchBlockFlags = 8 DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16 DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32 )
func (DispatchBlockFlags) String ¶ added in v0.17.0
func (e DispatchBlockFlags) String() string
String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.
type Error ¶ added in v0.17.0
type Error int64
An error that Core Bluetooth returns during Bluetooth transactions.
const ( ErrorUnknown Error = 0 ErrorInvalidParameters Error = 1 ErrorInvalidHandle Error = 2 ErrorNotConnected Error = 3 ErrorOutOfSpace Error = 4 ErrorOperationCancelled Error = 5 ErrorConnectionTimeout Error = 6 ErrorPeripheralDisconnected Error = 7 ErrorUUIDNotAllowed Error = 8 ErrorAlreadyAdvertising Error = 9 ErrorConnectionFailed Error = 10 ErrorConnectionLimitReached Error = 11 ErrorUnkownDevice Error = 12 ErrorUnknownDevice Error = 12 ErrorOperationNotSupported Error = 13 ErrorPeerRemovedPairingInformation Error = 14 ErrorEncryptionTimedOut Error = 15 ErrorTooManyLEPairedDevices Error = 16 )
type FilesecProperty ¶ added in v0.17.0
type FilesecProperty int32
const ( FilesecPropertyOwner FilesecProperty = 1 FilesecPropertyGroup FilesecProperty = 2 FilesecPropertyUUID FilesecProperty = 3 FilesecPropertyMode FilesecProperty = 4 FilesecPropertyACL FilesecProperty = 5 FilesecPropertyGrpuuid FilesecProperty = 6 FilesecPropertyACLRaw FilesecProperty = 100 FilesecPropertyACLAllocsize FilesecProperty = 101 )
func (FilesecProperty) String ¶ added in v0.17.0
func (e FilesecProperty) String() string
String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.
type IpcInfoObjectType ¶ added in v0.17.0
type IpcInfoObjectType uint32
const ( IpcInfoObjectTypeNone IpcInfoObjectType = 0 IpcInfoObjectTypeThreadControl IpcInfoObjectType = 1 IpcInfoObjectTypeTaskControl IpcInfoObjectType = 2 IpcInfoObjectTypeHost IpcInfoObjectType = 3 IpcInfoObjectTypeHostPriv IpcInfoObjectType = 4 IpcInfoObjectTypeProcessor IpcInfoObjectType = 5 IpcInfoObjectTypeProcessorSet IpcInfoObjectType = 6 IpcInfoObjectTypeProcessorSetName IpcInfoObjectType = 7 IpcInfoObjectTypeTimer IpcInfoObjectType = 8 IpcInfoObjectTypePortSubstOnce IpcInfoObjectType = 9 IpcInfoObjectTypeMig IpcInfoObjectType = 10 IpcInfoObjectTypeMemoryObject IpcInfoObjectType = 11 IpcInfoObjectTypeXmmPager IpcInfoObjectType = 12 IpcInfoObjectTypeXmmKernel IpcInfoObjectType = 13 IpcInfoObjectTypeXmmReply IpcInfoObjectType = 14 IpcInfoObjectTypeUndReply IpcInfoObjectType = 15 IpcInfoObjectTypeHostNotify IpcInfoObjectType = 16 IpcInfoObjectTypeHostSecurity IpcInfoObjectType = 17 IpcInfoObjectTypeLedger IpcInfoObjectType = 18 IpcInfoObjectTypeMainDevice IpcInfoObjectType = 19 IpcInfoObjectTypeTaskName IpcInfoObjectType = 20 IpcInfoObjectTypeSubsystem IpcInfoObjectType = 21 IpcInfoObjectTypeIODoneQueue IpcInfoObjectType = 22 IpcInfoObjectTypeSemaphore IpcInfoObjectType = 23 IpcInfoObjectTypeLockSet IpcInfoObjectType = 24 IpcInfoObjectTypeClock IpcInfoObjectType = 25 IpcInfoObjectTypeClockCtrl IpcInfoObjectType = 26 IpcInfoObjectTypeIokitIdent IpcInfoObjectType = 27 IpcInfoObjectTypeNamedEntry IpcInfoObjectType = 28 IpcInfoObjectTypeIokitConnect IpcInfoObjectType = 29 IpcInfoObjectTypeIokitObject IpcInfoObjectType = 30 IpcInfoObjectTypeUpl IpcInfoObjectType = 31 IpcInfoObjectTypeMemObjControl IpcInfoObjectType = 32 IpcInfoObjectTypeAuSessionport IpcInfoObjectType = 33 IpcInfoObjectTypeFileport IpcInfoObjectType = 34 IpcInfoObjectTypeLabelh IpcInfoObjectType = 35 IpcInfoObjectTypeTaskResume IpcInfoObjectType = 36 IpcInfoObjectTypeVoucher IpcInfoObjectType = 37 IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38 IpcInfoObjectTypeWorkInterval IpcInfoObjectType = 39 IpcInfoObjectTypeUxHandler IpcInfoObjectType = 40 IpcInfoObjectTypeUextObject IpcInfoObjectType = 41 IpcInfoObjectTypeArcadeReg IpcInfoObjectType = 42 IpcInfoObjectTypeEventlink IpcInfoObjectType = 43 IpcInfoObjectTypeTaskInspect IpcInfoObjectType = 44 IpcInfoObjectTypeTaskRead IpcInfoObjectType = 45 IpcInfoObjectTypeThreadInspect IpcInfoObjectType = 46 IpcInfoObjectTypeThreadRead IpcInfoObjectType = 47 IpcInfoObjectTypeSuidCred IpcInfoObjectType = 48 IpcInfoObjectTypeHypervisor IpcInfoObjectType = 49 IpcInfoObjectTypeTaskIDToken IpcInfoObjectType = 50 IpcInfoObjectTypeTaskFatal IpcInfoObjectType = 51 IpcInfoObjectTypeKcdata IpcInfoObjectType = 52 IpcInfoObjectTypeExclavesResource IpcInfoObjectType = 53 IpcInfoObjectTypeThreadResume IpcInfoObjectType = 54 IpcInfoObjectTypeUnknown IpcInfoObjectType = 4294967295 )
func (IpcInfoObjectType) String ¶ added in v0.17.0
func (e IpcInfoObjectType) String() string
String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.
type L2CAPChannel ¶ added in v0.17.0
L2CAPChannel is an idiomatic wrapper over the Objective-C class CBL2CAPChannel.
A live L2CAP connection to a remote device.
func L2CAPChannelFromID ¶ added in v0.17.0
func L2CAPChannelFromID(id objc.ID) *L2CAPChannel
L2CAPChannelFromID adopts an existing Objective-C object as a L2CAPChannel (nil for 0), retaining it and registering a release finalizer.
func NewL2CAPChannel ¶ added in v0.17.0
func NewL2CAPChannel() *L2CAPChannel
NewL2CAPChannel creates a new L2CAPChannel.
func (*L2CAPChannel) Description ¶ added in v0.17.0
func (lcc *L2CAPChannel) Description() string
Description returns the object's -description text.
func (*L2CAPChannel) InputStream ¶ added in v0.17.0
func (lcc *L2CAPChannel) InputStream() *foundation.InputStream
InputStream returns an NSStream used for reading data from the remote peer
func (*L2CAPChannel) IsEqual ¶ added in v0.17.0
func (lcc *L2CAPChannel) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*L2CAPChannel) IsKind ¶ added in v0.17.0
func (lcc *L2CAPChannel) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*L2CAPChannel) OutputStream ¶ added in v0.17.0
func (lcc *L2CAPChannel) OutputStream() *foundation.OutputStream
OutputStream returns an NSStream used for writing data to the peer
func (*L2CAPChannel) PSM ¶ added in v0.17.0
func (lcc *L2CAPChannel) PSM() uint16
PSM returns the PSM (Protocol/Service Multiplexer) of the channel
func (*L2CAPChannel) Peer ¶ added in v0.17.0
func (lcc *L2CAPChannel) Peer() *Peer
Peer returns the peer connected to the channel
func (*L2CAPChannel) String ¶ added in v0.17.0
func (lcc *L2CAPChannel) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type LaunchDataType ¶ added in v0.17.0
type LaunchDataType int32
const ( LaunchDataTypeDictionary LaunchDataType = 1 LaunchDataTypeArray LaunchDataType = 2 LaunchDataTypeFd LaunchDataType = 3 LaunchDataTypeInteger LaunchDataType = 4 LaunchDataTypeReal LaunchDataType = 5 LaunchDataTypeBool LaunchDataType = 6 LaunchDataTypeString LaunchDataType = 7 LaunchDataTypeOpaque LaunchDataType = 8 LaunchDataTypeErrno LaunchDataType = 9 LaunchDataTypeMachport LaunchDataType = 10 )
func (LaunchDataType) String ¶ added in v0.17.0
func (e LaunchDataType) String() string
String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.
type MDLabelDomain ¶
type MDLabelDomain int32
These constants are used to specify a domain to MDLabelCreate().
const ( KMDLabelUserDomain MDLabelDomain = 0 KMDLabelLocalDomain MDLabelDomain = 1 )
func (MDLabelDomain) String ¶
func (e MDLabelDomain) String() string
String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.
type MDQueryOptionFlags ¶
type MDQueryOptionFlags int32
const ( KMDQuerySynchronous MDQueryOptionFlags = 1 KMDQueryWantsUpdates MDQueryOptionFlags = 4 KMDQueryAllowFSTranslation MDQueryOptionFlags = 8 )
func (MDQueryOptionFlags) String ¶
func (e MDQueryOptionFlags) String() string
String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MDQuerySortOptionFlags ¶
type MDQuerySortOptionFlags int32
const (
KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)
func (MDQuerySortOptionFlags) String ¶
func (e MDQuerySortOptionFlags) String() string
String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlags ¶ added in v0.17.0
type MachVMRangeFlags uint64
Bitmask — values may be combined with |.
const (
MachVMRangeFlagsNone MachVMRangeFlags = 0
)
func (MachVMRangeFlags) String ¶ added in v0.17.0
func (e MachVMRangeFlags) String() string
String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlavor ¶ added in v0.17.0
type MachVMRangeFlavor uint32
const ( MachVMRangeFlavorInvalid MachVMRangeFlavor = 0 MachVMRangeFlavorV1 MachVMRangeFlavor = 1 )
func (MachVMRangeFlavor) String ¶ added in v0.17.0
func (e MachVMRangeFlavor) String() string
String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeTag ¶ added in v0.17.0
type MachVMRangeTag uint16
const ( MachVMRangeTagDefault MachVMRangeTag = 0 MachVMRangeTagData MachVMRangeTag = 1 MachVMRangeTagFixed MachVMRangeTag = 2 )
func (MachVMRangeTag) String ¶ added in v0.17.0
func (e MachVMRangeTag) String() string
String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.
type Manager ¶ added in v0.17.0
Manager is an idiomatic wrapper over the Objective-C class CBManager.
Manager is an abstract base — you do not construct it directly. Construct one of CentralManager, PeripheralManager and pass it where a Manager is accepted.
The abstract base class that manages central and peripheral objects.
func ManagerFromID ¶ added in v0.17.0
ManagerFromID adopts an existing Objective-C object as a Manager (nil for 0), retaining it and registering a release finalizer.
func (*Manager) Authorization ¶ added in v0.17.0
func (m *Manager) Authorization() ManagerAuthorization
Authorization returns the current authorization of the manager, initially set to <code>CBManagerAuthorizationNotDetermined</code>. Updates are provided by required delegate method {
func (*Manager) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Manager) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Manager) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Manager) State ¶ added in v0.17.0
func (m *Manager) State() ManagerState
State returns the current state of the manager, initially set to <code>CBManagerStateUnknown</code>. Updates are provided by required delegate method {
type ManagerAuthorization ¶ added in v0.17.0
type ManagerAuthorization int64
The current authorization state of a Core Bluetooth manager.
const ( // A state that indicates the user has yet to authorize Bluetooth for this app. ManagerAuthorizationNotDetermined ManagerAuthorization = 0 // A state that indicates this app isn’t authorized to use Bluetooth. ManagerAuthorizationRestricted ManagerAuthorization = 1 // A state that indicates the user explicitly denied Bluetooth access for this app. ManagerAuthorizationDenied ManagerAuthorization = 2 // A state that indicates the user has authorized Bluetooth at any time. ManagerAuthorizationAllowedAlways ManagerAuthorization = 3 )
func AuthorizationClass ¶ added in v0.17.0
func AuthorizationClass() ManagerAuthorization
AuthorizationClass returns the current authorization of the manager, initially set to <code>CBManagerAuthorizationNotDetermined</code>. You can check this in your implementation of required delegate method {
func (ManagerAuthorization) String ¶ added in v0.17.0
func (e ManagerAuthorization) String() string
String returns the ManagerAuthorization constant's name, or its numeric form when the value is not a known constant.
type ManagerProvider ¶ added in v0.17.0
ManagerProvider is accepted wherever a CBManager (or one of its subclasses) is expected.
type ManagerState ¶ added in v0.17.0
type ManagerState int64
The possible states of a Core Bluetooth manager.
const ( // The manager’s state is unknown. ManagerStateUnknown ManagerState = 0 // A state that indicates the connection with the system service was momentarily lost. ManagerStateResetting ManagerState = 1 // A state that indicates this device doesn’t support the Bluetooth low energy central or client role. ManagerStateUnsupported ManagerState = 2 ManagerStateUnauthorized ManagerState = 3 // A state that indicates Bluetooth is currently powered off. ManagerStatePoweredOff ManagerState = 4 // A state that indicates Bluetooth is currently powered on and available to use. ManagerStatePoweredOn ManagerState = 5 )
func (ManagerState) String ¶ added in v0.17.0
func (e ManagerState) String() string
String returns the ManagerState constant's name, or its numeric form when the value is not a known constant.
type MpoFlags ¶ added in v0.17.0
type MpoFlags uint32
Bitmask — values may be combined with |.
const ( MpoFlagsPort MpoFlags = 0 MpoFlagsServicePort MpoFlags = 1024 MpoFlagsConnectionPort MpoFlags = 2048 MpoFlagsReplyPort MpoFlags = 4096 MpoFlagsWeakReplyPort MpoFlags = 16384 MpoFlagsNotificationPort MpoFlags = 17408 MpoFlagsExceptionPort MpoFlags = 32768 MpoFlagsConnectionPortWithPortArray MpoFlags = 65536 )
type MutableCharacteristic ¶ added in v0.17.0
type MutableCharacteristic struct {
Characteristic
}
MutableCharacteristic is an idiomatic wrapper over the Objective-C class CBMutableCharacteristic.
It embeds Characteristic, promoting that type's methods.
A characteristic of a local peripheral’s service.
func MutableCharacteristicFromID ¶ added in v0.17.0
func MutableCharacteristicFromID(id objc.ID) *MutableCharacteristic
MutableCharacteristicFromID adopts an existing Objective-C object as a MutableCharacteristic (nil for 0), retaining it and registering a release finalizer.
func NewMutableCharacteristicWithTypePropertiesValuePermissions ¶ added in v0.17.0
func NewMutableCharacteristicWithTypePropertiesValuePermissions(uuid *UUID, properties CharacteristicProperties, value []byte, permissions AttributePermissions) *MutableCharacteristic
NewMutableCharacteristicWithTypePropertiesValuePermissions creates a mutable characteristic with specified permissions, properties, and value.
func (*MutableCharacteristic) Permissions ¶ added in v0.17.0
func (mc *MutableCharacteristic) Permissions() AttributePermissions
Permissions returns the permissions of the characteristic value.
func (*MutableCharacteristic) SubscribedCentrals ¶ added in v0.17.0
func (mc *MutableCharacteristic) SubscribedCentrals() []*Central
SubscribedCentrals returns for notifying characteristics, the set of currently subscribed centrals.
SubscribedCentrals returns the collection as a Go slice.
func (*MutableCharacteristic) WithDescriptors ¶ added in v0.17.0
func (mc *MutableCharacteristic) WithDescriptors(items ...DescriptorProvider) *MutableCharacteristic
WithDescriptors sets an array of the characteristic’s descriptors.
func (*MutableCharacteristic) WithPermissions ¶ added in v0.17.0
func (mc *MutableCharacteristic) WithPermissions(permissions AttributePermissions) *MutableCharacteristic
WithPermissions sets the permissions of the characteristic value.
func (*MutableCharacteristic) WithProperties ¶ added in v0.17.0
func (mc *MutableCharacteristic) WithProperties(properties CharacteristicProperties) *MutableCharacteristic
WithProperties sets the properties of the characteristic.
func (*MutableCharacteristic) WithValue ¶ added in v0.17.0
func (mc *MutableCharacteristic) WithValue(value []byte) *MutableCharacteristic
WithValue sets the value of the characteristic.
type MutableDescriptor ¶ added in v0.17.0
type MutableDescriptor struct {
Descriptor
}
MutableDescriptor is an idiomatic wrapper over the Objective-C class CBMutableDescriptor.
It embeds Descriptor, promoting that type's methods.
An object that provides additional information about a local peripheral’s characteristic.
func MutableDescriptorFromID ¶ added in v0.17.0
func MutableDescriptorFromID(id objc.ID) *MutableDescriptor
MutableDescriptorFromID adopts an existing Objective-C object as a MutableDescriptor (nil for 0), retaining it and registering a release finalizer.
func NewMutableDescriptorWithTypeValue ¶ added in v0.17.0
func NewMutableDescriptorWithTypeValue(uuid *UUID, value obj.Object) *MutableDescriptor
NewMutableDescriptorWithTypeValue creates a mutable descriptor with a specified value.
type MutableService ¶ added in v0.17.0
type MutableService struct {
Service
}
MutableService is an idiomatic wrapper over the Objective-C class CBMutableService.
It embeds Service, promoting that type's methods.
A service with writeable property values.
func MutableServiceFromID ¶ added in v0.17.0
func MutableServiceFromID(id objc.ID) *MutableService
MutableServiceFromID adopts an existing Objective-C object as a MutableService (nil for 0), retaining it and registering a release finalizer.
func NewMutableServiceWithTypePrimary ¶ added in v0.17.0
func NewMutableServiceWithTypePrimary(uuid *UUID, isPrimary bool) *MutableService
NewMutableServiceWithTypePrimary creates a newly initialized mutable service specified by UUID and service type.
func (*MutableService) WithCharacteristics ¶ added in v0.17.0
func (ms *MutableService) WithCharacteristics(items ...CharacteristicProvider) *MutableService
WithCharacteristics sets a list of characteristics of a service.
func (*MutableService) WithIncludedServices ¶ added in v0.17.0
func (ms *MutableService) WithIncludedServices(items ...ServiceProvider) *MutableService
WithIncludedServices sets a list of included services.
type Peer ¶ added in v0.17.0
Peer is an idiomatic wrapper over the Objective-C class CBPeer.
Peer is an abstract base — you do not construct it directly. Construct one of Central, Peripheral and pass it where a Peer is accepted.
An object that represents a remote device.
func PeerFromID ¶ added in v0.17.0
PeerFromID adopts an existing Objective-C object as a Peer (nil for 0), retaining it and registering a release finalizer.
func (*Peer) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Peer) Identifier ¶ added in v0.17.0
func (p *Peer) Identifier() *foundation.UUID
Identifier returns the identifier.
func (*Peer) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
type PeerProvider ¶ added in v0.17.0
PeerProvider is accepted wherever a CBPeer (or one of its subclasses) is expected.
type Peripheral ¶ added in v0.17.0
type Peripheral struct {
Peer
}
Peripheral is an idiomatic wrapper over the Objective-C class CBPeripheral.
It embeds Peer, promoting that type's methods.
A remote peripheral device.
func NewPeripheral ¶ added in v0.17.0
func NewPeripheral() *Peripheral
NewPeripheral creates a new Peripheral.
func PeripheralFromID ¶ added in v0.17.0
func PeripheralFromID(id objc.ID) *Peripheral
PeripheralFromID adopts an existing Objective-C object as a Peripheral (nil for 0), retaining it and registering a release finalizer.
func (*Peripheral) CanSendWriteWithoutResponse ¶ added in v0.17.0
func (p *Peripheral) CanSendWriteWithoutResponse() bool
CanSendWriteWithoutResponse reports whether the remote device has space to send a write without response. If this value is false, the value will be set to true after the current writes have been flushed, and <link>peripheralIsReadyToSendWriteWithoutResponse:</link> will be called.
func (*Peripheral) DiscoverCharacteristicsForService ¶ added in v0.17.0
func (p *Peripheral) DiscoverCharacteristicsForService(characteristicUUIDs []*UUID, service *Service)
DiscoverCharacteristicsForService discovers the specified characteristics of a service.
func (*Peripheral) DiscoverDescriptorsForCharacteristic ¶ added in v0.17.0
func (p *Peripheral) DiscoverDescriptorsForCharacteristic(characteristic *Characteristic)
DiscoverDescriptorsForCharacteristic discovers the descriptors of a characteristic.
func (*Peripheral) DiscoverIncludedServicesForService ¶ added in v0.17.0
func (p *Peripheral) DiscoverIncludedServicesForService(includedServiceUUIDs []*UUID, service *Service)
DiscoverIncludedServicesForService discovers the specified included services of a previously-discovered service.
func (*Peripheral) DiscoverServices ¶ added in v0.17.0
func (p *Peripheral) DiscoverServices(serviceUUIDs []*UUID)
DiscoverServices discovers the specified services of the peripheral.
func (*Peripheral) MaximumWriteValueLengthForType ¶ added in v0.17.0
func (p *Peripheral) MaximumWriteValueLengthForType(type_ CharacteristicWriteType) int
MaximumWriteValueLengthForType the maximum amount of data, in bytes, you can send to a characteristic in a single write type.
func (*Peripheral) Name ¶ added in v0.17.0
func (p *Peripheral) Name() string
Name returns the name of the peripheral.
func (*Peripheral) OpenL2CAPChannel ¶ added in v0.17.0
func (p *Peripheral) OpenL2CAPChannel(psm uint16)
OpenL2CAPChannel attempts to open an L2CAP channel to the peripheral using the supplied Protocol/Service Multiplexer (PSM).
func (*Peripheral) RSSI ¶ added in v0.17.0
func (p *Peripheral) RSSI() *foundation.Number
RSSI returns the most recently read RSSI, in decibels.
func (*Peripheral) ReadRSSI ¶ added in v0.17.0
func (p *Peripheral) ReadRSSI()
ReadRSSI retrieves the current RSSI value for the peripheral while connected to the central manager.
func (*Peripheral) ReadValueForCharacteristic ¶ added in v0.17.0
func (p *Peripheral) ReadValueForCharacteristic(characteristic *Characteristic)
ReadValueForCharacteristic retrieves the value of a specified characteristic.
func (*Peripheral) ReadValueForDescriptor ¶ added in v0.17.0
func (p *Peripheral) ReadValueForDescriptor(descriptor *Descriptor)
ReadValueForDescriptor retrieves the value of a specified characteristic descriptor.
func (*Peripheral) Services ¶ added in v0.17.0
func (p *Peripheral) Services() []*Service
Services returns a list of <code>CBService</code> objects that have been discovered on the peripheral.
Services returns the collection as a Go slice.
func (*Peripheral) SetNotifyValueForCharacteristic ¶ added in v0.17.0
func (p *Peripheral) SetNotifyValueForCharacteristic(enabled bool, characteristic *Characteristic)
SetNotifyValueForCharacteristic sets notifications or indications for the value of a specified characteristic.
func (*Peripheral) State ¶ added in v0.17.0
func (p *Peripheral) State() PeripheralState
State returns the current connection state of the peripheral.
func (*Peripheral) WithDelegate ¶ added in v0.17.0
func (p *Peripheral) WithDelegate(delegate PeripheralDelegate) *Peripheral
WithDelegate sets the delegate object specified to receive peripheral events.
func (*Peripheral) WriteValueForCharacteristicType ¶ added in v0.17.0
func (p *Peripheral) WriteValueForCharacteristicType(data []byte, characteristic *Characteristic, type_ CharacteristicWriteType)
WriteValueForCharacteristicType writes the value of a characteristic.
func (*Peripheral) WriteValueForDescriptor ¶ added in v0.17.0
func (p *Peripheral) WriteValueForDescriptor(data []byte, descriptor *Descriptor)
WriteValueForDescriptor writes the value of a characteristic descriptor.
type PeripheralDelegate ¶ added in v0.17.0
type PeripheralDelegate interface {
}
PeripheralDelegate receives the callbacks of the Objective-C protocol CBPeripheralDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (PeripheralDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type PeripheralDelegatePeripheralDidDiscoverCharacteristicsForServiceErrorHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidDiscoverCharacteristicsForServiceErrorHandler interface {
PeripheralDidDiscoverCharacteristicsForServiceError(peripheral *Peripheral, service *Service, err error)
}
PeripheralDelegatePeripheralDidDiscoverCharacteristicsForServiceErrorHandler is the optional CBPeripheralDelegate method peripheral:didDiscoverCharacteristicsForService:error:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidDiscoverDescriptorsForCharacteristicErrorHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidDiscoverDescriptorsForCharacteristicErrorHandler interface {
PeripheralDidDiscoverDescriptorsForCharacteristicError(peripheral *Peripheral, characteristic *Characteristic, err error)
}
PeripheralDelegatePeripheralDidDiscoverDescriptorsForCharacteristicErrorHandler is the optional CBPeripheralDelegate method peripheral:didDiscoverDescriptorsForCharacteristic:error:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidDiscoverIncludedServicesForServiceErrorHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidDiscoverIncludedServicesForServiceErrorHandler interface {
PeripheralDidDiscoverIncludedServicesForServiceError(peripheral *Peripheral, service *Service, err error)
}
PeripheralDelegatePeripheralDidDiscoverIncludedServicesForServiceErrorHandler is the optional CBPeripheralDelegate method peripheral:didDiscoverIncludedServicesForService:error:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidDiscoverServicesHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidDiscoverServicesHandler interface {
PeripheralDidDiscoverServices(peripheral *Peripheral, err error)
}
PeripheralDelegatePeripheralDidDiscoverServicesHandler is the optional CBPeripheralDelegate method peripheral:didDiscoverServices:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidModifyServicesHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidModifyServicesHandler interface {
PeripheralDidModifyServices(peripheral *Peripheral, invalidatedServices obj.Object)
}
PeripheralDelegatePeripheralDidModifyServicesHandler is the optional CBPeripheralDelegate method peripheral:didModifyServices:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidOpenL2CAPChannelErrorHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidOpenL2CAPChannelErrorHandler interface {
PeripheralDidOpenL2CAPChannelError(peripheral *Peripheral, channel *L2CAPChannel, err error)
}
PeripheralDelegatePeripheralDidOpenL2CAPChannelErrorHandler is the optional CBPeripheralDelegate method peripheral:didOpenL2CAPChannel:error:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidReadRSSIErrorHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidReadRSSIErrorHandler interface {
PeripheralDidReadRSSIError(peripheral *Peripheral, rssi obj.Object, err error)
}
PeripheralDelegatePeripheralDidReadRSSIErrorHandler is the optional CBPeripheralDelegate method peripheral:didReadRSSI:error:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidUpdateNameHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidUpdateNameHandler interface {
PeripheralDidUpdateName(peripheral *Peripheral)
}
PeripheralDelegatePeripheralDidUpdateNameHandler is the optional CBPeripheralDelegate method peripheralDidUpdateName:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidUpdateNotificationStateForCharacteristicErrorHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidUpdateNotificationStateForCharacteristicErrorHandler interface {
PeripheralDidUpdateNotificationStateForCharacteristicError(peripheral *Peripheral, characteristic *Characteristic, err error)
}
PeripheralDelegatePeripheralDidUpdateNotificationStateForCharacteristicErrorHandler is the optional CBPeripheralDelegate method peripheral:didUpdateNotificationStateForCharacteristic:error:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidUpdateRSSIErrorHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidUpdateRSSIErrorHandler interface {
PeripheralDidUpdateRSSIError(peripheral *Peripheral, err error)
}
PeripheralDelegatePeripheralDidUpdateRSSIErrorHandler is the optional CBPeripheralDelegate method peripheralDidUpdateRSSI:error:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidUpdateValueForCharacteristicErrorHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidUpdateValueForCharacteristicErrorHandler interface {
PeripheralDidUpdateValueForCharacteristicError(peripheral *Peripheral, characteristic *Characteristic, err error)
}
PeripheralDelegatePeripheralDidUpdateValueForCharacteristicErrorHandler is the optional CBPeripheralDelegate method peripheral:didUpdateValueForCharacteristic:error:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidUpdateValueForDescriptorErrorHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidUpdateValueForDescriptorErrorHandler interface {
PeripheralDidUpdateValueForDescriptorError(peripheral *Peripheral, descriptor *Descriptor, err error)
}
PeripheralDelegatePeripheralDidUpdateValueForDescriptorErrorHandler is the optional CBPeripheralDelegate method peripheral:didUpdateValueForDescriptor:error:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidWriteValueForCharacteristicErrorHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidWriteValueForCharacteristicErrorHandler interface {
PeripheralDidWriteValueForCharacteristicError(peripheral *Peripheral, characteristic *Characteristic, err error)
}
PeripheralDelegatePeripheralDidWriteValueForCharacteristicErrorHandler is the optional CBPeripheralDelegate method peripheral:didWriteValueForCharacteristic:error:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralDidWriteValueForDescriptorErrorHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralDidWriteValueForDescriptorErrorHandler interface {
PeripheralDidWriteValueForDescriptorError(peripheral *Peripheral, descriptor *Descriptor, err error)
}
PeripheralDelegatePeripheralDidWriteValueForDescriptorErrorHandler is the optional CBPeripheralDelegate method peripheral:didWriteValueForDescriptor:error:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralDelegatePeripheralIsReadyToSendWriteWithoutResponseHandler ¶ added in v0.17.0
type PeripheralDelegatePeripheralIsReadyToSendWriteWithoutResponseHandler interface {
PeripheralIsReadyToSendWriteWithoutResponse(peripheral *Peripheral)
}
PeripheralDelegatePeripheralIsReadyToSendWriteWithoutResponseHandler is the optional CBPeripheralDelegate method peripheralIsReadyToSendWriteWithoutResponse:. Implement it on a PeripheralDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManager ¶ added in v0.17.0
type PeripheralManager struct {
Manager
}
PeripheralManager is an idiomatic wrapper over the Objective-C class CBPeripheralManager.
It embeds Manager, promoting that type's methods.
An object that manages and advertises peripheral services exposed by this app.
func NewPeripheralManager ¶ added in v0.17.0
func NewPeripheralManager() *PeripheralManager
NewPeripheralManager creates a new PeripheralManager.
func PeripheralManagerFromID ¶ added in v0.17.0
func PeripheralManagerFromID(id objc.ID) *PeripheralManager
PeripheralManagerFromID adopts an existing Objective-C object as a PeripheralManager (nil for 0), retaining it and registering a release finalizer.
func (*PeripheralManager) AddService ¶ added in v0.17.0
func (pm *PeripheralManager) AddService(service *MutableService)
AddService publishes a service and any of its associated characteristics and characteristic descriptors to the local GATT database.
func (*PeripheralManager) IsAdvertising ¶ added in v0.17.0
func (pm *PeripheralManager) IsAdvertising() bool
IsAdvertising reports whether the peripheral is currently advertising data.
func (*PeripheralManager) PublishL2CAPChannelWithEncryption ¶ added in v0.17.0
func (pm *PeripheralManager) PublishL2CAPChannelWithEncryption(encryptionRequired bool)
PublishL2CAPChannelWithEncryption creates a listener for incoming L2CAP channel connections.
func (*PeripheralManager) RemoveAllServices ¶ added in v0.17.0
func (pm *PeripheralManager) RemoveAllServices()
RemoveAllServices removes all published services from the local GATT database.
func (*PeripheralManager) RemoveService ¶ added in v0.17.0
func (pm *PeripheralManager) RemoveService(service *MutableService)
RemoveService removes a specified published service from the local GATT database.
func (*PeripheralManager) RespondToRequestWithResult ¶ added in v0.17.0
func (pm *PeripheralManager) RespondToRequestWithResult(request *ATTRequest, result ATTError)
RespondToRequestWithResult responds to a read or write request from a connected central.
func (*PeripheralManager) SetDesiredConnectionLatencyForCentral ¶ added in v0.17.0
func (pm *PeripheralManager) SetDesiredConnectionLatencyForCentral(latency PeripheralManagerConnectionLatency, central *Central)
SetDesiredConnectionLatencyForCentral sets the desired connection latency for an existing connection to a central device.
func (*PeripheralManager) StartAdvertising ¶ added in v0.17.0
func (pm *PeripheralManager) StartAdvertising(advertisementData map[string]obj.Object)
StartAdvertising advertises peripheral manager data.
func (*PeripheralManager) StopAdvertising ¶ added in v0.17.0
func (pm *PeripheralManager) StopAdvertising()
StopAdvertising stops advertising peripheral manager data.
func (*PeripheralManager) UnpublishL2CAPChannel ¶ added in v0.17.0
func (pm *PeripheralManager) UnpublishL2CAPChannel(psm uint16)
UnpublishL2CAPChannel removes a published service from the local system.
func (*PeripheralManager) UpdateValueForCharacteristicOnSubscribedCentrals ¶ added in v0.17.0
func (pm *PeripheralManager) UpdateValueForCharacteristicOnSubscribedCentrals(value []byte, characteristic *MutableCharacteristic, centrals []*Central) bool
UpdateValueForCharacteristicOnSubscribedCentrals send an updated characteristic value to one or more subscribed centrals, using a notification or indication.
func (*PeripheralManager) WithDelegate ¶ added in v0.17.0
func (pm *PeripheralManager) WithDelegate(delegate PeripheralManagerDelegate) *PeripheralManager
WithDelegate sets the delegate object specified to receive peripheral events.
type PeripheralManagerAuthorizationStatus
deprecated
added in
v0.17.0
type PeripheralManagerAuthorizationStatus int64
Values representing the current authorization state of the peripheral manager.
Deprecated: since macOS 10.15.
const ( // An authorization status that indicates the user hasn’t indicated whether this app can share data using Bluetooth while in the background. PeripheralManagerAuthorizationStatusNotDetermined PeripheralManagerAuthorizationStatus = 0 // An authorization status that indicates this app isn’t authorized to share data using Bluetooth while in the background. PeripheralManagerAuthorizationStatusRestricted PeripheralManagerAuthorizationStatus = 1 // An authorization status that indicates the user explicitly denied this app from sharing data using Bluetooth while in the background. PeripheralManagerAuthorizationStatusDenied PeripheralManagerAuthorizationStatus = 2 // An authorization status that indicates the user authorized this app to share data using Bluetooth while in the background. PeripheralManagerAuthorizationStatusAuthorized PeripheralManagerAuthorizationStatus = 3 )
func AuthorizationStatusClass ¶ added in v0.17.0
func AuthorizationStatusClass() PeripheralManagerAuthorizationStatus
AuthorizationStatusClass returns the app’s authorization status for sharing data while in the background.
func (PeripheralManagerAuthorizationStatus) String ¶ added in v0.17.0
func (e PeripheralManagerAuthorizationStatus) String() string
String returns the PeripheralManagerAuthorizationStatus constant's name, or its numeric form when the value is not a known constant.
type PeripheralManagerConnectionLatency ¶ added in v0.17.0
type PeripheralManagerConnectionLatency int64
Values representing the connection latency of the peripheral manager.
const ( // A latency setting indicating that prioritizes rapid communication over battery life. PeripheralManagerConnectionLatencyLow PeripheralManagerConnectionLatency = 0 // A latency setting that balances communication frequency and battery life. PeripheralManagerConnectionLatencyMedium PeripheralManagerConnectionLatency = 1 // A latency setting that prioritizes extending battery life over rapid communication. PeripheralManagerConnectionLatencyHigh PeripheralManagerConnectionLatency = 2 )
func (PeripheralManagerConnectionLatency) String ¶ added in v0.17.0
func (e PeripheralManagerConnectionLatency) String() string
String returns the PeripheralManagerConnectionLatency constant's name, or its numeric form when the value is not a known constant.
type PeripheralManagerDelegate ¶ added in v0.17.0
type PeripheralManagerDelegate interface {
// PeripheralManagerDidUpdateState invoked whenever the peripheral manager's state has been updated. Commands should only be issued when the state is <code>CBPeripheralManagerStatePoweredOn</code>. A state below <code>CBPeripheralManagerStatePoweredOn</code> implies that advertisement has paused and any connected centrals have been disconnected. If the state moves below <code>CBPeripheralManagerStatePoweredOff</code>, advertisement is stopped and must be explicitly restarted, and the local database is cleared and all services must be re-added.
PeripheralManagerDidUpdateState(peripheral *PeripheralManager)
}
PeripheralManagerDelegate receives the callbacks of the Objective-C protocol CBPeripheralManagerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (PeripheralManagerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type PeripheralManagerDelegatePeripheralManagerCentralDidSubscribeToCharacteristicHandler ¶ added in v0.17.0
type PeripheralManagerDelegatePeripheralManagerCentralDidSubscribeToCharacteristicHandler interface {
PeripheralManagerCentralDidSubscribeToCharacteristic(peripheral *PeripheralManager, central *Central, characteristic *Characteristic)
}
PeripheralManagerDelegatePeripheralManagerCentralDidSubscribeToCharacteristicHandler is the optional CBPeripheralManagerDelegate method peripheralManager:central:didSubscribeToCharacteristic:. Implement it on a PeripheralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManagerDelegatePeripheralManagerCentralDidUnsubscribeFromCharacteristicHandler ¶ added in v0.17.0
type PeripheralManagerDelegatePeripheralManagerCentralDidUnsubscribeFromCharacteristicHandler interface {
PeripheralManagerCentralDidUnsubscribeFromCharacteristic(peripheral *PeripheralManager, central *Central, characteristic *Characteristic)
}
PeripheralManagerDelegatePeripheralManagerCentralDidUnsubscribeFromCharacteristicHandler is the optional CBPeripheralManagerDelegate method peripheralManager:central:didUnsubscribeFromCharacteristic:. Implement it on a PeripheralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManagerDelegatePeripheralManagerDidAddServiceErrorHandler ¶ added in v0.17.0
type PeripheralManagerDelegatePeripheralManagerDidAddServiceErrorHandler interface {
PeripheralManagerDidAddServiceError(peripheral *PeripheralManager, service *Service, err error)
}
PeripheralManagerDelegatePeripheralManagerDidAddServiceErrorHandler is the optional CBPeripheralManagerDelegate method peripheralManager:didAddService:error:. Implement it on a PeripheralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManagerDelegatePeripheralManagerDidOpenL2CAPChannelErrorHandler ¶ added in v0.17.0
type PeripheralManagerDelegatePeripheralManagerDidOpenL2CAPChannelErrorHandler interface {
PeripheralManagerDidOpenL2CAPChannelError(peripheral *PeripheralManager, channel *L2CAPChannel, err error)
}
PeripheralManagerDelegatePeripheralManagerDidOpenL2CAPChannelErrorHandler is the optional CBPeripheralManagerDelegate method peripheralManager:didOpenL2CAPChannel:error:. Implement it on a PeripheralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManagerDelegatePeripheralManagerDidPublishL2CAPChannelErrorHandler ¶ added in v0.17.0
type PeripheralManagerDelegatePeripheralManagerDidPublishL2CAPChannelErrorHandler interface {
PeripheralManagerDidPublishL2CAPChannelError(peripheral *PeripheralManager, psm uint16, err error)
}
PeripheralManagerDelegatePeripheralManagerDidPublishL2CAPChannelErrorHandler is the optional CBPeripheralManagerDelegate method peripheralManager:didPublishL2CAPChannel:error:. Implement it on a PeripheralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManagerDelegatePeripheralManagerDidReceiveReadRequestHandler ¶ added in v0.17.0
type PeripheralManagerDelegatePeripheralManagerDidReceiveReadRequestHandler interface {
PeripheralManagerDidReceiveReadRequest(peripheral *PeripheralManager, request *ATTRequest)
}
PeripheralManagerDelegatePeripheralManagerDidReceiveReadRequestHandler is the optional CBPeripheralManagerDelegate method peripheralManager:didReceiveReadRequest:. Implement it on a PeripheralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManagerDelegatePeripheralManagerDidReceiveWriteRequestsHandler ¶ added in v0.17.0
type PeripheralManagerDelegatePeripheralManagerDidReceiveWriteRequestsHandler interface {
PeripheralManagerDidReceiveWriteRequests(peripheral *PeripheralManager, requests obj.Object)
}
PeripheralManagerDelegatePeripheralManagerDidReceiveWriteRequestsHandler is the optional CBPeripheralManagerDelegate method peripheralManager:didReceiveWriteRequests:. Implement it on a PeripheralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManagerDelegatePeripheralManagerDidStartAdvertisingErrorHandler ¶ added in v0.17.0
type PeripheralManagerDelegatePeripheralManagerDidStartAdvertisingErrorHandler interface {
PeripheralManagerDidStartAdvertisingError(peripheral *PeripheralManager, err error)
}
PeripheralManagerDelegatePeripheralManagerDidStartAdvertisingErrorHandler is the optional CBPeripheralManagerDelegate method peripheralManagerDidStartAdvertising:error:. Implement it on a PeripheralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManagerDelegatePeripheralManagerDidUnpublishL2CAPChannelErrorHandler ¶ added in v0.17.0
type PeripheralManagerDelegatePeripheralManagerDidUnpublishL2CAPChannelErrorHandler interface {
PeripheralManagerDidUnpublishL2CAPChannelError(peripheral *PeripheralManager, psm uint16, err error)
}
PeripheralManagerDelegatePeripheralManagerDidUnpublishL2CAPChannelErrorHandler is the optional CBPeripheralManagerDelegate method peripheralManager:didUnpublishL2CAPChannel:error:. Implement it on a PeripheralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManagerDelegatePeripheralManagerIsReadyToUpdateSubscribersHandler ¶ added in v0.17.0
type PeripheralManagerDelegatePeripheralManagerIsReadyToUpdateSubscribersHandler interface {
PeripheralManagerIsReadyToUpdateSubscribers(peripheral *PeripheralManager)
}
PeripheralManagerDelegatePeripheralManagerIsReadyToUpdateSubscribersHandler is the optional CBPeripheralManagerDelegate method peripheralManagerIsReadyToUpdateSubscribers:. Implement it on a PeripheralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManagerDelegatePeripheralManagerWillRestoreStateHandler ¶ added in v0.17.0
type PeripheralManagerDelegatePeripheralManagerWillRestoreStateHandler interface {
PeripheralManagerWillRestoreState(peripheral *PeripheralManager, dict obj.Object)
}
PeripheralManagerDelegatePeripheralManagerWillRestoreStateHandler is the optional CBPeripheralManagerDelegate method peripheralManager:willRestoreState:. Implement it on a PeripheralManagerDelegate value to receive that callback; a value without it is simply never sent one.
type PeripheralManagerState
deprecated
added in
v0.17.0
type PeripheralManagerState int64
Values that represent the current state of the peripheral manager.
Deprecated: since macOS 10.13.
const ( // A manager state that indicates the current state of the peripheral manager is unknown. PeripheralManagerStateUnknown PeripheralManagerState = 0 // A manager state that indicates the connection with the system service was momentarily lost. PeripheralManagerStateResetting PeripheralManagerState = 1 // A manager state that indicates the platform doesn’t support the Bluetooth low energy peripheral/server role. PeripheralManagerStateUnsupported PeripheralManagerState = 2 PeripheralManagerStateUnauthorized PeripheralManagerState = 3 // A manager state that indicates Bluetooth is currently powered off. PeripheralManagerStatePoweredOff PeripheralManagerState = 4 // A manager state that indicates Bluetooth is currently powered on and is available to use. PeripheralManagerStatePoweredOn PeripheralManagerState = 5 )
func (PeripheralManagerState) String ¶ added in v0.17.0
func (e PeripheralManagerState) String() string
String returns the PeripheralManagerState constant's name, or its numeric form when the value is not a known constant.
type PeripheralState ¶ added in v0.17.0
type PeripheralState int64
Values representing the connection state of a peripheral.
const ( // The peripheral isn’t connected to the central manager. PeripheralStateDisconnected PeripheralState = 0 // The peripheral is in the process of connecting to the central manager. PeripheralStateConnecting PeripheralState = 1 // The peripheral is connected to the central manager. PeripheralStateConnected PeripheralState = 2 // The peripheral is disconnecting from the central manager. PeripheralStateDisconnecting PeripheralState = 3 )
func (PeripheralState) String ¶ added in v0.17.0
func (e PeripheralState) String() string
String returns the PeripheralState constant's name, or its numeric form when the value is not a known constant.
type Perm ¶ added in v0.17.0
type Perm int32
const ( PermReadData Perm = 2 PermListDirectory Perm = 2 PermWriteData Perm = 4 PermAddFile Perm = 4 PermExecute Perm = 8 PermSearch Perm = 8 PermDelete Perm = 16 PermAppendData Perm = 32 PermAddSubdirectory Perm = 32 PermDeleteChild Perm = 64 PermReadAttributes Perm = 128 PermWriteAttributes Perm = 256 PermReadExtattributes Perm = 512 PermWriteExtattributes Perm = 1024 PermReadSecurity Perm = 2048 PermWriteSecurity Perm = 4096 PermChangeOwner Perm = 8192 PermSynchronize Perm = 1048576 )
type PtrauthKey ¶ added in v0.17.0
type PtrauthKey int32
const ( Ptrauth_key_none PtrauthKey = -1 Ptrauth_key_asia PtrauthKey = 0 Ptrauth_key_asib PtrauthKey = 1 Ptrauth_key_asda PtrauthKey = 2 Ptrauth_key_asdb PtrauthKey = 3 Ptrauth_key_process_independent_code PtrauthKey = 0 Ptrauth_key_process_dependent_code PtrauthKey = 1 Ptrauth_key_process_independent_data PtrauthKey = 2 Ptrauth_key_process_dependent_data PtrauthKey = 3 Ptrauth_key_return_address PtrauthKey = 1 Ptrauth_key_frame_pointer PtrauthKey = 3 Ptrauth_key_function_pointer PtrauthKey = 0 Ptrauth_key_block_function PtrauthKey = 0 Ptrauth_key_cxx_vtable_pointer PtrauthKey = 2 Ptrauth_key_method_list_pointer PtrauthKey = 2 Ptrauth_key_objc_isa_pointer PtrauthKey = 2 Ptrauth_key_objc_super_pointer PtrauthKey = 2 Ptrauth_key_objc_sel_pointer PtrauthKey = 3 Ptrauth_key_objc_class_ro_pointer PtrauthKey = 2 Ptrauth_key_block_descriptor_pointer PtrauthKey = 2 Ptrauth_key_init_fini_pointer PtrauthKey = 0 )
func (PtrauthKey) String ¶ added in v0.17.0
func (e PtrauthKey) String() string
String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.
type Service ¶ added in v0.17.0
type Service struct {
Attribute
}
Service is an idiomatic wrapper over the Objective-C class CBService.
Service is an abstract base — you do not construct it directly. Construct one of MutableService and pass it where a Service is accepted.
A collection of data and associated behaviors that accomplish a function or feature of a device.
func ServiceFromID ¶ added in v0.17.0
ServiceFromID adopts an existing Objective-C object as a Service (nil for 0), retaining it and registering a release finalizer.
func (*Service) Characteristics ¶ added in v0.17.0
func (s *Service) Characteristics() []*Characteristic
Characteristics returns a list of CBCharacteristics that have so far been discovered in this service.
Characteristics returns the collection as a Go slice.
func (*Service) IncludedServices ¶ added in v0.17.0
IncludedServices returns a list of included CBServices that have so far been discovered in this service.
IncludedServices returns the collection as a Go slice.
func (*Service) IsPrimary ¶ added in v0.17.0
IsPrimary reports whether the type of the service (primary or secondary).
func (*Service) Peripheral ¶ added in v0.17.0
func (s *Service) Peripheral() *Peripheral
Peripheral returns a back-pointer to the peripheral this service belongs to.
type ServiceProvider ¶ added in v0.17.0
ServiceProvider is accepted wherever a CBService (or one of its subclasses) is expected.
type UUID ¶ added in v0.17.0
UUID is an idiomatic wrapper over the Objective-C class CBUUID.
A universally unique identifier, as defined by Bluetooth standards.
func UUIDFromID ¶ added in v0.17.0
UUIDFromID adopts an existing Objective-C object as a UUID (nil for 0), retaining it and registering a release finalizer.
func UUIDWithCFUUID ¶ added in v0.17.0
func UUIDWithCFUUID(theUUID corefoundation.CFUUIDRef) *UUID
UUIDWithCFUUID creates a Core Bluetooth UUID object from a Core Foundation UUID object.
func UUIDWithData ¶ added in v0.17.0
UUIDWithData creates a Core Bluetooth UUID object from a 16-, 32-, or 128-bit UUID data container.
func UUIDWithNSUUID ¶ added in v0.17.0
UUIDWithNSUUID creates a Core Bluetooth UUID object from a Foundation UUID object.
func UUIDWithString ¶ added in v0.17.0
UUIDWithString creates a Core Bluetooth UUID object from a 16-, 32-, or 128-bit UUID string.
func (*UUID) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*UUID) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*UUID) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*UUID) String ¶ added in v0.17.0
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*UUID) UUIDString ¶ added in v0.17.0
UUIDString returns the UUID as NSString.
type VirtualMemoryGuardExceptionCode ¶ added in v0.17.0
type VirtualMemoryGuardExceptionCode uint32
const ( KGUARD_EXC_DEALLOC_GAP VirtualMemoryGuardExceptionCode = 1 KGUARD_EXC_RECLAIM_COPYIO_FAILURE VirtualMemoryGuardExceptionCode = 2 KGUARD_EXC_RECLAIM_INDEX_FAILURE VirtualMemoryGuardExceptionCode = 4 KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE VirtualMemoryGuardExceptionCode = 8 KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE VirtualMemoryGuardExceptionCode = 9 KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE VirtualMemoryGuardExceptionCode = 10 KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE VirtualMemoryGuardExceptionCode = 11 KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION VirtualMemoryGuardExceptionCode = 12 KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY VirtualMemoryGuardExceptionCode = 13 KGUARD_EXC_SEC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 98 KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 99 KGUARD_EXC_SEC_COPY_DENIED VirtualMemoryGuardExceptionCode = 100 KGUARD_EXC_SEC_SHARING_DENIED VirtualMemoryGuardExceptionCode = 101 KGUARD_EXC_MTE_SYNC_FAULT VirtualMemoryGuardExceptionCode = 200 KGUARD_EXC_MTE_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 201 KGUARD_EXC_MTE_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 202 KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203 KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204 )
func (VirtualMemoryGuardExceptionCode) String ¶ added in v0.17.0
func (e VirtualMemoryGuardExceptionCode) String() string
String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.
type XpcListenerCreateFlags ¶ added in v0.17.0
type XpcListenerCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcListenerCreateFlagsNone XpcListenerCreateFlags = 0 XpcListenerCreateFlagsInactive XpcListenerCreateFlags = 1 XpcListenerCreateFlagsForceMach XpcListenerCreateFlags = 2 XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4 )
func (XpcListenerCreateFlags) String ¶ added in v0.17.0
func (e XpcListenerCreateFlags) String() string
String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.
type XpcSessionCreateFlags ¶ added in v0.17.0
type XpcSessionCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcSessionCreateFlagsNone XpcSessionCreateFlags = 0 XpcSessionCreateFlagsInactive XpcSessionCreateFlags = 1 XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2 )
func (XpcSessionCreateFlags) String ¶ added in v0.17.0
func (e XpcSessionCreateFlags) String() string
String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.
Source Files
¶
- CBATTRequest_generated.go
- CBAttribute_generated.go
- CBCentralManagerDelegate_delegate_generated.go
- CBCentralManager_generated.go
- CBCentral_generated.go
- CBCharacteristic_generated.go
- CBDescriptor_generated.go
- CBL2CAPChannel_generated.go
- CBManager_generated.go
- CBMutableCharacteristic_generated.go
- CBMutableDescriptor_generated.go
- CBMutableService_generated.go
- CBPeer_generated.go
- CBPeripheralDelegate_delegate_generated.go
- CBPeripheralManagerDelegate_delegate_generated.go
- CBPeripheralManager_generated.go
- CBPeripheral_generated.go
- CBService_generated.go
- CBUUID_generated.go
- corebluetooth_classmethods_generated.go
- corebluetooth_constants_generated.go
- corebluetooth_enums_generated.go
- corebluetooth_providers_generated.go
- corebluetooth_runtime_generated.go
- doc.go