s6-0day/source/Sources/App/Hacks/Protob.swift

18 lines
403 B
Swift
Raw Normal View History

2022-11-18 09:06:38 +01:00
import Foundation
struct RequestData {
var action: Action = .send
var content: String?
var from: String?
var to: String?
init(serializedData: Data) throws {
let d = try ReqData(serializedData: serializedData)
action = d.action
if d.content != "" { content = d.content }
if d.from != "" { from = d.from }
if d.to != "" { to = d.to }
}
}