| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright 2014 The WebRTC Project Authors. All rights reserved. | 2  *  Copyright 2014 The WebRTC Project Authors. All rights reserved. | 
| 3  * | 3  * | 
| 4  *  Use of this source code is governed by a BSD-style license | 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 | 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 | 6  *  tree. An additional intellectual property rights grant can be found | 
| 7  *  in the file PATENTS.  All contributing project authors may | 7  *  in the file PATENTS.  All contributing project authors may | 
| 8  *  be found in the AUTHORS file in the root of the source tree. | 8  *  be found in the AUTHORS file in the root of the source tree. | 
| 9  */ | 9  */ | 
| 10 | 10 | 
| 11 #import "ARDAppClient+Internal.h" | 11 #import "ARDAppClient+Internal.h" | 
| 12 | 12 | 
| 13 #if defined(WEBRTC_IOS) | 13 #if defined(WEBRTC_IOS) | 
| 14 #import "webrtc/base/objc/RTCTracing.h" | 14 #import "WebRTC/RTCAVFoundationVideoSource.h" | 
| 15 #import "webrtc/api/objc/RTCAVFoundationVideoSource.h" | 15 #import "WebRTC/RTCTracing.h" | 
| 16 #endif | 16 #endif | 
| 17 #import "webrtc/api/objc/RTCAudioTrack.h" | 17 #import "WebRTC/RTCAudioTrack.h" | 
| 18 #import "webrtc/api/objc/RTCConfiguration.h" | 18 #import "WebRTC/RTCConfiguration.h" | 
| 19 #import "webrtc/api/objc/RTCIceServer.h" | 19 #import "WebRTC/RTCFileLogger.h" | 
| 20 #import "webrtc/api/objc/RTCMediaConstraints.h" | 20 #import "WebRTC/RTCIceServer.h" | 
| 21 #import "webrtc/api/objc/RTCMediaStream.h" | 21 #import "WebRTC/RTCLogging.h" | 
| 22 #import "webrtc/api/objc/RTCPeerConnectionFactory.h" | 22 #import "WebRTC/RTCMediaConstraints.h" | 
| 23 #import "webrtc/base/objc/RTCFileLogger.h" | 23 #import "WebRTC/RTCMediaStream.h" | 
| 24 #import "webrtc/base/objc/RTCLogging.h" | 24 #import "WebRTC/RTCPeerConnectionFactory.h" | 
| 25 | 25 | 
| 26 #import "ARDAppEngineClient.h" | 26 #import "ARDAppEngineClient.h" | 
| 27 #import "ARDCEODTURNClient.h" | 27 #import "ARDCEODTURNClient.h" | 
| 28 #import "ARDJoinResponse.h" | 28 #import "ARDJoinResponse.h" | 
| 29 #import "ARDMessageResponse.h" | 29 #import "ARDMessageResponse.h" | 
| 30 #import "ARDSDPUtils.h" | 30 #import "ARDSDPUtils.h" | 
| 31 #import "ARDSignalingMessage.h" | 31 #import "ARDSignalingMessage.h" | 
| 32 #import "ARDUtilities.h" | 32 #import "ARDUtilities.h" | 
| 33 #import "ARDWebSocketChannel.h" | 33 #import "ARDWebSocketChannel.h" | 
| 34 #import "RTCIceCandidate+JSON.h" | 34 #import "RTCIceCandidate+JSON.h" | 
| 35 #import "RTCSessionDescription+JSON.h" | 35 #import "RTCSessionDescription+JSON.h" | 
| 36 | 36 | 
| 37 static NSString * const kARDDefaultSTUNServerUrl = | 37 static NSString * const kARDDefaultSTUNServerUrl = | 
| 38     @"stun:stun.l.google.com:19302"; | 38     @"stun:stun.l.google.com:19302"; | 
| 39 // TODO(tkchin): figure out a better username for CEOD statistics. | 39 // TODO(tkchin): figure out a better username for CEOD statistics. | 
| 40 static NSString * const kARDTurnRequestUrl = | 40 static NSString * const kARDTurnRequestUrl = | 
| 41     @"https://computeengineondemand.appspot.com" | 41     @"https://computeengineondemand.appspot.com" | 
| 42     @"/turn?username=iapprtc&key=4080218913"; | 42     @"/turn?username=iapprtc&key=4080218913"; | 
| 43 | 43 | 
| 44 static NSString * const kARDAppClientErrorDomain = @"ARDAppClient"; | 44 static NSString * const kARDAppClientErrorDomain = @"ARDAppClient"; | 
| 45 static NSInteger const kARDAppClientErrorUnknown = -1; | 45 static NSInteger const kARDAppClientErrorUnknown = -1; | 
| 46 static NSInteger const kARDAppClientErrorRoomFull = -2; | 46 static NSInteger const kARDAppClientErrorRoomFull = -2; | 
| 47 static NSInteger const kARDAppClientErrorCreateSDP = -3; | 47 static NSInteger const kARDAppClientErrorCreateSDP = -3; | 
| 48 static NSInteger const kARDAppClientErrorSetSDP = -4; | 48 static NSInteger const kARDAppClientErrorSetSDP = -4; | 
| 49 static NSInteger const kARDAppClientErrorInvalidClient = -5; | 49 static NSInteger const kARDAppClientErrorInvalidClient = -5; | 
| 50 static NSInteger const kARDAppClientErrorInvalidRoom = -6; | 50 static NSInteger const kARDAppClientErrorInvalidRoom = -6; | 
| 51 | 51 | 
| 52 // TODO(tkchin): Remove guard once rtc_base_objc compiles on Mac. | 52 // TODO(tkchin): Remove guard once rtc_sdk_common_objc compiles on Mac. | 
| 53 #if defined(WEBRTC_IOS) | 53 #if defined(WEBRTC_IOS) | 
| 54 // TODO(tkchin): Add this as a UI option. | 54 // TODO(tkchin): Add this as a UI option. | 
| 55 static BOOL const kARDAppClientEnableTracing = NO; | 55 static BOOL const kARDAppClientEnableTracing = NO; | 
| 56 #endif | 56 #endif | 
| 57 | 57 | 
| 58 // We need a proxy to NSTimer because it causes a strong retain cycle. When | 58 // We need a proxy to NSTimer because it causes a strong retain cycle. When | 
| 59 // using the proxy, |invalidate| must be called before it properly deallocs. | 59 // using the proxy, |invalidate| must be called before it properly deallocs. | 
| 60 @interface ARDTimerProxy : NSObject | 60 @interface ARDTimerProxy : NSObject | 
| 61 | 61 | 
| 62 - (instancetype)initWithInterval:(NSTimeInterval)interval | 62 - (instancetype)initWithInterval:(NSTimeInterval)interval | 
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 760                                          code:kARDAppClientErrorInvalidRoom | 760                                          code:kARDAppClientErrorInvalidRoom | 
| 761                                      userInfo:@{ | 761                                      userInfo:@{ | 
| 762         NSLocalizedDescriptionKey: @"Invalid room.", | 762         NSLocalizedDescriptionKey: @"Invalid room.", | 
| 763       }]; | 763       }]; | 
| 764       break; | 764       break; | 
| 765   } | 765   } | 
| 766   return error; | 766   return error; | 
| 767 } | 767 } | 
| 768 | 768 | 
| 769 @end | 769 @end | 
| OLD | NEW | 
|---|