mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-22 14:26:01 +00:00
Refactoring
This commit is contained in:
1 parent
13716f41e2
commit
fb7dda8824
7 files changed
+244
-222
No files matched your search
@@ -470,22 +470,15 @@ class OutboundNearbyConnection: NearbyConnection {
|
||||
private static func sanitizeFileName(name: String) -> String {
|
||||
return name.replacingOccurrences(of: "[\\/\\\\?%\\*:\\|\"<>=]", with: "_", options: .regularExpression)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private struct OutgoingFileTransfer {
|
||||
let url: URL
|
||||
let payloadID: Int64
|
||||
let handle: FileHandle?
|
||||
let totalBytes: Int64
|
||||
var currentOffset: Int64
|
||||
}
|
||||
|
||||
|
||||
protocol OutboundNearbyConnectionDelegate {
|
||||
func outboundConnectionWasEstablished(connection: OutboundNearbyConnection)
|
||||
func outboundConnection(connection: OutboundNearbyConnection, transferProgress: Double)
|
||||
func outboundConnectionTransferAccepted(connection: OutboundNearbyConnection)
|
||||
func outboundConnection(connection: OutboundNearbyConnection, failedWithError: Error)
|
||||
func outboundConnectionTransferFinished(connection: OutboundNearbyConnection)
|
||||
|
||||
|
||||
// -- MARK: - Internal Data Model
|
||||
|
||||
private struct OutgoingFileTransfer {
|
||||
let url: URL
|
||||
let payloadID: Int64
|
||||
let handle: FileHandle?
|
||||
let totalBytes: Int64
|
||||
var currentOffset: Int64
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user