blob: f5a0201b1836b25ae2f68bd618905bbb0da060b2 [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",
Steve Anton10542f22019-01-11 09:11:00 -0800123 "+media/base/media_engine.h",
124 "+p2p/base/port_allocator.h",
125 "+rtc_base/bitrate_allocation_strategy.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800126 "+rtc_base/network.h",
127 "+rtc_base/platform_file.h",
Steve Anton10542f22019-01-11 09:11:00 -0800128 "+rtc_base/rtc_certificate.h",
129 "+rtc_base/rtc_certificate_generator.h",
130 "+rtc_base/socket_address.h",
131 "+rtc_base/ssl_certificate.h",
132 "+rtc_base/ssl_stream_adapter.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800133 ],
134
Yves Gerey3e707812018-11-28 16:47:49 +0100135 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800136 "+rtc_base/event.h",
Steve Anton10542f22019-01-11 09:11:00 -0800137 "+rtc_base/message_handler.h", # Inherits from it.
138 "+rtc_base/message_queue.h", # Inherits from MessageData.
139 "+rtc_base/ref_counted_object.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800140 "+rtc_base/thread.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100141 ],
142
Steve Anton10542f22019-01-11 09:11:00 -0800143 "ref_counted_base\.h": [
144 "+rtc_base/constructor_magic.h",
145 "+rtc_base/ref_count.h",
146 "+rtc_base/ref_counter.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200147 ],
148
Steve Anton10542f22019-01-11 09:11:00 -0800149 "rtc_error\.h": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200150 "+rtc_base/logging.h",
151 ],
152
Elad Alon157540a2019-02-08 23:37:52 +0100153 "rtp_parameters\.h": [
154 "+rtc_base/deprecation.h",
155 ],
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
Steve Anton10542f22019-01-11 09:11:00 -0800169 "set_remote_description_observer_interface\.h": [
170 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200171 ],
172
Steve Anton10542f22019-01-11 09:11:00 -0800173 "stats_types\.h": [
174 "+rtc_base/constructor_magic.h",
175 "+rtc_base/ref_count.h",
Steve Anton10542f22019-01-11 09:11:00 -0800176 "+rtc_base/string_encode.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200177 "+rtc_base/thread_checker.h",
178 ],
179
Steve Anton10542f22019-01-11 09:11:00 -0800180 "uma_metrics\.h": [
181 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200182 ],
183
184 "audio_frame\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800185 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200186 ],
187
188 "audio_mixer\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800189 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200190 ],
191
192 "audio_decoder\.h": [
193 "+rtc_base/buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800194 "+rtc_base/constructor_magic.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200195 ],
196
197 "audio_decoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800198 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200199 ],
200
201 "audio_decoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800202 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200203 ],
204
205 "audio_encoder\.h": [
206 "+rtc_base/buffer.h",
207 "+rtc_base/deprecation.h",
208 ],
209
210 "audio_encoder_factory\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800211 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200212 ],
213
214 "audio_encoder_factory_template\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800215 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200216 ],
217
Steve Anton10542f22019-01-11 09:11:00 -0800218 "frame_decryptor_interface\.h": [
219 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200220 ],
221
Steve Anton10542f22019-01-11 09:11:00 -0800222 "frame_encryptor_interface\.h": [
223 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200224 ],
225
Steve Anton10542f22019-01-11 09:11:00 -0800226 "rtc_stats_collector_callback\.h": [
227 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200228 ],
229
Steve Anton10542f22019-01-11 09:11:00 -0800230 "rtc_stats_report\.h": [
231 "+rtc_base/ref_count.h",
232 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200233 ],
234
235 "audioproc_float\.h": [
236 "+modules/audio_processing/include/audio_processing.h",
237 ],
238
239 "fake_frame_decryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800240 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200241 ],
242
243 "fake_frame_encryptor\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800244 "+rtc_base/ref_counted_object.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200245 ],
246
Mirko Bonadeia418e672018-10-24 13:57:25 +0200247 "mock.*\.h": [
248 "+test/gmock.h",
249 ],
250
251 "simulated_network\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800252 "+rtc_base/critical_section.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200253 "+rtc_base/random.h",
254 "+rtc_base/thread_annotations.h",
255 ],
256
257 "test_dependency_factory\.h": [
258 "+rtc_base/thread_checker.h",
259 ],
260
261 "videocodec_test_fixture\.h": [
262 "+modules/video_coding/include/video_codec_interface.h"
263 ],
264
Mirko Bonadeia418e672018-10-24 13:57:25 +0200265 "video_timing\.h": [
266 "+rtc_base/numerics/safe_conversions.h",
267 ],
268
269 "video_encoder_config\.h": [
Steve Anton10542f22019-01-11 09:11:00 -0800270 "+rtc_base/ref_count.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200271 ],
272
Mirko Bonadei90490372018-10-26 13:17:47 +0200273 # .cc files in api/ should not be restricted in what they can #include,
274 # so we re-add all the top-level directories here. (That's because .h
275 # files leak their #includes to whoever's #including them, but .cc files
276 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800277 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200278 "+audio",
279 "+call",
280 "+common_audio",
281 "+common_video",
282 "+examples",
283 "+logging",
284 "+media",
285 "+modules",
286 "+p2p",
287 "+pc",
288 "+rtc_base",
289 "+rtc_tools",
290 "+sdk",
291 "+stats",
292 "+system_wrappers",
293 "+test",
294 "+tools",
295 "+tools_webrtc",
296 "+video",
297 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800298 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100299}