blob: 96fd36b9baedf7131601f88bbc8e04630dab4fae [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",
Mirko Bonadeia418e672018-10-24 13:57:25 +020047 ],
48
49 "array_view\.h": [
50 "+rtc_base/type_traits.h",
51 ],
52
kwiberg96da0112017-06-30 04:23:22 -070053 # Needed because AudioEncoderOpus is in the wrong place for
54 # backwards compatibilty reasons. See
55 # https://bugs.chromium.org/p/webrtc/issues/detail?id=7847
56 "audio_encoder_opus\.h": [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020057 "+modules/audio_coding/codecs/opus/audio_encoder_opus.h",
kwiberg96da0112017-06-30 04:23:22 -070058 ],
59
Steve Anton10542f22019-01-11 09:11:00 -080060 "async_resolver_factory\.h": [
61 "+rtc_base/async_resolver_interface.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020062 ],
63
64 "candidate\.h": [
65 "+rtc_base/network_constants.h",
Steve Anton10542f22019-01-11 09:11:00 -080066 "+rtc_base/socket_address.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020067 ],
68
Mirko Bonadei2ff3f492018-11-22 09:00:13 +010069 "create_peerconnection_factory\.h": [
Anders Carlsson01092952018-12-11 15:44:54 +010070 "+rtc_base/deprecation.h",
Mirko Bonadei2ff3f492018-11-22 09:00:13 +010071 ],
72
Steve Anton10542f22019-01-11 09:11:00 -080073 "data_channel_interface\.h": [
74 "+rtc_base/copy_on_write_buffer.h",
75 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020076 ],
77
Steve Anton10542f22019-01-11 09:11:00 -080078 "dtls_transport_interface\.h": [
79 "+rtc_base/ref_count.h",
Harald Alvestrandad88c882018-11-28 16:47:46 +010080 ],
81
Steve Anton10542f22019-01-11 09:11:00 -080082 "dtmf_sender_interface\.h": [
83 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020084 ],
85
86 "fec_controller\.h": [
87 "+modules/include/module_fec_types.h",
88 ],
89
Harald Alvestrand98462622019-01-30 14:57:03 +010090 "ice_transport_interface\.h": [
91 "+rtc_base/ref_count.h",
92 ],
93
Mirko Bonadeia418e672018-10-24 13:57:25 +020094 "jsep\.h": [
Steve Anton10542f22019-01-11 09:11:00 -080095 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020096 ],
97
Steve Anton10542f22019-01-11 09:11:00 -080098 "jsep_ice_candidate\.h": [
99 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200100 ],
101
Steve Anton10542f22019-01-11 09:11:00 -0800102 "jsep_session_description\.h": [
103 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200104 ],
105
Steve Anton10542f22019-01-11 09:11:00 -0800106 "media_stream_interface\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200107 "+modules/audio_processing/include/audio_processing_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800108 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200109 ],
110
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700111 "media_transport_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800112 "+rtc_base/copy_on_write_buffer.h", # As used by datachannelinterface.h
113 "+rtc_base/network_route.h",
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700114 ],
115
Steve Anton10542f22019-01-11 09:11:00 -0800116 "peer_connection_factory_proxy\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200117 "+rtc_base/bind.h",
118 ],
119
Steve Anton10542f22019-01-11 09:11:00 -0800120 "peer_connection_interface\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800121 "+logging/rtc_event_log/rtc_event_log_factory_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -0800122 "+media/base/media_config.h",
123 "+media/base/video_capturer.h",
124 "+media/base/media_engine.h",
125 "+p2p/base/port_allocator.h",
126 "+rtc_base/bitrate_allocation_strategy.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800127 "+rtc_base/network.h",
128 "+rtc_base/platform_file.h",
Steve Anton10542f22019-01-11 09:11:00 -0800129 "+rtc_base/rtc_certificate.h",
130 "+rtc_base/rtc_certificate_generator.h",
131 "+rtc_base/socket_address.h",
132 "+rtc_base/ssl_certificate.h",
133 "+rtc_base/ssl_stream_adapter.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800134 ],
135
Yves Gerey3e707812018-11-28 16:47:49 +0100136 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800137 "+rtc_base/event.h",
Steve Anton10542f22019-01-11 09:11:00 -0800138 "+rtc_base/message_handler.h", # Inherits from it.
139 "+rtc_base/message_queue.h", # Inherits from MessageData.
140 "+rtc_base/ref_counted_object.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800141 "+rtc_base/thread.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100142 ],
143
Steve Anton10542f22019-01-11 09:11:00 -0800144 "ref_counted_base\.h": [
145 "+rtc_base/constructor_magic.h",
146 "+rtc_base/ref_count.h",
147 "+rtc_base/ref_counter.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200148 ],
149
Steve Anton10542f22019-01-11 09:11:00 -0800150 "rtc_error\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200151 "+rtc_base/logging.h",
152 ],
153
Steve Anton10542f22019-01-11 09:11:00 -0800154 "rtp_receiver_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_sender_interface\.h": [
159 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200160 ],
161
Steve Anton10542f22019-01-11 09:11:00 -0800162 "rtp_transceiver_interface\.h": [
163 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200164 ],
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",
204 "+rtc_base/deprecation.h",
205 ],
206
207 "audio_encoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800208 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200209 ],
210
211 "audio_encoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800212 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200213 ],
214
Steve Anton10542f22019-01-11 09:11:00 -0800215 "frame_decryptor_interface\.h": [
216 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200217 ],
218
Steve Anton10542f22019-01-11 09:11:00 -0800219 "frame_encryptor_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 "rtc_stats_collector_callback\.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_report\.h": [
228 "+rtc_base/ref_count.h",
229 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200230 ],
231
232 "audioproc_float\.h": [
233 "+modules/audio_processing/include/audio_processing.h",
234 ],
235
236 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800237 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200238 ],
239
240 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800241 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200242 ],
243
Mirko Bonadeia418e672018-10-24 13:57:25 +0200244 "mock.*\.h": [
245 "+test/gmock.h",
246 ],
247
248 "simulated_network\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800249 "+rtc_base/critical_section.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200250 "+rtc_base/random.h",
251 "+rtc_base/thread_annotations.h",
252 ],
253
254 "test_dependency_factory\.h": [
255 "+rtc_base/thread_checker.h",
256 ],
257
258 "videocodec_test_fixture\.h": [
259 "+modules/video_coding/include/video_codec_interface.h"
260 ],
261
Mirko Bonadeia418e672018-10-24 13:57:25 +0200262 "video_timing\.h": [
263 "+rtc_base/numerics/safe_conversions.h",
264 ],
265
266 "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}