目录

ServiceCollaborationCallback

Overview

Callback method passed to HMS_ServiceCollaboration_StartCollaboration or HMS_ServiceCollaboration_StartCollaborationV2, which is used to pass the status information of device interconnectivity.

Since: 5.0.0(12)

Related module: ServiceCollaboration

Header file: service_collaboration_api.h

Summary

[h2]Member Variables

Name Description
int32_t(* OnEvent )(ServiceCollaborationEventCode code, uint32_t extraCode) Called when the status of the device interconnectivity service changes.
int32_t(* OnDataCallback )(ServiceCollaborationEventCode code, ServiceCollaborationDataType dataType, uint32_t dataSize, char *data) Called when the data of the device interconnectivity service is returned.

Struct Member Variable Description

[h2]OnDataCallback

int32_t(* ServiceCollaborationCallback::OnDataCallback) (ServiceCollaborationEventCode code, ServiceCollaborationDataType dataType, uint32_t dataSize, char *data)

Description

Called when the data of the device interconnectivity service is returned.

Parameters:

Name Description
ServiceCollaborationEventCode code Error code.
ServiceCollaborationDataType dataType Types of the data returned.
uint32_t dataSize Data size, in bytes.
char *data Data.

[h2]OnEvent

int32_t(* ServiceCollaborationCallback::OnEvent) (ServiceCollaborationEventCode code, uint32_t extraCode)

Description

Called when the status of the device interconnectivity service changes.

Parameters:

Name Description
ServiceCollaborationEventCode code Error code.
uint32_t extraCode Extended status code, which carries additional information that is not provided by the error code.