Skip to content

Commit 2354235

Browse files
committed
Updated dependencies
1 parent 267f462 commit 2354235

32 files changed

Lines changed: 62 additions & 50 deletions

Package.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ let package = Package(
2020
url: "https://github.com/PureSwift/Bluetooth.git",
2121
.branch("master")
2222
),
23-
.package(
24-
url: "https://github.com/PureSwift/swift-system.git",
25-
.branch("master")
26-
),
2723
.package(
2824
url: "https://github.com/PureSwift/Socket.git",
2925
.branch("main")
@@ -42,10 +38,6 @@ let package = Package(
4238
package: "Bluetooth"
4339
),
4440
"CBluetoothLinux",
45-
.product(
46-
name: "SystemPackage",
47-
package: "swift-system"
48-
),
4941
"Socket"
5042
]
5143
),

Sources/BluetoothLinux/BNEP/IOCTL/BNEPIO.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import SystemPackage
9+
import Socket
910

1011
/// Bluetooth BNEP `ioctl` requests
1112
@frozen

Sources/BluetoothLinux/CMTP/IOCTL/CMTPIO.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import SystemPackage
9+
import Socket
910

1011
/// Bluetooth CMTP `ioctl` requests
1112
@frozen

Sources/BluetoothLinux/HCI/HCIFileDescriptor.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ internal extension Socket {
181181
}
182182
}
183183

184-
internal extension FileDescriptor {
184+
internal extension SocketDescriptor {
185185

186186
/// Creates an HCI socket binded to the specified address.
187187
@usableFromInline
188188
static func hci(
189189
_ address: HCISocketAddress,
190190
flags: SocketFlags = [.closeOnExec]
191-
) throws -> FileDescriptor {
191+
) throws -> SocketDescriptor {
192192
try bluetooth(
193193
.hci,
194194
bind: address,

Sources/BluetoothLinux/HCI/HCISocketOption.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Bluetooth
99
import BluetoothHCI
10-
import SystemPackage
10+
import Socket
1111

1212
/// Bluetooth HCI Socket Option Identifier
1313
public enum HCISocketOption: Int32, SocketOptionID {

Sources/BluetoothLinux/HCI/HostController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ public final class HostController: BluetoothHostControllerInterface {
3838
device: id,
3939
channel: .raw
4040
)
41-
let fileDescriptor = try FileDescriptor.hci(address, flags: [.closeOnExec, .nonBlocking])
41+
let fileDescriptor = try SocketDescriptor.hci(address, flags: [.closeOnExec, .nonBlocking])
4242
self.id = id
4343
self.socket = await Socket(fileDescriptor: fileDescriptor)
4444
}
4545

4646
/// Initializes the Bluetooth controller with the specified address.
4747
public convenience init(address: BluetoothAddress) async throws {
4848
// open socket to query devices with ioctl()`
49-
let fileDescriptor = try FileDescriptor.bluetooth(.hci, flags: [.closeOnExec])
49+
let fileDescriptor = try SocketDescriptor.bluetooth(.hci, flags: [.closeOnExec])
5050
guard let deviceInfo = try fileDescriptor.closeAfter({
5151
try fileDescriptor.deviceList().first(where: {
5252
try fileDescriptor.deviceInformation(for: $0.id).address == address
@@ -63,7 +63,7 @@ internal extension HostController {
6363

6464
@usableFromInline
6565
static func loadDevices() throws -> HostControllerIO.DeviceList {
66-
let fileDescriptor = try FileDescriptor.bluetooth(.hci, flags: [.closeOnExec])
66+
let fileDescriptor = try SocketDescriptor.bluetooth(.hci, flags: [.closeOnExec])
6767
defer { try? fileDescriptor.close() }
6868
return try fileDescriptor.deviceList()
6969
}

Sources/BluetoothLinux/HCI/IOCTL/HCIDeviceDown.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import SystemPackage
9+
import Socket
910

1011
public extension HostControllerIO {
1112

@@ -29,7 +30,7 @@ public extension HostControllerIO {
2930

3031
// MARK: - File Descriptor
3132

32-
internal extension FileDescriptor {
33+
internal extension SocketDescriptor {
3334

3435
@usableFromInline
3536
func deviceDown(for id: HostController.ID) throws {
@@ -43,7 +44,7 @@ public extension HostController {
4344

4445
/// Disable the HCI device.
4546
static func disable(device id: HostController.ID) throws {
46-
let fileDescriptor = try FileDescriptor.bluetooth(.hci, flags: [.closeOnExec])
47+
let fileDescriptor = try SocketDescriptor.bluetooth(.hci, flags: [.closeOnExec])
4748
try fileDescriptor.closeAfter {
4849
try fileDescriptor.deviceDown(for: id)
4950
}

Sources/BluetoothLinux/HCI/IOCTL/HCIDeviceInformation.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import Bluetooth
99
import SystemPackage
10+
import Socket
1011

1112
public extension HostControllerIO {
1213

@@ -57,7 +58,7 @@ public extension HostControllerIO.DeviceInformation {
5758

5859
// MARK: - File Descriptor
5960

60-
internal extension FileDescriptor {
61+
internal extension SocketDescriptor {
6162

6263
@usableFromInline
6364
func deviceInformation(for id: HostController.ID) throws -> HostControllerIO.DeviceInformation {
@@ -73,7 +74,7 @@ public extension HostController {
7374

7475
/// Get device information.
7576
static func deviceInformation(for id: HostController.ID) throws -> HostControllerIO.DeviceInformation {
76-
let fileDescriptor = try FileDescriptor.bluetooth(.hci, flags: [.closeOnExec])
77+
let fileDescriptor = try SocketDescriptor.bluetooth(.hci, flags: [.closeOnExec])
7778
return try fileDescriptor.closeAfter {
7879
try fileDescriptor.deviceInformation(for: id)
7980
}

Sources/BluetoothLinux/HCI/IOCTL/HCIDeviceList.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import Bluetooth
99
import SystemPackage
10+
import Socket
1011

1112
public extension HostControllerIO {
1213

@@ -111,7 +112,7 @@ public extension HostControllerIO.DeviceList {
111112

112113
// MARK: - File Descriptor
113114

114-
internal extension FileDescriptor {
115+
internal extension SocketDescriptor {
115116

116117
/// List all HCI devices.
117118
@usableFromInline
@@ -128,7 +129,7 @@ public extension HostController {
128129

129130
/// Get device information.
130131
static func deviceList(count: Int = CInterop.HCIDeviceList.capacity) throws -> HostControllerIO.DeviceList {
131-
let fileDescriptor = try FileDescriptor.bluetooth(.hci, flags: [.closeOnExec])
132+
let fileDescriptor = try SocketDescriptor.bluetooth(.hci, flags: [.closeOnExec])
132133
return try fileDescriptor.closeAfter {
133134
try fileDescriptor.deviceList(count: count)
134135
}

Sources/BluetoothLinux/HCI/IOCTL/HCIDeviceUp.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import SystemPackage
9+
import Socket
910

1011
public extension HostControllerIO {
1112

@@ -29,7 +30,7 @@ public extension HostControllerIO {
2930

3031
// MARK: - File Descriptor
3132

32-
internal extension FileDescriptor {
33+
internal extension SocketDescriptor {
3334

3435
@usableFromInline
3536
func deviceUp(for id: HostController.ID) throws {
@@ -43,7 +44,7 @@ public extension HostController {
4344

4445
/// Open and initialize HCI device.
4546
static func enable(device id: HostController.ID) throws {
46-
let fileDescriptor = try FileDescriptor.bluetooth(.hci, flags: [.closeOnExec])
47+
let fileDescriptor = try SocketDescriptor.bluetooth(.hci, flags: [.closeOnExec])
4748
try fileDescriptor.closeAfter {
4849
try fileDescriptor.deviceUp(for: id)
4950
}

0 commit comments

Comments
 (0)