diff --git a/api/BUILD.gn b/api/BUILD.gn index 8e8b44ec51..cc4de43479 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -41,6 +41,7 @@ rtc_static_library("libjingle_peerconnection_api") { "cryptoparams.h", "datachannelinterface.h", "dtmfsenderinterface.h", + "jsep.cc", "jsep.h", "jsepicecandidate.h", "jsepsessiondescription.h", diff --git a/api/jsep.cc b/api/jsep.cc new file mode 100644 index 0000000000..1f4afbaca1 --- /dev/null +++ b/api/jsep.cc @@ -0,0 +1,24 @@ +/* + * Copyright 2017 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. + */ + +#include "api/jsep.h" + +namespace webrtc { + +std::string IceCandidateInterface::server_url() const { + return ""; +} + +size_t SessionDescriptionInterface::RemoveCandidates( + const std::vector& candidates) { + return 0; +} + +} // namespace webrtc diff --git a/api/jsep.h b/api/jsep.h index c05f3829ae..581f689d1c 100644 --- a/api/jsep.h +++ b/api/jsep.h @@ -64,7 +64,7 @@ class IceCandidateInterface { // The URL of the ICE server which this candidate was gathered from. // TODO(zhihuang): Remove the default implementation once the subclasses // implement this method. - virtual std::string server_url() const { return ""; } + virtual std::string server_url() const; // Creates a SDP-ized form of this candidate. virtual bool ToString(std::string* out) const = 0; }; @@ -155,7 +155,7 @@ class SessionDescriptionInterface { // // Returns the number of candidates removed. virtual size_t RemoveCandidates( - const std::vector& candidates) { return 0; } + const std::vector& candidates); // Returns the number of m= sections in the session description. virtual size_t number_of_mediasections() const = 0; @@ -200,7 +200,7 @@ class CreateSessionDescriptionObserver : public rtc::RefCountInterface { virtual void OnFailure(const std::string& error) = 0; protected: - ~CreateSessionDescriptionObserver() {} + ~CreateSessionDescriptionObserver() override = default; }; // SetLocalDescription and SetRemoteDescription callback interface. @@ -210,7 +210,7 @@ class SetSessionDescriptionObserver : public rtc::RefCountInterface { virtual void OnFailure(const std::string& error) = 0; protected: - ~SetSessionDescriptionObserver() {} + ~SetSessionDescriptionObserver() override = default; }; } // namespace webrtc