Index: webrtc/p2p/base/portallocator.h |
diff --git a/webrtc/p2p/base/portallocator.h b/webrtc/p2p/base/portallocator.h |
index 4f8ec2fbe69c2d7a88594df48fe9873cbdaf440a..4829b92fafbd15db3c5e34a9024e8055fa915639 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,26 @@ enum { |
CF_ALL = 0x7, |
}; |
+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. |
pthatcher1
2015/10/20 22:22:00
And RelayCredentials to TurnCredentials?
Taylor Brandstetter
2015/10/20 23:45:29
Added TODO there as well.
|
+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 +158,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, |