OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 return *this; | 140 return *this; |
141 } | 141 } |
142 | 142 |
143 bool HasOption(const std::string& option) const { | 143 bool HasOption(const std::string& option) const { |
144 return (std::find(transport_options.begin(), transport_options.end(), | 144 return (std::find(transport_options.begin(), transport_options.end(), |
145 option) != transport_options.end()); | 145 option) != transport_options.end()); |
146 } | 146 } |
147 void AddOption(const std::string& option) { | 147 void AddOption(const std::string& option) { |
148 transport_options.push_back(option); | 148 transport_options.push_back(option); |
149 } | 149 } |
150 bool secure() const { return identity_fingerprint != NULL; } | 150 bool secure() const { return identity_fingerprint != nullptr; } |
151 | 151 |
152 IceParameters GetIceParameters() { | 152 IceParameters GetIceParameters() { |
153 return IceParameters(ice_ufrag, ice_pwd, HasOption(ICE_RENOMINATION_STR)); | 153 return IceParameters(ice_ufrag, ice_pwd, HasOption(ICE_RENOMINATION_STR)); |
154 } | 154 } |
155 | 155 |
156 static rtc::SSLFingerprint* CopyFingerprint( | 156 static rtc::SSLFingerprint* CopyFingerprint( |
157 const rtc::SSLFingerprint* from) { | 157 const rtc::SSLFingerprint* from) { |
158 if (!from) | 158 if (!from) |
159 return NULL; | 159 return NULL; |
160 | 160 |
161 return new rtc::SSLFingerprint(*from); | 161 return new rtc::SSLFingerprint(*from); |
162 } | 162 } |
163 | 163 |
164 std::vector<std::string> transport_options; | 164 std::vector<std::string> transport_options; |
165 std::string ice_ufrag; | 165 std::string ice_ufrag; |
166 std::string ice_pwd; | 166 std::string ice_pwd; |
167 IceMode ice_mode; | 167 IceMode ice_mode; |
168 ConnectionRole connection_role; | 168 ConnectionRole connection_role; |
169 | 169 |
170 std::unique_ptr<rtc::SSLFingerprint> identity_fingerprint; | 170 std::unique_ptr<rtc::SSLFingerprint> identity_fingerprint; |
171 }; | 171 }; |
172 | 172 |
173 } // namespace cricket | 173 } // namespace cricket |
174 | 174 |
175 #endif // WEBRTC_P2P_BASE_TRANSPORTDESCRIPTION_H_ | 175 #endif // WEBRTC_P2P_BASE_TRANSPORTDESCRIPTION_H_ |
OLD | NEW |