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

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

Issue 1520963002: Removing webrtc::PortAllocatorFactoryInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Trying to fix presubmit warning Created 5 years 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/examples/peerconnection/client/conductor.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 723a0000e56365cc1a1bdbc9a8d140354784a250..6fb79b065e62f1ee1f8f33d5023569bca5e93108 100644
--- a/webrtc/p2p/base/portallocator.h
+++ b/webrtc/p2p/base/portallocator.h
@@ -91,6 +91,17 @@ typedef std::vector<ProtocolAddress> PortList;
struct RelayServerConfig {
RelayServerConfig(RelayType type) : type(type), priority(0) {}
+ RelayServerConfig(const std::string& address,
+ int port,
+ const std::string& username,
+ const std::string& password,
+ ProtocolType proto,
+ bool secure)
+ : type(RELAY_TURN), credentials(username, password) {
+ ports.push_back(
+ ProtocolAddress(rtc::SocketAddress(address, port), proto, secure));
+ }
+
RelayType type;
PortList ports;
RelayCredentials credentials;
@@ -168,6 +179,13 @@ class PortAllocator : public sigslot::has_slots<> {
const ServerAddresses& stun_servers,
const std::vector<RelayServerConfig>& turn_servers) = 0;
+ // Sets the network types to ignore.
+ // Values are defined by the AdapterType enum.
+ // For instance, calling this with
+ // ADAPTER_TYPE_ETHERNET | ADAPTER_TYPE_LOOPBACK will ignore Ethernet and
+ // loopback interfaces.
+ virtual void SetNetworkIgnoreMask(int network_ignore_mask) = 0;
+
PortAllocatorSession* CreateSession(
const std::string& sid,
const std::string& content_name,
« no previous file with comments | « webrtc/examples/peerconnection/client/conductor.cc ('k') | webrtc/p2p/client/basicportallocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698