static void HandDownloadSuccessNotify(Request *request);
static void HandDownloadFailNotify(Request *request);
static void HandDownloadProgressNotify(Request *request);
+ static void HandAudioPlaybackStartNotify(Request *request);
static void HandAudioPlaybackEndNotify(Request *request);
static void HandNpcEmotionChangeNotify(Request *request);
+static void HandTimelineStatusChangeNotify(Request *request);
// 消息处理程序项数组(每个消息类型对应一个处理函数,函数名以 Handle 开头)
MsgHandlerEntry msgHandlers[] = {
{HANDLE_JUMP_OTA_VIEW, HandleJumpOtaView},
{HAND_DOWNLOAD_SUCCESS_NOTIFY,HandDownloadSuccessNotify},
{HAND_DOWNLOAD_FAIL_NOTIFY,HandDownloadFailNotify},
{HAND_DOWNLOAD_PROGRESS_NOTIFY,HandDownloadProgressNotify},
+ {HAND_AUDIO_PLAYBACK_START_NOTIFY,HandAudioPlaybackStartNotify},
{HAND_AUDIO_PLAYBACK_END_NOTIFY,HandAudioPlaybackEndNotify},
{HAND_NPC_EMOTION_CHANGE_NOTIFY,HandNpcEmotionChangeNotify},
+ {HAND_TIMELINE_STATUS_CHANGE_NOTIFY,HandTimelineStatusChangeNotify},
};
/* -------------------------------------------------------------------------- */
void ScreenTurnOn(int32_t timeout)
WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "HandNpcEmotionChangeNotify msg_id = %d", request->msgId);
std::string emotion(static_cast<char*>(request->data), request->len);
WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "HandNpcEmotionChangeNotify emotion = %s", emotion.c_str());
+ GraphicService::GetInstance()->PostGraphicEvent(
+ std::bind(&OHOS::ThunderBirdModel::HandleNpcEmotionChange,OHOS::ThunderBirdModel::GetInstance(),emotion.c_str()));
}
+// 通知时间线状态变化
+void HandTimelineStatusChangeNotify(Request *request)
+{
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "HandTimelineStatusChangeNotify msg_id = %d", request->msgId);
+ std::string payload(static_cast<char*>(request->data), request->len);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_UI_SERVICE, "HandTimelineStatusChangeNotify payload = %s", payload.c_str());
+}
/* -------------------------------------------------------------------------- */
#ifdef __cplusplus
}