mirror of https://github.com/oxen-io/session-ios
Migrate call proto wrappers.
parent
32d0f23b22
commit
135a1655fd
@ -1,24 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "OWSOutgoingCallMessage.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class SSKProtoCallMessageHangup;
|
||||
|
||||
/**
|
||||
* Sent by either party in a call to indicate the user intentionally ended the call.
|
||||
*/
|
||||
@interface OWSCallHangupMessage : OWSOutgoingCallMessage
|
||||
|
||||
- (instancetype)initWithCallId:(UInt64)callId;
|
||||
|
||||
@property (nonatomic, readonly) UInt64 callId;
|
||||
|
||||
- (nullable SSKProtoCallMessageHangup *)asProtobuf;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,42 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "OWSCallHangupMessage.h"
|
||||
#import <SignalServiceKit/SignalServiceKit-Swift.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@implementation OWSCallHangupMessage
|
||||
|
||||
- (instancetype)initWithCallId:(UInt64)callId
|
||||
{
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
_callId = callId;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (nullable SSKProtoCallMessageHangup *)asProtobuf
|
||||
{
|
||||
SSKProtoCallMessageHangupBuilder *builder = [SSKProtoCallMessageHangupBuilder new];
|
||||
|
||||
builder.id = self.callId;
|
||||
|
||||
NSError *error;
|
||||
SSKProtoCallMessageHangup *_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