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