blob: 6afa3d7ab0d92199ba89c75e10a192fc5358834d [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 Alvestrandad88c882018-11-28 16:47:46 +010078 ],
79
Steve Anton10542f22019-01-11 09:11:00 -080080 "dtmf_sender_interface\.h": [
81 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020082 ],
83
84 "fec_controller\.h": [
85 "+modules/include/module_fec_types.h",
86 ],
87
Harald Alvestrand98462622019-01-30 14:57:03 +010088 "ice_transport_interface\.h": [
89 "+rtc_base/ref_count.h",
90 ],
91
Mirko Bonadeia418e672018-10-24 13:57:25 +020092 "jsep\.h": [
Steve Anton10542f22019-01-11 09:11:00 -080093 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020094 ],
95
Steve Anton10542f22019-01-11 09:11:00 -080096 "jsep_ice_candidate\.h": [
97 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020098 ],
99
Steve Anton10542f22019-01-11 09:11:00 -0800100 "jsep_session_description\.h": [
101 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200102 ],
103
Steve Anton10542f22019-01-11 09:11:00 -0800104 "media_stream_interface\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200105 "+modules/audio_processing/include/audio_processing_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800106 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200107 ],
108
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700109 "media_transport_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800110 "+rtc_base/copy_on_write_buffer.h", # As used by datachannelinterface.h
111 "+rtc_base/network_route.h",
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700112 ],
113
Steve Anton10542f22019-01-11 09:11:00 -0800114 "peer_connection_factory_proxy\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200115 "+rtc_base/bind.h",
116 ],
117
Steve Anton10542f22019-01-11 09:11:00 -0800118 "peer_connection_interface\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800119 "+logging/rtc_event_log/rtc_event_log_factory_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -0800120 "+media/base/media_config.h",
Steve Anton10542f22019-01-11 09:11:00 -0800121 "+media/base/media_engine.h",
122 "+p2p/base/port_allocator.h",
123 "+rtc_base/bitrate_allocation_strategy.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800124 "+rtc_base/network.h",
125 "+rtc_base/platform_file.h",
Steve Anton10542f22019-01-11 09:11:00 -0800126 "+rtc_base/rtc_certificate.h",
127 "+rtc_base/rtc_certificate_generator.h",
128 "+rtc_base/socket_address.h",
129 "+rtc_base/ssl_certificate.h",
130 "+rtc_base/ssl_stream_adapter.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800131 ],
132
Yves Gerey3e707812018-11-28 16:47:49 +0100133 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800134 "+rtc_base/event.h",
Steve Anton10542f22019-01-11 09:11:00 -0800135 "+rtc_base/message_handler.h", # Inherits from it.
136 "+rtc_base/message_queue.h", # Inherits from MessageData.
137 "+rtc_base/ref_counted_object.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800138 "+rtc_base/thread.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100139 ],
140
Steve Anton10542f22019-01-11 09:11:00 -0800141 "ref_counted_base\.h": [
142 "+rtc_base/constructor_magic.h",
143 "+rtc_base/ref_count.h",
144 "+rtc_base/ref_counter.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200145 ],
146
Steve Anton10542f22019-01-11 09:11:00 -0800147 "rtc_error\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200148 "+rtc_base/logging.h",
149 ],
150
Steve Anton10542f22019-01-11 09:11:00 -0800151 "rtp_receiver_interface\.h": [
152 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200153 ],
154
Steve Anton10542f22019-01-11 09:11:00 -0800155 "rtp_sender_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_transceiver_interface\.h": [
160 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200161 ],
162
Harald Alvestrandc85328f2019-02-28 07:51:00 +0100163 "sctp_transport_interface\.h": [
164 "+rtc_base/ref_count.h",
165 ],
166
Steve Anton10542f22019-01-11 09:11:00 -0800167 "set_remote_description_observer_interface\.h": [
168 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200169 ],
170
Steve Anton10542f22019-01-11 09:11:00 -0800171 "stats_types\.h": [
172 "+rtc_base/constructor_magic.h",
173 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800174 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200175 "+rtc_base/thread_checker.h",
176 ],
177
Steve Anton10542f22019-01-11 09:11:00 -0800178 "uma_metrics\.h": [
179 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200180 ],
181
182 "audio_frame\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800183 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200184 ],
185
186 "audio_mixer\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800187 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200188 ],
189
190 "audio_decoder\.h": [
191 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800192 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200193 ],
194
195 "audio_decoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800196 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200197 ],
198
199 "audio_decoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800200 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200201 ],
202
203 "audio_encoder\.h": [
204 "+rtc_base/buffer.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200205 ],
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_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800263 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200264 ],
265
Mirko Bonadei90490372018-10-26 13:17:47 +0200266 # .cc files in api/ should not be restricted in what they can #include,
267 # so we re-add all the top-level directories here. (That's because .h
268 # files leak their #includes to whoever's #including them, but .cc files
269 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800270 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200271 "+audio",
272 "+call",
273 "+common_audio",
274 "+common_video",
275 "+examples",
276 "+logging",
277 "+media",
278 "+modules",
279 "+p2p",
280 "+pc",
281 "+rtc_base",
282 "+rtc_tools",
283 "+sdk",
284 "+stats",
285 "+system_wrappers",
286 "+test",
287 "+tools",
288 "+tools_webrtc",
289 "+video",
290 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800291 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100292}