Merge tag '2.44.0.13'
This commit is contained in:
commit
1aa90143e2
@ -283,8 +283,6 @@
|
||||
34C3C78F2040A4F70000134C /* sonarping.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 34C3C78E2040A4F70000134C /* sonarping.mp3 */; };
|
||||
34C3C7922040B0DD0000134C /* OWSAudioPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 34C3C7902040B0DC0000134C /* OWSAudioPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
34C3C7932040B0DD0000134C /* OWSAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C3C7912040B0DC0000134C /* OWSAudioPlayer.m */; };
|
||||
34C4E2572118957600BEA353 /* OWSWebRTCDataProtos.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34C4E2552118957600BEA353 /* OWSWebRTCDataProtos.pb.swift */; };
|
||||
34C4E2582118957600BEA353 /* WebRTCProto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34C4E2562118957600BEA353 /* WebRTCProto.swift */; };
|
||||
34C6B0A91FA0E46F00D35993 /* test-gif.gif in Resources */ = {isa = PBXBuildFile; fileRef = 34C6B0A51FA0E46F00D35993 /* test-gif.gif */; };
|
||||
34C6B0AB1FA0E46F00D35993 /* test-mp3.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 34C6B0A71FA0E46F00D35993 /* test-mp3.mp3 */; };
|
||||
34C6B0AC1FA0E46F00D35993 /* test-mp4.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 34C6B0A81FA0E46F00D35993 /* test-mp4.mp4 */; };
|
||||
@ -337,6 +335,7 @@
|
||||
34EA69422194DE8000702471 /* MediaUploadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34EA69412194DE7F00702471 /* MediaUploadView.swift */; };
|
||||
34F308A21ECB469700BB7697 /* OWSBezierPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F308A11ECB469700BB7697 /* OWSBezierPathView.m */; };
|
||||
34FDB29221FF986600A01202 /* UIView+OWS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FDB29121FF986600A01202 /* UIView+OWS.swift */; };
|
||||
38AD4FAA2310B7E00038BA75 /* SignalRingRTC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 38AD4FA92310B7E00038BA75 /* SignalRingRTC.framework */; };
|
||||
4503F1BE20470A5B00CEE724 /* classic-quiet.aifc in Resources */ = {isa = PBXBuildFile; fileRef = 4503F1BB20470A5B00CEE724 /* classic-quiet.aifc */; };
|
||||
4503F1BF20470A5B00CEE724 /* classic.aifc in Resources */ = {isa = PBXBuildFile; fileRef = 4503F1BC20470A5B00CEE724 /* classic.aifc */; };
|
||||
4503F1C3204711D300CEE724 /* OWS107LegacySounds.m in Sources */ = {isa = PBXBuildFile; fileRef = 4503F1C1204711D200CEE724 /* OWS107LegacySounds.m */; };
|
||||
@ -406,7 +405,6 @@
|
||||
45847E871E4283C30080EAB3 /* Intents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45847E861E4283C30080EAB3 /* Intents.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
4585C4681ED8F8D200896AEA /* SafetyNumberConfirmationAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4585C4671ED8F8D200896AEA /* SafetyNumberConfirmationAlert.swift */; };
|
||||
458967111DC117CC00E9DD21 /* AccountManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 458967101DC117CC00E9DD21 /* AccountManagerTest.swift */; };
|
||||
458DE9D61DEE3FD00071BB03 /* PeerConnectionClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 458DE9D51DEE3FD00071BB03 /* PeerConnectionClient.swift */; };
|
||||
458E38371D668EBF0094BD24 /* OWSDeviceProvisioningURLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 458E38361D668EBF0094BD24 /* OWSDeviceProvisioningURLParser.m */; };
|
||||
458E383A1D6699FA0094BD24 /* OWSDeviceProvisioningURLParserTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 458E38391D6699FA0094BD24 /* OWSDeviceProvisioningURLParserTest.m */; };
|
||||
459311FC1D75C948008DD4F0 /* OWSDeviceTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 459311FB1D75C948008DD4F0 /* OWSDeviceTableViewCell.m */; };
|
||||
@ -1060,8 +1058,6 @@
|
||||
34C3C78E2040A4F70000134C /* sonarping.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = sonarping.mp3; path = Signal/AudioFiles/sonarping.mp3; sourceTree = SOURCE_ROOT; };
|
||||
34C3C7902040B0DC0000134C /* OWSAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSAudioPlayer.h; sourceTree = "<group>"; };
|
||||
34C3C7912040B0DC0000134C /* OWSAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSAudioPlayer.m; sourceTree = "<group>"; };
|
||||
34C4E2552118957600BEA353 /* OWSWebRTCDataProtos.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OWSWebRTCDataProtos.pb.swift; sourceTree = "<group>"; };
|
||||
34C4E2562118957600BEA353 /* WebRTCProto.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebRTCProto.swift; sourceTree = "<group>"; };
|
||||
34C6B0A51FA0E46F00D35993 /* test-gif.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "test-gif.gif"; sourceTree = "<group>"; };
|
||||
34C6B0A71FA0E46F00D35993 /* test-mp3.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "test-mp3.mp3"; sourceTree = "<group>"; };
|
||||
34C6B0A81FA0E46F00D35993 /* test-mp4.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-mp4.mp4"; sourceTree = "<group>"; };
|
||||
@ -1147,6 +1143,7 @@
|
||||
34F308A01ECB469700BB7697 /* OWSBezierPathView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSBezierPathView.h; sourceTree = "<group>"; };
|
||||
34F308A11ECB469700BB7697 /* OWSBezierPathView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSBezierPathView.m; sourceTree = "<group>"; };
|
||||
34FDB29121FF986600A01202 /* UIView+OWS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+OWS.swift"; sourceTree = "<group>"; };
|
||||
38AD4FA92310B7E00038BA75 /* SignalRingRTC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SignalRingRTC.framework; path = ThirdParty/WebRTC/Build/SignalRingRTC.framework; sourceTree = "<group>"; };
|
||||
399D8A7F461D7253DFFB91C5 /* Pods-SignalTests.testable release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalTests.testable release.xcconfig"; path = "Pods/Target Support Files/Pods-SignalTests/Pods-SignalTests.testable release.xcconfig"; sourceTree = "<group>"; };
|
||||
4224D4E5D7921F25823ECDCA /* Pods-SignalPerformanceTests.testable release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalPerformanceTests.testable release.xcconfig"; path = "Pods/Target Support Files/Pods-SignalPerformanceTests/Pods-SignalPerformanceTests.testable release.xcconfig"; sourceTree = "<group>"; };
|
||||
435EAC2E5E22D3F087EB3192 /* Pods-SignalShareExtension.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalShareExtension.app store release.xcconfig"; path = "Pods/Target Support Files/Pods-SignalShareExtension/Pods-SignalShareExtension.app store release.xcconfig"; sourceTree = "<group>"; };
|
||||
@ -1214,7 +1211,6 @@
|
||||
4585C4671ED8F8D200896AEA /* SafetyNumberConfirmationAlert.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SafetyNumberConfirmationAlert.swift; sourceTree = "<group>"; };
|
||||
4589670F1DC117CC00E9DD21 /* SignalTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SignalTests-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
458967101DC117CC00E9DD21 /* AccountManagerTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AccountManagerTest.swift; path = Models/AccountManagerTest.swift; sourceTree = "<group>"; };
|
||||
458DE9D51DEE3FD00071BB03 /* PeerConnectionClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerConnectionClient.swift; sourceTree = "<group>"; };
|
||||
458E38351D668EBF0094BD24 /* OWSDeviceProvisioningURLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSDeviceProvisioningURLParser.h; sourceTree = "<group>"; };
|
||||
458E38361D668EBF0094BD24 /* OWSDeviceProvisioningURLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSDeviceProvisioningURLParser.m; sourceTree = "<group>"; };
|
||||
458E38391D6699FA0094BD24 /* OWSDeviceProvisioningURLParserTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OWSDeviceProvisioningURLParserTest.m; path = Models/OWSDeviceProvisioningURLParserTest.m; sourceTree = "<group>"; };
|
||||
@ -1518,6 +1514,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
38AD4FAA2310B7E00038BA75 /* SignalRingRTC.framework in Frameworks */,
|
||||
4CC1ECF9211A47CE00CC13BE /* StoreKit.framework in Frameworks */,
|
||||
455A16DD1F1FEA0000F86704 /* Metal.framework in Frameworks */,
|
||||
455A16DE1F1FEA0000F86704 /* MetalKit.framework in Frameworks */,
|
||||
@ -2171,15 +2168,6 @@
|
||||
path = Signal/AudioFiles/ringtoneSounds;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
34C4E2542118957600BEA353 /* Generated */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
34C4E2552118957600BEA353 /* OWSWebRTCDataProtos.pb.swift */,
|
||||
34C4E2562118957600BEA353 /* WebRTCProto.swift */,
|
||||
);
|
||||
path = Generated;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
34C6B0A41FA0E46F00D35993 /* Assets */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -2568,7 +2556,6 @@
|
||||
76EB03C318170B33006006FC /* AppDelegate.m */,
|
||||
76EB03FE18170B33006006FC /* call */,
|
||||
76EB041118170B33006006FC /* environment */,
|
||||
34C4E2542118957600BEA353 /* Generated */,
|
||||
45D231751DC7E8C50034FA89 /* Jobs */,
|
||||
457F3AC01D14A0F700C51351 /* Models */,
|
||||
76EB041D18170B33006006FC /* network */,
|
||||
@ -2586,7 +2573,6 @@
|
||||
45794E841E0061CF00066731 /* UserInterface */,
|
||||
45464DB81DFA03D8001D3FD6 /* Signaling */,
|
||||
45FBC5D01DF8592E00E9B410 /* SignalCall.swift */,
|
||||
458DE9D51DEE3FD00071BB03 /* PeerConnectionClient.swift */,
|
||||
4574A5D51DD6704700C6B692 /* CallService.swift */,
|
||||
45F170BA1E2FC5D3003FC1F2 /* CallAudioService.swift */,
|
||||
452C468E1E427E200087B011 /* OutboundCallInitiator.swift */,
|
||||
@ -2843,6 +2829,7 @@
|
||||
D221A08C169C9E5E00537ABF /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
38AD4FA92310B7E00038BA75 /* SignalRingRTC.framework */,
|
||||
3496955F21A2FC8100DCFE74 /* CloudKit.framework */,
|
||||
4C9CA25C217E676900607C63 /* ZXingObjC.framework */,
|
||||
4CC1ECF8211A47CD00CC13BE /* StoreKit.framework */,
|
||||
@ -3444,6 +3431,7 @@
|
||||
inputPaths = (
|
||||
"$(SRCROOT)/ThirdParty/WebRTC/Build/WebRTC.framework",
|
||||
"$(SRCROOT)/ThirdParty/Carthage/Build/iOS/ZXingObjC.framework",
|
||||
"$(SRCROOT)/ThirdParty/WebRTC/Build/SignalRingRTC.framework",
|
||||
);
|
||||
name = "[Carthage] Copy Frameworks";
|
||||
outputPaths = (
|
||||
@ -3945,7 +3933,6 @@
|
||||
4CC0B59C20EC5F2E00CF6EE0 /* ConversationConfigurationSyncOperation.swift in Sources */,
|
||||
3434AE1C22AEDE7D002EE04E /* ViewOnceMessageViewController.swift in Sources */,
|
||||
8835DE03230DEC6A00DC6B66 /* AddToBlockListViewController.swift in Sources */,
|
||||
34C4E2582118957600BEA353 /* WebRTCProto.swift in Sources */,
|
||||
34D1F0BD1F8D108C0066283D /* AttachmentUploadView.m in Sources */,
|
||||
4C8A6DFE22E54AFA00469AE7 /* MediaInteractiveDismiss.swift in Sources */,
|
||||
452EC6DF205E9E30000E787C /* MediaGalleryViewController.swift in Sources */,
|
||||
@ -4120,7 +4107,6 @@
|
||||
34D1F0C01F8EC1760066283D /* MessageRecipientStatusUtils.swift in Sources */,
|
||||
45F659731E1BD99C00444429 /* CallKitCallUIAdaptee.swift in Sources */,
|
||||
34277A5E20751BDC006049F2 /* OWSQuotedMessageView.m in Sources */,
|
||||
458DE9D61DEE3FD00071BB03 /* PeerConnectionClient.swift in Sources */,
|
||||
45DDA6242090CEB500DE97F8 /* ConversationHeaderView.swift in Sources */,
|
||||
3488F9362191CC4000E524CC /* ConversationMediaView.swift in Sources */,
|
||||
45F32C242057297A00A300D5 /* MessageDetailViewController.swift in Sources */,
|
||||
@ -4160,7 +4146,6 @@
|
||||
8809CE8A22F93C2200D38867 /* RecentPhotoCollectionView.swift in Sources */,
|
||||
3496957321A301A100DCFE74 /* OWSBackupJob.m in Sources */,
|
||||
340FC8B3204DAC8D007AEB0F /* AppSettingsViewController.m in Sources */,
|
||||
34C4E2572118957600BEA353 /* OWSWebRTCDataProtos.pb.swift in Sources */,
|
||||
346B66311F4E29B200E5122F /* CropScaleImageViewController.swift in Sources */,
|
||||
45E5A6991F61E6DE001E4A8A /* MarqueeLabel.swift in Sources */,
|
||||
34D1F0B01F867BFC0066283D /* OWSSystemMessageCell.m in Sources */,
|
||||
|
||||
@ -859,8 +859,8 @@ static NSTimeInterval launchStartedAt;
|
||||
// * It can be received if the user taps the "video" button for a contact in the
|
||||
// contacts app. If so, the correct response is to try to initiate a new call
|
||||
// to that user - unless there already is another call in progress.
|
||||
if (AppEnvironment.shared.callService.call != nil) {
|
||||
if ([address isEqualToAddress:AppEnvironment.shared.callService.call.remoteAddress]) {
|
||||
if (AppEnvironment.shared.callService.currentCall != nil) {
|
||||
if ([address isEqualToAddress:AppEnvironment.shared.callService.currentCall.remoteAddress]) {
|
||||
OWSLogWarn(@"trying to upgrade ongoing call to video.");
|
||||
[AppEnvironment.shared.callService handleCallKitStartVideo];
|
||||
return;
|
||||
@ -910,7 +910,7 @@ static NSTimeInterval launchStartedAt;
|
||||
return;
|
||||
}
|
||||
|
||||
if (AppEnvironment.shared.callService.call != nil) {
|
||||
if (AppEnvironment.shared.callService.currentCall != nil) {
|
||||
OWSLogWarn(@"ignoring INStartAudioCallIntent due to ongoing WebRTC call.");
|
||||
return;
|
||||
}
|
||||
@ -959,7 +959,7 @@ static NSTimeInterval launchStartedAt;
|
||||
return;
|
||||
}
|
||||
|
||||
if (AppEnvironment.shared.callService.call != nil) {
|
||||
if (AppEnvironment.shared.callService.currentCall != nil) {
|
||||
OWSLogWarn(@"ignoring INStartCallIntent due to ongoing WebRTC call.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1,317 +0,0 @@
|
||||
// DO NOT EDIT.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
// Licensed according to the LICENSE file in this repository.
|
||||
|
||||
/// iOS - since we use a modern proto-compiler, we must specify
|
||||
/// the legacy proto format.
|
||||
|
||||
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 your 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
|
||||
}
|
||||
|
||||
struct WebRTCProtos_Connected {
|
||||
// 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.
|
||||
|
||||
/// @required
|
||||
var id: UInt64 {
|
||||
get {return _id ?? 0}
|
||||
set {_id = newValue}
|
||||
}
|
||||
/// Returns true if `id` has been explicitly set.
|
||||
var hasID: Bool {return self._id != nil}
|
||||
/// Clears the value of `id`. Subsequent reads from it will return its default value.
|
||||
mutating func clearID() {self._id = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _id: UInt64? = nil
|
||||
}
|
||||
|
||||
struct WebRTCProtos_Hangup {
|
||||
// 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.
|
||||
|
||||
/// @required
|
||||
var id: UInt64 {
|
||||
get {return _id ?? 0}
|
||||
set {_id = newValue}
|
||||
}
|
||||
/// Returns true if `id` has been explicitly set.
|
||||
var hasID: Bool {return self._id != nil}
|
||||
/// Clears the value of `id`. Subsequent reads from it will return its default value.
|
||||
mutating func clearID() {self._id = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _id: UInt64? = nil
|
||||
}
|
||||
|
||||
struct WebRTCProtos_VideoStreamingStatus {
|
||||
// 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.
|
||||
|
||||
/// @required
|
||||
var id: UInt64 {
|
||||
get {return _id ?? 0}
|
||||
set {_id = newValue}
|
||||
}
|
||||
/// Returns true if `id` has been explicitly set.
|
||||
var hasID: Bool {return self._id != nil}
|
||||
/// Clears the value of `id`. Subsequent reads from it will return its default value.
|
||||
mutating func clearID() {self._id = nil}
|
||||
|
||||
var enabled: Bool {
|
||||
get {return _enabled ?? false}
|
||||
set {_enabled = newValue}
|
||||
}
|
||||
/// Returns true if `enabled` has been explicitly set.
|
||||
var hasEnabled: Bool {return self._enabled != nil}
|
||||
/// Clears the value of `enabled`. Subsequent reads from it will return its default value.
|
||||
mutating func clearEnabled() {self._enabled = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _id: UInt64? = nil
|
||||
fileprivate var _enabled: Bool? = nil
|
||||
}
|
||||
|
||||
struct WebRTCProtos_Data {
|
||||
// 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.
|
||||
|
||||
var connected: WebRTCProtos_Connected {
|
||||
get {return _storage._connected ?? WebRTCProtos_Connected()}
|
||||
set {_uniqueStorage()._connected = newValue}
|
||||
}
|
||||
/// Returns true if `connected` has been explicitly set.
|
||||
var hasConnected: Bool {return _storage._connected != nil}
|
||||
/// Clears the value of `connected`. Subsequent reads from it will return its default value.
|
||||
mutating func clearConnected() {_storage._connected = nil}
|
||||
|
||||
var hangup: WebRTCProtos_Hangup {
|
||||
get {return _storage._hangup ?? WebRTCProtos_Hangup()}
|
||||
set {_uniqueStorage()._hangup = newValue}
|
||||
}
|
||||
/// Returns true if `hangup` has been explicitly set.
|
||||
var hasHangup: Bool {return _storage._hangup != nil}
|
||||
/// Clears the value of `hangup`. Subsequent reads from it will return its default value.
|
||||
mutating func clearHangup() {_storage._hangup = nil}
|
||||
|
||||
var videoStreamingStatus: WebRTCProtos_VideoStreamingStatus {
|
||||
get {return _storage._videoStreamingStatus ?? WebRTCProtos_VideoStreamingStatus()}
|
||||
set {_uniqueStorage()._videoStreamingStatus = newValue}
|
||||
}
|
||||
/// Returns true if `videoStreamingStatus` has been explicitly set.
|
||||
var hasVideoStreamingStatus: Bool {return _storage._videoStreamingStatus != nil}
|
||||
/// Clears the value of `videoStreamingStatus`. Subsequent reads from it will return its default value.
|
||||
mutating func clearVideoStreamingStatus() {_storage._videoStreamingStatus = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _storage = _StorageClass.defaultInstance
|
||||
}
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
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"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularUInt64Field(value: &self._id)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if let v = self._id {
|
||||
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
func _protobuf_generated_isEqualTo(other: WebRTCProtos_Connected) -> Bool {
|
||||
if self._id != other._id {return false}
|
||||
if unknownFields != other.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
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"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularUInt64Field(value: &self._id)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if let v = self._id {
|
||||
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
func _protobuf_generated_isEqualTo(other: WebRTCProtos_Hangup) -> Bool {
|
||||
if self._id != other._id {return false}
|
||||
if unknownFields != other.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension WebRTCProtos_VideoStreamingStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".VideoStreamingStatus"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "id"),
|
||||
2: .same(proto: "enabled"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularUInt64Field(value: &self._id)
|
||||
case 2: try decoder.decodeSingularBoolField(value: &self._enabled)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if let v = self._id {
|
||||
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
|
||||
}
|
||||
if let v = self._enabled {
|
||||
try visitor.visitSingularBoolField(value: v, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
func _protobuf_generated_isEqualTo(other: WebRTCProtos_VideoStreamingStatus) -> Bool {
|
||||
if self._id != other._id {return false}
|
||||
if self._enabled != other._enabled {return false}
|
||||
if unknownFields != other.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension WebRTCProtos_Data: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Data"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "connected"),
|
||||
2: .same(proto: "hangup"),
|
||||
3: .same(proto: "videoStreamingStatus"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _connected: WebRTCProtos_Connected? = nil
|
||||
var _hangup: WebRTCProtos_Hangup? = nil
|
||||
var _videoStreamingStatus: WebRTCProtos_VideoStreamingStatus? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
private init() {}
|
||||
|
||||
init(copying source: _StorageClass) {
|
||||
_connected = source._connected
|
||||
_hangup = source._hangup
|
||||
_videoStreamingStatus = source._videoStreamingStatus
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate mutating func _uniqueStorage() -> _StorageClass {
|
||||
if !isKnownUniquelyReferenced(&_storage) {
|
||||
_storage = _StorageClass(copying: _storage)
|
||||
}
|
||||
return _storage
|
||||
}
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
_ = _uniqueStorage()
|
||||
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularMessageField(value: &_storage._connected)
|
||||
case 2: try decoder.decodeSingularMessageField(value: &_storage._hangup)
|
||||
case 3: try decoder.decodeSingularMessageField(value: &_storage._videoStreamingStatus)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
|
||||
if let v = _storage._connected {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
||||
}
|
||||
if let v = _storage._hangup {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
}
|
||||
if let v = _storage._videoStreamingStatus {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
||||
}
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
func _protobuf_generated_isEqualTo(other: WebRTCProtos_Data) -> Bool {
|
||||
if _storage !== other._storage {
|
||||
let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
|
||||
let _storage = _args.0
|
||||
let other_storage = _args.1
|
||||
if _storage._connected != other_storage._connected {return false}
|
||||
if _storage._hangup != other_storage._hangup {return false}
|
||||
if _storage._videoStreamingStatus != other_storage._videoStreamingStatus {return false}
|
||||
return true
|
||||
}
|
||||
if !storagesAreEqual {return false}
|
||||
}
|
||||
if unknownFields != other.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
@ -1,392 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// WARNING: This code is generated. Only edit within the markers.
|
||||
|
||||
public enum WebRTCProtoError: Error {
|
||||
case invalidProtobuf(description: String)
|
||||
}
|
||||
|
||||
// MARK: - WebRTCProtoConnected
|
||||
|
||||
@objc public class WebRTCProtoConnected: NSObject {
|
||||
|
||||
// MARK: - WebRTCProtoConnectedBuilder
|
||||
|
||||
@objc public class func builder(id: UInt64) -> WebRTCProtoConnectedBuilder {
|
||||
return WebRTCProtoConnectedBuilder(id: id)
|
||||
}
|
||||
|
||||
@objc public class WebRTCProtoConnectedBuilder: NSObject {
|
||||
|
||||
private var proto = WebRTCProtos_Connected()
|
||||
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc fileprivate init(id: UInt64) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
}
|
||||
|
||||
@objc public func setId(_ valueParam: UInt64) {
|
||||
proto.id = valueParam
|
||||
}
|
||||
|
||||
@objc public func build() throws -> WebRTCProtoConnected {
|
||||
return try WebRTCProtoConnected.parseProto(proto)
|
||||
}
|
||||
|
||||
@objc public func buildSerializedData() throws -> Data {
|
||||
return try WebRTCProtoConnected.parseProto(proto).serializedData()
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate let proto: WebRTCProtos_Connected
|
||||
|
||||
@objc public let id: UInt64
|
||||
|
||||
private init(proto: WebRTCProtos_Connected,
|
||||
id: UInt64) {
|
||||
self.proto = proto
|
||||
self.id = id
|
||||
}
|
||||
|
||||
@objc
|
||||
public func serializedData() throws -> Data {
|
||||
return try self.proto.serializedData()
|
||||
}
|
||||
|
||||
@objc public class func parseData(_ serializedData: Data) throws -> WebRTCProtoConnected {
|
||||
let proto = try WebRTCProtos_Connected(serializedData: serializedData)
|
||||
return try parseProto(proto)
|
||||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: WebRTCProtos_Connected) throws -> WebRTCProtoConnected {
|
||||
guard proto.hasID else {
|
||||
throw WebRTCProtoError.invalidProtobuf(description: "\(logTag) missing required field: id")
|
||||
}
|
||||
let id = proto.id
|
||||
|
||||
// MARK: - Begin Validation Logic for WebRTCProtoConnected -
|
||||
|
||||
// MARK: - End Validation Logic for WebRTCProtoConnected -
|
||||
|
||||
let result = WebRTCProtoConnected(proto: proto,
|
||||
id: id)
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
|
||||
extension WebRTCProtoConnected {
|
||||
@objc public func serializedDataIgnoringErrors() -> Data? {
|
||||
return try! self.serializedData()
|
||||
}
|
||||
}
|
||||
|
||||
extension WebRTCProtoConnected.WebRTCProtoConnectedBuilder {
|
||||
@objc public func buildIgnoringErrors() -> WebRTCProtoConnected? {
|
||||
return try! self.build()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MARK: - WebRTCProtoHangup
|
||||
|
||||
@objc public class WebRTCProtoHangup: NSObject {
|
||||
|
||||
// MARK: - WebRTCProtoHangupBuilder
|
||||
|
||||
@objc public class func builder(id: UInt64) -> WebRTCProtoHangupBuilder {
|
||||
return WebRTCProtoHangupBuilder(id: id)
|
||||
}
|
||||
|
||||
@objc public class WebRTCProtoHangupBuilder: NSObject {
|
||||
|
||||
private var proto = WebRTCProtos_Hangup()
|
||||
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc fileprivate init(id: UInt64) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
}
|
||||
|
||||
@objc public func setId(_ valueParam: UInt64) {
|
||||
proto.id = valueParam
|
||||
}
|
||||
|
||||
@objc public func build() throws -> WebRTCProtoHangup {
|
||||
return try WebRTCProtoHangup.parseProto(proto)
|
||||
}
|
||||
|
||||
@objc public func buildSerializedData() throws -> Data {
|
||||
return try WebRTCProtoHangup.parseProto(proto).serializedData()
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate let proto: WebRTCProtos_Hangup
|
||||
|
||||
@objc public let id: UInt64
|
||||
|
||||
private init(proto: WebRTCProtos_Hangup,
|
||||
id: UInt64) {
|
||||
self.proto = proto
|
||||
self.id = id
|
||||
}
|
||||
|
||||
@objc
|
||||
public func serializedData() throws -> Data {
|
||||
return try self.proto.serializedData()
|
||||
}
|
||||
|
||||
@objc public class func parseData(_ serializedData: Data) throws -> WebRTCProtoHangup {
|
||||
let proto = try WebRTCProtos_Hangup(serializedData: serializedData)
|
||||
return try parseProto(proto)
|
||||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: WebRTCProtos_Hangup) throws -> WebRTCProtoHangup {
|
||||
guard proto.hasID else {
|
||||
throw WebRTCProtoError.invalidProtobuf(description: "\(logTag) missing required field: id")
|
||||
}
|
||||
let id = proto.id
|
||||
|
||||
// MARK: - Begin Validation Logic for WebRTCProtoHangup -
|
||||
|
||||
// MARK: - End Validation Logic for WebRTCProtoHangup -
|
||||
|
||||
let result = WebRTCProtoHangup(proto: proto,
|
||||
id: id)
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
|
||||
extension WebRTCProtoHangup {
|
||||
@objc public func serializedDataIgnoringErrors() -> Data? {
|
||||
return try! self.serializedData()
|
||||
}
|
||||
}
|
||||
|
||||
extension WebRTCProtoHangup.WebRTCProtoHangupBuilder {
|
||||
@objc public func buildIgnoringErrors() -> WebRTCProtoHangup? {
|
||||
return try! self.build()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MARK: - WebRTCProtoVideoStreamingStatus
|
||||
|
||||
@objc public class WebRTCProtoVideoStreamingStatus: NSObject {
|
||||
|
||||
// MARK: - WebRTCProtoVideoStreamingStatusBuilder
|
||||
|
||||
@objc public class func builder(id: UInt64) -> WebRTCProtoVideoStreamingStatusBuilder {
|
||||
return WebRTCProtoVideoStreamingStatusBuilder(id: id)
|
||||
}
|
||||
|
||||
@objc public class WebRTCProtoVideoStreamingStatusBuilder: NSObject {
|
||||
|
||||
private var proto = WebRTCProtos_VideoStreamingStatus()
|
||||
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc fileprivate init(id: UInt64) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
}
|
||||
|
||||
@objc public func setId(_ valueParam: UInt64) {
|
||||
proto.id = valueParam
|
||||
}
|
||||
|
||||
@objc public func setEnabled(_ valueParam: Bool) {
|
||||
proto.enabled = valueParam
|
||||
}
|
||||
|
||||
@objc public func build() throws -> WebRTCProtoVideoStreamingStatus {
|
||||
return try WebRTCProtoVideoStreamingStatus.parseProto(proto)
|
||||
}
|
||||
|
||||
@objc public func buildSerializedData() throws -> Data {
|
||||
return try WebRTCProtoVideoStreamingStatus.parseProto(proto).serializedData()
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate let proto: WebRTCProtos_VideoStreamingStatus
|
||||
|
||||
@objc public let id: UInt64
|
||||
|
||||
@objc public var enabled: Bool {
|
||||
return proto.enabled
|
||||
}
|
||||
@objc public var hasEnabled: Bool {
|
||||
return proto.hasEnabled
|
||||
}
|
||||
|
||||
private init(proto: WebRTCProtos_VideoStreamingStatus,
|
||||
id: UInt64) {
|
||||
self.proto = proto
|
||||
self.id = id
|
||||
}
|
||||
|
||||
@objc
|
||||
public func serializedData() throws -> Data {
|
||||
return try self.proto.serializedData()
|
||||
}
|
||||
|
||||
@objc public class func parseData(_ serializedData: Data) throws -> WebRTCProtoVideoStreamingStatus {
|
||||
let proto = try WebRTCProtos_VideoStreamingStatus(serializedData: serializedData)
|
||||
return try parseProto(proto)
|
||||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: WebRTCProtos_VideoStreamingStatus) throws -> WebRTCProtoVideoStreamingStatus {
|
||||
guard proto.hasID else {
|
||||
throw WebRTCProtoError.invalidProtobuf(description: "\(logTag) missing required field: id")
|
||||
}
|
||||
let id = proto.id
|
||||
|
||||
// MARK: - Begin Validation Logic for WebRTCProtoVideoStreamingStatus -
|
||||
|
||||
// MARK: - End Validation Logic for WebRTCProtoVideoStreamingStatus -
|
||||
|
||||
let result = WebRTCProtoVideoStreamingStatus(proto: proto,
|
||||
id: id)
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
|
||||
extension WebRTCProtoVideoStreamingStatus {
|
||||
@objc public func serializedDataIgnoringErrors() -> Data? {
|
||||
return try! self.serializedData()
|
||||
}
|
||||
}
|
||||
|
||||
extension WebRTCProtoVideoStreamingStatus.WebRTCProtoVideoStreamingStatusBuilder {
|
||||
@objc public func buildIgnoringErrors() -> WebRTCProtoVideoStreamingStatus? {
|
||||
return try! self.build()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MARK: - WebRTCProtoData
|
||||
|
||||
@objc public class WebRTCProtoData: NSObject {
|
||||
|
||||
// MARK: - WebRTCProtoDataBuilder
|
||||
|
||||
@objc public class func builder() -> WebRTCProtoDataBuilder {
|
||||
return WebRTCProtoDataBuilder()
|
||||
}
|
||||
|
||||
@objc public class WebRTCProtoDataBuilder: NSObject {
|
||||
|
||||
private var proto = WebRTCProtos_Data()
|
||||
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setConnected(_ valueParam: WebRTCProtoConnected) {
|
||||
proto.connected = valueParam.proto
|
||||
}
|
||||
|
||||
@objc public func setHangup(_ valueParam: WebRTCProtoHangup) {
|
||||
proto.hangup = valueParam.proto
|
||||
}
|
||||
|
||||
@objc public func setVideoStreamingStatus(_ valueParam: WebRTCProtoVideoStreamingStatus) {
|
||||
proto.videoStreamingStatus = valueParam.proto
|
||||
}
|
||||
|
||||
@objc public func build() throws -> WebRTCProtoData {
|
||||
return try WebRTCProtoData.parseProto(proto)
|
||||
}
|
||||
|
||||
@objc public func buildSerializedData() throws -> Data {
|
||||
return try WebRTCProtoData.parseProto(proto).serializedData()
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate let proto: WebRTCProtos_Data
|
||||
|
||||
@objc public let connected: WebRTCProtoConnected?
|
||||
|
||||
@objc public let hangup: WebRTCProtoHangup?
|
||||
|
||||
@objc public let videoStreamingStatus: WebRTCProtoVideoStreamingStatus?
|
||||
|
||||
private init(proto: WebRTCProtos_Data,
|
||||
connected: WebRTCProtoConnected?,
|
||||
hangup: WebRTCProtoHangup?,
|
||||
videoStreamingStatus: WebRTCProtoVideoStreamingStatus?) {
|
||||
self.proto = proto
|
||||
self.connected = connected
|
||||
self.hangup = hangup
|
||||
self.videoStreamingStatus = videoStreamingStatus
|
||||
}
|
||||
|
||||
@objc
|
||||
public func serializedData() throws -> Data {
|
||||
return try self.proto.serializedData()
|
||||
}
|
||||
|
||||
@objc public class func parseData(_ serializedData: Data) throws -> WebRTCProtoData {
|
||||
let proto = try WebRTCProtos_Data(serializedData: serializedData)
|
||||
return try parseProto(proto)
|
||||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: WebRTCProtos_Data) throws -> WebRTCProtoData {
|
||||
var connected: WebRTCProtoConnected?
|
||||
if proto.hasConnected {
|
||||
connected = try WebRTCProtoConnected.parseProto(proto.connected)
|
||||
}
|
||||
|
||||
var hangup: WebRTCProtoHangup?
|
||||
if proto.hasHangup {
|
||||
hangup = try WebRTCProtoHangup.parseProto(proto.hangup)
|
||||
}
|
||||
|
||||
var videoStreamingStatus: WebRTCProtoVideoStreamingStatus?
|
||||
if proto.hasVideoStreamingStatus {
|
||||
videoStreamingStatus = try WebRTCProtoVideoStreamingStatus.parseProto(proto.videoStreamingStatus)
|
||||
}
|
||||
|
||||
// MARK: - Begin Validation Logic for WebRTCProtoData -
|
||||
|
||||
// MARK: - End Validation Logic for WebRTCProtoData -
|
||||
|
||||
let result = WebRTCProtoData(proto: proto,
|
||||
connected: connected,
|
||||
hangup: hangup,
|
||||
videoStreamingStatus: videoStreamingStatus)
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
|
||||
extension WebRTCProtoData {
|
||||
@objc public func serializedDataIgnoringErrors() -> Data? {
|
||||
return try! self.serializedData()
|
||||
}
|
||||
}
|
||||
|
||||
extension WebRTCProtoData.WebRTCProtoDataBuilder {
|
||||
@objc public func buildIgnoringErrors() -> WebRTCProtoData? {
|
||||
return try! self.build()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -137,7 +137,10 @@ class AudioWaveformProgressView: UIView {
|
||||
|
||||
playedShapeLayer.frame = layer.frame
|
||||
unplayedShapeLayer.frame = layer.frame
|
||||
thumbImageView.center = CGPoint(x: sampleHMargin + (samplesWidth * value), y: layer.frame.center.y)
|
||||
|
||||
var thumbXPos = sampleHMargin + (samplesWidth * value)
|
||||
if CurrentAppContext().isRTL { thumbXPos = samplesWidth - thumbXPos }
|
||||
thumbImageView.center = CGPoint(x: thumbXPos, y: layer.frame.center.y)
|
||||
|
||||
defer {
|
||||
playedShapeLayer.path = playedBezierPath.cgPath
|
||||
@ -161,10 +164,13 @@ class AudioWaveformProgressView: UIView {
|
||||
// Center the sample vertically.
|
||||
let yPos = frame.center.y - height / 2
|
||||
|
||||
var xPos = CGFloat(x) * (sampleWidth + sampleSpacing) + sampleHMargin
|
||||
if CurrentAppContext().isRTL { xPos = samplesWidth - xPos }
|
||||
|
||||
path.append(
|
||||
UIBezierPath(
|
||||
roundedRect: CGRect(
|
||||
x: CGFloat(x) * (sampleWidth + sampleSpacing) + sampleHMargin,
|
||||
x: xPos,
|
||||
y: yPos,
|
||||
width: sampleWidth,
|
||||
height: height
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -72,7 +72,7 @@ class NonCallKitCallUIAdaptee: NSObject, CallUIAdaptee {
|
||||
func answerCall(localId: UUID) {
|
||||
AssertIsOnMainThread()
|
||||
|
||||
guard let call = self.callService.call else {
|
||||
guard let call = self.callService.currentCall else {
|
||||
owsFailDebug("No current call.")
|
||||
return
|
||||
}
|
||||
@ -88,7 +88,7 @@ class NonCallKitCallUIAdaptee: NSObject, CallUIAdaptee {
|
||||
func answerCall(_ call: SignalCall) {
|
||||
AssertIsOnMainThread()
|
||||
|
||||
guard call.localId == self.callService.call?.localId else {
|
||||
guard call.localId == self.callService.currentCall?.localId else {
|
||||
owsFailDebug("localId does not match current call")
|
||||
return
|
||||
}
|
||||
@ -106,7 +106,7 @@ class NonCallKitCallUIAdaptee: NSObject, CallUIAdaptee {
|
||||
func localHangupCall(localId: UUID) {
|
||||
AssertIsOnMainThread()
|
||||
|
||||
guard let call = self.callService.call else {
|
||||
guard let call = self.callService.currentCall else {
|
||||
owsFailDebug("No current call.")
|
||||
return
|
||||
}
|
||||
@ -124,7 +124,7 @@ class NonCallKitCallUIAdaptee: NSObject, CallUIAdaptee {
|
||||
|
||||
// If both parties hang up at the same moment,
|
||||
// call might already be nil.
|
||||
guard self.callService.call == nil || call.localId == self.callService.call?.localId else {
|
||||
guard self.callService.currentCall == nil || call.localId == self.callService.currentCall?.localId else {
|
||||
owsFailDebug("localId does not match current call")
|
||||
return
|
||||
}
|
||||
@ -153,7 +153,7 @@ class NonCallKitCallUIAdaptee: NSObject, CallUIAdaptee {
|
||||
func setIsMuted(call: SignalCall, isMuted: Bool) {
|
||||
AssertIsOnMainThread()
|
||||
|
||||
guard call.localId == self.callService.call?.localId else {
|
||||
guard call.localId == self.callService.currentCall?.localId else {
|
||||
owsFailDebug("localId does not match current call")
|
||||
return
|
||||
}
|
||||
@ -164,7 +164,7 @@ class NonCallKitCallUIAdaptee: NSObject, CallUIAdaptee {
|
||||
func setHasLocalVideo(call: SignalCall, hasLocalVideo: Bool) {
|
||||
AssertIsOnMainThread()
|
||||
|
||||
guard call.localId == self.callService.call?.localId else {
|
||||
guard call.localId == self.callService.currentCall?.localId else {
|
||||
owsFailDebug("localId does not match current call")
|
||||
return
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -65,7 +65,7 @@ extension CallUIAdaptee {
|
||||
internal func startAndShowOutgoingCall(address: SignalServiceAddress, hasLocalVideo: Bool) {
|
||||
AssertIsOnMainThread()
|
||||
|
||||
guard self.callService.call == nil else {
|
||||
guard self.callService.currentCall == nil else {
|
||||
owsFailDebug("unexpectedly found an existing call when trying to start outgoing call: \(address)")
|
||||
return
|
||||
}
|
||||
|
||||
@ -823,6 +823,36 @@ typedef void (^OWSLoadedThumbnailSuccess)(OWSLoadedThumbnail *loadedThumbnail);
|
||||
}
|
||||
} else {
|
||||
AVURLAsset *asset = [AVURLAsset assetWithURL:self.originalMediaURL];
|
||||
|
||||
// If the asset isn't readable, we may not be able to generate a waveform for this file
|
||||
if (!asset.isReadable) {
|
||||
// Android sends voice messages in a hacky m4a container that we can't process
|
||||
// when it has the m4a extension. If we hint to the OS that it's an AAC file with
|
||||
// the file extension, we can. This is pretty brittle and hopefully android will
|
||||
// be able to fix the issue in the future in which case `isReadable` will become
|
||||
// true and this path will no longer be hit.
|
||||
if (self.isVoiceMessage && [self.originalFilePath hasSuffix:@"m4a"]) {
|
||||
NSString *symlinkPath = [self.uniqueIdAttachmentFolder stringByAppendingString:@"/Voice-Memo.aac"];
|
||||
if (![NSFileManager.defaultManager fileExistsAtPath:symlinkPath]) {
|
||||
[self ensureUniqueIdAttachmentFolder];
|
||||
NSError *error;
|
||||
[[NSFileManager defaultManager] createSymbolicLinkAtPath:symlinkPath
|
||||
withDestinationPath:self.originalFilePath
|
||||
error:&error];
|
||||
if (error) {
|
||||
OWSFailDebug(@"Failed to create voice memo symlink: %@", error);
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
asset = [AVURLAsset assetWithURL:[NSURL fileURLWithPath:symlinkPath]];
|
||||
}
|
||||
}
|
||||
|
||||
if (!asset.isReadable) {
|
||||
OWSFailDebug(@"unexpectedly encountered unreadable audio file.");
|
||||
return nil;
|
||||
}
|
||||
|
||||
waveform = [[AudioWaveform alloc] initWithAsset:asset];
|
||||
|
||||
// Listen for sampling completion so we can cache the final waveform to disk.
|
||||
|
||||
2
ThirdParty/WebRTC
vendored
2
ThirdParty/WebRTC
vendored
@ -1 +1 @@
|
||||
Subproject commit 7b0f20fdba38d3416412a3d34402d822654cdfec
|
||||
Subproject commit 22531e59a3ec75298c98947927c5d0a56cdfef2c
|
||||
@ -1,12 +0,0 @@
|
||||
PROTOC=protoc \
|
||||
--proto_path='./'
|
||||
WRAPPER_SCRIPT=../Scripts/ProtoWrappers.py \
|
||||
--proto-dir='./' --verbose
|
||||
|
||||
all: webrtc_data_proto
|
||||
|
||||
webrtc_data_proto: OWSWebRTCDataProtos.proto
|
||||
$(PROTOC) --swift_out=../Signal/src/Generated \
|
||||
OWSWebRTCDataProtos.proto
|
||||
$(WRAPPER_SCRIPT) --dst-dir=../Signal/src/Generated \
|
||||
--wrapper-prefix=WebRTCProto --proto-prefix=WebRTCProtos --proto-file=OWSWebRTCDataProtos.proto
|
||||
@ -1,37 +0,0 @@
|
||||
/**
|
||||
* Copyright (C) 2014-2016 Open Whisper Systems
|
||||
*
|
||||
* Licensed according to the LICENSE file in this repository.
|
||||
*/
|
||||
|
||||
// iOS - since we use a modern proto-compiler, we must specify
|
||||
// the legacy proto format.
|
||||
syntax = "proto2";
|
||||
|
||||
// iOS - package name determines class prefix
|
||||
package WebRTCProtos;
|
||||
|
||||
option java_package = "org.thoughtcrime.securesms.webrtc";
|
||||
option java_outer_classname = "WebRtcDataProtos";
|
||||
|
||||
message Connected {
|
||||
// @required
|
||||
optional uint64 id = 1;
|
||||
}
|
||||
|
||||
message Hangup {
|
||||
// @required
|
||||
optional uint64 id = 1;
|
||||
}
|
||||
|
||||
message VideoStreamingStatus {
|
||||
// @required
|
||||
optional uint64 id = 1;
|
||||
optional bool enabled = 2;
|
||||
}
|
||||
|
||||
message Data {
|
||||
optional Connected connected = 1;
|
||||
optional Hangup hangup = 2;
|
||||
optional VideoStreamingStatus videoStreamingStatus = 3;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user