blob: 3fe2bff77314067ecf25e18c0e222ddfce47c8ef [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",
46 ],
47
48 "array_view\.h": [
49 "+rtc_base/type_traits.h",
50 ],
51
kwiberg96da0112017-06-30 04:23:22 -070052 # Needed because AudioEncoderOpus is in the wrong place for
53 # backwards compatibilty reasons. See
54 # https://bugs.chromium.org/p/webrtc/issues/detail?id=7847
55 "audio_encoder_opus\.h": [
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020056 "+modules/audio_coding/codecs/opus/audio_encoder_opus.h",
kwiberg96da0112017-06-30 04:23:22 -070057 ],
58
Mirko Bonadeia418e672018-10-24 13:57:25 +020059 "asyncresolverfactory\.h": [
60 "+rtc_base/asyncresolverinterface.h",
61 ],
62
63 "candidate\.h": [
64 "+rtc_base/network_constants.h",
65 "+rtc_base/socketaddress.h",
66 ],
67
68 "datachannelinterface\.h": [
69 "+rtc_base/copyonwritebuffer.h",
70 "+rtc_base/refcount.h",
71 ],
72
73 "dtmfsenderinterface\.h": [
74 "+rtc_base/refcount.h",
75 ],
76
77 "fec_controller\.h": [
78 "+modules/include/module_fec_types.h",
79 ],
80
81 "jsep\.h": [
82 "+rtc_base/refcount.h",
83 ],
84
85 "jsepicecandidate\.h": [
86 "+rtc_base/constructormagic.h",
87 ],
88
89 "jsepsessiondescription\.h": [
90 "+rtc_base/constructormagic.h",
91 ],
92
93 "mediastreaminterface\.h": [
94 "+modules/audio_processing/include/audio_processing_statistics.h",
95 "+rtc_base/refcount.h",
96 "+rtc_base/scoped_ref_ptr.h",
97 ],
98
99 "peerconnectionfactoryproxy\.h": [
100 "+rtc_base/bind.h",
101 ],
102
103 "refcountedbase\.h": [
104 "+rtc_base/constructormagic.h",
105 "+rtc_base/refcount.h",
106 "+rtc_base/refcounter.h",
107 ],
108
109 "rtcerror\.h": [
110 "+rtc_base/logging.h",
111 ],
112
113 "rtpreceiverinterface\.h": [
114 "+rtc_base/refcount.h",
115 "+rtc_base/scoped_ref_ptr.h",
116 ],
117
118 "rtpsenderinterface\.h": [
119 "+rtc_base/refcount.h",
120 "+rtc_base/scoped_ref_ptr.h",
121 ],
122
123 "rtptransceiverinterface\.h": [
124 "+rtc_base/refcount.h",
125 ],
126
127 "setremotedescriptionobserverinterface\.h": [
128 "+rtc_base/refcount.h",
129 ],
130
131 "statstypes\.h": [
132 "+rtc_base/constructormagic.h",
133 "+rtc_base/refcount.h",
134 "+rtc_base/scoped_ref_ptr.h",
135 "+rtc_base/stringencode.h",
136 "+rtc_base/thread_checker.h",
137 ],
138
139 "umametrics\.h": [
140 "+rtc_base/refcount.h",
141 ],
142
143 "audio_frame\.h": [
144 "+rtc_base/constructormagic.h",
145 ],
146
147 "audio_mixer\.h": [
148 "+rtc_base/refcount.h",
149 ],
150
151 "audio_decoder\.h": [
152 "+rtc_base/buffer.h",
153 "+rtc_base/constructormagic.h",
154 ],
155
156 "audio_decoder_factory\.h": [
157 "+rtc_base/refcount.h",
158 ],
159
160 "audio_decoder_factory_template\.h": [
161 "+rtc_base/refcountedobject.h",
162 "+rtc_base/scoped_ref_ptr.h",
163 ],
164
165 "audio_encoder\.h": [
166 "+rtc_base/buffer.h",
167 "+rtc_base/deprecation.h",
168 ],
169
170 "audio_encoder_factory\.h": [
171 "+rtc_base/refcount.h",
172 ],
173
174 "audio_encoder_factory_template\.h": [
175 "+rtc_base/refcountedobject.h",
176 "+rtc_base/scoped_ref_ptr.h",
177 ],
178
179 "builtin_audio_decoder_factory\.h": [
180 "+rtc_base/scoped_ref_ptr.h",
181 ],
182
183 "builtin_audio_encoder_factory\.h": [
184 "+rtc_base/scoped_ref_ptr.h",
185 ],
186
187 "framedecryptorinterface\.h": [
188 "+rtc_base/refcount.h",
189 ],
190
191 "frameencryptorinterface\.h": [
192 "+rtc_base/refcount.h",
193 ],
194
195 "ortcfactoryinterface\.h": [
196 "+rtc_base/network.h",
197 "+rtc_base/scoped_ref_ptr.h",
198 "+rtc_base/thread.h",
199 ],
200
201 "udptransportinterface\.h": [
202 "+rtc_base/socketaddress.h",
203 ],
204
205 "rtcstatscollectorcallback\.h": [
206 "+rtc_base/refcount.h",
207 "+rtc_base/scoped_ref_ptr.h",
208 ],
209
210 "rtcstatsreport\.h": [
211 "+rtc_base/refcount.h",
212 "+rtc_base/refcountedobject.h",
213 "+rtc_base/scoped_ref_ptr.h",
214 ],
215
216 "audioproc_float\.h": [
217 "+modules/audio_processing/include/audio_processing.h",
218 ],
219
220 "fake_frame_decryptor\.h": [
221 "+rtc_base/refcountedobject.h",
222 ],
223
224 "fake_frame_encryptor\.h": [
225 "+rtc_base/refcountedobject.h",
226 ],
227
228 "fakeconstraints\.h": [
229 "+rtc_base/stringencode.h",
230 ],
231
232 "mock.*\.h": [
233 "+test/gmock.h",
234 ],
235
236 "simulated_network\.h": [
237 "+rtc_base/criticalsection.h",
238 "+rtc_base/random.h",
239 "+rtc_base/thread_annotations.h",
240 ],
241
242 "test_dependency_factory\.h": [
243 "+rtc_base/thread_checker.h",
244 ],
245
246 "videocodec_test_fixture\.h": [
247 "+modules/video_coding/include/video_codec_interface.h"
248 ],
249
250 "data_rate\.h": [
251 "+rtc_base/numerics/safe_conversions.h",
252 ],
253
254 "data_size\.h": [
255 "+rtc_base/numerics/safe_conversions.h",
256 ],
257
258 "time_delta\.h": [
259 "+rtc_base/numerics/safe_conversions.h",
260 ],
261
262 "timestamp\.h": [
263 "+rtc_base/numerics/safe_conversions.h",
264 ],
265
266 "i010_buffer\.h": [
267 "+rtc_base/memory/aligned_malloc.h"
268 ],
269
270 "i420_buffer\.h": [
271 "+rtc_base/memory/aligned_malloc.h",
272 ],
273
274 "video_frame_buffer\.h": [
275 "+rtc_base/refcount.h",
276 "+rtc_base/scoped_ref_ptr.h",
277 ],
278
279 "video_timing\.h": [
280 "+rtc_base/numerics/safe_conversions.h",
281 ],
282
283 "video_encoder_config\.h": [
284 "+rtc_base/refcount.h",
285 "+rtc_base/scoped_ref_ptr.h",
286 ],
287
Mirko Bonadei90490372018-10-26 13:17:47 +0200288 # .cc files in api/ should not be restricted in what they can #include,
289 # so we re-add all the top-level directories here. (That's because .h
290 # files leak their #includes to whoever's #including them, but .cc files
291 # do not since no one #includes them.)
kwiberg087bd342017-02-10 08:15:44 -0800292 ".*\.cc": [
Mirko Bonadeia418e672018-10-24 13:57:25 +0200293 "+audio",
294 "+call",
295 "+common_audio",
296 "+common_video",
297 "+examples",
298 "+logging",
299 "+media",
300 "+modules",
301 "+p2p",
302 "+pc",
303 "+rtc_base",
304 "+rtc_tools",
305 "+sdk",
306 "+stats",
307 "+system_wrappers",
308 "+test",
309 "+tools",
310 "+tools_webrtc",
311 "+video",
312 "+third_party",
kwiberg1e4e8cb2017-01-31 01:48:08 -0800313 ],
kjellander@webrtc.org94a23f02016-03-17 12:05:36 +0100314}