webrtc_m130/pc/transportcontroller.h

276 lines
12 KiB
C
Raw Normal View History

Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
/*
* Copyright 2015 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef PC_TRANSPORTCONTROLLER_H_
#define PC_TRANSPORTCONTROLLER_H_
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
#include <map>
#include <memory>
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
#include <string>
#include <vector>
Reland "Clean up libjingle API dependencies." This is a reland of 9185aca9ce1f66e983d9a5e797cab77a64cc46b0 > Original change's description: > > > Clean up libjingle API dependencies. > > > > > > This CL moves candidate.h into the public API, since it has > > > been implicitly included before. > > > > > > This is a straightforward way of solving the circular > > > dependencies involving that file. For instance, > > > libjingle_peerconnection_api includes candidate.h from > > > jsepicecandidate.h, but _api can't depend on rtc_p2p, which > > > depends on _api. In fact, _api can't depend on much at all > > > since it's a very high level abstraction; instead, things > > > should depend on it. > > > > > > Furthermore, we have the case where deprecated headers > > > include headers in internal modules. I just have to turn > > > off include checking for those, but that's not a big deal. > > > > > > This CL punts the problem of callfactoryinterface.h being > > > implicitly included, and pulling in most of the call > > > module with it. This should be addressed in a follow-up > > > CL. > Bug: webrtc:7504 > Change-Id: Icae0ba1a0488550e2871cc65e66d3661707aa5b6 > Reviewed-on: https://webrtc-review.googlesource.com/6460 > Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> > Commit-Queue: Patrik Höglund <phoglund@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#20156} TBR=deadbeef@webrtc.org Bug: webrtc:7504 Change-Id: Ic6598ac2af9355b60bbd289c86dc75e0ae9fed2e Reviewed-on: https://webrtc-review.googlesource.com/6801 Commit-Queue: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20167}
2017-10-05 14:53:33 +02:00
#include "api/candidate.h"
#include "p2p/base/dtlstransport.h"
#include "p2p/base/jseptransport.h"
#include "p2p/base/p2ptransportchannel.h"
#include "rtc_base/asyncinvoker.h"
#include "rtc_base/constructormagic.h"
#include "rtc_base/refcountedobject.h"
#include "rtc_base/sigslot.h"
#include "rtc_base/sslstreamadapter.h"
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
namespace rtc {
class Thread;
class PacketTransportInternal;
} // namespace rtc
namespace webrtc {
class MetricsObserverInterface;
} // namespace webrtc
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
namespace cricket {
class TransportController : public sigslot::has_slots<>,
public rtc::MessageHandler {
public:
// If |redetermine_role_on_ice_restart| is true, ICE role is redetermined
// upon setting a local transport description that indicates an ICE restart.
// For the constructor that doesn't take this parameter, it defaults to true.
//
// |crypto_options| is used to determine if created DTLS transports negotiate
// GCM crypto suites or not.
TransportController(rtc::Thread* signaling_thread,
rtc::Thread* network_thread,
PortAllocator* port_allocator,
bool redetermine_role_on_ice_restart,
const rtc::CryptoOptions& crypto_options);
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
virtual ~TransportController();
rtc::Thread* signaling_thread() const { return signaling_thread_; }
rtc::Thread* network_thread() const { return network_thread_; }
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
PortAllocator* port_allocator() const { return port_allocator_; }
// Can only be set before transports are created.
// TODO(deadbeef): Make this an argument to the constructor once BaseSession
// and WebRtcSession are combined
bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version);
void SetIceConfig(const IceConfig& config);
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
void SetIceRole(IceRole ice_role);
// Set the "needs-ice-restart" flag as described in JSEP. After the flag is
// set, offers should generate new ufrags/passwords until an ICE restart
// occurs.
void SetNeedsIceRestartFlag();
// Returns true if the ICE restart flag above was set, and no ICE restart has
// occurred yet for this transport (by applying a local description with
// changed ufrag/password). If the transport has been deleted as a result of
// bundling, returns false.
bool NeedsIceRestart(const std::string& transport_name) const;
bool GetSslRole(const std::string& transport_name, rtc::SSLRole* role) const;
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
// Specifies the identity to use in this session.
// Can only be called once.
bool SetLocalCertificate(
const rtc::scoped_refptr<rtc::RTCCertificate>& certificate);
bool GetLocalCertificate(
const std::string& transport_name,
rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const;
// Caller owns returned certificate. This method mainly exists for stats
// reporting.
std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate(
const std::string& transport_name) const;
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
bool SetLocalTransportDescription(const std::string& transport_name,
const TransportDescription& tdesc,
ContentAction action,
std::string* err);
bool SetRemoteTransportDescription(const std::string& transport_name,
const TransportDescription& tdesc,
ContentAction action,
std::string* err);
// Start gathering candidates for any new transports, or transports doing an
// ICE restart.
void MaybeStartGathering();
bool AddRemoteCandidates(const std::string& transport_name,
const Candidates& candidates,
std::string* err);
bool RemoveRemoteCandidates(const Candidates& candidates, std::string* err);
bool ReadyForRemoteCandidates(const std::string& transport_name) const;
// TODO(deadbeef): GetStats isn't const because all the way down to
// OpenSSLStreamAdapter,
// GetSslCipherSuite and GetDtlsSrtpCryptoSuite are not const. Fix this.
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
bool GetStats(const std::string& transport_name, TransportStats* stats);
void SetMetricsObserver(webrtc::MetricsObserverInterface* metrics_observer);
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
// Creates a channel if it doesn't exist. Otherwise, increments a reference
// count and returns an existing channel.
DtlsTransportInternal* CreateDtlsTransport(const std::string& transport_name,
int component);
virtual DtlsTransportInternal* CreateDtlsTransport_n(
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
const std::string& transport_name,
int component);
// Decrements a channel's reference count, and destroys the channel if
// nothing is referencing it.
virtual void DestroyDtlsTransport(const std::string& transport_name,
int component);
virtual void DestroyDtlsTransport_n(const std::string& transport_name,
int component);
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
// TODO(deadbeef): Remove all for_testing methods!
const rtc::scoped_refptr<rtc::RTCCertificate>& certificate_for_testing()
const {
return certificate_;
}
std::vector<std::string> transport_names_for_testing();
std::vector<DtlsTransportInternal*> channels_for_testing();
DtlsTransportInternal* get_channel_for_testing(
const std::string& transport_name,
int component);
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
// All of these signals are fired on the signalling thread.
// If any transport failed => failed,
// Else if all completed => completed,
// Else if all connected => connected,
// Else => connecting
sigslot::signal1<IceConnectionState> SignalConnectionState;
// Receiving if any transport is receiving
sigslot::signal1<bool> SignalReceiving;
// If all transports done gathering => complete,
// Else if any are gathering => gathering,
// Else => new
sigslot::signal1<IceGatheringState> SignalGatheringState;
// (transport_name, candidates)
sigslot::signal2<const std::string&, const Candidates&>
SignalCandidatesGathered;
sigslot::signal1<const Candidates&> SignalCandidatesRemoved;
sigslot::signal1<rtc::SSLHandshakeError> SignalDtlsHandshakeError;
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
protected:
// TODO(deadbeef): Get rid of these virtual methods. Used by
// FakeTransportController currently, but FakeTransportController shouldn't
// even be functioning by subclassing TransportController.
virtual IceTransportInternal* CreateIceTransportChannel_n(
const std::string& transport_name,
int component);
virtual DtlsTransportInternal* CreateDtlsTransportChannel_n(
const std::string& transport_name,
int component,
IceTransportInternal* ice);
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
private:
void OnMessage(rtc::Message* pmsg) override;
class ChannelPair;
typedef rtc::RefCountedObject<ChannelPair> RefCountedChannel;
// Helper functions to get a channel or transport, or iterator to it (in case
// it needs to be erased).
std::vector<RefCountedChannel*>::iterator GetChannelIterator_n(
const std::string& transport_name,
int component);
std::vector<RefCountedChannel*>::const_iterator GetChannelIterator_n(
const std::string& transport_name,
int component) const;
const JsepTransport* GetJsepTransport(
const std::string& transport_name) const;
JsepTransport* GetJsepTransport(const std::string& transport_name);
const RefCountedChannel* GetChannel_n(const std::string& transport_name,
int component) const;
RefCountedChannel* GetChannel_n(const std::string& transport_name,
int component);
JsepTransport* GetOrCreateJsepTransport(const std::string& transport_name);
void DestroyAllChannels_n();
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
bool SetSslMaxProtocolVersion_n(rtc::SSLProtocolVersion version);
void SetIceConfig_n(const IceConfig& config);
void SetIceRole_n(IceRole ice_role);
bool GetSslRole_n(const std::string& transport_name,
rtc::SSLRole* role) const;
bool SetLocalCertificate_n(
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
const rtc::scoped_refptr<rtc::RTCCertificate>& certificate);
bool GetLocalCertificate_n(
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
const std::string& transport_name,
rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const;
std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate_n(
const std::string& transport_name) const;
bool SetLocalTransportDescription_n(const std::string& transport_name,
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
const TransportDescription& tdesc,
ContentAction action,
std::string* err);
bool SetRemoteTransportDescription_n(const std::string& transport_name,
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
const TransportDescription& tdesc,
ContentAction action,
std::string* err);
void MaybeStartGathering_n();
bool AddRemoteCandidates_n(const std::string& transport_name,
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
const Candidates& candidates,
std::string* err);
bool RemoveRemoteCandidates_n(const Candidates& candidates, std::string* err);
bool ReadyForRemoteCandidates_n(const std::string& transport_name) const;
bool GetStats_n(const std::string& transport_name, TransportStats* stats);
void SetMetricsObserver_n(webrtc::MetricsObserverInterface* metrics_observer);
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
// Handlers for signals from Transport.
void OnChannelWritableState_n(rtc::PacketTransportInternal* transport);
void OnChannelReceivingState_n(rtc::PacketTransportInternal* transport);
void OnChannelGatheringState_n(IceTransportInternal* channel);
void OnChannelCandidateGathered_n(IceTransportInternal* channel,
const Candidate& candidate);
void OnChannelCandidatesRemoved(const Candidates& candidates);
void OnChannelCandidatesRemoved_n(IceTransportInternal* channel,
const Candidates& candidates);
void OnChannelRoleConflict_n(IceTransportInternal* channel);
void OnChannelStateChanged_n(IceTransportInternal* channel);
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
void UpdateAggregateStates_n();
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
void OnDtlsHandshakeError(rtc::SSLHandshakeError error);
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
rtc::Thread* const signaling_thread_ = nullptr;
rtc::Thread* const network_thread_ = nullptr;
PortAllocator* const port_allocator_ = nullptr;
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
std::map<std::string, std::unique_ptr<JsepTransport>> transports_;
std::vector<RefCountedChannel*> channels_;
// Aggregate state for TransportChannelImpls.
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
IceConnectionState connection_state_ = kIceConnectionConnecting;
bool receiving_ = false;
IceGatheringState gathering_state_ = kIceGatheringNew;
IceConfig ice_config_;
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
IceRole ice_role_ = ICEROLE_CONTROLLING;
bool redetermine_role_on_ice_restart_;
uint64_t ice_tiebreaker_ = rtc::CreateRandomId64();
rtc::CryptoOptions crypto_options_;
rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_12;
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
rtc::scoped_refptr<rtc::RTCCertificate> certificate_;
rtc::AsyncInvoker invoker_;
webrtc::MetricsObserverInterface* metrics_observer_ = nullptr;
RTC_DISALLOW_COPY_AND_ASSIGN(TransportController);
Reland of TransportController refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/1358413003/ ) Reason for revert: This CL just landed: https://codereview.chromium.org/1323243006/ Which fixes the FYI bots for the original CL, and breaks them for this revert. Original issue's description: > Revert of TransportController refactoring. (patchset #6 id:100001 of https://codereview.webrtc.org/1350523003/ ) > > Reason for revert: > This CL causes problems with the WebRTC-in-Chromium FYI bots. Presumably it needs to be done in several steps, where removed files are emptied instead of removed in the first step. > > Original issue's description: > > TransportController refactoring. > > > > Getting rid of TransportProxy, and in its place adding a > > TransportController class which will facilitate access to and manage > > the lifetimes of Transports. These Transports will now be accessed > > solely from the worker thread, simplifying their implementation. > > > > This refactoring also pulls Transport-related code out of BaseSession. > > Which means that BaseChannels will now rely on the TransportController > > interface to create channels, rather than BaseSession. > > > > Committed: https://crrev.com/47ee2f3b9f33e8938948c482c921d4e13a3acd83 > > Cr-Commit-Position: refs/heads/master@{#10022} > > TBR=pthatcher@webrtc.org,deadbeef@webrtc.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/a81a42f584baa0d93a4b93da9632415e8922450c > Cr-Commit-Position: refs/heads/master@{#10024} TBR=pthatcher@webrtc.org,torbjorng@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.webrtc.org/1361773005 Cr-Commit-Position: refs/heads/master@{#10036}
2015-09-23 11:50:27 -07:00
};
} // namespace cricket
#endif // PC_TRANSPORTCONTROLLER_H_