blob: 21afca998720e6c442fa80e1fb517f6eaded767d [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",
Mirko Bonadei054f1852019-11-04 16:31:08 +010046 "+rtc_base/system/rtc_export_template.h",
Sebastian Jansson72bba622018-11-19 11:17:12 +010047 "+rtc_base/units/unit_base.h",
Sebastian Jansson11e55ee2019-03-06 16:58:18 +010048 "+rtc_base/deprecation.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
66 "candidate\.h": [
67 "+rtc_base/network_constants.h",
Steve Anton10542f22019-01-11 09:11:00 -080068 "+rtc_base/socket_address.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020069 ],
70
Steve Anton10542f22019-01-11 09:11:00 -080071 "data_channel_interface\.h": [
72 "+rtc_base/copy_on_write_buffer.h",
73 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020074 ],
75
Bjorn A Mellem05497f22019-08-01 10:48:20 -070076 "data_channel_transport_interface\.h": [
77 "+rtc_base/copy_on_write_buffer.h",
78 ],
79
Steve Anton10542f22019-01-11 09:11:00 -080080 "dtls_transport_interface\.h": [
81 "+rtc_base/ref_count.h",
Harald Alvestrand7061e512019-04-10 17:20:42 +020082 "+rtc_base/ssl_certificate.h",
Harald Alvestrandad88c882018-11-28 16:47:46 +010083 ],
84
Steve Anton10542f22019-01-11 09:11:00 -080085 "dtmf_sender_interface\.h": [
86 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020087 ],
88
89 "fec_controller\.h": [
90 "+modules/include/module_fec_types.h",
91 ],
92
Marina Cioceae3e07bf2020-02-27 16:28:51 +010093 "frame_transformer_interface\.h": [
94 "+rtc_base/ref_count.h",
95 ],
96
Harald Alvestrand98462622019-01-30 14:57:03 +010097 "ice_transport_interface\.h": [
98 "+rtc_base/ref_count.h",
99 ],
100
Mirko Bonadeia418e672018-10-24 13:57:25 +0200101 "jsep\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800102 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200103 ],
104
Steve Anton10542f22019-01-11 09:11:00 -0800105 "jsep_ice_candidate\.h": [
106 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200107 ],
108
Steve Anton10542f22019-01-11 09:11:00 -0800109 "jsep_session_description\.h": [
110 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200111 ],
112
Steve Anton10542f22019-01-11 09:11:00 -0800113 "media_stream_interface\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200114 "+modules/audio_processing/include/audio_processing_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800115 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200116 ],
117
Patrik Höglund662e31f2019-09-05 14:35:04 +0200118 "packet_socket_factory\.h": [
119 "+rtc_base/proxy_info.h",
120 "+rtc_base/async_packet_socket.h",
121 ],
122
Steve Anton10542f22019-01-11 09:11:00 -0800123 "peer_connection_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800124 "+media/base/media_config.h",
Steve Anton10542f22019-01-11 09:11:00 -0800125 "+media/base/media_engine.h",
126 "+p2p/base/port_allocator.h",
Taylor Brandstetter239ac8a2020-07-31 16:07:52 -0700127 "+rtc_base/network_monitor_factory.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.
Steve Anton10542f22019-01-11 09:11:00 -0800138 "+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
Henrik Boström831ae4e2020-07-29 12:04:00 +0200171 "set_local_description_observer_interface\.h": [
172 "+rtc_base/ref_count.h",
173 ],
Steve Anton10542f22019-01-11 09:11:00 -0800174 "set_remote_description_observer_interface\.h": [
175 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200176 ],
177
Steve Anton10542f22019-01-11 09:11:00 -0800178 "stats_types\.h": [
179 "+rtc_base/constructor_magic.h",
180 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800181 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200182 "+rtc_base/thread_checker.h",
183 ],
184
Steve Anton10542f22019-01-11 09:11:00 -0800185 "uma_metrics\.h": [
186 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200187 ],
188
189 "audio_frame\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800190 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200191 ],
192
193 "audio_mixer\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800194 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200195 ],
196
197 "audio_decoder\.h": [
198 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800199 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200200 ],
201
202 "audio_decoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800203 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200204 ],
205
206 "audio_decoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800207 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200208 ],
209
210 "audio_encoder\.h": [
211 "+rtc_base/buffer.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200212 ],
213
214 "audio_encoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800215 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200216 ],
217
218 "audio_encoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800219 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200220 ],
221
Steve Anton10542f22019-01-11 09:11:00 -0800222 "frame_decryptor_interface\.h": [
223 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200224 ],
225
Steve Anton10542f22019-01-11 09:11:00 -0800226 "frame_encryptor_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 "rtc_stats_collector_callback\.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_report\.h": [
235 "+rtc_base/ref_count.h",
236 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200237 ],
238
239 "audioproc_float\.h": [
240 "+modules/audio_processing/include/audio_processing.h",
241 ],
242
Sam Zackrissonb0bd0702020-05-12 10:48:19 +0200243 "echo_detector_creator\.h": [
244 "+modules/audio_processing/include/audio_processing.h",
245 ],
246
Mirko Bonadeia418e672018-10-24 13:57:25 +0200247 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800248 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200249 ],
250
251 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800252 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200253 ],
254
Mirko Bonadeia418e672018-10-24 13:57:25 +0200255 "mock.*\.h": [
256 "+test/gmock.h",
257 ],
258
259 "simulated_network\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200260 "+rtc_base/random.h",
261 "+rtc_base/thread_annotations.h",
262 ],
263
264 "test_dependency_factory\.h": [
265 "+rtc_base/thread_checker.h",
266 ],
267
Sebastian Janssonfc8279d2020-01-16 11:45:59 +0100268 "time_controller\.h": [
269 "+rtc_base/thread.h",
270 ],
271
Mirko Bonadeia418e672018-10-24 13:57:25 +0200272 "videocodec_test_fixture\.h": [
273 "+modules/video_coding/include/video_codec_interface.h"
274 ],
275
Mirko Bonadeia418e672018-10-24 13:57:25 +0200276 "video_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800277 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200278 ],
279
Mirko Bonadei90490372018-10-26 13:17:47 +0200280 # .cc files in api/ should not be restricted in what they can #include,
281 # so we re-add all the top-level directories here. (That's because .h
282 # files leak their #includes to whoever's #including them, but .cc files
283 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800284 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200285 "+audio",
286 "+call",
287 "+common_audio",
288 "+common_video",
289 "+examples",
290 "+logging",
291 "+media",
292 "+modules",
293 "+p2p",
294 "+pc",
295 "+rtc_base",
296 "+rtc_tools",
297 "+sdk",
298 "+stats",
299 "+system_wrappers",
300 "+test",
301 "+tools",
302 "+tools_webrtc",
303 "+video",
304 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800305 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100306}