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 | |
| 13 | #import "ARDRoomServerClient.h" |
| 14 | #import "ARDSignalingChannel.h" |
| 15 | #import "ARDTURNClient.h" |
| 16 | #import "RTCPeerConnection.h" |
| 17 | #import "RTCPeerConnectionDelegate.h" |
| 18 | #import "RTCPeerConnectionFactory.h" |
| 19 | #import "RTCSessionDescriptionDelegate.h" |
Zeke Chin | d332580 | 2015-08-14 11:00:02 -0700 | [diff] [blame] | 20 | #import "RTCStatsDelegate.h" |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 21 | |
| 22 | @interface ARDAppClient () <ARDSignalingChannelDelegate, |
Zeke Chin | d332580 | 2015-08-14 11:00:02 -0700 | [diff] [blame] | 23 | RTCPeerConnectionDelegate, RTCSessionDescriptionDelegate, RTCStatsDelegate> |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 24 | |
| 25 | // All properties should only be mutated from the main queue. |
| 26 | @property(nonatomic, strong) id<ARDRoomServerClient> roomServerClient; |
| 27 | @property(nonatomic, strong) id<ARDSignalingChannel> channel; |
haysc | 913e645 | 2015-10-02 11:44:03 -0700 | [diff] [blame^] | 28 | @property(nonatomic, strong) id<ARDSignalingChannel> loopbackChannel; |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 29 | @property(nonatomic, strong) id<ARDTURNClient> turnClient; |
| 30 | |
| 31 | @property(nonatomic, strong) RTCPeerConnection *peerConnection; |
| 32 | @property(nonatomic, strong) RTCPeerConnectionFactory *factory; |
| 33 | @property(nonatomic, strong) NSMutableArray *messageQueue; |
| 34 | |
| 35 | @property(nonatomic, assign) BOOL isTurnComplete; |
| 36 | @property(nonatomic, assign) BOOL hasReceivedSdp; |
| 37 | @property(nonatomic, readonly) BOOL hasJoinedRoomServerRoom; |
| 38 | |
| 39 | @property(nonatomic, strong) NSString *roomId; |
| 40 | @property(nonatomic, strong) NSString *clientId; |
| 41 | @property(nonatomic, assign) BOOL isInitiator; |
| 42 | @property(nonatomic, strong) NSMutableArray *iceServers; |
| 43 | @property(nonatomic, strong) NSURL *webSocketURL; |
| 44 | @property(nonatomic, strong) NSURL *webSocketRestURL; |
haysc | 913e645 | 2015-10-02 11:44:03 -0700 | [diff] [blame^] | 45 | @property(nonatomic, readonly) BOOL isLoopback; |
| 46 | @property(nonatomic, readonly) BOOL isAudioOnly; |
Donald E Curtis | a873644 | 2015-08-05 15:48:13 -0700 | [diff] [blame] | 47 | |
| 48 | @property(nonatomic, strong) |
| 49 | RTCMediaConstraints *defaultPeerConnectionConstraints; |
| 50 | |
| 51 | - (instancetype)initWithRoomServerClient:(id<ARDRoomServerClient>)rsClient |
| 52 | signalingChannel:(id<ARDSignalingChannel>)channel |
| 53 | turnClient:(id<ARDTURNClient>)turnClient |
| 54 | delegate:(id<ARDAppClientDelegate>)delegate; |
| 55 | |
| 56 | @end |