blob: edc9a2332996b74f5c772093c1401f334adf2a37 [file] [log] [blame]
Mirko Bonadei90490372018-10-26 13:17:47 +02001# This is supposed to be a complete list of top-level directories,
2# excepting only api/ itself.
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +01003include_rules = [
Mirko Bonadeia418e672018-10-24 13:57:25 +02004 "-audio",
5 "-base",
6 "-build",
7 "-buildtools",
8 "-build_overrides",
9 "-call",
10 "-common_audio",
11 "-common_video",
12 "-data",
13 "-examples",
Mirko Bonadei583d6d92018-10-24 15:53:33 +020014 "-ios",
Mirko Bonadeia418e672018-10-24 13:57:25 +020015 "-infra",
16 "-logging",
17 "-media",
18 "-modules",
19 "-out",
20 "-p2p",
21 "-pc",
22 "-resources",
23 "-rtc_base",
24 "-rtc_tools",
25 "-sdk",
26 "-stats",
27 "-style-guide",
28 "-system_wrappers",
29 "-test",
30 "-testing",
31 "-third_party",
32 "-tools",
33 "-tools_webrtc",
34 "-video",
35 "-external/webrtc/webrtc", # Android platform build.
36 "-libyuv",
37 "-common_types.h",
38 "-WebRTC",
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +010039]
40
41specific_include_rules = {
Mirko Bonadeia418e672018-10-24 13:57:25 +020042 # Some internal headers are allowed even in API headers:
43 ".*\.h": [
44 "+rtc_base/checks.h",
45 "+rtc_base/system/rtc_export.h",
Sebastian Jansson72bba622018-11-19 11:17:12 +010046 "+rtc_base/units/unit_base.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020047 ],
48
49 "array_view\.h": [
50 "+rtc_base/type_traits.h",
51 ],
52
kwiberg96da0112017-06-30 04:23:22 -070053 # Needed because AudioEncoderOpus is in the wrong place for
54 # backwards compatibilty reasons. See
55 # https://bugs.chromium.org/p/webrtc/issues/detail?id=7847
56 "audio_encoder_opus\.h": [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020057 "+modules/audio_coding/codecs/opus/audio_encoder_opus.h",
kwiberg96da0112017-06-30 04:23:22 -070058 ],
59
Steve Anton10542f22019-01-11 09:11:00 -080060 "async_resolver_factory\.h": [
61 "+rtc_base/async_resolver_interface.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020062 ],
63
64 "candidate\.h": [
65 "+rtc_base/network_constants.h",
Steve Anton10542f22019-01-11 09:11:00 -080066 "+rtc_base/socket_address.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020067 ],
68
Mirko Bonadei2ff3f492018-11-22 09:00:13 +010069 "create_peerconnection_factory\.h": [
Anders Carlsson01092952018-12-11 15:44:54 +010070 "+rtc_base/deprecation.h",
Mirko Bonadei2ff3f492018-11-22 09:00:13 +010071 ],
72
Steve Anton10542f22019-01-11 09:11:00 -080073 "data_channel_interface\.h": [
74 "+rtc_base/copy_on_write_buffer.h",
75 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020076 ],
77
Steve Anton10542f22019-01-11 09:11:00 -080078 "dtls_transport_interface\.h": [
79 "+rtc_base/ref_count.h",
Harald Alvestrandad88c882018-11-28 16:47:46 +010080 ],
81
Steve Anton10542f22019-01-11 09:11:00 -080082 "dtmf_sender_interface\.h": [
83 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020084 ],
85
86 "fec_controller\.h": [
87 "+modules/include/module_fec_types.h",
88 ],
89
90 "jsep\.h": [
Steve Anton10542f22019-01-11 09:11:00 -080091 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020092 ],
93
Steve Anton10542f22019-01-11 09:11:00 -080094 "jsep_ice_candidate\.h": [
95 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020096 ],
97
Steve Anton10542f22019-01-11 09:11:00 -080098 "jsep_session_description\.h": [
99 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200100 ],
101
Steve Anton10542f22019-01-11 09:11:00 -0800102 "media_stream_interface\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200103 "+modules/audio_processing/include/audio_processing_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800104 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200105 ],
106
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700107 "media_transport_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800108 "+rtc_base/copy_on_write_buffer.h", # As used by datachannelinterface.h
109 "+rtc_base/network_route.h",
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700110 ],
111
Steve Anton10542f22019-01-11 09:11:00 -0800112 "peer_connection_factory_proxy\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200113 "+rtc_base/bind.h",
114 ],
115
Steve Anton10542f22019-01-11 09:11:00 -0800116 "peer_connection_interface\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800117 "+logging/rtc_event_log/rtc_event_log_factory_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -0800118 "+media/base/media_config.h",
119 "+media/base/video_capturer.h",
120 "+media/base/media_engine.h",
121 "+p2p/base/port_allocator.h",
122 "+rtc_base/bitrate_allocation_strategy.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800123 "+rtc_base/network.h",
124 "+rtc_base/platform_file.h",
Steve Anton10542f22019-01-11 09:11:00 -0800125 "+rtc_base/rtc_certificate.h",
126 "+rtc_base/rtc_certificate_generator.h",
127 "+rtc_base/socket_address.h",
128 "+rtc_base/ssl_certificate.h",
129 "+rtc_base/ssl_stream_adapter.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800130 ],
131
Yves Gerey3e707812018-11-28 16:47:49 +0100132 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800133 "+rtc_base/event.h",
Steve Anton10542f22019-01-11 09:11:00 -0800134 "+rtc_base/message_handler.h", # Inherits from it.
135 "+rtc_base/message_queue.h", # Inherits from MessageData.
136 "+rtc_base/ref_counted_object.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800137 "+rtc_base/thread.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100138 ],
139
Steve Anton10542f22019-01-11 09:11:00 -0800140 "ref_counted_base\.h": [
141 "+rtc_base/constructor_magic.h",
142 "+rtc_base/ref_count.h",
143 "+rtc_base/ref_counter.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200144 ],
145
Steve Anton10542f22019-01-11 09:11:00 -0800146 "rtc_error\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200147 "+rtc_base/logging.h",
148 ],
149
Steve Anton10542f22019-01-11 09:11:00 -0800150 "rtp_receiver_interface\.h": [
151 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200152 ],
153
Steve Anton10542f22019-01-11 09:11:00 -0800154 "rtp_sender_interface\.h": [
155 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200156 ],
157
Steve Anton10542f22019-01-11 09:11:00 -0800158 "rtp_transceiver_interface\.h": [
159 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200160 ],
161
Steve Anton10542f22019-01-11 09:11:00 -0800162 "set_remote_description_observer_interface\.h": [
163 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200164 ],
165
Steve Anton10542f22019-01-11 09:11:00 -0800166 "stats_types\.h": [
167 "+rtc_base/constructor_magic.h",
168 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800169 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200170 "+rtc_base/thread_checker.h",
171 ],
172
Steve Anton10542f22019-01-11 09:11:00 -0800173 "uma_metrics\.h": [
174 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200175 ],
176
177 "audio_frame\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800178 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200179 ],
180
181 "audio_mixer\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800182 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200183 ],
184
185 "audio_decoder\.h": [
186 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800187 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200188 ],
189
190 "audio_decoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800191 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200192 ],
193
194 "audio_decoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800195 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200196 ],
197
198 "audio_encoder\.h": [
199 "+rtc_base/buffer.h",
200 "+rtc_base/deprecation.h",
201 ],
202
203 "audio_encoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800204 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200205 ],
206
207 "audio_encoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800208 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200209 ],
210
Steve Anton10542f22019-01-11 09:11:00 -0800211 "frame_decryptor_interface\.h": [
212 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200213 ],
214
Steve Anton10542f22019-01-11 09:11:00 -0800215 "frame_encryptor_interface\.h": [
216 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200217 ],
218
Steve Anton10542f22019-01-11 09:11:00 -0800219 "rtc_stats_collector_callback\.h": [
220 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200221 ],
222
Steve Anton10542f22019-01-11 09:11:00 -0800223 "rtc_stats_report\.h": [
224 "+rtc_base/ref_count.h",
225 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200226 ],
227
228 "audioproc_float\.h": [
229 "+modules/audio_processing/include/audio_processing.h",
230 ],
231
232 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800233 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200234 ],
235
236 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800237 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200238 ],
239
Mirko Bonadeia418e672018-10-24 13:57:25 +0200240 "mock.*\.h": [
241 "+test/gmock.h",
242 ],
243
244 "simulated_network\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800245 "+rtc_base/critical_section.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200246 "+rtc_base/random.h",
247 "+rtc_base/thread_annotations.h",
248 ],
249
250 "test_dependency_factory\.h": [
251 "+rtc_base/thread_checker.h",
252 ],
253
254 "videocodec_test_fixture\.h": [
255 "+modules/video_coding/include/video_codec_interface.h"
256 ],
257
Mirko Bonadeia418e672018-10-24 13:57:25 +0200258 "video_timing\.h": [
259 "+rtc_base/numerics/safe_conversions.h",
260 ],
261
262 "video_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800263 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200264 ],
265
Mirko Bonadei90490372018-10-26 13:17:47 +0200266 # .cc files in api/ should not be restricted in what they can #include,
267 # so we re-add all the top-level directories here. (That's because .h
268 # files leak their #includes to whoever's #including them, but .cc files
269 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800270 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200271 "+audio",
272 "+call",
273 "+common_audio",
274 "+common_video",
275 "+examples",
276 "+logging",
277 "+media",
278 "+modules",
279 "+p2p",
280 "+pc",
281 "+rtc_base",
282 "+rtc_tools",
283 "+sdk",
284 "+stats",
285 "+system_wrappers",
286 "+test",
287 "+tools",
288 "+tools_webrtc",
289 "+video",
290 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800291 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100292}