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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 | 76 |
77 bool GetSslRole(const std::string& transport_name, rtc::SSLRole* role) const; | 77 bool GetSslRole(const std::string& transport_name, rtc::SSLRole* role) const; |
78 | 78 |
79 // Specifies the identity to use in this session. | 79 // Specifies the identity to use in this session. |
80 // Can only be called once. | 80 // Can only be called once. |
81 bool SetLocalCertificate( | 81 bool SetLocalCertificate( |
82 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 82 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
83 bool GetLocalCertificate( | 83 bool GetLocalCertificate( |
84 const std::string& transport_name, | 84 const std::string& transport_name, |
85 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const; | 85 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const; |
86 bool GetLocalCertificate_n( | |
87 const std::string& transport_name, | |
88 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const; | |
Taylor Brandstetter
2016/12/13 19:47:07
I'd prefer only leaving the non "_n" methods publi
pthatcher1
2016/12/13 23:50:19
I agree.
But I think it would be even better if y
hbos
2016/12/14 14:56:31
Done : Removing unnecessary "_n" methods, allowing
| |
86 // Caller owns returned certificate. This method mainly exists for stats | 89 // Caller owns returned certificate. This method mainly exists for stats |
87 // reporting. | 90 // reporting. |
88 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate( | 91 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate( |
89 const std::string& transport_name) const; | 92 const std::string& transport_name) const; |
93 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate_n( | |
94 const std::string& transport_name) const; | |
90 bool SetLocalTransportDescription(const std::string& transport_name, | 95 bool SetLocalTransportDescription(const std::string& transport_name, |
91 const TransportDescription& tdesc, | 96 const TransportDescription& tdesc, |
92 ContentAction action, | 97 ContentAction action, |
93 std::string* err); | 98 std::string* err); |
94 bool SetRemoteTransportDescription(const std::string& transport_name, | 99 bool SetRemoteTransportDescription(const std::string& transport_name, |
95 const TransportDescription& tdesc, | 100 const TransportDescription& tdesc, |
96 ContentAction action, | 101 ContentAction action, |
97 std::string* err); | 102 std::string* err); |
98 // Start gathering candidates for any new transports, or transports doing an | 103 // Start gathering candidates for any new transports, or transports doing an |
99 // ICE restart. | 104 // ICE restart. |
100 void MaybeStartGathering(); | 105 void MaybeStartGathering(); |
101 bool AddRemoteCandidates(const std::string& transport_name, | 106 bool AddRemoteCandidates(const std::string& transport_name, |
102 const Candidates& candidates, | 107 const Candidates& candidates, |
103 std::string* err); | 108 std::string* err); |
104 bool RemoveRemoteCandidates(const Candidates& candidates, std::string* err); | 109 bool RemoveRemoteCandidates(const Candidates& candidates, std::string* err); |
105 bool ReadyForRemoteCandidates(const std::string& transport_name) const; | 110 bool ReadyForRemoteCandidates(const std::string& transport_name) const; |
106 // TODO(deadbeef): GetStats isn't const because all the way down to | 111 // TODO(deadbeef): GetStats isn't const because all the way down to |
107 // OpenSSLStreamAdapter, | 112 // OpenSSLStreamAdapter, |
108 // GetSslCipherSuite and GetDtlsSrtpCryptoSuite are not const. Fix this. | 113 // GetSslCipherSuite and GetDtlsSrtpCryptoSuite are not const. Fix this. |
109 bool GetStats(const std::string& transport_name, TransportStats* stats); | 114 bool GetStats(const std::string& transport_name, TransportStats* stats); |
115 bool GetStats_n(const std::string& transport_name, TransportStats* stats); | |
110 void SetMetricsObserver(webrtc::MetricsObserverInterface* metrics_observer); | 116 void SetMetricsObserver(webrtc::MetricsObserverInterface* metrics_observer); |
111 | 117 |
112 // Creates a channel if it doesn't exist. Otherwise, increments a reference | 118 // Creates a channel if it doesn't exist. Otherwise, increments a reference |
113 // count and returns an existing channel. | 119 // count and returns an existing channel. |
114 virtual TransportChannel* CreateTransportChannel_n( | 120 virtual TransportChannel* CreateTransportChannel_n( |
115 const std::string& transport_name, | 121 const std::string& transport_name, |
116 int component); | 122 int component); |
117 | 123 |
118 // Decrements a channel's reference count, and destroys the channel if | 124 // Decrements a channel's reference count, and destroys the channel if |
119 // nothing is referencing it. | 125 // nothing is referencing it. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
224 JsepTransport* GetOrCreateJsepTransport(const std::string& transport_name); | 230 JsepTransport* GetOrCreateJsepTransport(const std::string& transport_name); |
225 void DestroyAllChannels_n(); | 231 void DestroyAllChannels_n(); |
226 | 232 |
227 bool SetSslMaxProtocolVersion_n(rtc::SSLProtocolVersion version); | 233 bool SetSslMaxProtocolVersion_n(rtc::SSLProtocolVersion version); |
228 void SetIceConfig_n(const IceConfig& config); | 234 void SetIceConfig_n(const IceConfig& config); |
229 void SetIceRole_n(IceRole ice_role); | 235 void SetIceRole_n(IceRole ice_role); |
230 bool GetSslRole_n(const std::string& transport_name, | 236 bool GetSslRole_n(const std::string& transport_name, |
231 rtc::SSLRole* role) const; | 237 rtc::SSLRole* role) const; |
232 bool SetLocalCertificate_n( | 238 bool SetLocalCertificate_n( |
233 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 239 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
234 bool GetLocalCertificate_n( | |
235 const std::string& transport_name, | |
236 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const; | |
237 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate_n( | |
238 const std::string& transport_name) const; | |
239 bool SetLocalTransportDescription_n(const std::string& transport_name, | 240 bool SetLocalTransportDescription_n(const std::string& transport_name, |
240 const TransportDescription& tdesc, | 241 const TransportDescription& tdesc, |
241 ContentAction action, | 242 ContentAction action, |
242 std::string* err); | 243 std::string* err); |
243 bool SetRemoteTransportDescription_n(const std::string& transport_name, | 244 bool SetRemoteTransportDescription_n(const std::string& transport_name, |
244 const TransportDescription& tdesc, | 245 const TransportDescription& tdesc, |
245 ContentAction action, | 246 ContentAction action, |
246 std::string* err); | 247 std::string* err); |
247 void MaybeStartGathering_n(); | 248 void MaybeStartGathering_n(); |
248 bool AddRemoteCandidates_n(const std::string& transport_name, | 249 bool AddRemoteCandidates_n(const std::string& transport_name, |
249 const Candidates& candidates, | 250 const Candidates& candidates, |
250 std::string* err); | 251 std::string* err); |
251 bool RemoveRemoteCandidates_n(const Candidates& candidates, std::string* err); | 252 bool RemoveRemoteCandidates_n(const Candidates& candidates, std::string* err); |
252 bool ReadyForRemoteCandidates_n(const std::string& transport_name) const; | 253 bool ReadyForRemoteCandidates_n(const std::string& transport_name) const; |
253 bool GetStats_n(const std::string& transport_name, TransportStats* stats); | |
254 void SetMetricsObserver_n(webrtc::MetricsObserverInterface* metrics_observer); | 254 void SetMetricsObserver_n(webrtc::MetricsObserverInterface* metrics_observer); |
255 | 255 |
256 // Handlers for signals from Transport. | 256 // Handlers for signals from Transport. |
257 void OnChannelWritableState_n(rtc::PacketTransportInterface* transport); | 257 void OnChannelWritableState_n(rtc::PacketTransportInterface* transport); |
258 void OnChannelReceivingState_n(rtc::PacketTransportInterface* transport); | 258 void OnChannelReceivingState_n(rtc::PacketTransportInterface* transport); |
259 void OnChannelGatheringState_n(TransportChannelImpl* channel); | 259 void OnChannelGatheringState_n(TransportChannelImpl* channel); |
260 void OnChannelCandidateGathered_n(TransportChannelImpl* channel, | 260 void OnChannelCandidateGathered_n(TransportChannelImpl* channel, |
261 const Candidate& candidate); | 261 const Candidate& candidate); |
262 void OnChannelCandidatesRemoved(const Candidates& candidates); | 262 void OnChannelCandidatesRemoved(const Candidates& candidates); |
263 void OnChannelCandidatesRemoved_n(TransportChannelImpl* channel, | 263 void OnChannelCandidatesRemoved_n(TransportChannelImpl* channel, |
(...skipping 26 matching lines...) Expand all Loading... | |
290 rtc::AsyncInvoker invoker_; | 290 rtc::AsyncInvoker invoker_; |
291 // True if QUIC is used instead of DTLS. | 291 // True if QUIC is used instead of DTLS. |
292 bool quic_ = false; | 292 bool quic_ = false; |
293 | 293 |
294 webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; | 294 webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; |
295 }; | 295 }; |
296 | 296 |
297 } // namespace cricket | 297 } // namespace cricket |
298 | 298 |
299 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ | 299 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ |
OLD | NEW |