Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 The WebRTC Project Authors. All rights reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #import "ARDAppClient.h" |
| 12 | |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 13 | #import "WebRTC/RTCPeerConnection.h" |
hjon | 79858f8 | 2016-03-13 22:08:26 -0700 | [diff] [blame] | 14 | |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 15 | #import "ARDRoomServerClient.h" |
| 16 | #import "ARDSignalingChannel.h" |
| 17 | #import "ARDTURNClient.h" |
hjon | 79858f8 | 2016-03-13 22:08:26 -0700 | [diff] [blame] | 18 | |
| 19 | @class RTCPeerConnectionFactory; |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 20 | |
| 21 | @interface ARDAppClient () <ARDSignalingChannelDelegate, |
hjon | 79858f8 | 2016-03-13 22:08:26 -0700 | [diff] [blame] | 22 | RTCPeerConnectionDelegate> |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 23 | |
| 24 | // All properties should only be mutated from the main queue. |
| 25 | @property(nonatomic, strong) id<ARDRoomServerClient> roomServerClient; |
| 26 | @property(nonatomic, strong) id<ARDSignalingChannel> channel; |
haysc | 913e645 | 2015-10-02 11:44:03 -0700 | [diff] [blame] | 27 | @property(nonatomic, strong) id<ARDSignalingChannel> loopbackChannel; |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 28 | @property(nonatomic, strong) id<ARDTURNClient> turnClient; |
| 29 | |
| 30 | @property(nonatomic, strong) RTCPeerConnection *peerConnection; |
| 31 | @property(nonatomic, strong) RTCPeerConnectionFactory *factory; |
| 32 | @property(nonatomic, strong) NSMutableArray *messageQueue; |
| 33 | |
| 34 | @property(nonatomic, assign) BOOL isTurnComplete; |
| 35 | @property(nonatomic, assign) BOOL hasReceivedSdp; |
| 36 | @property(nonatomic, readonly) BOOL hasJoinedRoomServerRoom; |
| 37 | |
| 38 | @property(nonatomic, strong) NSString *roomId; |
| 39 | @property(nonatomic, strong) NSString *clientId; |
| 40 | @property(nonatomic, assign) BOOL isInitiator; |
| 41 | @property(nonatomic, strong) NSMutableArray *iceServers; |
| 42 | @property(nonatomic, strong) NSURL *webSocketURL; |
| 43 | @property(nonatomic, strong) NSURL *webSocketRestURL; |
haysc | 913e645 | 2015-10-02 11:44:03 -0700 | [diff] [blame] | 44 | @property(nonatomic, readonly) BOOL isLoopback; |
| 45 | @property(nonatomic, readonly) BOOL isAudioOnly; |
peah | 5085b0c | 2016-08-25 22:15:14 -0700 | [diff] [blame] | 46 | @property(nonatomic, readonly) BOOL shouldMakeAecDump; |
| 47 | @property(nonatomic, assign) BOOL isAecDumpActive; |
tkchin | ab1293a | 2016-08-30 12:35:05 -0700 | [diff] [blame^] | 48 | @property(nonatomic, readonly) BOOL shouldUseLevelControl; |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 49 | |
| 50 | @property(nonatomic, strong) |
| 51 | RTCMediaConstraints *defaultPeerConnectionConstraints; |
| 52 | |
| 53 | - (instancetype)initWithRoomServerClient:(id<ARDRoomServerClient>)rsClient |
| 54 | signalingChannel:(id<ARDSignalingChannel>)channel |
| 55 | turnClient:(id<ARDTURNClient>)turnClient |
| 56 | delegate:(id<ARDAppClientDelegate>)delegate; |
| 57 | |
| 58 | @end |