blob: 244e7509d463c897c1c8e0aeaf3eb6928fa6c82f [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
Steve Anton10542f22019-01-11 09:11:00 -080075 "dtls_transport_interface\.h": [
76 "+rtc_base/ref_count.h",
Harald Alvestrandad88c882018-11-28 16:47:46 +010077 ],
78
Steve Anton10542f22019-01-11 09:11:00 -080079 "dtmf_sender_interface\.h": [
80 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020081 ],
82
83 "fec_controller\.h": [
84 "+modules/include/module_fec_types.h",
85 ],
86
Harald Alvestrand98462622019-01-30 14:57:03 +010087 "ice_transport_interface\.h": [
88 "+rtc_base/ref_count.h",
89 ],
90
Mirko Bonadeia418e672018-10-24 13:57:25 +020091 "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 ],
107
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700108 "media_transport_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800109 "+rtc_base/copy_on_write_buffer.h", # As used by datachannelinterface.h
110 "+rtc_base/network_route.h",
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700111 ],
112
Steve Anton10542f22019-01-11 09:11:00 -0800113 "peer_connection_factory_proxy\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200114 "+rtc_base/bind.h",
115 ],
116
Steve Anton10542f22019-01-11 09:11:00 -0800117 "peer_connection_interface\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800118 "+logging/rtc_event_log/rtc_event_log_factory_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -0800119 "+media/base/media_config.h",
Steve Anton10542f22019-01-11 09:11:00 -0800120 "+media/base/media_engine.h",
121 "+p2p/base/port_allocator.h",
122 "+rtc_base/bitrate_allocation_strategy.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800123 "+rtc_base/network.h",
124 "+rtc_base/platform_file.h",
Steve Anton10542f22019-01-11 09:11:00 -0800125 "+rtc_base/rtc_certificate.h",
126 "+rtc_base/rtc_certificate_generator.h",
127 "+rtc_base/socket_address.h",
128 "+rtc_base/ssl_certificate.h",
129 "+rtc_base/ssl_stream_adapter.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800130 ],
131
Yves Gerey3e707812018-11-28 16:47:49 +0100132 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800133 "+rtc_base/event.h",
Steve Anton10542f22019-01-11 09:11:00 -0800134 "+rtc_base/message_handler.h", # Inherits from it.
135 "+rtc_base/message_queue.h", # Inherits from MessageData.
136 "+rtc_base/ref_counted_object.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800137 "+rtc_base/thread.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100138 ],
139
Steve Anton10542f22019-01-11 09:11:00 -0800140 "ref_counted_base\.h": [
141 "+rtc_base/constructor_magic.h",
142 "+rtc_base/ref_count.h",
143 "+rtc_base/ref_counter.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200144 ],
145
Steve Anton10542f22019-01-11 09:11:00 -0800146 "rtc_error\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200147 "+rtc_base/logging.h",
148 ],
149
Steve Anton10542f22019-01-11 09:11:00 -0800150 "rtp_receiver_interface\.h": [
151 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200152 ],
153
Steve Anton10542f22019-01-11 09:11:00 -0800154 "rtp_sender_interface\.h": [
155 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200156 ],
157
Steve Anton10542f22019-01-11 09:11:00 -0800158 "rtp_transceiver_interface\.h": [
159 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200160 ],
161
Harald Alvestrandc85328f2019-02-28 07:51:00 +0100162 "sctp_transport_interface\.h": [
163 "+rtc_base/ref_count.h",
164 ],
165
Steve Anton10542f22019-01-11 09:11:00 -0800166 "set_remote_description_observer_interface\.h": [
167 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200168 ],
169
Steve Anton10542f22019-01-11 09:11:00 -0800170 "stats_types\.h": [
171 "+rtc_base/constructor_magic.h",
172 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800173 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200174 "+rtc_base/thread_checker.h",
175 ],
176
Steve Anton10542f22019-01-11 09:11:00 -0800177 "uma_metrics\.h": [
178 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200179 ],
180
181 "audio_frame\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800182 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200183 ],
184
185 "audio_mixer\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800186 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200187 ],
188
189 "audio_decoder\.h": [
190 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800191 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200192 ],
193
194 "audio_decoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800195 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200196 ],
197
198 "audio_decoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800199 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200200 ],
201
202 "audio_encoder\.h": [
203 "+rtc_base/buffer.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200204 ],
205
206 "audio_encoder_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_encoder_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
Steve Anton10542f22019-01-11 09:11:00 -0800214 "frame_decryptor_interface\.h": [
215 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200216 ],
217
Steve Anton10542f22019-01-11 09:11:00 -0800218 "frame_encryptor_interface\.h": [
219 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200220 ],
221
Steve Anton10542f22019-01-11 09:11:00 -0800222 "rtc_stats_collector_callback\.h": [
223 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200224 ],
225
Steve Anton10542f22019-01-11 09:11:00 -0800226 "rtc_stats_report\.h": [
227 "+rtc_base/ref_count.h",
228 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200229 ],
230
231 "audioproc_float\.h": [
232 "+modules/audio_processing/include/audio_processing.h",
233 ],
234
235 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800236 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200237 ],
238
239 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800240 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200241 ],
242
Mirko Bonadeia418e672018-10-24 13:57:25 +0200243 "mock.*\.h": [
244 "+test/gmock.h",
245 ],
246
247 "simulated_network\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800248 "+rtc_base/critical_section.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200249 "+rtc_base/random.h",
250 "+rtc_base/thread_annotations.h",
251 ],
252
253 "test_dependency_factory\.h": [
254 "+rtc_base/thread_checker.h",
255 ],
256
257 "videocodec_test_fixture\.h": [
258 "+modules/video_coding/include/video_codec_interface.h"
259 ],
260
Mirko Bonadeia418e672018-10-24 13:57:25 +0200261 "video_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800262 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200263 ],
264
Mirko Bonadei90490372018-10-26 13:17:47 +0200265 # .cc files in api/ should not be restricted in what they can #include,
266 # so we re-add all the top-level directories here. (That's because .h
267 # files leak their #includes to whoever's #including them, but .cc files
268 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800269 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200270 "+audio",
271 "+call",
272 "+common_audio",
273 "+common_video",
274 "+examples",
275 "+logging",
276 "+media",
277 "+modules",
278 "+p2p",
279 "+pc",
280 "+rtc_base",
281 "+rtc_tools",
282 "+sdk",
283 "+stats",
284 "+system_wrappers",
285 "+test",
286 "+tools",
287 "+tools_webrtc",
288 "+video",
289 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800290 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100291}