blob: c4be2a38a9e36fd7dc21da2c70be55ce7a446417 [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": [
70 "+rtc_base/scoped_ref_ptr.h",
71 ],
72
Mirko Bonadeia418e672018-10-24 13:57:25 +020073 "datachannelinterface\.h": [
74 "+rtc_base/copyonwritebuffer.h",
75 "+rtc_base/refcount.h",
76 ],
77
Harald Alvestrandad88c882018-11-28 16:47:46 +010078 "dtlstransportinterface\.h": [
79 "+rtc_base/refcount.h",
80 ],
81
Mirko Bonadeia418e672018-10-24 13:57:25 +020082 "dtmfsenderinterface\.h": [
83 "+rtc_base/refcount.h",
84 ],
85
86 "fec_controller\.h": [
87 "+modules/include/module_fec_types.h",
88 ],
89
90 "jsep\.h": [
91 "+rtc_base/refcount.h",
92 ],
93
94 "jsepicecandidate\.h": [
95 "+rtc_base/constructormagic.h",
96 ],
97
98 "jsepsessiondescription\.h": [
99 "+rtc_base/constructormagic.h",
100 ],
101
102 "mediastreaminterface\.h": [
103 "+modules/audio_processing/include/audio_processing_statistics.h",
104 "+rtc_base/refcount.h",
105 "+rtc_base/scoped_ref_ptr.h",
106 ],
107
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700108 "media_transport_interface\.h": [
109 "+rtc_base/copyonwritebuffer.h", # As used by datachannelinterface.h
Piotr (Peter) Slatalaada077f2018-11-08 07:43:31 -0800110 "+rtc_base/networkroute.h"
Bjorn Mellem1f6aa9f2018-10-30 15:15:00 -0700111 ],
112
Mirko Bonadeia418e672018-10-24 13:57:25 +0200113 "peerconnectionfactoryproxy\.h": [
114 "+rtc_base/bind.h",
115 ],
116
Yves Gerey3e707812018-11-28 16:47:49 +0100117 "proxy\.h": [
118 "+rtc_base/messagehandler.h", # Inherits from it.
119 "+rtc_base/messagequeue.h", # Inherits from MessageData.
120 "+rtc_base/scoped_ref_ptr.h",
121 ],
122
Mirko Bonadeia418e672018-10-24 13:57:25 +0200123 "refcountedbase\.h": [
124 "+rtc_base/constructormagic.h",
125 "+rtc_base/refcount.h",
126 "+rtc_base/refcounter.h",
127 ],
128
129 "rtcerror\.h": [
130 "+rtc_base/logging.h",
131 ],
132
133 "rtpreceiverinterface\.h": [
134 "+rtc_base/refcount.h",
135 "+rtc_base/scoped_ref_ptr.h",
136 ],
137
138 "rtpsenderinterface\.h": [
139 "+rtc_base/refcount.h",
140 "+rtc_base/scoped_ref_ptr.h",
141 ],
142
143 "rtptransceiverinterface\.h": [
144 "+rtc_base/refcount.h",
145 ],
146
147 "setremotedescriptionobserverinterface\.h": [
148 "+rtc_base/refcount.h",
149 ],
150
151 "statstypes\.h": [
152 "+rtc_base/constructormagic.h",
153 "+rtc_base/refcount.h",
154 "+rtc_base/scoped_ref_ptr.h",
155 "+rtc_base/stringencode.h",
156 "+rtc_base/thread_checker.h",
157 ],
158
159 "umametrics\.h": [
160 "+rtc_base/refcount.h",
161 ],
162
163 "audio_frame\.h": [
164 "+rtc_base/constructormagic.h",
165 ],
166
167 "audio_mixer\.h": [
168 "+rtc_base/refcount.h",
169 ],
170
171 "audio_decoder\.h": [
172 "+rtc_base/buffer.h",
173 "+rtc_base/constructormagic.h",
174 ],
175
176 "audio_decoder_factory\.h": [
177 "+rtc_base/refcount.h",
178 ],
179
180 "audio_decoder_factory_template\.h": [
181 "+rtc_base/refcountedobject.h",
182 "+rtc_base/scoped_ref_ptr.h",
183 ],
184
185 "audio_encoder\.h": [
186 "+rtc_base/buffer.h",
187 "+rtc_base/deprecation.h",
188 ],
189
190 "audio_encoder_factory\.h": [
191 "+rtc_base/refcount.h",
192 ],
193
194 "audio_encoder_factory_template\.h": [
195 "+rtc_base/refcountedobject.h",
196 "+rtc_base/scoped_ref_ptr.h",
197 ],
198
199 "builtin_audio_decoder_factory\.h": [
200 "+rtc_base/scoped_ref_ptr.h",
201 ],
202
203 "builtin_audio_encoder_factory\.h": [
204 "+rtc_base/scoped_ref_ptr.h",
205 ],
206
207 "framedecryptorinterface\.h": [
208 "+rtc_base/refcount.h",
209 ],
210
211 "frameencryptorinterface\.h": [
212 "+rtc_base/refcount.h",
213 ],
214
215 "ortcfactoryinterface\.h": [
216 "+rtc_base/network.h",
217 "+rtc_base/scoped_ref_ptr.h",
218 "+rtc_base/thread.h",
219 ],
220
221 "udptransportinterface\.h": [
222 "+rtc_base/socketaddress.h",
223 ],
224
225 "rtcstatscollectorcallback\.h": [
226 "+rtc_base/refcount.h",
227 "+rtc_base/scoped_ref_ptr.h",
228 ],
229
230 "rtcstatsreport\.h": [
231 "+rtc_base/refcount.h",
232 "+rtc_base/refcountedobject.h",
233 "+rtc_base/scoped_ref_ptr.h",
234 ],
235
236 "audioproc_float\.h": [
237 "+modules/audio_processing/include/audio_processing.h",
238 ],
239
240 "fake_frame_decryptor\.h": [
241 "+rtc_base/refcountedobject.h",
242 ],
243
244 "fake_frame_encryptor\.h": [
245 "+rtc_base/refcountedobject.h",
246 ],
247
248 "fakeconstraints\.h": [
249 "+rtc_base/stringencode.h",
250 ],
251
252 "mock.*\.h": [
253 "+test/gmock.h",
254 ],
255
256 "simulated_network\.h": [
257 "+rtc_base/criticalsection.h",
258 "+rtc_base/random.h",
259 "+rtc_base/thread_annotations.h",
260 ],
261
262 "test_dependency_factory\.h": [
263 "+rtc_base/thread_checker.h",
264 ],
265
266 "videocodec_test_fixture\.h": [
267 "+modules/video_coding/include/video_codec_interface.h"
268 ],
269
Mirko Bonadeia418e672018-10-24 13:57:25 +0200270 "i010_buffer\.h": [
Yves Gerey3e707812018-11-28 16:47:49 +0100271 "+rtc_base/memory/aligned_malloc.h",
272 "+rtc_base/scoped_ref_ptr.h",
Mirko Bonadeia418e672018-10-24 13:57:25 +0200273 ],
274
275 "i420_buffer\.h": [
276 "+rtc_base/memory/aligned_malloc.h",
277 ],
278
279 "video_frame_buffer\.h": [
280 "+rtc_base/refcount.h",
281 "+rtc_base/scoped_ref_ptr.h",
282 ],
283
284 "video_timing\.h": [
285 "+rtc_base/numerics/safe_conversions.h",
286 ],
287
288 "video_encoder_config\.h": [
289 "+rtc_base/refcount.h",
290 "+rtc_base/scoped_ref_ptr.h",
291 ],
292
Mirko Bonadei90490372018-10-26 13:17:47 +0200293 # .cc files in api/ should not be restricted in what they can #include,
294 # so we re-add all the top-level directories here. (That's because .h
295 # files leak their #includes to whoever's #including them, but .cc files
296 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800297 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200298 "+audio",
299 "+call",
300 "+common_audio",
301 "+common_video",
302 "+examples",
303 "+logging",
304 "+media",
305 "+modules",
306 "+p2p",
307 "+pc",
308 "+rtc_base",
309 "+rtc_tools",
310 "+sdk",
311 "+stats",
312 "+system_wrappers",
313 "+test",
314 "+tools",
315 "+tools_webrtc",
316 "+video",
317 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800318 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100319}