Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Update for 2.2.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
dolbyio-gh-bot committed Nov 28, 2022
1 parent 7de18b4 commit 70d4f5b
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 24 deletions.
Binary file modified docs/.doctrees/api/coresdk.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/sdk/common/async_ops.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/sdk/video.doctree
Binary file not shown.
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
11 changes: 6 additions & 5 deletions docs/_sources/api/coresdk.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ The :ref:`api_sdk`, :ref:`api_session`, :ref:`api_conference`, :ref:`api_device_
sdk/common/custom_allocator.rst

.. note::
The Core SDK API provides methods that are asynchronous in nature and return :ref:`async_result <api_async_result>`. This means that if
the result or the completion of operation is necessary for subsequent calls, you have to be careful. For more details refer to the :ref:`api_async_result` page or read the notes from the;
:cpp:class:`sdk <dolbyio::comms::sdk>`, :cpp:class:`conference <dolbyio::comms::services::conference>`, :cpp:class:`session <dolbyio::comms::services::session>`,
:cpp:class:`device_management <dolbyio::comms::services::device_management>`, :cpp:class:`audio <dolbyio::comms::services::local_audio>`, :cpp:class:`audio <dolbyio::comms::services::remote_audio>`,
:cpp:class:`video <dolbyio::comms::services::localvideo>` interfaces and refer to the examples of each documented asynchronous method.

The Core SDK API provides methods that are asynchronous in nature and return :ref:`async_result <api_async_result>`. This means that if the result or the completion of operation is necessary for subsequent calls, you have to be
careful. For more details refer to the :ref:`api_async_result` page. Details are also available in the descriptions of each interface which has functions producing results asynchronously: :cpp:class:`sdk <dolbyio::comms::sdk>`,
:cpp:class:`conference <dolbyio::comms::services::conference>`, :cpp:class:`session <dolbyio::comms::services::session>`, :cpp:class:`device_management <dolbyio::comms::services::device_management>`,
:cpp:class:`local audio <dolbyio::comms::services::local_audio>`, :cpp:class:`remote audio <dolbyio::comms::services::remote_audio>`, :cpp:class:`local video <dolbyio::comms::services::local_video>`,
:cpp:class:`remote video <dolbyio::comms::services::remote_video>`.
10 changes: 5 additions & 5 deletions docs/api/coresdk.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The Core SDK API provides methods that are asynchronous in nature and return <a class="reference internal" href="sdk/common/async_ops.html#api-async-result"><span class="std std-ref">async_result</span></a>. This means that if
the result or the completion of operation is necessary for subsequent calls, you have to be careful. For more details refer to the <a class="reference internal" href="sdk/common/async_ops.html#api-async-result"><span class="std std-ref">Asynchronous Operations</span></a> page or read the notes from the;
<a class="reference internal" href="sdk/sdk.html#_CPPv4N7dolbyio5comms3sdkE" title="dolbyio::comms::sdk"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">sdk</span></code></a>, <a class="reference internal" href="sdk/conference.html#_CPPv4N7dolbyio5comms8services10conferenceE" title="dolbyio::comms::services::conference"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">conference</span></code></a>, <a class="reference internal" href="sdk/session.html#_CPPv4N7dolbyio5comms8services7sessionE" title="dolbyio::comms::services::session"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">session</span></code></a>,
<a class="reference internal" href="sdk/device_management.html#_CPPv4N7dolbyio5comms8services17device_managementE" title="dolbyio::comms::services::device_management"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">device_management</span></code></a>, <a class="reference internal" href="sdk/audio.html#_CPPv4N7dolbyio5comms8services11local_audioE" title="dolbyio::comms::services::local_audio"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">audio</span></code></a>, <a class="reference internal" href="sdk/audio.html#_CPPv4N7dolbyio5comms8services12remote_audioE" title="dolbyio::comms::services::remote_audio"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">audio</span></code></a>,
<code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">video</span></code> interfaces and refer to the examples of each documented asynchronous method.</p>
<p>The Core SDK API provides methods that are asynchronous in nature and return <a class="reference internal" href="sdk/common/async_ops.html#api-async-result"><span class="std std-ref">async_result</span></a>. This means that if the result or the completion of operation is necessary for subsequent calls, you have to be
careful. For more details refer to the <a class="reference internal" href="sdk/common/async_ops.html#api-async-result"><span class="std std-ref">Asynchronous Operations</span></a> page. Details are also available in the descriptions of each interface which has functions producing results asynchronously: <a class="reference internal" href="sdk/sdk.html#_CPPv4N7dolbyio5comms3sdkE" title="dolbyio::comms::sdk"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">sdk</span></code></a>,
<a class="reference internal" href="sdk/conference.html#_CPPv4N7dolbyio5comms8services10conferenceE" title="dolbyio::comms::services::conference"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">conference</span></code></a>, <a class="reference internal" href="sdk/session.html#_CPPv4N7dolbyio5comms8services7sessionE" title="dolbyio::comms::services::session"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">session</span></code></a>, <a class="reference internal" href="sdk/device_management.html#_CPPv4N7dolbyio5comms8services17device_managementE" title="dolbyio::comms::services::device_management"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">device_management</span></code></a>,
<a class="reference internal" href="sdk/audio.html#_CPPv4N7dolbyio5comms8services11local_audioE" title="dolbyio::comms::services::local_audio"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">local</span> <span class="pre">audio</span></code></a>, <a class="reference internal" href="sdk/audio.html#_CPPv4N7dolbyio5comms8services12remote_audioE" title="dolbyio::comms::services::remote_audio"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">remote</span> <span class="pre">audio</span></code></a>, <a class="reference internal" href="sdk/video.html#_CPPv4N7dolbyio5comms8services11local_videoE" title="dolbyio::comms::services::local_video"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">local</span> <span class="pre">video</span></code></a>,
<a class="reference internal" href="sdk/video.html#_CPPv4N7dolbyio5comms8services12remote_videoE" title="dolbyio::comms::services::remote_video"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">remote</span> <span class="pre">video</span></code></a>.</p>
</div>
</section>

Expand Down
30 changes: 18 additions & 12 deletions docs/api/sdk/common/async_ops.html
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,15 @@
<span class="w"> </span><span class="p">.</span><span class="n">then</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cerr</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;1&quot;</span><span class="p">;</span><span class="w"></span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">another_async_method</span><span class="p">()</span><span class="w"></span>
<span class="w"> </span><span class="p">.</span><span class="n">then</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">){</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cerr</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;2&quot;</span><span class="p">;</span><span class="w"> </span><span class="p">});</span><span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="p">[](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// rethrow and handle exception })</span>
<span class="w"> </span><span class="p">.</span><span class="n">then</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">){</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cerr</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;2&quot;</span><span class="p">;</span><span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="p">[](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// rethrow and handle exception</span>
<span class="w"> </span><span class="p">})</span><span class="w"></span>
<span class="w"> </span><span class="p">.</span><span class="n">then</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">){</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cerr</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;3&quot;</span><span class="p">;</span><span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="p">[](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// rethrow and handle exception });</span>
<span class="w"> </span><span class="p">[](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// rethrow and handle exception</span>
<span class="w"> </span><span class="p">});</span><span class="w"></span>
<span class="w"> </span><span class="p">})</span><span class="w"></span>
<span class="w"> </span><span class="p">.</span><span class="n">on_error</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// rethrow and handle exception });</span>
<span class="w"> </span><span class="p">.</span><span class="n">on_error</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// rethrow and handle exception</span>
<span class="w"> </span><span class="p">});</span><span class="w"></span>
</pre></div>
</div>
</p>
Expand All @@ -417,11 +420,13 @@
<p>The errors are consumed by the provided error callback function object. If the asynchronous operation is resolved with an error, the chained async operations cannot be executed and error callbacks are invoked. By using the <a class="reference internal" href="#classdolbyio_1_1comms_1_1detail_1_1async__result_1a7892de3d365664d20695deb1d710c2d7"><span class="std std-ref">consume_errors()</span></a> call, the error propagation can be stopped. The caller captures the generated error and replaces the error with a result that is propagated to subsequent asynchronous operations. If the callback throws an error, that error is propagated to subsequent async results instead of the captured error. The callback function returns values of type T.</p>
<p>This method consumes the current <a class="reference internal" href="#classdolbyio_1_1comms_1_1detail_1_1async__result"><span class="std std-ref">async_result</span></a> and changes its state to <code class="docutils literal notranslate"><span class="pre">finalized</span></code>.</p>
<p>This method constructs a new <a class="reference internal" href="#classdolbyio_1_1comms_1_1detail_1_1async__result"><span class="std std-ref">async_result</span></a> of the same type as the current <a class="reference internal" href="#classdolbyio_1_1comms_1_1detail_1_1async__result"><span class="std std-ref">async_result</span></a>’s type.</p>
<p><div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="n">method_returns_async_result</span><span class="p">().</span><span class="n">then</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">){</span><span class="w"> </span><span class="c1">// handle success })</span>
<span class="w"> </span><span class="p">.</span><span class="n">consume_errors</span><span class="p">(([]</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// handle</span>
<span class="n">exception</span><span class="w"> </span><span class="p">})</span><span class="w"> </span><span class="p">.</span><span class="n">then</span><span class="p">([](){</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">another_async_method</span><span class="p">();</span><span class="w"> </span><span class="p">})</span><span class="w"></span>
<span class="w"> </span><span class="p">.</span><span class="n">on_error</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// handle exception</span>
<span class="p">});</span><span class="w"></span>
<p><div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">method_returns_async_result</span><span class="p">().</span><span class="n">then</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">){</span><span class="w"> </span><span class="c1">// handle success</span>
<span class="w"> </span><span class="p">})</span><span class="w"></span>
<span class="w"> </span><span class="p">.</span><span class="n">consume_errors</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// handle exception</span>
<span class="w"> </span><span class="p">})</span><span class="w"></span>
<span class="w"> </span><span class="p">.</span><span class="n">then</span><span class="p">([](){</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">another_async_method</span><span class="p">();</span><span class="w"> </span><span class="p">})</span><span class="w"></span>
<span class="w"> </span><span class="p">.</span><span class="n">on_error</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// handle exception</span>
<span class="w"> </span><span class="p">});</span><span class="w"></span>
</pre></div>
</div>
</p>
Expand All @@ -443,9 +448,10 @@
<p>This method consumes the current <a class="reference internal" href="#classdolbyio_1_1comms_1_1detail_1_1async__result"><span class="std std-ref">async_result</span></a> and changes its state to <code class="docutils literal notranslate"><span class="pre">finalized</span></code>.</p>
<p>This method does not return anything and should be invoked to close the async operations chain. In order to handle errors in the middle of the async operations chain, use the local error callbacks or the consume errors callback.</p>
<p>The final error callback is allowed to throw exceptions of its own, but these exceptions are caught and ignored.</p>
<p><div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="n">method_returns_async_result</span><span class="p">().</span><span class="n">then</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">){</span><span class="w"> </span><span class="c1">// handle success })</span>
<span class="w"> </span><span class="p">.</span><span class="n">on_error</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// rethrow and</span>
<span class="n">handle</span><span class="w"> </span><span class="n">exception</span><span class="w"> </span><span class="p">});</span><span class="w"></span>
<p><div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">method_returns_async_result</span><span class="p">().</span><span class="n">then</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="p">){</span><span class="w"> </span><span class="c1">// handle success</span>
<span class="w"> </span><span class="p">})</span><span class="w"></span>
<span class="w"> </span><span class="p">.</span><span class="n">on_error</span><span class="p">([](</span><span class="k">auto</span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// rethrow and handle exception</span>
<span class="w"> </span><span class="p">});</span><span class="w"></span>
</pre></div>
</div>
</p>
Expand Down
Loading

0 comments on commit 70d4f5b

Please sign in to comment.