1 Star 0 Fork 4.9K

Cain / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Provider.md 3.87 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

Provider

Overview

Related Modules:

Broadcast

Description:

Defines the provider of events and data of a topic.

Summary

Data Fields

Variable Name

Description

Publish )(IUnknown *iUnknown, const Topic *topic, uint8 *data, int16 len)

BOOL(* 

Publishes events and data of a specified topic.

Details

Field Documentation

Publish

BOOL(* Provider::Publish) ([IUnknown](IUnknown.md) *iUnknown, const [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542) *topic, uint8 *data, int16 len)

Description:

Publishes events and data of a specified topic.

The events or data is published by the publisher, sent to all consumers who have subscribed to the topic, and processed by the consumers.

Parameters:

Name

Description

iUnknown Indicates external interface of the pub/sub feature.
topic Indicates the pointer to the topic to publish.
data Indicates the pointer to the data to publish.
len Indicates the length of the data to be published. The length must be the same as the data length. The caller must ensure the validity of this parameter.

Returns:

Returns TRUE if the topic is successfully published; returns FALSE otherwise.

1
https://gitee.com/cain_qin/docs.git
git@gitee.com:cain_qin/docs.git
cain_qin
docs
docs
master

搜索帮助