diff --git a/api/g3doc/index.md b/api/g3doc/index.md new file mode 100644 index 0000000000..fe8d9b5582 --- /dev/null +++ b/api/g3doc/index.md @@ -0,0 +1,13 @@ + + + +# The WebRTC API + +The public API of the WebRTC library consists of the api/ directory and +its subdirectories. No other files should be depended on by webrtc users. + +Before starting to code against the API, it is important to understand +some basic concepts, such as: + +* Memory management, including webrtc's reference counted objects +* [Thread management](threading_design.md) diff --git a/api/DESIGN.md b/api/g3doc/threading_design.md similarity index 94% rename from api/DESIGN.md rename to api/g3doc/threading_design.md index 0a2f36eb2b..868c433abc 100644 --- a/api/DESIGN.md +++ b/api/g3doc/threading_design.md @@ -1,4 +1,6 @@ -# Design considerations + + +# API Threading Design considerations The header files in this directory form the API to the WebRTC library that is intended for client applications' use. @@ -30,7 +32,7 @@ the two calls. sequential execution - other names for such constructs are task runners and sequenced task queues. -# Client threads and callbacks +## Client threads and callbacks At the moment, the API does not give any guarantee on which thread* the callbacks and events are called on. So it's best to write all callback @@ -47,7 +49,7 @@ void ObserverClass::Handler(event) { In the future, the implementation may change to always call the callbacks and event handlers on the client thread. -# Implementation considerations +## Implementation considerations The C++ classes that are part of the public API are also used to derive classes that form part of the implementation. diff --git a/g3doc/sitemap.md b/g3doc/sitemap.md index 10034d5343..78f11f60dc 100644 --- a/g3doc/sitemap.md +++ b/g3doc/sitemap.md @@ -2,7 +2,8 @@ * How to contribute * Code * [Documentation](/g3doc/how_to_write_documentation.md) -* Public C++ API +* [Public C++ API](/api/g3doc/index.md) + * [Threading](/api/g3doc/threading_design.md) * Implementation * Network * Congestion control and bandwidth estimation