Fix ortc_api circular deps.
This will help keep ortc dependencies clean in the future, since gn --check forces us to depend on components from which we include headers. cryptoparams.h moves into api/, but ortc appears to think it should be there anyway. We could consider moving it into the ortc/ api, but it doesn't appear to be specific to ortc. Bug: webrtc:6828 Change-Id: Iddae438d10b5e84b2fbc52565364319e20f90613 Reviewed-on: https://webrtc-review.googlesource.com/22660 Commit-Queue: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20686}
This commit is contained in:

committed by
Commit Bot

parent
676ab60666
commit
7aee3d538c
@ -38,6 +38,7 @@ rtc_static_library("libjingle_peerconnection_api") {
|
|||||||
sources = [
|
sources = [
|
||||||
"candidate.cc",
|
"candidate.cc",
|
||||||
"candidate.h",
|
"candidate.h",
|
||||||
|
"cryptoparams.h",
|
||||||
"datachannelinterface.h",
|
"datachannelinterface.h",
|
||||||
"dtmfsenderinterface.h",
|
"dtmfsenderinterface.h",
|
||||||
"jsep.h",
|
"jsep.h",
|
||||||
@ -147,7 +148,6 @@ rtc_source_set("libjingle_logging_api") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rtc_source_set("ortc_api") {
|
rtc_source_set("ortc_api") {
|
||||||
check_includes = false # TODO(deadbeef): Remove (bugs.webrtc.org/6828)
|
|
||||||
sources = [
|
sources = [
|
||||||
"ortc/mediadescription.cc",
|
"ortc/mediadescription.cc",
|
||||||
"ortc/mediadescription.h",
|
"ortc/mediadescription.h",
|
||||||
@ -167,8 +167,11 @@ rtc_source_set("ortc_api") {
|
|||||||
# TODO(deadbeef): Create a separate target for the common things ORTC and
|
# TODO(deadbeef): Create a separate target for the common things ORTC and
|
||||||
# PeerConnection code shares, so that ortc_api can depend on that instead of
|
# PeerConnection code shares, so that ortc_api can depend on that instead of
|
||||||
# libjingle_peerconnection_api.
|
# libjingle_peerconnection_api.
|
||||||
public_deps = [
|
deps = [
|
||||||
":libjingle_peerconnection_api",
|
":libjingle_peerconnection_api",
|
||||||
|
":optional",
|
||||||
|
"..:webrtc_common",
|
||||||
|
"../rtc_base:rtc_base",
|
||||||
]
|
]
|
||||||
if (!build_with_chromium && is_clang) {
|
if (!build_with_chromium && is_clang) {
|
||||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||||
|
39
api/cryptoparams.h
Normal file
39
api/cryptoparams.h
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2004 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 API_CRYPTOPARAMS_H_
|
||||||
|
#define API_CRYPTOPARAMS_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace cricket {
|
||||||
|
|
||||||
|
// Parameters for SRTP negotiation, as described in RFC 4568.
|
||||||
|
struct CryptoParams {
|
||||||
|
CryptoParams() : tag(0) {}
|
||||||
|
CryptoParams(int t,
|
||||||
|
const std::string& cs,
|
||||||
|
const std::string& kp,
|
||||||
|
const std::string& sp)
|
||||||
|
: tag(t), cipher_suite(cs), key_params(kp), session_params(sp) {}
|
||||||
|
|
||||||
|
bool Matches(const CryptoParams& params) const {
|
||||||
|
return (tag == params.tag && cipher_suite == params.cipher_suite);
|
||||||
|
}
|
||||||
|
|
||||||
|
int tag;
|
||||||
|
std::string cipher_suite;
|
||||||
|
std::string key_params;
|
||||||
|
std::string session_params;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace cricket
|
||||||
|
|
||||||
|
#endif // API_CRYPTOPARAMS_H_
|
@ -15,8 +15,8 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/cryptoparams.h"
|
||||||
#include "api/optional.h"
|
#include "api/optional.h"
|
||||||
#include "media/base/cryptoparams.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include "api/ortc/udptransportinterface.h"
|
#include "api/ortc/udptransportinterface.h"
|
||||||
#include "api/rtcerror.h"
|
#include "api/rtcerror.h"
|
||||||
#include "api/rtpparameters.h"
|
#include "api/rtpparameters.h"
|
||||||
#include "p2p/base/packetsocketfactory.h"
|
|
||||||
#include "rtc_base/network.h"
|
#include "rtc_base/network.h"
|
||||||
#include "rtc_base/scoped_ref_ptr.h"
|
#include "rtc_base/scoped_ref_ptr.h"
|
||||||
#include "rtc_base/thread.h"
|
#include "rtc_base/thread.h"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#include "api/ortc/rtptransportinterface.h"
|
#include "api/ortc/rtptransportinterface.h"
|
||||||
#include "api/rtcerror.h"
|
#include "api/rtcerror.h"
|
||||||
#include "media/base/cryptoparams.h"
|
#include "api/cryptoparams.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
|
@ -8,32 +8,10 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// TODO(bugs.webrtc.org/7504): Remove.
|
||||||
#ifndef MEDIA_BASE_CRYPTOPARAMS_H_
|
#ifndef MEDIA_BASE_CRYPTOPARAMS_H_
|
||||||
#define MEDIA_BASE_CRYPTOPARAMS_H_
|
#define MEDIA_BASE_CRYPTOPARAMS_H_
|
||||||
|
|
||||||
#include <string>
|
#include "api/cryptoparams.h"
|
||||||
|
|
||||||
namespace cricket {
|
|
||||||
|
|
||||||
// Parameters for SRTP negotiation, as described in RFC 4568.
|
|
||||||
struct CryptoParams {
|
|
||||||
CryptoParams() : tag(0) {}
|
|
||||||
CryptoParams(int t,
|
|
||||||
const std::string& cs,
|
|
||||||
const std::string& kp,
|
|
||||||
const std::string& sp)
|
|
||||||
: tag(t), cipher_suite(cs), key_params(kp), session_params(sp) {}
|
|
||||||
|
|
||||||
bool Matches(const CryptoParams& params) const {
|
|
||||||
return (tag == params.tag && cipher_suite == params.cipher_suite);
|
|
||||||
}
|
|
||||||
|
|
||||||
int tag;
|
|
||||||
std::string cipher_suite;
|
|
||||||
std::string key_params;
|
|
||||||
std::string session_params;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace cricket
|
|
||||||
|
|
||||||
#endif // MEDIA_BASE_CRYPTOPARAMS_H_
|
#endif // MEDIA_BASE_CRYPTOPARAMS_H_
|
||||||
|
@ -76,6 +76,7 @@ if (rtc_include_tests) {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":ortc",
|
":ortc",
|
||||||
|
"../api:libjingle_peerconnection_api",
|
||||||
"../api/audio_codecs:builtin_audio_decoder_factory",
|
"../api/audio_codecs:builtin_audio_decoder_factory",
|
||||||
"../api/audio_codecs:builtin_audio_encoder_factory",
|
"../api/audio_codecs:builtin_audio_encoder_factory",
|
||||||
"../media:rtc_media_tests_utils",
|
"../media:rtc_media_tests_utils",
|
||||||
|
@ -135,6 +135,7 @@ if (rtc_include_tests) {
|
|||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":rtc_p2p",
|
":rtc_p2p",
|
||||||
|
"../api:libjingle_peerconnection_api",
|
||||||
"../api:ortc_api",
|
"../api:ortc_api",
|
||||||
"../rtc_base:rtc_base",
|
"../rtc_base:rtc_base",
|
||||||
"../rtc_base:rtc_base_approved",
|
"../rtc_base:rtc_base_approved",
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include "api/cryptoparams.h"
|
||||||
#include "api/optional.h"
|
#include "api/optional.h"
|
||||||
#include "common_types.h" // NOLINT(build/include)
|
#include "common_types.h" // NOLINT(build/include)
|
||||||
#include "media/base/cryptoparams.h"
|
|
||||||
#include "media/base/h264_profile_level_id.h"
|
#include "media/base/h264_profile_level_id.h"
|
||||||
#include "media/base/mediaconstants.h"
|
#include "media/base/mediaconstants.h"
|
||||||
#include "p2p/base/p2pconstants.h"
|
#include "p2p/base/p2pconstants.h"
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/cryptoparams.h"
|
||||||
#include "api/mediatypes.h"
|
#include "api/mediatypes.h"
|
||||||
#include "media/base/codec.h"
|
#include "media/base/codec.h"
|
||||||
#include "media/base/cryptoparams.h"
|
|
||||||
#include "media/base/mediachannel.h"
|
#include "media/base/mediachannel.h"
|
||||||
#include "media/base/mediaconstants.h"
|
#include "media/base/mediaconstants.h"
|
||||||
#include "media/base/mediaengine.h" // For DataChannelType
|
#include "media/base/mediaengine.h" // For DataChannelType
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/cryptoparams.h"
|
||||||
#include "api/optional.h"
|
#include "api/optional.h"
|
||||||
#include "media/base/cryptoparams.h"
|
|
||||||
#include "p2p/base/sessiondescription.h"
|
#include "p2p/base/sessiondescription.h"
|
||||||
#include "rtc_base/basictypes.h"
|
#include "rtc_base/basictypes.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "pc/srtpfilter.h"
|
#include "pc/srtpfilter.h"
|
||||||
|
|
||||||
#include "media/base/cryptoparams.h"
|
#include "api/cryptoparams.h"
|
||||||
#include "rtc_base/gunit.h"
|
#include "rtc_base/gunit.h"
|
||||||
|
|
||||||
using cricket::CryptoParams;
|
using cricket::CryptoParams;
|
||||||
|
@ -23,12 +23,12 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "api/candidate.h"
|
#include "api/candidate.h"
|
||||||
|
#include "api/cryptoparams.h"
|
||||||
#include "api/jsepicecandidate.h"
|
#include "api/jsepicecandidate.h"
|
||||||
#include "api/jsepsessiondescription.h"
|
#include "api/jsepsessiondescription.h"
|
||||||
// for RtpExtension
|
// for RtpExtension
|
||||||
#include "api/rtpparameters.h"
|
#include "api/rtpparameters.h"
|
||||||
#include "media/base/codec.h"
|
#include "media/base/codec.h"
|
||||||
#include "media/base/cryptoparams.h"
|
|
||||||
#include "media/base/mediaconstants.h"
|
#include "media/base/mediaconstants.h"
|
||||||
#include "media/base/rtputils.h"
|
#include "media/base/rtputils.h"
|
||||||
#include "media/sctp/sctptransportinternal.h"
|
#include "media/sctp/sctptransportinternal.h"
|
||||||
|
Reference in New Issue
Block a user