blob: 9665938a5decd1140ad511e0f1dadce12323ad34 [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",
19 "-modules",
20 "-out",
21 "-p2p",
22 "-pc",
23 "-resources",
24 "-rtc_base",
25 "-rtc_tools",
26 "-sdk",
27 "-stats",
28 "-style-guide",
29 "-system_wrappers",
30 "-test",
31 "-testing",
32 "-third_party",
33 "-tools",
34 "-tools_webrtc",
35 "-video",
36 "-external/webrtc/webrtc", # Android platform build.
37 "-libyuv",
38 "-common_types.h",
39 "-WebRTC",
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +010040]
41
42specific_include_rules = {
Mirko Bonadeia418e672018-10-24 13:57:25 +020043 # Some internal headers are allowed even in API headers:
44 ".*\.h": [
45 "+rtc_base/checks.h",
46 "+rtc_base/system/rtc_export.h",
Mirko Bonadei054f1852019-11-04 16:31:08 +010047 "+rtc_base/system/rtc_export_template.h",
Sebastian Jansson72bba622018-11-19 11:17:12 +010048 "+rtc_base/units/unit_base.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020049 ],
50
51 "array_view\.h": [
52 "+rtc_base/type_traits.h",
53 ],
54
kwiberg96da0112017-06-30 04:23:22 -070055 # Needed because AudioEncoderOpus is in the wrong place for
56 # backwards compatibilty reasons. See
57 # https://bugs.chromium.org/p/webrtc/issues/detail?id=7847
58 "audio_encoder_opus\.h": [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020059 "+modules/audio_coding/codecs/opus/audio_encoder_opus.h",
kwiberg96da0112017-06-30 04:23:22 -070060 ],
61
Steve Anton10542f22019-01-11 09:11:00 -080062 "async_resolver_factory\.h": [
63 "+rtc_base/async_resolver_interface.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020064 ],
65
Harald Alvestrande6e2f282021-03-24 12:13:28 +000066 "async_dns_resolver\.h": [
67 "+rtc_base/socket_address.h",
68 ],
69
Mirko Bonadeia418e672018-10-24 13:57:25 +020070 "candidate\.h": [
71 "+rtc_base/network_constants.h",
Steve Anton10542f22019-01-11 09:11:00 -080072 "+rtc_base/socket_address.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020073 ],
74
Steve Anton10542f22019-01-11 09:11:00 -080075 "data_channel_interface\.h": [
76 "+rtc_base/copy_on_write_buffer.h",
77 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020078 ],
79
Bjorn A Mellem05497f22019-08-01 10:48:20 -070080 "data_channel_transport_interface\.h": [
81 "+rtc_base/copy_on_write_buffer.h",
82 ],
83
Steve Anton10542f22019-01-11 09:11:00 -080084 "dtls_transport_interface\.h": [
85 "+rtc_base/ref_count.h",
Harald Alvestrand7061e512019-04-10 17:20:42 +020086 "+rtc_base/ssl_certificate.h",
Harald Alvestrandad88c882018-11-28 16:47:46 +010087 ],
88
Steve Anton10542f22019-01-11 09:11:00 -080089 "dtmf_sender_interface\.h": [
90 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020091 ],
92
93 "fec_controller\.h": [
94 "+modules/include/module_fec_types.h",
95 ],
96
Marina Cioceae3e07bf2020-02-27 16:28:51 +010097 "frame_transformer_interface\.h": [
98 "+rtc_base/ref_count.h",
99 ],
100
Harald Alvestrand98462622019-01-30 14:57:03 +0100101 "ice_transport_interface\.h": [
102 "+rtc_base/ref_count.h",
103 ],
104
Mirko Bonadeia418e672018-10-24 13:57:25 +0200105 "jsep\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800106 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200107 ],
108
Steve Anton10542f22019-01-11 09:11:00 -0800109 "jsep_ice_candidate\.h": [
110 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200111 ],
112
Steve Anton10542f22019-01-11 09:11:00 -0800113 "jsep_session_description\.h": [
114 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200115 ],
116
Steve Anton10542f22019-01-11 09:11:00 -0800117 "media_stream_interface\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200118 "+modules/audio_processing/include/audio_processing_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800119 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200120 ],
121
Patrik Höglund662e31f2019-09-05 14:35:04 +0200122 "packet_socket_factory\.h": [
123 "+rtc_base/proxy_info.h",
124 "+rtc_base/async_packet_socket.h",
125 ],
126
Steve Anton10542f22019-01-11 09:11:00 -0800127 "peer_connection_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800128 "+media/base/media_config.h",
Steve Anton10542f22019-01-11 09:11:00 -0800129 "+media/base/media_engine.h",
130 "+p2p/base/port_allocator.h",
Taylor Brandstetter239ac8a2020-07-31 16:07:52 -0700131 "+rtc_base/network_monitor_factory.h",
Steve Anton10542f22019-01-11 09:11:00 -0800132 "+rtc_base/rtc_certificate.h",
133 "+rtc_base/rtc_certificate_generator.h",
134 "+rtc_base/socket_address.h",
135 "+rtc_base/ssl_certificate.h",
136 "+rtc_base/ssl_stream_adapter.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800137 ],
138
Yves Gerey3e707812018-11-28 16:47:49 +0100139 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800140 "+rtc_base/event.h",
Steve Anton10542f22019-01-11 09:11:00 -0800141 "+rtc_base/message_handler.h", # Inherits from it.
Steve Anton10542f22019-01-11 09:11:00 -0800142 "+rtc_base/ref_counted_object.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800143 "+rtc_base/thread.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100144 ],
145
Steve Anton10542f22019-01-11 09:11:00 -0800146 "ref_counted_base\.h": [
147 "+rtc_base/constructor_magic.h",
148 "+rtc_base/ref_count.h",
149 "+rtc_base/ref_counter.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200150 ],
151
Steve Anton10542f22019-01-11 09:11:00 -0800152 "rtc_error\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200153 "+rtc_base/logging.h",
154 ],
Niels Möllerd8b9ed72019-05-08 13:53:51 +0200155 "rtc_event_log_output_file.h": [
Niels Möllerd8b9ed72019-05-08 13:53:51 +0200156 # For private member and constructor.
157 "+rtc_base/system/file_wrapper.h",
158 ],
Steve Anton10542f22019-01-11 09:11:00 -0800159 "rtp_receiver_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_sender_interface\.h": [
164 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200165 ],
166
Steve Anton10542f22019-01-11 09:11:00 -0800167 "rtp_transceiver_interface\.h": [
168 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200169 ],
170
Harald Alvestrandc85328f2019-02-28 07:51:00 +0100171 "sctp_transport_interface\.h": [
172 "+rtc_base/ref_count.h",
173 ],
174
Henrik Boström831ae4e2020-07-29 12:04:00 +0200175 "set_local_description_observer_interface\.h": [
176 "+rtc_base/ref_count.h",
177 ],
Steve Anton10542f22019-01-11 09:11:00 -0800178 "set_remote_description_observer_interface\.h": [
179 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200180 ],
181
Steve Anton10542f22019-01-11 09:11:00 -0800182 "stats_types\.h": [
183 "+rtc_base/constructor_magic.h",
184 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800185 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200186 "+rtc_base/thread_checker.h",
187 ],
188
Steve Anton10542f22019-01-11 09:11:00 -0800189 "uma_metrics\.h": [
190 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200191 ],
192
193 "audio_frame\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800194 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200195 ],
196
197 "audio_mixer\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800198 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200199 ],
200
201 "audio_decoder\.h": [
202 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800203 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200204 ],
205
206 "audio_decoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800207 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200208 ],
209
210 "audio_decoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800211 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200212 ],
213
214 "audio_encoder\.h": [
215 "+rtc_base/buffer.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200216 ],
217
218 "audio_encoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800219 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200220 ],
221
222 "audio_encoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800223 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200224 ],
225
Steve Anton10542f22019-01-11 09:11:00 -0800226 "frame_decryptor_interface\.h": [
227 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200228 ],
229
Steve Anton10542f22019-01-11 09:11:00 -0800230 "frame_encryptor_interface\.h": [
231 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200232 ],
233
Steve Anton10542f22019-01-11 09:11:00 -0800234 "rtc_stats_collector_callback\.h": [
235 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200236 ],
237
Steve Anton10542f22019-01-11 09:11:00 -0800238 "rtc_stats_report\.h": [
239 "+rtc_base/ref_count.h",
240 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200241 ],
242
243 "audioproc_float\.h": [
244 "+modules/audio_processing/include/audio_processing.h",
245 ],
246
Sam Zackrissonb0bd0702020-05-12 10:48:19 +0200247 "echo_detector_creator\.h": [
248 "+modules/audio_processing/include/audio_processing.h",
249 ],
250
Mirko Bonadeia418e672018-10-24 13:57:25 +0200251 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800252 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200253 ],
254
255 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800256 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200257 ],
258
Mirko Bonadeia418e672018-10-24 13:57:25 +0200259 "mock.*\.h": [
260 "+test/gmock.h",
261 ],
262
263 "simulated_network\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200264 "+rtc_base/random.h",
265 "+rtc_base/thread_annotations.h",
266 ],
267
268 "test_dependency_factory\.h": [
269 "+rtc_base/thread_checker.h",
270 ],
271
Sebastian Janssonfc8279d2020-01-16 11:45:59 +0100272 "time_controller\.h": [
273 "+rtc_base/thread.h",
274 ],
275
Mirko Bonadeia418e672018-10-24 13:57:25 +0200276 "videocodec_test_fixture\.h": [
277 "+modules/video_coding/include/video_codec_interface.h"
278 ],
279
Mirko Bonadeia418e672018-10-24 13:57:25 +0200280 "video_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800281 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200282 ],
283
Artem Titovb586d822021-02-04 15:06:50 +0100284 "sequence_checker\.h": [
285 "+rtc_base/synchronization/sequence_checker_internal.h",
286 "+rtc_base/thread_annotations.h",
287 ],
288
Mirko Bonadei90490372018-10-26 13:17:47 +0200289 # .cc files in api/ should not be restricted in what they can #include,
290 # so we re-add all the top-level directories here. (That's because .h
291 # files leak their #includes to whoever's #including them, but .cc files
292 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800293 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200294 "+audio",
295 "+call",
296 "+common_audio",
297 "+common_video",
298 "+examples",
299 "+logging",
300 "+media",
301 "+modules",
302 "+p2p",
303 "+pc",
304 "+rtc_base",
305 "+rtc_tools",
306 "+sdk",
307 "+stats",
308 "+system_wrappers",
309 "+test",
310 "+tools",
311 "+tools_webrtc",
312 "+video",
313 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800314 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100315}