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