This reverts commit 045589e64c2058caf2d246f5dfa51c8f1fadfd03. Reason for revert: Test flakiness fixed in https://webrtc-review.googlesource.com/c/src/+/352660 Original change's description: > Revert "Add SchedulableNetworkBehavior and tests." > > This reverts commit 06815534d2da29a7f41cad2eaab6d2103f0138c2. > > Reason for revert: Seems to break importer... > > Original change's description: > > Add SchedulableNetworkBehavior and tests. > > > > This is a network behaviour that can change its parameters over time as specified with a schedule proto. > > > > Bug: webrtc:14525 > > Change-Id: Idd34cc48c8e3e8311975615f2c3dc3ffb522a708 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352140 > > Reviewed-by: Björn Terelius <terelius@webrtc.org> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> > > Commit-Queue: Per Kjellander <perkj@webrtc.org> > > Cr-Commit-Position: refs/heads/main@{#42390} > > Bug: webrtc:14525 > Change-Id: I4386ffb7629198c74249e416076cab3b4c23a79b > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352501 > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> > Commit-Queue: Per Kjellander <perkj@webrtc.org> > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> > Cr-Commit-Position: refs/heads/main@{#42391} Bug: webrtc:14525 Change-Id: I68f536c67ab15d97fa59700ce6c3c4b9edc1d1b9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352681 Commit-Queue: Per Kjellander <perkj@webrtc.org> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42403}
How to write code in the api/ directory
Mostly, just follow the regular style guide, but:
- Note that
api/code is not exempt from the “.hand.ccfiles come in pairs” rule, so if you declare something inapi/path/to/foo.h, it should be defined inapi/path/to/foo.cc. - Headers in
api/should, if possible, not#includeheaders outsideapi/. It’s not always possible to avoid this, but be aware that it adds to a small mountain of technical debt that we’re trying to shrink. .ccfiles inapi/, on the other hand, are free to#includeheaders outsideapi/.- Avoid structs in api, prefer classes.
The preferred way for api/ code to access non-api/ code is to call
it from a .cc file, so that users of our API headers won’t transitively
#include non-public headers.
For headers in api/ that need to refer to non-public types, forward
declarations are often a lesser evil than including non-public header files. The
usual rules still apply, though.
.cc files in api/ should preferably be kept reasonably small. If a
substantial implementation is needed, consider putting it with our non-public
code, and just call it from the api/ .cc file.
Avoid defining api with structs as it makes harder for the api to evolve. Your struct may gain invariant, or change how it represents data. Evolving struct from the api is particular challenging as it is designed to be used in other code bases and thus needs to be updated independetly from its usage. Class with accessors and setters makes such migration safer. See Google C++ style guide for more.
If you need to evolve existent struct in api, prefer first to convert it into a class.