mirror of https://github.com/oxen-io/session-ios
Migrate call proto wrappers.
parent
135a1655fd
commit
dc012d46e4
@ -1,24 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "OWSOutgoingCallMessage.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class SSKProtoCallMessageBusy;
|
||||
|
||||
/**
|
||||
* Sent by the call recipient after receiving a call offer when they are already in a call.
|
||||
*/
|
||||
@interface OWSCallBusyMessage : OWSOutgoingCallMessage
|
||||
|
||||
- (instancetype)initWithCallId:(UInt64)callId;
|
||||
|
||||
@property (nonatomic, readonly) UInt64 callId;
|
||||
|
||||
- (nullable SSKProtoCallMessageBusy *)asProtobuf;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,41 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "OWSCallBusyMessage.h"
|
||||
#import <SignalServiceKit/SignalServiceKit-Swift.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@implementation OWSCallBusyMessage
|
||||
|
||||
- (instancetype)initWithCallId:(UInt64)callId
|
||||
{
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
_callId = callId;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (nullable SSKProtoCallMessageBusy *)asProtobuf
|
||||
{
|
||||
SSKProtoCallMessageBusyBuilder *builder = [SSKProtoCallMessageBusyBuilder new];
|
||||
|
||||
builder.id = self.callId;
|
||||
|
||||
NSError *error;
|
||||
SSKProtoCallMessageBusy *_Nullable result = [builder buildAndReturnError:&error];
|
||||
if (error || !result) {
|
||||
OWSFail(@"%@ could not build protobuf: %@", self.logTag, error);
|
||||
return nil;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
Loading…
Reference in New Issue