| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 // An interface through which the MD5 credential hash can be retrieved. | 139 // An interface through which the MD5 credential hash can be retrieved. |
| 140 class TurnAuthInterface { | 140 class TurnAuthInterface { |
| 141 public: | 141 public: |
| 142 // Gets HA1 for the specified user and realm. | 142 // Gets HA1 for the specified user and realm. |
| 143 // HA1 = MD5(A1) = MD5(username:realm:password). | 143 // HA1 = MD5(A1) = MD5(username:realm:password). |
| 144 // Return true if the given username and realm are valid, or false if not. | 144 // Return true if the given username and realm are valid, or false if not. |
| 145 virtual bool GetKey(const std::string& username, const std::string& realm, | 145 virtual bool GetKey(const std::string& username, const std::string& realm, |
| 146 std::string* key) = 0; | 146 std::string* key) = 0; |
| 147 virtual ~TurnAuthInterface() = default; |
| 147 }; | 148 }; |
| 148 | 149 |
| 149 // An interface enables Turn Server to control redirection behavior. | 150 // An interface enables Turn Server to control redirection behavior. |
| 150 class TurnRedirectInterface { | 151 class TurnRedirectInterface { |
| 151 public: | 152 public: |
| 152 virtual bool ShouldRedirect(const rtc::SocketAddress& address, | 153 virtual bool ShouldRedirect(const rtc::SocketAddress& address, |
| 153 rtc::SocketAddress* out) = 0; | 154 rtc::SocketAddress* out) = 0; |
| 154 virtual ~TurnRedirectInterface() {} | 155 virtual ~TurnRedirectInterface() {} |
| 155 }; | 156 }; |
| 156 | 157 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 // For testing only. If this is non-zero, the next NONCE will be generated | 279 // For testing only. If this is non-zero, the next NONCE will be generated |
| 279 // from this value, and it will be reset to 0 after generating the NONCE. | 280 // from this value, and it will be reset to 0 after generating the NONCE. |
| 280 int64_t ts_for_next_nonce_ = 0; | 281 int64_t ts_for_next_nonce_ = 0; |
| 281 | 282 |
| 282 friend class TurnServerAllocation; | 283 friend class TurnServerAllocation; |
| 283 }; | 284 }; |
| 284 | 285 |
| 285 } // namespace cricket | 286 } // namespace cricket |
| 286 | 287 |
| 287 #endif // WEBRTC_P2P_BASE_TURNSERVER_H_ | 288 #endif // WEBRTC_P2P_BASE_TURNSERVER_H_ |
| OLD | NEW |