未验证 提交 1c714398 编写于 作者: O openharmony_ci 提交者: Gitee

!1696 修改API更新后同步遗漏的文档说明

Merge pull request !1696 from honghecun/master
......@@ -15,7 +15,7 @@ HiSysEvent supports listening for events across processes. You can register a li
</th>
</tr>
</thead>
<tbody><tr id="row16441155818499"><td class="cellrowborder" valign="top" width="48.120000000000005%" headers="mcps1.2.3.1.1 "><p id="p877916438211"><a name="p877916438211"></a><a name="p877916438211"></a>int HiSysEventManager::AddEventListener(std::shared_ptr&lt;HiSysEventSubscribeCallBack&gt; listener, std::vector&lt;struct ListenerRule&gt;&amp; rules)</p>
<tbody><tr id="row16441155818499"><td class="cellrowborder" valign="top" width="48.120000000000005%" headers="mcps1.2.3.1.1 "><p id="p877916438211"><a name="p877916438211"></a><a name="p877916438211"></a>bool HiSysEventManager::AddEventListener(std::shared_ptr&lt;HiSysEventSubscribeCallBack&gt; listener, std::vector&lt;struct ListenerRule&gt;&amp; rules)</p>
</td>
<td class="cellrowborder" valign="top" width="51.88%" headers="mcps1.2.3.1.2 "><p id="p14727325133216"><a name="p14727325133216"></a><a name="p14727325133216"></a>Registers a listener for system events. You can listen for certain events by specifying rules.</p>
<p id="p167271525203213"><a name="p167271525203213"></a><a name="p167271525203213"></a>Input arguments:</p>
......@@ -24,7 +24,7 @@ HiSysEvent supports listening for events across processes. You can register a li
<a name="ul12105842111913"></a><a name="ul12105842111913"></a><ul id="ul12105842111913"><li><strong id="b117641849702"><a name="b117641849702"></a><a name="b117641849702"></a>0</strong>: Repeated registration is successful.</li><li><strong id="b2682415314"><a name="b2682415314"></a><a name="b2682415314"></a>1</strong>: Initial registration is successful.</li><li>Other values: Registration has failed.</li></ul>
</td>
</tr>
<tr id="row910319443242"><td class="cellrowborder" valign="top" width="48.120000000000005%" headers="mcps1.2.3.1.1 "><p id="p15104154411248"><a name="p15104154411248"></a><a name="p15104154411248"></a>void HiSysEventManager::RemoveListener(std::shared_ptr&lt;HiSysEventSubscribeCallBack&gt; listener)</p>
<tr id="row910319443242"><td class="cellrowborder" valign="top" width="48.120000000000005%" headers="mcps1.2.3.1.1 "><p id="p15104154411248"><a name="p15104154411248"></a><a name="p15104154411248"></a>bool HiSysEventManager::RemoveListener(std::shared_ptr&lt;HiSysEventSubscribeCallBack&gt; listener)</p>
</td>
<td class="cellrowborder" valign="top" width="51.88%" headers="mcps1.2.3.1.2 "><p id="p1104194420248"><a name="p1104194420248"></a><a name="p1104194420248"></a>Removes the listener for system events.</p>
<p id="p7943171095411"><a name="p7943171095411"></a><a name="p7943171095411"></a>Input arguments:</p>
......
......@@ -27,8 +27,8 @@ HiSysEvent提供了跨进程订阅机制,开发者可以通过注册订阅接
| 接口名称 | 描述 |
| -------- | --------- |
|int HiSysEventManager::AddEventListener(std::shared_ptr&lt;HiSysEventSubscribeCallBack&gt; listener, std::vector&lt;ListenerRule&gt;&amp; rules)|接口功能:注册订阅HiSysEvent系统事件侦听对象,可设置规则订阅某些事件。<br><br>输入参数:<ul><li>listener:订阅回调对象。</li><li>rules:事件订阅规则。</li></ul>返回值:<ul><li>0:订阅成功,重复订阅。</li><li>1:订阅成功,初次订阅。</li><li>其他值:订阅失败。</li></ul>|
|void HiSysEventManager::RemoveListener(std::shared_ptr&lt;HiSysEventSubscribeCallBack&gt; listener)|接口功能:移除订阅hisysevent系统事件侦听对象。<br><br>输入参数:<ul><li>listener:订阅回调对象。</ul>返回值:<br>&emsp;&emsp;无。|
|bool HiSysEventManager::AddEventListener(std::shared_ptr&lt;HiSysEventSubscribeCallBack&gt; listener, std::vector&lt;ListenerRule&gt;&amp; rules)|接口功能:注册订阅HiSysEvent系统事件侦听对象,可设置规则订阅某些事件。<br><br>输入参数:<ul><li>listener:订阅回调对象。</li><li>rules:事件订阅规则。</li></ul>返回值:<ul><li>0:订阅成功,重复订阅。</li><li>1:订阅成功,初次订阅。</li><li>其他值:订阅失败。</li></ul>|
|bool HiSysEventManager::RemoveListener(std::shared_ptr&lt;HiSysEventSubscribeCallBack&gt; listener)|接口功能:移除订阅hisysevent系统事件侦听对象。<br><br>输入参数:<ul><li>listener:订阅回调对象。</ul>返回值:<br>&emsp;&emsp;无。|
**表 2** ListenerRule订阅规则对象
......@@ -64,7 +64,7 @@ HiSysEvent提供了跨进程订阅机制,开发者可以通过注册订阅接
#ifndef DEMO_LISTENER_H
#define DEMO_LISTENER_H
#include "hisysevent_subscribe_callback_native.h"
#include "hisysevent_subscribe_callback.h"
#include <string>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册