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 NS_ASSUME_NONNULL_BEGIN
@class OWSSignalServiceProtosCallMessageAnswer; @class OWSSignalServiceProtosCallMessageAnswer;
/**
* Sent by the call recipient upon accepting a CallOffer
*/
@interface OWSCallAnswerMessage : NSObject @interface OWSCallAnswerMessage : NSObject
- (instancetype)initWithCallId:(UInt64)callId sessionDescription:(NSString *)sessionDescription; - (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" #import "OWSOutgoingCallMessage.h"
@ -7,6 +8,9 @@ NS_ASSUME_NONNULL_BEGIN
@class OWSSignalServiceProtosCallMessageBusy; @class OWSSignalServiceProtosCallMessageBusy;
/**
* Sent by the call recipient after receiving a call offer when they are already in a call.
*/
@interface OWSCallBusyMessage : OWSOutgoingCallMessage @interface OWSCallBusyMessage : OWSOutgoingCallMessage
- (instancetype)initWithCallId:(UInt64)callId; - (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 "OWSCallBusyMessage.h"
#import "OWSSignalServiceProtos.pb.h" #import "OWSSignalServiceProtos.pb.h"
@ -29,7 +30,6 @@ NS_ASSUME_NONNULL_BEGIN
return [builder build]; return [builder build];
} }
@end @end
NS_ASSUME_NONNULL_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" #import "OWSOutgoingCallMessage.h"
@ -7,6 +8,9 @@ NS_ASSUME_NONNULL_BEGIN
@class OWSSignalServiceProtosCallMessageHangup; @class OWSSignalServiceProtosCallMessageHangup;
/**
* Sent by either party in a call to indicate the user intentionally ended the call.
*/
@interface OWSCallHangupMessage : OWSOutgoingCallMessage @interface OWSCallHangupMessage : OWSOutgoingCallMessage
- (instancetype)initWithCallId:(UInt64)callId; - (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 NS_ASSUME_NONNULL_BEGIN
@class OWSSignalServiceProtosCallMessageIceUpdate; @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 @interface OWSCallIceUpdateMessage : NSObject
- (instancetype)initWithCallId:(UInt64)callId - (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 NS_ASSUME_NONNULL_BEGIN
@class OWSSignalServiceProtosCallMessageOffer; @class OWSSignalServiceProtosCallMessageOffer;
/**
* Sent by the call initiator to Signal their intention to set up a call with the recipient.
*/
@interface OWSCallOfferMessage : NSObject @interface OWSCallOfferMessage : NSObject
- (instancetype)initWithCallId:(UInt64)callId sessionDescription:(NSString *)sessionDescription; - (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" #import "TSOutgoingMessage.h"
@ -13,6 +14,9 @@ NS_ASSUME_NONNULL_BEGIN
@class TSThread; @class TSThread;
/**
* WebRTC call signaling sent out of band, via the Signal Service
*/
@interface OWSOutgoingCallMessage : TSOutgoingMessage @interface OWSOutgoingCallMessage : TSOutgoingMessage
- (instancetype)initWithThread:(TSThread *)thread offerMessage:(OWSCallOfferMessage *)offerMessage; - (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" #import "TSRequest.h"
NS_ASSUME_NONNULL_BEGIN 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) NS_SWIFT_NAME(TurnServerInfoRequest)
@interface OWSTurnServerInfoRequest : TSRequest @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" #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."); NSAssert(_contactsManager, @"Trying to access the contactsManager before it's set.");
return _contactsManager; return _contactsManager;
} }
- (id<NotificationsProtocol>)notificationsManager
{
NSAssert(_notificationsManager, @"Trying to access the notificationsManager before it's set.");
return _notificationsManager;
}
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

Loading…
Cancel
Save