更新时间:2022-03-21 GMT+08:00
分享

OnRemoteServiceStatusChangedNotify

回调方法描述

IdeaHub侧麦克风、摄像头、音量等状态信息发生了变化后会主动触发告知上层的回调事件。

回调方法定义

/* IdeaHub设备自身状态变化回调 */   
void OnRemoteServiceStatusChangedNotify(RemoteServiceStatus *remoteServiceStatus, int index) {}

参数描述

参数

是否必须

类型

描述

remoteServiceStatus

4.6.5.2.6 RemoteServiceStatus

bool isMute;

bool isCameraMute;

int volume;

bool isSpeakerMute;

bool isChairman;

bool isBase;

index

int

指示了上述结构体中发生了哪一个事件:

index = 1,则指示当前isMute的值,其他值无需关心(随机值)

index = 2,则指示当前isCameraMute的值,其他值无需关心(随机值)

index = 4,则指示当前volume的值,其他值无需关心(随机值)

index = 8,则指示当前isSpeakerMute的值,其他值无需关心(随机值)

index = 16,则指示当前isChairman的值,其他值无需关心(随机值)

其中isBase当前不会上报,作为预留,其值无需关心(随机值)

示例代码

void ShareEventHandler::OnRemoteServiceStatusChangedNotify(RemoteServiceStatus *remoteServiceStatus, int index)   
{    
   if (index == 8) {  
    /* 麦克风静音事件,刷新麦克风图标 */  
   }  
}
分享:

    相关文档

    相关产品