diff options
Diffstat (limited to 'remoting/protocol/transport.h')
-rw-r--r-- | remoting/protocol/transport.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/remoting/protocol/transport.h b/remoting/protocol/transport.h index d4c4b3f..4223796 100644 --- a/remoting/protocol/transport.h +++ b/remoting/protocol/transport.h @@ -44,6 +44,11 @@ namespace protocol { class ChannelAuthenticator; +enum class TransportRole { + SERVER, + CLIENT, +}; + struct TransportRoute { enum RouteType { DIRECT, @@ -69,6 +74,12 @@ class Transport : public base::NonThreadSafe { EventHandler() {}; virtual ~EventHandler() {}; + // Called to pass ICE credentials to the session. Used only for STANDARD + // version of ICE, see SetIceVersion(). + virtual void OnTransportIceCredentials(Transport* transport, + const std::string& ufrag, + const std::string& password) = 0; + // Called when the transport generates a new candidate that needs // to be passed to the AddRemoteCandidate() method on the remote // end of the connection. @@ -97,6 +108,10 @@ class Transport : public base::NonThreadSafe { Transport::EventHandler* event_handler, const ConnectedCallback& callback) = 0; + // Sets remote ICE credentials. + virtual void SetRemoteCredentials(const std::string& ufrag, + const std::string& password) = 0; + // Adds |candidate| received from the peer. virtual void AddRemoteCandidate(const cricket::Candidate& candidate) = 0; @@ -108,6 +123,12 @@ class Transport : public base::NonThreadSafe { // Returns true if the channel is already connected. virtual bool is_connected() const = 0; + // Sets ICE version for the transport. + // + // TODO(sergeyu): Remove this when support for legacy ICE is removed. + // crbug.com/473758 + virtual void SetUseStandardIce(bool use_standard_ice) {} + private: DISALLOW_COPY_AND_ASSIGN(Transport); }; |