Update logic to async
This commit is contained in:
@ -3,7 +3,7 @@ import Foundation
|
||||
/**
|
||||
A result from sending a key to the device.
|
||||
*/
|
||||
enum MessageResult: UInt8 {
|
||||
enum MessageResult: UInt8, Error {
|
||||
|
||||
/// Text content was received, although binary data was expected
|
||||
case textReceived = 1
|
||||
@ -48,6 +48,8 @@ enum MessageResult: UInt8 {
|
||||
case invalidUrlParameter = 20
|
||||
|
||||
case invalidResponseAuthentication = 21
|
||||
|
||||
case invalidDeviceResponse = 22
|
||||
}
|
||||
|
||||
extension MessageResult: CustomStringConvertible {
|
||||
@ -84,6 +86,8 @@ extension MessageResult: CustomStringConvertible {
|
||||
return "The url parameter could not be found"
|
||||
case .invalidResponseAuthentication:
|
||||
return "The response could not be authenticated"
|
||||
case .invalidDeviceResponse:
|
||||
return "The device responded with invalid data"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user