| 1 | package guestos |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | type MacLoginRequest struct { |
| 7 | Action string `json:"action"` |
| 8 | Session string `json:"session,omitempty"` |
| 9 | Setup bool `json:"initial_setup,omitempty"` |
| 10 | Maintenance string `json:"maintenance,omitempty"` |
| 11 | Geometry string `json:"geometry,omitempty"` |
| 12 | Code int `json:"code"` |
| 13 | Shift bool `json:"shift"` |
| 14 | X int `json:"x"` |
| 15 | Y int `json:"y"` |
| 16 | DeltaX int `json:"delta_x,omitempty"` |
| 17 | DeltaY int `json:"delta_y,omitempty"` |
| 18 | Password string `json:"password,omitempty"` |
| 19 | } |
| 20 | type MacLoginReply struct { |
| 21 | MIME string `json:"mime,omitempty"` |
| 22 | Session string `json:"session,omitempty"` |
| 23 | Image []byte `json:"image,omitempty"` |
| 24 | Error string `json:"error,omitempty"` |
| 25 | Closed bool `json:"closed,omitempty"` |
| 26 | Geometry string `json:"geometry,omitempty"` |
| 27 | Region []int `json:"region,omitempty"` |
| 28 | Recovery string `json:"recovery,omitempty"` |
| 29 | Administrator string `json:"administrator,omitempty"` |
| 30 | MaintenanceVersion int `json:"maintenance_version,omitempty"` |
| 31 | } |
| 32 | |
| 33 | func ValidMacMaintenancePurpose(value string) bool { |
| 34 | return value == "projects" || value == "screen" || value == "input" |
| 35 | } |