Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: webrtc/p2p/base/portallocator.h

Issue 1414313003: Reland of Adding the ability to change ICE servers through SetConfiguration. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding "override" to applicable methods to fix compile warning. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel_unittest.cc ('k') | webrtc/p2p/client/basicportallocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/portallocator.h
diff --git a/webrtc/p2p/base/portallocator.h b/webrtc/p2p/base/portallocator.h
index 4f8ec2fbe69c2d7a88594df48fe9873cbdaf440a..51d8d7270db182eb77aef13dab2e1eee7124d5eb 100644
--- a/webrtc/p2p/base/portallocator.h
+++ b/webrtc/p2p/base/portallocator.h
@@ -14,6 +14,7 @@
#include <string>
#include <vector>
+#include "webrtc/p2p/base/port.h"
#include "webrtc/p2p/base/portinterface.h"
#include "webrtc/base/helpers.h"
#include "webrtc/base/proxyinfo.h"
@@ -71,6 +72,27 @@ enum {
CF_ALL = 0x7,
};
+// TODO(deadbeef): Rename to TurnCredentials (and username to ufrag).
+struct RelayCredentials {
+ RelayCredentials() {}
+ RelayCredentials(const std::string& username, const std::string& password)
+ : username(username), password(password) {}
+
+ std::string username;
+ std::string password;
+};
+
+typedef std::vector<ProtocolAddress> PortList;
+// TODO(deadbeef): Rename to TurnServerConfig.
+struct RelayServerConfig {
+ RelayServerConfig(RelayType type) : type(type), priority(0) {}
+
+ RelayType type;
+ PortList ports;
+ RelayCredentials credentials;
+ int priority;
+};
+
class PortAllocatorSession : public sigslot::has_slots<> {
public:
// Content name passed in mostly for logging and debugging.
@@ -137,6 +159,11 @@ class PortAllocator : public sigslot::has_slots<> {
}
virtual ~PortAllocator() {}
+ // Set STUN and TURN servers to be used in future sessions.
+ virtual void SetIceServers(
+ const ServerAddresses& stun_servers,
+ const std::vector<RelayServerConfig>& turn_servers) = 0;
+
PortAllocatorSession* CreateSession(
const std::string& sid,
const std::string& content_name,
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel_unittest.cc ('k') | webrtc/p2p/client/basicportallocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698