blob: 82885d43218e6f265f960e608283a53515df1127 [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
Mirko Bonadeia418e672018-10-24 13:57:25 +020060 "asyncresolverfactory\.h": [
61 "+rtc_base/asyncresolverinterface.h",
62 ],
63
64 "candidate\.h": [
65 "+rtc_base/network_constants.h",
66 "+rtc_base/socketaddress.h",
67 ],
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 "+rtc_base/scoped_ref_ptr.h",
72 ],
73
Mirko Bonadeia418e672018-10-24 13:57:25 +020074 "datachannelinterface\.h": [
75 "+rtc_base/copyonwritebuffer.h",
76 "+rtc_base/refcount.h",
77 ],
78
Harald Alvestrandad88c882018-11-28 16:47:46 +010079 "dtlstransportinterface\.h": [
80 "+rtc_base/refcount.h",
81 ],
82
Mirko Bonadeia418e672018-10-24 13:57:25 +020083 "dtmfsenderinterface\.h": [
84 "+rtc_base/refcount.h",
85 ],
86
87 "fec_controller\.h": [
88 "+modules/include/module_fec_types.h",
89 ],
90
91 "jsep\.h": [
92 "+rtc_base/refcount.h",
93 ],
94
95 "jsepicecandidate\.h": [
96 "+rtc_base/constructormagic.h",
97 ],
98
99 "jsepsessiondescription\.h": [
100 "+rtc_base/constructormagic.h",
101 ],
102
103 "mediastreaminterface\.h": [
104 "+modules/audio_processing/include/audio_processing_statistics.h",
105 "+rtc_base/refcount.h",
106 "+rtc_base/scoped_ref_ptr.h",
107 ],
108
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700109 "media_transport_interface\.h": [
110 "+rtc_base/copyonwritebuffer.h", # As used by datachannelinterface.h
Niels Möllerd8a1b7a2018-12-06 13:00:27 +0100111 "+rtc_base/networkroute.h",
112 "+rtc_base/deprecation.h",
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700113 ],
114
Mirko Bonadeia418e672018-10-24 13:57:25 +0200115 "peerconnectionfactoryproxy\.h": [
116 "+rtc_base/bind.h",
117 ],
118
Steve Antonbba675d2018-12-27 11:15:19 -0800119 "peerconnectioninterface\.h": [
120 "+logging/rtc_event_log/rtc_event_log_factory_interface.h",
121 "+media/base/mediaconfig.h",
122 "+media/base/videocapturer.h",
123 "+media/base/mediaengine.h",
124 "+p2p/base/portallocator.h",
125 "+rtc_base/bitrateallocationstrategy.h",
126 "+rtc_base/network.h",
127 "+rtc_base/platform_file.h",
128 "+rtc_base/rtccertificate.h",
129 "+rtc_base/rtccertificategenerator.h",
130 "+rtc_base/socketaddress.h",
131 "+rtc_base/sslcertificate.h",
132 "+rtc_base/sslstreamadapter.h",
133 ],
134
Yves Gerey3e707812018-11-28 16:47:49 +0100135 "proxy\.h": [
Steve Antonbba675d2018-12-27 11:15:19 -0800136 "+rtc_base/event.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100137 "+rtc_base/messagehandler.h", # Inherits from it.
138 "+rtc_base/messagequeue.h", # Inherits from MessageData.
Steve Antonbba675d2018-12-27 11:15:19 -0800139 "+rtc_base/refcountedobject.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100140 "+rtc_base/scoped_ref_ptr.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800141 "+rtc_base/thread.h",
Yves Gerey3e707812018-11-28 16:47:49 +0100142 ],
143
Mirko Bonadeia418e672018-10-24 13:57:25 +0200144 "refcountedbase\.h": [
145 "+rtc_base/constructormagic.h",
146 "+rtc_base/refcount.h",
147 "+rtc_base/refcounter.h",
148 ],
149
150 "rtcerror\.h": [
151 "+rtc_base/logging.h",
152 ],
153
154 "rtpreceiverinterface\.h": [
155 "+rtc_base/refcount.h",
156 "+rtc_base/scoped_ref_ptr.h",
157 ],
158
159 "rtpsenderinterface\.h": [
160 "+rtc_base/refcount.h",
161 "+rtc_base/scoped_ref_ptr.h",
162 ],
163
164 "rtptransceiverinterface\.h": [
165 "+rtc_base/refcount.h",
Steve Antonbba675d2018-12-27 11:15:19 -0800166 "+rtc_base/scoped_ref_ptr.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200167 ],
168
169 "setremotedescriptionobserverinterface\.h": [
170 "+rtc_base/refcount.h",
171 ],
172
173 "statstypes\.h": [
174 "+rtc_base/constructormagic.h",
175 "+rtc_base/refcount.h",
176 "+rtc_base/scoped_ref_ptr.h",
177 "+rtc_base/stringencode.h",
178 "+rtc_base/thread_checker.h",
179 ],
180
181 "umametrics\.h": [
182 "+rtc_base/refcount.h",
183 ],
184
185 "audio_frame\.h": [
186 "+rtc_base/constructormagic.h",
187 ],
188
189 "audio_mixer\.h": [
190 "+rtc_base/refcount.h",
191 ],
192
193 "audio_decoder\.h": [
194 "+rtc_base/buffer.h",
195 "+rtc_base/constructormagic.h",
196 ],
197
198 "audio_decoder_factory\.h": [
199 "+rtc_base/refcount.h",
200 ],
201
202 "audio_decoder_factory_template\.h": [
203 "+rtc_base/refcountedobject.h",
204 "+rtc_base/scoped_ref_ptr.h",
205 ],
206
207 "audio_encoder\.h": [
208 "+rtc_base/buffer.h",
209 "+rtc_base/deprecation.h",
210 ],
211
212 "audio_encoder_factory\.h": [
213 "+rtc_base/refcount.h",
214 ],
215
216 "audio_encoder_factory_template\.h": [
217 "+rtc_base/refcountedobject.h",
218 "+rtc_base/scoped_ref_ptr.h",
219 ],
220
221 "builtin_audio_decoder_factory\.h": [
222 "+rtc_base/scoped_ref_ptr.h",
223 ],
224
225 "builtin_audio_encoder_factory\.h": [
226 "+rtc_base/scoped_ref_ptr.h",
227 ],
228
229 "framedecryptorinterface\.h": [
230 "+rtc_base/refcount.h",
231 ],
232
233 "frameencryptorinterface\.h": [
234 "+rtc_base/refcount.h",
235 ],
236
Mirko Bonadeia418e672018-10-24 13:57:25 +0200237 "rtcstatscollectorcallback\.h": [
238 "+rtc_base/refcount.h",
239 "+rtc_base/scoped_ref_ptr.h",
240 ],
241
242 "rtcstatsreport\.h": [
243 "+rtc_base/refcount.h",
244 "+rtc_base/refcountedobject.h",
245 "+rtc_base/scoped_ref_ptr.h",
246 ],
247
248 "audioproc_float\.h": [
249 "+modules/audio_processing/include/audio_processing.h",
250 ],
251
252 "fake_frame_decryptor\.h": [
253 "+rtc_base/refcountedobject.h",
254 ],
255
256 "fake_frame_encryptor\.h": [
257 "+rtc_base/refcountedobject.h",
258 ],
259
Mirko Bonadeia418e672018-10-24 13:57:25 +0200260 "mock.*\.h": [
261 "+test/gmock.h",
262 ],
263
264 "simulated_network\.h": [
265 "+rtc_base/criticalsection.h",
266 "+rtc_base/random.h",
267 "+rtc_base/thread_annotations.h",
268 ],
269
270 "test_dependency_factory\.h": [
271 "+rtc_base/thread_checker.h",
272 ],
273
274 "videocodec_test_fixture\.h": [
275 "+modules/video_coding/include/video_codec_interface.h"
276 ],
277
Mirko Bonadeia418e672018-10-24 13:57:25 +0200278 "video_timing\.h": [
279 "+rtc_base/numerics/safe_conversions.h",
280 ],
281
282 "video_encoder_config\.h": [
283 "+rtc_base/refcount.h",
284 "+rtc_base/scoped_ref_ptr.h",
285 ],
286
Mirko Bonadei90490372018-10-26 13:17:47 +0200287 # .cc files in api/ should not be restricted in what they can #include,
288 # so we re-add all the top-level directories here. (That's because .h
289 # files leak their #includes to whoever's #including them, but .cc files
290 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800291 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200292 "+audio",
293 "+call",
294 "+common_audio",
295 "+common_video",
296 "+examples",
297 "+logging",
298 "+media",
299 "+modules",
300 "+p2p",
301 "+pc",
302 "+rtc_base",
303 "+rtc_tools",
304 "+sdk",
305 "+stats",
306 "+system_wrappers",
307 "+test",
308 "+tools",
309 "+tools_webrtc",
310 "+video",
311 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800312 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100313}