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