<p>Kevin Harwell <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11463">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mwi: Update the MWI core to use stasis_state API<br><br>** Note **<br><br>This patch is meant to be the minimum needed in order for the MWI core to use<br>the now underlying stasis_state module. As such it does not completely remove<br>its reliance on the stasis_cache. Doing so has allowed current consumers to<br>not have to change, and update those code paths for this patch. When time<br>allows, subsequent patches can/will be made to those consumers to take advantage<br>of some of the new MWI API included here. Thus, eventually and ultimately<br>removing MWI dependency on the stasis_cache.<br><br>** End Note **<br><br>This patch makes it so the MWI core now takes advantage of the new stasis_state<br>API. Consumers of MWI should no longer need to depend upon stasis topic pooling,<br>and the stasis cache directly. Similar functionality and implementation details<br>have now been pushed into the stasis_state module. However, all MWI state should<br>be accessed via the MWI API itself.<br><br>As such a few new methods, and constructs have been added to the MWI core that<br>facilitate consumer publishing, subscribing, and iterating over MWI state data.<br><br>* ast_mwi_subscriber *<br><br>Created via ast_mwi_add_subscriber, a subscriber subscribes to a given mailbox<br>in order to receive updates about the given mailbox. Adding a subscriber will<br>create the underlying topic, and associated state data if those do not already<br>exist for it. The topic, and last known state data is guaranteed to exist for<br>the lifetime of the subscriber.<br><br>* ast_mwi_publisher *<br><br>Before publishing to a particular topic a publisher should be created. This can<br>be achieved by using ast_mwi_add_publisher. Publishing to a mailbox should then<br>be done using one of the MWI publish functions. This ensures the message is<br>published to the appropriate topic, and the last known state is maintained.<br><br>* ast_mwi_observer *<br><br>Add an observer in order to watch for particular MWI module related events. For<br>instance if a submodule needs to know when a subscription is added to any<br>mailbox an observer can be added to watch for that.<br><br>* other *<br><br>Urgent message count is now part of the published MWI state object. Also state<br>can be iterated over using defined callbacks.<br><br>ASTERISK-28442<br><br>Change-Id: I93f935f9090cd5ddff6d4bc80ff90703c05cf776<br>---<br>M include/asterisk/mwi.h<br>M main/mwi.c<br>A tests/test_mwi.c<br>3 files changed, 964 insertions(+), 52 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/63/11463/2</pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11463">change 11463</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11463"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I93f935f9090cd5ddff6d4bc80ff90703c05cf776 </div>
<div style="display:none"> Gerrit-Change-Number: 11463 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>