mirror of
https://github.com/openharmony/connectivity_connectivity_cangjie_wrapper.git
synced 2026-06-30 22:17:54 -04:00
+237
-54
@@ -20,39 +20,72 @@ import ohos.callback_invoke.{Callback1Argument, CallbackObject}
|
||||
import ohos.bluetooth.constant.ProfileConnectionState
|
||||
import ohos.labels.APILevel
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func createA2dpSrcProfile(): A2dpSourceProfile {
|
||||
return A2dpSourceProfile()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public class A2dpSourceProfile <: BaseProfile {
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core",
|
||||
throwexception: true
|
||||
]
|
||||
public func getPlayingState(deviceId: String): PlayingState {
|
||||
return PlayingState.StateNotPlaying
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core",
|
||||
throwexception: true
|
||||
]
|
||||
public func getConnectedDevices(): Array<String> {
|
||||
return Array()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core",
|
||||
throwexception: true
|
||||
]
|
||||
public func getConnectionState(deviceId: String): ProfileConnectionState {
|
||||
return ProfileConnectionState.StateDisconnected
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func on(eventType: ProfileCallbackType, callback: Callback1Argument<StateChangeParam>): Unit {
|
||||
return ()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func off(eventType: ProfileCallbackType, callback: CallbackObject): Unit {
|
||||
return ()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func off(eventType: ProfileCallbackType): Unit {
|
||||
return ()
|
||||
}
|
||||
@@ -62,46 +95,80 @@ public class A2dpSourceProfile <: BaseProfile {
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public enum PlayingState {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
StateNotPlaying
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
StatePlaying
|
||||
| ...
|
||||
}
|
||||
|
||||
extend PlayingState <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend PlayingState <: Equatable<PlayingState> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func ==(other: PlayingState): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func !=(other: PlayingState): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public class CodecInfo {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public var codecType: CodecType
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public var codecBitsPerSample: CodecBitsPerSample
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public var codecChannelMode: CodecChannelMode
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public var codecSampleRate: CodecSampleRate
|
||||
|
||||
public init() {
|
||||
@@ -113,134 +180,250 @@ public class CodecInfo {
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public enum CodecType {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecTypeInvalid
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecTypeSbc
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecTypeAac
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecTypeL2hc
|
||||
| ...
|
||||
}
|
||||
|
||||
extend CodecType <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend CodecType <: Equatable<CodecType> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func ==(other: CodecType): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func !=(other: CodecType): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public enum CodecChannelMode {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecChannelModeNone
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecChannelModeMono
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecChannelModeStereo
|
||||
| ...
|
||||
}
|
||||
|
||||
extend CodecChannelMode <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend CodecChannelMode <: Equatable<CodecChannelMode> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func ==(other: CodecChannelMode): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func !=(other: CodecChannelMode): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public enum CodecBitsPerSample {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecBitsPerSampleNone
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecBitsPerSample16
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecBitsPerSample24
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecBitsPerSample32
|
||||
| ...
|
||||
}
|
||||
|
||||
extend CodecBitsPerSample <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend CodecBitsPerSample <: Equatable<CodecBitsPerSample> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func ==(other: CodecBitsPerSample): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func !=(other: CodecBitsPerSample): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public enum CodecSampleRate {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecSampleRateNone
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecSampleRate44100
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecSampleRate48000
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecSampleRate88200
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecSampleRate96000
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecSampleRate176400
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
CodecSampleRate192000
|
||||
| ...
|
||||
}
|
||||
|
||||
extend CodecSampleRate <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend CodecSampleRate <: Equatable<CodecSampleRate> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func ==(other: CodecSampleRate): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func !=(other: CodecSampleRate): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,51 +19,98 @@ import ohos.bluetooth.constant.ProfileConnectionState
|
||||
import ohos.callback_invoke.{CallbackObject, Callback1Argument}
|
||||
import ohos.labels.APILevel
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public enum DisconnectCause {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
UserDisconnect
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
ConnectShouldFromKeyboard
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
ConnectShouldFromMouse
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
ConnectShouldFromCar
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
TooManyConnectedDevices
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
ConnectInternalFail
|
||||
| ...
|
||||
}
|
||||
|
||||
extend DisconnectCause <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend DisconnectCause <: Equatable<DisconnectCause> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func ==(other: DisconnectCause): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func !=(other: DisconnectCause): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public class StateChangeParam {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public var deviceId: String
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public var state: ProfileConnectionState
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public var cause: DisconnectCause
|
||||
|
||||
public init() {
|
||||
@@ -74,33 +121,67 @@ public class StateChangeParam {
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public interface BaseProfile {
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core",
|
||||
throwexception: true
|
||||
]
|
||||
func getConnectedDevices(): Array<String>
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core",
|
||||
throwexception: true
|
||||
]
|
||||
func getConnectionState(deviceId: String): ProfileConnectionState
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
func on(eventType: ProfileCallbackType, callback: Callback1Argument<StateChangeParam>): Unit
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
func off(eventType: ProfileCallbackType, callback: CallbackObject): Unit
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
func off(eventType: ProfileCallbackType): Unit
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public enum ProfileCallbackType {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
ConnectionStateChange | ...
|
||||
}
|
||||
|
||||
extend ProfileCallbackType <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1087
-249
File diff suppressed because it is too large
Load Diff
@@ -17,34 +17,61 @@ package ohos.bluetooth.constant
|
||||
|
||||
import ohos.labels.APILevel
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public enum ProfileConnectionState {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
StateDisconnected
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
StateConnecting
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
StateConnected
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
StateDisconnecting
|
||||
| ...
|
||||
}
|
||||
|
||||
extend ProfileConnectionState <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend ProfileConnectionState <: Equatable<ProfileConnectionState> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func ==(other: ProfileConnectionState): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public operator func !=(other: ProfileConnectionState): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,34 +20,62 @@ import ohos.bluetooth.constant.ProfileConnectionState
|
||||
import ohos.callback_invoke.{CallbackObject, Callback1Argument}
|
||||
import ohos.labels.APILevel
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func createHfpAgProfile(): HandsFreeAudioGatewayProfile {
|
||||
return HandsFreeAudioGatewayProfile()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public class HandsFreeAudioGatewayProfile <: BaseProfile {
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core",
|
||||
throwexception: true
|
||||
]
|
||||
public func getConnectedDevices(): Array<String> {
|
||||
return Array()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core",
|
||||
throwexception: true
|
||||
]
|
||||
public func getConnectionState(deviceId: String): ProfileConnectionState {
|
||||
return ProfileConnectionState.StateDisconnected
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func on(eventType: ProfileCallbackType, callback: Callback1Argument<StateChangeParam>): Unit {
|
||||
return ()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func off(eventType: ProfileCallbackType, callback: CallbackObject): Unit {
|
||||
return ()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.ACCESS_BLUETOOTH", syscap: "SystemCapability.Communication.Bluetooth.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.ACCESS_BLUETOOTH",
|
||||
syscap: "SystemCapability.Communication.Bluetooth.Core"
|
||||
]
|
||||
public func off(eventType: ProfileCallbackType): Unit {
|
||||
return ()
|
||||
}
|
||||
@@ -55,4 +83,4 @@ public class HandsFreeAudioGatewayProfile <: BaseProfile {
|
||||
public init() {
|
||||
super()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+330
-76
@@ -18,216 +18,398 @@ package ohos.wifi_manager
|
||||
import ohos.callback_invoke.{Callback1Argument, CallbackObject}
|
||||
import ohos.labels.APILevel
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
public enum DeviceAddressType {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
RandomDeviceAddress
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
RealDeviceAddress
|
||||
| ...
|
||||
}
|
||||
|
||||
extend DeviceAddressType <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend DeviceAddressType <: Equatable<DeviceAddressType> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
public operator func ==(other: DeviceAddressType): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
public operator func !=(other: DeviceAddressType): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
public enum WifiSecurityType {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
WifiSecTypeInvalid
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
WifiSecTypeOpen
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
WifiSecTypeWep
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
WifiSecTypePsk
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
WifiSecTypeSae
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
WifiSecTypeEap
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
WifiSecTypeEapSuiteB
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
WifiSecTypeOwe
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
WifiSecTypeWapiCert
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
WifiSecTypeWapiPsk
|
||||
| ...
|
||||
}
|
||||
|
||||
extend WifiSecurityType <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend WifiSecurityType <: Equatable<WifiSecurityType> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
public operator func ==(other: WifiSecurityType): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.Core"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.Core"
|
||||
]
|
||||
public operator func !=(other: WifiSecurityType): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public enum WifiCategory {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
Default
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
Wifi6
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
Wifi6Plus
|
||||
| ...
|
||||
}
|
||||
|
||||
extend WifiCategory <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend WifiCategory <: Equatable<WifiCategory> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public operator func ==(other: WifiCategory): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public operator func !=(other: WifiCategory): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public enum GroupOwnerBand {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
GoBandAuto
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
GoBand2GHz
|
||||
| @!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
|
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
GoBand5GHz
|
||||
| ...
|
||||
}
|
||||
|
||||
extend GroupOwnerBand <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend GroupOwnerBand <: Equatable<GroupOwnerBand> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public operator func ==(other: GroupOwnerBand): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public operator func !=(other: GroupOwnerBand): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA",
|
||||
throwexception: true
|
||||
]
|
||||
public func isWifiActive(): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.GET_WIFI_INFO", syscap: "SystemCapability.Communication.WiFi.STA", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.GET_WIFI_INFO",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA",
|
||||
throwexception: true
|
||||
]
|
||||
public func getScanInfoList(): Array<WifiScanInfo> {
|
||||
return Array()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.GET_WIFI_INFO", syscap: "SystemCapability.Communication.WiFi.P2P", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.GET_WIFI_INFO",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P",
|
||||
throwexception: true
|
||||
]
|
||||
public func p2pConnect(config: WifiP2pConfig): Unit {
|
||||
return ()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.GET_WIFI_INFO", syscap: "SystemCapability.Communication.WiFi.P2P", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.GET_WIFI_INFO",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P",
|
||||
throwexception: true
|
||||
]
|
||||
public func p2pCancelConnect(): Unit {
|
||||
return ()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.GET_WIFI_INFO", syscap: "SystemCapability.Communication.WiFi.P2P", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.GET_WIFI_INFO",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P",
|
||||
throwexception: true
|
||||
]
|
||||
public func startDiscoverDevices(): Unit {
|
||||
return ()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.GET_WIFI_INFO", syscap: "SystemCapability.Communication.WiFi.P2P", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.GET_WIFI_INFO",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P",
|
||||
throwexception: true
|
||||
]
|
||||
public func stopDiscoverDevices(): Unit {
|
||||
return ()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.GET_WIFI_INFO", syscap: "SystemCapability.Communication.WiFi.STA", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.GET_WIFI_INFO",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA",
|
||||
throwexception: true
|
||||
]
|
||||
public func on(eventType: WifiCallbackType, callback: Callback1Argument<Int32>): Unit {
|
||||
return ()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", permission: "ohos.permission.GET_WIFI_INFO", syscap: "SystemCapability.Communication.WiFi.STA", throwexception: true]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
permission: "ohos.permission.GET_WIFI_INFO",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA",
|
||||
throwexception: true
|
||||
]
|
||||
public func off(eventType: WifiCallbackType, callback!: ?CallbackObject = None): Unit {
|
||||
return ()
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public enum WifiCallbackType {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
WifiScanStateChange | ...
|
||||
}
|
||||
|
||||
extend WifiCallbackType <: ToString {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public func toString(): String {
|
||||
return String()
|
||||
}
|
||||
}
|
||||
|
||||
extend WifiCallbackType <: Equatable<WifiCallbackType> {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public operator func ==(other: WifiCallbackType): Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public operator func !=(other: WifiCallbackType): Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extend WifiCallbackType <: Hashable {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public func hashCode(): Int64 {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public class WifiInfoElement {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var eid: UInt32
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var content: Array<UInt8>
|
||||
|
||||
public init() {
|
||||
@@ -237,27 +419,51 @@ public class WifiInfoElement {
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public class WifiP2pConfig {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public var deviceAddress: String
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public var netId: Int32
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public var passphrase: String
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public var groupName: String
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public var goBand: GroupOwnerBand
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public var deviceAddressType: DeviceAddressType
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.P2P"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.P2P"
|
||||
]
|
||||
public init(
|
||||
deviceAddress: String,
|
||||
netId: Int32,
|
||||
@@ -276,51 +482,99 @@ public class WifiP2pConfig {
|
||||
}
|
||||
}
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public class WifiScanInfo {
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var ssid: String
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var bssid: String
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var bssidType: DeviceAddressType
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var capabilities: String
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var securityType: WifiSecurityType
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var rssi: Int32
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var band: Int32
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var frequency: Int32
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var channelWidth: Int32
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var centerFrequency0: Int32
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var centerFrequency1: Int32
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var infoElems: Array<WifiInfoElement>
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var timestamp: Int64
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var supportedWifiCategory: WifiCategory
|
||||
|
||||
@!APILevel[since: "22", syscap: "SystemCapability.Communication.WiFi.STA"]
|
||||
@!APILevel[
|
||||
since: "22",
|
||||
syscap: "SystemCapability.Communication.WiFi.STA"
|
||||
]
|
||||
public var isHiLinkNetwork: Bool
|
||||
|
||||
public init() {
|
||||
@@ -341,4 +595,4 @@ public class WifiScanInfo {
|
||||
this.supportedWifiCategory = WifiCategory.Default
|
||||
this.isHiLinkNetwork = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user