blob: e4bb408cc1746ff1f56cd4084379ee2c2b08e38e [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
Yves Gerey3e707812018-11-28 16:47:49 +0100119 "proxy\.h": [
120 "+rtc_base/messagehandler.h", # Inherits from it.
121 "+rtc_base/messagequeue.h", # Inherits from MessageData.
122 "+rtc_base/scoped_ref_ptr.h",
123 ],
124
Mirko Bonadeia418e672018-10-24 13:57:25 +0200125 "refcountedbase\.h": [
126 "+rtc_base/constructormagic.h",
127 "+rtc_base/refcount.h",
128 "+rtc_base/refcounter.h",
129 ],
130
131 "rtcerror\.h": [
132 "+rtc_base/logging.h",
133 ],
134
135 "rtpreceiverinterface\.h": [
136 "+rtc_base/refcount.h",
137 "+rtc_base/scoped_ref_ptr.h",
138 ],
139
140 "rtpsenderinterface\.h": [
141 "+rtc_base/refcount.h",
142 "+rtc_base/scoped_ref_ptr.h",
143 ],
144
145 "rtptransceiverinterface\.h": [
146 "+rtc_base/refcount.h",
147 ],
148
149 "setremotedescriptionobserverinterface\.h": [
150 "+rtc_base/refcount.h",
151 ],
152
153 "statstypes\.h": [
154 "+rtc_base/constructormagic.h",
155 "+rtc_base/refcount.h",
156 "+rtc_base/scoped_ref_ptr.h",
157 "+rtc_base/stringencode.h",
158 "+rtc_base/thread_checker.h",
159 ],
160
161 "umametrics\.h": [
162 "+rtc_base/refcount.h",
163 ],
164
165 "audio_frame\.h": [
166 "+rtc_base/constructormagic.h",
167 ],
168
169 "audio_mixer\.h": [
170 "+rtc_base/refcount.h",
171 ],
172
173 "audio_decoder\.h": [
174 "+rtc_base/buffer.h",
175 "+rtc_base/constructormagic.h",
176 ],
177
178 "audio_decoder_factory\.h": [
179 "+rtc_base/refcount.h",
180 ],
181
182 "audio_decoder_factory_template\.h": [
183 "+rtc_base/refcountedobject.h",
184 "+rtc_base/scoped_ref_ptr.h",
185 ],
186
187 "audio_encoder\.h": [
188 "+rtc_base/buffer.h",
189 "+rtc_base/deprecation.h",
190 ],
191
192 "audio_encoder_factory\.h": [
193 "+rtc_base/refcount.h",
194 ],
195
196 "audio_encoder_factory_template\.h": [
197 "+rtc_base/refcountedobject.h",
198 "+rtc_base/scoped_ref_ptr.h",
199 ],
200
201 "builtin_audio_decoder_factory\.h": [
202 "+rtc_base/scoped_ref_ptr.h",
203 ],
204
205 "builtin_audio_encoder_factory\.h": [
206 "+rtc_base/scoped_ref_ptr.h",
207 ],
208
209 "framedecryptorinterface\.h": [
210 "+rtc_base/refcount.h",
211 ],
212
213 "frameencryptorinterface\.h": [
214 "+rtc_base/refcount.h",
215 ],
216
217 "ortcfactoryinterface\.h": [
218 "+rtc_base/network.h",
219 "+rtc_base/scoped_ref_ptr.h",
220 "+rtc_base/thread.h",
221 ],
222
223 "udptransportinterface\.h": [
224 "+rtc_base/socketaddress.h",
225 ],
226
227 "rtcstatscollectorcallback\.h": [
228 "+rtc_base/refcount.h",
229 "+rtc_base/scoped_ref_ptr.h",
230 ],
231
232 "rtcstatsreport\.h": [
233 "+rtc_base/refcount.h",
234 "+rtc_base/refcountedobject.h",
235 "+rtc_base/scoped_ref_ptr.h",
236 ],
237
238 "audioproc_float\.h": [
239 "+modules/audio_processing/include/audio_processing.h",
240 ],
241
242 "fake_frame_decryptor\.h": [
243 "+rtc_base/refcountedobject.h",
244 ],
245
246 "fake_frame_encryptor\.h": [
247 "+rtc_base/refcountedobject.h",
248 ],
249
250 "fakeconstraints\.h": [
251 "+rtc_base/stringencode.h",
252 ],
253
254 "mock.*\.h": [
255 "+test/gmock.h",
256 ],
257
258 "simulated_network\.h": [
259 "+rtc_base/criticalsection.h",
260 "+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 "i010_buffer\.h": [
Yves Gerey3e707812018-11-28 16:47:49 +0100273 "+rtc_base/memory/aligned_malloc.h",
274 "+rtc_base/scoped_ref_ptr.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200275 ],
276
277 "i420_buffer\.h": [
278 "+rtc_base/memory/aligned_malloc.h",
279 ],
280
281 "video_frame_buffer\.h": [
282 "+rtc_base/refcount.h",
283 "+rtc_base/scoped_ref_ptr.h",
284 ],
285
286 "video_timing\.h": [
287 "+rtc_base/numerics/safe_conversions.h",
288 ],
289
290 "video_encoder_config\.h": [
291 "+rtc_base/refcount.h",
292 "+rtc_base/scoped_ref_ptr.h",
293 ],
294
Mirko Bonadei90490372018-10-26 13:17:47 +0200295 # .cc files in api/ should not be restricted in what they can #include,
296 # so we re-add all the top-level directories here. (That's because .h
297 # files leak their #includes to whoever's #including them, but .cc files
298 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800299 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200300 "+audio",
301 "+call",
302 "+common_audio",
303 "+common_video",
304 "+examples",
305 "+logging",
306 "+media",
307 "+modules",
308 "+p2p",
309 "+pc",
310 "+rtc_base",
311 "+rtc_tools",
312 "+sdk",
313 "+stats",
314 "+system_wrappers",
315 "+test",
316 "+tools",
317 "+tools_webrtc",
318 "+video",
319 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800320 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100321}