| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 // Enables media channels to allow sending of media. | 392 // Enables media channels to allow sending of media. |
| 393 void EnableChannels(); | 393 void EnableChannels(); |
| 394 // Returns the media index for a local ice candidate given the content name. | 394 // Returns the media index for a local ice candidate given the content name. |
| 395 // Returns false if the local session description does not have a media | 395 // Returns false if the local session description does not have a media |
| 396 // content called |content_name|. | 396 // content called |content_name|. |
| 397 bool GetLocalCandidateMediaIndex(const std::string& content_name, | 397 bool GetLocalCandidateMediaIndex(const std::string& content_name, |
| 398 int* sdp_mline_index); | 398 int* sdp_mline_index); |
| 399 // Uses all remote candidates in |remote_desc| in this session. | 399 // Uses all remote candidates in |remote_desc| in this session. |
| 400 bool UseCandidatesInSessionDescription( | 400 bool UseCandidatesInSessionDescription( |
| 401 const SessionDescriptionInterface* remote_desc); | 401 const SessionDescriptionInterface* remote_desc); |
| 402 // Uses |candidate| in this session. | 402 // Adds a remote candidate to this session. |
| 403 bool UseCandidate(const IceCandidateInterface* candidate); | 403 bool AddRemoteCandidate(const IceCandidateInterface* candidate); |
| 404 // Removes a remote candidate from this session. |
| 405 bool RemoveRemoteCandidate(const IceCandidateInterface* candidate); |
| 406 const cricket::ContentInfo* GetRemoteMediaContent( |
| 407 const IceCandidateInterface* candidate) const; |
| 404 // Deletes the corresponding channel of contents that don't exist in |desc|. | 408 // Deletes the corresponding channel of contents that don't exist in |desc|. |
| 405 // |desc| can be null. This means that all channels are deleted. | 409 // |desc| can be null. This means that all channels are deleted. |
| 406 void RemoveUnusedChannels(const cricket::SessionDescription* desc); | 410 void RemoveUnusedChannels(const cricket::SessionDescription* desc); |
| 407 | 411 |
| 408 // Allocates media channels based on the |desc|. If |desc| doesn't have | 412 // Allocates media channels based on the |desc|. If |desc| doesn't have |
| 409 // the BUNDLE option, this method will disable BUNDLE in PortAllocator. | 413 // the BUNDLE option, this method will disable BUNDLE in PortAllocator. |
| 410 // This method will also delete any existing media channels before creating. | 414 // This method will also delete any existing media channels before creating. |
| 411 bool CreateChannels(const cricket::SessionDescription* desc); | 415 bool CreateChannels(const cricket::SessionDescription* desc); |
| 412 | 416 |
| 413 // Helper methods to create media channels. | 417 // Helper methods to create media channels. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 bool ReadyToUseRemoteCandidate(const IceCandidateInterface* candidate, | 451 bool ReadyToUseRemoteCandidate(const IceCandidateInterface* candidate, |
| 448 const SessionDescriptionInterface* remote_desc, | 452 const SessionDescriptionInterface* remote_desc, |
| 449 bool* valid); | 453 bool* valid); |
| 450 | 454 |
| 451 void OnTransportControllerConnectionState(cricket::IceConnectionState state); | 455 void OnTransportControllerConnectionState(cricket::IceConnectionState state); |
| 452 void OnTransportControllerReceiving(bool receiving); | 456 void OnTransportControllerReceiving(bool receiving); |
| 453 void OnTransportControllerGatheringState(cricket::IceGatheringState state); | 457 void OnTransportControllerGatheringState(cricket::IceGatheringState state); |
| 454 void OnTransportControllerCandidatesGathered( | 458 void OnTransportControllerCandidatesGathered( |
| 455 const std::string& transport_name, | 459 const std::string& transport_name, |
| 456 const cricket::Candidates& candidates); | 460 const cricket::Candidates& candidates); |
| 461 void OnTransportControllerCandidatesRemoved( |
| 462 const std::string& transport_name, |
| 463 const cricket::Candidates& candidates); |
| 457 | 464 |
| 458 std::string GetSessionErrorMsg(); | 465 std::string GetSessionErrorMsg(); |
| 459 | 466 |
| 460 // Invoked when TransportController connection completion is signaled. | 467 // Invoked when TransportController connection completion is signaled. |
| 461 // Reports stats for all transports in use. | 468 // Reports stats for all transports in use. |
| 462 void ReportTransportStats(); | 469 void ReportTransportStats(); |
| 463 | 470 |
| 464 // Gather the usage of IPv4/IPv6 as best connection. | 471 // Gather the usage of IPv4/IPv6 as best connection. |
| 465 void ReportBestConnectionState(const cricket::TransportStats& stats); | 472 void ReportBestConnectionState(const cricket::TransportStats& stats); |
| 466 | 473 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 PeerConnectionInterface::BundlePolicy bundle_policy_; | 523 PeerConnectionInterface::BundlePolicy bundle_policy_; |
| 517 | 524 |
| 518 // Declares the RTCP mux policy for the WebRTCSession. | 525 // Declares the RTCP mux policy for the WebRTCSession. |
| 519 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; | 526 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; |
| 520 | 527 |
| 521 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); | 528 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); |
| 522 }; | 529 }; |
| 523 } // namespace webrtc | 530 } // namespace webrtc |
| 524 | 531 |
| 525 #endif // TALK_APP_WEBRTC_WEBRTCSESSION_H_ | 532 #endif // TALK_APP_WEBRTC_WEBRTCSESSION_H_ |
| OLD | NEW |