blob: 1d3d43f258d6cfcf7c42b3baa22a1dd56660ad71 [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",
Artem Titov6512af02021-03-01 17:30:29 +010014 "-g3doc",
Mirko Bonadei583d6d92018-10-24 15:53:33 +020015 "-ios",
Mirko Bonadeia418e672018-10-24 13:57:25 +020016 "-infra",
17 "-logging",
18 "-media",
Victor Boivie7d3c49a2021-03-25 13:11:03 +010019 "-net",
Mirko Bonadeia418e672018-10-24 13:57:25 +020020 "-modules",
21 "-out",
22 "-p2p",
23 "-pc",
24 "-resources",
25 "-rtc_base",
26 "-rtc_tools",
27 "-sdk",
28 "-stats",
29 "-style-guide",
30 "-system_wrappers",
31 "-test",
32 "-testing",
33 "-third_party",
34 "-tools",
35 "-tools_webrtc",
36 "-video",
37 "-external/webrtc/webrtc", # Android platform build.
38 "-libyuv",
39 "-common_types.h",
40 "-WebRTC",
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +010041]
42
43specific_include_rules = {
Mirko Bonadeia418e672018-10-24 13:57:25 +020044 # Some internal headers are allowed even in API headers:
45 ".*\.h": [
46 "+rtc_base/checks.h",
47 "+rtc_base/system/rtc_export.h",
Mirko Bonadei054f1852019-11-04 16:31:08 +010048 "+rtc_base/system/rtc_export_template.h",
Sebastian Jansson72bba622018-11-19 11:17:12 +010049 "+rtc_base/units/unit_base.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020050 ],
51
52 "array_view\.h": [
53 "+rtc_base/type_traits.h",
54 ],
55
kwiberg96da0112017-06-30 04:23:22 -070056 # Needed because AudioEncoderOpus is in the wrong place for
57 # backwards compatibilty reasons. See
58 # https://bugs.chromium.org/p/webrtc/issues/detail?id=7847
59 "audio_encoder_opus\.h": [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020060 "+modules/audio_coding/codecs/opus/audio_encoder_opus.h",
kwiberg96da0112017-06-30 04:23:22 -070061 ],
62
Steve Anton10542f22019-01-11 09:11:00 -080063 "async_resolver_factory\.h": [
64 "+rtc_base/async_resolver_interface.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020065 ],
66
Harald Alvestrande6e2f282021-03-24 12:13:28 +000067 "async_dns_resolver\.h": [
68 "+rtc_base/socket_address.h",
69 ],
70
Mirko Bonadeia418e672018-10-24 13:57:25 +020071 "candidate\.h": [
72 "+rtc_base/network_constants.h",
Steve Anton10542f22019-01-11 09:11:00 -080073 "+rtc_base/socket_address.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020074 ],
75
Steve Anton10542f22019-01-11 09:11:00 -080076 "data_channel_interface\.h": [
77 "+rtc_base/copy_on_write_buffer.h",
78 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020079 ],
80
Bjorn A Mellem05497f22019-08-01 10:48:20 -070081 "data_channel_transport_interface\.h": [
82 "+rtc_base/copy_on_write_buffer.h",
83 ],
84
Steve Anton10542f22019-01-11 09:11:00 -080085 "dtls_transport_interface\.h": [
86 "+rtc_base/ref_count.h",
Harald Alvestrand7061e512019-04-10 17:20:42 +020087 "+rtc_base/ssl_certificate.h",
Harald Alvestrandad88c882018-11-28 16:47:46 +010088 ],
89
Steve Anton10542f22019-01-11 09:11:00 -080090 "dtmf_sender_interface\.h": [
91 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020092 ],
93
94 "fec_controller\.h": [
95 "+modules/include/module_fec_types.h",
96 ],
97
Marina Cioceae3e07bf2020-02-27 16:28:51 +010098 "frame_transformer_interface\.h": [
99 "+rtc_base/ref_count.h",
100 ],
101
Harald Alvestrand98462622019-01-30 14:57:03 +0100102 "ice_transport_interface\.h": [
103 "+rtc_base/ref_count.h",
104 ],
105
Mirko Bonadeia418e672018-10-24 13:57:25 +0200106 "jsep\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800107 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200108 ],
109
Steve Anton10542f22019-01-11 09:11:00 -0800110 "jsep_ice_candidate\.h": [
111 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200112 ],
113
Steve Anton10542f22019-01-11 09:11:00 -0800114 "jsep_session_description\.h": [
115 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200116 ],
117
Steve Anton10542f22019-01-11 09:11:00 -0800118 "media_stream_interface\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200119 "+modules/audio_processing/include/audio_processing_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800120 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200121 ],
122
Patrik Höglund662e31f2019-09-05 14:35:04 +0200123 "packet_socket_factory\.h": [
124 "+rtc_base/proxy_info.h",
125 "+rtc_base/async_packet_socket.h",
126 ],
127
Steve Anton10542f22019-01-11 09:11:00 -0800128 "peer_connection_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800129 "+media/base/media_config.h",
Steve Anton10542f22019-01-11 09:11:00 -0800130 "+media/base/media_engine.h",
Harald Alvestrandf33f7a22021-05-09 14:58:57 +0000131 "+p2p/base/port.h",
Steve Anton10542f22019-01-11 09:11:00 -0800132 "+p2p/base/port_allocator.h",
Harald Alvestrandf33f7a22021-05-09 14:58:57 +0000133 "+rtc_base/network.h",
134 "+rtc_base/network_constants.h",
Taylor Brandstetter239ac8a2020-07-31 16:07:52 -0700135 "+rtc_base/network_monitor_factory.h",
Harald Alvestrandf33f7a22021-05-09 14:58:57 +0000136 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800137 "+rtc_base/rtc_certificate.h",
138 "+rtc_base/rtc_certificate_generator.h",
139 "+rtc_base/socket_address.h",
140 "+rtc_base/ssl_certificate.h",
141 "+rtc_base/ssl_stream_adapter.h",
Harald Alvestrandf33f7a22021-05-09 14:58:57 +0000142 "+rtc_base/thread.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800143 ],
144
Yves Gerey3e707812018-11-28 16:47:49 +0100145 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800146 "+rtc_base/event.h",
Steve Anton10542f22019-01-11 09:11:00 -0800147 "+rtc_base/message_handler.h", # Inherits from it.
Steve Anton10542f22019-01-11 09:11:00 -0800148 "+rtc_base/ref_counted_object.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800149 "+rtc_base/thread.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100150 ],
151
Steve Anton10542f22019-01-11 09:11:00 -0800152 "ref_counted_base\.h": [
153 "+rtc_base/constructor_magic.h",
154 "+rtc_base/ref_count.h",
155 "+rtc_base/ref_counter.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200156 ],
157
Steve Anton10542f22019-01-11 09:11:00 -0800158 "rtc_error\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200159 "+rtc_base/logging.h",
160 ],
Niels Möllerd8b9ed72019-05-08 13:53:51 +0200161 "rtc_event_log_output_file.h": [
Niels Möllerd8b9ed72019-05-08 13:53:51 +0200162 # For private member and constructor.
163 "+rtc_base/system/file_wrapper.h",
164 ],
Steve Anton10542f22019-01-11 09:11:00 -0800165 "rtp_receiver_interface\.h": [
166 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200167 ],
168
Steve Anton10542f22019-01-11 09:11:00 -0800169 "rtp_sender_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 "rtp_transceiver_interface\.h": [
174 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200175 ],
176
Harald Alvestrandc85328f2019-02-28 07:51:00 +0100177 "sctp_transport_interface\.h": [
178 "+rtc_base/ref_count.h",
179 ],
180
Henrik Boström831ae4e2020-07-29 12:04:00 +0200181 "set_local_description_observer_interface\.h": [
182 "+rtc_base/ref_count.h",
183 ],
Steve Anton10542f22019-01-11 09:11:00 -0800184 "set_remote_description_observer_interface\.h": [
185 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200186 ],
187
Steve Anton10542f22019-01-11 09:11:00 -0800188 "stats_types\.h": [
189 "+rtc_base/constructor_magic.h",
190 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800191 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200192 "+rtc_base/thread_checker.h",
193 ],
194
Steve Anton10542f22019-01-11 09:11:00 -0800195 "uma_metrics\.h": [
196 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200197 ],
198
199 "audio_frame\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800200 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200201 ],
202
203 "audio_mixer\.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_decoder\.h": [
208 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800209 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200210 ],
211
212 "audio_decoder_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_decoder_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 ],
219
220 "audio_encoder\.h": [
221 "+rtc_base/buffer.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200222 ],
223
224 "audio_encoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800225 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200226 ],
227
228 "audio_encoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800229 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200230 ],
231
Steve Anton10542f22019-01-11 09:11:00 -0800232 "frame_decryptor_interface\.h": [
233 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200234 ],
235
Steve Anton10542f22019-01-11 09:11:00 -0800236 "frame_encryptor_interface\.h": [
237 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200238 ],
239
Steve Anton10542f22019-01-11 09:11:00 -0800240 "rtc_stats_collector_callback\.h": [
241 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200242 ],
243
Steve Anton10542f22019-01-11 09:11:00 -0800244 "rtc_stats_report\.h": [
245 "+rtc_base/ref_count.h",
246 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200247 ],
248
249 "audioproc_float\.h": [
250 "+modules/audio_processing/include/audio_processing.h",
251 ],
252
Sam Zackrissonb0bd0702020-05-12 10:48:19 +0200253 "echo_detector_creator\.h": [
254 "+modules/audio_processing/include/audio_processing.h",
255 ],
256
Mirko Bonadeia418e672018-10-24 13:57:25 +0200257 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800258 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200259 ],
260
261 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800262 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200263 ],
264
Mirko Bonadeia418e672018-10-24 13:57:25 +0200265 "mock.*\.h": [
266 "+test/gmock.h",
267 ],
268
269 "simulated_network\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200270 "+rtc_base/random.h",
271 "+rtc_base/thread_annotations.h",
272 ],
273
274 "test_dependency_factory\.h": [
275 "+rtc_base/thread_checker.h",
276 ],
277
Sebastian Janssonfc8279d2020-01-16 11:45:59 +0100278 "time_controller\.h": [
279 "+rtc_base/thread.h",
280 ],
281
Mirko Bonadeia418e672018-10-24 13:57:25 +0200282 "videocodec_test_fixture\.h": [
283 "+modules/video_coding/include/video_codec_interface.h"
284 ],
285
Mirko Bonadeia418e672018-10-24 13:57:25 +0200286 "video_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800287 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200288 ],
289
Artem Titovb586d822021-02-04 15:06:50 +0100290 "sequence_checker\.h": [
291 "+rtc_base/synchronization/sequence_checker_internal.h",
292 "+rtc_base/thread_annotations.h",
293 ],
294
Mirko Bonadei90490372018-10-26 13:17:47 +0200295 # .cc files in api/ should not be restricted in what they can #include,
296 # so we re-add all the top-level directories here. (That's because .h
297 # files leak their #includes to whoever's #including them, but .cc files
298 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800299 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200300 "+audio",
301 "+call",
302 "+common_audio",
303 "+common_video",
304 "+examples",
305 "+logging",
306 "+media",
307 "+modules",
308 "+p2p",
309 "+pc",
310 "+rtc_base",
311 "+rtc_tools",
312 "+sdk",
313 "+stats",
314 "+system_wrappers",
315 "+test",
316 "+tools",
317 "+tools_webrtc",
318 "+video",
319 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800320 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100321}