1 Star 0 Fork 4.9K

famoustang / docs

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

Broadcast

Overview

Provides data subscription and data push for services.

With this module, the Service, Feature, or other modules can broadcast events or data. All services that listen to these events or data can receive these broadcasts.

Since:

1.0

Version:

1.0

Summary

Data Structures

Data Structure Name

Description

Consumer

Defines the topic consumer used to receive events and push data. You need to implement this struct for your application.

Provider

Defines the provider of events and data of a topic.

Subscriber

Defines the subscriber for external interfaces to subsribe to events and data of a topic.

Typedefs

Typedef Name

Description

Topic

typedef uint32 

Indicates the topic of an event or data, which is used to distinguish different types of events or data.

Enumerations

Enumeration Name

Description

BroadcastErrCode { EC_ALREADY_SUBSCRIBED = EC_SUCCESS + 1 }

Enumerates error codes unique to the Broadcast service.

Details

Typedef Documentation

Topic

typedef uint32 [Topic](Broadcast.md#gaf03f5bc94cad32ab628a6cdee09b0542)

Description:

Indicates the topic of an event or data, which is used to distinguish different types of events or data.

Enumeration Type Documentation

BroadcastErrCode

enum [BroadcastErrCode](Broadcast.md#ga98f7a28020aa045ad049d116e1ca666d)

Description:

Enumerates error codes unique to the Broadcast service.

Enumerator

Description

EC_ALREADY_SUBSCRIBED 

Error code showing that a topic has been subscribed to

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

搜索帮助