blob: 9c174a1eb6fecee3e0e993e19825c162072a4856 [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 ],
Niels Möllerd8b9ed72019-05-08 13:53:51 +0200151 "rtc_event_log_output_file.h": [
152 # TODO(bugs.webrtc.org/6463): Delete this dependency.
153 "+rtc_base/platform_file.h",
154 # For private member and constructor.
155 "+rtc_base/system/file_wrapper.h",
156 ],
Steve Anton10542f22019-01-11 09:11:00 -0800157 "rtp_receiver_interface\.h": [
158 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200159 ],
160
Steve Anton10542f22019-01-11 09:11:00 -0800161 "rtp_sender_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_transceiver_interface\.h": [
166 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200167 ],
168
Harald Alvestrandc85328f2019-02-28 07:51:00 +0100169 "sctp_transport_interface\.h": [
170 "+rtc_base/ref_count.h",
171 ],
172
Steve Anton10542f22019-01-11 09:11:00 -0800173 "set_remote_description_observer_interface\.h": [
174 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200175 ],
176
Steve Anton10542f22019-01-11 09:11:00 -0800177 "stats_types\.h": [
178 "+rtc_base/constructor_magic.h",
179 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800180 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200181 "+rtc_base/thread_checker.h",
182 ],
183
Steve Anton10542f22019-01-11 09:11:00 -0800184 "uma_metrics\.h": [
185 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200186 ],
187
188 "audio_frame\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800189 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200190 ],
191
192 "audio_mixer\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800193 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200194 ],
195
196 "audio_decoder\.h": [
197 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800198 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200199 ],
200
201 "audio_decoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800202 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200203 ],
204
205 "audio_decoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800206 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200207 ],
208
209 "audio_encoder\.h": [
210 "+rtc_base/buffer.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200211 ],
212
213 "audio_encoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800214 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200215 ],
216
217 "audio_encoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800218 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200219 ],
220
Steve Anton10542f22019-01-11 09:11:00 -0800221 "frame_decryptor_interface\.h": [
222 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200223 ],
224
Steve Anton10542f22019-01-11 09:11:00 -0800225 "frame_encryptor_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 "rtc_stats_collector_callback\.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_report\.h": [
234 "+rtc_base/ref_count.h",
235 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200236 ],
237
238 "audioproc_float\.h": [
239 "+modules/audio_processing/include/audio_processing.h",
240 ],
241
242 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800243 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200244 ],
245
246 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800247 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200248 ],
249
Mirko Bonadeia418e672018-10-24 13:57:25 +0200250 "mock.*\.h": [
251 "+test/gmock.h",
252 ],
253
254 "simulated_network\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800255 "+rtc_base/critical_section.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200256 "+rtc_base/random.h",
257 "+rtc_base/thread_annotations.h",
258 ],
259
260 "test_dependency_factory\.h": [
261 "+rtc_base/thread_checker.h",
262 ],
263
264 "videocodec_test_fixture\.h": [
265 "+modules/video_coding/include/video_codec_interface.h"
266 ],
267
Mirko Bonadeia418e672018-10-24 13:57:25 +0200268 "video_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800269 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200270 ],
271
Mirko Bonadei90490372018-10-26 13:17:47 +0200272 # .cc files in api/ should not be restricted in what they can #include,
273 # so we re-add all the top-level directories here. (That's because .h
274 # files leak their #includes to whoever's #including them, but .cc files
275 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800276 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200277 "+audio",
278 "+call",
279 "+common_audio",
280 "+common_video",
281 "+examples",
282 "+logging",
283 "+media",
284 "+modules",
285 "+p2p",
286 "+pc",
287 "+rtc_base",
288 "+rtc_tools",
289 "+sdk",
290 "+stats",
291 "+system_wrappers",
292 "+test",
293 "+tools",
294 "+tools_webrtc",
295 "+video",
296 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800297 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100298}