blob: 34bdfe03cee3b6c3256f0b6dfcb52a118ada3bd4 [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",
Benjamin Wright7f1c5892019-03-06 11:17:18 -080012 "-crypto",
Mirko Bonadeia418e672018-10-24 13:57:25 +020013 "-data",
14 "-examples",
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",
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
Steve Anton10542f22019-01-11 09:11:00 -080076 "dtls_transport_interface\.h": [
77 "+rtc_base/ref_count.h",
Harald Alvestrand7061e512019-04-10 17:20:42 +020078 "+rtc_base/ssl_certificate.h",
Harald Alvestrandad88c882018-11-28 16:47:46 +010079 ],
80
Steve Anton10542f22019-01-11 09:11:00 -080081 "dtmf_sender_interface\.h": [
82 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020083 ],
84
85 "fec_controller\.h": [
86 "+modules/include/module_fec_types.h",
87 ],
88
Harald Alvestrand98462622019-01-30 14:57:03 +010089 "ice_transport_interface\.h": [
90 "+rtc_base/ref_count.h",
91 ],
92
Mirko Bonadeia418e672018-10-24 13:57:25 +020093 "jsep\.h": [
Steve Anton10542f22019-01-11 09:11:00 -080094 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020095 ],
96
Steve Anton10542f22019-01-11 09:11:00 -080097 "jsep_ice_candidate\.h": [
98 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020099 ],
100
Steve Anton10542f22019-01-11 09:11:00 -0800101 "jsep_session_description\.h": [
102 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200103 ],
104
Steve Anton10542f22019-01-11 09:11:00 -0800105 "media_stream_interface\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200106 "+modules/audio_processing/include/audio_processing_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800107 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200108 ],
109
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700110 "media_transport_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800111 "+rtc_base/copy_on_write_buffer.h", # As used by datachannelinterface.h
112 "+rtc_base/network_route.h",
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700113 ],
114
Steve Anton10542f22019-01-11 09:11:00 -0800115 "peer_connection_factory_proxy\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200116 "+rtc_base/bind.h",
117 ],
118
Steve Anton10542f22019-01-11 09:11:00 -0800119 "peer_connection_interface\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800120 "+logging/rtc_event_log/rtc_event_log_factory_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -0800121 "+media/base/media_config.h",
Steve Anton10542f22019-01-11 09:11:00 -0800122 "+media/base/media_engine.h",
123 "+p2p/base/port_allocator.h",
124 "+rtc_base/bitrate_allocation_strategy.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800125 "+rtc_base/network.h",
126 "+rtc_base/platform_file.h",
Steve Anton10542f22019-01-11 09:11:00 -0800127 "+rtc_base/rtc_certificate.h",
128 "+rtc_base/rtc_certificate_generator.h",
129 "+rtc_base/socket_address.h",
130 "+rtc_base/ssl_certificate.h",
131 "+rtc_base/ssl_stream_adapter.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800132 ],
133
Yves Gerey3e707812018-11-28 16:47:49 +0100134 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800135 "+rtc_base/event.h",
Steve Anton10542f22019-01-11 09:11:00 -0800136 "+rtc_base/message_handler.h", # Inherits from it.
137 "+rtc_base/message_queue.h", # Inherits from MessageData.
138 "+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 ],
151
Steve Anton10542f22019-01-11 09:11:00 -0800152 "rtp_receiver_interface\.h": [
153 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200154 ],
155
Steve Anton10542f22019-01-11 09:11:00 -0800156 "rtp_sender_interface\.h": [
157 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200158 ],
159
Steve Anton10542f22019-01-11 09:11:00 -0800160 "rtp_transceiver_interface\.h": [
161 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200162 ],
163
Harald Alvestrandc85328f2019-02-28 07:51:00 +0100164 "sctp_transport_interface\.h": [
165 "+rtc_base/ref_count.h",
166 ],
167
Steve Anton10542f22019-01-11 09:11:00 -0800168 "set_remote_description_observer_interface\.h": [
169 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200170 ],
171
Steve Anton10542f22019-01-11 09:11:00 -0800172 "stats_types\.h": [
173 "+rtc_base/constructor_magic.h",
174 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800175 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200176 "+rtc_base/thread_checker.h",
177 ],
178
Steve Anton10542f22019-01-11 09:11:00 -0800179 "uma_metrics\.h": [
180 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200181 ],
182
183 "audio_frame\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800184 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200185 ],
186
187 "audio_mixer\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800188 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200189 ],
190
191 "audio_decoder\.h": [
192 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800193 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200194 ],
195
196 "audio_decoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800197 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200198 ],
199
200 "audio_decoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800201 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200202 ],
203
204 "audio_encoder\.h": [
205 "+rtc_base/buffer.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200206 ],
207
208 "audio_encoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800209 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200210 ],
211
212 "audio_encoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800213 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200214 ],
215
Steve Anton10542f22019-01-11 09:11:00 -0800216 "frame_decryptor_interface\.h": [
217 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200218 ],
219
Steve Anton10542f22019-01-11 09:11:00 -0800220 "frame_encryptor_interface\.h": [
221 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200222 ],
223
Steve Anton10542f22019-01-11 09:11:00 -0800224 "rtc_stats_collector_callback\.h": [
225 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200226 ],
227
Steve Anton10542f22019-01-11 09:11:00 -0800228 "rtc_stats_report\.h": [
229 "+rtc_base/ref_count.h",
230 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200231 ],
232
233 "audioproc_float\.h": [
234 "+modules/audio_processing/include/audio_processing.h",
235 ],
236
237 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800238 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200239 ],
240
241 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800242 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200243 ],
244
Mirko Bonadeia418e672018-10-24 13:57:25 +0200245 "mock.*\.h": [
246 "+test/gmock.h",
247 ],
248
249 "simulated_network\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800250 "+rtc_base/critical_section.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200251 "+rtc_base/random.h",
252 "+rtc_base/thread_annotations.h",
253 ],
254
255 "test_dependency_factory\.h": [
256 "+rtc_base/thread_checker.h",
257 ],
258
259 "videocodec_test_fixture\.h": [
260 "+modules/video_coding/include/video_codec_interface.h"
261 ],
262
Mirko Bonadeia418e672018-10-24 13:57:25 +0200263 "video_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800264 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200265 ],
266
Mirko Bonadei90490372018-10-26 13:17:47 +0200267 # .cc files in api/ should not be restricted in what they can #include,
268 # so we re-add all the top-level directories here. (That's because .h
269 # files leak their #includes to whoever's #including them, but .cc files
270 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800271 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200272 "+audio",
273 "+call",
274 "+common_audio",
275 "+common_video",
276 "+examples",
277 "+logging",
278 "+media",
279 "+modules",
280 "+p2p",
281 "+pc",
282 "+rtc_base",
283 "+rtc_tools",
284 "+sdk",
285 "+stats",
286 "+system_wrappers",
287 "+test",
288 "+tools",
289 "+tools_webrtc",
290 "+video",
291 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800292 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100293}