blob: f7210d803b0a6eb2dce0774ef2b8311dd02c1241 [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",
Sebastian Jansson11e55ee2019-03-06 16:58:18 +010047 "+rtc_base/deprecation.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020048 ],
49
50 "array_view\.h": [
51 "+rtc_base/type_traits.h",
52 ],
53
kwiberg96da0112017-06-30 04:23:22 -070054 # Needed because AudioEncoderOpus is in the wrong place for
55 # backwards compatibilty reasons. See
56 # https://bugs.chromium.org/p/webrtc/issues/detail?id=7847
57 "audio_encoder_opus\.h": [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020058 "+modules/audio_coding/codecs/opus/audio_encoder_opus.h",
kwiberg96da0112017-06-30 04:23:22 -070059 ],
60
Steve Anton10542f22019-01-11 09:11:00 -080061 "async_resolver_factory\.h": [
62 "+rtc_base/async_resolver_interface.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020063 ],
64
65 "candidate\.h": [
66 "+rtc_base/network_constants.h",
Steve Anton10542f22019-01-11 09:11:00 -080067 "+rtc_base/socket_address.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020068 ],
69
Steve Anton10542f22019-01-11 09:11:00 -080070 "data_channel_interface\.h": [
71 "+rtc_base/copy_on_write_buffer.h",
72 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020073 ],
74
Bjorn A Mellem05497f22019-08-01 10:48:20 -070075 "data_channel_transport_interface\.h": [
76 "+rtc_base/copy_on_write_buffer.h",
77 ],
78
Steve Anton10542f22019-01-11 09:11:00 -080079 "dtls_transport_interface\.h": [
80 "+rtc_base/ref_count.h",
Harald Alvestrand7061e512019-04-10 17:20:42 +020081 "+rtc_base/ssl_certificate.h",
Harald Alvestrandad88c882018-11-28 16:47:46 +010082 ],
83
Steve Anton10542f22019-01-11 09:11:00 -080084 "dtmf_sender_interface\.h": [
85 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020086 ],
87
88 "fec_controller\.h": [
89 "+modules/include/module_fec_types.h",
90 ],
91
Harald Alvestrand98462622019-01-30 14:57:03 +010092 "ice_transport_interface\.h": [
93 "+rtc_base/ref_count.h",
94 ],
95
Mirko Bonadeia418e672018-10-24 13:57:25 +020096 "jsep\.h": [
Steve Anton10542f22019-01-11 09:11:00 -080097 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020098 ],
99
Steve Anton10542f22019-01-11 09:11:00 -0800100 "jsep_ice_candidate\.h": [
101 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200102 ],
103
Steve Anton10542f22019-01-11 09:11:00 -0800104 "jsep_session_description\.h": [
105 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200106 ],
107
Steve Anton10542f22019-01-11 09:11:00 -0800108 "media_stream_interface\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200109 "+modules/audio_processing/include/audio_processing_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800110 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200111 ],
112
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700113 "media_transport_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800114 "+rtc_base/copy_on_write_buffer.h", # As used by datachannelinterface.h
115 "+rtc_base/network_route.h",
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700116 ],
117
Steve Anton10542f22019-01-11 09:11:00 -0800118 "peer_connection_factory_proxy\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200119 "+rtc_base/bind.h",
120 ],
121
Steve Anton10542f22019-01-11 09:11:00 -0800122 "peer_connection_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800123 "+media/base/media_config.h",
Steve Anton10542f22019-01-11 09:11:00 -0800124 "+media/base/media_engine.h",
125 "+p2p/base/port_allocator.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800126 "+rtc_base/network.h",
Steve Anton10542f22019-01-11 09:11:00 -0800127 "+rtc_base/rtc_certificate.h",
128 "+rtc_base/rtc_certificate_generator.h",
129 "+rtc_base/socket_address.h",
130 "+rtc_base/ssl_certificate.h",
131 "+rtc_base/ssl_stream_adapter.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800132 ],
133
Yves Gerey3e707812018-11-28 16:47:49 +0100134 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800135 "+rtc_base/event.h",
Steve Anton10542f22019-01-11 09:11:00 -0800136 "+rtc_base/message_handler.h", # Inherits from it.
137 "+rtc_base/message_queue.h", # Inherits from MessageData.
138 "+rtc_base/ref_counted_object.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800139 "+rtc_base/thread.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100140 ],
141
Steve Anton10542f22019-01-11 09:11:00 -0800142 "ref_counted_base\.h": [
143 "+rtc_base/constructor_magic.h",
144 "+rtc_base/ref_count.h",
145 "+rtc_base/ref_counter.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200146 ],
147
Steve Anton10542f22019-01-11 09:11:00 -0800148 "rtc_error\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200149 "+rtc_base/logging.h",
150 ],
Niels Möllerd8b9ed72019-05-08 13:53:51 +0200151 "rtc_event_log_output_file.h": [
Niels Möllerd8b9ed72019-05-08 13:53:51 +0200152 # For private member and constructor.
153 "+rtc_base/system/file_wrapper.h",
154 ],
Steve Anton10542f22019-01-11 09:11:00 -0800155 "rtp_receiver_interface\.h": [
156 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200157 ],
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 ],
162
Steve Anton10542f22019-01-11 09:11:00 -0800163 "rtp_transceiver_interface\.h": [
164 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200165 ],
166
Harald Alvestrandc85328f2019-02-28 07:51:00 +0100167 "sctp_transport_interface\.h": [
168 "+rtc_base/ref_count.h",
169 ],
170
Steve Anton10542f22019-01-11 09:11:00 -0800171 "set_remote_description_observer_interface\.h": [
172 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200173 ],
174
Steve Anton10542f22019-01-11 09:11:00 -0800175 "stats_types\.h": [
176 "+rtc_base/constructor_magic.h",
177 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800178 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200179 "+rtc_base/thread_checker.h",
180 ],
181
Steve Anton10542f22019-01-11 09:11:00 -0800182 "uma_metrics\.h": [
183 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200184 ],
185
186 "audio_frame\.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_mixer\.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\.h": [
195 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800196 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200197 ],
198
199 "audio_decoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800200 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200201 ],
202
203 "audio_decoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800204 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200205 ],
206
207 "audio_encoder\.h": [
208 "+rtc_base/buffer.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200209 ],
210
211 "audio_encoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800212 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200213 ],
214
215 "audio_encoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800216 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200217 ],
218
Steve Anton10542f22019-01-11 09:11:00 -0800219 "frame_decryptor_interface\.h": [
220 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200221 ],
222
Steve Anton10542f22019-01-11 09:11:00 -0800223 "frame_encryptor_interface\.h": [
224 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200225 ],
226
Steve Anton10542f22019-01-11 09:11:00 -0800227 "rtc_stats_collector_callback\.h": [
228 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200229 ],
230
Steve Anton10542f22019-01-11 09:11:00 -0800231 "rtc_stats_report\.h": [
232 "+rtc_base/ref_count.h",
233 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200234 ],
235
236 "audioproc_float\.h": [
237 "+modules/audio_processing/include/audio_processing.h",
238 ],
239
240 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800241 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200242 ],
243
244 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800245 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200246 ],
247
Mirko Bonadeia418e672018-10-24 13:57:25 +0200248 "mock.*\.h": [
249 "+test/gmock.h",
250 ],
251
252 "simulated_network\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800253 "+rtc_base/critical_section.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200254 "+rtc_base/random.h",
255 "+rtc_base/thread_annotations.h",
256 ],
257
258 "test_dependency_factory\.h": [
259 "+rtc_base/thread_checker.h",
260 ],
261
262 "videocodec_test_fixture\.h": [
263 "+modules/video_coding/include/video_codec_interface.h"
264 ],
265
Mirko Bonadeia418e672018-10-24 13:57:25 +0200266 "video_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800267 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200268 ],
269
Mirko Bonadei90490372018-10-26 13:17:47 +0200270 # .cc files in api/ should not be restricted in what they can #include,
271 # so we re-add all the top-level directories here. (That's because .h
272 # files leak their #includes to whoever's #including them, but .cc files
273 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800274 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200275 "+audio",
276 "+call",
277 "+common_audio",
278 "+common_video",
279 "+examples",
280 "+logging",
281 "+media",
282 "+modules",
283 "+p2p",
284 "+pc",
285 "+rtc_base",
286 "+rtc_tools",
287 "+sdk",
288 "+stats",
289 "+system_wrappers",
290 "+test",
291 "+tools",
292 "+tools_webrtc",
293 "+video",
294 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800295 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100296}