blob: a86b42f25b0bf7b9f1cd932a321e0bc3ec1a85b3 [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
Harald Alvestrand98462622019-01-30 14:57:03 +010093 "ice_transport_interface\.h": [
94 "+rtc_base/ref_count.h",
95 ],
96
Mirko Bonadeia418e672018-10-24 13:57:25 +020097 "jsep\.h": [
Steve Anton10542f22019-01-11 09:11:00 -080098 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +020099 ],
100
Steve Anton10542f22019-01-11 09:11:00 -0800101 "jsep_ice_candidate\.h": [
102 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200103 ],
104
Steve Anton10542f22019-01-11 09:11:00 -0800105 "jsep_session_description\.h": [
106 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200107 ],
108
Steve Anton10542f22019-01-11 09:11:00 -0800109 "media_stream_interface\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200110 "+modules/audio_processing/include/audio_processing_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800111 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200112 ],
113
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700114 "media_transport_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800115 "+rtc_base/copy_on_write_buffer.h", # As used by datachannelinterface.h
116 "+rtc_base/network_route.h",
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700117 ],
118
Patrik Höglund662e31f2019-09-05 14:35:04 +0200119 "packet_socket_factory\.h": [
120 "+rtc_base/proxy_info.h",
121 "+rtc_base/async_packet_socket.h",
122 ],
123
Steve Anton10542f22019-01-11 09:11:00 -0800124 "peer_connection_factory_proxy\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200125 "+rtc_base/bind.h",
126 ],
127
Steve Anton10542f22019-01-11 09:11:00 -0800128 "peer_connection_interface\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800129 "+media/base/media_config.h",
Steve Anton10542f22019-01-11 09:11:00 -0800130 "+media/base/media_engine.h",
131 "+p2p/base/port_allocator.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800132 "+rtc_base/network.h",
Steve Anton10542f22019-01-11 09:11:00 -0800133 "+rtc_base/rtc_certificate.h",
134 "+rtc_base/rtc_certificate_generator.h",
135 "+rtc_base/socket_address.h",
136 "+rtc_base/ssl_certificate.h",
137 "+rtc_base/ssl_stream_adapter.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800138 ],
139
Yves Gerey3e707812018-11-28 16:47:49 +0100140 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800141 "+rtc_base/event.h",
Steve Anton10542f22019-01-11 09:11:00 -0800142 "+rtc_base/message_handler.h", # Inherits from it.
143 "+rtc_base/message_queue.h", # Inherits from MessageData.
144 "+rtc_base/ref_counted_object.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800145 "+rtc_base/thread.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100146 ],
147
Steve Anton10542f22019-01-11 09:11:00 -0800148 "ref_counted_base\.h": [
149 "+rtc_base/constructor_magic.h",
150 "+rtc_base/ref_count.h",
151 "+rtc_base/ref_counter.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200152 ],
153
Steve Anton10542f22019-01-11 09:11:00 -0800154 "rtc_error\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200155 "+rtc_base/logging.h",
156 ],
Niels Möllerd8b9ed72019-05-08 13:53:51 +0200157 "rtc_event_log_output_file.h": [
Niels Möllerd8b9ed72019-05-08 13:53:51 +0200158 # For private member and constructor.
159 "+rtc_base/system/file_wrapper.h",
160 ],
Steve Anton10542f22019-01-11 09:11:00 -0800161 "rtp_receiver_interface\.h": [
162 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200163 ],
164
Steve Anton10542f22019-01-11 09:11:00 -0800165 "rtp_sender_interface\.h": [
166 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200167 ],
168
Steve Anton10542f22019-01-11 09:11:00 -0800169 "rtp_transceiver_interface\.h": [
170 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200171 ],
172
Harald Alvestrandc85328f2019-02-28 07:51:00 +0100173 "sctp_transport_interface\.h": [
174 "+rtc_base/ref_count.h",
175 ],
176
Steve Anton10542f22019-01-11 09:11:00 -0800177 "set_remote_description_observer_interface\.h": [
178 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200179 ],
180
Steve Anton10542f22019-01-11 09:11:00 -0800181 "stats_types\.h": [
182 "+rtc_base/constructor_magic.h",
183 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800184 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200185 "+rtc_base/thread_checker.h",
186 ],
187
Steve Anton10542f22019-01-11 09:11:00 -0800188 "uma_metrics\.h": [
189 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200190 ],
191
192 "audio_frame\.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_mixer\.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\.h": [
201 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800202 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200203 ],
204
205 "audio_decoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800206 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200207 ],
208
209 "audio_decoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800210 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200211 ],
212
213 "audio_encoder\.h": [
214 "+rtc_base/buffer.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200215 ],
216
217 "audio_encoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800218 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200219 ],
220
221 "audio_encoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800222 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200223 ],
224
Steve Anton10542f22019-01-11 09:11:00 -0800225 "frame_decryptor_interface\.h": [
226 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200227 ],
228
Steve Anton10542f22019-01-11 09:11:00 -0800229 "frame_encryptor_interface\.h": [
230 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200231 ],
232
Steve Anton10542f22019-01-11 09:11:00 -0800233 "rtc_stats_collector_callback\.h": [
234 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200235 ],
236
Steve Anton10542f22019-01-11 09:11:00 -0800237 "rtc_stats_report\.h": [
238 "+rtc_base/ref_count.h",
239 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200240 ],
241
242 "audioproc_float\.h": [
243 "+modules/audio_processing/include/audio_processing.h",
244 ],
245
246 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800247 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200248 ],
249
250 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800251 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200252 ],
253
Mirko Bonadeia418e672018-10-24 13:57:25 +0200254 "mock.*\.h": [
255 "+test/gmock.h",
256 ],
257
258 "simulated_network\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800259 "+rtc_base/critical_section.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
268 "videocodec_test_fixture\.h": [
269 "+modules/video_coding/include/video_codec_interface.h"
270 ],
271
Mirko Bonadeia418e672018-10-24 13:57:25 +0200272 "video_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800273 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200274 ],
275
Mirko Bonadei90490372018-10-26 13:17:47 +0200276 # .cc files in api/ should not be restricted in what they can #include,
277 # so we re-add all the top-level directories here. (That's because .h
278 # files leak their #includes to whoever's #including them, but .cc files
279 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800280 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200281 "+audio",
282 "+call",
283 "+common_audio",
284 "+common_video",
285 "+examples",
286 "+logging",
287 "+media",
288 "+modules",
289 "+p2p",
290 "+pc",
291 "+rtc_base",
292 "+rtc_tools",
293 "+sdk",
294 "+stats",
295 "+system_wrappers",
296 "+test",
297 "+tools",
298 "+tools_webrtc",
299 "+video",
300 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800301 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100302}