| Index: webrtc/api/webrtcsession.h
|
| diff --git a/webrtc/api/webrtcsession.h b/webrtc/api/webrtcsession.h
|
| index 1aa3e187ae2bf5f2e320ca6c43d5fee44708446f..b433ab672b2b81d294d81718b22ec84ec203e73f 100644
|
| --- a/webrtc/api/webrtcsession.h
|
| +++ b/webrtc/api/webrtcsession.h
|
| @@ -115,6 +115,20 @@ struct SessionStats {
|
| TransportStatsMap transport_stats;
|
| };
|
|
|
| +struct ChannelNamePair {
|
| + ChannelNamePair(
|
| + const std::string& content_name, const std::string& transport_name)
|
| + : content_name(content_name), transport_name(transport_name) {}
|
| + std::string content_name;
|
| + std::string transport_name;
|
| +};
|
| +
|
| +struct ChannelNamePairs {
|
| + rtc::Optional<ChannelNamePair> voice;
|
| + rtc::Optional<ChannelNamePair> video;
|
| + rtc::Optional<ChannelNamePair> data;
|
| +};
|
| +
|
| // A WebRtcSession manages general session state. This includes negotiation
|
| // of both the application-level and network-level protocols: the former
|
| // defines what will be sent and the latter defines how it will be sent. Each
|
| @@ -194,6 +208,7 @@ class WebRtcSession :
|
| virtual cricket::DataChannel* data_channel() {
|
| return data_channel_.get();
|
| }
|
| + std::unique_ptr<ChannelNamePairs> GetChannelNamePairs();
|
|
|
| cricket::BaseChannel* GetChannel(const std::string& content_name);
|
|
|
| @@ -263,6 +278,8 @@ class WebRtcSession :
|
| // Returns stats for all channels of all transports.
|
| // This avoids exposing the internal structures used to track them.
|
| virtual bool GetTransportStats(SessionStats* stats);
|
| + virtual std::unique_ptr<SessionStats> GetSessionStats_n(
|
| + const ChannelNamePairs& channel_name_pairs);
|
|
|
| // Get stats for a specific channel
|
| bool GetChannelTransportStats(cricket::BaseChannel* ch, SessionStats* stats);
|
| @@ -271,10 +288,15 @@ class WebRtcSession :
|
| virtual bool GetLocalCertificate(
|
| const std::string& transport_name,
|
| rtc::scoped_refptr<rtc::RTCCertificate>* certificate);
|
| + virtual bool GetLocalCertificate_n(
|
| + const std::string& transport_name,
|
| + rtc::scoped_refptr<rtc::RTCCertificate>* certificate);
|
|
|
| // Caller owns returned certificate
|
| virtual std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate(
|
| const std::string& transport_name);
|
| + virtual std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate_n(
|
| + const std::string& transport_name);
|
|
|
| cricket::DataChannelType data_channel_type() const;
|
|
|
| @@ -486,7 +508,7 @@ class WebRtcSession :
|
| const std::string sid_;
|
| bool initial_offerer_ = false;
|
|
|
| - std::unique_ptr<cricket::TransportController> transport_controller_;
|
| + const std::unique_ptr<cricket::TransportController> transport_controller_;
|
| MediaControllerInterface* media_controller_;
|
| std::unique_ptr<cricket::VoiceChannel> voice_channel_;
|
| std::unique_ptr<cricket::VideoChannel> video_channel_;
|
|
|