blob: 37d0e9b3ae508853d829447c93a2372e5e0aee25 [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 "+rtc_base/scoped_ref_ptr.h",
72 ],
73
Steve Anton10542f22019-01-11 09:11:00 -080074 "data_channel_interface\.h": [
75 "+rtc_base/copy_on_write_buffer.h",
76 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020077 ],
78
Steve Anton10542f22019-01-11 09:11:00 -080079 "dtls_transport_interface\.h": [
80 "+rtc_base/ref_count.h",
Harald Alvestrandad88c882018-11-28 16:47:46 +010081 ],
82
Steve Anton10542f22019-01-11 09:11:00 -080083 "dtmf_sender_interface\.h": [
84 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020085 ],
86
87 "fec_controller\.h": [
88 "+modules/include/module_fec_types.h",
89 ],
90
91 "jsep\.h": [
Steve Anton10542f22019-01-11 09:11:00 -080092 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020093 ],
94
Steve Anton10542f22019-01-11 09:11:00 -080095 "jsep_ice_candidate\.h": [
96 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020097 ],
98
Steve Anton10542f22019-01-11 09:11:00 -080099 "jsep_session_description\.h": [
100 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200101 ],
102
Steve Anton10542f22019-01-11 09:11:00 -0800103 "media_stream_interface\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200104 "+modules/audio_processing/include/audio_processing_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800105 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200106 "+rtc_base/scoped_ref_ptr.h",
107 ],
108
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700109 "media_transport_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800110 "+rtc_base/copy_on_write_buffer.h", # As used by datachannelinterface.h
111 "+rtc_base/network_route.h",
Niels Möllerd8a1b7a2018-12-06 13:00:27 +0100112 "+rtc_base/deprecation.h",
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700113 ],
114
Steve Anton10542f22019-01-11 09:11:00 -0800115 "peer_connection_factory_proxy\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200116 "+rtc_base/bind.h",
117 ],
118
Steve Anton10542f22019-01-11 09:11:00 -0800119 "peer_connection_interface\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800120 "+logging/rtc_event_log/rtc_event_log_factory_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -0800121 "+media/base/media_config.h",
122 "+media/base/video_capturer.h",
123 "+media/base/media_engine.h",
124 "+p2p/base/port_allocator.h",
125 "+rtc_base/bitrate_allocation_strategy.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800126 "+rtc_base/network.h",
127 "+rtc_base/platform_file.h",
Steve Anton10542f22019-01-11 09:11:00 -0800128 "+rtc_base/rtc_certificate.h",
129 "+rtc_base/rtc_certificate_generator.h",
130 "+rtc_base/socket_address.h",
131 "+rtc_base/ssl_certificate.h",
132 "+rtc_base/ssl_stream_adapter.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800133 ],
134
Yves Gerey3e707812018-11-28 16:47:49 +0100135 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800136 "+rtc_base/event.h",
Steve Anton10542f22019-01-11 09:11:00 -0800137 "+rtc_base/message_handler.h", # Inherits from it.
138 "+rtc_base/message_queue.h", # Inherits from MessageData.
139 "+rtc_base/ref_counted_object.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100140 "+rtc_base/scoped_ref_ptr.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800141 "+rtc_base/thread.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100142 ],
143
Steve Anton10542f22019-01-11 09:11:00 -0800144 "ref_counted_base\.h": [
145 "+rtc_base/constructor_magic.h",
146 "+rtc_base/ref_count.h",
147 "+rtc_base/ref_counter.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200148 ],
149
Steve Anton10542f22019-01-11 09:11:00 -0800150 "rtc_error\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200151 "+rtc_base/logging.h",
152 ],
153
Steve Anton10542f22019-01-11 09:11:00 -0800154 "rtp_receiver_interface\.h": [
155 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200156 "+rtc_base/scoped_ref_ptr.h",
157 ],
158
Steve Anton10542f22019-01-11 09:11:00 -0800159 "rtp_sender_interface\.h": [
160 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200161 "+rtc_base/scoped_ref_ptr.h",
162 ],
163
Steve Anton10542f22019-01-11 09:11:00 -0800164 "rtp_transceiver_interface\.h": [
165 "+rtc_base/ref_count.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800166 "+rtc_base/scoped_ref_ptr.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200167 ],
168
Steve Anton10542f22019-01-11 09:11:00 -0800169 "set_remote_description_observer_interface\.h": [
170 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200171 ],
172
Steve Anton10542f22019-01-11 09:11:00 -0800173 "stats_types\.h": [
174 "+rtc_base/constructor_magic.h",
175 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200176 "+rtc_base/scoped_ref_ptr.h",
Steve Anton10542f22019-01-11 09:11:00 -0800177 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200178 "+rtc_base/thread_checker.h",
179 ],
180
Steve Anton10542f22019-01-11 09:11:00 -0800181 "uma_metrics\.h": [
182 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200183 ],
184
185 "audio_frame\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800186 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200187 ],
188
189 "audio_mixer\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800190 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200191 ],
192
193 "audio_decoder\.h": [
194 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800195 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200196 ],
197
198 "audio_decoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800199 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200200 ],
201
202 "audio_decoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800203 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200204 "+rtc_base/scoped_ref_ptr.h",
205 ],
206
207 "audio_encoder\.h": [
208 "+rtc_base/buffer.h",
209 "+rtc_base/deprecation.h",
210 ],
211
212 "audio_encoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800213 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200214 ],
215
216 "audio_encoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800217 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200218 "+rtc_base/scoped_ref_ptr.h",
219 ],
220
221 "builtin_audio_decoder_factory\.h": [
222 "+rtc_base/scoped_ref_ptr.h",
223 ],
224
225 "builtin_audio_encoder_factory\.h": [
226 "+rtc_base/scoped_ref_ptr.h",
227 ],
228
Steve Anton10542f22019-01-11 09:11:00 -0800229 "frame_decryptor_interface\.h": [
230 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200231 ],
232
Steve Anton10542f22019-01-11 09:11:00 -0800233 "frame_encryptor_interface\.h": [
234 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200235 ],
236
Steve Anton10542f22019-01-11 09:11:00 -0800237 "rtc_stats_collector_callback\.h": [
238 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200239 "+rtc_base/scoped_ref_ptr.h",
240 ],
241
Steve Anton10542f22019-01-11 09:11:00 -0800242 "rtc_stats_report\.h": [
243 "+rtc_base/ref_count.h",
244 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200245 "+rtc_base/scoped_ref_ptr.h",
246 ],
247
248 "audioproc_float\.h": [
249 "+modules/audio_processing/include/audio_processing.h",
250 ],
251
252 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800253 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200254 ],
255
256 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800257 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200258 ],
259
Mirko Bonadeia418e672018-10-24 13:57:25 +0200260 "mock.*\.h": [
261 "+test/gmock.h",
262 ],
263
264 "simulated_network\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800265 "+rtc_base/critical_section.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200266 "+rtc_base/random.h",
267 "+rtc_base/thread_annotations.h",
268 ],
269
270 "test_dependency_factory\.h": [
271 "+rtc_base/thread_checker.h",
272 ],
273
274 "videocodec_test_fixture\.h": [
275 "+modules/video_coding/include/video_codec_interface.h"
276 ],
277
Mirko Bonadeia418e672018-10-24 13:57:25 +0200278 "video_timing\.h": [
279 "+rtc_base/numerics/safe_conversions.h",
280 ],
281
282 "video_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800283 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200284 "+rtc_base/scoped_ref_ptr.h",
285 ],
286
Mirko Bonadei90490372018-10-26 13:17:47 +0200287 # .cc files in api/ should not be restricted in what they can #include,
288 # so we re-add all the top-level directories here. (That's because .h
289 # files leak their #includes to whoever's #including them, but .cc files
290 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800291 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200292 "+audio",
293 "+call",
294 "+common_audio",
295 "+common_video",
296 "+examples",
297 "+logging",
298 "+media",
299 "+modules",
300 "+p2p",
301 "+pc",
302 "+rtc_base",
303 "+rtc_tools",
304 "+sdk",
305 "+stats",
306 "+system_wrappers",
307 "+test",
308 "+tools",
309 "+tools_webrtc",
310 "+video",
311 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800312 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100313}