Browse Source

Clean up ahead of PR.

Matthew Chen 10 months ago
parent
commit
34a404f589

+ 18 - 14
Signal/src/Generated/OWSWebRTCDataProtos.pb.swift

@@ -1,6 +1,10 @@
+// DO NOT EDIT.
 //
-//  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
+// Generated by the Swift generator plugin for the protocol buffer compiler.
+// Source: OWSWebRTCDataProtos.proto
 //
+// For information on using the generated types, please see the documenation:
+//   https://github.com/apple/swift-protobuf/
 
 //*
 // Copyright (C) 2014-2016 Open Whisper Systems
@@ -18,7 +22,7 @@ import SwiftProtobuf
 // incompatible with the version of SwiftProtobuf to which you are linking.
 // Please ensure that your are building against the same version of the API
 // that was used to generate this file.
-private struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
+fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
   struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
   typealias Version = _2
 }
@@ -42,7 +46,7 @@ struct WebRTCProtos_Connected {
 
   init() {}
 
-  fileprivate var _id: UInt64?
+  fileprivate var _id: UInt64? = nil
 }
 
 struct WebRTCProtos_Hangup {
@@ -64,7 +68,7 @@ struct WebRTCProtos_Hangup {
 
   init() {}
 
-  fileprivate var _id: UInt64?
+  fileprivate var _id: UInt64? = nil
 }
 
 struct WebRTCProtos_VideoStreamingStatus {
@@ -95,8 +99,8 @@ struct WebRTCProtos_VideoStreamingStatus {
 
   init() {}
 
-  fileprivate var _id: UInt64?
-  fileprivate var _enabled: Bool?
+  fileprivate var _id: UInt64? = nil
+  fileprivate var _enabled: Bool? = nil
 }
 
 struct WebRTCProtos_Data {
@@ -140,12 +144,12 @@ struct WebRTCProtos_Data {
 
 // MARK: - Code below here is support for the SwiftProtobuf runtime.
 
-private let _protobuf_package = "WebRTCProtos"
+fileprivate let _protobuf_package = "WebRTCProtos"
 
 extension WebRTCProtos_Connected: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
   static let protoMessageName: String = _protobuf_package + ".Connected"
   static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
-    1: .same(proto: "id")
+    1: .same(proto: "id"),
   ]
 
   mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -174,7 +178,7 @@ extension WebRTCProtos_Connected: SwiftProtobuf.Message, SwiftProtobuf._MessageI
 extension WebRTCProtos_Hangup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
   static let protoMessageName: String = _protobuf_package + ".Hangup"
   static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
-    1: .same(proto: "id")
+    1: .same(proto: "id"),
   ]
 
   mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -204,7 +208,7 @@ extension WebRTCProtos_VideoStreamingStatus: SwiftProtobuf.Message, SwiftProtobu
   static let protoMessageName: String = _protobuf_package + ".VideoStreamingStatus"
   static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
     1: .same(proto: "id"),
-    2: .same(proto: "enabled")
+    2: .same(proto: "enabled"),
   ]
 
   mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -240,13 +244,13 @@ extension WebRTCProtos_Data: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
   static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
     1: .same(proto: "connected"),
     2: .same(proto: "hangup"),
-    3: .same(proto: "videoStreamingStatus")
+    3: .same(proto: "videoStreamingStatus"),
   ]
 
   fileprivate class _StorageClass {
-    var _connected: WebRTCProtos_Connected?
-    var _hangup: WebRTCProtos_Hangup?
-    var _videoStreamingStatus: WebRTCProtos_VideoStreamingStatus?
+    var _connected: WebRTCProtos_Connected? = nil
+    var _hangup: WebRTCProtos_Hangup? = nil
+    var _videoStreamingStatus: WebRTCProtos_VideoStreamingStatus? = nil
 
     static let defaultInstance = _StorageClass()
 

+ 48 - 0
SignalServiceKit/src/Protos/Generated/SignalService.pb.swift

@@ -149,6 +149,14 @@ struct SignalServiceProtos_Envelope {
   fileprivate var _content: Data? = nil
 }
 
+#if swift(>=4.2)
+
+extension SignalServiceProtos_Envelope.TypeEnum: CaseIterable {
+  // Support synthesized by the compiler.
+}
+
+#endif  // swift(>=4.2)
+
 struct SignalServiceProtos_Content {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -1100,6 +1108,14 @@ struct SignalServiceProtos_DataMessage {
   fileprivate var _storage = _StorageClass.defaultInstance
 }
 
+#if swift(>=4.2)
+
+extension SignalServiceProtos_DataMessage.Flags: CaseIterable {
+  // Support synthesized by the compiler.
+}
+
+#endif  // swift(>=4.2)
+
 struct SignalServiceProtos_NullMessage {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -1171,6 +1187,14 @@ struct SignalServiceProtos_ReceiptMessage {
   fileprivate var _type: SignalServiceProtos_ReceiptMessage.TypeEnum? = nil
 }
 
+#if swift(>=4.2)
+
+extension SignalServiceProtos_ReceiptMessage.TypeEnum: CaseIterable {
+  // Support synthesized by the compiler.
+}
+
+#endif  // swift(>=4.2)
+
 struct SignalServiceProtos_Verified {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -1252,6 +1276,14 @@ struct SignalServiceProtos_Verified {
   fileprivate var _nullMessage: Data? = nil
 }
 
+#if swift(>=4.2)
+
+extension SignalServiceProtos_Verified.State: CaseIterable {
+  // Support synthesized by the compiler.
+}
+
+#endif  // swift(>=4.2)
+
 struct SignalServiceProtos_SyncMessage {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -1700,6 +1732,14 @@ struct SignalServiceProtos_AttachmentPointer {
   fileprivate var _height: UInt32? = nil
 }
 
+#if swift(>=4.2)
+
+extension SignalServiceProtos_AttachmentPointer.Flags: CaseIterable {
+  // Support synthesized by the compiler.
+}
+
+#endif  // swift(>=4.2)
+
 struct SignalServiceProtos_GroupContext {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
@@ -1790,6 +1830,14 @@ struct SignalServiceProtos_GroupContext {
   fileprivate var _storage = _StorageClass.defaultInstance
 }
 
+#if swift(>=4.2)
+
+extension SignalServiceProtos_GroupContext.TypeEnum: CaseIterable {
+  // Support synthesized by the compiler.
+}
+
+#endif  // swift(>=4.2)
+
 struct SignalServiceProtos_ContactDetails {
   // SwiftProtobuf.Message conformance is added in an extension below. See the
   // `Message` and `Message+*Additions` files in the SwiftProtobuf library for

+ 30 - 18
SignalServiceKit/src/Protos/Generated/WebSocketResources.pb.swift

@@ -1,6 +1,10 @@
+// DO NOT EDIT.
 //
-//  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
+// Generated by the Swift generator plugin for the protocol buffer compiler.
+// Source: WebSocketResources.proto
 //
+// For information on using the generated types, please see the documenation:
+//   https://github.com/apple/swift-protobuf/
 
 //*
 // Copyright (C) 2014-2016 Open Whisper Systems
@@ -18,7 +22,7 @@ import SwiftProtobuf
 // incompatible with the version of SwiftProtobuf to which you are linking.
 // Please ensure that your are building against the same version of the API
 // that was used to generate this file.
-private struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
+fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
   struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
   typealias Version = _2
 }
@@ -73,10 +77,10 @@ struct WebSocketProtos_WebSocketRequestMessage {
 
   init() {}
 
-  fileprivate var _verb: String?
-  fileprivate var _path: String?
-  fileprivate var _body: Data?
-  fileprivate var _requestID: UInt64?
+  fileprivate var _verb: String? = nil
+  fileprivate var _path: String? = nil
+  fileprivate var _body: Data? = nil
+  fileprivate var _requestID: UInt64? = nil
 }
 
 struct WebSocketProtos_WebSocketResponseMessage {
@@ -128,10 +132,10 @@ struct WebSocketProtos_WebSocketResponseMessage {
 
   init() {}
 
-  fileprivate var _requestID: UInt64?
-  fileprivate var _status: UInt32?
-  fileprivate var _message: String?
-  fileprivate var _body: Data?
+  fileprivate var _requestID: UInt64? = nil
+  fileprivate var _status: UInt32? = nil
+  fileprivate var _message: String? = nil
+  fileprivate var _body: Data? = nil
 }
 
 struct WebSocketProtos_WebSocketMessage {
@@ -203,9 +207,17 @@ struct WebSocketProtos_WebSocketMessage {
   fileprivate var _storage = _StorageClass.defaultInstance
 }
 
+#if swift(>=4.2)
+
+extension WebSocketProtos_WebSocketMessage.TypeEnum: CaseIterable {
+  // Support synthesized by the compiler.
+}
+
+#endif  // swift(>=4.2)
+
 // MARK: - Code below here is support for the SwiftProtobuf runtime.
 
-private let _protobuf_package = "WebSocketProtos"
+fileprivate let _protobuf_package = "WebSocketProtos"
 
 extension WebSocketProtos_WebSocketRequestMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
   static let protoMessageName: String = _protobuf_package + ".WebSocketRequestMessage"
@@ -214,7 +226,7 @@ extension WebSocketProtos_WebSocketRequestMessage: SwiftProtobuf.Message, SwiftP
     2: .same(proto: "path"),
     3: .same(proto: "body"),
     5: .same(proto: "headers"),
-    4: .same(proto: "requestId")
+    4: .same(proto: "requestId"),
   ]
 
   mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -267,7 +279,7 @@ extension WebSocketProtos_WebSocketResponseMessage: SwiftProtobuf.Message, Swift
     2: .same(proto: "status"),
     3: .same(proto: "message"),
     5: .same(proto: "headers"),
-    4: .same(proto: "body")
+    4: .same(proto: "body"),
   ]
 
   mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -318,13 +330,13 @@ extension WebSocketProtos_WebSocketMessage: SwiftProtobuf.Message, SwiftProtobuf
   static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
     1: .same(proto: "type"),
     2: .same(proto: "request"),
-    3: .same(proto: "response")
+    3: .same(proto: "response"),
   ]
 
   fileprivate class _StorageClass {
-    var _type: WebSocketProtos_WebSocketMessage.TypeEnum?
-    var _request: WebSocketProtos_WebSocketRequestMessage?
-    var _response: WebSocketProtos_WebSocketResponseMessage?
+    var _type: WebSocketProtos_WebSocketMessage.TypeEnum? = nil
+    var _request: WebSocketProtos_WebSocketRequestMessage? = nil
+    var _response: WebSocketProtos_WebSocketResponseMessage? = nil
 
     static let defaultInstance = _StorageClass()
 
@@ -394,6 +406,6 @@ extension WebSocketProtos_WebSocketMessage.TypeEnum: SwiftProtobuf._ProtoNamePro
   static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
     0: .same(proto: "UNKNOWN"),
     1: .same(proto: "REQUEST"),
-    2: .same(proto: "RESPONSE")
+    2: .same(proto: "RESPONSE"),
   ]
 }

+ 0 - 4
protobuf/Makefile

@@ -5,10 +5,6 @@ WRAPPER_SCRIPT=../Scripts/ProtoWrappers.py \
 
 all: webrtc_data_proto
 
-# webrtc_data_proto: OWSWebRTCDataProtos.proto
-# 	$(PROTOC) --objc_out=../Signal/src/call/ \
-# 		OWSWebRTCDataProtos.proto
-
 webrtc_data_proto: OWSWebRTCDataProtos.proto
 	$(PROTOC) --swift_out=../Signal/src/Generated \
 		OWSWebRTCDataProtos.proto