mirror of https://github.com/oxen-io/session-ios
Migrate call proto wrappers.
parent
94675e880a
commit
32d0f23b22
@ -1,30 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class SSKProtoCallMessageIceUpdate;
|
||||
|
||||
/**
|
||||
* Sent by both parties out of band of the RTC calling channels, as part of setting up those channels. The messages
|
||||
* include network accessability information from the perspective of each client. Once compatible ICEUpdates have been
|
||||
* exchanged, the clients can connect directly.
|
||||
*/
|
||||
@interface OWSCallIceUpdateMessage : NSObject
|
||||
|
||||
- (instancetype)initWithCallId:(UInt64)callId
|
||||
sdp:(NSString *)sdp
|
||||
sdpMLineIndex:(SInt32)sdpMLineIndex
|
||||
sdpMid:(nullable NSString *)sdpMid;
|
||||
|
||||
@property (nonatomic, readonly) UInt64 callId;
|
||||
@property (nonatomic, readonly, copy) NSString *sdp;
|
||||
@property (nonatomic, readonly) SInt32 sdpMLineIndex;
|
||||
@property (nullable, nonatomic, readonly, copy) NSString *sdpMid;
|
||||
|
||||
- (nullable SSKProtoCallMessageIceUpdate *)asProtobuf;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,47 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "OWSCallIceUpdateMessage.h"
|
||||
#import <SignalServiceKit/SignalServiceKit-Swift.h>
|
||||
|
||||
@implementation OWSCallIceUpdateMessage
|
||||
|
||||
- (instancetype)initWithCallId:(UInt64)callId
|
||||
sdp:(NSString *)sdp
|
||||
sdpMLineIndex:(SInt32)sdpMLineIndex
|
||||
sdpMid:(nullable NSString *)sdpMid
|
||||
{
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
_callId = callId;
|
||||
_sdp = sdp;
|
||||
_sdpMLineIndex = sdpMLineIndex;
|
||||
_sdpMid = sdpMid;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (nullable SSKProtoCallMessageIceUpdate *)asProtobuf
|
||||
{
|
||||
SSKProtoCallMessageIceUpdateBuilder *builder =
|
||||
[SSKProtoCallMessageIceUpdateBuilder new];
|
||||
|
||||
[builder setId:self.callId];
|
||||
[builder setSdp:self.sdp];
|
||||
[builder setSdpMlineIndex:self.sdpMLineIndex];
|
||||
[builder setSdpMid:self.sdpMid];
|
||||
|
||||
NSError *error;
|
||||
SSKProtoCallMessageIceUpdate *_Nullable result = [builder buildAndReturnError:&error];
|
||||
if (error || !result) {
|
||||
OWSFail(@"%@ could not build protobuf: %@", self.logTag, error);
|
||||
return nil;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in New Issue