mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
1065 lines
36 KiB
Swift
1065 lines
36 KiB
Swift
// DO NOT EDIT.
|
|
// swift-format-ignore-file
|
|
// swiftlint:disable all
|
|
//
|
|
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
|
// Source: meshtastic/device_ui.proto
|
|
//
|
|
// For information on using the generated types, please see the documentation:
|
|
// https://github.com/apple/swift-protobuf/
|
|
|
|
import Foundation
|
|
import SwiftProtobuf
|
|
|
|
// If the compiler emits an error on this type, it is because this file
|
|
// was generated by a version of the `protoc` Swift plug-in that is
|
|
// incompatible with the version of SwiftProtobuf to which you are linking.
|
|
// Please ensure that you are building against the same version of the API
|
|
// that was used to generate this file.
|
|
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
|
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
|
typealias Version = _2
|
|
}
|
|
|
|
public enum CompassMode: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|
public typealias RawValue = Int
|
|
|
|
///
|
|
/// Compass with dynamic ring and heading
|
|
case dynamic // = 0
|
|
|
|
///
|
|
/// Compass with fixed ring and heading
|
|
case fixedRing // = 1
|
|
|
|
///
|
|
/// Compass with heading and freeze option
|
|
case freezeHeading // = 2
|
|
case UNRECOGNIZED(Int)
|
|
|
|
public init() {
|
|
self = .dynamic
|
|
}
|
|
|
|
public init?(rawValue: Int) {
|
|
switch rawValue {
|
|
case 0: self = .dynamic
|
|
case 1: self = .fixedRing
|
|
case 2: self = .freezeHeading
|
|
default: self = .UNRECOGNIZED(rawValue)
|
|
}
|
|
}
|
|
|
|
public var rawValue: Int {
|
|
switch self {
|
|
case .dynamic: return 0
|
|
case .fixedRing: return 1
|
|
case .freezeHeading: return 2
|
|
case .UNRECOGNIZED(let i): return i
|
|
}
|
|
}
|
|
|
|
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
|
public static let allCases: [CompassMode] = [
|
|
.dynamic,
|
|
.fixedRing,
|
|
.freezeHeading,
|
|
]
|
|
|
|
}
|
|
|
|
public enum Theme: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|
public typealias RawValue = Int
|
|
|
|
///
|
|
/// Dark
|
|
case dark // = 0
|
|
|
|
///
|
|
/// Light
|
|
case light // = 1
|
|
|
|
///
|
|
/// Red
|
|
case red // = 2
|
|
case UNRECOGNIZED(Int)
|
|
|
|
public init() {
|
|
self = .dark
|
|
}
|
|
|
|
public init?(rawValue: Int) {
|
|
switch rawValue {
|
|
case 0: self = .dark
|
|
case 1: self = .light
|
|
case 2: self = .red
|
|
default: self = .UNRECOGNIZED(rawValue)
|
|
}
|
|
}
|
|
|
|
public var rawValue: Int {
|
|
switch self {
|
|
case .dark: return 0
|
|
case .light: return 1
|
|
case .red: return 2
|
|
case .UNRECOGNIZED(let i): return i
|
|
}
|
|
}
|
|
|
|
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
|
public static let allCases: [Theme] = [
|
|
.dark,
|
|
.light,
|
|
.red,
|
|
]
|
|
|
|
}
|
|
|
|
///
|
|
/// Localization
|
|
public enum Language: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|
public typealias RawValue = Int
|
|
|
|
///
|
|
/// English
|
|
case english // = 0
|
|
|
|
///
|
|
/// French
|
|
case french // = 1
|
|
|
|
///
|
|
/// German
|
|
case german // = 2
|
|
|
|
///
|
|
/// Italian
|
|
case italian // = 3
|
|
|
|
///
|
|
/// Portuguese
|
|
case portuguese // = 4
|
|
|
|
///
|
|
/// Spanish
|
|
case spanish // = 5
|
|
|
|
///
|
|
/// Swedish
|
|
case swedish // = 6
|
|
|
|
///
|
|
/// Finnish
|
|
case finnish // = 7
|
|
|
|
///
|
|
/// Polish
|
|
case polish // = 8
|
|
|
|
///
|
|
/// Turkish
|
|
case turkish // = 9
|
|
|
|
///
|
|
/// Serbian
|
|
case serbian // = 10
|
|
|
|
///
|
|
/// Russian
|
|
case russian // = 11
|
|
|
|
///
|
|
/// Dutch
|
|
case dutch // = 12
|
|
|
|
///
|
|
/// Greek
|
|
case greek // = 13
|
|
|
|
///
|
|
/// Norwegian
|
|
case norwegian // = 14
|
|
|
|
///
|
|
/// Slovenian
|
|
case slovenian // = 15
|
|
|
|
///
|
|
/// Ukrainian
|
|
case ukrainian // = 16
|
|
|
|
///
|
|
/// Bulgarian
|
|
case bulgarian // = 17
|
|
|
|
///
|
|
/// Czech
|
|
case czech // = 18
|
|
|
|
///
|
|
/// Danish
|
|
case danish // = 19
|
|
|
|
///
|
|
/// Simplified Chinese (experimental)
|
|
case simplifiedChinese // = 30
|
|
|
|
///
|
|
/// Traditional Chinese (experimental)
|
|
case traditionalChinese // = 31
|
|
case UNRECOGNIZED(Int)
|
|
|
|
public init() {
|
|
self = .english
|
|
}
|
|
|
|
public init?(rawValue: Int) {
|
|
switch rawValue {
|
|
case 0: self = .english
|
|
case 1: self = .french
|
|
case 2: self = .german
|
|
case 3: self = .italian
|
|
case 4: self = .portuguese
|
|
case 5: self = .spanish
|
|
case 6: self = .swedish
|
|
case 7: self = .finnish
|
|
case 8: self = .polish
|
|
case 9: self = .turkish
|
|
case 10: self = .serbian
|
|
case 11: self = .russian
|
|
case 12: self = .dutch
|
|
case 13: self = .greek
|
|
case 14: self = .norwegian
|
|
case 15: self = .slovenian
|
|
case 16: self = .ukrainian
|
|
case 17: self = .bulgarian
|
|
case 18: self = .czech
|
|
case 19: self = .danish
|
|
case 30: self = .simplifiedChinese
|
|
case 31: self = .traditionalChinese
|
|
default: self = .UNRECOGNIZED(rawValue)
|
|
}
|
|
}
|
|
|
|
public var rawValue: Int {
|
|
switch self {
|
|
case .english: return 0
|
|
case .french: return 1
|
|
case .german: return 2
|
|
case .italian: return 3
|
|
case .portuguese: return 4
|
|
case .spanish: return 5
|
|
case .swedish: return 6
|
|
case .finnish: return 7
|
|
case .polish: return 8
|
|
case .turkish: return 9
|
|
case .serbian: return 10
|
|
case .russian: return 11
|
|
case .dutch: return 12
|
|
case .greek: return 13
|
|
case .norwegian: return 14
|
|
case .slovenian: return 15
|
|
case .ukrainian: return 16
|
|
case .bulgarian: return 17
|
|
case .czech: return 18
|
|
case .danish: return 19
|
|
case .simplifiedChinese: return 30
|
|
case .traditionalChinese: return 31
|
|
case .UNRECOGNIZED(let i): return i
|
|
}
|
|
}
|
|
|
|
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
|
public static let allCases: [Language] = [
|
|
.english,
|
|
.french,
|
|
.german,
|
|
.italian,
|
|
.portuguese,
|
|
.spanish,
|
|
.swedish,
|
|
.finnish,
|
|
.polish,
|
|
.turkish,
|
|
.serbian,
|
|
.russian,
|
|
.dutch,
|
|
.greek,
|
|
.norwegian,
|
|
.slovenian,
|
|
.ukrainian,
|
|
.bulgarian,
|
|
.czech,
|
|
.danish,
|
|
.simplifiedChinese,
|
|
.traditionalChinese,
|
|
]
|
|
|
|
}
|
|
|
|
public struct DeviceUIConfig: @unchecked Sendable {
|
|
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
// methods supported on all messages.
|
|
|
|
///
|
|
/// A version integer used to invalidate saved files when we make incompatible changes.
|
|
public var version: UInt32 {
|
|
get {return _storage._version}
|
|
set {_uniqueStorage()._version = newValue}
|
|
}
|
|
|
|
///
|
|
/// TFT display brightness 1..255
|
|
public var screenBrightness: UInt32 {
|
|
get {return _storage._screenBrightness}
|
|
set {_uniqueStorage()._screenBrightness = newValue}
|
|
}
|
|
|
|
///
|
|
/// Screen timeout 0..900
|
|
public var screenTimeout: UInt32 {
|
|
get {return _storage._screenTimeout}
|
|
set {_uniqueStorage()._screenTimeout = newValue}
|
|
}
|
|
|
|
///
|
|
/// Screen/Settings lock enabled
|
|
public var screenLock: Bool {
|
|
get {return _storage._screenLock}
|
|
set {_uniqueStorage()._screenLock = newValue}
|
|
}
|
|
|
|
public var settingsLock: Bool {
|
|
get {return _storage._settingsLock}
|
|
set {_uniqueStorage()._settingsLock = newValue}
|
|
}
|
|
|
|
public var pinCode: UInt32 {
|
|
get {return _storage._pinCode}
|
|
set {_uniqueStorage()._pinCode = newValue}
|
|
}
|
|
|
|
///
|
|
/// Color theme
|
|
public var theme: Theme {
|
|
get {return _storage._theme}
|
|
set {_uniqueStorage()._theme = newValue}
|
|
}
|
|
|
|
///
|
|
/// Audible message, banner and ring tone
|
|
public var alertEnabled: Bool {
|
|
get {return _storage._alertEnabled}
|
|
set {_uniqueStorage()._alertEnabled = newValue}
|
|
}
|
|
|
|
public var bannerEnabled: Bool {
|
|
get {return _storage._bannerEnabled}
|
|
set {_uniqueStorage()._bannerEnabled = newValue}
|
|
}
|
|
|
|
public var ringToneID: UInt32 {
|
|
get {return _storage._ringToneID}
|
|
set {_uniqueStorage()._ringToneID = newValue}
|
|
}
|
|
|
|
///
|
|
/// Localization
|
|
public var language: Language {
|
|
get {return _storage._language}
|
|
set {_uniqueStorage()._language = newValue}
|
|
}
|
|
|
|
///
|
|
/// Node list filter
|
|
public var nodeFilter: NodeFilter {
|
|
get {return _storage._nodeFilter ?? NodeFilter()}
|
|
set {_uniqueStorage()._nodeFilter = newValue}
|
|
}
|
|
/// Returns true if `nodeFilter` has been explicitly set.
|
|
public var hasNodeFilter: Bool {return _storage._nodeFilter != nil}
|
|
/// Clears the value of `nodeFilter`. Subsequent reads from it will return its default value.
|
|
public mutating func clearNodeFilter() {_uniqueStorage()._nodeFilter = nil}
|
|
|
|
///
|
|
/// Node list highlightening
|
|
public var nodeHighlight: NodeHighlight {
|
|
get {return _storage._nodeHighlight ?? NodeHighlight()}
|
|
set {_uniqueStorage()._nodeHighlight = newValue}
|
|
}
|
|
/// Returns true if `nodeHighlight` has been explicitly set.
|
|
public var hasNodeHighlight: Bool {return _storage._nodeHighlight != nil}
|
|
/// Clears the value of `nodeHighlight`. Subsequent reads from it will return its default value.
|
|
public mutating func clearNodeHighlight() {_uniqueStorage()._nodeHighlight = nil}
|
|
|
|
///
|
|
/// 8 integers for screen calibration data
|
|
public var calibrationData: Data {
|
|
get {return _storage._calibrationData}
|
|
set {_uniqueStorage()._calibrationData = newValue}
|
|
}
|
|
|
|
///
|
|
/// Map related data
|
|
public var mapData: Map {
|
|
get {return _storage._mapData ?? Map()}
|
|
set {_uniqueStorage()._mapData = newValue}
|
|
}
|
|
/// Returns true if `mapData` has been explicitly set.
|
|
public var hasMapData: Bool {return _storage._mapData != nil}
|
|
/// Clears the value of `mapData`. Subsequent reads from it will return its default value.
|
|
public mutating func clearMapData() {_uniqueStorage()._mapData = nil}
|
|
|
|
///
|
|
/// Compass mode
|
|
public var compassMode: CompassMode {
|
|
get {return _storage._compassMode}
|
|
set {_uniqueStorage()._compassMode = newValue}
|
|
}
|
|
|
|
///
|
|
/// RGB color for BaseUI
|
|
/// 0xRRGGBB format, e.g. 0xFF0000 for red
|
|
public var screenRgbColor: UInt32 {
|
|
get {return _storage._screenRgbColor}
|
|
set {_uniqueStorage()._screenRgbColor = newValue}
|
|
}
|
|
|
|
///
|
|
/// Clockface analog style
|
|
/// true for analog clockface, false for digital clockface
|
|
public var isClockfaceAnalog: Bool {
|
|
get {return _storage._isClockfaceAnalog}
|
|
set {_uniqueStorage()._isClockfaceAnalog = newValue}
|
|
}
|
|
|
|
///
|
|
/// How the GPS coordinates are formatted on the OLED screen.
|
|
public var gpsFormat: DeviceUIConfig.GpsCoordinateFormat {
|
|
get {return _storage._gpsFormat}
|
|
set {_uniqueStorage()._gpsFormat = newValue}
|
|
}
|
|
|
|
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
///
|
|
/// How the GPS coordinates are displayed on the OLED screen.
|
|
public enum GpsCoordinateFormat: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|
public typealias RawValue = Int
|
|
|
|
///
|
|
/// GPS coordinates are displayed in the normal decimal degrees format:
|
|
/// DD.DDDDDD DDD.DDDDDD
|
|
case dec // = 0
|
|
|
|
///
|
|
/// GPS coordinates are displayed in the degrees minutes seconds format:
|
|
/// DD°MM'SS"C DDD°MM'SS"C, where C is the compass point representing the locations quadrant
|
|
case dms // = 1
|
|
|
|
///
|
|
/// Universal Transverse Mercator format:
|
|
/// ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing
|
|
case utm // = 2
|
|
|
|
///
|
|
/// Military Grid Reference System format:
|
|
/// ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square,
|
|
/// E is easting, N is northing
|
|
case mgrs // = 3
|
|
|
|
///
|
|
/// Open Location Code (aka Plus Codes).
|
|
case olc // = 4
|
|
|
|
///
|
|
/// Ordnance Survey Grid Reference (the National Grid System of the UK).
|
|
/// Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square,
|
|
/// E is the easting, N is the northing
|
|
case osgr // = 5
|
|
|
|
///
|
|
/// Maidenhead Locator System
|
|
/// Described here: https://en.wikipedia.org/wiki/Maidenhead_Locator_System
|
|
case mls // = 6
|
|
case UNRECOGNIZED(Int)
|
|
|
|
public init() {
|
|
self = .dec
|
|
}
|
|
|
|
public init?(rawValue: Int) {
|
|
switch rawValue {
|
|
case 0: self = .dec
|
|
case 1: self = .dms
|
|
case 2: self = .utm
|
|
case 3: self = .mgrs
|
|
case 4: self = .olc
|
|
case 5: self = .osgr
|
|
case 6: self = .mls
|
|
default: self = .UNRECOGNIZED(rawValue)
|
|
}
|
|
}
|
|
|
|
public var rawValue: Int {
|
|
switch self {
|
|
case .dec: return 0
|
|
case .dms: return 1
|
|
case .utm: return 2
|
|
case .mgrs: return 3
|
|
case .olc: return 4
|
|
case .osgr: return 5
|
|
case .mls: return 6
|
|
case .UNRECOGNIZED(let i): return i
|
|
}
|
|
}
|
|
|
|
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
|
public static let allCases: [DeviceUIConfig.GpsCoordinateFormat] = [
|
|
.dec,
|
|
.dms,
|
|
.utm,
|
|
.mgrs,
|
|
.olc,
|
|
.osgr,
|
|
.mls,
|
|
]
|
|
|
|
}
|
|
|
|
public init() {}
|
|
|
|
fileprivate var _storage = _StorageClass.defaultInstance
|
|
}
|
|
|
|
public struct NodeFilter: Sendable {
|
|
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
// methods supported on all messages.
|
|
|
|
///
|
|
/// Filter unknown nodes
|
|
public var unknownSwitch: Bool = false
|
|
|
|
///
|
|
/// Filter offline nodes
|
|
public var offlineSwitch: Bool = false
|
|
|
|
///
|
|
/// Filter nodes w/o public key
|
|
public var publicKeySwitch: Bool = false
|
|
|
|
///
|
|
/// Filter based on hops away
|
|
public var hopsAway: Int32 = 0
|
|
|
|
///
|
|
/// Filter nodes w/o position
|
|
public var positionSwitch: Bool = false
|
|
|
|
///
|
|
/// Filter nodes by matching name string
|
|
public var nodeName: String = String()
|
|
|
|
///
|
|
/// Filter based on channel
|
|
public var channel: Int32 = 0
|
|
|
|
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
public init() {}
|
|
}
|
|
|
|
public struct NodeHighlight: Sendable {
|
|
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
// methods supported on all messages.
|
|
|
|
///
|
|
/// Hightlight nodes w/ active chat
|
|
public var chatSwitch: Bool = false
|
|
|
|
///
|
|
/// Highlight nodes w/ position
|
|
public var positionSwitch: Bool = false
|
|
|
|
///
|
|
/// Highlight nodes w/ telemetry data
|
|
public var telemetrySwitch: Bool = false
|
|
|
|
///
|
|
/// Highlight nodes w/ iaq data
|
|
public var iaqSwitch: Bool = false
|
|
|
|
///
|
|
/// Highlight nodes by matching name string
|
|
public var nodeName: String = String()
|
|
|
|
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
public init() {}
|
|
}
|
|
|
|
public struct GeoPoint: Sendable {
|
|
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
// methods supported on all messages.
|
|
|
|
///
|
|
/// Zoom level
|
|
public var zoom: Int32 = 0
|
|
|
|
///
|
|
/// Coordinate: latitude
|
|
public var latitude: Int32 = 0
|
|
|
|
///
|
|
/// Coordinate: longitude
|
|
public var longitude: Int32 = 0
|
|
|
|
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
public init() {}
|
|
}
|
|
|
|
public struct Map: Sendable {
|
|
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
// methods supported on all messages.
|
|
|
|
///
|
|
/// Home coordinates
|
|
public var home: GeoPoint {
|
|
get {return _home ?? GeoPoint()}
|
|
set {_home = newValue}
|
|
}
|
|
/// Returns true if `home` has been explicitly set.
|
|
public var hasHome: Bool {return self._home != nil}
|
|
/// Clears the value of `home`. Subsequent reads from it will return its default value.
|
|
public mutating func clearHome() {self._home = nil}
|
|
|
|
///
|
|
/// Map tile style
|
|
public var style: String = String()
|
|
|
|
///
|
|
/// Map scroll follows GPS
|
|
public var followGps: Bool = false
|
|
|
|
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
public init() {}
|
|
|
|
fileprivate var _home: GeoPoint? = nil
|
|
}
|
|
|
|
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
|
|
|
fileprivate let _protobuf_package = "meshtastic"
|
|
|
|
extension CompassMode: SwiftProtobuf._ProtoNameProviding {
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DYNAMIC\0\u{1}FIXED_RING\0\u{1}FREEZE_HEADING\0")
|
|
}
|
|
|
|
extension Theme: SwiftProtobuf._ProtoNameProviding {
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DARK\0\u{1}LIGHT\0\u{1}RED\0")
|
|
}
|
|
|
|
extension Language: SwiftProtobuf._ProtoNameProviding {
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0ENGLISH\0\u{1}FRENCH\0\u{1}GERMAN\0\u{1}ITALIAN\0\u{1}PORTUGUESE\0\u{1}SPANISH\0\u{1}SWEDISH\0\u{1}FINNISH\0\u{1}POLISH\0\u{1}TURKISH\0\u{1}SERBIAN\0\u{1}RUSSIAN\0\u{1}DUTCH\0\u{1}GREEK\0\u{1}NORWEGIAN\0\u{1}SLOVENIAN\0\u{1}UKRAINIAN\0\u{1}BULGARIAN\0\u{1}CZECH\0\u{1}DANISH\0\u{2}\u{b}SIMPLIFIED_CHINESE\0\u{1}TRADITIONAL_CHINESE\0")
|
|
}
|
|
|
|
extension DeviceUIConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".DeviceUIConfig"
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{3}screen_brightness\0\u{3}screen_timeout\0\u{3}screen_lock\0\u{3}settings_lock\0\u{3}pin_code\0\u{1}theme\0\u{3}alert_enabled\0\u{3}banner_enabled\0\u{3}ring_tone_id\0\u{1}language\0\u{3}node_filter\0\u{3}node_highlight\0\u{3}calibration_data\0\u{3}map_data\0\u{3}compass_mode\0\u{3}screen_rgb_color\0\u{3}is_clockface_analog\0\u{3}gps_format\0")
|
|
|
|
fileprivate class _StorageClass {
|
|
var _version: UInt32 = 0
|
|
var _screenBrightness: UInt32 = 0
|
|
var _screenTimeout: UInt32 = 0
|
|
var _screenLock: Bool = false
|
|
var _settingsLock: Bool = false
|
|
var _pinCode: UInt32 = 0
|
|
var _theme: Theme = .dark
|
|
var _alertEnabled: Bool = false
|
|
var _bannerEnabled: Bool = false
|
|
var _ringToneID: UInt32 = 0
|
|
var _language: Language = .english
|
|
var _nodeFilter: NodeFilter? = nil
|
|
var _nodeHighlight: NodeHighlight? = nil
|
|
var _calibrationData: Data = Data()
|
|
var _mapData: Map? = nil
|
|
var _compassMode: CompassMode = .dynamic
|
|
var _screenRgbColor: UInt32 = 0
|
|
var _isClockfaceAnalog: Bool = false
|
|
var _gpsFormat: DeviceUIConfig.GpsCoordinateFormat = .dec
|
|
|
|
// This property is used as the initial default value for new instances of the type.
|
|
// The type itself is protecting the reference to its storage via CoW semantics.
|
|
// This will force a copy to be made of this reference when the first mutation occurs;
|
|
// hence, it is safe to mark this as `nonisolated(unsafe)`.
|
|
static nonisolated(unsafe) let defaultInstance = _StorageClass()
|
|
|
|
private init() {}
|
|
|
|
init(copying source: _StorageClass) {
|
|
_version = source._version
|
|
_screenBrightness = source._screenBrightness
|
|
_screenTimeout = source._screenTimeout
|
|
_screenLock = source._screenLock
|
|
_settingsLock = source._settingsLock
|
|
_pinCode = source._pinCode
|
|
_theme = source._theme
|
|
_alertEnabled = source._alertEnabled
|
|
_bannerEnabled = source._bannerEnabled
|
|
_ringToneID = source._ringToneID
|
|
_language = source._language
|
|
_nodeFilter = source._nodeFilter
|
|
_nodeHighlight = source._nodeHighlight
|
|
_calibrationData = source._calibrationData
|
|
_mapData = source._mapData
|
|
_compassMode = source._compassMode
|
|
_screenRgbColor = source._screenRgbColor
|
|
_isClockfaceAnalog = source._isClockfaceAnalog
|
|
_gpsFormat = source._gpsFormat
|
|
}
|
|
}
|
|
|
|
fileprivate mutating func _uniqueStorage() -> _StorageClass {
|
|
if !isKnownUniquelyReferenced(&_storage) {
|
|
_storage = _StorageClass(copying: _storage)
|
|
}
|
|
return _storage
|
|
}
|
|
|
|
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
_ = _uniqueStorage()
|
|
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
// The use of inline closures is to circumvent an issue where the compiler
|
|
// allocates stack space for every case branch when no optimizations are
|
|
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
switch fieldNumber {
|
|
case 1: try { try decoder.decodeSingularUInt32Field(value: &_storage._version) }()
|
|
case 2: try { try decoder.decodeSingularUInt32Field(value: &_storage._screenBrightness) }()
|
|
case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._screenTimeout) }()
|
|
case 4: try { try decoder.decodeSingularBoolField(value: &_storage._screenLock) }()
|
|
case 5: try { try decoder.decodeSingularBoolField(value: &_storage._settingsLock) }()
|
|
case 6: try { try decoder.decodeSingularUInt32Field(value: &_storage._pinCode) }()
|
|
case 7: try { try decoder.decodeSingularEnumField(value: &_storage._theme) }()
|
|
case 8: try { try decoder.decodeSingularBoolField(value: &_storage._alertEnabled) }()
|
|
case 9: try { try decoder.decodeSingularBoolField(value: &_storage._bannerEnabled) }()
|
|
case 10: try { try decoder.decodeSingularUInt32Field(value: &_storage._ringToneID) }()
|
|
case 11: try { try decoder.decodeSingularEnumField(value: &_storage._language) }()
|
|
case 12: try { try decoder.decodeSingularMessageField(value: &_storage._nodeFilter) }()
|
|
case 13: try { try decoder.decodeSingularMessageField(value: &_storage._nodeHighlight) }()
|
|
case 14: try { try decoder.decodeSingularBytesField(value: &_storage._calibrationData) }()
|
|
case 15: try { try decoder.decodeSingularMessageField(value: &_storage._mapData) }()
|
|
case 16: try { try decoder.decodeSingularEnumField(value: &_storage._compassMode) }()
|
|
case 17: try { try decoder.decodeSingularUInt32Field(value: &_storage._screenRgbColor) }()
|
|
case 18: try { try decoder.decodeSingularBoolField(value: &_storage._isClockfaceAnalog) }()
|
|
case 19: try { try decoder.decodeSingularEnumField(value: &_storage._gpsFormat) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
|
|
// The use of inline closures is to circumvent an issue where the compiler
|
|
// allocates stack space for every if/case branch local when no optimizations
|
|
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
// https://github.com/apple/swift-protobuf/issues/1182
|
|
if _storage._version != 0 {
|
|
try visitor.visitSingularUInt32Field(value: _storage._version, fieldNumber: 1)
|
|
}
|
|
if _storage._screenBrightness != 0 {
|
|
try visitor.visitSingularUInt32Field(value: _storage._screenBrightness, fieldNumber: 2)
|
|
}
|
|
if _storage._screenTimeout != 0 {
|
|
try visitor.visitSingularUInt32Field(value: _storage._screenTimeout, fieldNumber: 3)
|
|
}
|
|
if _storage._screenLock != false {
|
|
try visitor.visitSingularBoolField(value: _storage._screenLock, fieldNumber: 4)
|
|
}
|
|
if _storage._settingsLock != false {
|
|
try visitor.visitSingularBoolField(value: _storage._settingsLock, fieldNumber: 5)
|
|
}
|
|
if _storage._pinCode != 0 {
|
|
try visitor.visitSingularUInt32Field(value: _storage._pinCode, fieldNumber: 6)
|
|
}
|
|
if _storage._theme != .dark {
|
|
try visitor.visitSingularEnumField(value: _storage._theme, fieldNumber: 7)
|
|
}
|
|
if _storage._alertEnabled != false {
|
|
try visitor.visitSingularBoolField(value: _storage._alertEnabled, fieldNumber: 8)
|
|
}
|
|
if _storage._bannerEnabled != false {
|
|
try visitor.visitSingularBoolField(value: _storage._bannerEnabled, fieldNumber: 9)
|
|
}
|
|
if _storage._ringToneID != 0 {
|
|
try visitor.visitSingularUInt32Field(value: _storage._ringToneID, fieldNumber: 10)
|
|
}
|
|
if _storage._language != .english {
|
|
try visitor.visitSingularEnumField(value: _storage._language, fieldNumber: 11)
|
|
}
|
|
try { if let v = _storage._nodeFilter {
|
|
try visitor.visitSingularMessageField(value: v, fieldNumber: 12)
|
|
} }()
|
|
try { if let v = _storage._nodeHighlight {
|
|
try visitor.visitSingularMessageField(value: v, fieldNumber: 13)
|
|
} }()
|
|
if !_storage._calibrationData.isEmpty {
|
|
try visitor.visitSingularBytesField(value: _storage._calibrationData, fieldNumber: 14)
|
|
}
|
|
try { if let v = _storage._mapData {
|
|
try visitor.visitSingularMessageField(value: v, fieldNumber: 15)
|
|
} }()
|
|
if _storage._compassMode != .dynamic {
|
|
try visitor.visitSingularEnumField(value: _storage._compassMode, fieldNumber: 16)
|
|
}
|
|
if _storage._screenRgbColor != 0 {
|
|
try visitor.visitSingularUInt32Field(value: _storage._screenRgbColor, fieldNumber: 17)
|
|
}
|
|
if _storage._isClockfaceAnalog != false {
|
|
try visitor.visitSingularBoolField(value: _storage._isClockfaceAnalog, fieldNumber: 18)
|
|
}
|
|
if _storage._gpsFormat != .dec {
|
|
try visitor.visitSingularEnumField(value: _storage._gpsFormat, fieldNumber: 19)
|
|
}
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: DeviceUIConfig, rhs: DeviceUIConfig) -> Bool {
|
|
if lhs._storage !== rhs._storage {
|
|
let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
|
|
let _storage = _args.0
|
|
let rhs_storage = _args.1
|
|
if _storage._version != rhs_storage._version {return false}
|
|
if _storage._screenBrightness != rhs_storage._screenBrightness {return false}
|
|
if _storage._screenTimeout != rhs_storage._screenTimeout {return false}
|
|
if _storage._screenLock != rhs_storage._screenLock {return false}
|
|
if _storage._settingsLock != rhs_storage._settingsLock {return false}
|
|
if _storage._pinCode != rhs_storage._pinCode {return false}
|
|
if _storage._theme != rhs_storage._theme {return false}
|
|
if _storage._alertEnabled != rhs_storage._alertEnabled {return false}
|
|
if _storage._bannerEnabled != rhs_storage._bannerEnabled {return false}
|
|
if _storage._ringToneID != rhs_storage._ringToneID {return false}
|
|
if _storage._language != rhs_storage._language {return false}
|
|
if _storage._nodeFilter != rhs_storage._nodeFilter {return false}
|
|
if _storage._nodeHighlight != rhs_storage._nodeHighlight {return false}
|
|
if _storage._calibrationData != rhs_storage._calibrationData {return false}
|
|
if _storage._mapData != rhs_storage._mapData {return false}
|
|
if _storage._compassMode != rhs_storage._compassMode {return false}
|
|
if _storage._screenRgbColor != rhs_storage._screenRgbColor {return false}
|
|
if _storage._isClockfaceAnalog != rhs_storage._isClockfaceAnalog {return false}
|
|
if _storage._gpsFormat != rhs_storage._gpsFormat {return false}
|
|
return true
|
|
}
|
|
if !storagesAreEqual {return false}
|
|
}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension DeviceUIConfig.GpsCoordinateFormat: SwiftProtobuf._ProtoNameProviding {
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0DEC\0\u{1}DMS\0\u{1}UTM\0\u{1}MGRS\0\u{1}OLC\0\u{1}OSGR\0\u{1}MLS\0")
|
|
}
|
|
|
|
extension NodeFilter: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".NodeFilter"
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}unknown_switch\0\u{3}offline_switch\0\u{3}public_key_switch\0\u{3}hops_away\0\u{3}position_switch\0\u{3}node_name\0\u{1}channel\0")
|
|
|
|
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
// The use of inline closures is to circumvent an issue where the compiler
|
|
// allocates stack space for every case branch when no optimizations are
|
|
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
switch fieldNumber {
|
|
case 1: try { try decoder.decodeSingularBoolField(value: &self.unknownSwitch) }()
|
|
case 2: try { try decoder.decodeSingularBoolField(value: &self.offlineSwitch) }()
|
|
case 3: try { try decoder.decodeSingularBoolField(value: &self.publicKeySwitch) }()
|
|
case 4: try { try decoder.decodeSingularInt32Field(value: &self.hopsAway) }()
|
|
case 5: try { try decoder.decodeSingularBoolField(value: &self.positionSwitch) }()
|
|
case 6: try { try decoder.decodeSingularStringField(value: &self.nodeName) }()
|
|
case 7: try { try decoder.decodeSingularInt32Field(value: &self.channel) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if self.unknownSwitch != false {
|
|
try visitor.visitSingularBoolField(value: self.unknownSwitch, fieldNumber: 1)
|
|
}
|
|
if self.offlineSwitch != false {
|
|
try visitor.visitSingularBoolField(value: self.offlineSwitch, fieldNumber: 2)
|
|
}
|
|
if self.publicKeySwitch != false {
|
|
try visitor.visitSingularBoolField(value: self.publicKeySwitch, fieldNumber: 3)
|
|
}
|
|
if self.hopsAway != 0 {
|
|
try visitor.visitSingularInt32Field(value: self.hopsAway, fieldNumber: 4)
|
|
}
|
|
if self.positionSwitch != false {
|
|
try visitor.visitSingularBoolField(value: self.positionSwitch, fieldNumber: 5)
|
|
}
|
|
if !self.nodeName.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.nodeName, fieldNumber: 6)
|
|
}
|
|
if self.channel != 0 {
|
|
try visitor.visitSingularInt32Field(value: self.channel, fieldNumber: 7)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: NodeFilter, rhs: NodeFilter) -> Bool {
|
|
if lhs.unknownSwitch != rhs.unknownSwitch {return false}
|
|
if lhs.offlineSwitch != rhs.offlineSwitch {return false}
|
|
if lhs.publicKeySwitch != rhs.publicKeySwitch {return false}
|
|
if lhs.hopsAway != rhs.hopsAway {return false}
|
|
if lhs.positionSwitch != rhs.positionSwitch {return false}
|
|
if lhs.nodeName != rhs.nodeName {return false}
|
|
if lhs.channel != rhs.channel {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension NodeHighlight: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".NodeHighlight"
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}chat_switch\0\u{3}position_switch\0\u{3}telemetry_switch\0\u{3}iaq_switch\0\u{3}node_name\0")
|
|
|
|
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
// The use of inline closures is to circumvent an issue where the compiler
|
|
// allocates stack space for every case branch when no optimizations are
|
|
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
switch fieldNumber {
|
|
case 1: try { try decoder.decodeSingularBoolField(value: &self.chatSwitch) }()
|
|
case 2: try { try decoder.decodeSingularBoolField(value: &self.positionSwitch) }()
|
|
case 3: try { try decoder.decodeSingularBoolField(value: &self.telemetrySwitch) }()
|
|
case 4: try { try decoder.decodeSingularBoolField(value: &self.iaqSwitch) }()
|
|
case 5: try { try decoder.decodeSingularStringField(value: &self.nodeName) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if self.chatSwitch != false {
|
|
try visitor.visitSingularBoolField(value: self.chatSwitch, fieldNumber: 1)
|
|
}
|
|
if self.positionSwitch != false {
|
|
try visitor.visitSingularBoolField(value: self.positionSwitch, fieldNumber: 2)
|
|
}
|
|
if self.telemetrySwitch != false {
|
|
try visitor.visitSingularBoolField(value: self.telemetrySwitch, fieldNumber: 3)
|
|
}
|
|
if self.iaqSwitch != false {
|
|
try visitor.visitSingularBoolField(value: self.iaqSwitch, fieldNumber: 4)
|
|
}
|
|
if !self.nodeName.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.nodeName, fieldNumber: 5)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: NodeHighlight, rhs: NodeHighlight) -> Bool {
|
|
if lhs.chatSwitch != rhs.chatSwitch {return false}
|
|
if lhs.positionSwitch != rhs.positionSwitch {return false}
|
|
if lhs.telemetrySwitch != rhs.telemetrySwitch {return false}
|
|
if lhs.iaqSwitch != rhs.iaqSwitch {return false}
|
|
if lhs.nodeName != rhs.nodeName {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension GeoPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".GeoPoint"
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}zoom\0\u{1}latitude\0\u{1}longitude\0")
|
|
|
|
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
// The use of inline closures is to circumvent an issue where the compiler
|
|
// allocates stack space for every case branch when no optimizations are
|
|
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
switch fieldNumber {
|
|
case 1: try { try decoder.decodeSingularInt32Field(value: &self.zoom) }()
|
|
case 2: try { try decoder.decodeSingularInt32Field(value: &self.latitude) }()
|
|
case 3: try { try decoder.decodeSingularInt32Field(value: &self.longitude) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if self.zoom != 0 {
|
|
try visitor.visitSingularInt32Field(value: self.zoom, fieldNumber: 1)
|
|
}
|
|
if self.latitude != 0 {
|
|
try visitor.visitSingularInt32Field(value: self.latitude, fieldNumber: 2)
|
|
}
|
|
if self.longitude != 0 {
|
|
try visitor.visitSingularInt32Field(value: self.longitude, fieldNumber: 3)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: GeoPoint, rhs: GeoPoint) -> Bool {
|
|
if lhs.zoom != rhs.zoom {return false}
|
|
if lhs.latitude != rhs.latitude {return false}
|
|
if lhs.longitude != rhs.longitude {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension Map: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".Map"
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}home\0\u{1}style\0\u{3}follow_gps\0")
|
|
|
|
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
// The use of inline closures is to circumvent an issue where the compiler
|
|
// allocates stack space for every case branch when no optimizations are
|
|
// enabled. https://github.com/apple/swift-protobuf/issues/1034
|
|
switch fieldNumber {
|
|
case 1: try { try decoder.decodeSingularMessageField(value: &self._home) }()
|
|
case 2: try { try decoder.decodeSingularStringField(value: &self.style) }()
|
|
case 3: try { try decoder.decodeSingularBoolField(value: &self.followGps) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
// The use of inline closures is to circumvent an issue where the compiler
|
|
// allocates stack space for every if/case branch local when no optimizations
|
|
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
|
|
// https://github.com/apple/swift-protobuf/issues/1182
|
|
try { if let v = self._home {
|
|
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
} }()
|
|
if !self.style.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.style, fieldNumber: 2)
|
|
}
|
|
if self.followGps != false {
|
|
try visitor.visitSingularBoolField(value: self.followGps, fieldNumber: 3)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: Map, rhs: Map) -> Bool {
|
|
if lhs._home != rhs._home {return false}
|
|
if lhs.style != rhs.style {return false}
|
|
if lhs.followGps != rhs.followGps {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|