OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 Transport::~Transport() { | 142 Transport::~Transport() { |
143 ASSERT(signaling_thread_->IsCurrent()); | 143 ASSERT(signaling_thread_->IsCurrent()); |
144 ASSERT(destroyed_); | 144 ASSERT(destroyed_); |
145 } | 145 } |
146 | 146 |
147 void Transport::SetIceRole(IceRole role) { | 147 void Transport::SetIceRole(IceRole role) { |
148 worker_thread_->Invoke<void>(Bind(&Transport::SetIceRole_w, this, role)); | 148 worker_thread_->Invoke<void>(Bind(&Transport::SetIceRole_w, this, role)); |
149 } | 149 } |
150 | 150 |
151 void Transport::SetIdentity(rtc::SSLIdentity* identity) { | 151 void Transport::SetCertificate( |
152 worker_thread_->Invoke<void>(Bind(&Transport::SetIdentity_w, this, identity)); | 152 const rtc::scoped_refptr<webrtc::DtlsCertificate>& certificate) { |
| 153 worker_thread_->Invoke<void>(Bind(&Transport::SetCertificate_w, this, |
| 154 certificate)); |
153 } | 155 } |
154 | 156 |
155 bool Transport::GetIdentity(rtc::SSLIdentity** identity) { | 157 bool Transport::GetCertificate( |
| 158 rtc::scoped_refptr<webrtc::DtlsCertificate>* certificate) { |
156 // The identity is set on the worker thread, so for safety it must also be | 159 // The identity is set on the worker thread, so for safety it must also be |
157 // acquired on the worker thread. | 160 // acquired on the worker thread. |
158 return worker_thread_->Invoke<bool>( | 161 return worker_thread_->Invoke<bool>( |
159 Bind(&Transport::GetIdentity_w, this, identity)); | 162 Bind(&Transport::GetCertificate_w, this, certificate)); |
160 } | 163 } |
161 | 164 |
162 bool Transport::GetRemoteCertificate(rtc::SSLCertificate** cert) { | 165 bool Transport::GetRemoteCertificate(rtc::SSLCertificate** cert) { |
163 // Channels can be deleted on the worker thread, so for safety the remote | 166 // Channels can be deleted on the worker thread, so for safety the remote |
164 // certificate is acquired on the worker thread. | 167 // certificate is acquired on the worker thread. |
165 return worker_thread_->Invoke<bool>( | 168 return worker_thread_->Invoke<bool>( |
166 Bind(&Transport::GetRemoteCertificate_w, this, cert)); | 169 Bind(&Transport::GetRemoteCertificate_w, this, cert)); |
167 } | 170 } |
168 | 171 |
169 bool Transport::GetRemoteCertificate_w(rtc::SSLCertificate** cert) { | 172 bool Transport::GetRemoteCertificate_w(rtc::SSLCertificate** cert) { |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 const TransportDescription* desc) { | 983 const TransportDescription* desc) { |
981 ASSERT(desc != NULL); | 984 ASSERT(desc != NULL); |
982 if (desc->transport_type == NS_JINGLE_ICE_UDP) { | 985 if (desc->transport_type == NS_JINGLE_ICE_UDP) { |
983 return (desc->HasOption(ICE_OPTION_GICE)) ? | 986 return (desc->HasOption(ICE_OPTION_GICE)) ? |
984 ICEPROTO_HYBRID : ICEPROTO_RFC5245; | 987 ICEPROTO_HYBRID : ICEPROTO_RFC5245; |
985 } | 988 } |
986 return ICEPROTO_GOOGLE; | 989 return ICEPROTO_GOOGLE; |
987 } | 990 } |
988 | 991 |
989 } // namespace cricket | 992 } // namespace cricket |
OLD | NEW |