Settings, no password yet
This commit is contained in:
@@ -197,6 +197,28 @@ enum Serialized
|
||||
let height: Int?
|
||||
}
|
||||
}
|
||||
|
||||
struct Settings: Decodable
|
||||
{
|
||||
let serverUrl: String
|
||||
let username: String
|
||||
}
|
||||
}
|
||||
|
||||
extension Serialized.Settings: XPCConvertible
|
||||
{
|
||||
static func fromXPC(_ value: xpc_object_t) -> Serialized.Settings? {
|
||||
guard let d = XPCDictionary(value) else { return nil }
|
||||
|
||||
let su: String = d["server_url"] ?? ""
|
||||
let un: String = d["username"] ?? ""
|
||||
|
||||
return Serialized.Settings(
|
||||
serverUrl: su,
|
||||
username: un
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension Serialized.Attachment: XPCConvertible
|
||||
|
||||
Reference in New Issue
Block a user