Meshtastic-Apple/MeshtasticProtobufs/Sources/meshtastic/device_ui.pb.swift
Garth Vander Houwen b30dc8645a
2.7.6 Working Changes (#1479)
* Bump version

* Message list performance fixes into 2.7.6 (#1475)

* Remove extra want config call when adding a contact

* App badge and unnecessary notification fixes (#1455)

* - Fix for app badge not going to zero if a message arrives while you have that chat open
- Fix for push notifications popping up when a message is received while that chat is open

* Fix for cancelling notifications, works now. And scroll to bottom of conversation upon new message

* Fix: Channels help grammer fix (#1452)

* remove outdated TCP not available on Apple devices (#1450)

* Update initial onboarding view

* remove toggle gating for mac

* Update crash reporting opt out in real time

* Update onboarding text

* Use mDNS text records for node name

* TCP IP and port on the connection screen

* Hide app icon chooser on mac

* Infinite loop hang bugfixes and performance improvements for both `UserMessageList` and `ChannelMessageList` (#1465)

* 2.7.5 Working Changes (#1460)

* Remove extra want config call when adding a contact

* App badge and unnecessary notification fixes (#1455)

* - Fix for app badge not going to zero if a message arrives while you have that chat open
- Fix for push notifications popping up when a message is received while that chat is open

* Fix for cancelling notifications, works now. And scroll to bottom of conversation upon new message

* Fix: Channels help grammer fix (#1452)

* remove outdated TCP not available on Apple devices (#1450)

* Update initial onboarding view

* remove toggle gating for mac

* Update crash reporting opt out in real time

* Update onboarding text

---------

Co-authored-by: Gnome Adrift <646322+gnomeadrift@users.noreply.github.com>
Co-authored-by: Zain Kergaye <62440012+ZainKergaye@users.noreply.github.com>
Co-authored-by: NillRudd <102033730+NillRudd@users.noreply.github.com>

* UserEntity: add mostRecentMessage and unreadMessages with early exit when lastMessage is nil, and fetch 1 row (not N) otherwise

* UserList: replace 5 slow calls to user.messageList with new fast calls

* NodeList: always put the connected node at the top of list (if it matches the node filters)

* ChannelEntity: add faster mostRecentPrivateMessage and unreadMessages which fetch 1 row (not N)

* ChannelList: replace 5 calls to channel.allPrivateMessage with new fast calls

* Fix incorrect appState.unreadDirectMessages calculations

* MyInfoEntity: also fix unreadMessages count here to be fast, and use it for appState.unreadChannelMessages

* UserMessageList: use @FetchRequest to prevent the N^2 behavior that was happening in calls to allPrivateMessages

* Refactor ChannelEntityExtension and MyInfoEntityExtension to be more similar to UserEntityExtension

* Remove SwiftUI-infinite-loop-causing `.id(redrawTapbacksTrigger)` in ChannelMessageList and UserMessageList (duplicate row ids)

* MyInfoEntityExtension: exclude emoji tapbacks (which never get marked as read anyway) from unread message count

* Add SaveChannelLinkData so MessageText and MeshtasticApp can use .sheet(item: ...) and avoid infinite loop hang due to Binding rebuild

* ChannelMessageList and UserMessageList: switch to stable messageId for ForEach SwiftUI row identity

* ChannelMessageList and UserMessageList: debouncedScrollToBottom; keyboardWillShowNotification/keyboardDidShowNotification

* ChannelMessageList and UserMessageList: scroll to bottom onFirstAppear

* ChannelMessageList and UserMessageList: block spurious markMessagesAsRead when this View is not active

---------

Co-authored-by: Garth Vander Houwen <garth@meshtastic.com>
Co-authored-by: Gnome Adrift <646322+gnomeadrift@users.noreply.github.com>
Co-authored-by: Zain Kergaye <62440012+ZainKergaye@users.noreply.github.com>
Co-authored-by: NillRudd <102033730+NillRudd@users.noreply.github.com>

* message-list-performance: revert scrolling changes (#1472)

* Revert e0f0b4a0f7 (ChannelMessageList and UserMessageList: scroll to bottom onFirstAppear)

* Revert "ChannelMessageList and UserMessageList: debouncedScrollToBottom; keyboardWillShowNotification/keyboardDidShowNotification"

This reverts commit ee1a7c4415.

---------

Co-authored-by: Gnome Adrift <646322+gnomeadrift@users.noreply.github.com>
Co-authored-by: Zain Kergaye <62440012+ZainKergaye@users.noreply.github.com>
Co-authored-by: NillRudd <102033730+NillRudd@users.noreply.github.com>
Co-authored-by: Jake-B <jake-b@users.noreply.github.com>
Co-authored-by: Mike Robbins <mrobbins@alum.mit.edu>

* Explicitly set unmessagable, seems unnessary

* Add back missing mesh map features

* Fix: "Retrieving nodes" significantly slower after reconnect  extracted from #1424 (#1477)

* Fix: "Retrieving nodes" significantly slower after reconnect (#1424)

The node database retrieval was calling context.save() for every single
NodeInfo packet received (250 saves for 250 nodes). This caused severe
performance degradation on reconnect when CoreData had accumulated state.

Root Cause:
- nodeInfoPacket() called context.save() immediately for each node
- With 250 nodes, this meant 250 individual CoreData save operations
- On first connection, CoreData is fresh and fast
- On reconnect, CoreData has accumulated change tracking, undo management,
  and memory pressure, making each save progressively slower
- This resulted in 10+ second retrieval times vs 1-2 seconds initially

Solution:
- Added deferSave parameter to nodeInfoPacket() function
- During database retrieval (.retrievingDatabase state), defer all saves
- Perform a single batch save when database retrieval completes
  (when NONCE_ONLY_DB configCompleteID is received)
- This reduces 250 saves to 1 save

Performance Impact:
- Eliminates N individual saves during node database sync
- Reduces database retrieval time back to 1-2 seconds on reconnect
- Matches first-connection performance consistently

Fixes #1424

* Revert *MessageListUnified files

---------

Co-authored-by: Martin Bogomolni <martinbogo@gmail.com>
Co-authored-by: Jake-B <jake-b@users.noreply.github.com>

* Hide route lines filter from mesh map

* Mesh Map: fuzz imprecise locations so they're distinguishable and clickable at the highest zoom levels (#1478)

Co-authored-by: Garth Vander Houwen <garth@meshtastic.com>

* Fix bad merge

* Update Meshtastic/Extensions/CoreData/UserEntityExtension.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Meshtastic/Views/Nodes/Helpers/Map/MapContent/MeshMapContent.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Meshtastic/Extensions/CoreData/ChannelEntityExtension.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Meshtastic/Extensions/CoreData/MyInfoEntityExtension.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Meshtastic/Extensions/CoreData/ChannelEntityExtension.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Keep list of previous manual connections (#1484)

* Keep list of previous manual connections

* More descriptive manual connection rows

* Merge fixes and new way to show IP on Connect view

---------

Co-authored-by: Jake-B <jake-b@users.noreply.github.com>

* Show who relayed messages (#1486)

* Add identification for node that relayed text messages and add count for ammount of relayers of your message

* Ack Relays

* upsertPositionPacket: don't use future timestamps to set node's lastHeard (#1488)

* R1 NEO

* Neo

* Update Meshtastic/Views/Settings/AppSettings.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove bad if

* Git rid of extra environment variable

* Update Meshtastic/Accessory/Transports/TCP/TCPTransport.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* MeshMap performance: quick wins (#1490)

* MeshMap: change onMapCameraChange frequency to .onEnd so that zooming doesn't cause continuous SwiftUI reevaluation on every frame

* MeshMapContent: factor out reducedPrecisionMapCircles into a separate function

* MeshMapContent: when multiple reducedPrecisionCircles have the same (lat,lon,radius), just draw one (big perf boost in dense areas)

* NodeMap performance improvements for high # positions history (#1480)

* NodeMapContent: move Route Lines out of ForEach

* NodeMapContent: move Convex Hull out of ForEach

* NodeMapContent: Replace `position.nodePosition?` with `node`

* NodeMapContent: drop unnecessary LazyVStack in showNodeHistory

* NodeMapContent: hoist out nodeColorSwift

* Move lineCoords, loraCoords calculations within showRouteLines, showConvexHull respectively

* Hoist out repeated node.metadata?.positionFlags lookups / PositionFlags creation

* NodeMapContent: remove unused @State

* NodeMapSwiftUI: add NodeMapContentEquatableWrapper and NodeMapContentSignature to prevent frequent NodeMapContent recomputation and infinite render loops

* NodeMapSwiftUI: disable animation during SwiftUI transactions

* NodeMapContent: hoist nodeBorderColor and set allowsHitTesting(false) on history point views

* NodeMapContent: prerenderHistoryPointCircle and prerenderHistoryPointArrow to avoid thousands of vector draw operations

* NodeMapContent: Shared coordinate list for Route Lines and Convex Hull

* NodeMapContent.prerenderHistoryPointArrow: add .frame(width: 16, height: 16)

* Fix wantRangeTestPackets to correctly follow rangeTestConfig.enabled (#1489)

* Fix interval drop down formatter

* Clean up channel qr code functionality.

* perferredPeripheralId fix

* Set opt in

* Retry once 5 second timer. dont throw the error

* Queue for peripherals

* Fix: hoplimit of dms would always fallback to hops away of the node even when configured hops was higher (#1495)

* fix hops setting in dms

* Fix hops for exchange position

* Final fix

* Don't favorite client base

* Update device hardware

* Prevent nil environment metrics

* Bump datadog sdk

* fix setting device telemetry enabled (#1515)

* Update Muzi R1 Neo to actively supported

* fix setting device telemetry enabled

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>

* Don't subscribe to mqtt topic if downlink is not on (#1501)

* Dont sub if no downlink

* moved reload mqtt connect config

* Preview enabled in connected devices (#1509)

* Update Muzi R1 Neo to actively supported

* Preview enabled in connected devices

* Fixing indentation

* Fixing indentation

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>

* UpdateCoreData.updateAnyPacketFrom: mirror firmware's lastHeard/snr/rssi/hopsAway update logic from NodeDB::updateFrom (#1492)

* `CLIENT_BASE` add-favorite/role-change confirmation dialog (#1493)

* FavoriteNodeButton: refactor task out

* AccessoryManager.connectedDeviceRole helper

* FavoriteNodeButton: show confirmation dialog when a CLIENT_BASE is trying to add a favorite

* addContactFromURL: add comment referencing upcoming change in https://github.com/meshtastic/firmware/pull/8495

* DeviceConfig: role picker: show a warning when selecting CLIENT_BASE, similar to warning shown for ROUTER

* Adjust device configuration Client Base warning text

* Compass view (#1521)

* Added compass view

* Added Compass View

* Node colors in compass

* Update Muzi R1 Neo to actively supported

* Update PositionPopover.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update CompassView.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update CompassView.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Meshtastic/Views/Helpers/CompassView.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Meshtastic/Views/Helpers/CompassView.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Benjamin Faershtein <119711889+RCGV1@users.noreply.github.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove discovery queue

* revert problematic retry functionalliy

* format file

* Update & improve zh-Hans translation (#1523)

* Update Muzi R1 Neo to actively supported

* update & improve zh-Hans translation

rt

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>

* Update protobufs to 2.7.1

* Add long-turbo preset

* Disable Range Test module when primary channel is public/unsecured (#1512)

* Update Muzi R1 Neo to actively supported

* Disable Range Test module when primary channel is public/unsecured

Updated RangeTestConfig.swift to determine whether the primary channel (index 0) is operating without encryption or with a 1-byte minimal PSK.

Disabled Range Test UI controls when on a public/default channel to prevent user interaction.

Added safety enforcement in the save operation: Range Test enabled flag is automatically forced to false before sending updates to the device.

Introduced a computed property isPrimaryChannelPublic following existing code patterns and security indicators (e.g., hexDescription PSK length).

Matches the behavior implemented in the Android client for consistent policy across platforms.

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>

* Add new device images

* Remove print statement, get rid of cut and paste error

---------

Co-authored-by: Gnome Adrift <646322+gnomeadrift@users.noreply.github.com>
Co-authored-by: Zain Kergaye <62440012+ZainKergaye@users.noreply.github.com>
Co-authored-by: NillRudd <102033730+NillRudd@users.noreply.github.com>
Co-authored-by: Jake-B <jake-b@users.noreply.github.com>
Co-authored-by: Mike Robbins <mrobbins@alum.mit.edu>
Co-authored-by: Martin Bogomolni <martinbogo@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: jake-b <1012393+jake-b@users.noreply.github.com>
Co-authored-by: Benjamin Faershtein <119711889+RCGV1@users.noreply.github.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Charles Pinesky <25388414+Vaidios@users.noreply.github.com>
Co-authored-by: Radio <35003866+radiolee@users.noreply.github.com>
Co-authored-by: Jason Houk <dubsectordevelopment@gmail.com>
2025-12-21 12:15:01 -08:00

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