1 Star 0 Fork 4.9K

famoustang / docs

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

SubscriberCallback

Overview

Related Modules:

Core

Description:

Called when the driver subscribes to other driver services.

The callback is used in the service subscription mechanism. After the driver is registered with the HDF, the HDF proactively invokes the callback after the subscribed-to driver is loaded.

Since:

1.0

Summary

Data Fields

Variable Name

Description

deviceObject

struct HdfDeviceObject

OnServiceConnected )(struct HdfDeviceObject *deviceObject, const struct HdfObject *service)

int32_t(* 

Called by the HDF when the subscribed-to driver service is loaded.

Details

Field Documentation

deviceObject

struct [HdfDeviceObject](HdfDeviceObject.md)* SubscriberCallback::deviceObject

Description:

Driver object of the subscriber

OnServiceConnected

int32_t(* SubscriberCallback::OnServiceConnected) (struct [HdfDeviceObject](HdfDeviceObject.md) *[deviceObject](SubscriberCallback.md#af8640bdb30eb50c1d69781940b62c20d), const struct [HdfObject](HdfObject.md) *service)

Description:

Called by the HDF when the subscribed-to driver service is loaded.

Parameters:

Name

Description

deviceObject Indicates the pointer to the variable of the HdfDeviceObject type. This variable is generated by the HDF and passed to the driver.
service Indicates the pointer to the service object.

Returns:

Returns 0 if the operation is successful; returns a non-zero value otherwise.

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

搜索帮助