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