Update channel proto

This commit is contained in:
Garth Vander Houwen 2024-05-01 19:58:57 -07:00
parent 311947fbbc
commit eb27e7d999
3 changed files with 63 additions and 1 deletions

View file

@ -0,0 +1,51 @@
{
"originHash" : "e9855e3a299c14a10f11ee0b8f29e4170b09548533939361223a0f50e7caac8c",
"pins" : [
{
"identity" : "cocoamqtt",
"kind" : "remoteSourceControl",
"location" : "https://github.com/emqx/CocoaMQTT",
"state" : {
"revision" : "85387a2478551ad84f39be8a3c8587d34dd2bcf5",
"version" : "2.1.5"
}
},
{
"identity" : "mqttcocoaasyncsocket",
"kind" : "remoteSourceControl",
"location" : "https://github.com/leeway1208/MqttCocoaAsyncSocket",
"state" : {
"revision" : "ce3e18607fd01079495f86ff6195d8a3ca469f73",
"version" : "1.0.8"
}
},
{
"identity" : "sqlite.swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/stephencelis/SQLite.swift.git",
"state" : {
"revision" : "7a2e3cd27de56f6d396e84f63beefd0267b55ccb",
"version" : "0.14.1"
}
},
{
"identity" : "starscream",
"kind" : "remoteSourceControl",
"location" : "https://github.com/daltoniam/Starscream.git",
"state" : {
"revision" : "a063fda2b8145a231953c20e7a646be254365396",
"version" : "3.1.2"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "ce20dc083ee485524b802669890291c0d8090170",
"version" : "1.22.1"
}
}
],
"version" : 3
}

View file

@ -120,6 +120,11 @@ struct ModuleSettings {
/// Bits of precision for the location sent in position packets.
var positionPrecision: UInt32 = 0
///
/// Controls whether or not the phone / clients should mute the current channel
/// Useful for noisy public channels you don't necessarily want to disable
var isClientMuted: Bool = false
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
@ -311,6 +316,7 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
static let protoMessageName: String = _protobuf_package + ".ModuleSettings"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .standard(proto: "position_precision"),
2: .standard(proto: "is_client_muted"),
]
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@ -320,6 +326,7 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularUInt32Field(value: &self.positionPrecision) }()
case 2: try { try decoder.decodeSingularBoolField(value: &self.isClientMuted) }()
default: break
}
}
@ -329,11 +336,15 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
if self.positionPrecision != 0 {
try visitor.visitSingularUInt32Field(value: self.positionPrecision, fieldNumber: 1)
}
if self.isClientMuted != false {
try visitor.visitSingularBoolField(value: self.isClientMuted, fieldNumber: 2)
}
try unknownFields.traverse(visitor: &visitor)
}
static func ==(lhs: ModuleSettings, rhs: ModuleSettings) -> Bool {
if lhs.positionPrecision != rhs.positionPrecision {return false}
if lhs.isClientMuted != rhs.isClientMuted {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}

@ -1 +1 @@
Subproject commit 86640f20db7b9b5be42949d18e8d96ad10d47a68
Subproject commit e21899aa6b2b49863cfa2758e5e3b6faacf04bba