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 |
11 #ifndef WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ | 11 #ifndef WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ |
12 #define WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ | 12 #define WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
| 15 #include <memory> |
15 #include <string> | 16 #include <string> |
16 #include <vector> | 17 #include <vector> |
17 | 18 |
18 #include "webrtc/base/asyncinvoker.h" | 19 #include "webrtc/base/asyncinvoker.h" |
19 #include "webrtc/base/sigslot.h" | 20 #include "webrtc/base/sigslot.h" |
20 #include "webrtc/base/sslstreamadapter.h" | 21 #include "webrtc/base/sslstreamadapter.h" |
21 #include "webrtc/p2p/base/candidate.h" | 22 #include "webrtc/p2p/base/candidate.h" |
22 #include "webrtc/p2p/base/transport.h" | 23 #include "webrtc/p2p/base/transport.h" |
23 | 24 |
24 namespace rtc { | 25 namespace rtc { |
(...skipping 27 matching lines...) Expand all Loading... |
52 bool GetSslRole(const std::string& transport_name, rtc::SSLRole* role); | 53 bool GetSslRole(const std::string& transport_name, rtc::SSLRole* role); |
53 | 54 |
54 // Specifies the identity to use in this session. | 55 // Specifies the identity to use in this session. |
55 // Can only be called once. | 56 // Can only be called once. |
56 bool SetLocalCertificate( | 57 bool SetLocalCertificate( |
57 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 58 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
58 bool GetLocalCertificate( | 59 bool GetLocalCertificate( |
59 const std::string& transport_name, | 60 const std::string& transport_name, |
60 rtc::scoped_refptr<rtc::RTCCertificate>* certificate); | 61 rtc::scoped_refptr<rtc::RTCCertificate>* certificate); |
61 // Caller owns returned certificate | 62 // Caller owns returned certificate |
62 rtc::scoped_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate( | 63 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate( |
63 const std::string& transport_name); | 64 const std::string& transport_name); |
64 bool SetLocalTransportDescription(const std::string& transport_name, | 65 bool SetLocalTransportDescription(const std::string& transport_name, |
65 const TransportDescription& tdesc, | 66 const TransportDescription& tdesc, |
66 ContentAction action, | 67 ContentAction action, |
67 std::string* err); | 68 std::string* err); |
68 bool SetRemoteTransportDescription(const std::string& transport_name, | 69 bool SetRemoteTransportDescription(const std::string& transport_name, |
69 const TransportDescription& tdesc, | 70 const TransportDescription& tdesc, |
70 ContentAction action, | 71 ContentAction action, |
71 std::string* err); | 72 std::string* err); |
72 // Start gathering candidates for any new transports, or transports doing an | 73 // Start gathering candidates for any new transports, or transports doing an |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 160 |
160 bool SetSslMaxProtocolVersion_w(rtc::SSLProtocolVersion version); | 161 bool SetSslMaxProtocolVersion_w(rtc::SSLProtocolVersion version); |
161 void SetIceConfig_w(const IceConfig& config); | 162 void SetIceConfig_w(const IceConfig& config); |
162 void SetIceRole_w(IceRole ice_role); | 163 void SetIceRole_w(IceRole ice_role); |
163 bool GetSslRole_w(const std::string& transport_name, rtc::SSLRole* role); | 164 bool GetSslRole_w(const std::string& transport_name, rtc::SSLRole* role); |
164 bool SetLocalCertificate_w( | 165 bool SetLocalCertificate_w( |
165 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 166 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
166 bool GetLocalCertificate_w( | 167 bool GetLocalCertificate_w( |
167 const std::string& transport_name, | 168 const std::string& transport_name, |
168 rtc::scoped_refptr<rtc::RTCCertificate>* certificate); | 169 rtc::scoped_refptr<rtc::RTCCertificate>* certificate); |
169 rtc::scoped_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate_w( | 170 std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate_w( |
170 const std::string& transport_name); | 171 const std::string& transport_name); |
171 bool SetLocalTransportDescription_w(const std::string& transport_name, | 172 bool SetLocalTransportDescription_w(const std::string& transport_name, |
172 const TransportDescription& tdesc, | 173 const TransportDescription& tdesc, |
173 ContentAction action, | 174 ContentAction action, |
174 std::string* err); | 175 std::string* err); |
175 bool SetRemoteTransportDescription_w(const std::string& transport_name, | 176 bool SetRemoteTransportDescription_w(const std::string& transport_name, |
176 const TransportDescription& tdesc, | 177 const TransportDescription& tdesc, |
177 ContentAction action, | 178 ContentAction action, |
178 std::string* err); | 179 std::string* err); |
179 void MaybeStartGathering_w(); | 180 void MaybeStartGathering_w(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // Flag which will be set to true after the first role switch | 220 // Flag which will be set to true after the first role switch |
220 bool ice_role_switch_ = false; | 221 bool ice_role_switch_ = false; |
221 uint64_t ice_tiebreaker_ = rtc::CreateRandomId64(); | 222 uint64_t ice_tiebreaker_ = rtc::CreateRandomId64(); |
222 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; | 223 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; |
223 rtc::AsyncInvoker invoker_; | 224 rtc::AsyncInvoker invoker_; |
224 }; | 225 }; |
225 | 226 |
226 } // namespace cricket | 227 } // namespace cricket |
227 | 228 |
228 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ | 229 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ |
OLD | NEW |