| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 case RTCIceConnectionStateConnected: | 376 case RTCIceConnectionStateConnected: |
| 377 return webrtc::PeerConnectionInterface::kIceConnectionConnected; | 377 return webrtc::PeerConnectionInterface::kIceConnectionConnected; |
| 378 case RTCIceConnectionStateCompleted: | 378 case RTCIceConnectionStateCompleted: |
| 379 return webrtc::PeerConnectionInterface::kIceConnectionCompleted; | 379 return webrtc::PeerConnectionInterface::kIceConnectionCompleted; |
| 380 case RTCIceConnectionStateFailed: | 380 case RTCIceConnectionStateFailed: |
| 381 return webrtc::PeerConnectionInterface::kIceConnectionFailed; | 381 return webrtc::PeerConnectionInterface::kIceConnectionFailed; |
| 382 case RTCIceConnectionStateDisconnected: | 382 case RTCIceConnectionStateDisconnected: |
| 383 return webrtc::PeerConnectionInterface::kIceConnectionDisconnected; | 383 return webrtc::PeerConnectionInterface::kIceConnectionDisconnected; |
| 384 case RTCIceConnectionStateClosed: | 384 case RTCIceConnectionStateClosed: |
| 385 return webrtc::PeerConnectionInterface::kIceConnectionClosed; | 385 return webrtc::PeerConnectionInterface::kIceConnectionClosed; |
| 386 case RTCIceConnectionStateMax: | 386 case RTCIceConnectionStateCount: |
| 387 return webrtc::PeerConnectionInterface::kIceConnectionMax; | 387 return webrtc::PeerConnectionInterface::kIceConnectionMax; |
| 388 } | 388 } |
| 389 } | 389 } |
| 390 | 390 |
| 391 + (RTCIceConnectionState)iceConnectionStateForNativeState: | 391 + (RTCIceConnectionState)iceConnectionStateForNativeState: |
| 392 (webrtc::PeerConnectionInterface::IceConnectionState)nativeState { | 392 (webrtc::PeerConnectionInterface::IceConnectionState)nativeState { |
| 393 switch (nativeState) { | 393 switch (nativeState) { |
| 394 case webrtc::PeerConnectionInterface::kIceConnectionNew: | 394 case webrtc::PeerConnectionInterface::kIceConnectionNew: |
| 395 return RTCIceConnectionStateNew; | 395 return RTCIceConnectionStateNew; |
| 396 case webrtc::PeerConnectionInterface::kIceConnectionChecking: | 396 case webrtc::PeerConnectionInterface::kIceConnectionChecking: |
| 397 return RTCIceConnectionStateChecking; | 397 return RTCIceConnectionStateChecking; |
| 398 case webrtc::PeerConnectionInterface::kIceConnectionConnected: | 398 case webrtc::PeerConnectionInterface::kIceConnectionConnected: |
| 399 return RTCIceConnectionStateConnected; | 399 return RTCIceConnectionStateConnected; |
| 400 case webrtc::PeerConnectionInterface::kIceConnectionCompleted: | 400 case webrtc::PeerConnectionInterface::kIceConnectionCompleted: |
| 401 return RTCIceConnectionStateCompleted; | 401 return RTCIceConnectionStateCompleted; |
| 402 case webrtc::PeerConnectionInterface::kIceConnectionFailed: | 402 case webrtc::PeerConnectionInterface::kIceConnectionFailed: |
| 403 return RTCIceConnectionStateFailed; | 403 return RTCIceConnectionStateFailed; |
| 404 case webrtc::PeerConnectionInterface::kIceConnectionDisconnected: | 404 case webrtc::PeerConnectionInterface::kIceConnectionDisconnected: |
| 405 return RTCIceConnectionStateDisconnected; | 405 return RTCIceConnectionStateDisconnected; |
| 406 case webrtc::PeerConnectionInterface::kIceConnectionClosed: | 406 case webrtc::PeerConnectionInterface::kIceConnectionClosed: |
| 407 return RTCIceConnectionStateClosed; | 407 return RTCIceConnectionStateClosed; |
| 408 case webrtc::PeerConnectionInterface::kIceConnectionMax: | 408 case webrtc::PeerConnectionInterface::kIceConnectionMax: |
| 409 return RTCIceConnectionStateMax; | 409 return RTCIceConnectionStateCount; |
| 410 } | 410 } |
| 411 } | 411 } |
| 412 | 412 |
| 413 + (NSString *)stringForIceConnectionState:(RTCIceConnectionState)state { | 413 + (NSString *)stringForIceConnectionState:(RTCIceConnectionState)state { |
| 414 switch (state) { | 414 switch (state) { |
| 415 case RTCIceConnectionStateNew: | 415 case RTCIceConnectionStateNew: |
| 416 return @"NEW"; | 416 return @"NEW"; |
| 417 case RTCIceConnectionStateChecking: | 417 case RTCIceConnectionStateChecking: |
| 418 return @"CHECKING"; | 418 return @"CHECKING"; |
| 419 case RTCIceConnectionStateConnected: | 419 case RTCIceConnectionStateConnected: |
| 420 return @"CONNECTED"; | 420 return @"CONNECTED"; |
| 421 case RTCIceConnectionStateCompleted: | 421 case RTCIceConnectionStateCompleted: |
| 422 return @"COMPLETED"; | 422 return @"COMPLETED"; |
| 423 case RTCIceConnectionStateFailed: | 423 case RTCIceConnectionStateFailed: |
| 424 return @"FAILED"; | 424 return @"FAILED"; |
| 425 case RTCIceConnectionStateDisconnected: | 425 case RTCIceConnectionStateDisconnected: |
| 426 return @"DISCONNECTED"; | 426 return @"DISCONNECTED"; |
| 427 case RTCIceConnectionStateClosed: | 427 case RTCIceConnectionStateClosed: |
| 428 return @"CLOSED"; | 428 return @"CLOSED"; |
| 429 case RTCIceConnectionStateMax: | 429 case RTCIceConnectionStateCount: |
| 430 return @"MAX"; | 430 return @"COUNT"; |
| 431 } | 431 } |
| 432 } | 432 } |
| 433 | 433 |
| 434 + (webrtc::PeerConnectionInterface::IceGatheringState) | 434 + (webrtc::PeerConnectionInterface::IceGatheringState) |
| 435 nativeIceGatheringStateForState:(RTCIceGatheringState)state { | 435 nativeIceGatheringStateForState:(RTCIceGatheringState)state { |
| 436 switch (state) { | 436 switch (state) { |
| 437 case RTCIceGatheringStateNew: | 437 case RTCIceGatheringStateNew: |
| 438 return webrtc::PeerConnectionInterface::kIceGatheringNew; | 438 return webrtc::PeerConnectionInterface::kIceGatheringNew; |
| 439 case RTCIceGatheringStateGathering: | 439 case RTCIceGatheringStateGathering: |
| 440 return webrtc::PeerConnectionInterface::kIceGatheringGathering; | 440 return webrtc::PeerConnectionInterface::kIceGatheringGathering; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 case RTCStatsOutputLevelDebug: | 474 case RTCStatsOutputLevelDebug: |
| 475 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug; | 475 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug; |
| 476 } | 476 } |
| 477 } | 477 } |
| 478 | 478 |
| 479 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection { | 479 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection { |
| 480 return _peerConnection; | 480 return _peerConnection; |
| 481 } | 481 } |
| 482 | 482 |
| 483 @end | 483 @end |
| OLD | NEW |