• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This is supposed to be a complete list of top-level directories,
2# excepting only api/ itself.
3include_rules = [
4  "-audio",
5  "-base",
6  "-build",
7  "-buildtools",
8  "-build_overrides",
9  "-call",
10  "-common_audio",
11  "-common_video",
12  "-data",
13  "-examples",
14  "-ios",
15  "-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",
39]
40
41specific_include_rules = {
42  # Some internal headers are allowed even in API headers:
43  ".*\.h": [
44    "+rtc_base/checks.h",
45    "+rtc_base/system/rtc_export.h",
46    "+rtc_base/system/rtc_export_template.h",
47    "+rtc_base/units/unit_base.h",
48    "+rtc_base/deprecation.h",
49  ],
50
51  "array_view\.h": [
52    "+rtc_base/type_traits.h",
53  ],
54
55  # Needed because AudioEncoderOpus is in the wrong place for
56  # backwards compatibilty reasons. See
57  # https://bugs.chromium.org/p/webrtc/issues/detail?id=7847
58  "audio_encoder_opus\.h": [
59    "+modules/audio_coding/codecs/opus/audio_encoder_opus.h",
60  ],
61
62  "async_resolver_factory\.h": [
63    "+rtc_base/async_resolver_interface.h",
64  ],
65
66  "candidate\.h": [
67    "+rtc_base/network_constants.h",
68    "+rtc_base/socket_address.h",
69  ],
70
71  "data_channel_interface\.h": [
72    "+rtc_base/copy_on_write_buffer.h",
73    "+rtc_base/ref_count.h",
74  ],
75
76  "data_channel_transport_interface\.h": [
77    "+rtc_base/copy_on_write_buffer.h",
78  ],
79
80  "dtls_transport_interface\.h": [
81    "+rtc_base/ref_count.h",
82    "+rtc_base/ssl_certificate.h",
83  ],
84
85  "dtmf_sender_interface\.h": [
86    "+rtc_base/ref_count.h",
87  ],
88
89  "fec_controller\.h": [
90    "+modules/include/module_fec_types.h",
91  ],
92
93  "frame_transformer_interface\.h": [
94    "+rtc_base/ref_count.h",
95  ],
96
97  "ice_transport_interface\.h": [
98    "+rtc_base/ref_count.h",
99  ],
100
101  "jsep\.h": [
102    "+rtc_base/ref_count.h",
103  ],
104
105  "jsep_ice_candidate\.h": [
106    "+rtc_base/constructor_magic.h",
107  ],
108
109  "jsep_session_description\.h": [
110    "+rtc_base/constructor_magic.h",
111  ],
112
113  "media_stream_interface\.h": [
114    "+modules/audio_processing/include/audio_processing_statistics.h",
115    "+rtc_base/ref_count.h",
116  ],
117
118  "packet_socket_factory\.h": [
119    "+rtc_base/proxy_info.h",
120    "+rtc_base/async_packet_socket.h",
121  ],
122
123  "peer_connection_factory_proxy\.h": [
124    "+rtc_base/bind.h",
125  ],
126
127  "peer_connection_interface\.h": [
128    "+media/base/media_config.h",
129    "+media/base/media_engine.h",
130    "+p2p/base/port_allocator.h",
131    "+rtc_base/network.h",
132    "+rtc_base/rtc_certificate.h",
133    "+rtc_base/rtc_certificate_generator.h",
134    "+rtc_base/socket_address.h",
135    "+rtc_base/ssl_certificate.h",
136    "+rtc_base/ssl_stream_adapter.h",
137  ],
138
139  "proxy\.h": [
140    "+rtc_base/event.h",
141    "+rtc_base/message_handler.h",  # Inherits from it.
142    "+rtc_base/ref_counted_object.h",
143    "+rtc_base/thread.h",
144  ],
145
146  "ref_counted_base\.h": [
147    "+rtc_base/constructor_magic.h",
148    "+rtc_base/ref_count.h",
149    "+rtc_base/ref_counter.h",
150  ],
151
152  "rtc_error\.h": [
153    "+rtc_base/logging.h",
154  ],
155  "rtc_event_log_output_file.h": [
156    # For private member and constructor.
157    "+rtc_base/system/file_wrapper.h",
158  ],
159  "rtp_receiver_interface\.h": [
160    "+rtc_base/ref_count.h",
161  ],
162
163  "rtp_sender_interface\.h": [
164    "+rtc_base/ref_count.h",
165  ],
166
167  "rtp_transceiver_interface\.h": [
168    "+rtc_base/ref_count.h",
169  ],
170
171  "sctp_transport_interface\.h": [
172    "+rtc_base/ref_count.h",
173  ],
174
175  "set_remote_description_observer_interface\.h": [
176    "+rtc_base/ref_count.h",
177  ],
178
179  "stats_types\.h": [
180    "+rtc_base/constructor_magic.h",
181    "+rtc_base/ref_count.h",
182    "+rtc_base/string_encode.h",
183    "+rtc_base/thread_checker.h",
184  ],
185
186  "uma_metrics\.h": [
187    "+rtc_base/ref_count.h",
188  ],
189
190  "audio_frame\.h": [
191    "+rtc_base/constructor_magic.h",
192  ],
193
194  "audio_mixer\.h": [
195    "+rtc_base/ref_count.h",
196  ],
197
198  "audio_decoder\.h": [
199    "+rtc_base/buffer.h",
200    "+rtc_base/constructor_magic.h",
201  ],
202
203  "audio_decoder_factory\.h": [
204    "+rtc_base/ref_count.h",
205  ],
206
207  "audio_decoder_factory_template\.h": [
208    "+rtc_base/ref_counted_object.h",
209  ],
210
211  "audio_encoder\.h": [
212    "+rtc_base/buffer.h",
213  ],
214
215  "audio_encoder_factory\.h": [
216    "+rtc_base/ref_count.h",
217  ],
218
219  "audio_encoder_factory_template\.h": [
220    "+rtc_base/ref_counted_object.h",
221  ],
222
223  "frame_decryptor_interface\.h": [
224    "+rtc_base/ref_count.h",
225  ],
226
227  "frame_encryptor_interface\.h": [
228    "+rtc_base/ref_count.h",
229  ],
230
231  "rtc_stats_collector_callback\.h": [
232    "+rtc_base/ref_count.h",
233  ],
234
235  "rtc_stats_report\.h": [
236    "+rtc_base/ref_count.h",
237    "+rtc_base/ref_counted_object.h",
238  ],
239
240  "audioproc_float\.h": [
241    "+modules/audio_processing/include/audio_processing.h",
242  ],
243
244  "echo_detector_creator\.h": [
245    "+modules/audio_processing/include/audio_processing.h",
246  ],
247
248  "fake_frame_decryptor\.h": [
249    "+rtc_base/ref_counted_object.h",
250  ],
251
252  "fake_frame_encryptor\.h": [
253    "+rtc_base/ref_counted_object.h",
254  ],
255
256  "mock.*\.h": [
257    "+test/gmock.h",
258  ],
259
260  "simulated_network\.h": [
261    "+rtc_base/random.h",
262    "+rtc_base/thread_annotations.h",
263  ],
264
265  "test_dependency_factory\.h": [
266    "+rtc_base/thread_checker.h",
267  ],
268
269  "time_controller\.h": [
270    "+rtc_base/thread.h",
271  ],
272
273  "videocodec_test_fixture\.h": [
274    "+modules/video_coding/include/video_codec_interface.h"
275  ],
276
277  "video_encoder_config\.h": [
278    "+rtc_base/ref_count.h",
279  ],
280
281  # .cc files in api/ should not be restricted in what they can #include,
282  # so we re-add all the top-level directories here. (That's because .h
283  # files leak their #includes to whoever's #including them, but .cc files
284  # do not since no one #includes them.)
285  ".*\.cc": [
286    "+audio",
287    "+call",
288    "+common_audio",
289    "+common_video",
290    "+examples",
291    "+logging",
292    "+media",
293    "+modules",
294    "+p2p",
295    "+pc",
296    "+rtc_base",
297    "+rtc_tools",
298    "+sdk",
299    "+stats",
300    "+system_wrappers",
301    "+test",
302    "+tools",
303    "+tools_webrtc",
304    "+video",
305    "+third_party",
306  ],
307}
308