Private
Public Access
1
0

Settings, no password yet

This commit is contained in:
2025-08-25 00:13:55 -07:00
parent f0029d02e1
commit f0fd738935
5 changed files with 173 additions and 3 deletions

View File

@@ -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