Repsond to CR w/ @cmchen.

* Added docs
* added asserts to TSEnv accessors

// FREEBIE
pull/1/head
Michael Kirk 9 years ago
parent 80fb58231e
commit 92a69e8e65

@ -1,10 +1,14 @@
// Created by Michael Kirk on 12/1/16.
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
@class OWSSignalServiceProtosCallMessageAnswer;
/**
* Sent by the call recipient upon accepting a CallOffer
*/
@interface OWSCallAnswerMessage : NSObject
- (instancetype)initWithCallId:(UInt64)callId sessionDescription:(NSString *)sessionDescription;

@ -1,5 +1,6 @@
// Created by Michael Kirk on 12/1/16.
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "OWSOutgoingCallMessage.h"
@ -7,6 +8,9 @@ NS_ASSUME_NONNULL_BEGIN
@class OWSSignalServiceProtosCallMessageBusy;
/**
* Sent by the call recipient after receiving a call offer when they are already in a call.
*/
@interface OWSCallBusyMessage : OWSOutgoingCallMessage
- (instancetype)initWithCallId:(UInt64)callId;

@ -1,5 +1,6 @@
// Created by Michael Kirk on 12/1/16.
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "OWSCallBusyMessage.h"
#import "OWSSignalServiceProtos.pb.h"
@ -29,7 +30,6 @@ NS_ASSUME_NONNULL_BEGIN
return [builder build];
}
@end
NS_ASSUME_NONNULL_END

@ -1,5 +1,6 @@
// Created by Michael Kirk on 12/8/16.
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "OWSOutgoingCallMessage.h"
@ -7,6 +8,9 @@ NS_ASSUME_NONNULL_BEGIN
@class OWSSignalServiceProtosCallMessageHangup;
/**
* Sent by either party in a call to indicate the user intentionally ended the call.
*/
@interface OWSCallHangupMessage : OWSOutgoingCallMessage
- (instancetype)initWithCallId:(UInt64)callId;

@ -1,10 +1,16 @@
// Created by Michael Kirk on 12/6/16.
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
@class OWSSignalServiceProtosCallMessageIceUpdate;
/**
* 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

@ -1,10 +1,14 @@
// Created by Michael Kirk on 12/1/16.
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
@class OWSSignalServiceProtosCallMessageOffer;
/**
* Sent by the call initiator to Signal their intention to set up a call with the recipient.
*/
@interface OWSCallOfferMessage : NSObject
- (instancetype)initWithCallId:(UInt64)callId sessionDescription:(NSString *)sessionDescription;

@ -1,5 +1,6 @@
// Created by Michael Kirk on 12/1/16.
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "TSOutgoingMessage.h"
@ -13,6 +14,9 @@ NS_ASSUME_NONNULL_BEGIN
@class TSThread;
/**
* WebRTC call signaling sent out of band, via the Signal Service
*/
@interface OWSOutgoingCallMessage : TSOutgoingMessage
- (instancetype)initWithThread:(TSThread *)thread offerMessage:(OWSCallOfferMessage *)offerMessage;

@ -1,10 +1,14 @@
// Created by Michael Kirk on 11/12/16.
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "TSRequest.h"
NS_ASSUME_NONNULL_BEGIN
/**
* Fetch a list of viable ICE candidates (including TURN and STUN) used for the WebRTC call signaling process.
*/
NS_SWIFT_NAME(TurnServerInfoRequest)
@interface OWSTurnServerInfoRequest : TSRequest

@ -1,6 +1,6 @@
// Created by Frederic Jacobs on 05/12/15.
// Copyright © 2015 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "TextSecureKitEnv.h"
@ -44,12 +44,28 @@ static TextSecureKitEnv *TextSecureKitEnvSharedInstance;
}
}
- (id<ContactsManagerProtocol>)contactsManager {
#pragma mark - getters
- (id<OWSCallMessageHandler>)callMessageHandler
{
NSAssert(_callMessageHandler, @"Trying to access the callMessageHandler before it's set.");
return _callMessageHandler;
}
- (id<ContactsManagerProtocol>)contactsManager
{
NSAssert(_contactsManager, @"Trying to access the contactsManager before it's set.");
return _contactsManager;
}
- (id<NotificationsProtocol>)notificationsManager
{
NSAssert(_notificationsManager, @"Trying to access the notificationsManager before it's set.");
return _notificationsManager;
}
@end
NS_ASSUME_NONNULL_END

Loading…
Cancel
Save